SlotPainter's implementation may cause NPE when other mods invoke mayPickup in MouseButtonPressed.Pre Event
lcy0x1 opened this issue ยท 1 comments
In the following lines:
ultimate-car-mod/src/main/java/de/maxhenkel/car/gui/SlotPainter.java
Lines 24 to 30 in 4842c40
Here you invoke Minecraft.getInstance().setScreen(null);
in mayPickup
. This means, if some other mods invoke SlotPainter::mayPickup
in ScreenEvent.MouseButtonPressed.Pre
, Minecraft.getInstance().screen
will be null, and will crash when MouseHandler
line 92 this.minecraft.screen.mouseClicked(d0, d1, i);
is called (which is where you would normally expect mayPickup
to be called).