Jungle vine

This commit is contained in:
paulevsGitch 2020-12-25 17:29:06 +03:00
parent 1116daeb1f
commit 71a3e88b62
16 changed files with 61 additions and 5 deletions

View file

@ -59,7 +59,8 @@ public class BlockSmallJellyshroom extends BlockAttached implements IRenderTypea
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
Direction direction = (Direction) state.get(FACING);
BlockPos blockPos = pos.offset(direction.getOpposite());
return sideCoversSmallSquare(world, blockPos, direction) && world.getBlockState(blockPos).isOpaque();
BlockState support = world.getBlockState(blockPos);
return sideCoversSmallSquare(world, blockPos, direction) && support.isOpaque() && support.getLuminance() == 0;
}
@Override