public class AnvilScreenHandler extends ForgingScreenHandler
| Modifier and Type | Field and Description |
|---|---|
private Property |
levelCost |
private static Logger |
LOGGER |
private String |
newItemName |
private int |
repairItemUsage |
context, input, output, playerslots, syncId| Constructor and Description |
|---|
AnvilScreenHandler(int syncId,
PlayerInventory inventory) |
AnvilScreenHandler(int syncId,
PlayerInventory inventory,
ScreenHandlerContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canTakeOutput(PlayerEntity player,
boolean present) |
protected boolean |
canUse(BlockState state) |
int |
getLevelCost() |
static int |
getNextCost(int cost) |
protected ItemStack |
onTakeOutput(PlayerEntity player,
ItemStack stack) |
void |
setNewItemName(String string) |
void |
updateResult() |
canUse, close, method_30025, onContentChanged, transferSlotaddListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertIntoSlot, canInsertItemIntoSlot, canStacksCombine, canUse, checkDataCount, checkSize, dropInventory, endQuickCraft, getNextActionId, getSlot, getStacks, getType, insertItem, isNotRestricted, onButtonClick, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setPlayerRestriction, setProperty, setStackInSlot, shouldQuickCraftContinue, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacksprivate static final Logger LOGGER
private int repairItemUsage
private String newItemName
private final Property levelCost
public AnvilScreenHandler(int syncId,
PlayerInventory inventory)
public AnvilScreenHandler(int syncId,
PlayerInventory inventory,
ScreenHandlerContext context)
protected boolean canUse(BlockState state)
canUse in class ForgingScreenHandlerprotected boolean canTakeOutput(PlayerEntity player, boolean present)
canTakeOutput in class ForgingScreenHandlerprotected ItemStack onTakeOutput(PlayerEntity player, ItemStack stack)
onTakeOutput in class ForgingScreenHandlerpublic void updateResult()
updateResult in class ForgingScreenHandlerpublic static int getNextCost(int cost)
public void setNewItemName(String string)
@Environment(value=CLIENT) public int getLevelCost()