WorldSupport

public class WorldSupport

Class WorldSupport. Provides worldsupport functionality for the Hytale server.

java.lang.Object > WorldSupport

Field Summary

blockSensorCachedTargets

protected Int2ObjectMap blockSensorCachedTargets

Field blockSensorCachedTargets.

searchRayCachedPositions

protected Vector3d[] searchRayCachedPositions

Field searchRayCachedPositions.

blockToPlace

protected String blockToPlace

Field blockToPlace.

attitudeView

protected AttitudeView attitudeView

Field attitudeView.

attitudeCache

protected Int2ObjectMap attitudeCache

Field attitudeCache.

attitudeOverrideMemory

protected Int2ObjectMap attitudeOverrideMemory

Field attitudeOverrideMemory.

nextAttitudeCacheClear

protected double nextAttitudeCacheClear

Field nextAttitudeCacheClear.

newPathRequested

protected boolean newPathRequested

Field newPathRequested.

changeCount

protected int changeCount

Field changeCount.

environmentIdChangeCount

protected int environmentIdChangeCount

Field environmentIdChangeCount.

cachedEnvironmentId

protected int cachedEnvironmentId

Field cachedEnvironmentId.

weatherChangeCount

protected int weatherChangeCount

Field weatherChangeCount.

cachedWeatherIndex

protected int cachedWeatherIndex

Field cachedWeatherIndex.

iterator

final ObjectIterator iterator

Field iterator.

entry

final AttitudeMemoryEntry entry

Field entry.

blackboardBlockSets

final IntList blackboardBlockSets

Field blackboardBlockSets.

cachedTargets

final Int2ObjectOpenHashMap cachedTargets

Field cachedTargets.

it

final ObjectIterator> it

Field it.

next

final Int2ObjectMap.Entry next

Field next.

attitudeMap

final ItemAttitudeMap attitudeMap

Field attitudeMap.

requested

final boolean requested

Field requested.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

chunkRef

final Ref chunkRef

Field chunkRef.

world

final World world

Field world.

chunkStore

final Store chunkStore

Field chunkStore.

blockChunkComponent

final BlockChunk blockChunkComponent

Field blockChunkComponent.

weatherResource

final WeatherResource weatherResource

Field weatherResource.

environmentId

final int environmentId

Field environmentId.

npcComponent

final NPCEntity npcComponent

Field npcComponent.

groups

final int[] groups

Field groups.

tagSet

final String tagSet

Field tagSet.

index

final int index

Field index.

Method Detail

WorldSupport

public public WorldSupport (final NPCEntity parent, @Nonnull final BuilderRole builder, @Nonnull final BuilderSupport support)

Method WorldSupport.

Parameters:
final NPCEntity parent
@Nonnull final BuilderRole builder
@Nonnull final BuilderSupport support

tick

public void tick (final float dt)

Method tick.

Parameters:
final float dt

postRoleBuilt

public void postRoleBuilt (@Nonnull final BuilderSupport support)

Method postRoleBuilt.

Parameters:
@Nonnull final BuilderSupport support

BlockTarget

public new BlockTarget ()

Method BlockTarget.

getCachedBlockTarget

public BlockTarget getCachedBlockTarget (final int blockSet)

Method getCachedBlockTarget.

Parameters:
final int blockSet

resetBlockSensorFoundBlock

public void resetBlockSensorFoundBlock (final int blockSet)

Method resetBlockSensorFoundBlock.

Parameters:
final int blockSet

resetAllBlockSensors

public void resetAllBlockSensors ()

Method resetAllBlockSensors.

getCachedSearchRayPosition

public Vector3d getCachedSearchRayPosition (final int id)

Method getCachedSearchRayPosition.

Parameters:
final int id

resetCachedSearchRayPosition

public void resetCachedSearchRayPosition (final int id)

Method resetCachedSearchRayPosition.

Parameters:
final int id

resetAllCachedSearchRayPositions

public void resetAllCachedSearchRayPositions ()

Method resetAllCachedSearchRayPositions.

setBlockToPlace

public void setBlockToPlace (final String block)

Method setBlockToPlace.

Parameters:
final String block

getBlockToPlace

public String getBlockToPlace ()

Method getBlockToPlace.

getDefaultPlayerAttitude

public Attitude getDefaultPlayerAttitude ()

Method getDefaultPlayerAttitude.

getDefaultNPCAttitude

public Attitude getDefaultNPCAttitude ()

Method getDefaultNPCAttitude.

getAttitudeGroup

public int getAttitudeGroup ()

Method getAttitudeGroup.

getItemAttitudeGroup

public int getItemAttitudeGroup ()

Method getItemAttitudeGroup.

getAttitude

public Attitude getAttitude (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)

Method getAttitude.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final ComponentAccessor componentAccessor

getItemAttitude

public Attitude getItemAttitude (@Nullable final ItemStack item)

Method getItemAttitude.

Parameters:
@Nullable final ItemStack item

overrideAttitude

public void overrideAttitude (final Ref target, final Attitude attitude, final double duration)

Method overrideAttitude.

Parameters:
final Ref target
final Attitude attitude
final double duration

AttitudeMemoryEntry

public new AttitudeMemoryEntry (attitude, duration)

Method AttitudeMemoryEntry.

Parameters:
attitude attitude
duration duration

getOverriddenAttitude

public Attitude getOverriddenAttitude (final Ref target)

Method getOverriddenAttitude.

Parameters:
final Ref target

requireAttitudeCache

public void requireAttitudeCache ()

Method requireAttitudeCache.

requestNewPath

public void requestNewPath ()

Method requestNewPath.

hasRequestedNewPath

public boolean hasRequestedNewPath ()

Method hasRequestedNewPath.

consumeNewPathRequested

public boolean consumeNewPathRequested ()

Method consumeNewPathRequested.

getEnvironmentId

public int getEnvironmentId (@Nonnull final ComponentAccessor componentAccessor)

Method getEnvironmentId.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

getCurrentWeatherIndex

public int getCurrentWeatherIndex (@Nonnull final ComponentAccessor componentAccessor)

Method getCurrentWeatherIndex.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

hasTagInGroup

static boolean hasTagInGroup (final int group, final int tag)

Method hasTagInGroup.

Parameters:
final int group
final int tag

isGroupMember

static boolean isGroupMember (final int parentRoleIndex, @Nonnull final Ref ref, @Nullable final int[] groups, @Nonnull final ComponentAccessor componentAccessor)

Method isGroupMember.

Parameters:
final int parentRoleIndex
@Nonnull final Ref ref
@Nullable final int[] groups
@Nonnull final ComponentAccessor componentAccessor

createTagSetIndexArray

static int[] createTagSetIndexArray (@Nullable final String[] tagSets)

Method createTagSetIndexArray.

Parameters:
@Nullable final String[] tagSets

unloaded

public void unloaded ()

Method unloaded.