▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Itematic
Itematic

Itematic

A mod that adds data-driven items to the game, and much more!

599
36
Все версииItematic 0.2.0

Itematic 0.2.0

Release4 мес. назад

Список изменений

The very first content release for Itematic! This version has a lot of changes regarding tools and weapons to expand their rules and ways to use them!

Changes

Entities

Mobs that don't have a base attack damage of 1 will now deal less damage when using weapons. The only exception to this currently is for Piglins, Piglin Brutes and Zombified Piglins when they use one of the following items as a weapon:

  • Golden Axe
  • Golden Hoe
  • Golden Pickaxe
  • Golden Shovel
  • Golden Sword

Item Behaviour Components

The useable behaviour was merged together and removed from some other components. This makes it so other behaviour components no longer start using an item on their own. The tool behaviour was expanded to add more rules. On top of that, the weapon behaviour now also has similar rules.

minecraft:shooter

  • This component no longer makes its user start using the item on its own and now requires minecraft:useable.
    • An integer provider named minecraft:shooter was added that can be used in its place.
  • Changed the ammunition and held_ammunition fields to be registry entry lists instead of tags.
    • This means that these entries now require an additional # prefix to use a tag.
      • For example, minecraft:bow_ammunition should now be #minecraft:bow_ammunition.
    • This data is modifiable on specific item stacks with the minecraft:shooter_ammunition and minecraft:shooter_held_ammunition data components respectively.

So if you had this:

{
  "minecraft:shooter": {
    "ammunition": "minecraft:bow_ammunition",
    "held_ammunition": "minecraft:bow_ammunition",
    "range": 15
  }
}

You now have to use this instead:

{
  "minecraft:shooter": {
    "ammunition": "#minecraft:bow_ammunition",
    "held_ammunition": "#minecraft:bow_ammunition",
    "range": 15
  },
  "minecraft:useable": {
    "ticks": {
      "type": "minecraft:shooter"
    }
  }
}

minecraft:throwable

  • This component no longer makes its user start using the item on its own when draw_duration is defined and now requires minecraft:useable.
    • The draw_duration field is now only used to check whether its user has been using the item for the specified duration when they stop using the item.
    • An integer provider named minecraft:trident was added that can be used in its place.
  • Removed the use_riptide_check field as this is now part of an integer provider named minecraft:trident instead, which can be used in its place in minecraft:useable.

So if you had this:

{
  "minecraft:throwable": {
    "angle_offset": 0.0,
    "draw_duration": {
      "min": 10
    },
    "speed": 2.5,
    "use_riptide_check": true
  }
}

You now have to use this instead:

{
  "minecraft:throwable": {
    "angle_offset": 0.0,
    "draw_duration": {
      "min": 10
    },
    "speed": 2.5
  },
  "minecraft:useable": {
    "ticks": {
      "type": "minecraft:trident"
    }
  }
}

minecraft:tool

  • Made changes to the tool rules:
    • Added an optional item field, which is an item predicate.
    • Made the blocks field optional.
    • Allowed 0 for the tool speed instead of it being strictly positive.
  • These changes were made in favour of expanding the behaviour of the preserve_item field in minecraft:damageable as this can be controlled more precisely than a simple boolean and keeps the mining behaviour in this behaviour component.
    • Note that this behaviour can still be combined with the preserve_item field to prevent the item from breaking and from being used as a tool altogether, which is likely preferred as an item stack may not necessarily be damaged by exactly one point.

An example based on the minecraft:iron_pickaxe item that sets the mining speed to 0 when the durability is 1:

{
  "minecraft:tool": {
    "rules": [
      {
        "item": {
          "predicates": {
            "minecraft:damage": {
              "durability": 1
            }
          }
        },
        "speed": 0.0
      },
      {
        "blocks": "#minecraft:incorrect_for_iron_tool",
        "correct_for_drops": false
      },
      {
        "blocks": "#minecraft:mineable/pickaxe",
        "correct_for_drops": true,
        "speed": 6.0
      }
    ]
  }
}

minecraft:use_animation

  • Removed this component as it was not behaviour.
    • It is now a field inside the minecraft:useable component instead.

minecraft:useable

  • Changed the ticks field to take a provider of a hard amount.
    • This allows for more dynamic use durations that may be context-dependent.
    • The field is optional. When it is not specified, the item will be used indefinitely.
    • The field still allows a direct constant amount, just like before.
    • This data is modifiable on specific item stacks with the minecraft:use_duration data component.
    • See the Use Integer Providers section below for more information.
  • Moved the value from minecraft:use_animation to this component in the optional animation field.
    • Possible values:
      • block
      • bow
      • brush
      • crossbow
      • drink
      • eat
      • none
      • spear
      • spyglass
      • toot_horn
    • If not specified, it will use none instead.
    • This data is modifiable on specific item stacks with the minecraft:use_animation data component.
  • Added an optional passes field, which is a list of strings that allows its user to start using the item given a certain context.
    • The default value is ["normal"].
    • Possible values:
      • normal: Allows the user to start using the item as-is.
      • block: Allows the user to start using the item when used on a block.
      • entity: Allows the user to start using the item when used on an entity.
    • This behaviour is used for the Brush to only start brushing when used on a block.
    • Example from minecraft:brush:
      {
        "minecraft:useable": {
          "passes": [
            "block"
          ],
          "ticks": {
            "type": "minecraft:constant",
            "amount": 200
          }
        }
      }
      

So if you had this:

{
  "minecraft:use_animation": "eat",
  "minecraft:useable": {
    "ticks": 32
  }
}

You now have to use this instead:

{
  "minecraft:useable": {
    "animation": "eat",
    "ticks": 32
  }
}

minecraft:weapon

  • Made changes to the attack_damage field:
    • It now uses rules instead of a hard amount, similar to the mining speed rules in minecraft:tool.
      • Format:
        • default_damage: A non-negative double. The default damage to deal to an entity. This value is absolute and thus consistent for all weapon users, unless specified so by the rules.
        • rules: A list of weapon rules. See the weapon rules section below for more information.
      • Its value for a specific item stack may be overwritten with the new minecraft:weapon_attack_damage data component.
  • Made changes to the attack_speed field:
    • It is now a multiplier instead of a relative amount.
    • Format: A non-negative double.
      • Its value for a specific item stack may be overwritten with the new minecraft:attack_speed_multiplier data component.
    • Note that while it can be set to 0, this does not prevent a Player from using the weapon altogether, just from loading the weapon to its full power. To prevent attacking, use an attack damage of 0 instead.
  • Both of these fields are now taken into account separately and are no longer attribute modifiers.

An example based on the minecraft:golden_sword item that sets the damage to 0 when the durability is 1:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 4.0,
      "rules": [
        {
          "add_base": false,
          "damage": 0.0,
          "item": {
            "predicates": {
              "minecraft:damage": {
                "durability": 1
              }
            }
          }
        },
        {
          "add_base": true,
          "damage": 3.0,
          "entities": "#minecraft:proficient_with_golden_weapons"
        }
      ]
    },
    "attack_speed": 0.4
  }
}

Data Components

Added the following data components:

  • minecraft:attack_speed_multiplier
  • minecraft:shooter_ammunition
  • minecraft:shooter_held_ammunition
  • minecraft:use_animation
  • minecraft:use_duration
  • minecraft:weapon_attack_damage Also made changes to some existing data components.

minecraft:attack_speed_multiplier

  • Specified and used by the minecraft:weapon behaviour component.
  • If removed, a multiplier of 1 will be used instead.
  • Its value is a non-negative double.

minecraft:shooter_ammunition and minecraft:shooter_held_ammunition

  • Specified and used by the minecraft:shooter behaviour component.
  • If removed, the minecraft:shooter behaviour will no longer work.
  • Its value is an item, list of items or hash-prefixed item tag.

Examples:

{
  "minecraft:shooter_ammunition": "#minecraft:bow_ammunition"
}
{
  "minecraft:shooter_held_ammunition": "#minecraft:crossbow_ammunition"
}

minecraft:tool

  • Has the same changes as the minecraft:tool behaviour component.

minecraft:use_animation

  • Specified and used by the minecraft:useable behaviour component.
  • If removed, the none animation will be used instead.
  • Its value is the same one as the one specified previously in the minecraft:use_animation item component and are also specified in the minecraft:useable behaviour changes. Examples:
{
  "minecraft:use_animation": "eat"
}
{
  "minecraft:use_animation": "drink"
}

minecraft:use_duration

  • Specified and used by the minecraft:useable behaviour component.
  • If removed, the minecraft:useable behaviour will no longer work.
  • The format is the same as the map specified in the minecraft:useable behaviour component, with one addition, that being that it allows for a single integer as another shorthand.

Examples:

  • Constant duration, simplest form.
{
  "minecraft:use_duration": 10
}
  • Constant duration, expanded form.
{
  "minecraft:use_duration": {
    "ticks": 10
  }
}
  • Indefinite duration.
{
  "minecraft:use_duration": {}
}
  • Constant duration as a provider. See the Use Integer Providers section further down for more information.
{
  "minecraft:use_duration": {
    "ticks": {
      "type": "minecraft:constant",
      "amount": 10
    }
  }
}

minecraft:weapon_attack_damage

  • Specified and used by the minecraft:weapon behaviour component.
  • If removed, the base attack damage from its user will be used instead.
  • Its value is the same as the attack_damage field from the minecraft:weapon behaviour component.

Actions

  • Removed minecraft:start_using_item.
    • Its behaviour is moved entirely to minecraft:useable and should be used in its place instead.

Use Integer Providers

These providers are added so the use duration is not hardcoded for specific behaviour components by using different sources. The integer provider type is determined by the type field and all types are shown below. An integer provider may return an empty value, in which case the user will not start using the item.

minecraft:constant

Uses the item for a constant duration.

Fields

  • amount: A positive integer. How long to use the item for.

Example

{
  "type": "minecraft:constant",
  "amount": 32
}

minecraft:playable

Uses the minecraft:playable item behaviour component to get the use duration from the minecraft:instrument data component or from a default set of instruments as defined by minecraft:playable otherwise. Has no additional fields.

Example

{
  "type": "minecraft:playable"
}

minecraft:shooter

Uses the minecraft:shooter item behaviour component to use the item indefinitely if the user is either holding ammunition as defined by the minecraft:shooter_held_ammunition data component or has ammunition in their inventory as defined by the minecraft:shooter_ammunition data component. Has no additional fields.

Example

{
  "type": "minecraft:shooter"
}

minecraft:trident

Uses the item indefinitely if the item stack has the Riptide enchantment and is either not damageable or not in a broken state and if its user is touching water or rain. Has no additional fields.

Example

{
  "type": "minecraft:trident"
}

minecraft:condition

Uses the item for the ticks specified in the amount field if the specified condition passes.

Fields

  • amount: An integer provider. How long to use the item for if the condition passes.
  • condition: An item predicate. The condition to pass before its user can start using the item.

Example

{
  "type": "minecraft:condition",
  "amount": 100,
  "condition": {
    "count": {
      "min": 3
    }
  }
}

Weapon Rules

A weapon rule dictates what damage amount should be used and whether it should add the entity's base attack damage on top of the weapon's damage or not.

Fields

  • entities: An optional entity type, list of entity types or hash-prefixed entity type tag. When specified, has to be used by the entity types specified in order for the rule to be used.
  • item: An optional item predicate. When specified, the item stack has to match the predicate in order for the rule to be used.
  • damage: An optional non-negative double. When specified, will be used as the weapon's damage instead of the default amount.
  • add_base: An optional boolean. When specified, determines whether to add its user's base minecraft:generic.attack_damage attribute value to the weapon's damage.

Example

{
  "add_base": true,
  "damage": 3.0,
  "entities": "#minecraft:proficient_with_golden_weapons"
}

Файлы

Itematic-0.2.0.jar(2.28 MiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

0.2.0

Загрузчики

Fabric

Версии игры

1.20.5–1.20.6

Загрузок

31

Дата публикации

4 мес. назад

Загрузил

ID версии

Главная