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

Fix #3 - Compatibility w/ external resource manager mixins #6

Merged
merged 38 commits into from
Jan 29, 2022

Conversation

soir20
Copy link
Member

@soir20 soir20 commented Jan 29, 2022

PRing myself for documentation purposes.

What did you change?

  • MoreMcmeta now uses a resource pack to prevent entire animation strips from being stitched onto texture atlases for mod-controlled sprites. The pack now supplies dummy metadata instead of a resource manager wrapper.
  • Updated the interface names to remove the "I" prefix (to be consistent with the new interfaces added).

Why did you make this change?

MoreMcmeta and Continuity modify the resource manager in incompatible ways (see #3). The new strategy uses more of Minecraft's existing implementation, which should reduce potential compatibility problems. This change also makes it easier to possibly separate animation, etc. functionality into separate plugins bundled within the mod in the future.

How did you make this change?

  • Added a ModRepositorySource that supplies a special required resource pack. It's added via accessor mixin on Fabric and the existing method on Forge.
  • The pack is stickied to the top of the list using Minecraft's existing functionality. The pack supplies dummy metadata and searches other packs for the textures it controls.
  • Separated texture reading into basic data reading (done synchronously) and texture assembly (done asynchronously in parallel with reload listeners). This is necessary to add the special resource pack before the reload technically begins, as the list of resource packs and fallback managers in Minecraft's code is not thread-safe.
  • Simplified interactions with Minecraft's resource packs with custom interfaces and a "resource repository" class.
  • Removed previous resource manager replacement code and tests.
  • Updated Architectury plugin.

How can others see the effect of your change?

Test MoreMcmeta and Continuity together (Fabric). There's also now an unmovable resource pack added. Other than that, nothing's changed visually.

Links to related issues

#3

Which Minecraft versions does this change apply to?

  • 1.16
  • 1.17

Did you test this change on both mod loaders?

  • Forge
  • Fabric

Did you unit test this change?

  • I unit tested this change.
  • This change is too small to warrant any new unit tests.
  • Other (Please explain below.)

Areas for improvement (if any)

There's a couple unit tests that could be added, but it's a few lines of simple adapter code.

Additional notes (if any)

Need to port this to 1.16 for consistency.

@soir20 soir20 added mc: 1.17.x This issue affects Minecraft version 1.17.x compatibility Something isn't working with another mod loader: fabric This issue affects MoreMcmeta on Fabric loader: forge This issue affects MoreMcmeta on Forge labels Jan 29, 2022
@soir20 soir20 merged commit bdcf05b into main Jan 29, 2022
@soir20 soir20 deleted the rsc-manager-external-mixin-fix branch January 29, 2022 05:18
@soir20 soir20 restored the rsc-manager-external-mixin-fix branch January 29, 2022 23:44
@soir20 soir20 deleted the rsc-manager-external-mixin-fix branch January 30, 2022 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Something isn't working with another mod loader: fabric This issue affects MoreMcmeta on Fabric loader: forge This issue affects MoreMcmeta on Forge mc: 1.17.x This issue affects Minecraft version 1.17.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant