Jump to content

[Solved][1.7.2] Did the Item/Block Instances move somewhere else?


Recommended Posts


first i want to apologize for that question, as i am sure the solution is pretty obvious.


So i am trying to learn how to write a Mod, so i started with the Tutorials on your Wiki.

http://www.minecraftforge.net/wiki/Crafting_and_Smelting says, that i can "make" an ItemStack with

ItemStack dirtStack = new ItemStack(Block.dirt);


but there is no dirt in Block.


So my question is:

Where are static instances of the vanilla Blocks ?


i figured i could use something like

new ItemStack(Block.getBlockById(1))

but... you know, thats like the worst idea ever.


Just to test, i tried to download the 1.6 Forge, and obviously, the code from the tutorial works.


is there any Reference that mentions api-changes (1.6->1.7) like that, so i can figure out myself, what to change, if i find an outdated Tutorial or forum post?


thanks in advance,


Link to comment
Share on other sites

As of 1.7, the only way to access the blocks/items is to use Blocks.java or Items.java. They are no longer contained in their Item and Block classes.



Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)


If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
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.

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.


  • Create New...

Important Information

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