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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread
(JsonObject jsonObject, JsonDeserializationContext jsonDeserializationContext) Reads an unbaked model from the passed JSON object.private static void
readChildren
(JsonObject jsonObject, String name, ImmutableMap.Builder<String, com.mojang.datafixers.util.Either<ResourceLocation, UnbakedModel>> children, JsonDeserializationContext context)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Loader
private Loader()
-
-
Method Details
-
read
public CompositeUnbakedModel read(JsonObject jsonObject, JsonDeserializationContext jsonDeserializationContext) throws 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, ordeserializationContext.deserialize(<sub object>, UnbakedModel.class)
to parse a nested model. The set of supported types can be found in the declaration ofBlockModel.GSON
.- Specified by:
read
in interfaceUnbakedModelLoader<CompositeUnbakedModel>
- Throws:
JsonParseException
-
readChildren
private static void readChildren(JsonObject jsonObject, String name, ImmutableMap.Builder<String, com.mojang.datafixers.util.Either<ResourceLocation, UnbakedModel>> children, JsonDeserializationContext context)
-