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

Item take damage on crafting


Recommended Posts

If its not too much trouble. I did the override but it still consumes the item. Can I get an example/skeleton on what you mean? I do a lot better when I can see what I'm trying to learn. I looked at a couple open source mods but they do it a different way. Your method seems like it would be a lot better but never seen it in use. If you don't want to write code for me is there a reference I can look at?

Link to comment
Share on other sites

public ItemStack getContainerItem(ItemStack stack) {
    ItemStack result = stack.copy();
    result.setItemDamage(stack.getItemDamage() + 1);

public boolean hasContainerItem(ItemStack stack) {
    return stack.getItemDamage() < stack.getMaxDamage();


Seriously guys, if you can't figure stuff like this out yourself, you need to learn basic java / basic programming before trying to make a mod.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.