mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 06:37:34 +00:00
31 lines
753 B
Java
31 lines
753 B
Java
package noppes.npcs.containers;
|
|||
|
|
|
||
|
|
import net.minecraft.entity.player.EntityPlayer;
|
||
|
|
import net.minecraft.inventory.IInventory;
|
||
|
|
import net.minecraft.inventory.Slot;
|
||
|
|
import net.minecraft.item.ItemStack;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* A display-only slot for auction listings.
|
||
|
|
* Items cannot be placed or taken from this slot.
|
||
|
|
*/
|
||
|
|
public class SlotAuctionDisplay extends Slot {
|
||
|
|
public SlotAuctionDisplay(IInventory inventory, int slotIndex, int x, int y) {
|
||
|
|
super(inventory, slotIndex, x, y);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public boolean isItemValid(ItemStack stack) {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public boolean canTakeStack(EntityPlayer player) {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public int getSlotStackLimit() {
|
||
|
|
return 64;
|
||
|
|
}
|
||
|
|
}
|