Applied-Energistics-2-tiler.../container/slot/SlotInaccessible.java
2014-09-21 01:39:54 +02:00

47 lines
806 B
Java

package appeng.container.slot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
public class SlotInaccessible extends AppEngSlot
{
public SlotInaccessible(IInventory i, int slotIdx, int x, int y) {
super( i, slotIdx, x, y );
}
ItemStack dspStack = null;
@Override
public ItemStack getDisplayStack()
{
if ( dspStack == null )
{
ItemStack dsp = super.getDisplayStack();
if ( dsp != null )
dspStack = dsp.copy();
}
return dspStack;
}
@Override
public void onSlotChanged()
{
super.onSlotChanged();
dspStack = null;
}
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
{
return false;
}
@Override
public boolean isItemValid(ItemStack i)
{
return false;
}
}