From c4abc14d7ea19dec99f35ef2893f3c71cd169458 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Mon, 23 Dec 2013 23:26:25 -0500 Subject: [PATCH] Minor changes --- src/com/builtbroken/assemblyline/item/ItemBattery.java | 4 ++-- .../assemblyline/machine/ContainerBatteryBox.java | 8 ++++---- .../builtbroken/assemblyline/machine/ItemFluidCan.java | 5 ++--- .../machine/processor/ContainerProcessor.java | 4 ++-- .../machine/processor/TileEntityProcessor.java | 6 +++--- .../builtbroken/assemblyline/transmit/TileEntityWire.java | 1 - 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/com/builtbroken/assemblyline/item/ItemBattery.java b/src/com/builtbroken/assemblyline/item/ItemBattery.java index 5140833c7..1a430000f 100644 --- a/src/com/builtbroken/assemblyline/item/ItemBattery.java +++ b/src/com/builtbroken/assemblyline/item/ItemBattery.java @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; /** Simple battery to store energy - * + * * @author DarkGuardsman */ public class ItemBattery extends ItemElectric implements IExtraItemInfo { @@ -40,7 +40,7 @@ public class ItemBattery extends ItemElectric implements IExtraItemInfo } @Override - public long getElectricityCapacity(ItemStack theItem) + public long getEnergyCapacity(ItemStack theItem) { return 5000000; } diff --git a/src/com/builtbroken/assemblyline/machine/ContainerBatteryBox.java b/src/com/builtbroken/assemblyline/machine/ContainerBatteryBox.java index b49f627ec..78a761fb4 100644 --- a/src/com/builtbroken/assemblyline/machine/ContainerBatteryBox.java +++ b/src/com/builtbroken/assemblyline/machine/ContainerBatteryBox.java @@ -5,7 +5,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import universalelectricity.api.item.IElectricalItem; +import universalelectricity.api.item.IEnergyItem; import com.builtbroken.minecraft.prefab.invgui.SlotSpecific; @@ -17,9 +17,9 @@ public class ContainerBatteryBox extends Container { this.tileEntity = batteryBox; // Top slot for battery output - this.addSlotToContainer(new SlotSpecific(batteryBox, 0, 33, 24, IElectricalItem.class)); + this.addSlotToContainer(new SlotSpecific(batteryBox, 0, 33, 24, IEnergyItem.class)); // Bottom slot for batter input - this.addSlotToContainer(new SlotSpecific(batteryBox, 1, 33, 48, IElectricalItem.class)); + this.addSlotToContainer(new SlotSpecific(batteryBox, 1, 33, 48, IEnergyItem.class)); int var3; for (var3 = 0; var3 < 3; ++var3) @@ -58,7 +58,7 @@ public class ContainerBatteryBox extends Container { if (this.getSlot(0).isItemValid(itemStack)) { - if (((IElectricalItem) itemStack.getItem()).getElectricityStored(itemStack) > 0) + if (((IEnergyItem) itemStack.getItem()).getEnergy(itemStack) > 0) { if (!this.mergeItemStack(itemStack, 1, 2, false)) { diff --git a/src/com/builtbroken/assemblyline/machine/ItemFluidCan.java b/src/com/builtbroken/assemblyline/machine/ItemFluidCan.java index 7bb923597..6a13ca0aa 100644 --- a/src/com/builtbroken/assemblyline/machine/ItemFluidCan.java +++ b/src/com/builtbroken/assemblyline/machine/ItemFluidCan.java @@ -11,7 +11,6 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.ItemFluidContainer; -import universalelectricity.api.item.ElectricItemHelper; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.minecraft.DarkCore; @@ -22,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly; /** Small fluid can that is designed to store up to one bucket of fluid. Doesn't work like a bucket * as it is sealed with a pressure cap. This can is designed to work with tools or machines only. - * + * * @author DarkGuardsman */ public class ItemFluidCan extends ItemFluidContainer { @@ -79,7 +78,7 @@ public class ItemFluidCan extends ItemFluidContainer @Override public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { - par3List.add(ElectricItemHelper.getUncharged(new ItemStack(this))); + par3List.add(new ItemStack(this)); ItemStack waterCan = new ItemStack(this); this.fill(waterCan, new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), true); diff --git a/src/com/builtbroken/assemblyline/machine/processor/ContainerProcessor.java b/src/com/builtbroken/assemblyline/machine/processor/ContainerProcessor.java index 205cf0b32..f39aa9ca4 100644 --- a/src/com/builtbroken/assemblyline/machine/processor/ContainerProcessor.java +++ b/src/com/builtbroken/assemblyline/machine/processor/ContainerProcessor.java @@ -1,5 +1,6 @@ package com.builtbroken.assemblyline.machine.processor; +import universalelectricity.api.item.IEnergyItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -7,7 +8,6 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnace; import net.minecraft.item.ItemStack; -import universalelectricity.api.item.IElectricalItem; import com.builtbroken.minecraft.recipes.MachineRecipeHandler; @@ -115,7 +115,7 @@ public class ContainerProcessor extends Container return null; } } - else if (slotStack.getItem() instanceof IElectricalItem) + else if (slotStack.getItem() instanceof IEnergyItem) { if (!this.mergeItemStack(slotStack, tileEntity.slotBatteryCharge, 2, false)) { diff --git a/src/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java b/src/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java index 8893cf6bb..a6999299a 100644 --- a/src/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java +++ b/src/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java @@ -4,7 +4,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import net.minecraftforge.common.ForgeDirection; -import universalelectricity.api.item.IElectricalItem; +import universalelectricity.api.item.IEnergyItem; import com.builtbroken.assemblyline.machine.processor.BlockProcessor.ProcessorData; import com.builtbroken.minecraft.interfaces.IInvBox; @@ -18,7 +18,7 @@ import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; /** Basic A -> B recipe processor machine designed mainly to handle ore blocks - * + * * @author DarkGuardsman */ public class TileEntityProcessor extends TileEntityEnergyMachine { @@ -226,7 +226,7 @@ public class TileEntityProcessor extends TileEntityEnergyMachine { return true; } - if (slotBatteryDrain == slot && stack.getItem() instanceof IElectricalItem) + if (slotBatteryDrain == slot && stack.getItem() instanceof IEnergyItem) { return true; } diff --git a/src/com/builtbroken/assemblyline/transmit/TileEntityWire.java b/src/com/builtbroken/assemblyline/transmit/TileEntityWire.java index 3d50433ae..cca94221e 100644 --- a/src/com/builtbroken/assemblyline/transmit/TileEntityWire.java +++ b/src/com/builtbroken/assemblyline/transmit/TileEntityWire.java @@ -10,7 +10,6 @@ import universalelectricity.api.energy.IConductor; import universalelectricity.api.energy.IEnergyNetwork; import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.VectorHelper; -import universalelectricity.core.net.EnergyNetwork; import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.helpers.ColorCode;