C# Class fCraft.PacketWriter

Show file Open project: GlennMR/800craft Class Usage Examples

Public Methods

Method Description
MakeSetBlock ( int x, int y, int z, Block type ) : Packet
PacketWriter ( Stream stream ) : System
Write ( OpCode opcode ) : void
Write ( [ str ) : void

Writes a string in Minecraft protocol format. Maximum length: 64 characters.

Write ( int data ) : void

Writes a 32-bit integer in Big-Endian order.

Write ( short data ) : void

Writes a 16-bit short integer in Big-Endian order.

WriteAddEntity ( byte id, [ player, Position pos ) : void
WriteMapBegin ( ) : void
WriteMapChunk ( [ chunk, int chunkSize, byte progress ) : void
WritePing ( ) : void
WriteTeleport ( byte id, Position pos ) : void

Private Methods

Method Description
MakeAddEntity ( int id, [ name, Position pos ) : Packet
MakeDisconnect ( [ reason ) : Packet
MakeHandshake ( [ player, [ serverName, [ motd ) : Packet
MakeMessage ( [ message ) : Packet
MakeMove ( int id, Position pos ) : Packet
MakeMoveRotate ( int id, Position pos ) : Packet
MakeRemoveEntity ( int id ) : Packet
MakeRotate ( int id, Position pos ) : Packet
MakeSelfTeleport ( Position pos ) : Packet
MakeSetBlock ( Vector3I coords, Block type ) : Packet
MakeSetPermission ( [ player ) : Packet
MakeTeleport ( int id, Position pos ) : Packet
ToNetOrder ( int number, byte arr, int offset ) : void
WriteMapEnd ( [ map ) : void

Method Details

MakeSetBlock() public static method

public static MakeSetBlock ( int x, int y, int z, Block type ) : Packet
x int
y int
z int
type Block
return Packet

PacketWriter() public method

public PacketWriter ( Stream stream ) : System
stream Stream
return System

Write() public method

public Write ( OpCode opcode ) : void
opcode OpCode
return void

Write() public method

Writes a string in Minecraft protocol format. Maximum length: 64 characters.
public Write ( [ str ) : void
str [
return void

Write() public method

Writes a 32-bit integer in Big-Endian order.
public Write ( int data ) : void
data int
return void

Write() public method

Writes a 16-bit short integer in Big-Endian order.
public Write ( short data ) : void
data short
return void

WriteAddEntity() public method

public WriteAddEntity ( byte id, [ player, Position pos ) : void
id byte
player [
pos Position
return void

WriteMapBegin() public method

public WriteMapBegin ( ) : void
return void

WriteMapChunk() public method

public WriteMapChunk ( [ chunk, int chunkSize, byte progress ) : void
chunk [
chunkSize int
progress byte
return void

WritePing() public method

public WritePing ( ) : void
return void

WriteTeleport() public method

public WriteTeleport ( byte id, Position pos ) : void
id byte
pos Position
return void