Package: com.hypixel.hytale.server.core.inventory
public abstract class InventoryComponent implements Component < EntityStore >
Abstract base for all inventory section components (hotbar, storage, armor, utility, tools, backpack). Each concrete subclass represents one inventory section attached to an entity via the ECS. Manages dirty tracking, change event registration, and codec-based serialization. Provides static helper methods to retrieve combined inventory views across multiple sections.
Modifier Type Name Value public static finalbyteINACTIVE_SLOT_INDEX-1public static finalshortDEFAULT_HOTBAR_CAPACITY9public static finalshortDEFAULT_UTILITY_CAPACITY4public static finalshortDEFAULT_TOOLS_CAPACITY23public static finalshortDEFAULT_ARMOR_CAPACITY(short)ItemArmorSlot.VALUES.lengthpublic static finalshortDEFAULT_STORAGE_ROWS4public static finalshortDEFAULT_STORAGE_COLUMNS9public static finalshortDEFAULT_STORAGE_CAPACITY36public static finalintHOTBAR_SECTION_ID-1public static finalintSTORAGE_SECTION_ID-2public static finalintARMOR_SECTION_ID-3public static finalintUTILITY_SECTION_ID-5public static finalintTOOLS_SECTION_ID-8public static finalintBACKPACK_SECTION_ID-9
Modifier Type Name public static finalBuilderCodec<InventoryComponent>CODECpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]HOTBAR_STORAGE_BACKPACKpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]HOTBAR_FIRSTpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]STORAGE_FIRSTpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]BACKPACK_STORAGE_HOTBARpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]BACKPACK_HOTBAR_STORAGEpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]STORAGE_HOTBAR_BACKPACKpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]ARMOR_HOTBAR_UTILITY_STORAGEpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]HOTBAR_UTILITY_CONSUMABLE_STORAGEpublic staticComponentType<EntityStore, ? extends InventoryComponent>[]EVERYTHING
Modifier Signature publicInventoryComponent()publicInventoryComponent(short capacity)
Modifier Return Type Signature publicvoidensureCapacity(short capacity, List<ItemStack> remainder)publicvoidmarkDirty()publicbooleanconsumeIsDirty()publicbooleanconsumeNeedsSaving()publicItemContainergetInventory()publicConcurrentLinkedQueue<ItemContainer.ItemContainerChangeEvent>getChangeEvents()public abstractComponent<EntityStore>clone()public staticvoidsetupCombined(ComponentType<EntityStore, Storage> storageInventoryComponentType, ComponentType<EntityStore, Armor> armorInventoryComponentType, ComponentType<EntityStore, Hotbar> hotbarInventoryComponentType, ComponentType<EntityStore, Utility> utilityInventoryComponentType, ComponentType<EntityStore, Backpack> backpackInventoryComponentType, ComponentType<EntityStore, Tool> toolInventoryComponentType)public staticComponentType<EntityStore, ? extends InventoryComponent>getComponentTypeById(int id)public staticCombinedItemContainergetCombined(ComponentAccessor<EntityStore> accessor, Ref<EntityStore> ref, ComponentType<EntityStore, ? extends InventoryComponent>... types)public staticCombinedItemContainergetCombined(CommandBuffer<EntityStore> commandBuffer, ArchetypeChunk<EntityStore> archetypeChunk, int index, ComponentType<EntityStore, ? extends InventoryComponent>... types)public staticItemStackgetItemInHand(ComponentAccessor<EntityStore> accessor, Ref<EntityStore> ref)
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.