Jump to content

Recommended Posts

Posted

Hi, and thanks for reading.

 

I'm having a strange problem setting up Eclipse w/Forge 1.14.4 where I don't have any references to the net.minecraft.item.ItemBlock class.

 

Let me walk you through my setup and what I've tried so far.

 

 

My system is a standard Windows 10 64-bit Intel PC.

image.png.eb43fd744fb7de9ac4b808112a60f8e3.png

 

 

I have Java JDK and JRE version 1.8.0_221 installed:

image.png.04fcf2006b6287e7247ee2b5b66e5904.pngimage.png.e625bf4ffc298c0a8f1fe41844183808.png

 

JAVA_HOME is set to the JDK directory:

image.png.859b3fd50abec2ba27f87f0c75990533.png

 

 

First, to start fresh I rebooted my PC, then deleted both the .gradle and .eclipse folders from my C:\Users\<myUser> directory, and also deleted my Eclipse workspace folder.

 

 

Next, I downloaded the latest 1.14.4 Forge MDK from https://files.minecraftforge.net/:

image.png.e7c3b980e467ea4a808b6342c69ba225.png

 

I unzipped it to an empty directory named "TestMod":

 

image.png.b9c0a1be60f70ba9014a5140dd798687.pngimage.png.dbde31a151ed2ee6974f1827a979b3be.png

 

 

I didn't change anything in build.gradle, I left it at its "factory defaults".

 

Then, I opened a command prompt and ran "gradlew genEclipseRuns".  It took about 4 1/2 minutes to do its thing and said it was successful:

image.png.48571f58aed3d0ca56b0b87580a29887.png

 

Then, I ran "gradlew eclipse", successfully:

image.png.f7a11bc39e27d08dd41df4f77c7802d8.png

 

Then, I opened Eclipse version 2019-06 (4.12.0) and selected File > Import > Existing Gradle Project:

image.png.816ded3b948c96c448bb53da50b75118.png

 

 

 I set the project root directory to the TestMod folder that I've been working in:

image.png.fe797f49d2327425921e3ad2bd6533d8.png

 

I clicked Next to go the Import Options:

image.png.b38991bccc322a39de6c18a7b7dde43f.png

 

Without changing anything, I clicked Next again.  It took a couple seconds to work, then it showed this:

image.png.26da5e4bd8b7ce91eeb9366473be308a.png

 

 

In ExampleMod.java, trying to import a reference to ItemBlock fails to resolve (and using CTRL-SHIFT-O to auto-create an import statement finds 0 references).

 

image.png.4fb1c6ec623a5e182e43bc3cbd24fa5d.png

 

 

I then saved the file, closed Eclipse, and ran "gradlew --refresh-dependencies":

image.png.32a5b6e6e3b36e3b2f3153c80ad081e5.png

 

 

I then re-opened Eclipse, and refreshed my Gradle project:

image.png.c997f979ee2432aa2a69bdce9ce9810a.png

 

 

... but no joy, the reference to ItemBlock still can't be resolved.

 

Anything obvious that I'm doing wrong?

 

Thanks!

Burt

Posted

image.jpeg.86792e2556e40c2eeae90b1585a2c06a.jpeg

 

lol whoops.  Is that brand new in 1.14.4?  I was following a tutorial for 1.14.3 and it was still using the ItemBlock class, which is why I was so confused why mine wasn't matching up.  I looked at a bunch of changelogs for 1.14.4 releases and I didn't see anything, either.

Posted (edited)
  On 8/30/2019 at 11:32 PM, TheMikeste1 said:

No, I don't believe so. I was following McJty's tutorials for 1.14, and he starts in 1.14.2 with BlockItem. I'm not sure what the tutorial you're using is doing. Just a heads up though, from what I understand a lot of classes have changed names in a similar name.

Expand  

Gotcha, I'll keep that in mind.  Thanks for the assist, and the quick reply.

 

FWIW, this is the tutorial I'm using:

 

Edited by Burt
Posted
  On 8/30/2019 at 11:35 PM, Burt said:

FWIW, this was the tutorial I'm using:

Expand  

Yeah, that's for 1.13. Also, I've not seen his stuff myself, but I've seen some moderators say that Harry Talks uses a lot of bad practices. You might want to consider checking some other tutorials. If you haven't gone through them yet, try reading through https://mcforge.readthedocs.io/en/1.13.x/. It's outdated, but the basics are the same. Something that has also helped me a lot were the aforementioned tutorials by McJty, as well as peering through vanilla code and the MC Forge GitHub, particularly the test sections (though I mostly have used Forge code for more "advanced" things).

 

Posted
  On 8/30/2019 at 11:41 PM, TheMikeste1 said:

Yeah, that's for 1.13. Also, I've not seen his stuff myself, but I've seen some moderators say that Harry Talks uses a lot of bad practices. You might want to consider checking some other tutorials. If you haven't gone through them yet, try reading through https://mcforge.readthedocs.io/en/1.13.x/. It's outdated, but the basics are the same. Something that has also helped me a lot were the aforementioned tutorials by McJty, as well as peering through vanilla code and the MC Forge GitHub, particularly the test sections (though I mostly have used Forge code for more "advanced" things).

 

Expand  

? thanks for the tips buddy!

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.