Sticky mechanical piston reports unmovable piston head on retraction
UQuark opened this issue ยท 0 comments
Describe the Bug
Hi! I use commit d9c630d and I can reproduce the issue #1058.
Further experiments show that a piston with only one extension pole works, but 2+ extension poles cause the bug to appear.
Reproduction Steps
- Setup a sticky mechanical piston with 2 extension poles
- Place a block to be pushed
- Extend the piston for 2 meters
- Try to retract the piston
Expected Result
The contraption is retracted
Screenshots and Videos
Crash Report or Log
No response
Operating System
Arch Linux
Mod Version
0.5.1f
Minecraft Version
1.20.1
Other Mods
No response
Additional Context
After a brief debugging I found this state:
It seems that anchor
BlockPos in the PistonContraption points to an extension pole
It is calculated from initialExtensionProgress
, which, I found out, behaves weird:
- writeNBT is called only in the start of the movement, not in the end
- for some reason initialExtensionProgress resets to zero after full extension (still no clue how)
At this point I decided it's worth opening a new issue and stopped necroposing