Create Fabric

Create Fabric

7M Downloads

Sticky mechanical piston reports unmovable piston head on retraction

UQuark opened this issue ยท 0 comments

commented

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

  1. Setup a sticky mechanical piston with 2 extension poles
  2. Place a block to be pushed
  3. Extend the piston for 2 meters
  4. Try to retract the piston

Expected Result

The contraption is retracted

Screenshots and Videos

image

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:
image
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