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, player
slots, 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, transferSlot
addListener, 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, updateSlotStacks
private 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 ForgingScreenHandler
protected boolean canTakeOutput(PlayerEntity player, boolean present)
canTakeOutput
in class ForgingScreenHandler
protected ItemStack onTakeOutput(PlayerEntity player, ItemStack stack)
onTakeOutput
in class ForgingScreenHandler
public void updateResult()
updateResult
in class ForgingScreenHandler
public static int getNextCost(int cost)
public void setNewItemName(String string)
@Environment(value=CLIENT) public int getLevelCost()