mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 13:09:11 +00:00
34 lines
761 B
Java
34 lines
761 B
Java
package noppes.npcs.containers;
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
import net.minecraft.inventory.Slot;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
class SlotNpcTraderItems extends Slot {
|
|
|
|
|
|
public SlotNpcTraderItems(IInventory iinventory, int i, int j, int k) {
|
|
super(iinventory, i, j, k);
|
|
}
|
|
|
|
public void onPickupFromSlot(ItemStack itemstack) {
|
|
if (itemstack == null)
|
|
return;
|
|
if (getStack() == null)
|
|
return;
|
|
if (itemstack.getItem() != getStack().getItem())
|
|
return;
|
|
itemstack.stackSize--;
|
|
//onSlotChanged();
|
|
}
|
|
|
|
public int getSlotStackLimit() {
|
|
return 64;
|
|
}
|
|
|
|
public boolean isItemValid(ItemStack itemstack) {
|
|
return false;
|
|
|
|
}
|
|
}
|