Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Sticky mechanical piston reports unmovable piston head on retraction #1307

Closed
UQuark opened this issue Feb 11, 2024 · 0 comments
Closed

Sticky mechanical piston reports unmovable piston head on retraction #1307

UQuark opened this issue Feb 11, 2024 · 0 comments
Labels
type: bug Issue where something isn't working

Comments

@UQuark
Copy link

UQuark commented Feb 11, 2024

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

@UQuark UQuark added the type: bug Issue where something isn't working label Feb 11, 2024
UQuark added a commit to UQuark/Create that referenced this issue Feb 12, 2024
@UQuark UQuark mentioned this issue Feb 12, 2024
TropheusJ added a commit that referenced this issue Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue where something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants