Hi. I am Mantes from Germany!
I has got a question:
My Block with metadata don't work... The textures are Not load when the block is placed in world or placed Defauld Block
My Code:
package cpw.mods.Futurepack;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.src.Block;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Material;
public class BlockGitter extends BlockFP
{
public BlockGitter(int par1, int par2, Material material,boolean isOpaqueCube)
{
super(par1, par2, Material.iron,true);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
switch (par2)
{
case 1:
return 33;
case 2:
return 34;
case 3:
return 35;
case 4:
return 36;
case 5:
return 37;
case 6:
return 38;
case 7:
return 39;
case 8:
return 40;
case 9:
return 41;
case 10:
return 42;
case 11:
return 43;
case 12:
return 44;
case 13:
return 45;
case 14:
return 46;
case 15:
return 47;
default:
return 32;
}
}
@SideOnly(Side.CLIENT)
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
protected int damageDropped(int par1)
{
return par1;
}
@SideOnly(Side.CLIENT)
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
for (int var4 = 0; var4 < 16; ++var4)
{
par3List.add(new ItemStack(par1, 1, var4));
}
}
}
Please help me Mantes