-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Model Loading API to 1.21.4 (#4243)
* Update Model Loading API to 1.21.4 - Split model modifier events and callbacks - one set for static models and one set for block models - This is necessary because static models use UnbakedModel and are baked with settings while block models use GroupableModel and are not baked with settings - This cleans up the Identifier/ModelIdentifier getters - OnLoad for block models was not added because the unbaked block model map is not a cache and block models cannot inherit from other models - Make DelegatingUnbakedModel a record to allow accessing the delegate ID - Remove BuiltinItemRenderer, BuiltinItemRendererRegistry, and BuiltinItemRendererRegistryImpl as they were replaced by a TAW to SpecialModelTypes.ID_MAPPER * Add fabric_ prefix to methods in BakedModelsHooks and fix checkstyle * Remove ModelResolver and BlockStateResolver - The functionality of ModelResolver could be perfectly replicated with ModelModifier.OnLoad with OVERRIDE_PHASE - The functionality of BlockStateResolver could be perfectly replicated with ModelModifier.BeforeBakeBlock with OVERRIDE_PHASE - Fix log warning caused by half_red_sand.json not defining particle sprite * Re-add BlockStateResolver and ModelModifier.OnLoadBlock - BeforeBakeBlock runs too late to allow modifying how models are grouped, so OnLoadBlock is necessary to allow that - OnLoadBlock only runs for models which were actually loaded from blockstate files, so BlockStateResolver is necessary to allow adding models for blocks without a corresponding blockstate file - Add UnwrappableBakedModel - Moved and renamed from FRAPI's WrapperBakedModel (original will be deleted in separate PR) - Implement it and interface inject it on vanilla's WrapperBakedModel - Add new static UnwrappableBakedModel#unwrap method which accepts a Predicate saying when to stop unwrapping - Add WrapperUnbakedModel which simply delegates all method calls to a different UnbakedModel * Remove ModelModifier.*Bake* - Remove BeforeBake, AfterBake, BeforeBakeBlock, AfterBakeBlock - Remove DelegatingUnbakedModel - Add WrapperGroupableModel - Add documentation and extra constructor to WrapperUnbakedModel * Clarify OnLoad doc about meaning of null model
- Loading branch information
1 parent
bdca9ac
commit 6a293bd
Showing
32 changed files
with
612 additions
and
1,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
...c/client/java/net/fabricmc/fabric/api/client/model/loading/v1/DelegatingUnbakedModel.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.