added crate interface to crate

This commit is contained in:
Robert 2013-11-11 16:01:32 -05:00
parent 54884c1091
commit 1e70387ac6

View file

@ -6,13 +6,16 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager; import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet250CustomPayload; import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.network.IPacketReceiver; import universalelectricity.prefab.network.IPacketReceiver;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import dark.api.IExtendedStorage;
import dark.core.common.DarkMain; import dark.core.common.DarkMain;
import dark.core.network.PacketHandler; import dark.core.network.PacketHandler;
import dark.core.prefab.machine.TileEntityInv; import dark.core.prefab.machine.TileEntityInv;
@ -20,7 +23,7 @@ import dark.core.prefab.machine.TileEntityInv;
/** Basic single stack inventory /** Basic single stack inventory
* *
* @author DarkGuardsman */ * @author DarkGuardsman */
public class TileEntityCrate extends TileEntityInv implements IPacketReceiver public class TileEntityCrate extends TileEntityInv implements IPacketReceiver, IExtendedStorage
{ {
/* TODO /* TODO
* Fix issues with ItemStacks with NBT tags having issues * Fix issues with ItemStacks with NBT tags having issues
@ -276,4 +279,10 @@ public class TileEntityCrate extends TileEntityInv implements IPacketReceiver
} }
@Override
public ItemStack addStackToStorage(ItemStack stack)
{
return BlockCrate.addStackToCrate(this, stack);
}
} }