Crash StateMapper



  • Bonjour,

    Suite a la mise en place de ces ligne:

    
            ModelLoader.setCustomStateMapper(CSCBlocks.block_porte_combine, (new StateMap.Builder()).ignore(new IProperty[] {blockportecombine.POWERED}).build());
    
            ModelLoader.setCustomStateMapper(CSCBlocks.block_porte_cwu, (new StateMap.Builder()).ignore(new IProperty[] {blockportecwu.POWERED}).build());
    

    Dans ma classe principale dans la fonction Preinit j'ai ce crash côté serveur:

    
    –-- Minecraft Crash Report ----
    
    WARNING: coremods are present:
      SpongeCoremod (spongeforge-1.10.2-2171-5.1.0-BETA-1930.jar)
    Contact their authors BEFORE contacting forge
    
    // Ooh. Shiny.
    
    Time: 15/12/16 15:31
    Description: Exception in server tick loop
    
    net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/block/statemap/IStateMapper
    at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:186)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:576)
    at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97)
    at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:328)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:121)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/block/statemap/IStateMapper
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:503)
    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:497)
    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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)
    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:497)
    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 net.minecraftforge.fml.common.LoadController.redirect$onPost$zzb000(LoadController.java:52)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:545)
    ... 5 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.block.statemap.IStateMapper
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 31 more
    Caused by: java.lang.NullPointerException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    ... 33 more
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.10.2
    Operating System: Windows 7 (x86) version 6.1
    Java Version: 1.8.0_45, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 213281072 bytes (203 MB) / 475582464 bytes (453 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 1 total; -Xmx1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.32 Powered by Forge 12.18.2.2099 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
    UC mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UC FML{8.0.99.99} [Forge Mod Loader] (forge-1.10.2-12.18.2.2099-universal.jar) 
    UC Forge{12.18.2.2099} [Minecraft Forge] (forge-1.10.2-12.18.2.2099-universal.jar) 
    UC spongeapi{5.1.0-SNAPSHOT-6bcf7eb} [SpongeAPI] (minecraft.jar) 
    UC sponge{1.10.2-2171-5.1.0-BETA-1930} [SpongeForge] (spongeforge-1.10.2-2171-5.1.0-BETA-1930.jar) 
    UC me.florian{0.0.1} [CSCPlugin] (cscplugin-0.0.1-SNAPSHOT.jar) 
    UC fcl{X.8} [Fexcraft Common Library] (Fexcraft Common Library-X.8-1.10.2.jar) 
    UC flansmod{5.F0.1} [Flan's Mod] (Flan's Mod-1.10.2-5.2.jar) 
    UE csc{1.0} [Cite Sous Controle] (modid-1.0.jar) 
    Loaded coremods (and transformers): 
    SpongeCoremod (spongeforge-1.10.2-2171-5.1.0-BETA-1930.jar)
      org.spongepowered.common.launch.transformer.SpongeSuperclassTransformer
    Profiler Position: N/A (disabled)
    Is Modded: Definitely; Server brand changed to 'fml,forge,sponge'
    Type: Dedicated Server (map_server.txt)
    
    

    Avant elle était dans mon clientproxy mais ma seconde porte marchait pas et depuis que j'ai mis ses deux ligne dans la mainclass les deux portes marche.


  • Administrateurs

    Salut,
    Normal, cette fonction n'existe que côté client.
    Donc remets-la dans ton client proxy, si ça ne fonctionne pas c'est que soit ta fonction du client proxy n'est pas appelé, soit qu'elle est appelé au mauvais moment.



  • @'robin4002':

    Normal, cette fonction n'existe que côté serveur.

    Que côté client tu voulais dire ?


  • Administrateurs

    Corrigé, merci 😉



  • C'est bon finalement c'était bien dans le clientproxy mais dans le preinit et la ça marche nickel 🙂
    merci