Mojira Archive
MC-275191

Passive mobs crash the game when receiving weapons

Whenever you summon a passive mob with CanPickUpLoot set to true, give it a netherite sword, and then give it another netherite sword, the game crashes with the message
The game crashed whilst ticking entity
Error: java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage
I get this is weirdly specific, but I feel like it should be of some note since it crashes the game, and on occasion makes the world completely unplayable until you remove all of the entities from the world via the files

Steps to reproduce:

  1. Run
    /summon pig ~ ~ ~ {CanPickUpLoot:true}
  1. Give it a Netherite Sword
  2. Give it another Netherite Sword

Observed result:
The game crashes. Typically trying to enter the world again results in another crash.

Expected result:
The game does not crash.

Fixed

retropobor.

[Mojang] Gegy

2024-08-15, 05:30 AM

2024-09-05, 04:25 PM

2024-09-05, 04:25 PM

2

1

Confirmed

Very Important

Platform

Commands, Crash, Entities

24w33a, 1.21.1

24w37a