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

Ensures All doors in blueprint are saved as closed #954

Open
wants to merge 5 commits into
base: 1.12
Choose a base branch
from

Conversation

Doc-1
Copy link
Collaborator

@Doc-1 Doc-1 commented Apr 3, 2024

This is to fix a certain issue when saving an already opened door into a blueprint. It does not reset the NBT tag "opened" to false. It remaining true prevents it from opening properly.

@CreativeMD
Copy link
Owner

There is a method in LittleStructureType called finalizePreview, rather do it there. I think you basically do the same thing in LittleDoorBaseType. Not sure if this is an issue in 1.20. Furthermore I still do not understand 100% why this actually causes any issues. Have not found the time yet to look into it.

@Doc-1
Copy link
Collaborator Author

Doc-1 commented Apr 16, 2024

This causes an issue with auto-opening doors. When you save an already opened, auto-opening door, and place it in the world. The door does not update it's signaling to auto-open the door.
How to reproduce:

  1. Create a door with a signaling of 1=b0.
  2. Place the door down.
  3. Place a tile and save the door plus tile.
  4. Place the new save down. The door will remain closed.

This is where the door's state not being reset to 0 causes the issue.

if (opened != output.getState()[0] && !isInMotion())

@CreativeMD
Copy link
Owner

But your fix would mean that the door state will get switched, in case you pick up the structure in the opened state and save it in the blueprint again.

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.

2 participants