BlueElectricCable onBlockPlacedBy neighbor pos values possible wrong
zaped212 opened this issue ยท 3 comments
What were you doing when the issue happened?
While investigating behavior when blocks are added, I noticed BlueElectricCable's onBlockPlacedBy function was calculating odd values for the neighbor pos.
When placing a block at 0 : 56 : 0 I see neighbors being calculated at:
0 : 55 : -1
1 : 55 : 0
0 : 55 : 1
-1 : 55 : 0
0 : 56 : 0
0 : 54 : 0
It seems to be calculating neighbor position values for the block underneath it. causing it to call "neighborChanged" on itself.
What did you expect to happen?
I expected to see the neighborChanged function called on each of the 6 neighbors of the placed block.
It may just be a missunderstanding on my part it just seems odd that it would update itself.
What happened instead
Full Log and Crashlog on pastebin/gist
Forge and Minecraft version
Minecraft 1.15.2
Bluepower version and build number
Tips of master branch.
Changing the way this works anyhow, just ironing out a few bugs in the multipart.
As these are intended to be used as a multipart is quite complex, there are quite a few areas I am checking for a connection, so obviously each side of the block itself then each downward diagonal from the block itself, and each side of the block itself if it is a multipart.
Has been a while since I've looked into so I could have had some flawed logic in there somewhere.