Jump to content

[1.7.2] Eclipse environment/tutorial - Block.dirt cannot be resolved


Recommended Posts

Posted

I'm just getting started with modding, and I have begun with the Generic Mod tutorial. I've been successful with the Installing Forge and Basic Modding steps (including running client in debug with the Generic Mod loaded), but I'm having an issued with the Crafting and Smelting piece, and I think it may have to do with my dev environment not being completely setup correctly.

 

Specifically, the problems occur on these lines in the Generic class:

 

ItemStack dirtStack = new ItemStack(Block.dirt);
ItemStack diamondsStack = new ItemStack(Item.diamond, 64);
ItemStack blackWoolStack = new ItemStack(Block.cloth, 42, 15);
ItemStack gravelStack = new ItemStack(Block.gravel);
ItemStack cobbleStack = new ItemStack(Block.cobblestone);

 

where Block.dirt, Item.diamond, Block.cloth etc. cannot be resolved. ('Block' is fine, it's the .dirt that cannot be resolved) I'm sure I have all of the correct imports listed.

 

I am using the

forge-1.7.2-10.12.0.1024

package on Windows with Eclipse Standard (Kepler), and I have built and rebuilt the dev environment by running

'gradlew setupDevWorkspace'

and

'gradlew setupDecompWorkspace'

and

'gradlew eclipse'

in various combinations as suggested by the readme and other posts here, but nothing seems to resolve this issue for me.

 

I am a developer by trade, but I am new to both Java and Eclipse, and I have a feeling that I'm just missing something simple. I apologize in advance if this seems like a stupid question, but I would appreciate any help getting pointed in the right direction.

- eric

Posted

Thank you diesieben07, that was it, of course. I appreciate the help.

 

I assume there are potentially many other changes with the newer versions compared to what was around when the tutorials are written. Is there a place (or places) to reference where these changes are being compiled? I don't want to keep asking questions that might already be answered for me elsewhere.

- eric

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.