YATS/Forge Documentation
|
Public Member Functions | |
final int | getPacketId () |
abstract void | readPacketData (DataInputStream datainputstream) throws IOException |
abstract void | writePacketData (DataOutputStream dataoutputstream) throws IOException |
abstract void | processPacket (NetHandler nethandler) |
abstract int | getPacketSize () |
boolean | isRealPacket () |
boolean | containsSameEntityIDAs (Packet par1Packet) |
boolean | canProcessAsync () |
String | toString () |
Static Public Member Functions | |
static void | addIdClassMapping (int par0, boolean par1, boolean par2, Class par3Class) |
static Packet | getNewPacket (ILogAgent par0ILogAgent, int par1) |
static void | writeByteArray (DataOutputStream par0DataOutputStream, byte[] par1ArrayOfByte) throws IOException |
static byte[] | readBytesFromStream (DataInputStream par0DataInputStream) throws IOException |
static Packet | readPacket (ILogAgent par0ILogAgent, DataInputStream par1DataInputStream, boolean par2, Socket par3Socket) throws IOException |
static void | writePacket (Packet par0Packet, DataOutputStream par1DataOutputStream) throws IOException |
static void | writeString (String par0Str, DataOutputStream par1DataOutputStream) throws IOException |
static String | readString (DataInputStream par0DataInputStream, int par1) throws IOException |
static ItemStack | readItemStack (DataInputStream par0DataInputStream) throws IOException |
static void | writeItemStack (ItemStack par0ItemStack, DataOutputStream par1DataOutputStream) throws IOException |
static NBTTagCompound | readNBTTagCompound (DataInputStream par0DataInputStream) throws IOException |
Public Attributes | |
final long | creationTimeMillis = System.currentTimeMillis() |
boolean | isChunkDataPacket = false |
Static Public Attributes | |
static IntHashMap | packetIdToClassMap = new IntHashMap() |
static long | receivedID |
static long | receivedSize |
static long | sentID |
static long | sentSize |
Static Protected Member Functions | |
static void | writeNBTTagCompound (NBTTagCompound par0NBTTagCompound, DataOutputStream par1DataOutputStream) throws IOException |
Protected Attributes | |
ILogAgent | field_98193_m |
|
static |
Adds a two way mapping between the packet ID and packet class.
boolean net.minecraft.network.packet.Packet.canProcessAsync | ( | ) |
If this returns true, the packet may be processed on any thread; otherwise it is queued for the main thread to handle.
boolean net.minecraft.network.packet.Packet.containsSameEntityIDAs | ( | Packet | par1Packet) |
eg return packet30entity.entityId == entityId; WARNING : will throw if you compare a packet to a different packet class
|
static |
Returns a new instance of the specified Packet class.
final int net.minecraft.network.packet.Packet.getPacketId | ( | ) |
Returns the ID of this packet.
|
pure virtual |
Abstract. Return the size of the packet (not counting the header).
Implemented in net.minecraft.network.packet.Packet56MapChunks, net.minecraft.network.packet.Packet51MapChunk, net.minecraft.network.packet.Packet23VehicleSpawn, net.minecraft.network.packet.Packet24MobSpawn, net.minecraft.network.packet.Packet209SetPlayerTeam, net.minecraft.network.packet.Packet52MultiBlockChange, net.minecraft.network.packet.Packet1Login, net.minecraft.network.packet.Packet60Explosion, net.minecraft.network.packet.Packet20NamedEntitySpawn, net.minecraft.network.packet.Packet202PlayerAbilities, net.minecraft.network.packet.Packet28EntityVelocity, net.minecraft.network.packet.Packet63WorldParticles, net.minecraft.network.packet.Packet34EntityTeleport, net.minecraft.network.packet.Packet62LevelSound, net.minecraft.network.packet.Packet15Place, net.minecraft.network.packet.Packet207SetScore, net.minecraft.network.packet.Packet102WindowClick, net.minecraft.network.packet.Packet250CustomPayload, net.minecraft.network.packet.Packet132TileEntityData, net.minecraft.network.packet.Packet53BlockChange, net.minecraft.network.packet.Packet9Respawn, net.minecraft.network.packet.Packet104WindowItems, net.minecraft.network.packet.Packet10Flying, net.minecraft.network.packet.Packet14BlockDig, net.minecraft.network.packet.Packet54PlayNoteBlock, net.minecraft.network.packet.Packet55BlockDestroy, net.minecraft.network.packet.Packet130UpdateSign, net.minecraft.network.packet.Packet41EntityEffect, net.minecraft.network.packet.Packet204ClientInfo, net.minecraft.network.packet.Packet71Weather, net.minecraft.network.packet.Packet131MapData, net.minecraft.network.packet.Packet25EntityPainting, net.minecraft.network.packet.Packet61DoorChange, net.minecraft.network.packet.Packet100OpenWindow, net.minecraft.network.packet.Packet26EntityExpOrb, net.minecraft.network.packet.Packet3Chat, net.minecraft.network.packet.Packet105UpdateProgressbar, net.minecraft.network.packet.Packet30Entity, net.minecraft.network.packet.Packet7UseEntity, net.minecraft.network.packet.Packet17Sleep, net.minecraft.network.packet.Packet252SharedKey, net.minecraft.network.packet.Packet208SetDisplayObjective, net.minecraft.network.packet.Packet40EntityMetadata, net.minecraft.network.packet.Packet5PlayerInventory, net.minecraft.network.packet.Packet2ClientProtocol, net.minecraft.network.packet.Packet103SetSlot, net.minecraft.network.packet.Packet13PlayerLookMove, net.minecraft.network.packet.Packet70GameEvent, net.minecraft.network.packet.Packet206SetObjective, net.minecraft.network.packet.Packet43Experience, net.minecraft.network.packet.Packet6SpawnPosition, net.minecraft.network.packet.Packet8UpdateHealth, net.minecraft.network.packet.Packet253ServerAuthData, net.minecraft.network.packet.Packet108EnchantItem, net.minecraft.network.packet.Packet19EntityAction, net.minecraft.network.packet.Packet201PlayerInfo, net.minecraft.network.packet.Packet29DestroyEntity, net.minecraft.network.packet.Packet106Transaction, net.minecraft.network.packet.Packet11PlayerPosition, net.minecraft.network.packet.Packet33RelEntityMoveLook, net.minecraft.network.packet.Packet107CreativeSetSlot, net.minecraft.network.packet.Packet42RemoveEntityEffect, net.minecraft.network.packet.Packet22Collect, net.minecraft.network.packet.Packet4UpdateTime, net.minecraft.network.packet.Packet18Animation, net.minecraft.network.packet.Packet205ClientCommand, net.minecraft.network.packet.Packet38EntityStatus, net.minecraft.network.packet.Packet200Statistic, net.minecraft.network.packet.Packet203AutoComplete, net.minecraft.network.packet.Packet35EntityHeadRotation, net.minecraft.network.packet.Packet12PlayerLook, net.minecraft.network.packet.Packet16BlockItemSwitch, net.minecraft.network.packet.Packet255KickDisconnect, net.minecraft.network.packet.Packet0KeepAlive, net.minecraft.network.packet.Packet101CloseWindow, net.minecraft.network.packet.Packet32EntityLook, net.minecraft.network.packet.Packet31RelEntityMove, net.minecraft.network.packet.Packet254ServerPing, and net.minecraft.network.packet.Packet39AttachEntity.
boolean net.minecraft.network.packet.Packet.isRealPacket | ( | ) |
only false for the abstract Packet class, all real packets return true
|
pure virtual |
Passes this Packet on to the NetHandler for processing.
Implemented in net.minecraft.network.packet.Packet56MapChunks, net.minecraft.network.packet.Packet51MapChunk, net.minecraft.network.packet.Packet23VehicleSpawn, net.minecraft.network.packet.Packet24MobSpawn, net.minecraft.network.packet.Packet209SetPlayerTeam, net.minecraft.network.packet.Packet52MultiBlockChange, net.minecraft.network.packet.Packet1Login, net.minecraft.network.packet.Packet60Explosion, net.minecraft.network.packet.Packet20NamedEntitySpawn, net.minecraft.network.packet.Packet202PlayerAbilities, net.minecraft.network.packet.Packet28EntityVelocity, net.minecraft.network.packet.Packet63WorldParticles, net.minecraft.network.packet.Packet34EntityTeleport, net.minecraft.network.packet.Packet62LevelSound, net.minecraft.network.packet.Packet15Place, net.minecraft.network.packet.Packet207SetScore, net.minecraft.network.packet.Packet250CustomPayload, net.minecraft.network.packet.Packet132TileEntityData, net.minecraft.network.packet.Packet53BlockChange, net.minecraft.network.packet.Packet104WindowItems, net.minecraft.network.packet.Packet14BlockDig, net.minecraft.network.packet.Packet54PlayNoteBlock, net.minecraft.network.packet.Packet55BlockDestroy, net.minecraft.network.packet.Packet130UpdateSign, net.minecraft.network.packet.Packet41EntityEffect, net.minecraft.network.packet.Packet204ClientInfo, net.minecraft.network.packet.Packet71Weather, net.minecraft.network.packet.Packet131MapData, net.minecraft.network.packet.Packet25EntityPainting, net.minecraft.network.packet.Packet61DoorChange, net.minecraft.network.packet.Packet26EntityExpOrb, net.minecraft.network.packet.Packet3Chat, net.minecraft.network.packet.Packet30Entity, net.minecraft.network.packet.Packet7UseEntity, net.minecraft.network.packet.Packet17Sleep, net.minecraft.network.packet.Packet252SharedKey, net.minecraft.network.packet.Packet208SetDisplayObjective, net.minecraft.network.packet.Packet40EntityMetadata, net.minecraft.network.packet.Packet5PlayerInventory, net.minecraft.network.packet.Packet2ClientProtocol, net.minecraft.network.packet.Packet70GameEvent, net.minecraft.network.packet.Packet206SetObjective, net.minecraft.network.packet.Packet39AttachEntity, net.minecraft.network.packet.Packet43Experience, net.minecraft.network.packet.Packet6SpawnPosition, net.minecraft.network.packet.Packet8UpdateHealth, net.minecraft.network.packet.Packet10Flying, net.minecraft.network.packet.Packet253ServerAuthData, net.minecraft.network.packet.Packet19EntityAction, net.minecraft.network.packet.Packet201PlayerInfo, net.minecraft.network.packet.Packet29DestroyEntity, net.minecraft.network.packet.Packet42RemoveEntityEffect, net.minecraft.network.packet.Packet102WindowClick, net.minecraft.network.packet.Packet22Collect, net.minecraft.network.packet.Packet4UpdateTime, net.minecraft.network.packet.Packet18Animation, net.minecraft.network.packet.Packet205ClientCommand, net.minecraft.network.packet.Packet38EntityStatus, net.minecraft.network.packet.Packet203AutoComplete, net.minecraft.network.packet.Packet35EntityHeadRotation, net.minecraft.network.packet.Packet16BlockItemSwitch, net.minecraft.network.packet.Packet255KickDisconnect, net.minecraft.network.packet.Packet9Respawn, net.minecraft.network.packet.Packet105UpdateProgressbar, net.minecraft.network.packet.Packet254ServerPing, net.minecraft.network.packet.Packet100OpenWindow, net.minecraft.network.packet.Packet103SetSlot, net.minecraft.network.packet.Packet108EnchantItem, net.minecraft.network.packet.Packet107CreativeSetSlot, net.minecraft.network.packet.Packet106Transaction, net.minecraft.network.packet.Packet200Statistic, net.minecraft.network.packet.Packet0KeepAlive, and net.minecraft.network.packet.Packet101CloseWindow.
|
static |
the first short in the stream indicates the number of bytes to read
|
static |
Reads a ItemStack from the InputStream
|
static |
Reads a compressed NBTTagCompound from the InputStream
|
static |
Read a packet, prefixed by its ID, from the data stream.
|
pure virtual |
Abstract. Reads the raw packet data from the data stream.
Implemented in net.minecraft.network.packet.Packet23VehicleSpawn, net.minecraft.network.packet.Packet24MobSpawn, net.minecraft.network.packet.Packet56MapChunks, net.minecraft.network.packet.Packet51MapChunk, net.minecraft.network.packet.Packet209SetPlayerTeam, net.minecraft.network.packet.Packet52MultiBlockChange, net.minecraft.network.packet.Packet28EntityVelocity, net.minecraft.network.packet.Packet20NamedEntitySpawn, net.minecraft.network.packet.Packet10Flying, net.minecraft.network.packet.Packet1Login, net.minecraft.network.packet.Packet34EntityTeleport, net.minecraft.network.packet.Packet62LevelSound, net.minecraft.network.packet.Packet102WindowClick, net.minecraft.network.packet.Packet60Explosion, net.minecraft.network.packet.Packet63WorldParticles, net.minecraft.network.packet.Packet15Place, net.minecraft.network.packet.Packet207SetScore, net.minecraft.network.packet.Packet9Respawn, net.minecraft.network.packet.Packet105UpdateProgressbar, net.minecraft.network.packet.Packet132TileEntityData, net.minecraft.network.packet.Packet202PlayerAbilities, net.minecraft.network.packet.Packet53BlockChange, net.minecraft.network.packet.Packet100OpenWindow, net.minecraft.network.packet.Packet3Chat, net.minecraft.network.packet.Packet14BlockDig, net.minecraft.network.packet.Packet30Entity, net.minecraft.network.packet.Packet41EntityEffect, net.minecraft.network.packet.Packet55BlockDestroy, net.minecraft.network.packet.Packet103SetSlot, net.minecraft.network.packet.Packet250CustomPayload, net.minecraft.network.packet.Packet54PlayNoteBlock, net.minecraft.network.packet.Packet108EnchantItem, net.minecraft.network.packet.Packet131MapData, net.minecraft.network.packet.Packet104WindowItems, net.minecraft.network.packet.Packet252SharedKey, net.minecraft.network.packet.Packet71Weather, net.minecraft.network.packet.Packet107CreativeSetSlot, net.minecraft.network.packet.Packet208SetDisplayObjective, net.minecraft.network.packet.Packet40EntityMetadata, net.minecraft.network.packet.Packet7UseEntity, net.minecraft.network.packet.Packet106Transaction, net.minecraft.network.packet.Packet204ClientInfo, net.minecraft.network.packet.Packet26EntityExpOrb, net.minecraft.network.packet.Packet25EntityPainting, net.minecraft.network.packet.Packet5PlayerInventory, net.minecraft.network.packet.Packet61DoorChange, net.minecraft.network.packet.Packet70GameEvent, net.minecraft.network.packet.Packet39AttachEntity, net.minecraft.network.packet.Packet130UpdateSign, net.minecraft.network.packet.Packet13PlayerLookMove, net.minecraft.network.packet.Packet200Statistic, net.minecraft.network.packet.Packet11PlayerPosition, net.minecraft.network.packet.Packet17Sleep, net.minecraft.network.packet.Packet19EntityAction, net.minecraft.network.packet.Packet206SetObjective, net.minecraft.network.packet.Packet2ClientProtocol, net.minecraft.network.packet.Packet43Experience, net.minecraft.network.packet.Packet6SpawnPosition, net.minecraft.network.packet.Packet8UpdateHealth, net.minecraft.network.packet.Packet0KeepAlive, net.minecraft.network.packet.Packet101CloseWindow, net.minecraft.network.packet.Packet253ServerAuthData, net.minecraft.network.packet.Packet12PlayerLook, net.minecraft.network.packet.Packet201PlayerInfo, net.minecraft.network.packet.Packet33RelEntityMoveLook, net.minecraft.network.packet.Packet205ClientCommand, net.minecraft.network.packet.Packet42RemoveEntityEffect, net.minecraft.network.packet.Packet22Collect, net.minecraft.network.packet.Packet4UpdateTime, net.minecraft.network.packet.Packet18Animation, net.minecraft.network.packet.Packet203AutoComplete, net.minecraft.network.packet.Packet32EntityLook, net.minecraft.network.packet.Packet38EntityStatus, net.minecraft.network.packet.Packet35EntityHeadRotation, net.minecraft.network.packet.Packet16BlockItemSwitch, net.minecraft.network.packet.Packet255KickDisconnect, net.minecraft.network.packet.Packet29DestroyEntity, net.minecraft.network.packet.Packet31RelEntityMove, and net.minecraft.network.packet.Packet254ServerPing.
|
static |
Reads a string from a packet
String net.minecraft.network.packet.Packet.toString | ( | ) |
|
static |
Writes a byte array to the DataOutputStream
|
static |
Writes the ItemStack's ID (short), then size (byte), then damage. (short)
|
staticprotected |
Writes a compressed NBTTagCompound to the OutputStream
|
static |
Writes a packet, prefixed by its ID, to the data stream.
|
pure virtual |
Abstract. Writes the raw packet data to the data stream.
Implemented in net.minecraft.network.packet.Packet56MapChunks, net.minecraft.network.packet.Packet51MapChunk, net.minecraft.network.packet.Packet23VehicleSpawn, net.minecraft.network.packet.Packet24MobSpawn, net.minecraft.network.packet.Packet209SetPlayerTeam, net.minecraft.network.packet.Packet52MultiBlockChange, net.minecraft.network.packet.Packet1Login, net.minecraft.network.packet.Packet60Explosion, net.minecraft.network.packet.Packet20NamedEntitySpawn, net.minecraft.network.packet.Packet28EntityVelocity, net.minecraft.network.packet.Packet34EntityTeleport, net.minecraft.network.packet.Packet62LevelSound, net.minecraft.network.packet.Packet102WindowClick, net.minecraft.network.packet.Packet10Flying, net.minecraft.network.packet.Packet63WorldParticles, net.minecraft.network.packet.Packet9Respawn, net.minecraft.network.packet.Packet15Place, net.minecraft.network.packet.Packet207SetScore, net.minecraft.network.packet.Packet202PlayerAbilities, net.minecraft.network.packet.Packet132TileEntityData, net.minecraft.network.packet.Packet53BlockChange, net.minecraft.network.packet.Packet100OpenWindow, net.minecraft.network.packet.Packet105UpdateProgressbar, net.minecraft.network.packet.Packet250CustomPayload, net.minecraft.network.packet.Packet14BlockDig, net.minecraft.network.packet.Packet54PlayNoteBlock, net.minecraft.network.packet.Packet55BlockDestroy, net.minecraft.network.packet.Packet104WindowItems, net.minecraft.network.packet.Packet41EntityEffect, net.minecraft.network.packet.Packet3Chat, net.minecraft.network.packet.Packet103SetSlot, net.minecraft.network.packet.Packet131MapData, net.minecraft.network.packet.Packet204ClientInfo, net.minecraft.network.packet.Packet30Entity, net.minecraft.network.packet.Packet71Weather, net.minecraft.network.packet.Packet108EnchantItem, net.minecraft.network.packet.Packet130UpdateSign, net.minecraft.network.packet.Packet25EntityPainting, net.minecraft.network.packet.Packet26EntityExpOrb, net.minecraft.network.packet.Packet61DoorChange, net.minecraft.network.packet.Packet13PlayerLookMove, net.minecraft.network.packet.Packet252SharedKey, net.minecraft.network.packet.Packet7UseEntity, net.minecraft.network.packet.Packet106Transaction, net.minecraft.network.packet.Packet107CreativeSetSlot, net.minecraft.network.packet.Packet208SetDisplayObjective, net.minecraft.network.packet.Packet40EntityMetadata, net.minecraft.network.packet.Packet5PlayerInventory, net.minecraft.network.packet.Packet11PlayerPosition, net.minecraft.network.packet.Packet17Sleep, net.minecraft.network.packet.Packet70GameEvent, net.minecraft.network.packet.Packet2ClientProtocol, net.minecraft.network.packet.Packet33RelEntityMoveLook, net.minecraft.network.packet.Packet39AttachEntity, net.minecraft.network.packet.Packet200Statistic, net.minecraft.network.packet.Packet206SetObjective, net.minecraft.network.packet.Packet43Experience, net.minecraft.network.packet.Packet6SpawnPosition, net.minecraft.network.packet.Packet8UpdateHealth, net.minecraft.network.packet.Packet19EntityAction, net.minecraft.network.packet.Packet253ServerAuthData, net.minecraft.network.packet.Packet12PlayerLook, net.minecraft.network.packet.Packet201PlayerInfo, net.minecraft.network.packet.Packet0KeepAlive, net.minecraft.network.packet.Packet101CloseWindow, net.minecraft.network.packet.Packet42RemoveEntityEffect, net.minecraft.network.packet.Packet205ClientCommand, net.minecraft.network.packet.Packet22Collect, net.minecraft.network.packet.Packet29DestroyEntity, net.minecraft.network.packet.Packet32EntityLook, net.minecraft.network.packet.Packet4UpdateTime, net.minecraft.network.packet.Packet18Animation, net.minecraft.network.packet.Packet38EntityStatus, net.minecraft.network.packet.Packet203AutoComplete, net.minecraft.network.packet.Packet31RelEntityMove, net.minecraft.network.packet.Packet35EntityHeadRotation, net.minecraft.network.packet.Packet16BlockItemSwitch, net.minecraft.network.packet.Packet254ServerPing, and net.minecraft.network.packet.Packet255KickDisconnect.
|
static |
Writes a String to the DataOutputStream
final long net.minecraft.network.packet.Packet.creationTimeMillis = System.currentTimeMillis() |
the system time in milliseconds when this packet was created.
|
protected |
boolean net.minecraft.network.packet.Packet.isChunkDataPacket = false |
Only true for Packet51MapChunk, Packet52MultiBlockChange, Packet53BlockChange and Packet59ComplexEntity. Used to separate them into a different send queue.
|
static |
Maps packet id to packet class
|
static |
|
static |
|
static |
Assumed to be sequential by the profiler.
|
static |