GamePacketHandler

public class GamePacketHandler extends GenericPacketHandler implements IPacketHandler

Class GamePacketHandler. Provides gamepackethandler functionality for the Hytale server.

java.lang.Object > GenericPacketHandler > GamePacketHandler

Field Summary

playerRef

private PlayerRef playerRef

Field playerRef.

playerComponent

private Player playerComponent

Field playerComponent.

ref

final Ref ref

Field ref.

store

final Store store

Field store.

world

final World world

Field world.

playerInputComponent

final PlayerInput playerInputComponent

Field playerInputComponent.

pendingTeleport

final PendingTeleport pendingTeleport

Field pendingTeleport.

message

final String message

Field message.

firstChar

final char firstChar

Field firstChar.

playerUUID

final UUID playerUUID

Field playerUUID.

targetPlayerRefs

final List targetPlayerRefs

Field targetPlayerRefs.

sentMessage

final Message sentMessage

Field sentMessage.

pageManager

final PageManager pageManager

Field pageManager.

entityViewerComponent

final EntityTrackerSystems.EntityViewer entityViewerComponent

Field entityViewerComponent.

viewRadiusChunks

final int viewRadiusChunks

Field viewRadiusChunks.

updateWindowPacket

final UpdateWindow updateWindowPacket

Field updateWindowPacket.

window

final Window window

Field window.

component

final PlayerSettings component

Field component.

inventory

final Inventory inventory

Field inventory.

targetBlock

final Vector3i targetBlock

Field targetBlock.

blockRotation

final BlockRotation blockRotation

Field blockRotation.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

position

final Vector3d position

Field position.

blockCenter

final Vector3d blockCenter

Field blockCenter.

chunkStore

final Store chunkStore

Field chunkStore.

chunkIndex

final long chunkIndex

Field chunkIndex.

chunkReference

final Ref chunkReference

Field chunkReference.

blockChunk

final BlockChunk blockChunk

Field blockChunk.

section

final BlockSection section

Field section.

itemInHand

final ItemStack itemInHand

Field itemInHand.

clientPlacedBlockTypeKey

final String clientPlacedBlockTypeKey

Field clientPlacedBlockTypeKey.

heldBlockType

final BlockType heldBlockType

Field heldBlockType.

perWorldData

final PlayerWorldData perWorldData

Field perWorldData.

publicAddresses

final List publicAddresses

Field publicAddresses.

singleplayerModule

final SingleplayerModule singleplayerModule

Field singleplayerModule.

config

final HytaleServerConfig config

Field config.

modelAsset

final ModelAsset modelAsset

Field modelAsset.

updatePacket

final UpdateMachinimaScene updatePacket

Field updatePacket.

target

final PlayerRef target

Field target.

future

final CompletableFuture future

Field future.

worldMapTracker

final WorldMapTracker worldMapTracker

Field worldMapTracker.

marker

final MapMarker marker

Field marker.

entityReference

final Ref entityReference

Field entityReference.

movementStatesComponent

final MovementStatesComponent movementStatesComponent

Field movementStatesComponent.

handle

final MethodHandle handle

Field handle.

Method Detail

GamePacketHandler

public public GamePacketHandler (@Nonnull final Channel channel, @Nonnull final ProtocolVersion protocolVersion, @Nonnull final PlayerAuthentication auth)

Method GamePacketHandler.

Parameters:
@Nonnull final Channel channel
@Nonnull final ProtocolVersion protocolVersion
@Nonnull final PlayerAuthentication auth

getInteractionPacketQueue

public Deque getInteractionPacketQueue ()

Method getInteractionPacketQueue.

getPlayerRef

public PlayerRef getPlayerRef ()

Method getPlayerRef.

setPlayerRef

public void setPlayerRef (@Nonnull final PlayerRef playerRef, @Nonnull final Player playerComponent)

Method setPlayerRef.

Parameters:
@Nonnull final PlayerRef playerRef
@Nonnull final Player playerComponent

getIdentifier

public String getIdentifier ()

Method getIdentifier.

registerHandlers

protected void registerHandlers ()

Method registerHandlers.

closed

public void closed (final ChannelHandlerContext ctx)

Method closed.

Parameters:
final ChannelHandlerContext ctx

disconnect

public void disconnect (@Nonnull final String message)

Method disconnect.

Parameters:
@Nonnull final String message

handle

public void handle (@Nonnull final Disconnect packet)

Method handle.

Parameters:
@Nonnull final Disconnect packet

if

public else if (!playerComponent.isWaitingForClientReady()

Method if.

Parameters:
!playerComponent.isWaitingForClientReady( !playerComponent.isWaitingForClientReady(

PlayerChatEvent

public new PlayerChatEvent (this.playerRef, targetPlayerRefs, message)

Method PlayerChatEvent.

Parameters:
this.playerRef this.playerRef
targetPlayerRefs targetPlayerRefs
message message

SetPage

public new SetPage (Page.None, true)

Method SetPage.

Parameters:
Page.None Page.None
true true

PlayerSettings

public new PlayerSettings (packet.showEntityMarkers, packet.armorItemsPreferredPickupLocation, packet.weaponAndToolItemsPreferredPickupLocation, packet.usableItemsItemsPreferredPickupLocation, packet.solidBlockItemsPreferredPickupLocation, packet.miscItemsPreferredPickupLocation, new PlayerCreativeSettings(packet.allowNPCDetection, packet.respondToHit)

Method PlayerSettings.

Parameters:
packet.showEntityMarkers packet.showEntityMarkers
packet.armorItemsPreferredPickupLocation packet.armorItemsPreferredPickupLocation
packet.weaponAndToolItemsPreferredPickupLocation packet.weaponAndToolItemsPreferredPickupLocation
packet.usableItemsItemsPreferredPickupLocation packet.usableItemsItemsPreferredPickupLocation
packet.solidBlockItemsPreferredPickupLocation packet.solidBlockItemsPreferredPickupLocation
packet.miscItemsPreferredPickupLocation packet.miscItemsPreferredPickupLocation
new PlayerCreativeSettings(packet.allowNPCDetection
packet.respondToHit packet.respondToHit

SetMachinimaActorModel

public new SetMachinimaActorModel (Model.createUnitScaleModel(modelAsset)

Method SetMachinimaActorModel.

Parameters:
Model.createUnitScaleModel(modelAsset Model.createUnitScaleModel(modelAsset

UpdateMachinimaScene

public new UpdateMachinimaScene (this.playerRef.getUsername()

Method UpdateMachinimaScene.

Parameters:
this.playerRef.getUsername( this.playerRef.getUsername(

Teleport

public new Teleport (null, PositionUtil.toTransform(marker.transform)

Method Teleport.

Parameters:
null null
PositionUtil.toTransform(marker.transform PositionUtil.toTransform(marker.transform

SetFlyCameraMode

public new SetFlyCameraMode (packet.entering)

Method SetFlyCameraMode.

Parameters:
packet.entering packet.entering

ensureHandle

static MethodHandle ensureHandle ()

Method ensureHandle.

invoke

static String invoke (String p0, String p1)

Method invoke.

Parameters:
String p0
String p1