Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added everything from 24w33a and 24w34a and made changes accordingly.
Changes
Item Behaviour Components
minecraft:consumable.result_itemfield tominecraft:useable.minecraft:cooldown.groupfield, which is the id to use as the cooldown group. If not specified, it will use the item id instead.minecraft:use_cooldowndata component.minecraft:entity.passesfield, 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.["block"].{ "allow_item_data": true, "entity": { "type": "minecraft:pig" }, "passes": [ "block", "fluid" ] }minecraft:food.- Removed the
- This should now be applied with the
You now have to use this instead:effectsfield.minecraft:consume_itemorminecraft:eat_itemitem event combined with predicates and the newminecraft:add_status_effectsaction.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 } } }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" } } } } }minecraft:fuel.remainderfield, which is the item stack to leave when used as a fuel.minecraft:recipe_remainderitem behaviour that was used previously for this.{ "remainder": { "id": "minecraft:bucket", "count": 1 }, "ticks": 20000 }minecraft:recipe_remainder.remainderfield in theminecraft:fuelitem behaviour component.minecraft:useable.-
-
-
- If not specified, the item will be used instantly instead of being used indefinitely.
- To reproduce the previous behaviour, use the new
- 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
You now have to use this instead:Added an optional
remainderfield, 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
ticksfield works:minecraft:indefiniteuse duration provider.minecraft:constant.So if you had this:
{ "minecraft:useable": { "animation": "block" } }json { "minecraft:useable": { "animation": "block", "ticks": { "type": "minecraft:indefinite" } } }minecraft:useable_on_fluid.Data Components
Modified
minecraft:use_duration.ticksfield, making it consistent with the way it is used in theminecraft:useablebehaviour.So if you had this:
{ "ticks": { "type": "minecraft:constant", "amount": 32 } }You now have to use this instead:
json { "type": "minecraft:constant", "amount": 32 }minecraft:indefiniteuse duration provider instead.So if you had this:
{}You must now use this:
json { "type": "minecraft:indefinite" }minecraft:constantuse duration provider.Modified
minecraft:weapon_attack_damage.minecraft:attack_damageattribute or not, it now defaults totrueinstead offalseand must be explicitly set byrulesaccordingly.Use Durations
minecraft:indefinite.Actions
minecraft:add_status_effects.effects: A list of status effects. The effects to apply to the entity.entity: An action context parameter. The entity to target.{ "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
minecraft:recipe_remainderitem behaviour component.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.{ "items": "minecraft:milk_bucket", "remainder": { "id": "minecraft:bucket", "count": 1 } }