Résolu Crash serveur lors de son démarage
-
je ne sais pas pourquoi sa fais sa…
crash report:
---- Minecraft Crash Report ---- // I feel sad now :( Time: 8/15/20 10:50 AM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.InstantiationException at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:102) at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:611) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595) at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98) at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333) at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:85) ... 32 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Linux (amd64) version 4.9.0-11-amd64 Java Version: 1.8.0_262, Oracle Corporation Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 179644656 bytes (171 MB) / 324517888 bytes (309 MB) up to 8563785728 bytes (8167 MB) JVM Flags: 8 total; -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseFastAccessorMethods -Xms256M -Xmx8192M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2847 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 | State | ID | Version | Source | Signature | |:----- |:----------- |:------------ |:---------------------- |:--------- | | LC | minecraft | 1.12.2 | minecraft.jar | None | | LC | mcp | 9.42 | minecraft.jar | None | | LC | FML | 8.0.99.99 | server.jar | None | | LC | forge | 14.23.5.2847 | server.jar | None | | LC | cdm | 0.4.1 | cdm-0.4.1-mc1.12.2.jar | None | | LE | goodlifemod | 1.0 | goodlife-1.0.jar | None | Loaded coremods (and transformers): Profiler Position: N/A (disabled) Is Modded: Definitely; Server brand changed to 'fml,forge' Type: Dedicated Server (map_server.txt)
classe prncipale de mon mod:
package com.frenchdevteam.goodlifemod; import com.google.common.base.Joiner; import com.google.common.eventbus.EventBus; import com.mrcrayfish.device.api.ApplicationManager; import com.frenchdevteam.goodlifemod.app.ApplicationTutorial; import com.frenchdevteam.goodlifemod.app.GoodLifeMusics; import com.frenchdevteam.goodlifemod.proxy.CommonProxy; import com.frenchdevteam.goodlifemod.tabs.GoodLifeTab; import com.frenchdevteam.goodlifemod.util.Reference; import com.frenchdevteam.goodlifemod.util.handlers.RegistryHandler; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.MathHelper; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.fml.client.FMLFileResourcePack; import net.minecraftforge.fml.client.FMLFolderResourcePack; import net.minecraftforge.fml.common.*; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.io.File; import java.util.Collections; @Mod(modid = Reference.MOD_ID, version = Reference.VERSION, name = Reference.NAME) public class GoodLife extends DummyModContainer { public static final String MODID = "goodlifemod"; public static final Logger LOGGER = LogManager.getLogger(Reference.MOD_NAME); public static final ResourceLocation EMPTY_BACKPACK_SLOT = new ResourceLocation(Reference.MOD_ID, "items/empty_backpack_slot"); private static boolean baublesLoaded; public static boolean keepBackpackOnDeath; public static int backpackInventorySize; @Mod.Instance(MODID) public static GoodLife INSTANCE; public GoodLife() { super(new ModMetadata()); ModMetadata meta = this.getMetadata(); meta.modId = Reference.MOD_ID; meta.name = Reference.MOD_NAME; meta.version = Reference.MOD_VERSION; meta.authorList = Collections.singletonList("pazzazzo"); } private void loadConfig() { Joiner newLineJoiner = Joiner.on('\n'); File cfgFile = new File(Loader.instance().getConfigDir(), "backpacked.cfg"); Configuration config = new Configuration(cfgFile); config.load(); config.setCategoryComment("common", "Common-only configs"); Property prop = config.get("common", "keepBackpackOnDeath", true, newLineJoiner.join("Determines whether or not the backpack should be dropped on death", "Default: true")); keepBackpackOnDeath = prop.getBoolean(true); prop = config.get("common", "backpackInventorySize", 1, newLineJoiner.join("The amount of rows the backpack has. Each row is nine slots of storage.", "Min: 1", "Max: 6", "Default: 1"), 1, 6); backpackInventorySize = MathHelper.clamp(prop.getInt(1), 1, 6); config.save(); } public static Logger logger; public static final CreativeTabs GOODLIFETAB = new GoodLifeTab("pazzatab"); @Mod.Instance public static GoodLife instance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.COMMON_PROXY_CLASS) public static CommonProxy proxy; @Override public boolean registerBus(EventBus bus, LoadController controller) { bus.register(this); return true; } @Override public Class<?> getCustomResourcePackClass() { return this.getSource().isDirectory() ? FMLFolderResourcePack.class : FMLFileResourcePack.class; } @EventHandler public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); logger = event.getModLog(); RegistryHandler.preInitRegistries(event); } @EventHandler public void init(FMLInitializationEvent event) { ApplicationManager.registerApplication(new ResourceLocation(Reference.MOD_ID, "tutorial"), ApplicationTutorial.class); ApplicationManager.registerApplication(new ResourceLocation(Reference.MOD_ID, "goodlifemusics"), GoodLifeMusics.class); RegistryHandler.initRegistries(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { RegistryHandler.postInitRegistries(); } @EventHandler public void serverInit(FMLServerStartingEvent event) { RegistryHandler.serverRegistries(event); logger.info("initalise FMLServerStartingEvent :" + Reference.NAME); } @SubscribeEvent @SideOnly(Side.CLIENT) public void onTextureStitch(TextureStitchEvent.Pre event) { if(!baublesLoaded && event.getMap() == Minecraft.getMinecraft().getTextureMapBlocks()) { event.getMap().registerSprite(EMPTY_BACKPACK_SLOT); } } @SubscribeEvent public void onPlayerClone(PlayerEvent.Clone event) { EntityPlayer oldPlayer = event.getOriginal(); if(baublesLoaded) { } } }
si il y a besoin d’une autre classe demandez moi
-
Ah bha oui, le problème c’est que ton proxy était abstrait.
Remets les deux fonctions dedans, mais en non abstrait. -
Bonjour,
Ta classe principale ne doit pas hériter de DummyModContainer. -
ok merci je vais tester sans,
-
@robin4002, j’ai enlevé le extends et jai rebuild, j’ai mis le mod dans mon serveur, mais sa recrash
-
---- Minecraft Crash Report ---- // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~] Time: 8/15/20 2:22 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.InstantiationException at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:102) at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:611) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595) at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98) at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333) at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:85) ... 32 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Linux (amd64) version 4.9.0-11-amd64 Java Version: 1.8.0_262, Oracle Corporation Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 80861992 bytes (77 MB) / 327528448 bytes (312 MB) up to 8563785728 bytes (8167 MB) JVM Flags: 8 total; -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseFastAccessorMethods -Xms256M -Xmx8192M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2847 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 | State | ID | Version | Source | Signature | |:----- |:----------- |:------------ |:---------------------- |:--------- | | LC | minecraft | 1.12.2 | minecraft.jar | None | | LC | mcp | 9.42 | minecraft.jar | None | | LC | FML | 8.0.99.99 | server.jar | None | | LC | forge | 14.23.5.2847 | server.jar | None | | LC | cdm | 0.4.1 | cdm-0.4.1-mc1.12.2.jar | None | | LE | goodlifemod | 1.0 | goodlife-1.0.jar | None | Loaded coremods (and transformers): Profiler Position: N/A (disabled) Is Modded: Definitely; Server brand changed to 'fml,forge' Type: Dedicated Server (map_server.txt)
-
-
ce n’est pas une pub, le serveur est sous white list
-
Et en solo il fonctionne ? Depuis ton ide tu arrives à le lancer ?
Tu peux envoyer ta classe CommonProxy ainsi que ta classe Reference ?
-
en solo sa marche oui
je suis justement en train de bidouiller le common mais voici celui de l’erreur:
package com.frenchdevteam.goodlifemod.proxy; import net.minecraft.item.Item; public abstract class CommonProxy { public abstract void init(); public void registerItemRenderer(Item item, int meta, String id) { } }
et reference:
package com.frenchdevteam.goodlifemod.util; public class Reference { public static final String MOD_ID = "goodlifemod"; public static final String MODID = "goodlifemod"; public static final String VERSION = "1.0"; public static final String MC_VERSION = "[1.12.2]"; public static final String NAME = "GoodLife Mod"; public static final String CLIENT_PROXY_CLASS = "com.frenchdevteam.goodlifemod.proxy.ClientProxy"; public static final String COMMON_PROXY_CLASS = "com.frenchdevteam.goodlifemod.proxy.CommonProxy"; public static final String MOD_NAME = "GoodLife Mod"; public static final String MOD_VERSION = "1.0"; public static final String ACCEPTED_MC_VERSIONS = "[1.12.2]"; public static final String CLIENT_PROXY = "com.frenchdevteam.goodlifemod.proxy.ClientProxy"; public static final String COMMON_PROXY = "com.frenchdevteam.goodlifemod.proxy.CommonProxy"; }
-
quand je fais sa pour le common proxy
package com.frenchdevteam.goodlifemod.proxy; public class CommonProxy { }
je n’arrive pas a build le mod
-
Ah bha oui, le problème c’est que ton proxy était abstrait.
Remets les deux fonctions dedans, mais en non abstrait. -
Ho oui *tn MERCIIIIII!