2013-09-16 19:43:32 +02:00
|
|
|
package cpw.mods.ironchest;
|
|
|
|
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
import net.minecraft.inventory.Slot;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2016-03-21 17:44:27 +01:00
|
|
|
public class ValidatingSlot extends Slot
|
|
|
|
{
|
2013-09-16 19:43:32 +02:00
|
|
|
private IronChestType type;
|
|
|
|
|
2016-06-08 21:59:44 +02:00
|
|
|
public ValidatingSlot(IInventory inventoryIn, int slotIndex, int xPosition, int yPosition, IronChestType type)
|
2013-09-16 19:43:32 +02:00
|
|
|
{
|
2016-06-08 21:59:44 +02:00
|
|
|
super(inventoryIn, slotIndex, xPosition, yPosition);
|
2013-09-16 19:43:32 +02:00
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isItemValid(ItemStack par1ItemStack)
|
|
|
|
{
|
2016-03-21 17:44:27 +01:00
|
|
|
return this.type.acceptsStack(par1ItemStack);
|
2013-09-16 19:43:32 +02:00
|
|
|
}
|
|
|
|
}
|