Class PartialModel

java.lang.Object
com.jozufozu.flywheel.core.PartialModel

public class PartialModel extends Object
A helper class for loading and accessing json models.
Creating a PartialModel will make the associated modelLocation automatically load. PartialModels must be initialized the mod class constructor.
Once ModelEvent.BakingCompleted finishes, all PartialModels (with valid modelLocations) will have their bakedModel fields populated.
Attempting to create a PartialModel after ModelEvent.RegisterAdditional will cause an error.
  • 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
     
    static void
    onModelBake(net.minecraftforge.client.event.ModelEvent.BakingCompleted event)
     
    static void
    onModelRegistry(net.minecraftforge.client.event.ModelEvent.RegisterAdditional event)
     
    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

    • onModelRegistry

      public static void onModelRegistry(net.minecraftforge.client.event.ModelEvent.RegisterAdditional event)
    • onModelBake

      public static void onModelBake(net.minecraftforge.client.event.ModelEvent.BakingCompleted event)
    • set

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

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

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