Class ResourceLocation

java.lang.Object
net.minecraft.util.ResourceLocation
All Implemented Interfaces:
Comparable<ResourceLocation>
Direct Known Subclasses:
ModelResourceLocation

public class ResourceLocation extends Object implements Comparable<ResourceLocation>
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<ResourceLocation> CODEC
    • ERROR_INVALID

      private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INVALID
    • namespace

      protected final String namespace
    • path

      protected final String path
  • Constructor Details

    • ResourceLocation

      protected ResourceLocation(String[] p_i47923_1_)
    • ResourceLocation

      public ResourceLocation(String p_i1293_1_)
    • ResourceLocation

      public ResourceLocation(String p_i1292_1_, String p_i1292_2_)
  • Method Details

    • of

      public static ResourceLocation of(String p_195828_0_, char p_195828_1_)
    • tryParse

      @Nullable public static ResourceLocation tryParse(String p_208304_0_)
    • decompose

      protected static String[] decompose(String p_195823_0_, char p_195823_1_)
    • read

      private static com.mojang.serialization.DataResult<ResourceLocation> read(String p_240911_0_)
    • getPath

      public String getPath()
    • getNamespace

      public String getNamespace()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object p_equals_1_)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(ResourceLocation p_compareTo_1_)
      Specified by:
      compareTo in interface Comparable<ResourceLocation>
    • compareNamespaced

      public int compareNamespaced(ResourceLocation o)
    • read

      public static ResourceLocation read(com.mojang.brigadier.StringReader p_195826_0_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • isAllowedInResourceLocation

      public static boolean isAllowedInResourceLocation(char p_195824_0_)
    • isValidPath

      private static boolean isValidPath(String p_217856_0_)
    • isValidNamespace

      private static boolean isValidNamespace(String p_217858_0_)
    • validPathChar

      public static boolean validPathChar(char p_240909_0_)
    • validNamespaceChar

      private static boolean validNamespaceChar(char p_240910_0_)
    • isValidResourceLocation

      public static boolean isValidResourceLocation(String p_217855_0_)