Skip to content

Conversation

@jchung01
Copy link

@jchung01 jchung01 commented Mar 5, 2025

Fixes #144. You can see the issue for more details, but in summary:

  • As of 2.0.3, any SingleBlockModifierReplacement declared would be allowed in any position where the base block was (after certain rendering).
  • This was a bug introduced by the canonicalization of BlockArray.BlockInformation.
  • This bug is only exhibited after doing one of 2 things: (1) Viewing the machine's JEI preview, or (2) Rendering the in-world placement preview of the machine from the blueprint

This PR fixes the issue by directly adding the modifier to the machine's pattern on deserialization/reload copying the BlockInformation saved in the pattern before adding the modifier's blockstate. Note this is needed so we don't modify the canonical instance shared by other block positions.

jchung01 added 2 commits March 4, 2025 17:53
- This ensures future retrieval of the BlockInformation at the position already has the modifier as an available block
Related NovaEngineering-Source#144
This reverts commit 2269792.
- Adding the modifier to the pattern directly caused issues with auto-assembly requirements
@KasumiNova KasumiNova merged commit d734db7 into NovaEngineering-Source:master Apr 30, 2025
1 check passed
@jchung01 jchung01 deleted the modifier-fix branch June 28, 2025 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Single upgrade modifier blocks allow substitution of all blocks of the original type in the machine pattern

2 participants