Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package melonslise.runicinscription.common.network;
- import cpw.mods.fml.common.network.simpleimpl.IMessage;
- import io.netty.buffer.ByteBuf;
- public class MessageGrid implements IMessage
- {
- private boolean grid;
- private int posX;
- private int posY;
- public MessageGrid(boolean grid, int posX, int posY)
- {
- this.grid = grid;
- this.posX = posX;
- this.posY = posY;
- }
- @Override
- public void fromBytes(ByteBuf buf)
- {
- buf.writeBoolean(grid);
- buf.writeInt(posX);
- buf.writeInt(posY);
- }
- @Override
- public void toBytes(ByteBuf buf)
- {
- grid = buf.readBoolean();
- posX = buf.readInt();
- posY = buf.readInt();
- }
- public boolean getGrid()
- {
- return this.grid;
- }
- public int getPosX()
- {
- return this.posX;
- }
- public int getPosY()
- {
- return this.posY;
- }
- }
Add Comment
Please, Sign In to add comment