Applied-Energistics-2-tiler.../client/me/SlotDisconnected.java
AlgorithmX2 16ef731c00 Interface Terminal
Fixed bug with Assembler Packet Crashing the server.
2014-07-09 03:17:11 -05:00

83 lines
1.5 KiB
Java

package appeng.client.me;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import appeng.container.slot.AppEngSlot;
import appeng.items.misc.ItemEncodedPattern;
import appeng.util.Platform;
public class SlotDisconnected extends AppEngSlot
{
public ClientDCInternalInv mySlot;
public SlotDisconnected(ClientDCInternalInv me, int which, int x, int y) {
super( me.inv, which, x, y );
mySlot = me;
}
@Override
public ItemStack getDisplayStack()
{
if ( Platform.isClient() )// && (which == PlaceableItemType.ENCODED_PATTERN) )
{
ItemStack is = super.getStack();
if ( is != null && is.getItem() instanceof ItemEncodedPattern )
{
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
ItemStack out = iep.getOutput( is );
return out;
}
}
return super.getStack();
}
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
{
return false;
}
@Override
public ItemStack decrStackSize(int par1)
{
return null;
}
@Override
public void putStack(ItemStack par1ItemStack)
{
}
@Override
public boolean getHasStack()
{
return getStack() != null;
}
@Override
public boolean isItemValid(ItemStack par1ItemStack)
{
return false;
}
@Override
public int getSlotStackLimit()
{
return 0;
}
@Override
public boolean isSlotInInventory(IInventory par1iInventory, int par2)
{
return false;
}
@Override
public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack)
{
}
}