Erreur de variable l
-
Ton problème vient de là :
public static String[] type = new String[]{"crepiocrstone, crepibleustone, crepiblancstone, crepicyanstone, crepigristone, crepijaunestone, " + "crepiorangestone, crepiparmestone, crepirosestone, crepivertstone"};tu dois faire comme ça :
public static String[] type = new String[]{"block1", "block2", "block3", "block4", "block5", "block6", "block7", "block8"};et en théorie cela doit donner (si je me suis pas trompé en cc) :
public static String[] type = new String[]{"crepiocrstone", "crepibleustone", "crepiblancstone", "crepicyanstone", "crepigristone", "crepijaunestone","crepiorangestone","crepiparmestone", "crepirosestone", "crepivertstone"}; -
re,
Non cela change rien toujours la même chose.
Bounty…
public static String[] type = new String[]{"blockcrepinoir, blockcrepirouge, blockcrepivertfonce, blockcrepiocre, blockcrepibleufonce, blockcrepiparme, blockcrepicyan, " + "blockcrepigris, blockcrepigrisfonce, blockcrepirose, blockcrepivert, blockcrepijaune, blockcrepibleu, blockcrepimagenta, blockcrepiorange, blockcrepiblanc"};j’ai ça actuellement.
-
Pourtant c’est ça, ton tableau type est mal déclaré. Tu as quoi actuellement ?
-
re Bonjour robin4002,
j’ai ça actuellement:package bountycraft.common; import java.util.List; 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.item.ItemStack; import net.minecraft.util.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockCrepiMetadata extends Block { public static String[] type = new String[]{"blockcrepinoir, blockcrepirouge, blockcrepivertfonce, blockcrepiocre, blockcrepibleufonce, blockcrepiparme, blockcrepicyan, " "blockcrepigris, blockcrepigrisfonce, blockcrepirose, blockcrepivert, blockcrepijaune, blockcrepibleu, blockcrepimagenta, blockcrepiorange, blockcrepiblanc"}; private Icon[] IconArray; public BlockCrepiMetadata(int id) { super(id, Material.rock); this.setCreativeTab(ModBountyCraft.BlockBountyCraftCreativeTabs); } public void registerIcons(IconRegister iconregister) { IconArray = new Icon[type.length]; for(int i = 0; i < type.length; i++) { IconArray* = iconregister.registerIcon("modbountycraft:" + type*); } } @SideOnly(Side.CLIENT) public void getSubBlocks(int id, CreativeTabs creativeTabs, List list) { for(int metadata = 0; metadata < type.length; metadata++) { list.add(new ItemStack(id, l, metadata)); } } @SideOnly(Side.CLIENT) public Icon getIcon(int side, int metadata) { return metadata < type.length && metadata >= 0 ? IconArray[metadata] : IconArray[0]; } public int damageDropped(int metadata) { return metadata; } }désolé pour le doublon de script dans le post.
Bounty…
-
public static String[] type = new String[]{"blockcrepinoir, blockcrepirouge, blockcrepivertfonce, blockcrepiocre, blockcrepibleufonce, blockcrepiparme, blockcrepicyan, " "blockcrepigris, blockcrepigrisfonce, blockcrepirose, blockcrepivert, blockcrepijaune, blockcrepibleu, blockcrepimagenta, blockcrepiorange, blockcrepiblanc"};->
public static String[] type = new String[]{"blockcrepinoir", "blockcrepirouge", "blockcrepivertfonce", "blockcrepiocre", "blockcrepibleufonce", "blockcrepiparme", "blockcrepicyan", "blockcrepigris", "blockcrepigrisfonce", "blockcrepirose", "blockcrepivert", "blockcrepijaune", "blockcrepibleu", "blockcrepimagenta", "blockcrepiorange", "blockcrepiblanc"};C’est ce que Patatoufet t’as dit de faire.
-
re voila ce que j’ai en rectifiant ce que tu a mis ci-dessus.:

pourtant j’ai bien mis mes textures au bon endroit.
-
Ton emplacement est bien modbountycraft/textures/blocks/ ?
Dans ta console tu dois avoir une alerte du style[Grave] [Minecraft-Client] Using missing texture, unable to load: chemin de la texture indiquéCela peut t’aider à résoudre le problème.
-
re oui mon emplacement est bien microbouturage/textures/blocks/
et voila ce que j’ai dans la console:2013-11-20 18:10:42 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: modbountycraft:textures/blocks/blockcrepimagenta, blockcrepiorange, blockcrepiblanc.png
2013-11-20 18:10:42 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: modbountycraft:textures/blocks/blockcrepiocre, blockcrepibleufonce, blockcrepiparme, blockcrepicyan, blockcrepigris.png
2013-11-20 18:10:42 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: modbountycraft:textures/blocks/blockcrepinoir, blockcrepirouge, blockcrepivertfonce.png
2013-11-20 18:10:42 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: modbountycraft:textures/blocks/blockcrepigrisfonce, blockcrepirose, blockcrepivert, blockcrepijaune, blockcrepibleu.png -
Toujours pas bon …
Tu dois mettre des guillemets avant et après chaque nous, il ne doit avoir aucunes virgules dans les String, car elles sont là pour séparer les String
C’est pourtant pas compliqué … -
c’est bon ça marche, je suis désolé pour les guillemets avant et après, c’était devant mes yeux et je ne le voyais pas,
j’ai tellement manger de code depuis ce matin pour refaire mon mod, et comme je n’avait pas encore fait de Metadat donc voila.Encore merci et désolé pour mon problème.
Bounty…