Hi!
I'm making a numpad for my mod, which should be about a third of a block thick and 0.75 of a block in length.
I got the blockBounds right after some trial and error, but the block doesn't get placed on the side of the block that you right-click on, it's always rotated in the same way.
I tried using the setDoorRotation method and its subsequent methods in the net.minecraft.block.BlockDoor class, but to no avail. Does anyone have any idea of how I could make the placed block face the right way?
Here's my NumpadBlock class:
package vivadaylight3.interlock.blocks;
import java.util.Random;
import vivadaylight3.interlock.Interlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class NumpadBlock extends Block {
public NumpadBlock(int par1, Material par2Material) {
super(par1, par2Material);
setUnlocalizedName("numpadBlock");
setBlockBounds(0.0F, 0.0F, 0.0F, 0.25F, 1.0F, 0.75F);
setCreativeTab(CreativeTabs.tabRedstone);
}
public void registerIcons(IconRegister iconRegister){
blockIcon = iconRegister.registerIcon("Interlock:numpadBlock");
}
public int idDropped(int par1, Random par2Random, int par3)
{
return Interlock.numpadBlock.blockID;
}
public int idPicked(World par1World, int par2, int par3, int par4)
{
return Interlock.numpadBlock.blockID;
}
}
Here's how the block acts now (I'm not sure why it's showing those blocks underground):
http://i1059.photobucket.com/albums/t425/CascadeRP/2013-05-13_234558_zps975079fd.png[/img]
If anyone knows the Nuclear Monitor from the Nuclear Control add-on for IndustrialCraft 2, my intention is for it to look similar and act the same way when placed.
Thanks!