Skip to content

Commit

Permalink
remove java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofaa2 committed Feb 17, 2024
1 parent 10dd4af commit c7375de
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 7 deletions.
4 changes: 0 additions & 4 deletions code-gen/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

// jdk 17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.squareup:javapoet:1.13.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
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;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
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;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
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;
}
}

0 comments on commit c7375de

Please sign in to comment.