Class AnvilInventoryUpdater
java.lang.Object
org.geysermc.geyser.inventory.updater.InventoryUpdater
org.geysermc.geyser.inventory.updater.AnvilInventoryUpdater
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
calcLevelCost(GeyserSession session, AnvilContainer anvilContainer, boolean bedrock)
Calculate the number of levels needed to combine/rename an itemvoid
updateInventory(InventoryTranslator translator, GeyserSession session, Inventory inventory)
boolean
updateSlot(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:
updateInventory
in classInventoryUpdater
-
updateSlot
public boolean updateSlot(InventoryTranslator translator, GeyserSession session, Inventory inventory, int javaSlot)- Overrides:
updateSlot
in 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
-