mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 00:47:32 +00:00
29 lines
733 B
Java
29 lines
733 B
Java
package tconstruct.inventory;
|
|
|
|
import tconstruct.blocks.logic.DrawbridgeLogic;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.inventory.IInventory;
|
|
import net.minecraft.inventory.Slot;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
public class DrawbridgeSlot extends Slot
|
|
{
|
|
DrawbridgeLogic logic;
|
|
public DrawbridgeSlot(IInventory iinventory, int par2, int par3, int par4, DrawbridgeLogic logic)
|
|
{
|
|
super(iinventory, par2, par3, par4);
|
|
this.logic = logic;
|
|
}
|
|
|
|
public boolean isItemValid(ItemStack par1ItemStack)
|
|
{
|
|
return !logic.hasExtended();
|
|
}
|
|
|
|
|
|
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
|
|
{
|
|
return !logic.hasExtended();
|
|
}
|
|
}
|