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

I have created a mod and have set up a proxy using this line:

public static IProxy proxy = new DistExecutor.runForDist(() -> () -> () -> new ClientProxy(), () -> () -> () -> new ServerProxy());

When I have this line uncommented in Eclipse, it red underlines 'DistExecutor.runForDist' and says:

DistExecutor.runForDist cannot be resolved to a type.

However, when I click the run button, Eclipse loads up Minecraft as if there are no errors at all but my mod does not show up. And looking through the logs shows no sign of it even getting to the setup stage of my mod.

When I comment out the line, Eclipse runs Minecraft, but like before my mod does not show up (there are no errors anywhere else).

 

Because of this, I decided to start up my game using Terminal. When the line is commented out, the mod compiles and shows up in the game. When the line is uncommented, it does not compile. It shows this error in the terminal:1855895468_ScreenShot2019-08-24at14_10_17.thumb.png.2e971f1ae9d47857e8fe063c4e887495.png

It seems to me that DistExecutor.runForDist is an actual error and not one of the Eclipse 'ghost errors'. Just to make sure I wasn't going crazy, I looked at the source code for forge and indeed, 'runForDist' is a valid function.

 

What is causing Eclipse to think this is an error?

 

Thanks,

Dream

 

https://pastebin.com/zqpT0Rzt - main code

https://pastebin.com/FbcRv6ah - latest.log (debug.log was too large) - this is the log when the mod did compile. There is no log produced when it doesn't compile.

 

Edited by DreamingSanity
title

  • Author
9 minutes ago, Animefan8888 said:

Why is that "new" there?

That's my mistake - I thought I saw the video write new. Maybe I am crazy!

 

A fresh pair of eyes is always good.

Thank you, that has fixed it! (along with removing some brackets - I had one to many on both sides)


Dream

 

EDIT: Unfortunately, even with no errors, when running Minecraft from Eclipse, my mod isn't being loaded.

Edited by DreamingSanity

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.