Class ModelIdentifier

java.lang.Object
net.minecraft.util.Identifier
net.minecraft.client.util.ModelIdentifier
All Implemented Interfaces:
Comparable<Identifier>

@Environment(CLIENT)
public class ModelIdentifier
extends Identifier
  • Field Details

    • variant

      private final String variant
  • Constructor Details

    • ModelIdentifier

      protected ModelIdentifier​(String[] id)
    • ModelIdentifier

      public ModelIdentifier​(String id)

      Takes a string of the form <namespace>:<path>, for example minecraft:iron_ingot.

      The string will be split (on the :) into an identifier with the specified path and namespace.

      Prefer using the Identifier(java.lang.String, java.lang.String) constructor that takes the namespace and path as individual parameters to avoid mistakes.
      Throws:
      InvalidIdentifierException - if the string cannot be parsed as an identifier.
    • ModelIdentifier

      public ModelIdentifier​(Identifier id, String variant)
    • ModelIdentifier

      public ModelIdentifier​(String namespace, String path)
  • Method Details