Skip to content

Commit

Permalink
Upgraded to Flatbuffers 1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
collinsmith committed Dec 12, 2019
1 parent e4df005 commit 5ac92a1
Show file tree
Hide file tree
Showing 31 changed files with 220 additions and 41 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -210,7 +210,7 @@ project(":core") {
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
compile group: 'com.jcraft', name: 'jzlib', version: '1.1.3'
compile group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '1.9.0'
compile group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '1.11.0'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/bncs/BNCS.java
Expand Up @@ -12,7 +12,7 @@
public final class BNCS extends Table {
public static BNCS getRootAsBNCS(ByteBuffer _bb) { return getRootAsBNCS(_bb, new BNCS()); }
public static BNCS getRootAsBNCS(ByteBuffer _bb, BNCS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public BNCS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
Expand Down
11 changes: 5 additions & 6 deletions core/gen/com/riiablo/net/packet/bncs/ChatEvent.java
Expand Up @@ -2,17 +2,16 @@

package com.riiablo.net.packet.bncs;

import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;

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

@SuppressWarnings("unused")
public final class ChatEvent extends Table {
public static ChatEvent getRootAsChatEvent(ByteBuffer _bb) { return getRootAsChatEvent(_bb, new ChatEvent()); }
public static ChatEvent getRootAsChatEvent(ByteBuffer _bb, ChatEvent obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ChatEvent __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte eid() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 19; }
Expand Down
11 changes: 5 additions & 6 deletions core/gen/com/riiablo/net/packet/bnls/BNLS.java
Expand Up @@ -2,17 +2,16 @@

package com.riiablo.net.packet.bnls;

import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;

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

@SuppressWarnings("unused")
public final class BNLS extends Table {
public static BNLS getRootAsBNLS(ByteBuffer _bb) { return getRootAsBNLS(_bb, new BNLS()); }
public static BNLS getRootAsBNLS(ByteBuffer _bb, BNLS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public BNLS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
Expand Down
Expand Up @@ -11,7 +11,7 @@
public final class ConnectionAccepted extends Table {
public static ConnectionAccepted getRootAsConnectionAccepted(ByteBuffer _bb) { return getRootAsConnectionAccepted(_bb, new ConnectionAccepted()); }
public static ConnectionAccepted getRootAsConnectionAccepted(ByteBuffer _bb, ConnectionAccepted obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ConnectionAccepted __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }


Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/bnls/ConnectionClosed.java
Expand Up @@ -11,7 +11,7 @@
public final class ConnectionClosed extends Table {
public static ConnectionClosed getRootAsConnectionClosed(ByteBuffer _bb) { return getRootAsConnectionClosed(_bb, new ConnectionClosed()); }
public static ConnectionClosed getRootAsConnectionClosed(ByteBuffer _bb, ConnectionClosed obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ConnectionClosed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String reason() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/bnls/LoginResponse.java
Expand Up @@ -11,7 +11,7 @@
public final class LoginResponse extends Table {
public static LoginResponse getRootAsLoginResponse(ByteBuffer _bb) { return getRootAsLoginResponse(_bb, new LoginResponse()); }
public static LoginResponse getRootAsLoginResponse(ByteBuffer _bb, LoginResponse obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public LoginResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String username() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/bnls/QueryRealms.java
Expand Up @@ -11,7 +11,7 @@
public final class QueryRealms extends Table {
public static QueryRealms getRootAsQueryRealms(ByteBuffer _bb) { return getRootAsQueryRealms(_bb, new QueryRealms()); }
public static QueryRealms getRootAsQueryRealms(ByteBuffer _bb, QueryRealms obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public QueryRealms __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public Realm realms(int j) { return realms(new Realm(), j); }
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/bnls/Realm.java
Expand Up @@ -11,7 +11,7 @@
public final class Realm extends Table {
public static Realm getRootAsRealm(ByteBuffer _bb) { return getRootAsRealm(_bb, new Realm()); }
public static Realm getRootAsRealm(ByteBuffer _bb, Realm obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public Realm __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
Expand Down
38 changes: 38 additions & 0 deletions core/gen/com/riiablo/net/packet/d2gs/CofAlphas.java
@@ -0,0 +1,38 @@
// 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 CofAlphas extends Table {
public static CofAlphas getRootAsCofAlphas(ByteBuffer _bb) { return getRootAsCofAlphas(_bb, new CofAlphas()); }
public static CofAlphas getRootAsCofAlphas(ByteBuffer _bb, CofAlphas obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public CofAlphas __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public float alpha(int j) { int o = __offset(4); return o != 0 ? bb.getFloat(__vector(o) + j * 4) : 0; }
public int alphaLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer alphaAsByteBuffer() { return __vector_as_bytebuffer(4, 4); }
public ByteBuffer alphaInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 4); }

public static int createCofAlphas(FlatBufferBuilder builder,
int alphaOffset) {
builder.startObject(1);
CofAlphas.addAlpha(builder, alphaOffset);
return CofAlphas.endCofAlphas(builder);
}

public static void startCofAlphas(FlatBufferBuilder builder) { builder.startObject(1); }
public static void addAlpha(FlatBufferBuilder builder, int alphaOffset) { builder.addOffset(0, alphaOffset, 0); }
public static int createAlphaVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); }
public static void startAlphaVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static int endCofAlphas(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}

38 changes: 38 additions & 0 deletions core/gen/com/riiablo/net/packet/d2gs/CofComponents.java
@@ -0,0 +1,38 @@
// 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 CofComponents extends Table {
public static CofComponents getRootAsCofComponents(ByteBuffer _bb) { return getRootAsCofComponents(_bb, new CofComponents()); }
public static CofComponents getRootAsCofComponents(ByteBuffer _bb, CofComponents obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public CofComponents __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int component(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
public int componentLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer componentAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer componentInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }

public static int createCofComponents(FlatBufferBuilder builder,
int componentOffset) {
builder.startObject(1);
CofComponents.addComponent(builder, componentOffset);
return CofComponents.endCofComponents(builder);
}

public static void startCofComponents(FlatBufferBuilder builder) { builder.startObject(1); }
public static void addComponent(FlatBufferBuilder builder, int componentOffset) { builder.addOffset(0, componentOffset, 0); }
public static int createComponentVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); }
public static void startComponentVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static int endCofComponents(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}

38 changes: 38 additions & 0 deletions core/gen/com/riiablo/net/packet/d2gs/CofTransforms.java
@@ -0,0 +1,38 @@
// 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 CofTransforms extends Table {
public static CofTransforms getRootAsCofTransforms(ByteBuffer _bb) { return getRootAsCofTransforms(_bb, new CofTransforms()); }
public static CofTransforms getRootAsCofTransforms(ByteBuffer _bb, CofTransforms obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public CofTransforms __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int transform(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
public int transformLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer transformAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer transformInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }

public static int createCofTransforms(FlatBufferBuilder builder,
int transformOffset) {
builder.startObject(1);
CofTransforms.addTransform(builder, transformOffset);
return CofTransforms.endCofTransforms(builder);
}

public static void startCofTransforms(FlatBufferBuilder builder) { builder.startObject(1); }
public static void addTransform(FlatBufferBuilder builder, int transformOffset) { builder.addOffset(0, transformOffset, 0); }
public static int createTransformVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); }
public static void startTransformVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static int endCofTransforms(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}

11 changes: 5 additions & 6 deletions core/gen/com/riiablo/net/packet/d2gs/Connection.java
Expand Up @@ -2,17 +2,16 @@

package com.riiablo.net.packet.d2gs;

import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;

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

@SuppressWarnings("unused")
public final class Connection extends Table {
public static Connection getRootAsConnection(ByteBuffer _bb) { return getRootAsConnection(_bb, new Connection()); }
public static Connection getRootAsConnection(ByteBuffer _bb, Connection obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public Connection __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int charClass() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/d2gs/D2GS.java
Expand Up @@ -11,7 +11,7 @@
public final class D2GS extends Table {
public static D2GS getRootAsD2GS(ByteBuffer _bb) { return getRootAsD2GS(_bb, new D2GS()); }
public static D2GS getRootAsD2GS(ByteBuffer _bb, D2GS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public D2GS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
Expand Down
3 changes: 2 additions & 1 deletion core/gen/com/riiablo/net/packet/d2gs/D2GSData.java
Expand Up @@ -10,8 +10,9 @@ private D2GSData() { }
public static final byte RunToLocation = 3;
public static final byte RunToEntity = 4;
public static final byte Connection = 5;
public static final byte Sync = 6;

public static final String[] names = { "NONE", "WalkToLocation", "WalkToEntity", "RunToLocation", "RunToEntity", "Connection", };
public static final String[] names = { "NONE", "WalkToLocation", "WalkToEntity", "RunToLocation", "RunToEntity", "Connection", "Sync", };

public static String name(int e) { return names[e]; }
}
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/d2gs/RunToEntity.java
Expand Up @@ -11,7 +11,7 @@
public final class RunToEntity extends Table {
public static RunToEntity getRootAsRunToEntity(ByteBuffer _bb) { return getRootAsRunToEntity(_bb, new RunToEntity()); }
public static RunToEntity getRootAsRunToEntity(ByteBuffer _bb, RunToEntity obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public RunToEntity __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int type() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
Expand Down
2 changes: 1 addition & 1 deletion core/gen/com/riiablo/net/packet/d2gs/RunToLocation.java
Expand Up @@ -11,7 +11,7 @@
public final class RunToLocation extends Table {
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) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
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; }
Expand Down

0 comments on commit 5ac92a1

Please sign in to comment.