Jump to content

[1.10.2] the type x cannot be resolved. it is indirectly referenced from ...


Kasper_OmsK

Recommended Posts

Hi there.

I decompiled minecraft using forge mod dev kit and i'm facing a strange error.

As soon as I extend one of my class from any minecraft forge class  and try to access anything in my packages, I get this error :

 

 

*The project was not built since its build path is incomplete. Cannot find the class file for com.google.common.reflect.TypeToken. Fix the build path then try building this project.

*The type com.google.common.reflect.TypeToken cannot be resolved. It is indirectly referenced from required .class files 

 

I made some research and a lot of people are talking about a bug from eclipse (mars) but none of the fix they proposed worked.

It really seems like I'm missing a library but I don't know why.

 

Thanks in advance.

Modify message

 

Link to comment
Share on other sites

Are you sure you setup your workspace correctly?

gradlew setupDecompWorkspace

gradlew eclipse

I have no knowledge of such bug and I've been modding (and coding other stuff) for years using Eclipse.

 

Can't offer much help, you could lookup your build path and make sure it is setup correctly, but commands mentioned above do that for you so I don't see a point. Maybe get new eclipse?

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Yes, but not the latest (JDK1.8.0_65)

I'm going to try to re reset a workspace because I doubt it come from a decompilation issue.

 

I tried every fix that implied cleaning the project, re setting build path etc.  >:(

But the strangest part is that it work perfectly well on a fresh class not extending from a minecraft class.

 

Is com.google.common.reflect.TypeToken etc. comming from standard JRE library ?

Link to comment
Share on other sites

Hey.

I'm kinda forced to up this thread as the issue occured again. But I have further information.

To make the mods I'm using a seperated project and importing all libraries of minecraft from the Forge project.

So the issue occurs only when I'm doing that. If I use the original forge project (the one with the "examplemod") There's no issue.

 

I followed this tutorial on basic minecraft modding worked and how to setup the project etc. if it can help.

 

http://bedrockminer.jimdo.com/modding-tutorials/set-up-minecraft-forge/set-up-advanced-setup/

 

Thanks in advance.

Link to comment
Share on other sites

Hey.

I'm kinda forced to up this thread as the issue occured again. But I have further information.

To make the mods I'm using a seperated project and importing all libraries of minecraft from the Forge project.

So the issue occurs only when I'm doing that. If I use the original forge project (the one with the "examplemod") There's no issue.

 

I followed this tutorial on basic minecraft modding worked and how to setup the project etc. if it can help.

 

http://bedrockminer.jimdo.com/modding-tutorials/set-up-minecraft-forge/set-up-advanced-setup/

 

Thanks in advance.

If you are using multiple projects you also need to right click on the forge project edit its build path and select all under order and export.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I did set the build path correctly but didn't selected the project in order and export.

It didn't fix the issue but I noticed something.

Even when I import the project in the workspace and set the build path, forge packages are not accessible directly. I have to use the eclipse "fix project setup" function. It then show me a list of library to import to fix the problem.

So I just tried to extend one of my class from the class i was missing (TypeToken) and did the exact same thing (I didn't properly imported com.google.guava), it worked.

But i'm pretty sure there's another way of doing this. Like in build path setting or something but it seems I can't find it.

Anyway, this work, it's not really convinient but I just have to do it once per project so...

 

Thanks for your help and sorry for my english.

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



×
×
  • Create New...

Important Information

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