1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Fixed Multiblocks.

This commit is contained in:
TheBusyBiscuit 2019-09-06 02:16:45 +02:00
parent 5a5651ab38
commit 9293808357

View File

@ -97,15 +97,15 @@ public class BlockListener implements Listener {
}
protected boolean compareMaterials(Block b, Material[] blocks, boolean onlyTwoWay) {
if (!compareMaterialsVertical(b, blocks[2], blocks[5], blocks[8])) {
if (!compareMaterialsVertical(b, blocks[1], blocks[4], blocks[7])) {
return false;
}
BlockFace[] directions = onlyTwoWay ? new BlockFace[] {BlockFace.NORTH, BlockFace.EAST} : new BlockFace[] {BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST};
for (BlockFace direction : directions) {
if (compareMaterialsVertical(b.getRelative(direction), blocks[1], blocks[4], blocks[7])
&& compareMaterialsVertical(b.getRelative(direction.getOppositeFace()), blocks[3], blocks[6], blocks[9])) {
if (compareMaterialsVertical(b.getRelative(direction), blocks[0], blocks[3], blocks[6])
&& compareMaterialsVertical(b.getRelative(direction.getOppositeFace()), blocks[2], blocks[5], blocks[8])) {
return true;
}
}