From 95a9a693534f2368bcb06fee4ec6c67f15cd40b1 Mon Sep 17 00:00:00 2001 From: Josiah Glosson Date: Fri, 14 Jun 2024 17:16:19 -0400 Subject: [PATCH] Fix build --- .../io/github/gaming32/worldhost/ResourceLocations.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) {