Guest User

Untitled

a guest
Oct 28th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package greatblitz.testmod.client.gui;
  2.  
  3. import io.netty.buffer.ByteBuf;
  4. import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
  5.  
  6. public class GuiMessage implements IMessage {
  7.  
  8. public int rf, gas, x, y, z;
  9. public GuiMessage() {}
  10.  
  11. public GuiMessage(int crf, int cgas, int cx, int cy, int cz) {
  12. rf = crf;
  13. gas = cgas;
  14. x = cx;
  15. y = cy;
  16. z = cz;
  17. }
  18.  
  19. @Override
  20. public void fromBytes(ByteBuf buf) {
  21. rf = buf.readInt();
  22. gas = buf.readInt();
  23. x = buf.readInt();
  24. y = buf.readInt();
  25. z = buf.readInt();
  26. }
  27.  
  28. @Override
  29. public void toBytes(ByteBuf buf) {
  30. buf.writeInt(rf);
  31. buf.writeInt(gas);
  32. buf.writeInt(x);
  33. buf.writeInt(y);
  34. buf.writeInt(z);
  35. }
  36.  
  37. }
Add Comment
Please, Sign In to add comment