EngineHub / CraftBook

🔧 Machines, ICs, PLCs, and more!
https://enginehub.org/craftbook/
GNU General Public License v3.0
301 stars 160 forks source link

Bridge mechanic doesn't work below Y=0 #1299

Closed minoneer closed 2 years ago

minoneer commented 2 years ago

CraftBook Version

3.10.6;4748-a91298e

Platform Version

git-Paper-216 (MC: 1.18.1)

Confirmations

Bug Description

When trying to build a bridge on a Y level below 0, the creation fails with the error message "Material not usable for a bridge!". Even though the material is configured and works above Y-Level 0.

Expected Behavior

The bridge is created and toggled below Y-Level 0 as well

Reproduction Steps

  1. Build a bridge at Y=-10 with a valid material
  2. Place signs on both sides (this still works, including confirmation messages)
  3. Try to toggle the bridge

Anything Else?

I believe it could be related to the check below, which hard codes the world bottom at Y=0. It should be replace with World.getMinHeight().

https://github.com/EngineHub/CraftBook/blob/master/src/main/java/com/sk89q/craftbook/mechanics/area/simple/Bridge.java#L190

me4502 commented 2 years ago

Fixed in https://github.com/EngineHub/CraftBook/commit/564ddd84537ff9d78fcb4b21167f675f9edf3666

minoneer commented 2 years ago

Thanks :)