Class PartialModel

java.lang.Object
com.jozufozu.flywheel.lib.model.baked.PartialModel

public class PartialModel extends Object
A helper class for loading and accessing JSON models not directly used by any blocks or items.
Creating a PartialModel will make Minecraft automatically load the associated modelLocation. PartialModels must be initialized before the initial resource reload, otherwise an error will be thrown. It is recommended to do this in the client mod initializer on Fabric and the mod class constructor on Forge.
Once Minecraft has finished baking all models, all PartialModels will have their bakedModel fields populated.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected net.minecraft.client.resources.model.BakedModel
     
    protected final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PartialModel(net.minecraft.resources.ResourceLocation modelLocation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.resources.model.BakedModel
    get()
     
    net.minecraft.resources.ResourceLocation
     
     
    protected void
    set(net.minecraft.client.resources.model.BakedModel bakedModel)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • modelLocation

      protected final net.minecraft.resources.ResourceLocation modelLocation
    • bakedModel

      protected net.minecraft.client.resources.model.BakedModel bakedModel
  • Constructor Details

    • PartialModel

      public PartialModel(net.minecraft.resources.ResourceLocation modelLocation)
  • Method Details

    • getLocation

      public net.minecraft.resources.ResourceLocation getLocation()
    • getName

      public String getName()
    • get

      public net.minecraft.client.resources.model.BakedModel get()
    • set

      protected void set(net.minecraft.client.resources.model.BakedModel bakedModel)