Skip to content

Commit

Permalink
Fix slabs not being able to place torches/tracks on slabs
Browse files Browse the repository at this point in the history
  • Loading branch information
ganymedes01 committed Oct 16, 2015
1 parent 1954099 commit d839536
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/ganymedes01/etfuturum/blocks/GenericSlab.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand Down

0 comments on commit d839536

Please sign in to comment.