Résolu Mod qui fait crash mon serveur
-
Bonjour mon mod fait crash mon serveur
les class:
class principale:
import java.io.File; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; import org.lwjgl.util.Color; import com.google.common.base.Throwables; import NetworkRegistry.INSTANCE.GuiHandler; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.gui.GuiOptions; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.player.FillBucketEvent; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; 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.event.FMLServerStartingEvent; 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.common.gameevent.TickEvent.PlayerTickEvent; import cpw.mods.fml.common.network.IGuiHandler; 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.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import fr.slimemod.blocks.ForgeSubscribe; import fr.slimemod.entity.EntityDynamite; import fr.slimemod.gui.F3; import fr.slimemod.gui.MenuGui; import fr.slimemod.init.BlockMod; import fr.slimemod.init.ItemMod; import fr.slimemod.proxy.CommonProxy; import fr.slimemod.world.WorldRegister; @Mod(modid = Reference.MOD_NAME, version = Reference.VERSION) public class SlimeMod { @SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.SERVER_PROXY) public static CommonProxy proxy; public static CreativeTabs Slime = new CreativeTabs("SlimeCraft") { @Override public Item getTabIconItem() { return ItemMod.slime_ingot; } }; public void preInit(FMLPreInitializationEvent event) { } @EventHandler public void Init(FMLInitializationEvent event) { BlockMod.init(); BlockMod.register(); ItemMod.init(); ItemMod.register(); WorldRegister.MainRegistry(); EntityRegistry.registerModEntity(EntityDynamite.class, "EntityDynamite", 420, SlimeMod.instance, 32, 20, false); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); MinecraftForge.EVENT_BUS.register(new MenuGui()); MinecraftForge.EVENT_BUS.register(new F3()); proxy.registerRenders(); proxy.registerOverlay(); proxy.registerRender(); } @Instance(Reference.MOD_NAME) public static SlimeMod instance; @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void serverStarting(FMLServerStartingEvent event) { } }
class client proxy:
import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.common.MinecraftForge; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.Display; import cpw.mods.fml.client.FMLClientHandler; 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.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent; import cpw.mods.fml.common.gameevent.TickEvent; import fr.slimemod.SlimeMod; import fr.slimemod.entity.EntityDynamite; import fr.slimemod.gui.F3; import fr.slimemod.gui.GuiBackPack; import fr.slimemod.gui.InventoryBackPack; import fr.slimemod.gui.MenuGui; import fr.slimemod.gui.Overlayunclaimfinder; import fr.slimemod.init.ItemMod; import java.awt.Desktop; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.nio.ByteBuffer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.gui.GuiOptions; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreenResourcePacks; import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent; import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.SideOnly; public class ClientProxy extends CommonProxy { @Override public void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityDynamite.class, new RenderSnowball(ItemMod.dyna)); MinecraftForge.EVENT_BUS.register(new F3()); MinecraftForge.EVENT_BUS.register(new MenuGui()); } public ClientProxy() { } @SubscribeEvent public void onEvent(KeyInputEvent event) { } private void keyPressed() { } @Override public void registerOverlay() { MinecraftForge.EVENT_BUS.register(new Overlayunclaimfinder()); } }
et le crash:
---- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 29/09/19 09:57 Description: Exception in server tick loop cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: fr/slimemod/gui/MenuGui at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:739) at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:97) at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:324) at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:288) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoClassDefFoundError: fr/slimemod/gui/MenuGui at fr.slimemod.SlimeMod.Init(SlimeMod.java:105) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) 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.initializeMods(Loader.java:737) ... 5 more Caused by: java.lang.ClassNotFoundException: fr.slimemod.gui.MenuGui at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 33 more Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 35 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) ... 39 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 Thermos Version: cyberdynecc:Thermos:1.7.10-1614.57 Plugins: Disabled Plugins: Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_221, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 365160832 bytes (348 MB) / 491782144 bytes (469 MB) up to 491782144 bytes (469 MB) JVM Flags: 2 total; -Xms512M -Xmx512M 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 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHI FML{7.10.99.99} [Forge Mod Loader] (thermos.jar) UCHI Forge{10.13.4.1614} [Minecraft Forge] (thermos.jar) UCHI kimagine{0.2} [KImagine] (minecraft.jar) UCHE SlimeMod{3.0.0} [SlimeMod] (slimemod-3.0.0.jar) Profiler Position: N/A (disabled) Player Count: 0 / 200; [] Is Modded: Definitely; Server brand changed to 'thermos,cauldron,craftbukkit,mcpc,kcauldron,fml,forge' Type: Dedicated Server (map_server.txt)
Merci par avance de votre aide
-
Bonjour,
En effet “MenuGui” et “F3” n’ont rien à faire dans la classe principale, ils sont déjà dans le client proxy ce qui est suffisant.
-
Bonjour,
Tu as ce crash car tu enregistre ton Gui sur les deux sides de ton mod
-
Bonjour,
En effet “MenuGui” et “F3” n’ont rien à faire dans la classe principale, ils sont déjà dans le client proxy ce qui est suffisant.
-
ca crash plus merci de votre aide rapide