public class LoomScreenHandler extends ScreenHandler
Modifier and Type | Field and Description |
---|---|
private Slot |
bannerSlot |
private ScreenHandlerContext |
context |
private Slot |
dyeSlot |
private Inventory |
input |
private Runnable |
inventoryChangeListener |
private long |
lastTakeResultTime |
private Inventory |
output |
private Slot |
outputSlot |
private Slot |
patternSlot |
private Property |
selectedPattern |
slots, syncId
Constructor and Description |
---|
LoomScreenHandler(int syncId,
PlayerInventory playerInventory) |
LoomScreenHandler(int syncId,
PlayerInventory playerInventory,
ScreenHandlerContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
canUse(PlayerEntity player) |
void |
close(PlayerEntity player) |
Slot |
getBannerSlot() |
Slot |
getDyeSlot() |
Slot |
getOutputSlot() |
Slot |
getPatternSlot() |
int |
getSelectedPattern() |
boolean |
onButtonClick(PlayerEntity player,
int id) |
void |
onContentChanged(Inventory inventory) |
void |
setInventoryChangeListener(Runnable inventoryChangeListener) |
ItemStack |
transferSlot(PlayerEntity player,
int index) |
private void |
updateOutputSlot() |
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertIntoSlot, canInsertItemIntoSlot, canStacksCombine, canUse, checkDataCount, checkSize, dropInventory, endQuickCraft, getNextActionId, getSlot, getStacks, getType, insertItem, isNotRestricted, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setPlayerRestriction, setProperty, setStackInSlot, shouldQuickCraftContinue, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks
private final ScreenHandlerContext context
private final Property selectedPattern
private Runnable inventoryChangeListener
private final Slot bannerSlot
private final Slot dyeSlot
private final Slot patternSlot
private final Slot outputSlot
private long lastTakeResultTime
private final Inventory input
private final Inventory output
public LoomScreenHandler(int syncId, PlayerInventory playerInventory)
public LoomScreenHandler(int syncId, PlayerInventory playerInventory, ScreenHandlerContext context)
@Environment(value=CLIENT) public int getSelectedPattern()
public boolean canUse(PlayerEntity player)
canUse
in class ScreenHandler
public boolean onButtonClick(PlayerEntity player, int id)
onButtonClick
in class ScreenHandler
public void onContentChanged(Inventory inventory)
onContentChanged
in class ScreenHandler
@Environment(value=CLIENT) public void setInventoryChangeListener(Runnable inventoryChangeListener)
public ItemStack transferSlot(PlayerEntity player, int index)
transferSlot
in class ScreenHandler
public void close(PlayerEntity player)
close
in class ScreenHandler
private void updateOutputSlot()
@Environment(value=CLIENT) public Slot getBannerSlot()
@Environment(value=CLIENT) public Slot getDyeSlot()
@Environment(value=CLIENT) public Slot getPatternSlot()
@Environment(value=CLIENT) public Slot getOutputSlot()