// automatically generated by the FlatBuffers compiler, do not modify

package com.riiablo.net.packet.d2gs;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class RunToLocation extends Table {
  public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); }
  public static RunToLocation getRootAsRunToLocation(ByteBuffer _bb) { return getRootAsRunToLocation(_bb, new RunToLocation()); }
  public static RunToLocation getRootAsRunToLocation(ByteBuffer _bb, RunToLocation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
  public RunToLocation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public short x() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) : 0; }
  public short y() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) : 0; }

  public static int createRunToLocation(FlatBufferBuilder builder,
      short x,
      short y) {
    builder.startTable(2);
    RunToLocation.addY(builder, y);
    RunToLocation.addX(builder, x);
    return RunToLocation.endRunToLocation(builder);
  }

  public static void startRunToLocation(FlatBufferBuilder builder) { builder.startTable(2); }
  public static void addX(FlatBufferBuilder builder, short x) { builder.addShort(0, x, 0); }
  public static void addY(FlatBufferBuilder builder, short y) { builder.addShort(1, y, 0); }
  public static int endRunToLocation(FlatBufferBuilder builder) {
    int o = builder.endTable();
    return o;
  }

  public static final class Vector extends BaseVector {
    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

    public RunToLocation get(int j) { return get(new RunToLocation(), j); }
    public RunToLocation get(RunToLocation obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
  }
}

