The Legend of Herobrine (Outdated)

The Legend of Herobrine (Outdated)

1M Downloads

Getting attacked by infected mobs crashes game

Scapulaunit12 opened this issue ยท 3 comments

commented

Whenever you get attacked by a mob that is infected the game crashses if it hurts you. Doesnt crash when you hurt it.

  1. Activate Herobrine Altar
  2. Find or spawn infected mob
  3. aggro it or let it attack you
  4. The game should crash

Forge:35.1.10

The only mod I had installed was this one.

commented

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();

commented

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();

commented

The update just got approved on Curseforge. Thank you for reporting this issue. It likely would have been overlooked by me otherwise.