remove java 17
This commit is contained in:
parent
10dd4afc19
commit
c7375def17
4 changed files with 58 additions and 7 deletions
|
@ -1,8 +1,4 @@
|
||||||
|
|
||||||
// jdk 17
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
implementation 'com.squareup:javapoet:1.13.0'
|
implementation 'com.squareup:javapoet:1.13.0'
|
||||||
|
|
|
@ -1,4 +1,20 @@
|
||||||
package me.tofaa.entitylib.codegen;
|
package me.tofaa.entitylib.codegen;
|
||||||
|
|
||||||
public record MetaOffset(String name, VersionCheck[] checks) {
|
public final class MetaOffset {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private VersionCheck[] checks;
|
||||||
|
|
||||||
|
public MetaOffset(String name, VersionCheck[] checks) {
|
||||||
|
this.name = name;
|
||||||
|
this.checks = checks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String name() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VersionCheck[] checks() {
|
||||||
|
return checks;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,21 @@
|
||||||
package me.tofaa.entitylib.codegen;
|
package me.tofaa.entitylib.codegen;
|
||||||
|
|
||||||
public record TypeHolder(String className, MetaOffset[] offsets) {
|
public final class TypeHolder {
|
||||||
|
|
||||||
|
private String className;
|
||||||
|
private MetaOffset[] offsets;
|
||||||
|
|
||||||
|
public TypeHolder(String className, MetaOffset[] offsets) {
|
||||||
|
this.className = className;
|
||||||
|
this.offsets = offsets;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String className() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MetaOffset[] offsets() {
|
||||||
|
return offsets;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,26 @@
|
||||||
package me.tofaa.entitylib.codegen;
|
package me.tofaa.entitylib.codegen;
|
||||||
|
|
||||||
public record VersionCheck(int from, int to, byte offset) {
|
public final class VersionCheck {
|
||||||
|
|
||||||
|
private int from;
|
||||||
|
private int to;
|
||||||
|
private byte offset;
|
||||||
|
|
||||||
|
public VersionCheck(int from, int to, byte offset) {
|
||||||
|
this.from = from;
|
||||||
|
this.to = to;
|
||||||
|
this.offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int from() {
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int to() {
|
||||||
|
return to;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte offset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue