Skip to content

MountedComponent

Package: com.hypixel.hytale.builtin.mounts

public class MountedComponent implements Component<EntityStore>

An EntityStore ECS component that marks an entity as mounted. Supports two mount targets: another entity (for NPC/entity mounts) or a chunk-store block reference (for block seats and beds). Tracks the attachment offset, controller type, block mount type, mount start time, and a dirty flag for network synchronization.

public static ComponentType<EntityStore, MountedComponent> getComponentType()

Delegates to MountPlugin.getInstance().getMountedComponentType().

public MountedComponent(Ref<EntityStore> mountedToEntity, Vector3f attachmentOffset, MountController controller)

Creates a component for mounting to another entity. Records the current system time as the mount start.

public MountedComponent(Ref<ChunkStore> mountedToBlock, Vector3f attachmentOffset, BlockMountType blockMountType)

Creates a component for mounting to a block. Sets the controller to MountController.BlockMount and records the block mount type.

MethodReturnsDescription
getMountedToEntity()@Nullable Ref<EntityStore>The entity being ridden, or null for block mounts.
getMountedToBlock()@Nullable Ref<ChunkStore>The block chunk reference, or null for entity mounts.
getAttachmentOffset()Vector3fPosition offset from the mount point.
getControllerType()MountControllerThe controller type determining input handling behavior.
getBlockMountType()BlockMountTypeThe block mount type (Seat or Bed), only set for block mounts.
getMountedDurationMs()longMilliseconds since the mount began, computed from System.currentTimeMillis().
public boolean consumeNetworkOutdated()

Returns true the first time called after the component is created, then returns false on subsequent calls. Used by MountSystems.TrackerUpdate to determine whether a full network update is needed.

@Nonnull
@Override
public Component<EntityStore> clone()

Returns a copy sharing the same entity reference, offset, and controller. Does not copy block mount state.

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.