SOLVED Crash de mon serveur dans Eclipse


  • Bonjour,

    Tout est dans le titre.
    Voici le crash report que je n'arrive pas a comprendre!

    –-- Minecraft Crash Report ----
    // This doesn't make any sense!
    
    Time: 27/08/17 01:32
    Description: Exception in server tick loop
    
    cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen
    at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
    at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)
    at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87)
    at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314)
    at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:440)
    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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)
    ... 5 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.client.gui.GuiScreen
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 30 more
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 8.1 (amd64) version 6.3
    Java Version: 1.8.0_144, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 929943976 bytes (886 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    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.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 6 mods loaded, 6 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UC mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UC FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UC Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UC CodeChickenCore{1.0.7.47} [CodeChicken Core] (minecraft.jar) 
    UE EraKnight{1.0} [EraKnight] (bin) 
    UE reachdisplaymod{1.0} [Reach Display Mod] ([1.7.10]ReachDisplayMod-1.0.jar) 
    Profiler Position: N/A (disabled)
    Is Modded: Definitely; Server brand changed to 'fml,forge'
    Type: Dedicated Server (map_server.txt)
    
  • Moddeurs confirmés Rédacteurs

    Tu fais appel à une classe cliente depuis le serveur, ici, GuiScreen. Et cela se passe pendant la construction de ton mod, envoie donc ta classe principale


  • @'BrokenSwing':

    Tu fais appel à une classe cliente depuis le serveur, ici, GuiScreen. Et cela se passe pendant la construction de ton mod, envoie donc ta classe principale

    package fr.playflop.legitium.common;
    
    import java.awt.Color;
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import java.util.List;
    import java.util.logging.Logger;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.gui.GuiMainMenu;
    import net.minecraft.client.gui.GuiScreen;
    import net.minecraft.client.resources.I18n;
    import net.minecraft.client.settings.KeyBinding;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityList;
    import net.minecraft.entity.EnumCreatureType;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.init.Items;
    import net.minecraft.potion.Potion;
    import net.minecraft.world.biome.BiomeGenBase;
    import net.minecraftforge.client.ClientCommandHandler;
    import net.minecraftforge.client.event.ClientChatReceivedEvent;
    import net.minecraftforge.client.event.RenderGameOverlayEvent;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.common.config.Configuration;
    import net.minecraftforge.event.entity.player.AttackEntityEvent;
    
    import org.lwjgl.opengl.Display;
    
    import cpw.mods.fml.client.FMLClientHandler;
    import cpw.mods.fml.client.event.ConfigChangedEvent;
    import cpw.mods.fml.client.registry.ClientRegistry;
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import cpw.mods.fml.common.FMLCommonHandler;
    import cpw.mods.fml.common.Mod;
    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.gameevent.InputEvent;
    import cpw.mods.fml.common.gameevent.TickEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.Phase;
    import cpw.mods.fml.common.network.NetworkRegistry;
    import cpw.mods.fml.common.registry.EntityRegistry;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import fr.playflop.legitium.client.keystroke.CommandKeystrokes;
    import fr.playflop.legitium.client.keystroke.KeystrokesSettings;
    import fr.playflop.legitium.client.keystroke.render.GuiScreenKeystrokes;
    import fr.playflop.legitium.client.keystroke.render.KeystrokesRenderer;
    import fr.playflop.legitium.client.login.GuiLogin;
    import fr.playflop.legitium.client.login.GuiRegister;
    import fr.playflop.legitium.client.menu.client.custommenu.GuiCustomMainMenu;
    import fr.playflop.legitium.client.radio.GuiRadio;
    import fr.playflop.legitium.common.block.BlockRegistry;
    import fr.playflop.legitium.common.block.TileEntityFluoriteChest;
    import fr.playflop.legitium.common.block.WorldGeneration.WorldGeneration;
    import fr.playflop.legitium.common.cheat.Handler;
    import fr.playflop.legitium.common.cheat.TickHandlerClient;
    import fr.playflop.legitium.common.cheat.clickListener;
    import fr.playflop.legitium.common.craft.CraftManager;
    import fr.playflop.legitium.common.entity.EntityLizur;
    import fr.playflop.legitium.common.entity.EntityRaka;
    import fr.playflop.legitium.common.event.EventHandler;
    import fr.playflop.legitium.common.event.Eventregistry;
    import fr.playflop.legitium.common.event.GuiHandlerX;
    import fr.playflop.legitium.common.item.EntityDynamite;
    import fr.playflop.legitium.common.item.ItemRegistry;
    import fr.playflop.legitium.common.particules.ParticleModCommand;
    import fr.playflop.legitium.common.potionEffect.ModPotions;
    import fr.playflop.legitium.proxy.ClientProxy;
    import fr.playflop.legitium.proxy.CommonProxy;
    
    @Mod(modid="EraKnight", name="EraKnight", version="1.0", guiFactory="fr.playflop.legitium.common.togleSprint.ToggleSprintGuiFactory")
    public class MainClass
    {
    
      @Mod.Instance("EraKnight")
      public static MainClass a;
      @SidedProxy(clientSide="fr.playflop.legitium.proxy.ClientProxy", serverSide="fr.playflop.legitium.proxy.CommonProxy")
      public static CommonProxy b;
      public static ClientProxy ds;
      public static Configuration d;
      private List e;
      private FMLCommonHandler event;
    
      public static boolean displayGui = false;
      public static boolean enabled = true;
      public static int location = 0;
      public static int mode = 0;
      public int multiplier = 1;
    private int msgPlayingUpFor;
    private String msgPlaying;
      private static boolean openGui;
    
    public static double TNTx5damage;
    public static int TNTx5smoothness;
    public static float TNTx5size = 8.0F;
    public static int TNTx5fuse;
    public static boolean DropsBlocks;
    public static int TNTx5ID;
    private static KeystrokesSettings settings;
    private static KeystrokesRenderer renderer;
    
      @Mod.EventHandler
      public void preInit(FMLPreInitializationEvent paramFMLPreInitializationEvent)
      {
     TNTx5ID = RenderingRegistry.getNextAvailableRenderId();
     b.preInit();
          BlockRegistry.init();
          BlockRegistry.register();
          ItemRegistry.init();
          ItemRegistry.register();
          CraftManager.register();
    
          EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true);
    
        if (paramFMLPreInitializationEvent.getSide().isClient())
        {
          Handler.checkEngine();
    
          Display.setTitle("< EraKnight  | " + Minecraft.getMinecraft().getSession().getUsername() + " >");
        }
        GameRegistry.registerWorldGenerator(new WorldGeneration(), 0);
        d = new Configuration(paramFMLPreInitializationEvent.getSuggestedConfigurationFile());
        d.load();
        d.setCategoryComment("general", "ATTENTION: Editing this file manually is no longer necessary. \nUse the Mods button on Minecraft's home screen to modify these settings.");
        if (paramFMLPreInitializationEvent.getSide().isClient()) {
          syncConfig();
        }
      }
      @Mod.EventHandler
      public void init(FMLInitializationEvent event) throws Throwable
      {
    /*Menu*/
    Minecraft mc = Minecraft.getMinecraft();
    GuiScreen currentScreen = mc.currentScreen;
    GuiCustomMainMenu customMenu = new GuiCustomMainMenu();
    if(currentScreen instanceof GuiMainMenu && !currentScreen.equals(customMenu))
    {
    mc.displayGuiScreen(customMenu);
    }
    
    /*Fin Menu*/
    b.registerRender();
    b.registerBlockRender();
    b.registerItemRender();
        System.out.println("Mod EraKnight");
        Eventregistry.init(event);
        GameRegistry.registerTileEntity(TileEntityFluoriteChest.class, "eraknight:azurite_chest");
        ModPotions.init();
        MinecraftForge.EVENT_BUS.register(new BlockEventManager());
        MinecraftForge.EVENT_BUS.register(new BlockEventManager1());
        MinecraftForge.EVENT_BUS.register(new BlockEventManager2());
        EntityRegistry.registerGlobalEntityID(EntityRaka.class, "Raka", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB());
    EntityRegistry.registerModEntity(EntityRaka.class, "Raka", 420, this.a, 40, 1, true);
        EntityRegistry.registerGlobalEntityID(EntityLizur.class, "Lizur", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 240, 0).getRGB(), new Color(255, 0, 0).getRGB());
    EntityRegistry.registerModEntity(EntityLizur.class, "Lizur", 350, this.a, 40, 1, true);
    
        //NetworkRegistry.INSTANCE.registerGuiHandler(paramFMLPreInitializationEvent, new CommonProxy());
        // STACK POTION PAR 2 
        //Items.potionitem.setMaxStackSize(2);
    
        /*/**/
    
        if (event.getSide().isClient())
        {
        MinecraftForge.EVENT_BUS.register(new EventHandler());
        }
        FMLCommonHandler.instance().bus().register(new EventHandler());
        b.registerRender();
    
        if (event.getSide().isClient())
        {
          Minecraft localMinecraft = Minecraft.getMinecraft();
          FMLCommonHandler.instance().bus().register(new TickHandlerClient(localMinecraft));
          this.e = ClientProxy.b.getKeyBindings();
          Object localObject = this.e.iterator();
          while (((Iterator)localObject).hasNext())
          {
            KeyBinding localKeyBinding = (KeyBinding)((Iterator)localObject).next();
            ClientRegistry.registerKeyBinding(localKeyBinding);
          }
          FMLCommonHandler.instance().bus().register(this);
          localObject = new clickListener();
          MinecraftForge.EVENT_BUS.register(localObject);
          FMLCommonHandler.instance().bus().register(localObject);
        }
        MinecraftForge.EVENT_BUS.register(this);
    
        System.out.println("Activ� - PlayFlop");
        FMLCommonHandler.instance().bus().register(this);
        MinecraftForge.EVENT_BUS.register(this);
        ClientCommandHandler.instance.registerCommand(new ParticleModCommand(this));
    
      }
    
      @Mod.EventHandler
      public void postLoad(FMLPostInitializationEvent paramFMLPostInitializationEvent)
      {
        MinecraftForge.EVENT_BUS.register(this);
      }
      @SubscribeEvent
      public void clientTick(TickEvent.ClientTickEvent paramClientTickEvent)
      {
        ClientProxy.b.clientTick();
      }
    
      @SubscribeEvent
      public void onKeyInput(InputEvent.KeyInputEvent paramKeyInputEvent)
      {
        Iterator localIterator = this.e.iterator();
        while (localIterator.hasNext())
        {
          KeyBinding localKeyBinding = (KeyBinding)localIterator.next();
          if (localKeyBinding.getIsKeyPressed()) {
            ClientProxy.b.onKeyInput(localKeyBinding);
          }
        }
      }
    
      @SubscribeEvent
      public void afterDraw(RenderGameOverlayEvent.Post paramPost)
      {
        if (paramPost.type == RenderGameOverlayEvent.ElementType.ALL) {
          ClientProxy.b.renderGameOverlay();
        }
      }
    
      @SubscribeEvent
      public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent paramOnConfigChangedEvent)
      {
        if (paramOnConfigChangedEvent.modID.equals("EraKnight")) {
          syncConfig();
        }
      }
    
      @SideOnly(Side.CLIENT)
      public void syncConfig()
      {
        ClientProxy.b.d = d.getBoolean(I18n.format("config.panel.sprint", new Object[0]), "general", ClientProxy.b.d, I18n.format("config.panel.h.sprint", new Object[0]));
        ClientProxy.b.e = d.getBoolean(I18n.format("config.panel.display", new Object[0]), "general", ClientProxy.b.e, I18n.format("config.panel.h.display", new Object[0]));
        d.save();
    
      }
      @SideOnly(Side.CLIENT)
      @SubscribeEvent
      public void attack(AttackEntityEvent event)
      {
        Entity entity = event.target;
        EntityPlayer player = Minecraft.getMinecraft().thePlayer;
    
        boolean critical = (player.fallDistance > 0.0F) && (!player.onGround) && (!player.isOnLadder()) && (!player.isInWater()) && (!player.isPotionActive(Potion.blindness)) && (player.ridingEntity == null);
    
        for (int i = 1; i < this.multiplier; i++)
        {
          if (critical) {
            Minecraft.getMinecraft().thePlayer.onCriticalHit(entity);
          }
            Minecraft.getMinecraft().thePlayer.onEnchantmentCritical(entity);
          }
        }
      @SideOnly(Side.CLIENT)
      @SubscribeEvent
    
      public void onClientChatMessage(ClientChatReceivedEvent event)
    
      {
          if (event.message.getUnformattedText().startsWith("Veuillez vous connecter"))
          {
         Minecraft.getMinecraft().displayGuiScreen(new GuiLogin());
              this.renderMsg(event.message.getFormattedText());
              event.setCanceled(true);
          }
          if (event.message.getUnformattedText().startsWith("Veuillez vous enregistrer"))
          {
         Minecraft.getMinecraft().displayGuiScreen(new GuiRegister());
              this.renderMsg(event.message.getFormattedText());
              event.setCanceled(true);
          }
    
    }
    private void renderMsg(String formattedText) {
    // TODO Auto-generated method stub
    
    }
    
    }
    
    
  • Moddeurs confirmés Rédacteurs

    Vu le bordel il ne faut s'étonner si il y a des soucis. J'ai vu un grand nombre d'erreurs, mais je renonce à t'expliquer où elles sont et comment les résoudre

  • Moddeurs confirmés Rédacteurs Administrateurs

    Salut,
    Le code "/Menu/" n'a rien à faire dans la fonction init de ta classe principale.

    Tu as aussi des MinecraftForge.EVENT_BUS.register(this); en double.


  • @'BrokenSwing':

    Vu le bordel il ne faut s'étonner si il y a des soucis. J'ai vu un grand nombre d'erreurs, mais je renonce à t'expliquer où elles sont et comment les résoudre

    D'accord.. Sympatique tout ça


    @'robin4002':

    Salut,
    Le code "/Menu/" n'a rien à faire dans la fonction init de ta classe principale.

    Tu as aussi des MinecraftForge.EVENT_BUS.register(this); en double.

    D'accord merci


    Personne ne pourrais m'indiquer où sont les erreurs ? Pas me dire comment les résoudres mais au moin me dire où elle sont.. ?

    Envoyé de mon ZTE BLADE V7 LITE en utilisant Tapatalk

  • Moddeurs confirmés Rédacteurs Administrateurs

    Ton erreur c'est que ton code n'est pas du tout organisé.

    Tout ce qui utilise une importation de net.minecraft.client, org.lwjgl ou de cpw.mods.fml.client devrait dans une fonction en @SideOnly(Side.CLIENT) ou dans ton client proxy.


  • D'accord merci robin4002

    Envoyé de mon ZTE BLADE V7 LITE en utilisant Tapatalk