mojira.dev
MCPE-114382

'query.is_grazing' doesn't work

When attempting to make an entity eat a block (like how sheep eat grass), when the entity is eating a block, query.is_grazing should trigger allowing us to play a eating animation. This used to work in the past but now doesn't, even using ' "runtime_identifer": "minecraft:sheep" ' in the behavior file (though it shouldn't need it).

 

Steps To Reproduce:

  1. Create an entity that eats blocks using the "minecraft:behavior.eat_block" component

  2. Create an animation that only fires when the entity is grazing (use query.is_grazing)

  3. Though the entity will eat the block, it will never play the animation

Expected Behavior:

  • query.is_grazing works for all mobs, not just the sheep

Actual Behavior:

  • query.is_grazing doesn't work for any mob that isn't a sheep

Comments 3

Works in 1.16.210.55

Resolving as Cannot Reproduce as per the above comment.

i have a better way to reproduce

  1. make a addon for bedrock with a custom mob that has code
    "minecraft:behavior.eat_block": { "priority": 6, "success_chance": "query.is_baby ? 0.02 : 0.001", "time_until_eat": 1.8, "eat_and_replace_block_pairs": [ { "eat_block": "grass", "replace_block": "dirt" }, { "eat_block": "tallgrass", "replace_block": "air" } ], "on_eat": { "event": "minecraft:on_eat_block", "target": "self" } },

  2. then make an animation defined by "grazing"

  3. then add 
    "scripts": {
                    "animate": [
                        {"grazing":"query.is_grazing"}
                    ]
                },
    4. run behavior pack

Gruntastic

(Unassigned)

Unconfirmed

Multiple

QueryResult, add-on, animation, query, resource-pack

1.16.201 Hotfix

Retrieved