diff options
| author | isXander <xander@isxander.dev> | 2024-05-29 22:42:46 +0100 |
|---|---|---|
| committer | isXander <xander@isxander.dev> | 2024-05-29 22:42:46 +0100 |
| commit | 646c7bac69dba476b3f9171568091eb23a86edaa (patch) | |
| tree | 83727744315b956120fb573f9ecd883837b63099 /src/main/java/dev/isxander/yacl3/platform | |
| parent | 41253828df7c2066b5df29a32aa8e512f34ad85a (diff) | |
| download | YetAnotherConfigLib-646c7bac69dba476b3f9171568091eb23a86edaa.tar.gz YetAnotherConfigLib-646c7bac69dba476b3f9171568091eb23a86edaa.tar.bz2 YetAnotherConfigLib-646c7bac69dba476b3f9171568091eb23a86edaa.zip | |
1.21 compat
Diffstat (limited to 'src/main/java/dev/isxander/yacl3/platform')
| -rw-r--r-- | src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java b/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java index bfb0586..e330324 100644 --- a/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java +++ b/src/main/java/dev/isxander/yacl3/platform/YACLPlatform.java @@ -14,8 +14,28 @@ import net.minecraft.resources.ResourceLocation; import java.nio.file.Path; public final class YACLPlatform { + public static ResourceLocation parseRl(String rl) { + /*? if >1.20.6 {*//* + return ResourceLocation.parse(rl); + *//*?} else {*/ + return new ResourceLocation(rl); + /*?}*/ + } + public static ResourceLocation rl(String path) { - return new ResourceLocation("yet_another_config_lib_v3", path); + return rl("yet_another_config_lib_v3", path); + } + + public static ResourceLocation mcRl(String path) { + return rl("minecraft", path); + } + + public static ResourceLocation rl(String namespace, String path) { + /*? if >1.20.6 {*//* + return ResourceLocation.fromNamespaceAndPath(namespace, path); + *//*?} else {*/ + return new ResourceLocation(namespace, path); + /*?}*/ } public static Env getEnvironment() { |
