Chumbanotz / MutantBeasts

The popular Mutant Creatures mod in modern Minecraft
https://www.curseforge.com/minecraft/mc-mods/mutant-beasts
GNU Affero General Public License v3.0
13 stars 14 forks source link

[Crash] NullPointerException caused by Endersoul Fragment ticking. #8

Closed Vaelzan closed 4 years ago

Vaelzan commented 4 years ago

https://github.com/Chumbanotz/MutantBeasts/blob/8aed1e17852d04dc6c6f1c595b0e27315f07f1b3/src/main/java/chumbanotz/mutantbeasts/entity/EndersoulFragmentEntity.java#L123

The referenced line of code above can cause a crash as directly above it you potentially set this.collector to be null, causing an immediate NullPointerException as it tries to use this.collector as a parameter to getDistanceSq directly afterwards.

See: https://pastebin.com/qSytUy7h for an example of the crash.

Chumbanotz commented 4 years ago

Fixed.