Crash server dans eclipse



  • Bonjour, quand je lance le serveur dans eclipse, il crash. Alors que le client fonctionne très bien, voila le crash report :

    ---- Minecraft Crash Report ----
    // Would you like a cupcake?
    
    Time: 23/08/18 13:38
    Description: Exception in server tick loop
    
    net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Croparia (croparia)
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/Render
    	at com.croparia.mod.ModCroparia.init(ModCroparia.java:51)
    	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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:629)
    	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.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:218)
    	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
    	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.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:135)
    	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:744)
    	at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:108)
    	at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:337)
    	at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:222)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:552)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.entity.Render
    	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	... 37 more
    Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@1ab6718 from coremod FMLCorePlugin
    	at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)
    	at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
    	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
    	... 39 more
    Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/entity/Render for invalid side SERVER
    	at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)
    	at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)
    	... 41 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: Windows 10 (amd64) version 10.0
    	Java Version: 1.8.0_151, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 869200208 bytes (828 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    	FML: MCP 9.42 Powered by Forge 14.23.4.2727 9 mods loaded, 9 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 |
    	|:----- |:--------------- |:------------- |:-------------------------------- |:--------- |
    	| UCHI  | minecraft       | 1.12.2        | minecraft.jar                    | None      |
    	| UCHI  | mcp             | 9.42          | minecraft.jar                    | None      |
    	| UCHI  | FML             | 8.0.99.99     | forgeSrc-1.12.2-14.23.4.2727.jar | None      |
    	| UCHI  | forge           | 14.23.4.2727  | forgeSrc-1.12.2-14.23.4.2727.jar | None      |
    	| UCHEE | croparia        | 2.0           | bin                              | None      |
    	| UCH   | guideapi        | 1.12-2.1.5-60 | Guide-API-1.12-2.1.5-60.jar      | None      |
    	| UCH   | crafttweaker    | 4.1.9         | CraftTweaker2-1.12-4.1.9.jar     | None      |
    	| UCH   | jei             | 4.8.5.159     | jei_1.12.2-4.8.5.159.jar         | None      |
    	| UCH   | crafttweakerjei | 2.0.2         | CraftTweaker2-1.12-4.1.9.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)
    

    De ce que je comprends, le problème est lié à la classe pour enregistré les renders des entities mais je n'arrive pas à comprendre exactement ce qui cloche.

    ModCroparia.class

    package com.croparia.mod;
    
    import org.apache.logging.log4j.Logger;
    
    import com.croparia.mod.Init.BiomeAndDimMod;
    import com.croparia.mod.Init.RegisteringHandler;
    import com.croparia.mod.Mobs.MobRegistry;
    import com.croparia.mod.Mobs.RenderingRegistry;
    import com.croparia.mod.proxy.CommonProxy;
    
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.Mod.EventHandler;
    import net.minecraftforge.fml.common.Mod.Instance;
    import net.minecraftforge.fml.common.SidedProxy;
    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;
    
    @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION, dependencies = "before:guideapi")
    public class ModCroparia{
    
    	
    	@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
    	public static CommonProxy proxy;
    
    	@Instance(Reference.MOD_ID)
    	public static ModCroparia instance;
    	
    	public static Logger logger;
    	
    	public ModCroparia() {
    
    		MinecraftForge.EVENT_BUS.register(new RegisteringHandler());
    	}
    	
        @EventHandler
        public void preInit(FMLPreInitializationEvent event)
        {
            logger = event.getModLog();
            proxy.preInit(event.getSuggestedConfigurationFile());
    		BiomeAndDimMod.preInit(event);
        }
    
    	@Mod.EventHandler
    	public void init(FMLInitializationEvent event) 
    	{
    		//Ore Dictionary Ok here !
    		proxy.init();
    		MobRegistry.registerEntities();
    		BiomeAndDimMod.init(event);
    	}
    
    	@Mod.EventHandler
    	public void serverLoad(FMLServerStartingEvent event) 
    	{
    		BiomeAndDimMod.serverLoad(event);
    	}
    
    	@Mod.EventHandler
    	public void postInit(FMLPostInitializationEvent event) 
    	{
    	
    	}
    }
    

    MobRegistry

    package com.croparia.mod.Mobs;
    
    import com.croparia.mod.ModCroparia;
    import com.croparia.mod.Reference;
    import com.croparia.mod.Mobs.Entity.EntityPenguin;
    import com.croparia.mod.Mobs.Entity.EntityReaper;
    import com.croparia.mod.Mobs.Entity.EntitySeafarer;
    import com.croparia.mod.Mobs.Entity.EntitySeafarerL;
    import com.croparia.mod.Mobs.Entity.EntitySeafarerS;
    import com.croparia.mod.Mobs.Model.ModelPenguin;
    import com.croparia.mod.Mobs.Model.ModelReaper;
    import com.croparia.mod.Mobs.Model.ModelSeafarerRmx;
    import com.croparia.mod.Mobs.Render.RenderPenguin;
    import com.croparia.mod.Mobs.Render.RenderReaper;
    import com.croparia.mod.Mobs.Render.RenderSeafarer;
    import com.croparia.mod.Mobs.Render.RenderSeafarerL;
    import com.croparia.mod.Mobs.Render.RenderSeafarerS;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.util.ResourceLocation;
    import net.minecraftforge.fml.client.registry.RenderingRegistry;
    import net.minecraftforge.fml.common.registry.EntityRegistry;
    
    public class MobRegistry 
    {
    	
    	public static void registerEntities()
    	{
    		register(EntitySeafarer.class, "Seafarer", 0x000069, 0x110BBF, -1);  
    	}
    	
    	public static void register(Class EntityClass, String entityNameIn, int solidColorIn, int spotColorIn, int entitiesId)
    	{
    		EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + entityNameIn), EntityClass, entityNameIn, entitiesId, ModCroparia.instance, 64, 1, true, solidColorIn, spotColorIn);	
    	}
    }
    

    Client Proxy

    package com.croparia.mod.proxy;
    
    import java.io.File;
    
    import com.croparia.mod.Init.CropariaEvent;
    import com.croparia.mod.Init.CropariaFuelHandler;
    import com.croparia.mod.Mobs.MobRegistry;
    import com.croparia.mod.Mobs.RenderingRegistry;
    
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    
    public class ClientProxy extends CommonProxy
    {	
    	@Override
        public void preInit(File configFile)
        {
            super.preInit(configFile);
            RenderingRegistry.registerEntityRenders();
        }
    
        @Override
        public void init()
        {
            super.init();
    		MinecraftForge.EVENT_BUS.register(new CropariaEvent());
            GameRegistry.registerFuelHandler(new CropariaFuelHandler());
        }
    }
    

    RenderingRegistry

    package com.croparia.mod.Mobs;
    
    import com.croparia.mod.Mobs.Entity.EntitySeafarer;
    import com.croparia.mod.Mobs.Model.ModelSeafarerRmx;
    import com.croparia.mod.Mobs.Render.RenderSeafarer;
    
    import net.minecraft.client.renderer.entity.Render;
    import net.minecraft.client.renderer.entity.RenderManager;
    import net.minecraftforge.fml.client.registry.IRenderFactory;
    
    public class RenderingRegistry 
    {
    	public static void registerEntityRenders() 
    	{
    		net.minecraftforge.fml.client.registry.RenderingRegistry.registerEntityRenderingHandler(EntitySeafarer.class, new IRenderFactory<EntitySeafarer>() 
    		{
    			@Override
    			public Render<? super EntitySeafarer> createRenderFor(RenderManager manager) {
    				return new RenderSeafarer(manager, new ModelSeafarerRmx(), 0.5F);
    			}
    		});
    	}
    }
    

    En espérant que vous pourrez m'aider.


  • Moddeurs confirmés Rédacteurs Administrateurs

    Salut,
    Dans ta classe MobRegistry tu importe un bon nombre de classe client ne devrait pas être là.
    Retires les importations qui ne devrait pas être là.

    Aussi, j'ai déplacé ta discussion dans la bonne section, ajouté la balise de version et retiré les spoiler + mis la balise de code (elle ajout déjà une barre de scroll, inutile de mettre un spoiler qui rend le post moins pratique à lire).
    Merci de faire plus attention la prochaine fois.



  • Merci beaucoup, sa a marché. Je n'ai pas fais attention aux résidus de mes différents essaies 😕

    Désolé, je ne sais pas encore comment marche le site, je tacherais de ne pas refaire les même erreurs.


Log in to reply