rwtema / Extra-Utilities-2-Source

Sourcecode for Extra Utilities
Other
108 stars 75 forks source link

EU2 mechanic crafter crashes with some Animania recipes #21

Closed TheCodingGorilla closed 6 years ago

TheCodingGorilla commented 6 years ago

Expected Behavior

Expected the EU2 mechanical crafter to craft without issue

Actual Behavior

The game crashes and causes the world to continue to crash every time the chunk containing the mechanical crafter is loaded

Steps to Reproduce

  1. Use extrautils2-1.12-1.7.2 with animania-1.12.2-1.4.6
  2. Place a mechanical crafter
  3. Place the components for recipe for Raw Prime Steak
  4. Crash occurs

Version of Minecraft, version of Animania, Single Player or Server

MC: 1.12 Animania: 1.4.6 Both Single and Server

Log Extract

java.lang.NullPointerException: Ticking block entity at net.minecraft.item.ItemStack.func_77972_a(ItemStack.java:347) at com.animania.common.recipes.MeatCuttingRecipe.func_179532_b(MeatCuttingRecipe.java:39) at com.rwtema.extrautils2.tile.TileCrafter.operate(TileCrafter.java:198) at com.rwtema.extrautils2.tile.TileAdvInteractor.func_73660_a(TileAdvInteractor.java:93) at net.minecraft.world.World.func_72939_s(World.java:1832) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:612) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:765) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) at java.lang.Thread.run(Thread.java:745)

rwtema commented 6 years ago

By the looks of it, Animania is calling the damageItem with the forge crafting player (which is null when using any autocrafting system) causing a NPE.

They should probably be calling attemptDamageItem() directly.