Package net.minecraft.screen
Class AnvilScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.ForgingScreenHandler
net.minecraft.screen.AnvilScreenHandler
public class AnvilScreenHandler extends ForgingScreenHandler
-
Field Summary
Fields Modifier and Type Field Description private Property
levelCost
private static Logger
LOGGER
private String
newItemName
private int
repairItemUsage
Fields inherited from class net.minecraft.screen.ForgingScreenHandler
context, input, output, player
Fields inherited from class net.minecraft.screen.ScreenHandler
slots, syncId
-
Constructor Summary
Constructors Constructor Description AnvilScreenHandler(int syncId, PlayerInventory inventory)
AnvilScreenHandler(int syncId, PlayerInventory inventory, ScreenHandlerContext context)
-
Method Summary
Modifier and Type Method 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()
Methods inherited from class net.minecraft.screen.ForgingScreenHandler
canUse, close, method_30025, onContentChanged, transferSlot
Methods inherited from class net.minecraft.screen.ScreenHandler
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
-
Field Details
-
LOGGER
-
repairItemUsage
private int repairItemUsage -
newItemName
-
levelCost
-
-
Constructor Details
-
AnvilScreenHandler
-
AnvilScreenHandler
-
-
Method Details
-
canUse
- Specified by:
canUse
in classForgingScreenHandler
-
canTakeOutput
- Specified by:
canTakeOutput
in classForgingScreenHandler
-
onTakeOutput
- Specified by:
onTakeOutput
in classForgingScreenHandler
-
updateResult
public void updateResult()- Specified by:
updateResult
in classForgingScreenHandler
-
getNextCost
public static int getNextCost(int cost) -
setNewItemName
-
getLevelCost
@Environment(CLIENT) public int getLevelCost()
-