Personal Chests are not electric
@@ -9,21 +9,17 @@ import mekanism.common.capabilities.ItemCapabilityWrapper;
import mekanism.common.integration.forgeenergy.ForgeEnergyItemWrapper;
import mekanism.common.inventory.container.ContainerProvider;
import mekanism.common.inventory.container.item.PersonalChestItemContainer;
-import mekanism.common.item.IItemEnergized;
import mekanism.common.item.IItemSustainedInventory;
import mekanism.common.item.block.ItemBlockAdvancedTooltip;
import mekanism.common.registration.impl.ItemDeferredRegister;
import mekanism.common.security.ISecurityItem;
-import mekanism.common.util.MekanismUtils;
import mekanism.common.util.SecurityUtils;
import mekanism.common.util.text.BooleanStateDisplay.YesNo;
-import mekanism.common.util.text.EnergyDisplay;
import mekanism.common.util.text.OwnerDisplay;
import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
-import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.ActionResult;
@@ -36,7 +32,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.fml.network.NetworkHooks;
-public class ItemBlockPersonalChest extends ItemBlockAdvancedTooltip<BlockPersonalChest> implements IItemEnergized, IItemSustainedInventory, ISecurityItem {
+public class ItemBlockPersonalChest extends ItemBlockAdvancedTooltip<BlockPersonalChest> implements IItemSustainedInventory, ISecurityItem {
public ItemBlockPersonalChest(BlockPersonalChest block) {
super(block, ItemDeferredRegister.getMekBaseProperties().maxStackSize(1));
@@ -50,7 +46,6 @@ public class ItemBlockPersonalChest extends ItemBlockAdvancedTooltip<BlockPerson
if (SecurityUtils.isOverridden(stack, Dist.CLIENT)) {
tooltip.add(MekanismLang.SECURITY_OVERRIDDEN.translateColored(EnumColor.RED));
}
- tooltip.add(MekanismLang.STORED_ENERGY.translateColored(EnumColor.BRIGHT_GREEN, EnumColor.GRAY, EnergyDisplay.of(getEnergy(stack), getMaxEnergy(stack))));
tooltip.add(MekanismLang.HAS_INVENTORY.translateColored(EnumColor.AQUA, EnumColor.GRAY, YesNo.of(hasInventory(stack))));
}
@@ -74,30 +69,6 @@ public class ItemBlockPersonalChest extends ItemBlockAdvancedTooltip<BlockPerson
return new ActionResult<>(ActionResultType.PASS, stack);
}
- @Override
- public double getMaxEnergy(ItemStack itemStack) {
- Item item = itemStack.getItem();
- if (item instanceof ItemBlockPersonalChest) {
- return MekanismUtils.getMaxEnergy(itemStack, ((ItemBlockPersonalChest) item).getBlock().getStorage());
- }
- return 0;
- }
-
- @Override
- public double getMaxTransfer(ItemStack itemStack) {
- return getMaxEnergy(itemStack) * 0.005;
- }
-
- @Override
- public boolean canReceive(ItemStack itemStack) {
- return true;
- }
-
- @Override
- public boolean canSend(ItemStack itemStack) {
- return false;
- }
-
@Override
public ICapabilityProvider initCapabilities(ItemStack stack, CompoundNBT nbt) {
return new ItemCapabilityWrapper(stack, new ForgeEnergyItemWrapper());
