Class ModelEvent.ModifyBakingResult
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ModelEvent
net.neoforged.neoforge.client.event.ModelEvent.ModifyBakingResult
- All Implemented Interfaces:
IModBusEvent
- Enclosing class:
ModelEvent
Fired while the
for caching.
ModelManager is reloading models, after the model registry is set up, but before it's
passed to the
invalid reference
net.minecraft.client.renderer.block.BlockModelShaper
This event is fired from a worker thread and it is therefore not safe to access anything outside the
model registry and ModelBakery provided in this event.
The ModelManager firing this event is not fully set up with the latest data when this event fires and
must therefore not be accessed in this event.
This event is not cancellable.
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class ModelEvent
ModelEvent.BakingCompleted, ModelEvent.ModifyBakingResult, ModelEvent.RegisterLoaders, ModelEvent.RegisterStandalone -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ModelBakery.BakingResultprivate final SpriteLoader.Preparationsprivate final SpriteLoader.Preparationsprivate final MaterialBakerprivate final ModelBakery -
Constructor Summary
ConstructorsConstructorDescriptionModifyBakingResult(ModelBakery.BakingResult bakingResult, MaterialBaker materialBaker, SpriteLoader.Preparations blockAtlas, SpriteLoader.Preparations itemAtlas, ModelBakery modelBakery) -
Method Summary
Modifier and TypeMethodDescriptionReturns the block atlas preparations holding the stitched but not yet uploaded sprites.Returns the item atlas preparations holding the stitched but not yet uploaded sprites.Returns the material baker used for baking the provided models.
-
Field Details
-
bakingResult
-
materialBaker
-
blockAtlas
-
itemAtlas
-
modelBakery
-
-
Constructor Details
-
ModifyBakingResult
@Internal public ModifyBakingResult(ModelBakery.BakingResult bakingResult, MaterialBaker materialBaker, SpriteLoader.Preparations blockAtlas, SpriteLoader.Preparations itemAtlas, ModelBakery modelBakery)
-
-
Method Details
-
getBakingResult
- Returns:
- The result of the model baking
-
getMaterialBaker
Returns the material baker used for baking the provided models.- Returns:
- the material baker used for baking the provided models
-
getBlockAtlasPreparations
Returns the block atlas preparations holding the stitched but not yet uploaded sprites.- Returns:
- the block atlas preparations holding the stitched but not yet uploaded sprites
-
getItemAtlasPreparations
Returns the item atlas preparations holding the stitched but not yet uploaded sprites.- Returns:
- the item atlas preparations holding the stitched but not yet uploaded sprites
-
getModelBakery
- Returns:
- the model loader
-