rwtema / Extra-Utilities-2-Source

Sourcecode for Extra Utilities
Other
108 stars 75 forks source link

Magical Snow Globe #150

Closed maxell45146 closed 6 years ago

maxell45146 commented 6 years ago

Is this still a WIP or is there something special to use it? Its currently activated but seems to do nothing.

Robijnvogel commented 6 years ago

It also sounds like it's causing crashes for some at the moment.

resinate commented 6 years ago

its causes crashes when u use items such as food or bow

rwtema commented 6 years ago

Crafting component for Quantum Quarry and several upcoming things.

I cannot replicate the crash. If anyone else can, feel free to make a proper issue.

Robijnvogel commented 6 years ago

It seems like event.getItemStack().getItem() at https://github.com/rwtema/Extra-Utilities-2-Source/blob/master/1.10.2/src/main/java/com/rwtema/extrautils2/items/ItemSnowglobe.java#L293 somehow throws an NPE.^ I mean that event, .getItemStack() or .getItem() could be null.

This may be caused by another mod, but wouldn't the Item returned by .getItem() be null if ItemStack.isEmpty() is true? If so, I could see this code crashing Minecraft if the last Food of an ItemStack is eaten.

^That is, assuming EntityPlayerSP.getActiveHand() and RenderSpecificHandEvent.getHand() can not return null.

Robijnvogel commented 6 years ago

I could easily reproduce this with the latest MC 1.10.2 release. Not with the 1.11 or 1.12 releases, though. I hope I reported this "properly" in #153 . :)