Getting attacked by infected mobs crashes game
Scapulaunit12 opened this issue ยท 3 comments
Whenever you get attacked by a mob that is infected the game crashses if it hurts you. Doesnt crash when you hurt it.
- Activate Herobrine Altar
- Find or spawn infected mob
- aggro it or let it attack you
- The game should crash
Forge:35.1.10
The only mod I had installed was this one.
I'll look into the possible causes of this issue. I've been having issues with similar things in testing because of a mistake I made when initially updating everything to 1.16 that I previously thought I fixed.
I've just looked into it and it seems like this line of code in AbstractInfectedEntity.java was overlooked when I was fixing the mistake. It creates a null pointer exception for the position if I remember correctly.
float f = this.world.getDifficultyForLocation(new BlockPos(this)).getAdditionalDifficulty();
Just fixed it. I'll release an update very soon today after I get rid of the code from me trying to get structures to work.
I changed the line of code to
float f = this.world.getDifficultyForLocation(this.getPosition()).getAdditionalDifficulty();