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 PropertylevelCostprivate static LoggerLOGGERprivate StringnewItemNameprivate intrepairItemUsageFields inherited from class net.minecraft.screen.ForgingScreenHandler
context, input, output, playerFields 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 booleancanTakeOutput(PlayerEntity player, boolean present)protected booleancanUse(BlockState state)intgetLevelCost()static intgetNextCost(int cost)protected ItemStackonTakeOutput(PlayerEntity player, ItemStack stack)voidsetNewItemName(String string)voidupdateResult()Methods inherited from class net.minecraft.screen.ForgingScreenHandler
canUse, close, method_30025, onContentChanged, transferSlotMethods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertIntoSlot, canInsertItemIntoSlot, 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:
canUsein classForgingScreenHandler
-
canTakeOutput
- Specified by:
canTakeOutputin classForgingScreenHandler
-
onTakeOutput
- Specified by:
onTakeOutputin classForgingScreenHandler
-
updateResult
public void updateResult()- Specified by:
updateResultin classForgingScreenHandler
-
getNextCost
public static int getNextCost(int cost) -
setNewItemName
-
getLevelCost
@Environment(CLIENT) public int getLevelCost()
-