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

Itematic

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

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

Itematic 0.3.0

Release3 мес. назад

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

The release before the split to 1.21 happens as described in the roadmap to 1.21! This version added item bar styles and made a couple of changes to the item holder and block placement behaviour.

Changes

Assets

  • Added textures for the item bar progress.

Items

  • Added the optional item_bar_style field to the item base.
    • Has a default value of minecraft:damage.
    • Its value is an id referencing an item bar style in a resource pack.
    • This value can be changed for individual item stacks in the new minecraft:item_bar_style data component.

Example:

{
  "base": {
    "item_bar_style": "minecraft:bundle",
    "translation_key": "item.minecraft.bundle"
  }
}

Item Behaviour Components

minecraft:block

  • Added a new optional field called passes:
    • Its value is a list of strings that allows its user to place a block given a certain context.
    • It replaces the need to use the minecraft:useable_on_block behaviour component.
    • The default value is ["block"].
    • Possible values:
      • block: Allows the user to place the block on another block.
      • fluid: Allows the user to place the block on a fluid.
    • Example from minecraft:lily_pad:
      {
        "block": "minecraft:lily_pad",
        "passes": [
          "fluid"
        ]
      }
      

minecraft:item_holder

  • Added a new field called rules:
    • Its value is a list of item holder rules and determines whether an item stack can be added or not and decides how much room it takes.
      • See the item holder rules section for more information.
      • If no rule is picked, the inverse of its maximum stack size will be used instead.
    • Its value for a specific item stack may be overwritten in the new rules field in the minecraft:bundle_contents data component.

An example from the minecraft:bundle item:

[
  {
    "type": "minecraft:reject",
    "condition": {
      "items": "#minecraft:banned_bundle_items"
    }
  },
  {
    "type": "minecraft:fraction_with_occupancy_held_items",
    "condition": {
      "behavior": [
        "minecraft:item_holder"
      ]
    },
    "fraction": {
      "denominator": 16,
      "numerator": 1
    }
  },
  {
    "type": "minecraft:fraction",
    "condition": {
      "data_components": [
        "minecraft:bees"
      ]
    },
    "fraction": {
      "denominator": 1,
      "numerator": 1
    }
  }
]
  • Made changes to the capacity field:
    • Its value is now a positive fraction that is capped at a value of 100 and determines how many 'full stacks' an item holder can hold.
      • See the extras section for more information on fractions.
    • Its value for a specific item stack may be overwritten with the new minecraft:item_holder_capacity data component.

Example:

{
  "denominator": 4,
  "numerator": 1
}

Data Components

  • Added the following data components:
    • minecraft:item_bar_style
    • minecraft:item_holder_capacity
    • minecraft:item_holder_rules

minecraft:item_bar_style

  • Specified and used by the item base.
  • If removed, will not display an item bar style under any circumstances.
  • Its value is an id referencing an item bar style in a resource pack.

minecraft:item_holder_capacity

  • Specified and used by the minecraft:item_holder behaviour component.
  • If removed, the item holder behaviour will no longer work.
  • Its value is a positive fraction that is capped at a value of 100 and determines how many 'full stacks' an item holder can hold.
    • See the extras section for more information on fractions and its format.

Examples:

  • {"numerator": 1, "denominator": 1} (1/1) would be able to hold 64 item stacks of items stackable to 64.
  • {"numerator": 2, "denominator": 1} (2/1) would be able to hold 128 item stacks of items stackable to 64.
  • {"numerator": 1, "denominator": 2} (1/2) would be able to hold 32 item stacks of items stackable to 64.

minecraft:item_holder_rules

  • Specified and used by the minecraft:item_holder behaviour component.
  • If removed, the item holder behaviour will no longer work.
  • Its value is a list of item holder rules.

Example:

[
  {
    "type": "minecraft:reject",
    "condition": {
      "items": "#minecraft:banned_bundle_items"
    }
  },
  {
    "type": "minecraft:occupancy_held_items_with_penalty",
    "condition": {
      "behavior": [
        "minecraft:item_holder"
      ]
    },
    "penalty": {
      "denominator": 16,
      "numerator": 1
    }
  },
  {
    "type": "minecraft:fraction",
    "condition": {
      "data_components": [
        "minecraft:bees"
      ]
    },
    "fraction": {
      "denominator": 1,
      "numerator": 1
    }
  }
]

Item Bar Styles

An item bar style determines the visuals for the item bar that is displayed on top of an item stack. They are specified under the item_bar_style folder in a resource pack. Format:

  • color: A colour provider. Determines the colour to apply over the texture based on its progress. See the colour providers section for more information.
  • progress: A progress provider. Determines what texture to use from the textures field. See the progress providers section for more information.
  • textures: A non-empty list of ids pointing to textures in the minecraft:gui atlas. The textures to use for the item bar.
    • The texture used is determined by the progress field, with a value of 0 being the first element and a value of 1 being the last element in the list.

Example:

{
  "color": {
    "type": "minecraft:hue_shift",
    "end": 0,
    "start": 120
  },
  "progress": "minecraft:damage",
  "textures": [
    "minecraft:item_bar/progress/13",
    "minecraft:item_bar/progress/12",
    "minecraft:item_bar/progress/11",
    "minecraft:item_bar/progress/10",
    "minecraft:item_bar/progress/9",
    "minecraft:item_bar/progress/8",
    "minecraft:item_bar/progress/7",
    "minecraft:item_bar/progress/6",
    "minecraft:item_bar/progress/5",
    "minecraft:item_bar/progress/4",
    "minecraft:item_bar/progress/3",
    "minecraft:item_bar/progress/2",
    "minecraft:item_bar/progress/1",
    "minecraft:item_bar/progress/0"
  ]
}

Colour Providers

A colour provider determines the colour to apply over the texture. Format: A map with fields determined by the type in the type field. Example:

{
  "type": "minecraft:hue_shift",
  "end": 0,
  "start": 120
}

minecraft:constant

  • Always applies the specified colour over the texture.
  • Fields:
    • color: An integer. The colour to use.

minecraft:hue_shift

  • Linearly shifts the hue from start to end depending on the progress. Always has a saturation and brightness of 100%.
  • Fields:
    • start: An integer ranging from 0 to 360. The start hue, used exactly when the progress is 0.
    • end: An integer ranging from 0 to 360. The end hue, used exactly when the progress is 1.

Progress Providers

A progress provider determines whether to display the item bar and what value to use that determines its texture.

minecraft:damage

  • Displays when the item stack is damaged.
  • Its value is the damage of the item stack divided by its durability.

minecraft:item_holder_occupancy

  • Displays when the item stack's item holder contents are occupied.
  • Its value is the occupancy calculated by the item stack's item holder contents.

Item Holder Rules

An item holder rule determines whether an item stack can be added to an item holder or not and decides how much room it takes. Its format is a map with fields determined by the type in the type field, as well as an optional condition field that is an item predicate. All possible types are shown below.

Example:

{
  "type": "minecraft:reject",
  "condition": {
    "items": "#minecraft:banned_bundle_items"
  }
}

minecraft:fraction

  • Uses the specified fraction as its occupancy.
  • Fields:
    • fraction: A positive fraction that is capped at a value of 100. The fraction to use as its occupancy.

Example:

{
  "type": "minecraft:fraction",
  "condition": {
    "data_components": [
      "minecraft:bees"
    ]
  },
  "fraction": {
    "denominator": 1,
    "numerator": 1
  }
}

minecraft:occupancy_held_items_with_penalty

  • Uses the occupancy of the item stack's item holder item stacks with a penalty added on top of it.
  • If the item stack does not have the minecraft:item_holder behaviour component or doesn't have the minecraft:bundle_contents data component, it will only add the penalty.
  • Fields:
    • penalty: A positive fraction that is capped at a value of 100. The penalty to add to the occupancy.

Example:

{
  "type": "minecraft:occupancy_held_items_with_penalty",
  "condition": {
    "behavior": [
      "minecraft:item_holder"
    ]
  },
  "penalty": {
    "denominator": 16,
    "numerator": 1
  }
}

minecraft:reject

  • Prevents the item stack from being added to the item holder altogether.
  • Has no additional fields.

Example:

{
  "type": "minecraft:reject",
  "condition": {
    "items": "#minecraft:banned_bundle_items"
  }
}

Extras

Fractions

  • A way of representing fractions to keep accuracy of numbers where this is necessary.
  • Fields:
    • numerator: An integer used for the numerator of the fraction.
    • denominator: An integer used for the denominator of the fraction.
  • Fails to parse the denominator is 0.

Example:

{
  "denominator": 4,
  "numerator": 1
}

Item Predicates

  • Added the following fields:
    • behavior: An optional list of behaviour component types. Checks whether the item has the specified item behaviour components.
    • data_components: An optional list of data component types. Checks whether the item stack has the specified data components.
      • Note: this field is temporary and will be removed sometime in 1.21 in favour of component predicates!

Fixes

  • Fixed a crash when dropping all items from an item holder.
  • Fixed the item bar display for item holders with capacities that don't have a value of 1.
  • Updating the item holder rules retains the old rules on item stacks that already have contents (#54)

Файлы

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

Метаданные

Канал релиза

Release

Номер версии

0.3.0

Загрузчики

Fabric

Версии игры

1.20.5–1.20.6

Загрузок

19

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

3 мес. назад

Загрузил

ID версии

Главная