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

[Suggestion] Change the scaffold overhanging mechanical #10

Open
yezhiyi9670 opened this issue Feb 26, 2020 · 0 comments
Open

[Suggestion] Change the scaffold overhanging mechanical #10

yezhiyi9670 opened this issue Feb 26, 2020 · 0 comments

Comments

@yezhiyi9670
Copy link

The current mechanical of scaffold overhanging only allows overhanging scaffoldings along the axis, and there are many methods to bypass it. I have a better method to fix this problem, and this probably won't cause noticeable lag.

We will make use of the BlockState (this is currently unused). First, when a neighboring block changes (including changes on blockstates), a scaffold recaculates its BlockState, and then checks if the BlockState is greater than getSideBlocksAvailable(). If so, the scaffold breaks itself.

This is the way to calculate the BlockState:

  1. If the block under the scaffolding is a non-scaffolding block, then BlockState is 0.
  2. If the block under the scaffolding is a scaffolding, then BlockState is same as the BlockState of the scaffolding under it.
  3. If the block under the scaffolding is air:
  4. If there is at least one scaffolding with non-32767 BlockState around it, the BlockState of the current scaffolding is the minimum one among the BlockStates of surrounding scaffoldings (with non-32767 BlockState), plus 1.
  5. If there is no scaffoldings with non-32767 BlockState around it, the BlockState of the current scaffolding is 32767.
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

No branches or pull requests

1 participant