Class LocationUtils

java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.util.LocationUtils

public final class LocationUtils extends Object
A series of utilities for modifying ResourceLocations
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.