Jump to content

Nooby Question, but How do I Add Lapis Lazuli in a Crafting Recipe?


URNext

Recommended Posts

Hi, I'm URNext, im new here.

 

I'm trying to make a crafting recipe for my mod that needs lapis lazuili. However, I don't know the id for it.

I think It's "dye" but how do i specify lapis? in minecraft it's dye 4 but how do i put that in my code?

Link to comment
Share on other sites

Recipes accept different (look constructors) kinds of input. One of them is ItemStack which allows you to define metadata (item damage).

 

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe35_recipes/StartupCommon.java

 

new Object[] {

 

No, Bad modder stop it!

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

As discussed in many other threads, one as recently as yesterday,

varargs

compiles to the exact same bytecode as

new Object[] {...}

and while the syntactic sugar is very nice and all, please don't yell at people for using one over the other, Lex.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

There's a difference between "you don't have to do it that way, this way is cleaner" and "STOP THAT!"

 

For instance, should I be yelled at for:

 

 

HashTable<int, string> myHash = new HashTable<int, string>();

 

instead of

 

HashTable<int, string> myHash = new HashTable<>();

 

?

 

Or maybe I should be yelled at because I put my open braces on the same line, instead of a new one...

 

 

if(a == b) {

 

instead of

 

if(a == b){

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Quit getting your panties in a bunch.

'MinecraftByExample' should definitely know better than that.

And then only reason anyone actually does use explicitly wrapped Object[]s in there is because they are copy/pasting from decompiled code 69 times removed.

And no you shouldn't be yelled at for your coding style if you choose it.

However people who are claiming to be teachers SHOULD be yelled at for copy/pasta.

Anyways, stop teaching bad habits and copy/pasta code. Thread over.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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