Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix modded oxidizable blocks not oxidizing #4436

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

Shnupbups
Copy link
Contributor

@Shnupbups Shnupbups commented Feb 11, 2025

Fixes #4371 and #4226

OxidizableBlocksRegistry.registerOxidizableBlockPair will now re-cache the value of the ticksRandomly field of the passed blocks' states to ensure that the default implementation of oxidization will actually work on the blocks.

This may be considered a slightly dirty workaround, but it works well and isn't particularly intrusive, despite using 2 mixins.

I've also included a test (though not a GameTest) to ensure that this works, and split the OxidizableBlocksRegistry into separate API and impl classes to more easily allow for potential extensibility in future while not breaking compatibility.

Fixes FabricMC#4371

`OxidizableBlocksRegistry.registerOxidizableBlockPair` will now re-cache the value of the `ticksRandomly` field of the passed blocks' states to ensure that the default implementation of oxidization will actually work on the blocks.

This may be considered a slightly dirty workaround, but it works well and isn't particularly intrusive, despite using 2 mixins.

I've also included a test (though not a GameTest) to ensure that this works, and split the `OxidizableBlocksRegistry` into separate API and impl classes to more easily allow for potential extensibility in future while not breaking compatibility.
@Shnupbups
Copy link
Contributor Author

Um, not sure why the data attachment API gametest failed, I didn't touch that at all...

@Earthcomputer
Copy link
Contributor

It fails intermittently, don't worry about it

@modmuss50 modmuss50 added the bug Something isn't working label Feb 12, 2025
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Feb 12, 2025
@modmuss50 modmuss50 merged commit 25d1a67 into FabricMC:1.21.4 Feb 15, 2025
4 checks passed
modmuss50 pushed a commit that referenced this pull request Feb 15, 2025
Fixes #4371

`OxidizableBlocksRegistry.registerOxidizableBlockPair` will now re-cache the value of the `ticksRandomly` field of the passed blocks' states to ensure that the default implementation of oxidization will actually work on the blocks.

This may be considered a slightly dirty workaround, but it works well and isn't particularly intrusive, despite using 2 mixins.

I've also included a test (though not a GameTest) to ensure that this works, and split the `OxidizableBlocksRegistry` into separate API and impl classes to more easily allow for potential extensibility in future while not breaking compatibility.

(cherry picked from commit 25d1a67)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working merge me please Pull requests that are ready to merge
Projects
None yet
4 participants