Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- unregister()
- moveItem(Ref, int, int, int, int, int, ComponentAccessor)
- smartMoveItem(Ref, int, int, int, SmartMoveType, PlayerSettings, ComponentAccessor)
- takeAll(Ref, int, PlayerSettings, ComponentAccessor)
- takeAllWithPriority(Ref, ItemContainer, PlayerSettings, ComponentAccessor)
- putAll(int)
- quickStack(Ref, int, ComponentAccessor)
- dropAllItemStacks()
- clear()
- getStorage()
- getArmor()
- getHotbar()
- getUtility()
- getTools()
- getBackpack()
- getCombinedHotbarFirst()
- getCombinedStorageFirst()
- getCombinedBackpackStorageHotbar()
- getCombinedBackpackStorageHotbarFirst()
- getCombinedArmorHotbarUtilityStorage()
- getCombinedHotbarUtilityConsumableStorage()
- getCombinedStorageHotbarBackpack()
- setActiveSlot(Ref, int, byte, ComponentAccessor)
- getActiveSlot(Ref, int, ComponentAccessor)
- getActiveSlot(int)
- getActiveHotbarSlot()
- setActiveHotbarSlot(Ref, byte, ComponentAccessor)
- getActiveHotbarItem()
- getActiveToolItem()
- getItemInHand()
- getActiveUtilitySlot()
- setActiveUtilitySlot(Ref, byte, ComponentAccessor)
- getUtilityItem()
- getActiveToolsSlot()
- setActiveToolsSlot(Ref, byte, ComponentAccessor)
- getToolsItem()
- getSectionById(int)
- setEntity(LivingEntity)
- sortStorage()
- containsBrokenItem(Ref, ComponentAccessor)
- migrateToComponents(Holder)
- backwardsCompatHook(Holder)
- equals(Object)
- hashCode()
- toString()
- setUsingToolsItem(boolean)
- usingToolsItem()
Class Inventory
java.lang.Object
com.hypixel.hytale.server.core.inventory.Inventory
Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<Inventory> Deprecated, for removal: This API element is subject to removal in a future version.static final intDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidbackwardsCompatHook(Holder<EntityStore> holder) Deprecated, for removal: This API element is subject to removal in a future version.Populates local component references so that legacy code paths onInventory(e.g.voidclear()Deprecated, for removal: This API element is subject to removal in a future version.UseInventoryUtils.clear(Ref, ComponentAccessor)instead.static booleancontainsBrokenItem(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Hotbarcomponent and callActiveSlotInventoryComponent.getActiveItem()instead.byteDeprecated, for removal: This API element is subject to removal in a future version.bytegetActiveSlot(int inventorySectionId) Deprecated, for removal: This API element is subject to removal in a future version.static bytegetActiveSlot(Ref<EntityStore> ref, int inventorySectionId, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.setActiveSlot(Ref, int, byte, ComponentAccessor)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callActiveSlotInventoryComponent.getActiveItem()instead.byteDeprecated, for removal: This API element is subject to removal in a future version.byteDeprecated, for removal: This API element is subject to removal in a future version.getArmor()Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Armorcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Armor.getComponentType()).Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Backpackcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Backpack.getComponentType()).Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Hotbarcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Hotbar.getComponentType()).Deprecated, for removal: This API element is subject to removal in a future version.getSectionById(int id) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.getSectionById(Ref, int, ComponentAccessor)equivalent.Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Storagecomponent directly viaaccessor.getComponent(ref, InventoryComponent.Storage.getComponentType()).getTools()Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Tool.getComponentType()).Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callActiveSlotInventoryComponent.getActiveItem()instead.Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Utilitycomponent directly viaaccessor.getComponent(ref, InventoryComponent.Utility.getComponentType()).Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Utilitycomponent and callActiveSlotInventoryComponent.getActiveItem()instead.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.voidmigrateToComponents(Holder<EntityStore> holder) Deprecated, for removal: This API element is subject to removal in a future version.Migrates inventory data deserialized from the legacyInventorycodec into individualInventoryComponents on the entity.static voidmoveItem(Ref<EntityStore> ref, int fromSectionId, int fromSlotId, int quantity, int toSectionId, int toSlotId, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.moveItem(Ref, int, int, int, int, int, ComponentAccessor)equivalent.putAll(int inventorySectionId) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.putAll(Ref, int, ComponentAccessor)equivalent.quickStack(Ref<EntityStore> ref, int inventorySectionId, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.quickStack(Ref, int, ComponentAccessor)equivalent.voidsetActiveHotbarSlot(Ref<EntityStore> ref, byte slot, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.static voidsetActiveSlot(Ref<EntityStore> ref, int inventorySectionId, byte slot, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.setActiveSlot(Ref, int, byte, ComponentAccessor)equivalent.voidsetActiveToolsSlot(Ref<EntityStore> ref, byte slot, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.voidsetActiveUtilitySlot(Ref<EntityStore> ref, byte slot, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.setActiveSlot(Ref, int, byte, ComponentAccessor)equivalent.voidsetEntity(LivingEntity entity) Deprecated, for removal: This API element is subject to removal in a future version.voidsetUsingToolsItem(boolean value) Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callInventoryComponent.Tool.setUsingToolsItem(boolean)instead.static voidsmartMoveItem(Ref<EntityStore> ref, int fromSectionId, int fromSlotId, int quantity, SmartMoveType moveType, PlayerSettings settings, ComponentAccessor<EntityStore> accessor) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.UseInventoryUtils.sortStorage(Ref, ComponentAccessor)instead.takeAll(Ref<EntityStore> ref, int inventorySectionId, PlayerSettings settings, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.takeAll(Ref, int, PlayerSettings, ComponentAccessor)equivalent.takeAllWithPriority(Ref<EntityStore> ref, ItemContainer fromContainer, PlayerSettings settings, ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.toString()Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callInventoryComponent.Tool.isUsingToolsItem()instead.
-
Field Details
-
VERSION
public static final int VERSIONDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
CODEC
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
Inventory
public Inventory()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
unregister
Deprecated, for removal: This API element is subject to removal in a future version. -
moveItem
@Deprecated(forRemoval=true) public static void moveItem(@Nonnull Ref<EntityStore> ref, int fromSectionId, int fromSlotId, int quantity, int toSectionId, int toSlotId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.moveItem(Ref, int, int, int, int, int, ComponentAccessor)equivalent. -
smartMoveItem
@Deprecated(forRemoval=true) public static void smartMoveItem(@Nonnull Ref<EntityStore> ref, int fromSectionId, int fromSlotId, int quantity, @Nonnull SmartMoveType moveType, PlayerSettings settings, @Nonnull ComponentAccessor<EntityStore> accessor) Deprecated, for removal: This API element is subject to removal in a future version. -
takeAll
@Deprecated(forRemoval=true) @Nullable public ListTransaction<MoveTransaction<ItemStackTransaction>> takeAll(@Nonnull Ref<EntityStore> ref, int inventorySectionId, PlayerSettings settings, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.takeAll(Ref, int, PlayerSettings, ComponentAccessor)equivalent. -
takeAllWithPriority
@Deprecated(forRemoval=true) public static ListTransaction<MoveTransaction<ItemStackTransaction>> takeAllWithPriority(@Nonnull Ref<EntityStore> ref, ItemContainer fromContainer, PlayerSettings settings, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version. -
putAll
@Deprecated(forRemoval=true) @Nullable public ListTransaction<MoveTransaction<ItemStackTransaction>> putAll(int inventorySectionId) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.putAll(Ref, int, ComponentAccessor)equivalent. -
quickStack
@Deprecated(forRemoval=true) @Nullable public ListTransaction<MoveTransaction<ItemStackTransaction>> quickStack(@Nonnull Ref<EntityStore> ref, int inventorySectionId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.quickStack(Ref, int, ComponentAccessor)equivalent. -
dropAllItemStacks
Deprecated, for removal: This API element is subject to removal in a future version. -
clear
Deprecated, for removal: This API element is subject to removal in a future version.UseInventoryUtils.clear(Ref, ComponentAccessor)instead. -
getStorage
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Storagecomponent directly viaaccessor.getComponent(ref, InventoryComponent.Storage.getComponentType()). -
getArmor
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Armorcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Armor.getComponentType()). -
getHotbar
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Hotbarcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Hotbar.getComponentType()). -
getUtility
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Utilitycomponent directly viaaccessor.getComponent(ref, InventoryComponent.Utility.getComponentType()). -
getTools
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Tool.getComponentType()). -
getBackpack
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Backpackcomponent directly viaaccessor.getComponent(ref, InventoryComponent.Backpack.getComponentType()). -
getCombinedHotbarFirst
Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
getCombinedStorageFirst
Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
getCombinedBackpackStorageHotbar
@Deprecated(forRemoval=true) @Nullable public CombinedItemContainer getCombinedBackpackStorageHotbar()Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
getCombinedBackpackStorageHotbarFirst
@Deprecated(forRemoval=true) @Nullable public CombinedItemContainer getCombinedBackpackStorageHotbarFirst()Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
getCombinedArmorHotbarUtilityStorage
@Deprecated(forRemoval=true) @Nullable public CombinedItemContainer getCombinedArmorHotbarUtilityStorage()Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
getCombinedHotbarUtilityConsumableStorage
@Deprecated(forRemoval=true) @Nullable public CombinedItemContainer getCombinedHotbarUtilityConsumableStorage()Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
getCombinedStorageHotbarBackpack
@Deprecated(forRemoval=true) @Nullable public CombinedItemContainer getCombinedStorageHotbarBackpack()Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryComponent.getCombined(ComponentAccessor, Ref, ComponentType...)equivalent. -
setActiveSlot
@Deprecated(forRemoval=true) public static void setActiveSlot(@Nonnull Ref<EntityStore> ref, int inventorySectionId, byte slot, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.setActiveSlot(Ref, int, byte, ComponentAccessor)equivalent. -
getActiveSlot
@Deprecated(forRemoval=true) public static byte getActiveSlot(@Nonnull Ref<EntityStore> ref, int inventorySectionId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.setActiveSlot(Ref, int, byte, ComponentAccessor)equivalent. -
getActiveSlot
Deprecated, for removal: This API element is subject to removal in a future version. -
getActiveHotbarSlot
Deprecated, for removal: This API element is subject to removal in a future version. -
setActiveHotbarSlot
@Deprecated(forRemoval=true) public void setActiveHotbarSlot(@Nonnull Ref<EntityStore> ref, byte slot, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version. -
getActiveHotbarItem
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Hotbarcomponent and callActiveSlotInventoryComponent.getActiveItem()instead. -
getActiveToolItem
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callActiveSlotInventoryComponent.getActiveItem()instead. -
getItemInHand
Deprecated, for removal: This API element is subject to removal in a future version. -
getActiveUtilitySlot
Deprecated, for removal: This API element is subject to removal in a future version. -
setActiveUtilitySlot
@Deprecated(forRemoval=true) public void setActiveUtilitySlot(@Nonnull Ref<EntityStore> ref, byte slot, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.setActiveSlot(Ref, int, byte, ComponentAccessor)equivalent. -
getUtilityItem
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Utilitycomponent and callActiveSlotInventoryComponent.getActiveItem()instead. -
getActiveToolsSlot
Deprecated, for removal: This API element is subject to removal in a future version. -
setActiveToolsSlot
@Deprecated(forRemoval=true) public void setActiveToolsSlot(@Nonnull Ref<EntityStore> ref, byte slot, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Deprecated, for removal: This API element is subject to removal in a future version. -
getToolsItem
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callActiveSlotInventoryComponent.getActiveItem()instead. -
getSectionById
Deprecated, for removal: This API element is subject to removal in a future version.Use theInventoryUtils.getSectionById(Ref, int, ComponentAccessor)equivalent. -
setEntity
Deprecated, for removal: This API element is subject to removal in a future version. -
sortStorage
Deprecated, for removal: This API element is subject to removal in a future version.UseInventoryUtils.sortStorage(Ref, ComponentAccessor)instead. -
containsBrokenItem
@Deprecated(forRemoval=true) public static boolean containsBrokenItem(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor) Deprecated, for removal: This API element is subject to removal in a future version. -
migrateToComponents
Deprecated, for removal: This API element is subject to removal in a future version.Migrates inventory data deserialized from the legacyInventorycodec into individualInventoryComponents on the entity. Called once per entity when it is first added to the world. After migration the deserialized fields are nulled out so this is safe to call multiple times (subsequent calls are no-ops). -
backwardsCompatHook
Deprecated, for removal: This API element is subject to removal in a future version.Populates local component references so that legacy code paths onInventory(e.g.getStorage(),getItemInHand()) can delegate to the live ECS components. Must be called aftermigrateToComponents(Holder)and after components have been ensured. -
equals
-
hashCode
-
toString
-
setUsingToolsItem
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callInventoryComponent.Tool.setUsingToolsItem(boolean)instead. -
usingToolsItem
Deprecated, for removal: This API element is subject to removal in a future version.Fetch theInventoryComponent.Toolcomponent and callInventoryComponent.Tool.isUsingToolsItem()instead.
-
InventoryComponents instead, kept for migration work for now