-
-
Notifications
You must be signed in to change notification settings - Fork 165
Description
CraftBook Version
3.10.8
Platform Version
paper
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using a version of CraftBook compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
Adjacent parallel stained pipes with different colours get added to the visitedPipes set despite not being relevant to the pipe system, causing adjacent loops (attached on one end of the current pipe) of a different colour to be ignored in further processing of the pipe system. The same behaviour would occur when using (stained) glass panes instead of stained glass blocks.
Expected Behavior
In reference to the reproduction steps:
The items are introduced to the pipe system in the black stained glass block. Now CraftBook checks all surrounding blocks. The only block relevant to the pipe system is the unstained glass block beneath.
After reaching the unstained glass block CraftBook should find any adjacent stained or unstained glass block (in this case the adjacent orange stained glass block).
After that it should find the orange stained glass block adjacent to the black stained glass block. With the current behavior this block isn't found as it was marked as visited when checking adjacent blocks to the black stained glass block.
After which it should find the piston and reach the left chest.
Reproduction Steps
Anything Else?
In https://github.com/EngineHub/CraftBook/blob/master/src/main/java/com/sk89q/craftbook/mechanics/pipe/Pipes.java#L277 the adjacent glass blocks are added to the list of visitedPipes. The check whether these glass blocks are relevant to the current pipe occurs 2 lines later in https://github.com/EngineHub/CraftBook/blob/master/src/main/java/com/sk89q/craftbook/mechanics/pipe/Pipes.java#L279. These codeblocks would need to swap positions. To incorporate the expected behaviour for stained glass panes the code would need further modifications.
