Posted September 5, 201312 yr Could somebody please tell me what and how to make my custom created item take damage when you use it in the crafting recipe instead of destroying it. I know I have been able to do it a long time ago but I deleted that and now I can't find out how to do that. So if anyone could link me to a page that describes that, that would be nice.
September 5, 201312 yr Author Could you explain how to do that a little bit more and also I would like it if the item stayed in the grid after crafting
September 5, 201312 yr Author How exactly do you override something like that i have tried but it doesn't do anything. package sefodopo.mine; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import sefodopo.mine.Mine; public class GrindItem extends Item { public GrindItem(int par1) { super(par1); } @Override public ItemStack getContainerItemStack(ItemStack par1ItemStack){ return new ItemStack(Mine.grindItem); } } It just won't register and give me a item after i craft with it. And also if somebody could tell me how to remove a crafting recipe from vanilla that would be appreciated.
September 5, 201312 yr Well... Of course that won't work. You returning A NEW item stack. Try something like: @Override public ItemStack getContainerItemStack(ItemStack par1ItemStack){ par1ItemStack.damageItem(1, Minecraft.getMinecraft().thePlayer); return par1ItemStack; } I am not saying that will 100% work, but hey. Give it a try. I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
September 6, 201312 yr make it like this: public ItemStack getContainerItemStack(ItemStack par1) { par1.setItemDamage(par1.getItemDamage()+1); return par1.copy(); } i hope that helps^^"
September 6, 201312 yr Author I couldn't get any of your ways to work i don't know if i have to set a container item or what but i can get it to work if i use a crafting handler that i found on a different website for a older version of minecraft that still works thanks for trying though.
September 6, 201312 yr Author I just realized that you have to set the container item to itself or it won't work. Sorry but i didn't realize that you had to set the container item.
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.