Fixed heat generator NPE
Error crashed server many times. http://pastebin.com/TgR1ZFge
This commit is contained in:
parent
ca3018b5b7
commit
bcb588ea1b
1 changed files with 7 additions and 5 deletions
|
@ -38,8 +38,6 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate()
|
public void onUpdate()
|
||||||
{
|
{
|
||||||
super.onUpdate();
|
|
||||||
|
|
||||||
if(inventory[1] != null && electricityStored > 0)
|
if(inventory[1] != null && electricityStored > 0)
|
||||||
{
|
{
|
||||||
if(inventory[1].getItem() instanceof IItemElectric)
|
if(inventory[1].getItem() instanceof IItemElectric)
|
||||||
|
@ -100,9 +98,13 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
fuelSlot.liquidStored += fuel;
|
fuelSlot.liquidStored += fuel;
|
||||||
--inventory[0].stackSize;
|
--inventory[0].stackSize;
|
||||||
|
|
||||||
if(prevStack.itemID == Mekanism.hooks.BuildCraftFuelBucket.itemID)
|
if(prevStack != null && Mekanism.hooks.BuildCraftFuelBucket != null)
|
||||||
{
|
{
|
||||||
inventory[0] = Mekanism.hooks.BuildCraftFuelBucket;
|
if(prevStack.itemID == Mekanism.hooks.BuildCraftFuelBucket.itemID)
|
||||||
|
{
|
||||||
|
inventory[0] = Mekanism.hooks.BuildCraftFuelBucket;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue