Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getComponentType()
- get(Ref, ComponentAccessor)
- setDisplayNames(String[])
- getDisplayNames()
- nominateDisplayName(String)
- handleNominatedDisplayName(Ref, ComponentAccessor)
- pickRandomDisplayName(Holder, boolean)
- pickRandomDisplayName(Ref, boolean, ComponentAccessor)
- setDisplayName(Holder, String)
- setDisplayName(Holder, String, boolean)
- setRandomDisplayName(Ref, String[], boolean, ComponentAccessor)
- setRandomDisplayName(Holder, String[], boolean)
- setDisplayName(Ref, String, ComponentAccessor)
- setDisplayName(Ref, String, boolean, ComponentAccessor)
- clone()
Class DisplayNameSupport
java.lang.Object
com.hypixel.hytale.server.npc.role.support.DisplayNameSupport
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
ECS component owning display-name state for the NPC entity.
-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static DisplayNameSupportget(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor) static ComponentType<EntityStore, DisplayNameSupport> String[]voidhandleNominatedDisplayName(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) Apply any nominated display name to the entity (deferred from a prior tick) and clear the nomination.voidnominateDisplayName(String displayName) voidpickRandomDisplayName(Holder<EntityStore> holder, boolean override) voidpickRandomDisplayName(Ref<EntityStore> ref, boolean override, ComponentAccessor<EntityStore> componentAccessor) static voidsetDisplayName(Holder<EntityStore> holder, String displayName) static voidsetDisplayName(Holder<EntityStore> holder, String displayName, boolean override) static voidsetDisplayName(Ref<EntityStore> ref, String displayName, boolean override, ComponentAccessor<EntityStore> componentAccessor) static voidsetDisplayName(Ref<EntityStore> ref, String displayName, ComponentAccessor<EntityStore> componentAccessor) voidsetDisplayNames(String[] displayNames) Initialize the candidate display-name pool.static voidsetRandomDisplayName(Holder<EntityStore> holder, String[] names, boolean override) static voidsetRandomDisplayName(Ref<EntityStore> ref, String[] names, boolean override, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
DisplayNameSupport
public DisplayNameSupport()
-
-
Method Details
-
getComponentType
-
get
@Nonnull public static DisplayNameSupport get(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor) -
setDisplayNames
Initialize the candidate display-name pool. Called once fromRole.createAndAttach. -
getDisplayNames
-
nominateDisplayName
-
handleNominatedDisplayName
public void handleNominatedDisplayName(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Apply any nominated display name to the entity (deferred from a prior tick) and clear the nomination. No-op if nothing was nominated. -
pickRandomDisplayName
-
pickRandomDisplayName
public void pickRandomDisplayName(@Nonnull Ref<EntityStore> ref, boolean override, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setDisplayName
-
setDisplayName
public static void setDisplayName(@Nonnull Holder<EntityStore> holder, @Nullable String displayName, boolean override) -
setRandomDisplayName
public static void setRandomDisplayName(@Nonnull Ref<EntityStore> ref, @Nullable String[] names, boolean override, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setRandomDisplayName
public static void setRandomDisplayName(@Nonnull Holder<EntityStore> holder, @Nullable String[] names, boolean override) -
setDisplayName
public static void setDisplayName(@Nonnull Ref<EntityStore> ref, @Nonnull String displayName, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setDisplayName
public static void setDisplayName(@Nonnull Ref<EntityStore> ref, @Nullable String displayName, boolean override, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-