Small refactor
This commit is contained in:
parent
21dd2a501a
commit
e3d043f5e5
2 changed files with 5 additions and 11 deletions
|
@ -6,22 +6,16 @@ package resonantinduction.battery;
|
|||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.api.ICapacitor;
|
||||
import resonantinduction.base.ListUtil;
|
||||
import universalelectricity.api.item.IEnergyItem;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.network.IPacketSender;
|
||||
import calclavia.lib.tile.EnergyStorage;
|
||||
import calclavia.lib.tile.TileEntityElectrical;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
@ -49,7 +43,7 @@ public class TileBattery extends TileEntityElectrical implements IPacketSender,
|
|||
|
||||
public TileBattery()
|
||||
{
|
||||
this.energy.setCapacity(1000);
|
||||
this.energy = new EnergyStorage(1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,10 +24,10 @@ import net.minecraftforge.fluids.IFluidBlock;
|
|||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.tesla.TileTesla;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.InventoryHelper;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.network.IPacketSender;
|
||||
import calclavia.lib.tile.TileEntityAdvanced;
|
||||
import calclavia.lib.utility.InventoryUtility;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
|
@ -97,7 +97,7 @@ public class TileEMLevitator extends TileEntityAdvanced implements IPacketReceiv
|
|||
|
||||
if (!suck && pushDelay == 0)
|
||||
{
|
||||
ItemStack retrieved = InventoryHelper.takeTopItemFromInventory(inventory, getDirection().getOpposite().ordinal());
|
||||
ItemStack retrieved = InventoryUtility.takeTopItemFromInventory(inventory, getDirection().getOpposite().ordinal());
|
||||
|
||||
if (retrieved != null)
|
||||
{
|
||||
|
@ -119,7 +119,7 @@ public class TileEMLevitator extends TileEntityAdvanced implements IPacketReceiv
|
|||
{
|
||||
for (EntityItem item : (List<EntityItem>) worldObj.getEntitiesWithinAABB(EntityItem.class, suckBounds))
|
||||
{
|
||||
ItemStack remains = InventoryHelper.putStackInInventory(inventory, item.getEntityItem(), getDirection().getOpposite().ordinal(), false);
|
||||
ItemStack remains = InventoryUtility.putStackInInventory(inventory, item.getEntityItem(), getDirection().getOpposite().ordinal(), false);
|
||||
|
||||
if (remains == null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue