public class CoopBlock implements Component
Class CoopBlock. Provides coopblock functionality for the Hytale server.
java.lang.Object > CoopBlock
Field Summary
coopAssetId
Field coopAssetId.
residents
Field residents.
itemContainer
Field itemContainer.
remainder
Field remainder.
coopAsset
Field coopAsset.
npcComponent
Field npcComponent.
uuidComponent
Field uuidComponent.
persistentRef
Field persistentRef.
metadata
Field metadata.
residentRecord
Field residentRecord.
tagSetPlugin
Field tagSetPlugin.
acceptedNpcGroupIndexes
Field acceptedNpcGroupIndexes.
currentTime
Field currentTime.
random
Field random.
generatedItemDrops
Field generatedItemDrops.
lastProduced
Field lastProduced.
residentMeta
Field residentMeta.
npcRoleIndex
Field npcRoleIndex.
npcName
Field npcName.
npcDropListName
Field npcDropListName.
dropListAsset
Field dropListAsset.
harvestDiff
Field harvestDiff.
hoursSinceLastHarvest
Field hoursSinceLastHarvest.
produceCount
Field produceCount.
configuredItemDrops
Field configuredItemDrops.
container
Field container.
drops
Field drops.
obj
Field obj.
amount
Field amount.
npcModule
Field npcModule.
radiansPerSpawn
Field radiansPerSpawn.
spawningContext
Field spawningContext.
residentDeployed
Field residentDeployed.
residentEntityId
Field residentEntityId.
residentSpawnLocation
Field residentSpawnLocation.
roleBuilder
Field roleBuilder.
npcRef
Field npcRef.
coopResidentComponent
Field coopResidentComponent.
residentsToRemove
Field residentsToRemove.
deployed
Field deployed.
entityUuid
Field entityUuid.
entityRef
Field entityRef.
deathComponent
Field deathComponent.
roamTimeRange
Field roamTimeRange.
gameHour
Field gameHour.
gameTime
Field gameTime.
gameDateTime
Field gameDateTime.
minutes
Field minutes.
minTime
Field minTime.
maxTime
Field maxTime.
location
Field location.
dropPosition
Field dropPosition.
itemEntityHolders
Field itemEntityHolders.
ref
Field ref.
deployedToWorld
Field deployedToWorld.
Method Detail
getComponentType
CoopBlock>
getComponentType
()
Method getComponentType.
CoopBlock
public
CoopBlock
()
Method CoopBlock.
tryPutResident
boolean
tryPutResident
(final CapturedNPCMetadata metadata, final WorldTimeResource worldTimeResource)
Method tryPutResident.
- Parameters:
final CapturedNPCMetadatametadatafinal WorldTimeResourceworldTimeResource
CoopResident
new
CoopResident
(metadata, null, worldTimeResource.getGameTime()
Method CoopResident.
- Parameters:
metadatametadatanullnullworldTimeResource.getGameTime(worldTimeResource.getGameTime(
tryPutWildResidentFromWild
boolean
tryPutWildResidentFromWild
(final Store store, final Ref entityRef, final WorldTimeResource worldTimeResource, final Vector3i coopLocation)
Method tryPutWildResidentFromWild.
- Parameters:
final Storestorefinal RefentityReffinal WorldTimeResourceworldTimeResourcefinal Vector3icoopLocation
getCoopAcceptsNPCGroup
boolean
getCoopAcceptsNPCGroup
(final int npcRoleIndex)
Method getCoopAcceptsNPCGroup.
- Parameters:
final intnpcRoleIndex
generateProduceToInventory
Method generateProduceToInventory.
- Parameters:
final WorldTimeResourceworldTimeResource
ItemStack
new
ItemStack
(drop.getItemId()
Method ItemStack.
- Parameters:
drop.getItemId(drop.getItemId(
gatherProduceFromInventory
Method gatherProduceFromInventory.
- Parameters:
final ItemContainerplayerInventory
ensureSpawnResidentsInWorld
void
ensureSpawnResidentsInWorld
(final World world, final Store store, final Vector3d coopLocation, final Vector3d spawnOffset)
Method ensureSpawnResidentsInWorld.
- Parameters:
final Worldworldfinal Storestorefinal Vector3dcoopLocationfinal Vector3dspawnOffset
Vector3d
new
Vector3d
()
Method Vector3d.
shouldResidentsBeInCoop
Method shouldResidentsBeInCoop.
- Parameters:
final WorldTimeResourceworldTimeResource
getNextScheduledTick
Method getNextScheduledTick.
- Parameters:
final WorldTimeResourceworldTimeResource
if
else
if
(gameHour > maxTime)
Method if.
- Parameters:
gameHour >maxTime
handleResidentDespawn
void
handleResidentDespawn
(final UUID entityUuid)
Method handleResidentDespawn.
- Parameters:
final UUIDentityUuid
handleBlockBroken
void
handleBlockBroken
(final World world, final WorldTimeResource worldTimeResource, final Store store, final int blockX, final int blockY, final int blockZ)
Method handleBlockBroken.
- Parameters:
final Worldworldfinal WorldTimeResourceworldTimeResourcefinal Storestorefinal intblockXfinal intblockYfinal intblockZ
hasProduce
boolean
hasProduce
()
Method hasProduce.
setPersistentRef
Method setPersistentRef.
- Parameters:
@NullableDecl final PersistentRefpersistentRef
getDeployedToWorld
boolean
getDeployedToWorld
()
Method getDeployedToWorld.
setDeployedToWorld
void
setDeployedToWorld
(final boolean deployedToWorld)
Method setDeployedToWorld.
- Parameters:
final booleandeployedToWorld
getLastProduced
Instant
getLastProduced
()
Method getLastProduced.
setLastProduced
void
setLastProduced
(final Instant lastProduced)
Method setLastProduced.
- Parameters:
final InstantlastProduced