More Mob Variants

More Mob Variants

13M Downloads

Unchecked read from nbt creates namespace only identifier

Linguardium opened this issue ยท 1 comments

commented

((ZombieEntity)(Object)this).getDataTracker().set(VARIANT_ID, nbt.getString(NBT_KEY));

This creates issues with mods like trofers that generate entities that dont tick.

best practice is to check for the presence of the nbt and if it isnt present, use a default. If you previously used an empty string, you may want to instead set it to default if empty after reading since a readString when the key is missing will return an empty string.

commented

This should be fixed in the upcoming 1.3.0 update, thanks!