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
(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)
-
Field Details
-
INSTANCE
-
-
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, 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:
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)
-