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.

Featured Replies

Posted

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.

  • 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

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

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 xD

make it like this:

 

public ItemStack getContainerItemStack(ItemStack par1)

{

      par1.setItemDamage(par1.getItemDamage()+1);

      return par1.copy();

}

 

i hope that helps^^"

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

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

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.