diff --git a/src/main/java/io/github/gaming32/worldhost/ResourceLocations.java b/src/main/java/io/github/gaming32/worldhost/ResourceLocations.java index 874d40e..2ddf700 100644 --- a/src/main/java/io/github/gaming32/worldhost/ResourceLocations.java +++ b/src/main/java/io/github/gaming32/worldhost/ResourceLocations.java @@ -3,7 +3,10 @@ import net.minecraft.resources.ResourceLocation; public final class ResourceLocations { - private static final ResourceLocation WORLD_HOST_TEMPLATE = namespaced("world-host", ""); + private static final String WORLD_HOST_NAMESPACE = "world-host"; + //#if MC >= 1.19.4 + private static final ResourceLocation WORLD_HOST_TEMPLATE = namespaced(WORLD_HOST_NAMESPACE, ""); + //#endif private ResourceLocations() { } @@ -17,7 +20,11 @@ public static ResourceLocation minecraft(String path) { } public static ResourceLocation worldHost(String path) { + //#if MC >= 1.19.4 return WORLD_HOST_TEMPLATE.withPath(path); + //#else + //$$ return new ResourceLocation(WORLD_HOST_NAMESPACE, path); + //#endif } public static ResourceLocation namespaced(String namespace, String path) {