Bot

public class Bot extends SimpleChannelInboundHandler

Class Bot. Provides bot functionality for the Hytale server.

java.lang.Object > SimpleChannelInboundHandler > Bot

Field Summary

channel

private SocketChannel channel

Field channel.

id

private int id

Field id.

pos

private Vector3d pos

Field pos.

address

final InetSocketAddress address

Field address.

dt

final float dt

Field dt.

packet

final Ping packet

Field packet.

movementDistance

final double movementDistance

Field movementDistance.

random

final ThreadLocalRandom random

Field random.

randX

final double randX

Field randX.

randY

final double randY

Field randY.

randZ

final double randZ

Field randZ.

uuid

final UUID uuid

Field uuid.

entityUpdates

final EntityUpdates entityUpdates

Field entityUpdates.

entry

final EntityUpdate entry

Field entry.

clientTeleport

final ClientTeleport clientTeleport

Field clientTeleport.

modelTransform

final ModelTransform modelTransform

Field modelTransform.

movement

final ClientMovement movement

Field movement.

ping

final Ping ping

Field ping.

instantData

final InstantData instantData

Field instantData.

position

final Position position

Field position.

lookOrientation

final Direction lookOrientation

Field lookOrientation.

Method Detail

Bot

public public Bot (final String name, @Nonnull final BotConfig config, final int tickStepNanos)

Method Bot.

Parameters:
final String name
@Nonnull final BotConfig config
final int tickStepNanos

Bootstrap

public new Bootstrap ()

Method Bootstrap.

initChannel

protected void initChannel (@Nonnull final SocketChannel channel)

Method initChannel.

Parameters:
@Nonnull final SocketChannel channel

PacketDecoder

public new PacketDecoder ()

Method PacketDecoder.

PacketEncoder

public new PacketEncoder ()

Method PacketEncoder.

shutdown

public void shutdown ()

Method shutdown.

tick

public void tick (final float dt)

Method tick.

Parameters:
final float dt

Pong

public new Pong (packet.id, WorldTimeResource.instantToInstantData(Instant.now()

Method Pong.

Parameters:
packet.id packet.id
WorldTimeResource.instantToInstantData(Instant.now( WorldTimeResource.instantToInstantData(Instant.now(

channelActive

public void channelActive (@Nonnull final ChannelHandlerContext ctx)

Method channelActive.

Parameters:
@Nonnull final ChannelHandlerContext ctx

Connect

public new Connect ("6708f121966c1c443f4b0eb525b2f81d0a8dc61f5003a692a8fa157e5e02cea9", ClientType.Game, "en", null, uuid, this.name, null, null)

Method Connect.

Parameters:
"6708f121966c1c443f4b0eb525b2f81d0a8dc61f5003a692a8fa157e5e02cea9" "6708f121966c1c443f4b0eb525b2f81d0a8dc61f5003a692a8fa157e5e02cea9"
ClientType.Game ClientType.Game
"en" "en"
null null
uuid uuid
this.name this.name

channelInactive

public void channelInactive (final ChannelHandlerContext ctx)

Method channelInactive.

Parameters:
final ChannelHandlerContext ctx

exceptionCaught

public void exceptionCaught (@Nonnull final ChannelHandlerContext ctx, @Nonnull final Throwable cause)

Method exceptionCaught.

Parameters:
@Nonnull final ChannelHandlerContext ctx
@Nonnull final Throwable cause

Disconnect

public new Disconnect (cause.getMessage()

Method Disconnect.

Parameters:
cause.getMessage( cause.getMessage(

channelRead0

public void channelRead0 (@Nonnull final ChannelHandlerContext ctx, @Nonnull final Packet packet)

Method channelRead0.

Parameters:
@Nonnull final ChannelHandlerContext ctx
@Nonnull final Packet packet

RequestAssets

public new RequestAssets (Bot.EMPTY_ASSET_ARRAY)

Method RequestAssets.

Parameters:
Bot.EMPTY_ASSET_ARRAY Bot.EMPTY_ASSET_ARRAY

ViewRadius

public new ViewRadius (this.config.viewRadius)

Method ViewRadius.

Parameters:
this.config.viewRadius this.config.viewRadius

PlayerOptions

public new PlayerOptions (CosmeticsModule.get()

Method PlayerOptions.

Parameters:
CosmeticsModule.get( CosmeticsModule.get(

ClientReady

public new ClientReady (true, this.id != -1)

Method ClientReady.

Parameters:
true true
this.id != -1

updateModelTransform

public void updateModelTransform (@Nonnull final ModelTransform modelTransform)

Method updateModelTransform.

Parameters:
@Nonnull final ModelTransform modelTransform

updateRotation

public void updateRotation (@Nonnull final Direction lookOrientation)

Method updateRotation.

Parameters:
@Nonnull final Direction lookOrientation

createMovementPacket

public ClientMovement createMovementPacket ()

Method createMovementPacket.

toString

public String toString ()

Method toString.

findEntityUpdate

static EntityUpdate findEntityUpdate (@Nonnull final EntityUpdates bulkList, final int id)

Method findEntityUpdate.

Parameters:
@Nonnull final EntityUpdates bulkList
final int id