2013-09-05 12:39:18 -07:00
|
|
|
package tconstruct.inventory;
|
2013-07-27 17:03:16 +10:00
|
|
|
|
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
|
import net.minecraft.inventory.Slot;
|
|
|
|
|
import net.minecraft.item.ItemBlock;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @author fuj1n
|
|
|
|
|
*
|
|
|
|
|
*/
|
2013-08-31 05:13:31 -07:00
|
|
|
public class SlotBlocksOnly extends Slot
|
|
|
|
|
{
|
2013-07-27 17:03:16 +10:00
|
|
|
|
2013-08-31 05:13:31 -07:00
|
|
|
public SlotBlocksOnly(IInventory par1iInventory, int par2, int par3, int par4)
|
|
|
|
|
{
|
|
|
|
|
super(par1iInventory, par2, par3, par4);
|
|
|
|
|
}
|
2013-07-27 17:03:16 +10:00
|
|
|
|
2013-08-31 05:13:31 -07:00
|
|
|
public boolean isItemValid (ItemStack par1ItemStack)
|
|
|
|
|
{
|
|
|
|
|
return par1ItemStack.getItem() instanceof ItemBlock;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int getSlotStackLimit ()
|
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
2013-07-27 17:03:16 +10:00
|
|
|
|
|
|
|
|
}
|