Contents
Class InventoryComponent.Tool
java.lang.Object
com.hypixel.hytale.server.core.inventory.InventoryComponent
com.hypixel.hytale.server.core.inventory.ActiveSlotInventoryComponent
com.hypixel.hytale.server.core.inventory.InventoryComponent.Tool
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
- Enclosing class:
InventoryComponent
Tool slots with a tracked active slot and a flag indicating whether the tool item is
currently being used.
-
Nested Class Summary
Nested classes/interfaces inherited from class InventoryComponent
InventoryComponent.AbilitySlots, InventoryComponent.Armor, InventoryComponent.Backpack, InventoryComponent.Combined, InventoryComponent.Hotbar, InventoryComponent.RuneBag, InventoryComponent.Storage, InventoryComponent.Tool, InventoryComponent.Utility -
Field Summary
FieldsFields inherited from class InventoryComponent
ABILITIES_LINE_WIDTH, ABILITIES_LINES, ABILITIES_SECTION_ID, ARMOR_HOTBAR_UTILITY_STORAGE, ARMOR_SECTION_ID, BACKPACK_HOTBAR_STORAGE, BACKPACK_SECTION_ID, BACKPACK_STORAGE_HOTBAR, DEFAULT_ABILITIES_CAPACITY, DEFAULT_ARMOR_CAPACITY, DEFAULT_HOTBAR_CAPACITY, DEFAULT_RUNE_BAG_CAPACITY, DEFAULT_STORAGE_CAPACITY, DEFAULT_STORAGE_COLUMNS, DEFAULT_STORAGE_ROWS, DEFAULT_TOOLS_CAPACITY, DEFAULT_UTILITY_CAPACITY, DUMMY_SECTION_ID, EVERYTHING, HOTBAR_FIRST, HOTBAR_SECTION_ID, HOTBAR_STORAGE_BACKPACK, HOTBAR_UTILITY_CONSUMABLE_STORAGE, INACTIVE_SLOT_INDEX, RUNE_BAG_SECTION_ID, STORAGE_FIRST, STORAGE_HOTBAR_BACKPACK, STORAGE_SECTION_ID, TOOLS_SECTION_ID, UTILITY_SECTION_IDFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intReturns the inventory section ID that identifies this component (e.g.booleanvoidsetUsingToolsItem(boolean usingToolsItem) Methods inherited from class ActiveSlotInventoryComponent
ensureCapacity, getActiveItem, getActiveSlot, setActiveSlot, setActiveSlotMethods inherited from class InventoryComponent
consumeIsDirty, consumeNeedsSaving, getChangeEvents, getCombined, getCombined, getComponentTypeById, getInventory, getItemInHand, getItemInHand, markDirty, setupCombinedMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
CODEC
-
-
Constructor Details
-
Tool
public Tool() -
Tool
public Tool(short capacity) -
Tool
-
-
Method Details
-
getComponentType
-
getSectionId
public int getSectionId()Description copied from class:ActiveSlotInventoryComponentReturns the inventory section ID that identifies this component (e.g.InventoryComponent.HOTBAR_SECTION_ID).- Specified by:
getSectionIdin classActiveSlotInventoryComponent- Returns:
- The section ID for this inventory component.
-
isUsingToolsItem
public boolean isUsingToolsItem() -
setUsingToolsItem
public void setUsingToolsItem(boolean usingToolsItem) -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Specified by:
clonein classInventoryComponent- Returns:
- a clone instance of the original component instance.
-