Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Model Loading API to 1.21.5 #4450

Merged
merged 10 commits into from
Mar 6, 2025

Conversation

PepperCode1
Copy link
Member

@PepperCode1 PepperCode1 commented Feb 18, 2025

  • Add ModelModifier.*BakeItem events. Their utility is currently limited as the render state cannot be inspected, but they will be much more useful after the 1.21.5 FRAPI port.
  • Remove ModelModifier.*Bake events as UnbakedModels are not really baked anymore
  • ModelModifier.*BakeBlock events now accept a BlockState instead of a ModelIdentifier
  • Temporarily remove extra model API. Porting it directly is not possible and more time needs to be spent designing a new API that will cover the same use cases.
  • Remove UnwrappableBakedModel as it is potentially less useful with the changes to the model system. It will be re-added later if necessary.
  • Add WrapperBlockStateModel which simply delegates all method calls to a different BlockStateModel. This class existed in vanilla in 1.21.4 as WrapperBakedModel but was removed.
  • Add WrapperUnbakedItemModel which simply delegates all method calls to a different ItemModel.Unbaked
  • Add WrapperItemModel which simply delegates all method calls to a different ItemModel
  • Move all model wrapper-related classes to a separate package

@PepperCode1 PepperCode1 added the priority:high High priority PRs that need review and work now. Review these first. label Feb 19, 2025
@modmuss50 modmuss50 added the port Porting existing code to a different version label Feb 19, 2025
@modmuss50
Copy link
Member

FYI: Build failuire should be fixed when you merge.

Copy link
Member

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good to my untrained eye, just one small question about the api design.

@PepperCode1 PepperCode1 marked this pull request as ready for review March 5, 2025 01:08
@modmuss50 modmuss50 merged commit 4e7a6c5 into FabricMC:1.21.5 Mar 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port Porting existing code to a different version priority:high High priority PRs that need review and work now. Review these first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants