StashPlugin.StashSystem
Package: com.hypixel.hytale.builtin.adventure.stash
private static class StashPlugin.StashSystem extends RefSystem<ChunkStore>Inner ECS system of StashPlugin that runs on the chunk store. Registered during StashPlugin.setup(). Listens for chunk-store entities that have both an ItemContainerBlock and a BlockModule.BlockStateInfo component. When such an entity is added (e.g., a stash container block placed or loaded into the world), the system populates the container’s inventory from its drop list by calling StashPlugin.stash, provided the world is not in Creative mode.
Fields
Section titled “Fields”| Modifier | Type | Name |
|---|---|---|
@Nonnull private final | ComponentType<ChunkStore, ItemContainerBlock> | itemContainerStateComponentType |
@Nonnull private final | ComponentType<ChunkStore, BlockModule.BlockStateInfo> | blockStateInfoComponentType |
@Nonnull private final | Query<ChunkStore> | query |
Constructors
Section titled “Constructors”| Modifier | Signature |
|---|---|
public | StashSystem(@Nonnull ComponentType<ChunkStore, ItemContainerBlock> itemContainerStateComponentType) |
Methods
Section titled “Methods”| Modifier | Return Type | Signature |
|---|---|---|
@Override public | Query<ChunkStore> | getQuery() |
@Override public | void | onEntityAdded(@Nonnull Ref<ChunkStore> ref, @Nonnull AddReason reason, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) |
@Override public | void | onEntityRemove(@Nonnull Ref<ChunkStore> ref, @Nonnull RemoveReason reason, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) |
Behavior
Section titled “Behavior”- The query is
Query.and(itemContainerStateComponentType, blockStateInfoComponentType). onEntityAddedskips processing if the world game mode isGameMode.Creative.- Reads the
StashGameplayConfigfrom the world’s gameplay config to determine whether to clear the container drop list after populating. - Delegates to
StashPlugin.stashfor the actual item placement logic. onEntityRemoveis a no-op.
Related Types
Section titled “Related Types”- StashPlugin — the enclosing plugin class
- StashGameplayConfig — provides the
clearContainerDropListconfiguration
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.