Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi guys!

 

I'm creating a mod called "DreamCraft", and I would like to port it to multiplayer.

Some days ago I used to develop with two separate MCP IDEs: one for singleplayer and one for multiplayer.

Since using two separate MCPs is annoying, I noticed that Forge mods are both singleplayer/multiplayer compatible, thanks to the SidedProxies.

So, in my "SinglePlayer MCP" I modified the Sided proxies to make them works in a single package.

This is the package structure:

src:

    - net.dreamcraft

          - DreamCraft.java

          - CommonProxy.java (Server proxy)

    - net.dreamcraft.client

          - ClientProxy.java (Client Proxy)

 

The client works well.

The server instead crashes at start.

It says:

2013-01-28 14:50:26 [sEVERE] [ForgeModLoader] An error occured trying to load a proxy into {clientSide=net.dreamcraft.client.ClientProxy, serverSide=net.dreamcraft.CommonProxy}.net.dreamcraft.DreamCraft
cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:62)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
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.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
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.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:345)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:64)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

 

These are the codes:

DreamCraft.java: http://pastebin.com/JTE5TMdt

CommonProxy.java: http://pastebin.com/BbdCgwD2

ClientProxy.java: http://pastebin.com/eifJ4Jv6

 

What's wrong?

 

Thanks in advance for your help.

  • Author

What you need is:

@SidedProxy(clientSide = "...", serverSide = "...")
public static CommonProxy proxy;

 

Nothing more ;)

 

But how can I access the void "registerRenders()" in the ClientProxy class?

Without it I can't prerender custom textures!

  • Author

Oh, dear: I was calling my registerRenderers() void directly to the ClientProxy.java class.

 

Thanks very much! You helped me a lot!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.