public class StonecutterScreenHandler extends ScreenHandler
Modifier and Type | Field and Description |
---|---|
private List<StonecuttingRecipe> |
availableRecipes |
private Runnable |
contentsChangedListener |
private ScreenHandlerContext |
context |
Inventory |
input |
(package private) Slot |
inputSlot |
private ItemStack |
inputStack |
private long |
lastTakeTime |
private CraftingResultInventory |
output |
(package private) Slot |
outputSlot |
private Property |
selectedRecipe |
private World |
world |
slots, syncId
Constructor and Description |
---|
StonecutterScreenHandler(int syncId,
PlayerInventory playerInventory) |
StonecutterScreenHandler(int syncId,
PlayerInventory playerInventory,
ScreenHandlerContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
canCraft() |
boolean |
canInsertIntoSlot(ItemStack stack,
Slot slot) |
boolean |
canUse(PlayerEntity player) |
void |
close(PlayerEntity player) |
int |
getAvailableRecipeCount() |
List<StonecuttingRecipe> |
getAvailableRecipes() |
int |
getSelectedRecipe() |
ScreenHandlerType<?> |
getType() |
private boolean |
method_30160(int int2) |
boolean |
onButtonClick(PlayerEntity player,
int id) |
void |
onContentChanged(Inventory inventory) |
private void |
populateResult() |
void |
setContentsChangedListener(Runnable runnable) |
ItemStack |
transferSlot(PlayerEntity player,
int index) |
private void |
updateInput(Inventory input,
ItemStack stack) |
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertItemIntoSlot, canStacksCombine, canUse, checkDataCount, checkSize, dropInventory, endQuickCraft, getNextActionId, getSlot, getStacks, insertItem, isNotRestricted, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setPlayerRestriction, setProperty, setStackInSlot, shouldQuickCraftContinue, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks
private final ScreenHandlerContext context
private final Property selectedRecipe
private final World world
private List<StonecuttingRecipe> availableRecipes
private ItemStack inputStack
private long lastTakeTime
final Slot inputSlot
final Slot outputSlot
private Runnable contentsChangedListener
public final Inventory input
private final CraftingResultInventory output
public StonecutterScreenHandler(int syncId, PlayerInventory playerInventory)
public StonecutterScreenHandler(int syncId, PlayerInventory playerInventory, ScreenHandlerContext context)
@Environment(value=CLIENT) public int getSelectedRecipe()
@Environment(value=CLIENT) public List<StonecuttingRecipe> getAvailableRecipes()
@Environment(value=CLIENT) public int getAvailableRecipeCount()
@Environment(value=CLIENT) public boolean canCraft()
public boolean canUse(PlayerEntity player)
canUse
in class ScreenHandler
public boolean onButtonClick(PlayerEntity player, int id)
onButtonClick
in class ScreenHandler
private boolean method_30160(int int2)
public void onContentChanged(Inventory inventory)
onContentChanged
in class ScreenHandler
private void populateResult()
public ScreenHandlerType<?> getType()
getType
in class ScreenHandler
@Environment(value=CLIENT) public void setContentsChangedListener(Runnable runnable)
public boolean canInsertIntoSlot(ItemStack stack, Slot slot)
canInsertIntoSlot
in class ScreenHandler
public ItemStack transferSlot(PlayerEntity player, int index)
transferSlot
in class ScreenHandler
public void close(PlayerEntity player)
close
in class ScreenHandler