LocalSpawnControllerSystem

public class LocalSpawnControllerSystem extends TickingSystem

System for handling localspawncontroller mechanics. Systems contain game logic that operates on entities with specific component types.

java.lang.Object > TickingSystem > LocalSpawnControllerSystem

Field Summary

localSpawnState

final LocalSpawnState localSpawnState

Field localSpawnState.

controllers

final List> controllers

Field controllers.

spawnControllerComponent2

final LocalSpawnController spawnControllerComponent2

Field spawnControllerComponent2.

world

final World world

Field world.

pendingSpawns

final List pendingSpawns

Field pendingSpawns.

existingBeacons

final ObjectList> existingBeacons

Field existingBeacons.

reference

final Ref reference

Field reference.

spawnControllerComponent

final LocalSpawnController spawnControllerComponent

Field spawnControllerComponent.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

weatherTrackerComponent

final WeatherTracker weatherTrackerComponent

Field weatherTrackerComponent.

environmentIndex

final int environmentIndex

Field environmentIndex.

possibleBeacons

final List possibleBeacons

Field possibleBeacons.

firstBeacon

final BeaconSpawnWrapper firstBeacon

Field firstBeacon.

firstRange

final int[] firstRange

Field firstRange.

beacon

final BeaconSpawnWrapper beacon

Field beacon.

radius

final double radius

Field radius.

yRange

final int[] yRange

Field yRange.

position

final Vector3d position

Field position.

largestDistanceSquared

final double largestDistanceSquared

Field largestDistanceSquared.

yDistance

final int yDistance

Field yDistance.

y

final int y

Field y.

minY

final int minY

Field minY.

maxY

final int maxY

Field maxY.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

sunlightFactor

final double sunlightFactor

Field sunlightFactor.

xPos

final int xPos

Field xPos.

yPos

final int yPos

Field yPos.

zPos

final int zPos

Field zPos.

averageLightValues

final Object2ByteOpenHashMap averageLightValues

Field averageLightValues.

possibleBeacon

final BeaconSpawnWrapper possibleBeacon

Field possibleBeacon.

existingBeaconReference

final Ref existingBeaconReference

Field existingBeaconReference.

existingBeaconComponent

final LegacySpawnBeaconEntity existingBeaconComponent

Field existingBeaconComponent.

existingBeaconTransformComponent

final TransformComponent existingBeaconTransformComponent

Field existingBeaconTransformComponent.

existingY

final double existingY

Field existingY.

existingBeaconIndex

final int existingBeaconIndex

Field existingBeaconIndex.

pending

final LegacySpawnBeaconEntity pending

Field pending.

pendingReference

final Ref pendingReference

Field pendingReference.

pendingTransformComponent

final TransformComponent pendingTransformComponent

Field pendingTransformComponent.

pendingPosition

final Vector3d pendingPosition

Field pendingPosition.

pendingY

final double pendingY

Field pendingY.

xDiff

final double xDiff

Field xDiff.

zDiff

final double zDiff

Field zDiff.

distSquared

final double distSquared

Field distSquared.

existingBeaconIndex2

final int existingBeaconIndex2

Field existingBeaconIndex2.

beaconRef

final Ref beaconRef

Field beaconRef.

lightRangePredicate

final LightRangePredicate lightRangePredicate

Field lightRangePredicate.

lightValue

final byte lightValue

Field lightValue.

chunk

final WorldChunk chunk

Field chunk.

blockChunk

final BlockChunk blockChunk

Field blockChunk.

blockId

final int blockId

Field blockId.

Method Detail

LocalSpawnControllerSystem

public public LocalSpawnControllerSystem (final ComponentType spawnControllerComponentType, final ComponentType transformComponentype, final ComponentType weatherTrackerComponentType, final ComponentType localSpawnBeaconComponentType, final ComponentType spawnBeaconComponentType, final ResourceType localSpawnStateResourceType, final ResourceType, EntityStore>> beaconSpatialComponent)

Method LocalSpawnControllerSystem.

Parameters:
final ComponentType spawnControllerComponentType
final ComponentType transformComponentype
final ComponentType weatherTrackerComponentType
final ComponentType localSpawnBeaconComponentType
final ComponentType spawnBeaconComponentType
final ResourceType localSpawnStateResourceType
final ResourceType, EntityStore>> beaconSpatialComponent

tick

public void tick (final float dt, final int systemIndex, @Nonnull final Store store)

Method tick.

Parameters:
final float dt
final int systemIndex
@Nonnull final Store store

spawnLightLevelMatches

static boolean spawnLightLevelMatches (@Nonnull final World world, final int x, final int y, final int z, final double sunlightFactor, @Nonnull final BeaconSpawnWrapper wrapper, @Nonnull final Object2ByteMap averageValues)

Method spawnLightLevelMatches.

Parameters:
@Nonnull final World world
final int x
final int y
final int z
final double sunlightFactor
@Nonnull final BeaconSpawnWrapper wrapper
@Nonnull final Object2ByteMap averageValues

getCachedAverageLightValue

static byte getCachedAverageLightValue (final LightType lightType, @Nonnull final World world, final int x, final int y, final int z, final double sunlightFactor, @Nonnull final TriIntObjectDoubleToByteFunction valueCalculator, @Nonnull final Object2ByteMap averageValues)

Method getCachedAverageLightValue.

Parameters:
final LightType lightType
@Nonnull final World world
final int x
final int y
final int z
final double sunlightFactor
@Nonnull final TriIntObjectDoubleToByteFunction valueCalculator
@Nonnull final Object2ByteMap averageValues