Contents
Class FromPrefabInstance
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.component.FromPrefabInstance
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Component carrying a deterministic id that identifies the specific prefab placement an entity came from
during world generation. Distinct co-located placements (same prefab type, same chunk, different anchor)
produce distinct ids, which lets downstream systems group by placement instance instead of by chunk.
Sits alongside FromWorldGen: every entity emitted by a world-gen prefab placement carries both.
Unlike FromWorldGen this component is not stripped post-add - it persists for the lifetime of
the entity (and across save/load) so it remains available to consumers that match it via query.
-
Field Summary
FieldsFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static ComponentType<EntityStore, FromPrefabInstance> intMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
CODEC
-
-
Constructor Details
-
FromPrefabInstance
public FromPrefabInstance(int prefabInstanceId)
-
-
Method Details
-
getComponentType
-
getPrefabInstanceId
public int getPrefabInstanceId() -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-