NotEnoughScaffold

NotEnoughScaffold

722k Downloads

[Suggestion] Change the scaffold overhanging mechanism

yezhiyi9670 opened this issue ยท 0 comments

commented

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.