mojira.dev
MC-66511

Creeper's new Attack Golem AI takes priority over Avoid Ocelot/Cat

Recently, Creepers were changed to actively attack Iron Golems, since Iron Golems had been changed to attack them previously. However, this AI to attack Iron Golems takes priority over the AI for avoiding Ocelots/Cats. A simple way to show this is using this command:

/summon Ozelot ~ ~ ~ {Riding:{id:VillagerGolem}}

When a Creeper is spawned within range, it will run up to the Iron Golem and explode, killing the Ocelot. When considering players, Creepers will always prioritize avoiding Ocelots/Cats over attacking. The AI prioritizing attacking Iron Golems to avoiding Ocelots/Cats is definitely erroneous.

Linked issues

Comments 7

I noticed this as well. Creating an iron golem and surrounding it with cats does nothing to stop creepers from suicide bombing the iron golem. Confirmed in 14w32d. Multiple creepers blew the iron golem out of a small, fenced area with no less than three cats between them and the golem

Updated for 14w33a. Decided to do another test: I had a 7x7 platform 5 blocks above the void, with a single block path 5 blocks off the platform. I put a cat on the block where the platform meets the path, with a creeper at the end of the path. The creeper stayed at the end. I summoned an Iron Golem at the other end of the platform. The creeper walked into the Ocelot, shoving it out of the way, and blew up, killing the cat and tossing the Iron Golem into the void.

Ran some more tests in 14w34b, and I think this is a bug completely unrelated to Iron Golems. The Creeper on the platform moved among the Ocelots with barely any interest in them. When I spawned an Iron Golem, it made short work of the Creeper before it could explode. I think a separate big report should be filed now that Creepers are no longer afraid of Ocelots.

In my tests, Creepers did run away from my Ocelots, although somewhat rarely. However, when presented with an Iron Golem, they would suddenly snap to facing it, walking up and past/through the cat.

There seem to be other factors, as I tried to test the Creeper/Ocelot issue on a platform above the ground and also on the ground in an open area and noticed different behavior. It may be that Creepers only run away/avoid Ocelots given enough space to do so. I can confirm that Creepers make no effort to avoid Ocelots when an Iron Golem is present, which makes me concerned they would have no effect if I surrounded myself with cats in survival.

/summon Ozelot ~ ~ ~ {Owner:MegaScience,Sitting:1b}

I just tested using the above command to spawn a bunch of Ocelots. I then spawned a bunch of Creepers around them, which kept distance. I went into survival mode in the middle of them. The Creepers started walking toward me for a second, only to abruptly run away the next second every time. This is only an issue with Iron Golems, it seems.

Edit: I just did more tests on open ground like you said. They do seem to avoid the Ocelots more often, but I noticed Creepers will walk closer before running from the Ocelot. Point being the Attack Iron Golem is still being factored sooner than Avoid, but it works better in the pen than in isolation.

SInce MC-61844 has been fixed, this is also Fixed.

megascience

(Unassigned)

Unconfirmed

Minecraft 14w32d, Minecraft 14w33a, Minecraft 14w33c, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d

Minecraft 1.8-pre3

Retrieved