pkmnfrk / equivalentintegrations

Equivalent Integrations - expanding EMC to the rest of the Minecraft ecosystem
Other
7 stars 4 forks source link

Crash when removing EMC from an item, and reloading in-game #2

Closed pkmnfrk closed 6 years ago

pkmnfrk commented 6 years ago

Reproduction:

  1. Select an item in your hand that has EMC
  2. In the console, type /projecte removeEMC, /projecte reloadEMC

Expected: The item no longer has EMC

Actual:

java.lang.ArithmeticException: / by zero
    at java.lang.Math.floorDiv(Unknown Source)
    at com.mike_caron.equivalentintegrations.storage.EMCItemHandler.howManyCanWeMake(EMCItemHandler.java:296)
    at com.mike_caron.equivalentintegrations.storage.EMCItemHandler.refreshCachedKnowledge(EMCItemHandler.java:370)
    at com.mike_caron.equivalentintegrations.storage.EMCItemHandler.insertItem(EMCItemHandler.java:182)
    at appeng.parts.misc.ItemHandlerAdapter.injectItems(ItemHandlerAdapter.java:80)
    at appeng.parts.misc.ItemHandlerAdapter.injectItems(ItemHandlerAdapter.java:53)
    at appeng.me.storage.MEPassThrough.injectItems(MEPassThrough.java:57)
    at appeng.me.storage.MEInventoryHandler.injectItems(MEInventoryHandler.java:106)
    at appeng.me.storage.NetworkInventoryHandler.injectItems(NetworkInventoryHandler.java:101)
    at appeng.me.cache.NetworkMonitor.injectItems(NetworkMonitor.java:161)
    at appeng.util.Platform.poweredInsert(Platform.java:1242)
    at appeng.parts.automation.PartImportBus.importStuff(PartImportBus.java:238)
    at appeng.parts.automation.PartImportBus.doBusWork(PartImportBus.java:201)
    at appeng.parts.automation.PartImportBus.tickingRequest(PartImportBus.java:154)
    at appeng.me.cache.TickManagerCache.onUpdateTick(TickManagerCache.java:94)
    at appeng.me.GridCacheWrapper.onUpdateTick(GridCacheWrapper.java:43)
    at appeng.me.Grid.update(Grid.java:280)
    at appeng.hooks.TickHandler.onTick(TickHandler.java:228)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1100_TickHandler_onTick_TickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:265)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:712)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:252)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Unknown Source)
pkmnfrk commented 6 years ago

Fixed.