Class CompositeUnbakedModel.Loader

java.lang.Object
net.neoforged.neoforge.client.model.CompositeUnbakedModel.Loader
All Implemented Interfaces:
UnbakedModelLoader<CompositeUnbakedModel>
Enclosing class:
CompositeUnbakedModel

public static final class CompositeUnbakedModel.Loader extends Object implements UnbakedModelLoader<CompositeUnbakedModel>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext jsonDeserializationContext)
    Reads an unbaked model from the passed JSON object.
    private static void
    readChildren(com.google.gson.JsonObject jsonObject, String name, com.google.common.collect.ImmutableMap.Builder<String,com.mojang.datafixers.util.Either<net.minecraft.resources.ResourceLocation,net.minecraft.client.resources.model.UnbakedModel>> children, com.google.gson.JsonDeserializationContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Loader

      private Loader()
  • Method Details

    • read

      public CompositeUnbakedModel read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException
      Description copied from interface: UnbakedModelLoader
      Reads an unbaked model from the passed JSON object.

      The JsonDeserializationContext argument can be used to deserialize types that the system already understands. For example, deserializationContext.deserialize(<sub object>, Transformation.class) to parse a transformation, or deserializationContext.deserialize(<sub object>, UnbakedModel.class) to parse a nested model. The set of supported types can be found in the declaration of BlockModel.GSON.

      Specified by:
      read in interface UnbakedModelLoader<CompositeUnbakedModel>
      Throws:
      com.google.gson.JsonParseException
    • readChildren

      private static void readChildren(com.google.gson.JsonObject jsonObject, String name, com.google.common.collect.ImmutableMap.Builder<String,com.mojang.datafixers.util.Either<net.minecraft.resources.ResourceLocation,net.minecraft.client.resources.model.UnbakedModel>> children, com.google.gson.JsonDeserializationContext context)