Don't reset induction cell storage
This commit is contained in:
parent
a87fb35c2c
commit
b055b116e5
2 changed files with 5 additions and 5 deletions
|
@ -11,7 +11,6 @@ import mekanism.api.energy.IStrictEnergyStorage;
|
|||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.Tier.BaseTier;
|
||||
import mekanism.common.Tier.EnergyCubeTier;
|
||||
import mekanism.common.Tier.InductionCellTier;
|
||||
import mekanism.common.Tier.InductionProviderTier;
|
||||
import mekanism.common.inventory.InventoryBin;
|
||||
|
@ -19,6 +18,7 @@ import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
|||
import mekanism.common.tile.TileEntityBin;
|
||||
import mekanism.common.tile.TileEntityInductionCell;
|
||||
import mekanism.common.tile.TileEntityInductionProvider;
|
||||
import mekanism.common.tile.TileEntityMultiblock;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -243,7 +243,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem
|
|||
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tileEntity instanceof IStrictEnergyStorage)
|
||||
if(tileEntity instanceof IStrictEnergyStorage && !(tileEntity instanceof TileEntityMultiblock<?>))
|
||||
{
|
||||
((IStrictEnergyStorage)tileEntity).setEnergy(getEnergy(stack));
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
|||
|
||||
if(type.isElectric)
|
||||
{
|
||||
list.add(EnumColor.BRIGHT_GREEN + MekanismUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergyStored(itemstack)));
|
||||
list.add(EnumColor.BRIGHT_GREEN + MekanismUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
|
||||
}
|
||||
|
||||
if(hasTank(itemstack) && type != MachineType.PORTABLE_TANK)
|
||||
|
@ -934,13 +934,13 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
|||
@Override
|
||||
public int getEnergyStored(ItemStack theItem)
|
||||
{
|
||||
return (int)(getEnergy(theItem)* general.TO_TE);
|
||||
return (int)(getEnergy(theItem) * general.TO_TE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ItemStack theItem)
|
||||
{
|
||||
return (int)(getMaxEnergy(theItem)* general.TO_TE);
|
||||
return (int)(getMaxEnergy(theItem) * general.TO_TE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue