amot-dev / endshards

A Minecraft Mod expanding the endgame with 3 new armor sets, a new dimension, and a new boss!
GNU General Public License v3.0
0 stars 0 forks source link

Crashes when attempting to clear invalid targets with null thrall owner uuid #58

Closed Linguardium closed 6 months ago

Linguardium commented 6 months ago

https://github.com/amot-dev/endshards/blob/b8d5bfcd04eba484efcddf0b756692f69ba5f867/src/main/java/dev/amot/endshards/mixin/ThrallMixin.java#L101

if thrallOwnerUUID is null (which it is by default) this will crash. Best to use Util.NIL_UUID which is a uuid of all 0s, then check against that.

amot-dev commented 6 months ago

To be honest, rereading my code there I'm not even sure why I'm not immediately checking if the mob is a thrall. Either way, that whole class needs reworking.