FloatingGrapefruit Posted April 27, 2013 Posted April 27, 2013 Hello everyone. I have an item that I want to be damaged in the crafting grid, and it does take damage. The problem, however, is that once it takes damage, I can not use it again. This is what happens: http://s2.postimg.org/5e66nkn6h/2013_04_27_17_02_28.png[/img] http://s21.postimg.org/ll8kct5ef/2013_04_27_17_02_38.png[/img] Here is my crafting recipie: ItemStack(baconCutter.setContainerItem(baconCutter)); GameRegistry.addShapelessRecipe(new ItemStack(baconRaw, 4), new Object[] { Item.porkRaw, new ItemStack(baconCutter, 1, -1) }); and my baconCutter class: package mods.crystalia.common; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; public class BaconCutter extends Item{ public BaconCutter(int id) { super(id); maxStackSize = 1; setMaxDamage(10); setCreativeTab(CreativeTabs.tabTools); } @Override public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) { return false; } @Override public ItemStack getContainerItemStack(ItemStack itemStack) { itemStack.setItemDamage(itemStack.getItemDamage() + 1); return itemStack; } } I would love any help, as this is fustrating. Quote Check out my mod: http://www.minecraftforum.net/topic/1809937-152forge-minecraft-enriched-mod/
LexManos Posted April 27, 2013 Posted April 27, 2013 -1 is nolonger the 'any' flag for ItemStacks. Its now Short.MAX Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
FloatingGrapefruit Posted April 27, 2013 Author Posted April 27, 2013 -1 is nolonger the 'any' flag for ItemStacks. Its now Short.MAX Sweet! Thanks. Quote Check out my mod: http://www.minecraftforum.net/topic/1809937-152forge-minecraft-enriched-mod/
Recommended Posts
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.