Class LocationUtils
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.util.LocationUtils
A series of utilities for modifying
ResourceLocations-
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.datafixers.util.Pair<String, net.minecraft.resources.ResourceLocation> separatePrefix(net.minecraft.resources.ResourceLocation location) Separates a prefixed location into its first prefix and the rest of the location.static com.mojang.datafixers.util.Pair<String, net.minecraft.resources.ResourceLocation> separateSuffix(net.minecraft.resources.ResourceLocation location) Separates the extension of a location from the rest of the path.
-
Method Details
-
separatePrefix
public static com.mojang.datafixers.util.Pair<String,net.minecraft.resources.ResourceLocation> separatePrefix(net.minecraft.resources.ResourceLocation location) Separates a prefixed location into its first prefix and the rest of the location.- Parameters:
location- The location to separate.- Returns:
- A pair of the first prefix and the rest of the location.
-
separateSuffix
public static com.mojang.datafixers.util.Pair<String,net.minecraft.resources.ResourceLocation> separateSuffix(net.minecraft.resources.ResourceLocation location) Separates the extension of a location from the rest of the path.- Parameters:
location- The location to separate.- Returns:
- A pair of the extension and the location without the extension.
-