Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Solved] Custom crops dropping dye


Ronaldi2001
 Share

Recommended Posts

I am adding material crops to my mod and when I went to go add lapis(dye, 1, 4) the "1, 4" is highlited with red and I cant figure out how to make it work with lapis. If I make it a "new ItemStack" like I would when I use it in the crafting recipes, the whole line gets highlighted red.

 

package ronaldi2001.MoreItems.crops;

import net.minecraft.block.BlockCrops;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import ronaldi2001.MoreItems.init.MoreItemsItems;

public class MILapisCrop extends BlockCrops {

public MILapisCrop(String name) {
	this.setUnlocalizedName(name);
}

public Item getSeed() {
	return MoreItemsItems.lapis_seeds;
}

public Item getCrop() {
	return Items.dye, 1, 4;
}
}

~ Ronaldi2001

Link to comment
Share on other sites

getCrop only returns the item, you've attempted to return an ItemStack only without actually wrapping the three values in an ItemStack.  So no matter what, that line of code would never compile, never ever ever.

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

Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...

Important Information

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