Xaw.4 Posted March 11, 2014 Posted March 11, 2014 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 Quote
PeterRDevries Posted March 11, 2014 Posted March 11, 2014 Blocks.dirt Quote 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
Mitchellbrine Posted March 12, 2014 Posted March 12, 2014 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. Quote -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
Xaw.4 Posted March 12, 2014 Author Posted March 12, 2014 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? Quote
coolAlias Posted March 12, 2014 Posted March 12, 2014 Looking through the vanilla code is always your best bet for finding out how things changed. Quote http://i.imgur.com/NdrFdld.png[/img]
makerimages Posted March 12, 2014 Posted March 12, 2014 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 stay tuned! Quote
Recommended Posts
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.