Class CoopBlock
java.lang.Object
com.hypixel.hytale.builtin.adventure.farming.states.CoopBlock
- All Implemented Interfaces:
Component<ChunkStore>,Cloneable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<CoopBlock> protected Stringprotected ItemContainer(package private) com.hypixel.hytale.logger.HytaleLoggerprotected List<CoopBlock.CoopResident> static final StringFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionCoopBlock(String farmingCoopId, List<CoopBlock.CoopResident> residents, ItemContainer itemContainer) -
Method Summary
Modifier and TypeMethodDescriptionclone()voidensureNoResidentsInWorld(Store<EntityStore> store) voidensureSpawnResidentsInWorld(World world, Store<EntityStore> store, Vector3d coopLocation, Vector3d spawnOffset) voidgatherProduceFromInventory(ItemContainer playerInventory) voidgenerateProduceToInventory(WorldTimeResource worldTimeResource) static ComponentType<ChunkStore, CoopBlock> booleangetCoopAcceptsNPCGroup(int npcRoleIndex) getNextScheduledTick(WorldTimeResource worldTimeResource) voidhandleBlockBroken(World world, WorldTimeResource worldTimeResource, Store<EntityStore> store, int blockX, int blockY, int blockZ) voidhandleResidentDespawn(UUID entityUuid) booleanbooleanshouldResidentsBeInCoop(WorldTimeResource worldTimeResource) booleantryPutResident(CapturedNPCMetadata metadata, WorldTimeResource worldTimeResource) booleantryPutWildResidentFromWild(Store<EntityStore> store, Ref<EntityStore> entityRef, WorldTimeResource worldTimeResource, Vector3i coopLocation) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
STATE_PRODUCE
- See Also:
-
CODEC
-
LOGGER
com.hypixel.hytale.logger.HytaleLogger LOGGER -
coopAssetId
-
residents
-
itemContainer
-
-
Constructor Details
-
CoopBlock
public CoopBlock() -
CoopBlock
public CoopBlock(String farmingCoopId, List<CoopBlock.CoopResident> residents, ItemContainer itemContainer)
-
-
Method Details
-
getComponentType
-
getCoopAsset
-
tryPutResident
-
tryPutWildResidentFromWild
public boolean tryPutWildResidentFromWild(Store<EntityStore> store, Ref<EntityStore> entityRef, WorldTimeResource worldTimeResource, Vector3i coopLocation) -
getCoopAcceptsNPCGroup
public boolean getCoopAcceptsNPCGroup(int npcRoleIndex) -
generateProduceToInventory
-
gatherProduceFromInventory
-
ensureSpawnResidentsInWorld
public void ensureSpawnResidentsInWorld(World world, Store<EntityStore> store, Vector3d coopLocation, Vector3d spawnOffset) -
ensureNoResidentsInWorld
-
shouldResidentsBeInCoop
-
getNextScheduledTick
-
handleResidentDespawn
-
handleBlockBroken
public void handleBlockBroken(World world, WorldTimeResource worldTimeResource, Store<EntityStore> store, int blockX, int blockY, int blockZ) -
hasProduce
public boolean hasProduce() -
clone
- Specified by:
clonein interfaceComponent<ChunkStore>- Overrides:
clonein classObject
-