• Bonjour ! Alors j'ai un petit problème concernant ma créative tab…Hier quand je l'ai codé elle marchait parfaitement bien mais aujourd'hui quand j'ai jaouté le fait qu'on ne puisse pas voir les pseudos d'autres joueurs, elle crash ! ET je n'arrive pas à trouver d'ou viens le problème...

    Le rapport d'erreur: http://pastebin.com/h5tNK1BV
    Le code de la créativetab : ```java
    package fr.oeilomega.wozcontent.common;

    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;

    public class WozCreativeTab extends CreativeTabs {

    public WozCreativeTab(String label)
    {
    super(label);

    }

    public Item getTabIconItem()
    {

    return wozcontent.Bandage;
    }

    }

    La classe du mod:```java
    package fr.oeilomega.wozcontent.common;
    
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.EventHandler;
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.SidedProxy;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cpw.mods.fml.common.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import fr.oeilomega.wozcontent.proxy.CommonProxy;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.Item;
    import net.minecraft.item.Item.ToolMaterial;
    import net.minecraftforge.client.event.RenderLivingEvent;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.common.util.EnumHelper;
    import fr.oeilomega.wozcontent.common.WozCreativeTab;
    
    @Mod(modid="wozcontent", name="Woz Content", version="1.0.0")
    public class wozcontent
    {
    @Mod.Instance("wozcontent")
    public static wozcontent instance;
    public static final String MODID = "wozcontent";
    @SidedProxy(clientSide="fr.oeilomega.wozcontent.proxy.ClientProxy", serverSide="fr.oeilomega.wozcontent.proxy.CommonProxy")
    public static CommonProxy proxy;
    public static Item Food;
    public static Item Food2;
    public static Item Food3;
    public static Item Food4;
    public static Item Bandage;
    public static Item Morphine;
    public static Item Adrenaline;
    public static Item Fireaxe;
    public static Item tacticalknife;
    public static Item machete;
    public static Item Bloodbag;
    
    public static ToolMaterial wozweapon1 = EnumHelper.addToolMaterial("WozWeapons1", 0, 352, 0.0F, 6.0F, 0);
    public static ToolMaterial wozweapon2 = EnumHelper.addToolMaterial("WozWeapons2", 0, 564, 0.0F, 4.0F, 0);
    public static ToolMaterial wozweapon3 = EnumHelper.addToolMaterial("WozWeapons3", 0, 222, 0.0F, 5.0F, 0);
    
    public static final CreativeTabs WozCreativeTab = new WozCreativeTab("WozCreativeTab");
    
    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    MinecraftForge.EVENT_BUS.register(this);
    }
    
    @SubscribeEvent
    @SideOnly(Side.CLIENT)
    public void onRenderLabel(RenderLivingEvent.Specials.Pre event)
    {
    if(event.entity instanceof EntityPlayer)
    {
    event.setCanceled(true);
    
    Food = new Food(5, 0.3F, false).setUnlocalizedName("Canned Beans").setTextureName("Food:canned beans").setCreativeTab(WozCreativeTab);
    Food2 = new Food(5, 0.3F, false).setUnlocalizedName("Canned Pasta").setTextureName("Food:canned pasta").setCreativeTab(WozCreativeTab);
    Food3 = new Food(5, 0.3F, false).setUnlocalizedName("Canned Fish").setTextureName("Food:canned fish").setCreativeTab(WozCreativeTab);
    Food4 = new Food(5, 0.3F, false).setUnlocalizedName("Canned Sausages").setTextureName("Food:canned sausages").setCreativeTab(WozCreativeTab);
    Bandage = new Bandage().setUnlocalizedName("Bandage").setTextureName("Food:Bandage").setCreativeTab(WozCreativeTab);
    Morphine = new Morphine().setUnlocalizedName("Morphine").setTextureName("Food:Morphine").setCreativeTab(WozCreativeTab);
    Adrenaline = new Adrenaline().setUnlocalizedName("Adrenaline").setTextureName("Food:Adrenaline").setCreativeTab(WozCreativeTab);
    Bloodbag = new Bloodbag().setUnlocalizedName("Bloodbag").setTextureName("Food:Bloodbag").setCreativeTab(WozCreativeTab);
    Fireaxe = new Fireaxe(wozweapon1).setUnlocalizedName("Fire Axe").setTextureName("Food:Fire Axe").setCreativeTab(WozCreativeTab);
    tacticalknife = new tacticalknife(wozweapon2).setUnlocalizedName("Tactical Knife").setTextureName("Food: Tactical Knife").setCreativeTab(WozCreativeTab);
    machete = new machete(wozweapon3).setUnlocalizedName("Machete").setTextureName("Food: Machete").setCreativeTab(WozCreativeTab);
    
    GameRegistry.registerItem(Food, "Food");
    GameRegistry.registerItem(Food2, "Food2");
    GameRegistry.registerItem(Food3, "Food3");
    GameRegistry.registerItem(Food4, "Food4");
    GameRegistry.registerItem(Bandage, "Bandage");
    GameRegistry.registerItem(Morphine, "Morphine");
    GameRegistry.registerItem(Adrenaline, "Adrenaline");
    GameRegistry.registerItem(Fireaxe, "Fireaxe");
    GameRegistry.registerItem(tacticalknife, "TacticalKnife");
    GameRegistry.registerItem(machete, "Machete");
    GameRegistry.registerItem(Bloodbag, "Bloodbag");
    
    }
    
    }
    @Mod.EventHandler
    public void init(FMLInitializationEvent event) {}
    
    @Mod.EventHandler
    public void postInit(FMLPostInitializationEvent event) {}
    }
    
    

    merci d'avançe !

    EDIT:problème résolu...No comment

  • Modérateurs

    C'est quoi ces déclarations d'items dans un event de rendu o_O

    Va voir les bases, tout de suite, c'est urgent là

    • Merci de respecter les conventions
  • Moddeurs confirmés Modérateurs

    qu'un mot a dire: GG


  • Je vais dire pareil que isador : GG


  • Je laisse mon mod parler 😛

  • Moddeurs confirmés Modérateurs

    @'MrAzErTy31':

    Je laisse mon mod parler 😛

    xD


  • @'MrAzErTy31':

    Je laisse mon mod parler 😛

    XDDDDDD