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 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<ResourceLocation,UnbakedModel>> children, com.google.gson.JsonDeserializationContext context)