I made glass stairs render correctly, however any blocks underneath them appear transparent as well.
package com.mstarks.extrastairs.blocks;
import net.minecraft.block.BlockStairs;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BasicStairs extends BlockStairs {
public BasicStairs(String unlocalizedName, CreativeTabs tab, Material material, float hardness, float resistance, int harvestLevel) {
super(Blocks.stone_stairs.getStateFromMeta(0));
this.setUnlocalizedName(unlocalizedName);
this.setCreativeTab(tab);
this.setHardness(hardness);
this.setResistance(resistance);
this.setHarvestLevel("pickaxe", harvestLevel);
}
@SideOnly(Side.CLIENT)
public EnumWorldBlockLayer getBlockLayer()
{
return EnumWorldBlockLayer.CUTOUT;
}
public boolean isFullCube()
{
return false;
}
}
Don't worry about activating/deactivating the parts of the code I had mentioned, I can figure that out on my own (except under the super argument).
In the main class for a block, you can set the tool used under this.setHarvestLevel (i.e. pickaxe, axe, shovel, etc.). I would like to make the block break at the same speed with every tool or your hands, like glass in vanilla.