Class WorldSupport
java.lang.Object
com.hypixel.hytale.server.npc.role.support.WorldSupport
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleprotected it.unimi.dsi.fastutil.ints.Int2ObjectMap<Attitude> protected final intprotected it.unimi.dsi.fastutil.ints.Int2ObjectMap<AttitudeMemoryEntry> protected AttitudeViewprotected static final ResourceType<EntityStore, Blackboard> protected it.unimi.dsi.fastutil.ints.Int2ObjectMap<BlockTarget> protected Stringprotected intprotected intprotected intprotected final Attitudeprotected final Attitudeprotected intprotected final intprotected booleanprotected doubleprotected final NPCEntityprotected Vector3d[]protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic int[]createTagSetIndexArray(String[] tagSets) getAttitude(Ref<EntityStore> ref, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) intgetCachedBlockTarget(int blockSet) getCachedSearchRayPosition(int id) intgetCurrentWeatherIndex(ComponentAccessor<EntityStore> componentAccessor) intgetEnvironmentId(ComponentAccessor<EntityStore> componentAccessor) getItemAttitude(ItemStack item) intgetOverriddenAttitude(Ref<EntityStore> target) booleanstatic booleanhasTagInGroup(int group, int tag) static booleanisGroupMember(int parentRoleIndex, Ref<EntityStore> ref, int[] groups, ComponentAccessor<EntityStore> componentAccessor) static booleanisGroupMember(int parentRoleIndex, Ref<EntityStore> ref, int group, ComponentAccessor<EntityStore> componentAccessor) voidoverrideAttitude(Ref<EntityStore> target, Attitude attitude, double duration) voidpostRoleBuilt(BuilderSupport support) voidvoidvoidvoidvoidresetBlockSensorFoundBlock(int blockSet) voidresetCachedSearchRayPosition(int id) voidsetBlockToPlace(String block) voidtick(float dt) voidunloaded()
-
Field Details
-
ATTITUDE_CACHE_CLEAR_FREQUENCY
public static final double ATTITUDE_CACHE_CLEAR_FREQUENCY- See Also:
-
BLACKBOARD_RESOURCE_TYPE
-
parent
-
blockSensorCachedTargets
-
searchRayCachedPositions
-
blockToPlace
-
defaultPlayerAttitude
-
defaultNPCAttitude
-
attitudeGroup
protected final int attitudeGroup -
itemAttitudeGroup
protected final int itemAttitudeGroup -
attitudeView
-
attitudeCache
-
attitudeOverrideMemory
-
nextAttitudeCacheClear
protected double nextAttitudeCacheClear -
newPathRequested
protected boolean newPathRequested -
changeCount
protected int changeCount -
environmentIdChangeCount
protected int environmentIdChangeCount -
cachedEnvironmentId
protected int cachedEnvironmentId -
weatherChangeCount
protected int weatherChangeCount -
cachedWeatherIndex
protected int cachedWeatherIndex
-
-
Constructor Details
-
WorldSupport
public WorldSupport(NPCEntity parent, @Nonnull BuilderRole builder, @Nonnull BuilderSupport support)
-
-
Method Details
-
tick
public void tick(float dt) -
postRoleBuilt
-
getCachedBlockTarget
-
resetBlockSensorFoundBlock
public void resetBlockSensorFoundBlock(int blockSet) -
resetAllBlockSensors
public void resetAllBlockSensors() -
getCachedSearchRayPosition
-
resetCachedSearchRayPosition
public void resetCachedSearchRayPosition(int id) -
resetAllCachedSearchRayPositions
public void resetAllCachedSearchRayPositions() -
setBlockToPlace
-
getBlockToPlace
-
getDefaultPlayerAttitude
-
getDefaultNPCAttitude
-
getAttitudeGroup
public int getAttitudeGroup() -
getItemAttitudeGroup
public int getItemAttitudeGroup() -
getAttitude
@Nonnull public Attitude getAttitude(@Nonnull Ref<EntityStore> ref, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getItemAttitude
-
overrideAttitude
-
getOverriddenAttitude
-
requireAttitudeCache
public void requireAttitudeCache() -
requestNewPath
public void requestNewPath() -
hasRequestedNewPath
public boolean hasRequestedNewPath() -
consumeNewPathRequested
public boolean consumeNewPathRequested() -
getEnvironmentId
-
getCurrentWeatherIndex
-
hasTagInGroup
public static boolean hasTagInGroup(int group, int tag) -
isGroupMember
public static boolean isGroupMember(int parentRoleIndex, @Nonnull Ref<EntityStore> ref, @Nullable int[] groups, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isGroupMember
public static boolean isGroupMember(int parentRoleIndex, @Nullable Ref<EntityStore> ref, int group, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
createTagSetIndexArray
-
unloaded
public void unloaded()
-