Résolu Problème avec SideOnly.client
-
Bonjour, j’ai un problème avec le SideOnly.client, quand je me connecte au serveur, il y a un crash report, le voici:
–-- Minecraft Crash Report ---- // Oh - I know what I did wrong! Time: 15-01-02 23:09 Description: Ticking screen java.lang.NullPointerException: Ticking screen at cpw.mods.fml.client.FMLClientHandler.setPlayClient(FMLClientHandler.java:827) at net.minecraft.client.network.NetHandlerLoginClient.func_147232_a(NetHandlerLoginClient.java:113) at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:186) at net.minecraft.client.multiplayer.GuiConnecting.func_73876_c(SourceFile:76) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1601) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:917) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at fr.minecraftforgefrance.updater.Updater.runMinecraft(Updater.java:133) at fr.minecraftforgefrance.updater.Updater.<init>(Updater.java:96) at fr.minecraftforgefrance.updater.Updater.main(Updater.java:35) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at cpw.mods.fml.client.FMLClientHandler.setPlayClient(FMLClientHandler.java:827) at net.minecraft.client.network.NetHandlerLoginClient.func_147232_a(NetHandlerLoginClient.java:113) at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:186) at net.minecraft.client.multiplayer.GuiConnecting.func_73876_c(SourceFile:76) -- Affected screen -- Details: Screen name: net.minecraft.client.multiplayer.GuiConnecting Stacktrace: at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1601) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:917) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at fr.minecraftforgefrance.updater.Updater.runMinecraft(Updater.java:133) at fr.minecraftforgefrance.updater.Updater.<init>(Updater.java:96) at fr.minecraftforgefrance.updater.Updater.main(Updater.java:35) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 184168136 bytes (175 MB) / 293658624 bytes (280 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.03 FML v7.2.217.1161 Minecraft Forge 10.12.2.1161 Optifine OptiFine_1.7.2_HD_C2 7 mods loaded, 7 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available FML{7.2.217.1161} [Forge Mod Loader] (forge-1.7.2-10.12.2.1161-mc172.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Forge{10.12.2.1161} [Minecraft Forge] (forge-1.7.2-10.12.2.1161-mc172.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available craftguide{1.6.8.1} [CraftGuide] (CraftGuide-1.6.8.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available FallFight{1.0} [FallFight] (fallfight.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available inventorytweaks{1.57-116} [Inventory Tweaks] (InventoryTweaks-1.7.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available MenuFallFight{1.0} [MenuFallFight] (menu FallFight.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Launched Version: FallFight LWJGL: 2.9.0 OpenGL: GeForce GT 640/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1)
Ma class principal de mon mode:
package com.shox28.fallfight; import shox28.fallfight.items.tools.ToolAxe; import shox28.fallfight.items.tools.ToolHoe; import shox28.fallfight.items.tools.ToolPickaxe; import shox28.fallfight.items.tools.ToolShovel; import shox28.fallfight.items.tools.ToolSword; import shox28.fallfight.world.fallfightGenerator; import shox28.fallfight.world.fallfightGenerator2; import shox28.fallfight.world.fallfightGenerator3; import shox28.fallfight.world.fallfightGenerator4; import com.shox28.fallfight.blocks.OreOre; import com.shox28.fallfight.blocks.JumpBlock; import com.shox28.fallfight.blocks.SpeedBlock; import com.shox28.fallfight.blocks.fallfightBlock; import com.shox28.fallfight.blocks.InvisibleBlock; import com.shox28.fallfight.items.ArmorAdamite; import com.shox28.fallfight.items.ArmorDolonite; import com.shox28.fallfight.items.ArmorFall; import com.shox28.fallfight.items.ArmorMinium; import com.shox28.fallfight.items.ElementsApple; import com.shox28.fallfight.items.FireJewels; import com.shox28.fallfight.items.RegenJewels; import com.shox28.fallfight.items.SpeedJewels; import com.shox28.fallfight.items.StrengthJewels; import com.shox28.fallfight.items.fallfightItem; import com.shox28.fallfight.recipe.RiArmor; import com.shox28.fallfight.recipe.RiTools; import com.shox28.fallfight.recipe.RiWeapons; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import com.shox28.fallfight.proxy.CommonProxy; @Mod(modid = FallFight.MODID, version = FallFight.VERSION) public class FallFight { public static final String MODID = "FallFight"; public static final String VERSION = "1.0"; @SidedProxy(clientSide = "com.shox28.fallfight.proxy.ClientProxy", serverSide = "com.shox28.fallfight.proxy.CommonProxy") public static CommonProxy proxy; public static Block adamiteOre; public static Block adamiteBlock; public static Block doloniteOre; public static Block doloniteBlock; public static Block fallOre; public static Block fallBlock; public static Block miniumOre; public static Block miniumBlock; public static Block speedBlock; public static Block jumpBlock; public static Block compactedCobble; public static Block invisibleBlock; public static Item adamite; public static Item adamitePickaxe; public static Item adamiteAxe; public static Item adamiteShovel; public static Item adamiteHoe; public static Item adamiteSword; public static Item adamiteHelmet; public static Item adamiteChestplate; public static Item adamiteLeggings; public static Item adamiteBoots; public static Item dolonite; public static Item dolonitePickaxe; public static Item doloniteAxe; public static Item doloniteShovel; public static Item doloniteHoe; public static Item doloniteSword; public static Item doloniteHelmet; public static Item doloniteChestplate; public static Item doloniteLeggings; public static Item doloniteBoots; public static Item fall; public static Item fallPickaxe; public static Item fallAxe; public static Item fallShovel; public static Item fallHoe; public static Item fallSword; public static Item fallHelmet; public static Item fallChestplate; public static Item fallLeggings; public static Item fallBoots; public static Item minium; public static Item miniumDust; public static Item miniumPickaxe; public static Item miniumAxe; public static Item miniumShovel; public static Item miniumHoe; public static Item miniumSword; public static Item miniumHelmet; public static Item miniumChestplate; public static Item miniumLeggings; public static Item miniumBoots; public static Item speedJewels; public static Item strengthJewels; public static Item fireJewels; public static Item regenJewels; public static Item elementsApple; public static Item katanaSword; public static ToolMaterial katanaToolMaterial = EnumHelper.addToolMaterial("katanaMaterial", 3, 2500, 13.5F, 9.0F, 18); public static ToolMaterial adamiteToolMaterial = EnumHelper.addToolMaterial("adamiteMaterial", 3, 1800, 5.0F, 4.0F, 20); public static ToolMaterial doloniteToolMaterial = EnumHelper.addToolMaterial("doloniteMaterial", 3, 2000, 7.0F, 5.0F, 15); public static ToolMaterial miniumToolMaterial = EnumHelper.addToolMaterial("miniumMaterial", 3, 2150, 9.0F, 6.0F, 16); public static ToolMaterial fallToolMaterial = EnumHelper.addToolMaterial("fallMaterial", 3, 2300, 11.0F, 7.0F, 16); public static ArmorMaterial adamiteArmorMaterial = EnumHelper.addArmorMaterial("adamiteMaterial", 34, new int [] {3, 8, 6, 3}, 17); public static ArmorMaterial doloniteArmorMaterial = EnumHelper.addArmorMaterial("doloniteMaterial", 39, new int [] {4, 9, 7, 4}, 14); public static ArmorMaterial miniumArmorMaterial = EnumHelper.addArmorMaterial("miniumMaterial", 47, new int [] {5, 10, 8, 5}, 15); public static ArmorMaterial fallArmorMaterial = EnumHelper.addArmorMaterial("fallMaterial", 55, new int [] {6, 11, 9, 6}, 16); @EventHandler public void init(FMLInitializationEvent event) { compactedCobble = new fallfightBlock(Material.rock).setCreativeTab(CreativeTabs.tabBlock).setBlockName("compactedCobble").setHardness(3.0F).setResistance(3.0F).setStepSound(Block.soundTypeStone).setBlockTextureName("fallfight:compactedcobble"); GameRegistry.registerBlock(compactedCobble, "compactedCobble"); GameRegistry.addRecipe(new ItemStack(compactedCobble, 1), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.cobblestone}); GameRegistry.addShapelessRecipe(new ItemStack(Blocks.cobblestone, 9), new Object[]{compactedCobble}); /**Adamite*/ GameRegistry.registerBlock(adamiteOre, "adamiteOre"); GameRegistry.registerBlock(adamiteBlock, "adamiteBlock"); GameRegistry.registerItem(adamite, "adamite"); OreDictionary.registerOre("adamite", adamite); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(adamiteBlock, 1), true, new Object[] {"XXX", "XXX", "XXX", 'X', "adamite"})); GameRegistry.addShapelessRecipe(new ItemStack(adamite, 9), new Object[]{adamiteBlock}); GameRegistry.registerWorldGenerator(new fallfightGenerator(), 0); /**Dolonite*/ GameRegistry.registerBlock(doloniteOre, "doloniteOre"); GameRegistry.registerBlock(doloniteBlock, "doloniteBlock"); GameRegistry.registerItem(dolonite, "dolonite"); OreDictionary.registerOre("dolonite", dolonite); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(doloniteBlock, 1), true, new Object[] {"XXX", "XXX", "XXX", 'X', "dolonite"})); GameRegistry.addShapelessRecipe(new ItemStack(dolonite, 9), new Object[]{doloniteBlock}); GameRegistry.registerWorldGenerator(new fallfightGenerator2(), 0); /**Minium*/ GameRegistry.registerBlock(miniumOre, "miniumOre"); GameRegistry.registerBlock(miniumBlock, "miniumBlock"); GameRegistry.registerItem(minium, "minium"); GameRegistry.registerItem(miniumDust, "miniumDust"); OreDictionary.registerOre("minium", minium); OreDictionary.registerOre("miniumDust", miniumDust); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(miniumBlock, 1), true, new Object[] {"XXX", "XXX", "XXX", 'X', "minium"})); GameRegistry.addShapelessRecipe(new ItemStack(minium, 9), new Object[]{miniumBlock}); GameRegistry.registerWorldGenerator(new fallfightGenerator4(), 0); GameRegistry.addRecipe(new ItemStack(minium, 1), new Object[] {"XXX", "XXX", " ", 'X', FallFight.miniumDust}); GameRegistry.addRecipe(new ItemStack(minium, 1), new Object[] {" ", "XXX", "XXX", 'X', FallFight.miniumDust}); /**Fall*/ GameRegistry.registerBlock(fallOre, "fallOre"); GameRegistry.registerBlock(fallBlock, "fallBlock"); GameRegistry.registerItem(fall, "fall"); OreDictionary.registerOre("fall", fall); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fallBlock, 1), true, new Object[] {"XXX", "XXX", "XXX", 'X', "fall"})); GameRegistry.addShapelessRecipe(new ItemStack(fall, 9), new Object[]{fallBlock}); GameRegistry.registerWorldGenerator(new fallfightGenerator3(), 0); /**Joyaux**/ GameRegistry.addRecipe(new ItemStack(speedJewels, 1), new Object[] {" X ", "XZX", " X ", 'X', FallFight.doloniteBlock, 'Z', Items.sugar}); GameRegistry.addRecipe(new ItemStack(strengthJewels, 1), new Object[] {" X ", "XZX", " X ", 'X', FallFight.doloniteBlock, 'Z', Items.blaze_powder}); GameRegistry.addRecipe(new ItemStack(fireJewels, 1), new Object[] {" X ", "XZX", " X ", 'X', FallFight.doloniteBlock, 'Z', Items.magma_cream}); GameRegistry.addRecipe(new ItemStack(regenJewels, 1), new Object[] {" X ", "XZX", " X ", 'X', FallFight.doloniteBlock, 'Z', Items.ghast_tear}); GameRegistry.addRecipe(new ItemStack(elementsApple, 1), new Object[] {"OXO", "YZY", "OXO", 'X', FallFight.miniumBlock, 'Z', Items.apple, 'O', FallFight.fallBlock, 'Y', FallFight.doloniteBlock,}); /**Register des items de minerais**/ GameRegistry.registerItem(adamitePickaxe, "adamitePickaxe"); GameRegistry.registerItem(adamiteAxe, "adamiteAxe"); GameRegistry.registerItem(adamiteShovel, "adamiteShovel"); GameRegistry.registerItem(adamiteHoe, "adamiteHoe"); GameRegistry.registerItem(adamiteSword, "adamiteSword"); GameRegistry.registerItem(dolonitePickaxe, "dolonitePickaxe"); GameRegistry.registerItem(doloniteAxe, "doloniteAxe"); GameRegistry.registerItem(doloniteShovel, "doloniteShovel"); GameRegistry.registerItem(doloniteHoe, "doloniteHoe"); GameRegistry.registerItem(doloniteSword, "doloniteSword"); GameRegistry.registerItem(miniumPickaxe, "miniumPickaxe"); GameRegistry.registerItem(miniumAxe, "miniumAxe"); GameRegistry.registerItem(miniumShovel, "miniumShovel"); GameRegistry.registerItem(miniumHoe, "miniumHoe"); GameRegistry.registerItem(miniumSword, "miniumSword"); GameRegistry.registerItem(fallPickaxe, "fallPickaxe"); GameRegistry.registerItem(fallAxe, "fallAxe"); GameRegistry.registerItem(fallShovel, "fallShovel"); GameRegistry.registerItem(fallHoe, "fallHoe"); GameRegistry.registerItem(fallSword, "fallSword"); /**Register des armures de minerais**/ GameRegistry.registerItem(adamiteHelmet, "adamiteHelmet"); GameRegistry.registerItem(adamiteChestplate, "adamiteChestplate"); GameRegistry.registerItem(adamiteLeggings, "adamiteLeggings"); GameRegistry.registerItem(adamiteBoots, "adamiteBoots"); GameRegistry.registerItem(doloniteHelmet, "doloniteHelmet"); GameRegistry.registerItem(doloniteChestplate, "doloniteChestplate"); GameRegistry.registerItem(doloniteLeggings, "doloniteLeggings"); GameRegistry.registerItem(doloniteBoots, "doloniteBoots"); GameRegistry.registerItem(miniumHelmet, "miniumHelmet"); GameRegistry.registerItem(miniumChestplate, "miniumChestplate"); GameRegistry.registerItem(miniumLeggings, "miniumLeggings"); GameRegistry.registerItem(miniumBoots, "miniumBoots"); GameRegistry.registerItem(fallHelmet, "fallHelmet"); GameRegistry.registerItem(fallChestplate, "fallChestplate"); GameRegistry.registerItem(fallLeggings, "fallLeggings"); GameRegistry.registerItem(fallBoots, "fallBoots"); GameRegistry.registerItem(katanaSword, "katanaSword"); /**Register des nouveaux blocks**/ GameRegistry.registerBlock(speedBlock, "speedBlock"); GameRegistry.registerBlock(jumpBlock, "jumpBlock"); GameRegistry.registerBlock(invisibleBlock, "invisibleBlock"); /**Register des joyaux**/ GameRegistry.registerItem(speedJewels, "speedJewels"); GameRegistry.registerItem(strengthJewels, "strengthJewels"); GameRegistry.registerItem(fireJewels, "fireJewels"); GameRegistry.registerItem(regenJewels, "regenJewels"); GameRegistry.registerItem(elementsApple, "elementsApple"); } @Mod.EventHandler public void init(FMLPreInitializationEvent event) { System.out.println("preInit"); /**Textures-Tabs Minerais**/ adamiteOre = new OreOre().setBlockName("adamiteOre").setBlockTextureName(FallFight.MODID + ":adamiteOre"); adamiteBlock = new fallfightBlock(Material.iron).setBlockName("adamiteBlock").setBlockTextureName(MODID + ":adamiteBlock").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabBlock); adamite = new fallfightItem().setTextureName(MODID + ":adamite").setUnlocalizedName("adamite").setCreativeTab(CreativeTabs.tabMaterials); doloniteOre = new OreOre().setBlockName("doloniteOre").setBlockTextureName(FallFight.MODID + ":doloniteOre"); doloniteBlock = new fallfightBlock(Material.iron).setBlockName("doloniteBlock").setBlockTextureName(MODID + ":doloniteBlock").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabBlock); dolonite = new fallfightItem().setTextureName(MODID + ":dolonite").setUnlocalizedName("dolonite").setCreativeTab(CreativeTabs.tabMaterials); miniumOre = new OreOre().setBlockName("miniumOre").setBlockTextureName(FallFight.MODID + ":miniumOre"); miniumBlock = new fallfightBlock(Material.iron).setBlockName("miniumBlock").setBlockTextureName(MODID + ":miniumBlock").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabBlock); minium = new fallfightItem().setTextureName(MODID + ":minium").setUnlocalizedName("minium").setCreativeTab(CreativeTabs.tabMaterials); miniumDust = new fallfightItem().setTextureName(MODID + ":miniumDust").setUnlocalizedName("miniumDust").setCreativeTab(CreativeTabs.tabMaterials); fallOre = new OreOre().setBlockName("fallOre").setBlockTextureName(FallFight.MODID + ":fallOre"); fallBlock = new fallfightBlock(Material.iron).setBlockName("fallBlock").setBlockTextureName(MODID + ":fallBlock").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabBlock); fall = new fallfightItem().setTextureName(MODID + ":fall").setUnlocalizedName("fall").setCreativeTab(CreativeTabs.tabMaterials); /**Textures-Tabs Outils*/ adamitePickaxe = new ToolPickaxe(adamiteToolMaterial).setTextureName(MODID + ":adamitePickaxe").setUnlocalizedName("adamitePickaxe").setCreativeTab(CreativeTabs.tabTools); adamiteAxe = new ToolAxe(adamiteToolMaterial).setTextureName(MODID + ":adamiteAxe").setUnlocalizedName("adamiteAxe").setCreativeTab(CreativeTabs.tabTools); adamiteShovel = new ToolShovel(adamiteToolMaterial).setTextureName(MODID + ":adamiteShovel").setUnlocalizedName("adamiteShovel").setCreativeTab(CreativeTabs.tabTools); adamiteHoe = new ToolHoe(adamiteToolMaterial).setTextureName(MODID + ":adamiteHoe").setUnlocalizedName("adamiteHoe").setCreativeTab(CreativeTabs.tabTools); adamiteSword = new ToolSword(adamiteToolMaterial).setTextureName(MODID + ":adamiteSword").setUnlocalizedName("adamiteSword").setCreativeTab(CreativeTabs.tabCombat); dolonitePickaxe = new ToolPickaxe(doloniteToolMaterial).setTextureName(MODID + ":dolonitePickaxe").setUnlocalizedName("dolonitePickaxe").setCreativeTab(CreativeTabs.tabTools); doloniteAxe = new ToolAxe(doloniteToolMaterial).setTextureName(MODID + ":doloniteAxe").setUnlocalizedName("doloniteAxe").setCreativeTab(CreativeTabs.tabTools); doloniteShovel = new ToolShovel(doloniteToolMaterial).setTextureName(MODID + ":doloniteShovel").setUnlocalizedName("doloniteShovel").setCreativeTab(CreativeTabs.tabTools); doloniteHoe = new ToolHoe(doloniteToolMaterial).setTextureName(MODID + ":doloniteHoe").setUnlocalizedName("doloniteHoe").setCreativeTab(CreativeTabs.tabTools); doloniteSword = new ToolSword(doloniteToolMaterial).setTextureName(MODID + ":doloniteSword").setUnlocalizedName("doloniteSword").setCreativeTab(CreativeTabs.tabCombat); miniumPickaxe = new ToolPickaxe(miniumToolMaterial).setTextureName(MODID + ":miniumPickaxe").setUnlocalizedName("miniumPickaxe").setCreativeTab(CreativeTabs.tabTools); miniumAxe = new ToolAxe(miniumToolMaterial).setTextureName(MODID + ":miniumAxe").setUnlocalizedName("miniumAxe").setCreativeTab(CreativeTabs.tabTools); miniumShovel = new ToolShovel(fallToolMaterial).setTextureName(MODID + ":miniumShovel").setUnlocalizedName("miniumShovel").setCreativeTab(CreativeTabs.tabTools); miniumHoe = new ToolHoe(miniumToolMaterial).setTextureName(MODID + ":miniumHoe").setUnlocalizedName("miniumHoe").setCreativeTab(CreativeTabs.tabTools); miniumSword = new ToolSword(miniumToolMaterial).setTextureName(MODID + ":miniumSword").setUnlocalizedName("miniumSword").setCreativeTab(CreativeTabs.tabCombat); fallPickaxe = new ToolPickaxe(fallToolMaterial).setTextureName(MODID + ":fallPickaxe").setUnlocalizedName("fallPickaxe").setCreativeTab(CreativeTabs.tabTools); fallAxe = new ToolAxe(fallToolMaterial).setTextureName(MODID + ":fallAxe").setUnlocalizedName("fallAxe").setCreativeTab(CreativeTabs.tabTools); fallShovel = new ToolShovel(fallToolMaterial).setTextureName(MODID + ":fallShovel").setUnlocalizedName("fallShovel").setCreativeTab(CreativeTabs.tabTools); fallHoe = new ToolHoe(fallToolMaterial).setTextureName(MODID + ":fallHoe").setUnlocalizedName("fallHoe").setCreativeTab(CreativeTabs.tabTools); fallSword = new ToolSword(fallToolMaterial).setTextureName(MODID + ":fallSword").setUnlocalizedName("fallSword").setCreativeTab(CreativeTabs.tabCombat); katanaSword = new ToolSword(katanaToolMaterial).setTextureName(MODID + ":katanaSword").setUnlocalizedName("katanaSword").setCreativeTab(CreativeTabs.tabCombat); /**Textures/Tabs Armures**/ adamiteHelmet = new ArmorAdamite(adamiteArmorMaterial, 0).setTextureName(MODID + ":adamiteHelmet").setUnlocalizedName("adamiteHelmet").setCreativeTab(CreativeTabs.tabCombat); adamiteChestplate = new ArmorAdamite(adamiteArmorMaterial, 1).setTextureName(MODID + ":adamiteChestplate").setUnlocalizedName("adamiteChestplate").setCreativeTab(CreativeTabs.tabCombat); adamiteLeggings = new ArmorAdamite(adamiteArmorMaterial, 2).setTextureName(MODID + ":adamiteLeggings").setUnlocalizedName("adamiteLeggings").setCreativeTab(CreativeTabs.tabCombat); adamiteBoots = new ArmorAdamite(adamiteArmorMaterial, 3).setTextureName(MODID + ":adamiteBoots").setUnlocalizedName("adamiteBoots").setCreativeTab(CreativeTabs.tabCombat); doloniteHelmet = new ArmorDolonite(doloniteArmorMaterial, 0).setTextureName(MODID + ":doloniteHelmet").setUnlocalizedName("doloniteHelmet").setCreativeTab(CreativeTabs.tabCombat); doloniteChestplate = new ArmorDolonite(doloniteArmorMaterial, 1).setTextureName(MODID + ":doloniteChestplate").setUnlocalizedName("doloniteChestplate").setCreativeTab(CreativeTabs.tabCombat); doloniteLeggings = new ArmorDolonite(doloniteArmorMaterial, 2).setTextureName(MODID + ":doloniteLeggings").setUnlocalizedName("doloniteLeggings").setCreativeTab(CreativeTabs.tabCombat); doloniteBoots = new ArmorDolonite(doloniteArmorMaterial, 3).setTextureName(MODID + ":doloniteBoots").setUnlocalizedName("doloniteBoots").setCreativeTab(CreativeTabs.tabCombat); miniumHelmet = new ArmorMinium(miniumArmorMaterial, 0).setTextureName(MODID + ":miniumHelmet").setUnlocalizedName("miniumHelmet").setCreativeTab(CreativeTabs.tabCombat); miniumChestplate = new ArmorMinium(miniumArmorMaterial, 1).setTextureName(MODID + ":miniumChestplate").setUnlocalizedName("miniumChestplate").setCreativeTab(CreativeTabs.tabCombat); miniumLeggings = new ArmorMinium(miniumArmorMaterial, 2).setTextureName(MODID + ":miniumLeggings").setUnlocalizedName("miniumLeggings").setCreativeTab(CreativeTabs.tabCombat); miniumBoots = new ArmorMinium(miniumArmorMaterial, 3).setTextureName(MODID + ":miniumBoots").setUnlocalizedName("miniumBoots").setCreativeTab(CreativeTabs.tabCombat); fallHelmet = new ArmorFall(fallArmorMaterial, 0).setTextureName(MODID + ":fallHelmet").setUnlocalizedName("fallHelmet").setCreativeTab(CreativeTabs.tabCombat); fallChestplate = new ArmorFall(fallArmorMaterial, 1).setTextureName(MODID + ":fallChestplate").setUnlocalizedName("fallChestplate").setCreativeTab(CreativeTabs.tabCombat); fallLeggings = new ArmorFall(fallArmorMaterial, 2).setTextureName(MODID + ":fallLeggings").setUnlocalizedName("fallLeggings").setCreativeTab(CreativeTabs.tabCombat); fallBoots = new ArmorFall(fallArmorMaterial, 3).setTextureName(MODID + ":fallBoots").setUnlocalizedName("fallBoots").setCreativeTab(CreativeTabs.tabCombat); invisibleBlock = new InvisibleBlock(); speedBlock = new SpeedBlock(); jumpBlock = new JumpBlock(); speedJewels = new SpeedJewels(); strengthJewels = new StrengthJewels(); fireJewels = new FireJewels(); regenJewels = new RegenJewels(); elementsApple = new ElementsApple(0, 0, false); FallFight.loadRecipes(); } public static void loadRecipes() { new RiWeapons().addRecipes(CraftingManager.getInstance()); new RiArmor().addRecipes(CraftingManager.getInstance()); new RiTools().addRecipes(CraftingManager.getInstance()); } }
Si il y a besoin d’un autre class, veuillez me le dire s’il vous plaît, merci.</init></init>
-
Salut, je ne vois pas quel est le rapport avec @SideOnly …
Tu te connecte comment au serveur ? -
Tu utilise une librarie/API externe ?
-
Mon serveur est sous cauldron et je me connecte sous un mods GuiCustomMainMenu
et pour les libraries j’utilise aucune libraries externe.
-
Le code de ton bouton de connexion n’ai pas bon.
http://www.minecraftforgefrance.fr/search.php?action=results&sid=ec54c5f7d902511cde61de4eee673365&sortby=lastpostℴ=desc -
Regarder, j’ai cette erreur avec le GuiCustomMainMenu:
–-- Minecraft Crash Report ---- // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~] Time: 15-01-03 17:20 Description: Ticking screen java.lang.NullPointerException: Ticking screen at cpw.mods.fml.client.FMLClientHandler.setPlayClient(FMLClientHandler.java:827) at net.minecraft.client.network.NetHandlerLoginClient.func_147232_a(NetHandlerLoginClient.java:113) at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:186) at net.minecraft.client.multiplayer.GuiConnecting.func_73876_c(SourceFile:76) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1601) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:917) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at fr.minecraftforgefrance.updater.Updater.runMinecraft(Updater.java:133) at fr.minecraftforgefrance.updater.Updater.<init>(Updater.java:96) at fr.minecraftforgefrance.updater.Updater.main(Updater.java:35) A detailed walkthrough of the error, its code path and all known details is as follows: –------------------------------------------------------------------------------------- -- Head -- Stacktrace: at cpw.mods.fml.client.FMLClientHandler.setPlayClient(FMLClientHandler.java:827) at net.minecraft.client.network.NetHandlerLoginClient.func_147232_a(NetHandlerLoginClient.java:113) at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:186) at net.minecraft.client.multiplayer.GuiConnecting.func_73876_c(SourceFile:76) -- Affected screen -- Details: Screen name: net.minecraft.client.multiplayer.GuiConnecting Stacktrace: at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1601) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:917) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at fr.minecraftforgefrance.updater.Updater.runMinecraft(Updater.java:133) at fr.minecraftforgefrance.updater.Updater.<init>(Updater.java:96) at fr.minecraftforgefrance.updater.Updater.main(Updater.java:35) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 227427024 bytes (216 MB) / 339202048 bytes (323 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.03 FML v7.2.217.1161 Minecraft Forge 10.12.2.1161 Optifine OptiFine_1.7.2_HD_C2 7 mods loaded, 7 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available FML{7.2.217.1161} [Forge Mod Loader] (forge-1.7.2-10.12.2.1161-mc172.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Forge{10.12.2.1161} [Minecraft Forge] (forge-1.7.2-10.12.2.1161-mc172.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available craftguide{1.6.8.1} [CraftGuide] (CraftGuide-1.6.8.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available FallFight{1.0} [FallFight] (fallfight.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available inventorytweaks{1.57-116} [Inventory Tweaks] (InventoryTweaks-1.7.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available MenuFallFight{1.0} [MenuFallFight] (menu FallFight.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Launched Version: FallFight LWJGL: 2.9.0 OpenGL: GeForce GT 640/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1) ```</init></init>
-
Ah, ok, Merci grandement, je vais essayer!
-
Le problème n’est finalement pas règler, je vais vous envoyer la GuiMainMenu.
package ca.shox28.fallfight.GUI; import java.awt.Desktop; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URI; import java.net.URL; import java.util.Random; import net.minecraft.client.renderer.texture.TextureManager; import org.lwjgl.opengl.GL11; import ca.shox28.fallfight.api.ApiInfo; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiOptions; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiSelectWorld; import net.minecraft.client.multiplayer.GuiConnecting; import net.minecraft.client.multiplayer.ServerData; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft.util.EnumChatFormatting; public class GuiMainMenuCustom extends GuiScreen { private static final Random rand = new Random(); BufferedReader buffer = null; FileOutputStream fos = null; InputStream is = null; private BufferedImage buffered; private String text; private int textPosition; private ApiInfo infos = new ApiInfo("FallFight", "77.111.199.195:25565"); net.minecraft.util.ResourceLocation bg; net.minecraft.util.ResourceLocation logo; private float updateCounter; private String field_92025_p; String motd = infos.getMOTD(); String serverName = infos.getName(); String version = infos.getVersion(); String population = infos.getPopulation(); long ping = infos.getPing(); boolean acceptedTexture = infos.getAcceptedTextures(); public GuiMainMenuCustom() { infos.pre_init(); //… } public void initGui() { System.out.println("initialisation du menu >>"); this.bg = new net.minecraft.util.ResourceLocation("fallfight", "textures/gui/bk.png"); Object var1 = null; this.updateCounter = rand.nextFloat(); this.field_92025_p = ""; try { this.text = readFile("http://fallfight.craft.vg/launcher/shox28/annonceClient.txt") .replace("&2", "§2") .replace("&3", "§3") .replace("&4", "§4") .replace("&5", "§5") .replace("&6", "§6") .replace("&7", "§7") .replace("&8", "§8") .replace("&9", "§9") .replace("&a", "§a") .replace("&b", "§b") .replace("&c", "§c") .replace("&l", "§l") .replace("&k", "§k") .replace("&k", "§k") .replace("&r", "§r") .replace("&f", "§f") .replace("{USERNAME}", "" + "\u00a7l\u00a7n" + this.mc.getSession().getUsername()); } catch (Exception var3) { ; } this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height - 50, 95, 20, I18n.format("menu.options", new Object[0]))); this.buttonList.add(new GuiButton(1, this.width / 2 + 5, this.height - 50, 95, 20, I18n.format("menu.quit", new Object[0]))); this.buttonList.add(new GuiButton(2, this.width / 2 - 100, this.height - 75, 95, 20, I18n.format("Solo", new Object[0]))); this.buttonList.add(new GuiButton(3, this.width / 2 + 5, this.height - 75, 95, 20, I18n.format("Site FallFight", new Object[0]))); this.buttonList.add(new GuiButton(8, this.width / 2 - 100, this.height - 100, I18n.format(EnumChatFormatting.YELLOW + "Rejoindre FallFight", new Object[0]))); } private void connectToServer(ServerData par1ServerData) { this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, par1ServerData)); } /** * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e). */ protected void actionPerformed(GuiButton par1GuiButton) { URI var7; if (par1GuiButton.id == 0) { this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); } if (par1GuiButton.id == 1) { this.mc.shutdown(); } if (par1GuiButton.id == 2) { this.mc.displayGuiScreen(new GuiSelectWorld(this)); } if (par1GuiButton.id == 3) { try { var7 = new URI("http://www.fallfight.fr/accueil/"); if (Desktop.isDesktopSupported()) { Desktop.getDesktop().browse(var7); } } catch (Exception var4) { var4.printStackTrace(); } } if (par1GuiButton.id == 8) { this.mc.displayGuiScreen(new GuiConnecting(this, mc, "77.111.199.195", 25565)); } } /** * Called from the main game loop to update the screen. */ public void updateScreen() { if (this.textPosition < 0 - this.mc.fontRenderer.getStringWidth(this.text)) { this.textPosition = this.width / 2 + 220; } this.textPosition -= 2; infos.refresh(); } public void onGuiClosed() { infos.close(); super.onGuiClosed(); } public void drawBackground() { GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_FOG); Tessellator var2 = Tessellator.instance; GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); this.mc.getTextureManager().bindTexture(bg); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); var2.startDrawingQuads(); var2.addVertexWithUV(0.0D, (double)this.height, 0.0D, 0.0D, 1.0D); var2.addVertexWithUV((double)this.width, (double)this.height, 0.0D, 1.0D, 1.0D); var2.addVertexWithUV((double)this.width, 0.0D, 0.0D, 1.0D, 0.0D); var2.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D); var2.draw(); drawRect(0, 0, this.width, 12, -1728053248); } public void drawScreen(int par1, int par2, float par3) { this.drawBackground(); this.drawString(this.fontRendererObj, EnumChatFormatting.WHITE + this.text, this.textPosition, 2, 12128795); String var9 = "FallFight v1.0 by" + EnumChatFormatting.RED + " Shox28 :)"; this.drawString(this.fontRendererObj, var9, 2, this.height - 10, 16777215); super.drawScreen(par1, par2, par3); int middleX = this.width / 2; int middleY = this.height / 2; int titleLen = this.fontRendererObj.getStringWidth("§4" + infos.getName() + "§r " + infos.getVersion()); int populationLen = this.fontRendererObj.getStringWidth(infos.getMOTD()); titleLen = titleLen > populationLen ? titleLen : populationLen; boolean icon = true; int pingLen = this.fontRendererObj.getStringWidth(infos.getPing() + "ms") + (icon ? 12 : 0); drawRect(middleX - 120, middleY + 10, middleX + 120, this.height - 20, 0x99000000); drawRect(middleX - titleLen / 2 - 25, middleY - 50, middleX - titleLen / 2 - 5, middleY + 10, 0x99000000); drawRect(middleX + titleLen / 2 + 5, middleY - 50, middleX + titleLen / 2 + 25, middleY + 10, 0x99000000); drawRect(middleX - titleLen / 2 - 5, middleY - 50, middleX + titleLen / 2 + 5, middleY - 30, 0x99000000); this.drawCenteredString(this.fontRendererObj, EnumChatFormatting.RED + infos.getName() + EnumChatFormatting.WHITE + infos.getVersion(), middleX, middleY - 40, 0xffffff); this.drawCenteredString(this.fontRendererObj, infos.getMOTD(), middleX, middleY - 20, 0xffffff); this.drawString(this.fontRendererObj, infos.getPopulation(), middleX - titleLen / 2, middleY - 5, 0xffffff); infos.drawIconPing(this, middleX + titleLen / 2 - pingLen, middleY - 5, icon); super.drawScreen(par1, par2, par3); } public void drawTexturedModalRectWithOptionnalSize(int x, int y, int u, int v, int width, int height) { float scaledX = 1.0F / (float)width; float scaledY = 1.0F / (float)height; Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)this.zLevel, (double)((float)(u + 0) * scaledX), (double)((float)(v + height) * scaledY)); tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)this.zLevel, (double)((float)(u + width) * scaledX), (double)((float)(v + height) * scaledY)); tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)this.zLevel, (double)((float)(u + width) * scaledX), (double)((float)(v + 0) * scaledY)); tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)this.zLevel, (double)((float)(u + 0) * scaledX), (double)((float)(v + 0) * scaledY)); tessellator.draw(); } public void drawTexturedModalRectWithOptionnalSize(int x, int y, int u, int v, int width, int height, int uSize, int vSize) { float scaledX = 1.0F / (float)uSize; float scaledY = 1.0F / (float)vSize; Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)this.zLevel, (double)((float)(u + 0) * scaledX), (double)((float)(v + height) * scaledY)); tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)this.zLevel, (double)((float)(u + width) * scaledX), (double)((float)(v + height) * scaledY)); tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)this.zLevel, (double)((float)(u + width) * scaledX), (double)((float)(v + 0) * scaledY)); tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)this.zLevel, (double)((float)(u + 0) * scaledX), (double)((float)(v + 0) * scaledY)); tessellator.draw(); } private static String readFile(String url) { String text = ""; try { URL e = new URL(url); BufferedReader in = new BufferedReader(new InputStreamReader(e.openStream())); text = in.readLine(); return text; } catch (Exception var4) { System.out.println("error while reading news"); return "Connexion aux nouvelle echoue…"; } } public static String getHTML(String urlToRead) { String result = ""; try { URL e = new URL(urlToRead); HttpURLConnection conn = (HttpURLConnection)e.openConnection(); conn.setRequestMethod("GET"); BufferedReader rd; String line; for (rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); (line = rd.readLine()) != null; result = result + line) { ; } rd.close(); return result; } catch (Exception var6) { System.out.println("error while reading online player"); return "?"; } } static BufferedImage access$102(GuiMainMenuCustom x0, BufferedImage x1) { return x0.buffered = x1; } }
Class FallFight Menu.
package ca.shox28.fallfight.common; import ca.shox28.fallfight.GUI.GuiInGameMenuCustom; import ca.shox28.fallfight.GUI.GuiMainMenuCustom; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.gui.GuiScreen; import net.minecraft.init.Blocks; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.gameevent.TickEvent.Phase; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @Mod(modid = FallFightMain.MODID, version = FallFightMain.VERSION) public class FallFightMain { public static final String MODID = "MenuFallFight"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(this); System.out.println("Mods menu FallFight"); } /**Gui menu*/ @SubscribeEvent @SideOnly(Side.CLIENT) public void onTickClient(TickEvent.ClientTickEvent event) { if(event.phase == Phase.END) { Minecraft mc = Minecraft.getMinecraft(); GuiScreen currentScreen = mc.currentScreen; GuiMainMenuCustom customMenu = new GuiMainMenuCustom(); if(currentScreen instanceof GuiMainMenu && !currentScreen.equals(customMenu)) { mc.displayGuiScreen(customMenu); } } if(event.phase == Phase.END) { Minecraft mc = Minecraft.getMinecraft(); GuiScreen currentScreen = mc.currentScreen; GuiInGameMenuCustom customMenu = new GuiInGameMenuCustom(); if(currentScreen instanceof GuiIngameMenu && !currentScreen.equals(customMenu)) { mc.displayGuiScreen(customMenu); } } } }
-
…
Il ne faut pas utiliserthis.mc.displayGuiScreen(new GuiConnecting(this, mc, "77.111.199.195", 25565));
Mais :
FMLClientHandler.instance().setupServerList(); FMLClientHandler.instance().connectToServer(this, new ServerData("Nom du serveur", "77.111.199.195:25565"));