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

So, whenever i try to gradlew build my mod, it will give an error in compileJava when a class that contains  that access fields is compile, for instance:

 

[spoiler=code]

public class EventCaller {
@SubscribeEvent
public void onEvent(EntityInteractEvent e){
	Entity et = e.target; //errors here
	System.out.println(et.ticksExisted);//and here, as you can see in the log
}
}

 

 

[spoiler=log]


F:\ForgeWorkspace>gradlew build
****************************
Powered By MCP:
http://modcoderpack.com/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
F:\ForgeWorkspace\build\sources\java\me\datdenkikniet\PixelmonToCauldron\EventCaller.java:18: error: cannot access sa
                Entity et = e.target;
                             ^
  class file for sa not found
1 error
1 warning
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.384 secs

F:\ForgeWorkspace>

 

 

 

Anyone know a solution?

  • Author

Yes of course... I was a little tired when I posted this, I'll edit my post right away.

 

Thank you!

 

If you could take a look at it again, that would be awesome

sa

is the Notch (obfuscated) name of the

Entity

class. I have no idea why it can't find the class.

 

Try running

gradlew clean

before building again. If you're still getting the same error, try running

gradlew cleanCache

and setting up your workspace again. Be warned that will delete everything in your Gradle cache, so you'll need to set up every workspace again.

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.

  • Author

sa

is the Notch (obfuscated) name of the

Entity

class. I have no idea why it can't find the class.

 

Try running

gradlew clean

before building again. If you're still getting the same error, try running

gradlew cleanCache

and setting up your workspace again. Be warned that will delete everything in your Gradle cache, so you'll need to set up every workspace again.

 

Thanks for the advice!

 

I'll give it a shot....

 

edit: holy hell, it worked. I don't understand how I couldn't have come up with it myself...

 

Thanks a bunch!

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.