mojira.dev
MCPE-17759

Some entity .json files are invalid - contain behaviors with the same priority level

UPDATE: cavespider.json and spider.json also have this same issue.

Behaviors in the entity behavior .json format shouldn't have the same priority level as other behaviors in the same .json. But that is exactly what happens in the official vanilla zombie.json, which you can find in C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_0.1600.5.0_x64__8wekyb3d8bbwe\data\resourcepacks\vanilla\server\entities if you are using Windows 10 Edition.

Here is the broken part of the vanilla zombie.json:

"minecraft:behavior.hurt_by_target": {
        "priority": 3
      },
      "minecraft:behavior.melee_attack": {
        "priority": 3,
        "speed_multiplier": 1,
        "track_target": false
      },

This also happens here:

"minecraft:behavior.look_at_player": {
        "priority": 7,
        "look_distance": 6,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 7
      },

It is possible that this is not the only instance of mistakes in the official entity .json files, but this is the only one I've found so far. Let me know in the comments if you find more. For some reason it doesn't crash the game, but resource packs using their own zombie.json that hasn't had this error fixed will not apply all their behaviors correctly

The correct fix for this would be to make "minecraft:behavior.hurt_by_target" have a priority level of 2, and for "minecraft:behavior.random_look_around" to have a priority level of 8.

Linked issues

Comments 2

cavespider.json and spider.json both have the same issue.

Turns out I was wrong... if 2 behaviors have the same priority, which one goes first is somewhat randomized. The problems I was having with add-ons were because of my own mistakes... and possibly a few small bugs that seem to be fixed now? Anyway, this was never a bug. Closing as invalid.

SuperGeniusZeb

(Unassigned)

Unconfirmed

Windows

Windows 10 Version 1607

add-on, behavior-pack, cave_spider, spider, zombie

0.16.0, 0.16.1, 0.17.0.1, 1.0.0.1

Retrieved