Skip to content

Fix pistons breaking when head is replaced - #3011

Draft
VanJackal wants to merge 1 commit into
EngineHub:version/7.4.xfrom
VanJackal:fix-2956
Draft

Fix pistons breaking when head is replaced #3011
VanJackal wants to merge 1 commit into
EngineHub:version/7.4.xfrom
VanJackal:fix-2956

Conversation

@VanJackal

Copy link
Copy Markdown

Fixes #2956 by adding a check for if the block was changed before calling affectNeighborsAfterRemoval

@me4502

me4502 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Thank you for looking into this! 😀

I can't investigate or review too deeply right now as I'm just replying on my lunch break, but from memory the entire "dirty" / update process here should be gated by a "changed check" coming from MC itself further up, unless something has changed within MC.

Either way if that check itself no longer functions, it should be fixed at the top level rather than in here. There are niche situations where we want to force these to occur always (eg, //update command), and it's not the only change that should be skipped during a no-op change during typical edits.

@VanJackal

Copy link
Copy Markdown
Author

Thanks for the reply.

I haven't looked into the 'dirty' check yet but I did look into //update and currently it has the same issue, so any extended pistons that are affected by //update will be broken.

I also looked at the other uses of affectNeighborsAfterRemoval and found a related issue with tripwires being put into a weird state when //update is used on them. It looks like affectNeighborsAfterRemoval is mostly used to push comparator updates from containers however comparators seem to still update even without the affectNeighborsAfterRemoval call, so I'm not totally sure.

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.

Paste breaks and never replaces extended pistons

2 participants