39 lines
933 B
Java
Executable file
39 lines
933 B
Java
Executable file
package proxy.packet;
|
|
|
|
import java.io.IOException;
|
|
|
|
import proxy.network.ProxyHandler;
|
|
import proxy.network.Packet;
|
|
import proxy.network.PacketBuffer;
|
|
|
|
public class S0BPacketAnimation implements Packet<ProxyHandler>
|
|
{
|
|
private int entityId;
|
|
private int type;
|
|
|
|
/**
|
|
* Reads the raw packet data from the data stream.
|
|
*/
|
|
public void readPacketData(PacketBuffer buf) throws IOException
|
|
{
|
|
this.entityId = buf.readVarIntFromBuffer();
|
|
this.type = buf.readUnsignedByte();
|
|
}
|
|
|
|
/**
|
|
* Writes the raw packet data to the data stream.
|
|
*/
|
|
public void writePacketData(PacketBuffer buf) throws IOException
|
|
{
|
|
buf.writeVarIntToBuffer(this.entityId);
|
|
buf.writeByte(this.type);
|
|
}
|
|
|
|
/**
|
|
* Passes this Packet on to the NetHandler for processing.
|
|
*/
|
|
public void processPacket(ProxyHandler handler)
|
|
{
|
|
handler.handleAnimation(this);
|
|
}
|
|
}
|