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.

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

Featured Replies

Posted

Hello,

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,

Xaw.4

Blocks.dirt

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

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.

-Mitchellbrine

 

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
  • Author

Thank you!

 

is there any good forum post/site, where i can find changes like those, so i can work it out myself next time?

Thank you!

 

is there any good forum post/site, where i can find changes like those, so i can work it out myself next time?

 

Actually, thats a f****** great idea! Ill see if I can come up with sonmething :D stay tuned!

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.