-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
c9d800a
commit bcd42c1
Showing
16 changed files
with
367 additions
and
75 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
8 changes: 8 additions & 0 deletions
8
api/src/main/java/kr/toxicity/libraries/datacomponent/api/wrapper/CompoundTag.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package kr.toxicity.libraries.datacomponent.api.wrapper; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.Map; | ||
|
||
public record CompoundTag(@NotNull Map<String, Tag<?>> tags) { | ||
} |
12 changes: 12 additions & 0 deletions
12
api/src/main/java/kr/toxicity/libraries/datacomponent/api/wrapper/CustomData.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package kr.toxicity.libraries.datacomponent.api.wrapper; | ||
|
||
import kr.toxicity.libraries.datacomponent.api.Codec; | ||
import kr.toxicity.libraries.datacomponent.api.NMS; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public record CustomData(@NotNull CompoundTag tag) implements ComponentData<CustomData> { | ||
@Override | ||
public Codec<CustomData> codec() { | ||
return NMS.nms().entityData().codec(); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
api/src/main/java/kr/toxicity/libraries/datacomponent/api/wrapper/CustomModelData.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package kr.toxicity.libraries.datacomponent.api.wrapper; | ||
|
||
public record CustomModelData(int value) { | ||
} |
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
24 changes: 24 additions & 0 deletions
24
api/src/main/java/kr/toxicity/libraries/datacomponent/api/wrapper/Tag.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package kr.toxicity.libraries.datacomponent.api.wrapper; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.UUID; | ||
|
||
public record Tag<T>(@NotNull Type<T> type, @NotNull T value) { | ||
|
||
public static final Type<Byte> BYTE = new Type<>(Byte.class); | ||
public static final Type<Short> SHORT = new Type<>(Short.class); | ||
public static final Type<Integer> INT = new Type<>(Integer.class); | ||
public static final Type<Long> LONG = new Type<>(Long.class); | ||
public static final Type<UUID> UUID = new Type<>(UUID.class); | ||
public static final Type<Float> FLOAT = new Type<>(Float.class); | ||
public static final Type<String> STRING = new Type<>(String.class); | ||
public static final Type<Double> DOUBLE = new Type<>(Double.class); | ||
|
||
public static final Type<byte[]> BYTE_ARRAY = new Type<>(byte[].class); | ||
public static final Type<int[]> INT_ARRAY = new Type<>(int[].class); | ||
public static final Type<long[]> LONG_ARRAY = new Type<>(long[].class); | ||
|
||
public record Type<T>(@NotNull Class<T> valueType) { | ||
} | ||
} |
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
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
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
Oops, something went wrong.