problème de texture (modder)

kaine333

Aventurier
10 Août 2011
35
0
1
Bonjour a tous,
j'ai un problème avec un bloc qui a 2 texture. le première texture marche bien, mais la deuxième me donne la texture 0 de terrain.png

voici le code:

package net.minecraft.src;
public class mod_Blocwood1 extends BaseMod
{
public static final Block Blocwood1 = (new BlockBlocwood1(101, 0))
.setHardness(2.0F)
.setResistance(5F)
.setStepSound(Block.soundStoneFootstep)
.setBlockName("wood");

public int Texture1;
public int Texture2;

public mod_Blocwood1()
{
Blocwood1.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/wood/Blocwood1.png");
Texture1 = ModLoader.addOverride("/terrain.png", "/wood/woodmod.png");
Texture2 = ModLoader.addOverride("/terrain.png", "/wood/woodmod.png");
ModLoader.AddName(Blocwood1, "wood");
ModLoader.AddRecipe(
new ItemStack(Blocwood1, 2),
new Object[] {"##", Character.valueOf('#'), new ItemStack(Block.wood, 1, 0),}
);
}

public String Version()
{
return "1.7.3";
}
}



et le bloc:

package net.minecraft.src;
import java.util.Random;

public class BlockBlocwood1 extends Block
{
public BlockBlocwood1(int i, int j)
{
super(i, j, Material.wood);
}
public int getBlockTextureFromSide(int i)
{
if(i == 2)
{
return Texture1;
}
if(i == 3)
{
return Texture2;
}else
{
return blockIndexInTexture;
}
}
public int Texture1;
public int Texture2;

public int idDropped(int i, Random random)
{
return mod_Blocwood1.Blocwood.blockID;
}
}