Class ConnectingModelType
java.lang.Object
com.supermartijn642.fusion.model.types.connecting.ConnectingModelType
- All Implemented Interfaces:
ModelType<ConnectingModelData>,Serializer<ConnectingModelData>
Created 27/04/2023 by SuperMartijn642
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.BakedModelbake(ModelBakingContext context, ConnectingModelData data) Converts the model data into a baked model.deserialize(com.google.gson.JsonObject json) Deserializes the given json to some data.@Nullable net.minecraft.client.renderer.block.model.BlockModelRepresents the model as a vanillaBlockModelinstance.Collection<net.minecraft.resources.ResourceLocation>Gets all the dependencies on other model files.getTextureDependencies(GatherTexturesContext context, ConnectingModelData data) Gets all the dependencies on sprites.com.google.gson.JsonObjectserialize(ConnectingModelData value) Serializes the given data to json.
-
Field Details
-
DEFAULT_CONNECTION_KEY
public static final net.minecraft.resources.ResourceLocation DEFAULT_CONNECTION_KEY
-
-
Constructor Details
-
ConnectingModelType
public ConnectingModelType()
-
-
Method Details
-
getModelDependencies
public Collection<net.minecraft.resources.ResourceLocation> getModelDependencies(ConnectingModelData data) Description copied from interface:ModelTypeGets all the dependencies on other model files.- Specified by:
getModelDependenciesin interfaceModelType<ConnectingModelData>- Parameters:
data- custom model data
-
getTextureDependencies
public Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context, ConnectingModelData data) Description copied from interface:ModelTypeGets all the dependencies on sprites.- Specified by:
getTextureDependenciesin interfaceModelType<ConnectingModelData>- Parameters:
context- context for gathering texture dependenciesdata- custom model data- See Also:
-
getAsVanillaModel
@Nullable public @Nullable net.minecraft.client.renderer.block.model.BlockModel getAsVanillaModel(ConnectingModelData data) Description copied from interface:ModelTypeRepresents the model as a vanillaBlockModelinstance. May be used gather info from other models, such as with the vanilla 'parent' property. If the model cannot be represented as aBlockModelinstance, this method should returnnull.- Specified by:
getAsVanillaModelin interfaceModelType<ConnectingModelData>- Parameters:
data- custom model data- Returns:
- a representation of the model as a vanilla
BlockModelinstance, ornullif such a representation is not available
-
bake
public net.minecraft.client.resources.model.BakedModel bake(ModelBakingContext context, ConnectingModelData data) Description copied from interface:ModelTypeConverts the model data into a baked model.- Specified by:
bakein interfaceModelType<ConnectingModelData>- Parameters:
context- context for baking the modeldata- custom model data- Returns:
- a baked model
- See Also:
-
deserialize
public ConnectingModelData deserialize(com.google.gson.JsonObject json) throws com.google.gson.JsonParseException Description copied from interface:SerializerDeserializes the given json to some data.- Specified by:
deserializein interfaceSerializer<ConnectingModelData>- Throws:
com.google.gson.JsonParseException- if the given json does not match the expected format
-
serialize
Description copied from interface:SerializerSerializes the given data to json.- Specified by:
serializein interfaceSerializer<ConnectingModelData>
-