Fix wrench.
This commit is contained in:
parent
ad9f50110a
commit
fbfd42427e
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,9 @@ public class TileEnergyStorage extends TilePowerAcceptor implements IWrenchable,
|
|||
if (inventory.getStackInSlot(0) != null)
|
||||
{
|
||||
ItemStack stack = inventory.getStackInSlot(0);
|
||||
if(!(stack.getItem() instanceof IEnergyItemInfo)){
|
||||
return;
|
||||
}
|
||||
IEnergyItemInfo item = (IEnergyItemInfo) inventory.getStackInSlot(0).getItem();
|
||||
if (PoweredItem.getEnergy(stack) != PoweredItem.getMaxPower(stack))
|
||||
{
|
||||
|
@ -78,6 +81,9 @@ public class TileEnergyStorage extends TilePowerAcceptor implements IWrenchable,
|
|||
if (inventory.getStackInSlot(1) != null)
|
||||
{
|
||||
ItemStack stack = inventory.getStackInSlot(1);
|
||||
if(!(stack.getItem() instanceof IEnergyItemInfo)){
|
||||
return;
|
||||
}
|
||||
IEnergyItemInfo item = (IEnergyItemInfo) stack.getItem();
|
||||
if (item.canProvideEnergy(stack))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue