Package com.jozufozu.flywheel.core
Class PartialModel
java.lang.Object
com.jozufozu.flywheel.core.PartialModel
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
Attempting to create a PartialModel after
Creating a PartialModel will make the associated modelLocation automatically load. PartialModels must be initialized the mod class constructor.
Once
ModelBakeEvent finishes, all PartialModels (with valid modelLocations)
will have their bakedModel fields populated.
Attempting to create a PartialModel after
ModelRegistryEvent will cause an error.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.client.resources.model.BakedModelprotected final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.BakedModelget()net.minecraft.resources.ResourceLocationstatic voidonModelBake(net.minecraftforge.client.event.ModelBakeEvent event) static voidonModelRegistry(net.minecraftforge.client.event.ModelRegistryEvent event) protected voidset(net.minecraft.client.resources.model.BakedModel bakedModel)
-
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.ModelRegistryEvent event) -
onModelBake
public static void onModelBake(net.minecraftforge.client.event.ModelBakeEvent 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()
-