classpublicPriority 3
CoopBlock
com.hypixel.hytale.builtin.adventure.farming.states.CoopBlock
implements Component
22
Methods
22
Public Methods
2
Fields
2
Constructors
Constants
BuilderCodec<CoopBlock>CODEC= BuilderCodec.builder(CoopBlock.class, CoopBlock::new)
.append(new KeyedCodec<>("FarmingCoop...
BuilderCodec<CoopBlock.CoopResident>CODEC= BuilderCodec.builder(CoopBlock.CoopResident.class, CoopBlock.CoopResident::new)
.append(...
StringSTATE_PRODUCE= "Produce_Ready"
Constructors
public
CoopBlock()public
CoopBlock(String farmingCoopId, List<CoopBlock.CoopResident> residents, ItemContainer itemContainer)Methods
Public Methods (22)
public
Component<ChunkStore> clone()@Override
public
void ensureNoResidentsInWorld(Store<EntityStore> store)public
void ensureSpawnResidentsInWorld(World world, Store<EntityStore> store, Vector3d coopLocation, Vector3d spawnOffset)public
void gatherProduceFromInventory(ItemContainer playerInventory)public
void generateProduceToInventory(WorldTimeResource worldTimeResource)publicstatic
ComponentType<ChunkStore, CoopBlock> getComponentType()public
boolean getCoopAcceptsNPCGroup(int npcRoleIndex)public
FarmingCoopAsset getCoopAsset()@Nullable
public
boolean getDeployedToWorld()public
Instant getLastProduced()public
CapturedNPCMetadata getMetadata()public
Instant getNextScheduledTick(WorldTimeResource worldTimeResource)@Nullable
public
PersistentRef getPersistentRef()@Nullable
public
void handleBlockBroken(World world, WorldTimeResource worldTimeResource, Store<EntityStore> store, int blockX, int blockY, int blockZ)public
void handleResidentDespawn(UUID entityUuid)public
boolean hasProduce()public
void setDeployedToWorld(boolean deployedToWorld)public
void setLastProduced(Instant lastProduced)public
void setPersistentRef(PersistentRef persistentRef)public
boolean shouldResidentsBeInCoop(WorldTimeResource worldTimeResource)public
boolean tryPutResident(CapturedNPCMetadata metadata, WorldTimeResource worldTimeResource)public
boolean tryPutWildResidentFromWild(Store<EntityStore> store, Ref<EntityStore> entityRef, WorldTimeResource worldTimeResource, Vector3i coopLocation)Fields
Protected Fields (2)
protected
String coopAssetIdprotected
ItemContainer itemContainer