-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletion
18
code-gen/src/main/java/me/tofaa/entitylib/codegen/MetaOffset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
19 changes: 18 additions & 1 deletion
19
code-gen/src/main/java/me/tofaa/entitylib/codegen/TypeHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
24 changes: 23 additions & 1 deletion
24
code-gen/src/main/java/me/tofaa/entitylib/codegen/VersionCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |