Skip to content

Commit

Permalink
Align isNeighbourBlockSolid to vanilla
Browse files Browse the repository at this point in the history
  • Loading branch information
boq committed Dec 29, 2017
1 parent a8ebb7f commit fbe3337
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/openmods/block/OpenBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentHelper;
Expand Down Expand Up @@ -363,7 +364,10 @@ public boolean hasTileEntity(IBlockState state) {
}

public final static boolean isNeighborBlockSolid(IBlockAccess world, BlockPos blockPos, EnumFacing side) {
return world.isSideSolid(blockPos.offset(side), side.getOpposite(), false);
final BlockPos pos = blockPos.offset(side);
final IBlockState state = world.getBlockState(pos);
return isExceptionBlockForAttaching(state.getBlock()) ||
state.getBlockFaceShape(world, pos, side.getOpposite()) == BlockFaceShape.SOLID;
}

public final static boolean areNeighborBlocksSolid(World world, BlockPos blockPos, EnumFacing... sides) {
Expand Down

0 comments on commit fbe3337

Please sign in to comment.