Class AnvilMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.ItemCombinerMenu
net.minecraft.world.inventory.AnvilMenu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final intprivate final DataSlotprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final booleanstatic final intprivate static final intprivate @Nullable Stringprivate static final org.slf4j.Loggerstatic final intprivate booleanintstatic final intprivate static final intprivate static final intFields inherited from class ItemCombinerMenu
access, inputSlots, player, resultSlots -
Constructor Summary
ConstructorsConstructorDescriptionAnvilMenu(int containerId, Inventory inventory, ContainerLevelAccess access) -
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateIncreasedRepairCost(int baseCost) private static ItemCombinerMenuSlotDefinitionfinal voidprotected voidNeo: This is the original createResult() method, which is called by the above method (createResult().intgetCost()protected booleanisValidBlock(BlockState state) protected booleanprotected voidvoidsetCost(int value) Neo: Sets the cost.booleansetItemName(String name) private static @Nullable StringvalidateName(String name) Methods inherited from class ItemCombinerMenu
canMoveIntoInputSlots, getResultSlot, quickMoveStack, removed, slotsChanged, stillValidMethods inherited from class AbstractContainerMenu
addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
INPUT_SLOT
public static final int INPUT_SLOT- See Also:
-
ADDITIONAL_SLOT
public static final int ADDITIONAL_SLOT- See Also:
-
RESULT_SLOT
public static final int RESULT_SLOT- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DEBUG_COST
private static final boolean DEBUG_COST- See Also:
-
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH- See Also:
-
repairItemCountCost
public int repairItemCountCost -
itemName
-
cost
-
onlyRenaming
private boolean onlyRenaming -
COST_FAIL
private static final int COST_FAIL- See Also:
-
COST_BASE
private static final int COST_BASE- See Also:
-
COST_ADDED_BASE
private static final int COST_ADDED_BASE- See Also:
-
COST_REPAIR_MATERIAL
private static final int COST_REPAIR_MATERIAL- See Also:
-
COST_REPAIR_SACRIFICE
private static final int COST_REPAIR_SACRIFICE- See Also:
-
COST_INCOMPATIBLE_PENALTY
private static final int COST_INCOMPATIBLE_PENALTY- See Also:
-
COST_RENAME
private static final int COST_RENAME- See Also:
-
INPUT_SLOT_X_PLACEMENT
private static final int INPUT_SLOT_X_PLACEMENT- See Also:
-
ADDITIONAL_SLOT_X_PLACEMENT
private static final int ADDITIONAL_SLOT_X_PLACEMENT- See Also:
-
RESULT_SLOT_X_PLACEMENT
private static final int RESULT_SLOT_X_PLACEMENT- See Also:
-
SLOT_Y_PLACEMENT
private static final int SLOT_Y_PLACEMENT- See Also:
-
-
Constructor Details
-
AnvilMenu
-
AnvilMenu
-
-
Method Details
-
createInputSlotDefinitions
-
isValidBlock
- Specified by:
isValidBlockin classItemCombinerMenu
-
mayPickup
- Overrides:
mayPickupin classItemCombinerMenu
-
onTake
- Specified by:
onTakein classItemCombinerMenu
-
createResult
public final void createResult()- Specified by:
createResultin classItemCombinerMenu
-
createResultInternal
protected void createResultInternal()Neo: This is the original createResult() method, which is called by the above method (createResult().If you would normally override
createResult(), you should override this method instead. -
calculateIncreasedRepairCost
public static int calculateIncreasedRepairCost(int baseCost) -
setItemName
-
validateName
-
getCost
public int getCost() -
setCost
public void setCost(int value) Neo: Sets the cost. Negative values are clamped to zero.
-