From d8395360f3684dde1b7213e006634bb3a78681d9 Mon Sep 17 00:00:00 2001 From: ganymedes01 Date: Fri, 16 Oct 2015 18:05:10 +0100 Subject: [PATCH] Fix slabs not being able to place torches/tracks on slabs --- .../java/ganymedes01/etfuturum/blocks/GenericSlab.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/ganymedes01/etfuturum/blocks/GenericSlab.java b/src/main/java/ganymedes01/etfuturum/blocks/GenericSlab.java index 85a1f198c..b6a093733 100644 --- a/src/main/java/ganymedes01/etfuturum/blocks/GenericSlab.java +++ b/src/main/java/ganymedes01/etfuturum/blocks/GenericSlab.java @@ -17,6 +17,7 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -31,6 +32,12 @@ public GenericSlab(Material material, Block base) { setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); } + @Override + public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { + int meta = world.getBlockMetadata(x, y, z); + return meta == 2 || side == ForgeDirection.UP && meta == 1 || side == ForgeDirection.DOWN && meta == 0; + } + @Override public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z);