Package: com.hypixel.hytale.builtin.adventure.farming.states
public class CoopBlock implements Component < ChunkStore >
A ChunkStore component representing a farming coop block. Manages a list of CoopResident records, an item container for produce storage, and the reference to a FarmingCoopAsset configuration. Handles resident spawning/despawning in the world, wild NPC capture, produce generation based on time elapsed, and cleanup when the block is broken.
Modifier Type Name Value @Nonnull public static finalStringSTATE_PRODUCE"Produce_Ready"
Modifier Type Name protectedStringcoopAssetId@Nonnull protectedList<CoopBlock.CoopResident>residents@Nonnull protectedItemContaineritemContainer
Modifier Return Type Signature public staticComponentType<ChunkStore, CoopBlock>getComponentType()@Nullable publicFarmingCoopAssetgetCoopAsset()publicbooleantryPutResident(@Nonnull CapturedNPCMetadata metadata, @Nonnull WorldTimeResource worldTimeResource)publicbooleantryPutWildResidentFromWild(@Nonnull Store<EntityStore> store, @Nonnull Ref<EntityStore> entityRef, @Nonnull WorldTimeResource worldTimeResource, @Nonnull Vector3i coopLocation)publicbooleangetCoopAcceptsNPC(String npcNameKey)publicvoidgenerateProduceToInventory(@Nonnull WorldTimeResource worldTimeResource)publicvoidgatherProduceFromContainer(@Nonnull ItemContainer playerInventory)publicvoidensureSpawnResidentsInWorld(@Nonnull World world, @Nonnull Store<EntityStore> store, @Nonnull Vector3d coopLocation, @Nonnull Vector3d spawnOffset)publicvoidensureNoResidentsInWorld(@Nonnull Store<EntityStore> store)publicbooleanshouldResidentsBeInCoop(@Nonnull WorldTimeResource worldTimeResource)@Nullable publicInstantgetNextScheduledTick(@Nonnull WorldTimeResource worldTimeResource)publicvoidhandleResidentDespawn(@Nonnull UUID entityUuid)publicvoidhandleBlockBroken(@Nonnull World world, @Nonnull WorldTimeResource worldTimeResource, @Nonnull Store<EntityStore> store, int blockX, int blockY, int blockZ)publicbooleanhasProduce()
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.