mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 11:59:25 +00:00
More work, moved over packet stuff, need to change everything to use new NetworkMod system
This commit is contained in:
1 parent
8db1584730
commit
4e91293271
14 files changed
+250
-160
No files matched your search
@@ -0,0 +1,44 @@
|
||||
package net.minecraftforge.packets;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketEntityTrack extends ForgePacket
|
||||
{
|
||||
public int entityId;
|
||||
public int serverPosX;
|
||||
public int serverPosY;
|
||||
public int serverPosZ;
|
||||
|
||||
public PacketEntityTrack(){}
|
||||
public PacketEntityTrack(int entityId, int serverPosX, int serverPosY, int serverPosZ)
|
||||
{
|
||||
this.entityId = entityId;
|
||||
this.serverPosX = serverPosX;
|
||||
this.serverPosY = serverPosY;
|
||||
this.serverPosZ = serverPosZ;
|
||||
}
|
||||
|
||||
public void writeData(DataOutputStream data) throws IOException
|
||||
{
|
||||
data.writeInt(entityId);
|
||||
data.writeInt(serverPosX);
|
||||
data.writeInt(serverPosY);
|
||||
data.writeInt(serverPosZ);
|
||||
}
|
||||
|
||||
public void readData(DataInputStream data) throws IOException
|
||||
{
|
||||
entityId = data.readInt();
|
||||
serverPosX = data.readInt();
|
||||
serverPosY = data.readInt();
|
||||
serverPosZ = data.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getID()
|
||||
{
|
||||
return ForgePacket.TRACK;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user