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 some lambas expression in my code and some try multi-catch statements and when I do gradlew build to export my mode it fails because some of the stuff I did is not supported in source 1.6. How can I use a latter version of java?

  • Author

So I exported my mod and and I don't understand why it does not work the same between the eclipse version and the real version of minecraft?

 

I mean some things works but for example in my eclipse version I can hurt entities by doing a right click, but it does no damage when running on the real version. I think that has something to do wih server stuff. Do we have to "install server" with the forge installer?

Did you build it by running the

build

Gradle task?

 

You should create a new thread for this issue and post your code and the FML log.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

CAN you require J8 in your mod? Yes.

SHOULD you? No, Minecraft targets J6, so should you. Simple as that.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

I deleted my lambdas expressions and

srcCompat = JavaVersion.VERSION_1_8
targetCompat = JavaVersion.VERSION_1_8

and yes I use gradlew build.

I now have an error when I build, the error in the code is

if (amount > 0.0F && (boolean)method.invoke(attackedEntity, source))

which says "incompatible types: Object cannot be converted to boolean

 

I didn't have the problem in eclipse, but I fixed it by putting

srcCompat = JavaVersion.VERSION_1_7
targetCompat = JavaVersion.VERSION_1_7

 

in the build.gradle, it now generate the jar but the mod still act different than the eclipse one. Also I don't know where the FML log are

Casting an object to a primitive type should compile under Java 7 or 8 (and does for me), I'm not sure why it wasn't working for you.

 

You can find the FML log in <gameDirectory>/logs/fml-client-latest.log. In the development environment, <gameDirectory> is the value of the

minecraft.runDir

variable in build.gradle (defaults to run).

 

Again I suggest creating a new thread for your issue since it's likely not directly related to Java 8.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.