mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 21:32:19 +00:00
1.7.10 Files
Files added
This commit is contained in:
1 parent
393ea9b463
commit
a31efb2dc3
1768 files changed
+84831
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package noppes.npcs.containers;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotValid extends Slot{
|
||||
private boolean canPutIn = true;
|
||||
|
||||
public SlotValid(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
|
||||
public SlotValid(IInventory par1iInventory, int par2, int par3, int par4, boolean bo) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
canPutIn = bo;
|
||||
}
|
||||
|
||||
public boolean isItemValid(ItemStack par1ItemStack){
|
||||
return canPutIn && inventory.isItemValidForSlot(0, par1ItemStack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user