Minor changes
This commit is contained in:
parent
23fb985980
commit
c4abc14d7e
6 changed files with 13 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue