Class AnvilInventoryUpdater
java.lang.Object
org.geysermc.geyser.inventory.updater.InventoryUpdater
org.geysermc.geyser.inventory.updater.AnvilInventoryUpdater
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalcLevelCost(GeyserSession session, AnvilContainer anvilContainer, boolean bedrock)Calculate the number of levels needed to combine/rename an itemvoidupdateInventory(InventoryTranslator translator, GeyserSession session, Inventory inventory)booleanupdateSlot(InventoryTranslator translator, GeyserSession session, Inventory inventory, int javaSlot)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
AnvilInventoryUpdater
public AnvilInventoryUpdater()
-
-
Method Details
-
updateInventory
public void updateInventory(InventoryTranslator translator, GeyserSession session, Inventory inventory)- Overrides:
updateInventoryin classInventoryUpdater
-
updateSlot
public boolean updateSlot(InventoryTranslator translator, GeyserSession session, Inventory inventory, int javaSlot)- Overrides:
updateSlotin classInventoryUpdater
-
calcLevelCost
Calculate the number of levels needed to combine/rename an item- Parameters:
session- the geyser sessionanvilContainer- the anvil containerbedrock- True to count enchantments like Bedrock- Returns:
- the number of levels needed
-