Class ConnectingModelType

java.lang.Object
com.supermartijn642.fusion.model.types.connecting.ConnectingModelType
All Implemented Interfaces:
ModelType<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>, Serializer<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>

public class ConnectingModelType extends Object implements ModelType<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>
Created 27/04/2023 by SuperMartijn642
  • Constructor Details

    • ConnectingModelType

      public ConnectingModelType()
  • Method Details

    • getModelDependencies

      public Collection<net.minecraft.resources.ResourceLocation> getModelDependencies(Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>> data)
      Description copied from interface: ModelType
      Gets all the dependencies on other model files.
      Specified by:
      getModelDependencies in interface ModelType<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>
      Parameters:
      data - custom model data
    • getTextureDependencies

      public Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context, Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>> data)
      Description copied from interface: ModelType
      Gets all the dependencies on sprites.
      Specified by:
      getTextureDependencies in interface ModelType<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>
      Parameters:
      context - context for gathering texture dependencies
      data - custom model data
      See Also:
    • getAsVanillaModel

      @Nullable public @Nullable net.minecraft.client.renderer.block.model.BlockModel getAsVanillaModel(Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>> data)
      Description copied from interface: ModelType
      Represents the model as a vanilla BlockModel instance. May be used gather info from other models, such as with the vanilla 'parent' property. If the model cannot be represented as a BlockModel instance, this method should return null.
      Specified by:
      getAsVanillaModel in interface ModelType<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>
      Parameters:
      data - custom model data
      Returns:
      a representation of the model as a vanilla BlockModel instance, or null if such a representation is not available
    • bake

      public net.minecraft.client.resources.model.BakedModel bake(ModelBakingContext context, Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>> data)
      Description copied from interface: ModelType
      Converts the model data into a baked model.
      Specified by:
      bake in interface ModelType<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>
      Parameters:
      context - context for baking the model
      data - custom model data
      Returns:
      a baked model
      See Also:
    • deserialize

      public Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>> deserialize(com.google.gson.JsonObject json) throws com.google.gson.JsonParseException
      Description copied from interface: Serializer
      Deserializes the given json to some data.
      Specified by:
      deserialize in interface Serializer<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>
      Throws:
      com.google.gson.JsonParseException - if the given json does not match the expected format
    • serialize

      public com.google.gson.JsonObject serialize(Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>> value)
      Description copied from interface: Serializer
      Serializes the given data to json.
      Specified by:
      serialize in interface Serializer<Pair<net.minecraft.client.renderer.block.model.BlockModel,List<ConnectionPredicate>>>