Skip to content

MountGamePacketHandler

Package: com.hypixel.hytale.builtin.mounts

public class MountGamePacketHandler implements SubPacketHandler

Handles incoming DismountNPC packets from clients. Registered by MountPlugin via ServerManager.get().registerSubPacketHandlers().

public MountGamePacketHandler(IPacketHandler packetHandler)

Stores the parent packet handler for player reference resolution.

@Override
public void registerHandlers()

Registers a handler for packet ID 294 (DismountNPC).

public void handle(DismountNPC packet)

Processes a dismount request from the client. Resolves the player’s entity reference and executes on the world thread:

  1. If the player has no MountedComponent, delegates to MountPlugin.checkDismountNpc() to handle NPC dismount.
  2. If the player has a MountedComponent with controller type BlockMount, removes the MountedComponent to dismount from the block.

Throws RuntimeException if the player reference is invalid.

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