Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jun 14, 2024
1 parent c24d4e0 commit 95a9a69
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
Expand All @@ -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) {
Expand Down

0 comments on commit 95a9a69

Please sign in to comment.