Jump to content

Registering Messages [1.11.2]


TLHPoE

Recommended Posts

I'm receiving this error when trying to host a server with a built version of my mod (quickconsume):

 

---- Minecraft Crash Report ----

WARNING: coremods are present:
  FMLPlugin (InventoryTweaks-1.62-dev-77.jar)
  LoadingPlugin (Quark-r1.2-81.jar)
  AppleCore (AppleCore-mc1.11.2-2.1.1.jar)
  IvToolkit (IvToolkit-1.3.2.1.jar)
Contact their authors BEFORE contacting forge

// I'm sorry, Dave.

Time: 2/25/17 1:27 PM
Description: Exception in server tick loop

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Quick Consume (quickconsume)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getConstructor0(Class.java:3075)
    at java.lang.Class.newInstance(Class.java:412)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:171)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:164)
    at com.kain.quickconsume.proxy.CommonProxy.init(CommonProxy.java:28)
    at com.kain.quickconsume.QuickConsume.preInit(QuickConsume.java:30)
    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 net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:641)
    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
    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:246)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:224)
    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.distributeStateMessage(LoadController.java:147)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628)
    at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:100)
    at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:121)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:442)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityPlayerSP
    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)
    ... 39 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@3ecd267f from coremod FMLCorePlugin
    at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:257)
    at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
    ... 41 more
Caused by: java.lang.RuntimeException: Attempted to load class bps for invalid side SERVER
    at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:56)
    at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:253)
    ... 43 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.11.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_65, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 113158624 bytes (107 MB) / 284000256 bytes (270 MB) up to 2112618496 bytes (2014 MB)
    JVM Flags: 2 total; -Xincgc -Xmx2G
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.38 Powered by Forge 13.20.0.2228 30 mods loaded, 30 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH    minecraft{1.11.2} [Minecraft] (minecraft.jar) 
    UCH    mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCH    FML{8.0.99.99} [Forge Mod Loader] (forge-1.11.2-13.20.0.2228-universal.jar) 
    UCH    forge{13.20.0.2228} [Minecraft Forge] (forge-1.11.2-13.20.0.2228-universal.jar) 
    UCH    ivtoolkit{1.3.2.1} [IvToolkit] (minecraft.jar) 
    UCH    actuallyadditions{1.11.2-r102} [Actually Additions] (ActuallyAdditions-1.11.2-r102.jar) 
    UCH    applecore{2.1.1} [AppleCore] (AppleCore-mc1.11.2-2.1.1.jar) 
    UCH    quark{r1.2-81} [Quark] (Quark-r1.2-81.jar) 
    UCH    autoreglib{1.1-4} [AutoRegLib] (AutoRegLib-1.1-4.jar) 
    UCH    betterachievements{0.4.3.12} [Better Achievements] (BetterAchievements-1.11.2-0.4.3.12.jar) 
    UCH    cfm{4.1.2} [MrCrayfish's Furniture Mod] (cfm-4.1.2-mc1.11.2.jar) 
    UCH    chiselsandbits{13.10} [Chisels & Bits] (chiselsandbits-13.10.jar) 
    UCH    cookingforblockheads{5.2.6} [Cooking for Blockheads] (CookingForBlockheads_1.11.2-5.2.6.jar) 
    UCH    dldungeonsjdg{1.9.0} [Doomlike Dungeons] (DoomlikeDungeons-1.9.1-MC1.11.2.jar) 
    UCH    enderthing{0.7.3} [Enderthing] (enderthing-1.11.0-0.7.3.jar) 
    UCH    gravestone{1.7.2} [Gravestone] (GraveStone Mod 1.7.2.jar) 
    UCH    inventorytweaks{1.62-dev-77-7812cce} [Inventory Tweaks] (InventoryTweaks-1.62-dev-77.jar) 
    UCH    jei{4.2.7.240} [Just Enough Items] (jei_1.11.2-4.2.7.240.jar) 
    UCH    journeymap{1.11.2-5.4.6} [JourneyMap] (journeymap-1.11.2-5.4.6.jar) 
    UCE    quickconsume{1.1} [Quick Consume] (modid-1.0.jar) 
    UCH    harvestcraft{1.11.2d} [Pam's HarvestCraft] (Pam's HarvestCraft 1.11.2d.jar) 
    UCH    persistentbits{1.0.6} [Persistent Bits] (PersistentBits-1.11-1.0.6.jar) 
    UCH    reccomplex{1.2.9.1} [Recurrent Complex] (RecurrentComplex-1.2.9.1.jar) 
    UCH    refinedstorage{1.4.1} [Refined Storage] (refinedstorage-1.4.1.jar) 
    UCH    xreliquary{1.11.2-1.3.3.635} [Reliquary] (Reliquary-1.11.2-1.3.3.635.jar) 
    UCH    roguelike{1.6.3} [Roguelike Dungeons] (RoguelikeDungeons-1.11.2-1.6.3.jar) 
    UCH    lteleporters{1.11.2-2.0.2} [Simple Teleporters] (SimpleTeleporters-1.11.2-2.0.2.jar) 
    UCH    simplyconveyors{2.1.0} [Simply Conveyors] (SimplyConveyors-2.1.2.jar) 
    UCH    soulshardstow{1.11-2.6.6-47} [Soul Shards - The Old Ways] (SoulShards-TOW-1.11-2.6.6-47.jar) 
    UCH    usefulnullifiers{1.3.4} [Useful Nullifiers] (usefulnullifiers-1.3.4.jar) 
    Loaded coremods (and transformers): 
FMLPlugin (InventoryTweaks-1.62-dev-77.jar)
  invtweaks.forge.asm.ContainerTransformer
LoadingPlugin (Quark-r1.2-81.jar)
  vazkii.quark.base.asm.ClassTransformer
AppleCore (AppleCore-mc1.11.2-2.1.1.jar)
  squeek.applecore.asm.TransformerModuleHandler
IvToolkit (IvToolkit-1.3.2.1.jar)
  
    Profiler Position: N/A (disabled)
    Is Modded: Definitely; Server brand changed to 'fml,forge'
    Type: Dedicated Server (map_server.txt)

 

Here's the class in question: http://pastebin.com/hqGR6Cjm

The purpose of the MessageSyncClient class is to be sent from the server to the client, so it has to be registered on the server side. I'm not sure why it's referencing EntityPlayerSP too.

Edited by TLHPoE

Kain

Link to comment
Share on other sites

13 minutes ago, Lhykos said:

I think you call a client method in your "onMessage" method in the handler class.

Can you post the code of you "MessageSyncClientHandler" class?

http://pastebin.com/0FXgPP5C

 

I'm not sure how I would accomplish this without referencing the player. I was thinking about having a static class that would just hold the items in a field so that it won't have to reference any piece of Minecraft at all, but that seems hacky.

Kain

Link to comment
Share on other sites

You need to call your actions on the main thread. From the Forge Documentation:

Quote

As of Minecraft 1.8 packets are by default handled on the network thread.

That means that your IMessageHandler can not interact with most game objects directly. The example above for example would not be correct. Minecraft provides a convenient way to make your code execute on the main thread instead using IThreadListener.addScheduledTask.

The way to obtain an IThreadListener is using either the Minecraft instance (client side) or a WorldServer instance (server side).

 

  • Like 1
Link to comment
Share on other sites

48 minutes ago, TLHPoE said:

http://pastebin.com/0FXgPP5C

 

I'm not sure how I would accomplish this without referencing the player. I was thinking about having a static class that would just hold the items in a field so that it won't have to reference any piece of Minecraft at all, but that seems hacky.

The Minecraft class doesn't exist on the server (it's @SideOnly(Side.Client)). To reference it, you need to make methods in your proxies which return the objects you need (i.e. the player) in the client proxy, and throw an exception in the server proxy (because they should never be called from there). I just had (and solved) this problem today - link!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I have the problem that when I have flares or blocks to build in my offhand, they seem to be assigned an NBT tag, so I can't stack them with other flares or blocks.  
    • Thank you that was this mod indeed, it tried to spawn a structure at spawn but since It was already generated he was not able to and so crashed the server lol. I was looking for mod during the pregen and added it just before the ram issue, thank you
    • I’m trying to make a mod that lets me put beacon beams through barrels for a mod pack I’m making but I don’t know what code to put and where to make this happen   (Forge 1.20.1)  
    • ---- Minecraft Crash Report ---- // My bad. Time: 2024-07-17 11:17:18 Description: Unexpected error java.lang.NullPointerException: Unexpected error     at com.google.common.collect.Iterators$6.transform(Iterators.java:829)     at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)     at net.minecraft.class_2370.remap(class_2370.java:744)     at net.minecraft.class_2370.unmap(class_2370.java:875)     at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.unmap(RegistrySyncManager.java:368)     at net.minecraft.class_310.handler$bma000$fabric-registry-sync-v0$disconnectAfter(class_310.java:11691)     at net.minecraft.class_310.method_18096(class_310.java:2269)     at net.minecraft.class_8673.method_10839(class_8673.java:319)     at net.minecraft.class_2535.method_10768(class_2535.java:673)     at net.minecraft.class_636.method_2927(class_636.java:290)     at net.minecraft.class_310.method_1574(class_310.java:1908)     at net.minecraft.class_310.method_1523(class_310.java:1246)     at net.minecraft.class_310.method_1514(class_310.java:882)     at net.minecraft.client.main.Main.main(Main.java:256)     at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)     at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)     at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at com.google.common.collect.Iterators$6.transform(Iterators.java:829)     at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)     at net.minecraft.class_2370.remap(class_2370.java:744)     at net.minecraft.class_2370.unmap(class_2370.java:875)     at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.unmap(RegistrySyncManager.java:368)     at net.minecraft.class_310.handler$bma000$fabric-registry-sync-v0$disconnectAfter(class_310.java:11691)     at net.minecraft.class_310.method_18096(class_310.java:2269)     at net.minecraft.class_8673.method_10839(class_8673.java:319)     at net.minecraft.class_2535.method_10768(class_2535.java:673)     at net.minecraft.class_636.method_2927(class_636.java:290) -- Uptime -- Details:     JVM uptime: 111.259s     Wall uptime: 70.335s     High-res time: 44.634s     Client ticks: 508 ticks / 25.400s Stacktrace:     at net.minecraft.class_310.method_1587(class_310.java:2501)     at net.minecraft.class_310.method_54580(class_310.java:949)     at net.minecraft.class_310.method_1514(class_310.java:905)     at net.minecraft.client.main.Main.main(Main.java:256)     at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)     at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)     at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) -- Last reload -- Details:     Reload number: 1     Reload reason: initial     Finished: Yes     Packs: vanilla, fabric, accessories, advanced-xray-fabric, appleskin, armoroftheages, auditory, balm-fabric, beautify, betterf3, betterthirdperson, biolith, bobby, bosses_of_mass_destruction, caffeineconfig, cardinal-components, cardinal-components-base, cardinal-components-block, cardinal-components-chunk, cardinal-components-entity, cardinal-components-item, cardinal-components-level, cardinal-components-scoreboard, cardinal-components-world, carryon, chipped, chunky, cinderscapes, cinderscapes-client, cinderscapes-common, cinderscapes-worldgen, cloth-config, comforts, conditional-mixin, cool_elytra, cratedelight, creativecore, creeperoverhaul, cristellib, croptopia, dramaticdoors, duckling, eatinganimationid, elytratrims, entity_texture_features, epherolib, explorerscompass, fabric-api, fabric-api-base, fabric-api-lookup-api-v1, fabric-biome-api-v1, fabric-block-api-v1, fabric-block-view-api-v2, fabric-blockrenderlayer-v1, fabric-client-tags-api-v1, fabric-command-api-v1, fabric-command-api-v2, fabric-commands-v0, fabric-content-registries-v0, fabric-convention-tags-v1, fabric-convention-tags-v2, fabric-crash-report-info-v1, fabric-data-attachment-api-v1, fabric-data-generation-api-v1, fabric-dimensions-v1, fabric-entity-events-v1, fabric-events-interaction-v0, fabric-game-rule-api-v1, fabric-item-api-v1, fabric-item-group-api-v1, fabric-key-binding-api-v1, fabric-keybindings-v0, fabric-language-kotlin, fabric-lifecycle-events-v1, fabric-loot-api-v2, fabric-loot-api-v3, fabric-message-api-v1, fabric-model-loading-api-v1, fabric-networking-api-v1, fabric-object-builder-api-v1, fabric-particles-v1, fabric-recipe-api-v1, fabric-registry-sync-v0, fabric-renderer-api-v1, fabric-renderer-indigo, fabric-renderer-registries-v1, fabric-rendering-data-attachment-v1, fabric-rendering-fluids-v1, fabric-rendering-v0, fabric-rendering-v1, fabric-resource-conditions-api-v1, fabric-resource-loader-v0, fabric-screen-api-v1, fabric-screen-handler-api-v1, fabric-sound-api-v1, fabric-transfer-api-v1, fabric-transitive-access-wideners-v1, fabricloader, forf, freecam, friendsandfoes, geocluster, glassential, glore, grassoverhaul, horizontal_glass_panes, infinity-cave, iris, jade, jamlib, jankson, libgui, mavapi, mavm, medieval_buildings, mes, midnightlib, mns, more_armor_trims, mostructures, mr_dungeons_andtavernsdeserttempleoverhaul, mr_dungeons_andtavernsendcastlestandalone, mr_dungeons_andtavernsjungletempleoverhaul, mr_dungeons_andtavernsnetherfortressoverhaul, mr_dungeons_andtavernsoceanmonumentoverhaul, mr_dungeons_andtavernswoodlandmansionoverhaul, mss, mvs, natures_spirit, necronomicon, new_slab_variants, nicer-skies, noisium, notenoughanimations, polymer-core, polymer-resource-pack, resourcefulconfig, simple_backpack, sodium, sodium-extra, sound_physics_remastered, spectrelib, status-effect-bars, stendhal, sulfurpotassiummod, terraform-biome-remapper-api-v1, terraform-shapes-api-v1, terraform-surfaces-api-v1, terraform-wood-api-v1, the_bumblezone, time_on_display, toggleableitemframes, toomanypaintings, travelersbackpack, trimeffects, universal-graves, utility_belt, variantbarrels, variantbeehives, variantbookshelves, variantcomposters, variantsandventures, visuality, waterframes, waxablecoral, waystones, xaerominimap, xaeroworldmap, yet_another_config_lib_v3, zoomify, minecraft:supporteatinganimation, file/Stay_True_1.21.zip, file/Better Cats v2.0 1.21.zip, file/Better Horses v2.0 1.21.zip, file/Torrezx-Bad_omen.zip, file/Torrezx-Sculk_power.zip, file/Torrezx-Warden_Power.zip, file/Torrezx-Heavy_core_tools.zip, file/waystones_1.21.zip  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.