Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestMessage implements IMessage {
- public int posX, posY, posZ;
- public TestMessage() {}
- public TestMessage(int i, int j, int k) {
- this.posX = i;
- this.posY = j;
- this.posZ = k;
- }
- @Override
- public void toBytes(ByteBuf buf) {
- buf.writeInt(posX);
- buf.writeInt(posY);
- buf.writeInt(posZ);
- }
- @Override
- public void fromBytes(ByteBuf buf) {
- this.posX = buf.readInt();
- this.posY = buf.readInt();
- this.posZ = buf.readInt();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement