Example #1
0
  public static void writePosition(NetOutput out, Position pos) throws IOException {
    long x = pos.getX() & POSITION_WRITE_SHIFT;
    long y = pos.getY() & POSITION_Y_SHIFT;
    long z = pos.getZ() & POSITION_WRITE_SHIFT;

    out.writeLong(x << POSITION_X_SIZE | y << POSITION_Y_SIZE | z);
  }
 @Override
 public void write(NetOutput out) throws IOException {
   out.writeLong(this.time);
 }