Skip to content

Port to 24w34a#70

Merged
ErrorCraft merged 17 commits into0.5.0+1.21.3from
port/mc-24w34a
Feb 2, 2026
Merged

Port to 24w34a#70
ErrorCraft merged 17 commits into0.5.0+1.21.3from
port/mc-24w34a

Conversation

@ErrorCraft
Copy link
Owner

@ErrorCraft ErrorCraft commented Jan 31, 2026

Added everything from 24w33a and 24w34a and made changes accordingly.

Changes

Item Behaviour Components

  • Modified minecraft:consumable.
    • Moved the result_item field to minecraft:useable.
  • Expanded minecraft:cooldown.
    • Added an optional group field, which is the id to use as the cooldown group. If not specified, it will use the item id instead.
    • Its entire value may be modified for individual item stacks using the minecraft:use_cooldown data component.
  • Expanded minecraft:entity.
    • Added an optional passes field, which is a list of strings that allows its user to place an entity given a certain context.
      • block: Allows the user to place the entity on a block.
      • fluid: Allows the user to place the entity on a fluid.
    • Its default value is ["block"].
    • Example:
       {
         "allow_item_data": true,
         "entity": {
           "type": "minecraft:pig"
         },
         "passes": [
           "block",
           "fluid"
         ]
       }
  • Modified minecraft:food.
    • Removed the effects field.
      • This should now be applied with the minecraft:consume_item or minecraft:eat_item item event combined with predicates and the new minecraft:add_status_effects action.
        So if you had this:
       {
         "components": {
           "minecraft:food": {
             "effects": [
               {
                 "effect": {
                   "id": "minecraft:hunger",
                   "duration": 600,
                   "show_icon": true
                 },
                 "probability": 0.8
               }
             ],
             "nutrition": 4,
             "saturation": 0.8
           }
         }
       }
    You now have to use this instead:
    json { "components": { "minecraft:food": { "nutrition": 4, "saturation": 0.8 } }, "events": { "minecraft:consume_item": { "action": { "type": "minecraft:add_status_effects", "effects": [ { "id": "minecraft:hunger", "duration": 600, "show_icon": true } ], "entity": "this" }, "requirements": { "conditions": { "chance": 0.8, "condition": "minecraft:random_chance" }, "context": { "entity": "this", "position": "this" } } } } }
  • Modified minecraft:fuel.
    • Added an optional remainder field, which is the item stack to leave when used as a fuel.
    • This replaces the minecraft:recipe_remainder item behaviour that was used previously for this.
    • Example:
       {
         "remainder": {
           "id": "minecraft:bucket",
           "count": 1
         },
         "ticks": 20000
       }
  • Removed minecraft:recipe_remainder.
    • This has been replaced by remainders in recipe ingredients directly and the new remainder field in the minecraft:fuel item behaviour component.
  • Modified minecraft:useable.
    • Added an optional remainder field, which is the item stack to leave when finished using, whether instantaneous or over a specified duration.

    • Example:

       {
         "animation": "eat",
         "remainder": {
           "id": "minecraft:bowl",
           "count": 1
         },
         "ticks": {
           "type": "minecraft:constant",
           "amount": 32
         }
       }
    • Changed the way the use duration in the ticks field works:

      • If not specified, the item will be used instantly instead of being used indefinitely.
      • To reproduce the previous behaviour, use the new minecraft:indefinite use duration provider.
      • This makes the field in the behaviour component the same as the data component in all cases.
      • A positive integer can still be used as a direct usage of minecraft:constant.
        So if you had this:
       {
         "minecraft:useable": {
           "animation": "block"
         }
       }
    You now have to use this instead:
    json { "minecraft:useable": { "animation": "block", "ticks": { "type": "minecraft:indefinite" } } }
  • Removed minecraft:useable_on_fluid.
    • This behaviour has been replaced in favour of passes in their respective behaviour components.

Data Components

  • Modified minecraft:use_duration.

    • You now no longer specify a ticks field, making it consistent with the way it is used in the minecraft:useable behaviour.
      So if you had this:
       {
         "ticks": {
           "type": "minecraft:constant",
           "amount": 32
         }
       }

    You now have to use this instead:
    json { "type": "minecraft:constant", "amount": 32 }

    • You can no longer specify an empty map to specify an indefinite use duration and you must use the minecraft:indefinite use duration provider instead.
      So if you had this:
       {}

    You must now use this:
    json { "type": "minecraft:indefinite" }

    • A positive integer can still be used as a direct usage of the minecraft:constant use duration provider.
  • Modified minecraft:weapon_attack_damage.

    • When determining whether to add the base minecraft:attack_damage attribute or not, it now defaults to true instead of false and must be explicitly set by rules accordingly.

Use Durations

  • Added minecraft:indefinite.
    • Always uses the item indefinitely.
    • Has no additional fields.

Actions

  • Added minecraft:add_status_effects.
    • Adds status effects to an entity.
    • The action is unsuccessful if the entity does not exist, is not a living entity or if no effect is added.
    • Fields:
      • effects: A list of status effects. The effects to apply to the entity.
      • entity: An action context parameter. The entity to target.
    • Example:
       {
         "type": "minecraft:add_status_effects",
         "effects": [
           {
             "id": "minecraft:regeneration",
             "amplifier": 1,
             "duration": 100,
             "show_icon": true
           },
           {
             "id": "minecraft:absorption",
             "duration": 2400,
             "show_icon": true
           }
         ],
         "entity": "this"
       }

Recipes

  • Added remainders to ingredients.
    • Replaces the minecraft:recipe_remainder item behaviour component.
    • The existing format still works.
    • Currently only in use for shaped and shapeless recipes.
    • Fields:
      • items: An item, list of items or hash-prefixed item tag. The items to allow for this ingredient.
      • remainder: An optional item stack. The item stack to leave when the ingredient is consumed.
    • Example:
       {
         "items": "minecraft:milk_bucket",
         "remainder": {
           "id": "minecraft:bucket",
           "count": 1
         }
       }

@ErrorCraft ErrorCraft merged commit 89bd0cf into 0.5.0+1.21.3 Feb 2, 2026
2 of 3 checks passed
@ErrorCraft ErrorCraft deleted the port/mc-24w34a branch February 2, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant