Class ModelVariantMap

java.lang.Object
net.minecraft.client.render.model.json.ModelVariantMap

@Environment(CLIENT) public class ModelVariantMap extends Object
Mappings:
Namespace Name
named net/minecraft/client/render/model/json/ModelVariantMap
intermediary net/minecraft/class_790
official gfw
  • Field Details

    • variantMap

      private final Map<String,WeightedUnbakedModel> variantMap
      Mappings:
      Namespace Name Mixin selector
      named variantMap Lnet/minecraft/client/render/model/json/ModelVariantMap;variantMap:Ljava/util/Map;
      intermediary field_4241 Lnet/minecraft/class_790;field_4241:Ljava/util/Map;
      official a Lgfw;a:Ljava/util/Map;
    • multipartModel

      private MultipartUnbakedModel multipartModel
      Mappings:
      Namespace Name Mixin selector
      named multipartModel Lnet/minecraft/client/render/model/json/ModelVariantMap;multipartModel:Lnet/minecraft/client/render/model/MultipartUnbakedModel;
      intermediary field_4240 Lnet/minecraft/class_790;field_4240:Lnet/minecraft/class_816;
      official b Lgfw;b:Lggi;
  • Constructor Details

    • ModelVariantMap

      public ModelVariantMap(Map<String,WeightedUnbakedModel> variantMap, MultipartUnbakedModel multipartModel)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/render/model/json/ModelVariantMap;<init>(Ljava/util/Map;Lnet/minecraft/client/render/model/MultipartUnbakedModel;)V
      intermediary <init> Lnet/minecraft/class_790;<init>(Ljava/util/Map;Lnet/minecraft/class_816;)V
      official <init> Lgfw;<init>(Ljava/util/Map;Lggi;)V
    • ModelVariantMap

      public ModelVariantMap(List<ModelVariantMap> variantMapList)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/render/model/json/ModelVariantMap;<init>(Ljava/util/List;)V
      intermediary <init> Lnet/minecraft/class_790;<init>(Ljava/util/List;)V
      official <init> Lgfw;<init>(Ljava/util/List;)V
  • Method Details

    • fromJson

      public static ModelVariantMap fromJson(ModelVariantMap.DeserializationContext context, Reader reader)
      Mappings:
      Namespace Name Mixin selector
      named fromJson Lnet/minecraft/client/render/model/json/ModelVariantMap;fromJson(Lnet/minecraft/client/render/model/json/ModelVariantMap$DeserializationContext;Ljava/io/Reader;)Lnet/minecraft/client/render/model/json/ModelVariantMap;
      intermediary method_3424 Lnet/minecraft/class_790;method_3424(Lnet/minecraft/class_790$class_791;Ljava/io/Reader;)Lnet/minecraft/class_790;
      official a Lgfw;a(Lgfw$a;Ljava/io/Reader;)Lgfw;
    • fromJson

      public static ModelVariantMap fromJson(ModelVariantMap.DeserializationContext context, JsonElement json)
      Mappings:
      Namespace Name Mixin selector
      named fromJson Lnet/minecraft/client/render/model/json/ModelVariantMap;fromJson(Lnet/minecraft/client/render/model/json/ModelVariantMap$DeserializationContext;Lcom/google/gson/JsonElement;)Lnet/minecraft/client/render/model/json/ModelVariantMap;
      intermediary method_45787 Lnet/minecraft/class_790;method_45787(Lnet/minecraft/class_790$class_791;Lcom/google/gson/JsonElement;)Lnet/minecraft/class_790;
      official a Lgfw;a(Lgfw$a;Lcom/google/gson/JsonElement;)Lgfw;
    • containsVariant

      public boolean containsVariant(String key)
      Checks if there's a variant under the key in this map.
      Parameters:
      key - the variant's key
      Returns:
      true if the key has a variant, false otherwise
      Mappings:
      Namespace Name Mixin selector
      named containsVariant Lnet/minecraft/client/render/model/json/ModelVariantMap;containsVariant(Ljava/lang/String;)Z
      intermediary method_35790 Lnet/minecraft/class_790;method_35790(Ljava/lang/String;)Z
      official a Lgfw;a(Ljava/lang/String;)Z
    • getVariant

      public WeightedUnbakedModel getVariant(String key)
      Finds and returns the definition of the variant under the key. If the key does not exist, this throws an exception.
      Parameters:
      key - the variant's key
      Returns:
      the variant definition
      Throws:
      ModelVariantMap.VariantAbsentException - if no variant with the given key exists
      Mappings:
      Namespace Name Mixin selector
      named getVariant Lnet/minecraft/client/render/model/json/ModelVariantMap;getVariant(Ljava/lang/String;)Lnet/minecraft/client/render/model/json/WeightedUnbakedModel;
      intermediary method_35792 Lnet/minecraft/class_790;method_35792(Ljava/lang/String;)Lnet/minecraft/class_807;
      official b Lgfw;b(Ljava/lang/String;)Lggd;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/client/render/model/json/ModelVariantMap;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_790;equals(Ljava/lang/Object;)Z
      official equals Lgfw;equals(Ljava/lang/Object;)Z
    • hashCode

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

      public Map<String,WeightedUnbakedModel> getVariantMap()
      Mappings:
      Namespace Name Mixin selector
      named getVariantMap Lnet/minecraft/client/render/model/json/ModelVariantMap;getVariantMap()Ljava/util/Map;
      intermediary method_3423 Lnet/minecraft/class_790;method_3423()Ljava/util/Map;
      official a Lgfw;a()Ljava/util/Map;
    • getAllModels

      public Set<WeightedUnbakedModel> getAllModels()
      Mappings:
      Namespace Name Mixin selector
      named getAllModels Lnet/minecraft/client/render/model/json/ModelVariantMap;getAllModels()Ljava/util/Set;
      intermediary method_35791 Lnet/minecraft/class_790;method_35791()Ljava/util/Set;
      official b Lgfw;b()Ljava/util/Set;
    • hasMultipartModel

      public boolean hasMultipartModel()
      Mappings:
      Namespace Name Mixin selector
      named hasMultipartModel Lnet/minecraft/client/render/model/json/ModelVariantMap;hasMultipartModel()Z
      intermediary method_3422 Lnet/minecraft/class_790;method_3422()Z
      official c Lgfw;c()Z
    • getMultipartModel

      public MultipartUnbakedModel getMultipartModel()
      Mappings:
      Namespace Name Mixin selector
      named getMultipartModel Lnet/minecraft/client/render/model/json/ModelVariantMap;getMultipartModel()Lnet/minecraft/client/render/model/MultipartUnbakedModel;
      intermediary method_3421 Lnet/minecraft/class_790;method_3421()Lnet/minecraft/class_816;
      official d Lgfw;d()Lggi;