I agree. Would be a better replacement for AFK Iron golem farms, work from the player is required, at the same time iron remains renewable and farmable in decent enough quantities if a player wants it.
If they're going to remove Iron golem farms, fine, but at least replace it with something superior to it and will not be nerfed or removed, like this.
and having tools be recyclable for ingots instead of nuggets, even from mob drops, makes sense.
People shouldn't be penalized for putting in the time to earn things,
envying what somebody else has is not a good reason to steal from them.
The only issue is, how is durability handled? What do you get from a shovel at half durability, or near zero? My own solution was to increase the yield to 3 nuggets per unit of material, times the percent durability remaining - you get as many as 24 nuggets, equivalent to 2.67 ingots, from a chestplate, down to 1 nugget when near zero durability (rounded and limited to at least 1):
An intact iron chestplate:
An iron chestplate with 1 durability left:
An intact iron shovel:
An iron shovel with 1 durability left:
The code I use to calculate how many iron (or gold) nuggets you should get from an item:
else if (isItemToolOrArmor(item))
{
// Prevents furnaces from smelting enchanted items
if (item.getEnchantmentTagList() != null) return null;
// Adjusts amount based on durability, rounded to the nearest unit with a minimum of 1
if (damage > 0) result.stackSize = Math.max(1, Math.round((float)result.stackSize * (float)(item.getMaxDamage() - damage) / (float)item.getMaxDamage()));
}
This both makes smelting items more useful and solves any issues with getting e.g. a full ingot (100% materials) back from smelting any shovel, or getting nothing at all, which is just a waste of fuel and time (you do get more back from smelting items near zero durability but the gain is very small; an iron chestplate with 1 durability left is equivalent to 0.1 nuggets prior to rounding and clamping to at least 1, but the 10-fold gain is nothing when you need 9 to make a single ingot (which is why Mojang's implementation is so bad, regardless of the item's durability).
One thing to note is that my method does give you more XP, up to 2.4 per chestplate, since each nugget always gives 0.1 no matter what the input item is (XP is based on the output item) but I don't see that as an issue since you aren't going to be mass smelting such items and the approximate 1/3 return prevents you from repeatedly crafting and smelting items (which also requires fuel and time). I also prevent enchanted items from being smelted to avoid accidental destruction of such items (assuming the player uses them; enchanted wood-based items likewise cannot be used as fuel, which is more important since they can be immediately consumed). This is usually not an issue for mob drops since they are usually damaged enough that you can craft them together without over-repairing them (or in modern versions, use a grindstone to remove the enchantments).
Also, I allow you to smelt many other iron/gold items, even things like anvils, which return a number of ingots based on their damage state (4 in this case):
// Other smeltable iron and gold items
addSmeltingRecipe(ItemIDs.horseArmorIron, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(ItemIDs.horseArmorGold, new ItemStack(Item.ingotGold), 1.0F);
addSmeltingRecipe(ItemIDs.bucketEmpty, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(BlockStates.fenceIron, new ItemStack(Item.ironNugget), 0.1F);
addSmeltingRecipe(BlockStates.rail, new ItemStack(Item.ironNugget), 0.1F);
addSmeltingRecipe(BlockStates.railDetector, new ItemStack(Item.ironNugget, 3), 0.1F);
addSmeltingRecipe(BlockStates.railActivator, new ItemStack(Item.ironNugget, 3), 0.1F);
addSmeltingRecipe(BlockStates.railPowered, new ItemStack(Item.goldNugget, 3), 0.1F);
addSmeltingRecipe(ItemIDs.doorIron, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(ItemIDs.compass, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(ItemIDs.pocketSundial, new ItemStack(Item.ingotGold), 1.0F);
addSmeltingRecipe(BlockStates.pressurePlateIron, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(BlockStates.pressurePlateGold, new ItemStack(Item.ingotGold), 1.0F);
addSmeltingRecipe(BlockStates.hopper, new ItemStack(Item.ingotIron, 2), 0.7F);
addSmeltingRecipe(BlockStates.anvil, new ItemStack(Item.ingotIron, 12), 0.7F);
addSmeltingRecipe(BlockStates.cauldron, new ItemStack(Item.ingotIron, 2), 0.7F);
addSmeltingRecipe(BlockStates.lightningRod, new ItemStack(Item.ingotIron), 0.7F);
else if (itemID == BlockStates.anvil)
{
// Ingots returned by anvils depends on damage level (intact = 100%, very damaged = 25%)
result.stackSize = result.stackSize * (4 - (damage & 3)) / 4;
}
Intact anvil (100% "durability"):
Very damaged anvil (25% of "durability" left; in vanilla this would be 33% and return 4,8,12 ingots depending on state)
Also, as far as "recycling" anvils goes, I also let you craft two very damaged anvils together to make a new anvil, which effectively gives you a bonus of 25% if you then use that anvil until it breaks (0.75 * 2 + 1 = 2.5, or 25% more uses per anvil initially crafted); if you always use them until they become very damaged the bonus is 12.5% (0.75 * 3 = 2.25). Note that since vanilla only has 3 damage states the benefit is reduced; 0.667 * 2 + 1 = 2.333, or 16.7% additional uses, and if you always use them until they are very damaged the benefit is zero (0.667 * 3 = 2), but this can still benefit as very damaged anvils could break at any time, and it helps offset cases where they become damaged after only a few uses (the reason why I added an additional damage state in the first place was to help even out randomness; a 12% chance of being damaged per use with 3 states gives the same lifetime as 16% with 4 states, but the variation is reduced; a 100% chance with 25 states would always give 25 uses):
What about all those buckets or horse armor you find in dungeons (I only take diamond horse armor, which still eventually fills up multiple double chests. There is no crafting recipe so I just have them return one ingot):
Another way of recycling that I added is a "hammer", which breaks down many blocks into their original resources, with some loss in most cases ("storage" blocks are guaranteed to always give 100% back); Fortune can be used to increase the yield in cases where there is a loss:
The furnace dropped 3 cobblestone, crafting table 2 planks, anvil 21 ingots (this is more than you get from smelting but you get no XP), planks 2 sticks (no loss compared to crafting sticks), and quartz 4 quartz (also no loss):
The only issue is, how is durability handled? What do you get from a shovel at half durability, or near zero? My own solution was to increase the yield to 3 nuggets per unit of material, times the percent durability remaining - you get as many as 24 nuggets, equivalent to 2.67 ingots, from a chestplate, down to 1 nugget when near zero durability (rounded and limited to at least 1):
An intact iron chestplate:
An iron chestplate with 1 durability left:
An intact iron shovel:
An iron shovel with 1 durability left:
The code I use to calculate how many iron (or gold) nuggets you should get from an item:
else if (isItemToolOrArmor(item))
{
// Prevents furnaces from smelting enchanted items
if (item.getEnchantmentTagList() != null) return null;
// Adjusts amount based on durability, rounded to the nearest unit with a minimum of 1
if (damage > 0) result.stackSize = Math.max(1, Math.round((float)result.stackSize * (float)(item.getMaxDamage() - damage) / (float)item.getMaxDamage()));
}
This both makes smelting items more useful and solves any issues with getting e.g. a full ingot (100% materials) back from smelting any shovel, or getting nothing at all, which is just a waste of fuel and time (you do get more back from smelting items near zero durability but the gain is very small; an iron chestplate with 1 durability left is equivalent to 0.1 nuggets prior to rounding and clamping to at least 1, but the 10-fold gain is nothing when you need 9 to make a single ingot (which is why Mojang's implementation is so bad, regardless of the item's durability).
One thing to note is that my method does give you more XP, up to 2.4 per chestplate, since each nugget always gives 0.1 no matter what the input item is (XP is based on the output item) but I don't see that as an issue since you aren't going to be mass smelting such items and the approximate 1/3 return prevents you from repeatedly crafting and smelting items (which also requires fuel and time). I also prevent enchanted items from being smelted to avoid accidental destruction of such items (assuming the player uses them; enchanted wood-based items likewise cannot be used as fuel, which is more important since they can be immediately consumed). This is usually not an issue for mob drops since they are usually damaged enough that you can craft them together without over-repairing them (or in modern versions, use a grindstone to remove the enchantments).
Also, I allow you to smelt many other iron/gold items, even things like anvils, which return a number of ingots based on their damage state (4 in this case):
// Other smeltable iron and gold items
addSmeltingRecipe(ItemIDs.horseArmorIron, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(ItemIDs.horseArmorGold, new ItemStack(Item.ingotGold), 1.0F);
addSmeltingRecipe(ItemIDs.bucketEmpty, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(BlockStates.fenceIron, new ItemStack(Item.ironNugget), 0.1F);
addSmeltingRecipe(BlockStates.rail, new ItemStack(Item.ironNugget), 0.1F);
addSmeltingRecipe(BlockStates.railDetector, new ItemStack(Item.ironNugget, 3), 0.1F);
addSmeltingRecipe(BlockStates.railActivator, new ItemStack(Item.ironNugget, 3), 0.1F);
addSmeltingRecipe(BlockStates.railPowered, new ItemStack(Item.goldNugget, 3), 0.1F);
addSmeltingRecipe(ItemIDs.doorIron, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(ItemIDs.compass, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(ItemIDs.pocketSundial, new ItemStack(Item.ingotGold), 1.0F);
addSmeltingRecipe(BlockStates.pressurePlateIron, new ItemStack(Item.ingotIron), 0.7F);
addSmeltingRecipe(BlockStates.pressurePlateGold, new ItemStack(Item.ingotGold), 1.0F);
addSmeltingRecipe(BlockStates.hopper, new ItemStack(Item.ingotIron, 2), 0.7F);
addSmeltingRecipe(BlockStates.anvil, new ItemStack(Item.ingotIron, 12), 0.7F);
addSmeltingRecipe(BlockStates.cauldron, new ItemStack(Item.ingotIron, 2), 0.7F);
addSmeltingRecipe(BlockStates.lightningRod, new ItemStack(Item.ingotIron), 0.7F);
else if (itemID == BlockStates.anvil)
{
// Ingots returned by anvils depends on damage level (intact = 100%, very damaged = 25%)
result.stackSize = result.stackSize * (4 - (damage & 3)) / 4;
}
Intact anvil (100% "durability"):
Very damaged anvil (25% of "durability" left; in vanilla this would be 33% and return 4,8,12 ingots depending on state)
Also, as far as "recycling" anvils goes, I also let you craft two very damaged anvils together to make a new anvil, which effectively gives you a bonus of 25% if you then use that anvil until it breaks (0.75 * 2 + 1 = 2.5, or 25% more uses per anvil initially crafted); if you always use them until they become very damaged the bonus is 12.5% (0.75 * 3 = 2.25). Note that since vanilla only has 3 damage states the benefit is reduced; 0.667 * 2 + 1 = 2.333, or 16.7% additional uses, and if you always use them until they are very damaged the benefit is zero (0.667 * 3 = 2), but this can still benefit as very damaged anvils could break at any time, and it helps offset cases where they become damaged after only a few uses (the reason why I added an additional damage state in the first place was to help even out randomness; a 12% chance of being damaged per use with 3 states gives the same lifetime as 16% with 4 states, but the variation is reduced; a 100% chance with 25 states would always give 25 uses):
What about all those buckets or horse armor you find in dungeons (I only take diamond horse armor, which still eventually fills up multiple double chests. There is no crafting recipe so I just have them return one ingot):
Another way of recycling that I added is a "hammer", which breaks down many blocks into their original resources, with some loss in most cases ("storage" blocks are guaranteed to always give 100% back); Fortune can be used to increase the yield in cases where there is a loss:
The furnace dropped 3 cobblestone, crafting table 2 planks, anvil 21 ingots (this is more than you get from smelting but you get no XP), planks 2 sticks (no loss compared to crafting sticks), and quartz 4 quartz (also no loss):
With ingots instead of nuggets for smelted tools and armour, this would be a far superior way of getting renewable iron than iron farms.
No Village is required, just naturally spawning Zombies at night time which would drop any iron tool or armour plate at random when killed.
This means players can now use this to reliably replace anvils that were broken without spending any more of their ores on this, when the ores could be focused on permanent items instead such as iron bars, trapdoors, doors and chains.
I'd support the addition of a hammer into the vanilla game, so would friends I play with, as not only could the hammer be used in "uncrafting", the hammer could also be used to break down cobblestone into gravel, which could then be fortuned for flint or be crafted into concrete and would also be a great way to farm materials for concrete blocks.
But the important part here is the hammer would be a good way to handle recycling items into something useful for the player,
without wasting anything.
Even if there was a slight material loss in recycling a metal armour plate or tool, it wouldn't matter so long as
mob drops are involved where any lost material could be replaced given enough time and patience. The
problem with Mojang's implementation is the material loss is too severe or unfair, making recycling by smelting pointless.
With ingots instead of nuggets for smelted tools and armour, this would be a far superior way of getting renewable iron than iron farms.
Again though, what about durability? What happens if you smelt a shovel with 1 durability left? So you can just melt it down and keep crafting a new one without ever needing more resources? That is exactly why I use nuggests and use the amount of durability left to determine how many you get back, at the same time, you should expect some loss, which is why you only get a third back (and you actually do get a gain, however small, by smelting nearly broken items since 1/251 * 9 = .0.036 nuggets but you always get at least one, even as the multiplier is 3 instead of 9). No matter what, you should never get nothing from a smelting operation, that would simply be unfair, and why do you hate nuggets so much? Mojang just didn't apply them properly, giving back just one from smelting any item (this is in fact why I added the same mechanic to TMCW, not because I actually wanted it, like so many other things).
The only potential issue with my method is you can only smelt 2 intact chestplates before the output slot is full (3 would yield 72 items and I avoid overflow by making sure there is enough room) but that can easily be solved by using a hopper to empty it. The alternative, returning either nuggets or ingots depending on how much you'd get back, would be much harder to code in and you can't get two different output items at the same time (e.g. an ingot and 2 nuggets instead of 11 nuggets, or just ingots if the result would be a multiple of 9 nuggets, which could work but again requires that the output slot be kept empty so operations can proceed).
Again though, what about durability? What happens if you smelt a shovel with 1 durability left? So you can just melt it down and keep crafting a new one without ever needing more resources? That is exactly why I use nuggests and use the amount of durability left to determine how many you get back, at the same time, you should expect some loss, which is why you only get a third back (and you actually do get a gain, however small, by smelting nearly broken items since 1/251 * 9 = .0.036 nuggets but you always get at least one, even as the multiplier is 3 instead of 9). No matter what, you should never get nothing from a smelting operation, that would simply be unfair, and why do you hate nuggets so much? Mojang just didn't apply them properly, giving back just one from smelting any item (this is in fact why I added the same mechanic to TMCW, not because I actually wanted it, like so many other things).
The only potential issue with my method is you can only smelt 2 intact chestplates before the output slot is full (3 would yield 72 items and I avoid overflow by making sure there is enough room) but that can easily be solved by using a hopper to empty it. The alternative, returning either nuggets or ingots depending on how much you'd get back, would be much harder to code in and you can't get two different output items at the same time (e.g. an ingot and 2 nuggets instead of 11 nuggets, or just ingots if the result would be a multiple of 9 nuggets, which could work but again requires that the output slot be kept empty so operations can proceed).
I see your point, there are 250 uses or durability points on any iron tool, so I completely understand where you are coming from.
but what we do agree on is how poorly Mojang implemented this, they designed this so you only get 1 nugget from smelting an iron or gold tool item, no matter how much durability is left, and this is where most of the scorn is coming from.
If it were implemented in the way you suggested then nuggets wouldn't have had as much of a bad rep as they do now.
It's just that to rely on recycling damaged tools or armour plates for renewable gold or iron, it leaves unsatisfactory results which only encourages people to rely on more broken mechanics like AFK Iron golem farms for renewable iron instead. Whether people consider it cheating to rely on such automated farms to begin with is subjective, but one cannot deny there is an imbalance when items are being given away for free just for being in a loaded chunk, something I've grown to accept over the experiences I've had with the game and I'd much rather renewable iron be done in a better way.
But recycling iron tools is not it, because you need 9 nuggets to make 1 ingot, times that by 31 for making a new anvil,
you'd need to smelt an item 279 times for this, 10 x 31 = 310, 310 - 31 = 279.
do you see why people hate nuggets in the game now? it simply is not an efficient way to get resources back or to replace anything which was lost, accidental or otherwise.
do you see why people hate nuggets in the game now? it simply is not an efficient way to get resources back or to replace anything which was lost, accidental or otherwise.
Yes, that is exactly why I implemented by own version of this mechanic - and pretty much everything else; "TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4. [including fixing Mojang's poorly-implemented tool/armor smelting system; as well as Mending, attack cooldown, automated mob farms, optimizations and bug fixes (or avoiding major increases in resource usage), and much more]".
Also, it seems that the root cause is that Mojang doesn't want to patch furnaces so they can properly smelt items which produce more than one output item, which was quite easy for me to do (IIRC when I first added a recipe with multiple results it either capped it at 64, losing items, or overflowed past 64):
How easy is the fix? As is often the case a single line of code is all that is needed (I check if the sum of the result and output items is less than or equal to the limit; by contrast, vanilla only checks if the output item is less than the limit, thus it can only add one item at a time without overflowing):
// Checks that the sum of the result and output items are within the stack limit so furnaces do not attempt to smelt items
// that would exceed it
return output.stackSize + result.stackSize <= output.getMaxStackSize();
// Vanilla for comparison (two of these checks are redundant so I removed them, with the stack size of the result added in
// and < changed to <= as the final size is being checked)
return output.stackSize < this.getInventoryStackLimit() && output.stackSize < output.getMaxStackSize() && output.stackSize < result.getMaxStackSize();
The furnace refuses to smelt a third chestplate since it would result in more than 64 items in the output slot:
However, if I put a damaged chestplate in it does smelt it, yielding a total of 62 items (141/241 durability * 8 ingots/chestplate * 3 nuggets/ingot = 14 nuggets):
Another way I improved furnaces was to allow them to handle items with metadata; for example, smelting glowstone returns a "light block" (unrelated to the block added in a recent version), which is the same block ID with a data value of 1, which vanilla would happily smelt into the exact same item but I fixed that by checking the data value of the input item (currently in a hardcoded manner, with more such items it would be better to change the smelting recipe itself, which is currently only indexed by ID):
Yes, that is exactly why I implemented by own version of this mechanic - and pretty much everything else; "TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4. [including fixing Mojang's poorly-implemented tool/armor smelting system; as well as Mending, attack cooldown, automated mob farms, optimizations and bug fixes (or avoiding major increases in resource usage), and much more]".
Also, it seems that the root cause is that Mojang doesn't want to patch furnaces so they can properly smelt items which produce more than one output item, which was quite easy for me to do (IIRC when I first added a recipe with multiple results it either capped it at 64, losing items, or overflowed past 64):
How easy is the fix? As is often the case a single line of code is all that is needed (I check if the sum of the result and output items is less than or equal to the limit; by contrast, vanilla only checks if the output item is less than the limit, thus it can only add one item at a time without overflowing):
// Checks that the sum of the result and output items are within the stack limit so furnaces do not attempt to smelt items
// that would exceed it
return output.stackSize + result.stackSize <= output.getMaxStackSize();
// Vanilla for comparison (two of these checks are redundant so I removed them, with the stack size of the result added in
// and < changed to <= as the final size is being checked)
return output.stackSize < this.getInventoryStackLimit() && output.stackSize < output.getMaxStackSize() && output.stackSize < result.getMaxStackSize();
The furnace refuses to smelt a third chestplate since it would result in more than 64 items in the output slot:
However, if I put a damaged chestplate in it does smelt it, yielding a total of 62 items (141/241 durability * 8 ingots/chestplate * 3 nuggets/ingot = 14 nuggets):
Another way I improved furnaces was to allow them to handle items with metadata; for example, smelting glowstone returns a "light block" (unrelated to the block added in a recent version), which is the same block ID with a data value of 1, which vanilla would happily smelt into the exact same item but I fixed that by checking the data value of the input item (currently in a hardcoded manner, with more such items it would be better to change the smelting recipe itself, which is currently only indexed by ID):
And although only gaining a third of the resources back is a little harsh for my liking I'd much rather take your solution than Mojang's, so would anybody else, it would at least make smelting a viable option for recycling or repurposing resources for other items in the game.
We don't need to have millions of chests full of pickaxes for any reason, because really, who dies enough times to lose this many pickaxes in a short period of time?, and the surplus iron pickaxes could be smelted to be made into something more useful, like a beacon pyramid, an anvil, a rail, or even iron bars. Iron bars have the same function as fences but with a different texture and being non flammable, can be used for building cages or prisons as well as barred windows on buildings.
I am aware that iron rails can still be useful sometimes, and they do work wonders when moving minecarts downhill as gravity powers the movement of minecarts in this case. Powered rails are only needed for moving anything uphill or along a horizontal railway system, and even then powered rails can be mixed with non powered rails for a cheaper automated transport system, if setup properly, can still be high speed.
Iron golems made by the player, as far as I am aware don't attack players who accidentally hit them, only Villager golems will, this means building our own iron golems can be useful sometimes.
But even without any of the above I mentioned, your solution would mean players would be more encouraged to craft their own lanterns, as opposed to simply relying on Villager trades from a Librarian to provide them an infinite amount every time. After all you only need 8 iron nuggets plus torch per lantern, getting 27 nuggets back would mean the player would be able to craft 3 lanterns per smelted item, assuming enough durability had been remaining on the item at the time and this would be something like an iron chestplate, where the original cost of crafting them would've been 8 iron ingots.
Even being able to craft 1 lantern per smelted tool or armour plate makes smelting an actual useful mechanic,
as players are being rewarded more for going after mob drops to be smelted in furnaces.
And of course players get enough resources from mob drops to continuously repair their iron gear with mending on them,
without having to reply on mining every single time. You did say your idea was to change mending so that indefinite repairs
would require the anvil and the use of rubies to prevent prior work penalty from making items too expensive.
I still think the addition of steel in the game, via the use of a Smithing table to increase the base durability of iron tools would be a good idea though. These items could still be made to require iron ingots for each repair even with enchantments,
but their base durability without Unbreaking increases from 250 to 750, making these tools half as durable as diamond,
Ultimately even a simple suggestion gets very complicated here.
I think proportional material recycling is the best way to deal with the renewability issue of iron and even gold items, I'd prefer it too as it is a much more engaging system than watching Iron Golems go toward an auto killing system. While their drops are intentional and not exactly a glitch, it doesn't change the fact that it is unbalanced.
But I would love to see iron golem farming be replaced with something better, and you proposed it here.
The resources you get from smelting should be dependent on the durability left on tools or armour, with varying amounts of durability left on armour plates or tools dropped by mob kills.
To eliminate cheesing
1) Mobs must be required to be able to path find to a player
2) Mobs must have at least 75% of the damage dealt to them by players, not environmental in addition to being killed or finished off by a player.
3) Mob spawners have a lower drop rate of items compared to those which are naturally spawned in dark caves or at night on surface.
If all 3 requirements had been met, then the armour drops be allowed,
and increase in likelihood if a player spends more time within a region, but with the hostile mobs themselves
being harder to deal with because of wearing that gear you try to loot them for.
And maybe also for most tools, other than shovels.
I agree. Would be a better replacement for AFK Iron golem farms, work from the player is required, at the same time iron remains renewable and farmable in decent enough quantities if a player wants it.
If they're going to remove Iron golem farms, fine, but at least replace it with something superior to it and will not be nerfed or removed, like this.
and having tools be recyclable for ingots instead of nuggets, even from mob drops, makes sense.
People shouldn't be penalized for putting in the time to earn things,
envying what somebody else has is not a good reason to steal from them.
The only issue is, how is durability handled? What do you get from a shovel at half durability, or near zero? My own solution was to increase the yield to 3 nuggets per unit of material, times the percent durability remaining - you get as many as 24 nuggets, equivalent to 2.67 ingots, from a chestplate, down to 1 nugget when near zero durability (rounded and limited to at least 1):
An intact iron chestplate:
An iron chestplate with 1 durability left:
An intact iron shovel:
An iron shovel with 1 durability left:
The code I use to calculate how many iron (or gold) nuggets you should get from an item:
This both makes smelting items more useful and solves any issues with getting e.g. a full ingot (100% materials) back from smelting any shovel, or getting nothing at all, which is just a waste of fuel and time (you do get more back from smelting items near zero durability but the gain is very small; an iron chestplate with 1 durability left is equivalent to 0.1 nuggets prior to rounding and clamping to at least 1, but the 10-fold gain is nothing when you need 9 to make a single ingot (which is why Mojang's implementation is so bad, regardless of the item's durability).
One thing to note is that my method does give you more XP, up to 2.4 per chestplate, since each nugget always gives 0.1 no matter what the input item is (XP is based on the output item) but I don't see that as an issue since you aren't going to be mass smelting such items and the approximate 1/3 return prevents you from repeatedly crafting and smelting items (which also requires fuel and time). I also prevent enchanted items from being smelted to avoid accidental destruction of such items (assuming the player uses them; enchanted wood-based items likewise cannot be used as fuel, which is more important since they can be immediately consumed). This is usually not an issue for mob drops since they are usually damaged enough that you can craft them together without over-repairing them (or in modern versions, use a grindstone to remove the enchantments).
Also, I allow you to smelt many other iron/gold items, even things like anvils, which return a number of ingots based on their damage state (4 in this case):
Intact anvil (100% "durability"):
Very damaged anvil (25% of "durability" left; in vanilla this would be 33% and return 4,8,12 ingots depending on state)
Also, as far as "recycling" anvils goes, I also let you craft two very damaged anvils together to make a new anvil, which effectively gives you a bonus of 25% if you then use that anvil until it breaks (0.75 * 2 + 1 = 2.5, or 25% more uses per anvil initially crafted); if you always use them until they become very damaged the bonus is 12.5% (0.75 * 3 = 2.25). Note that since vanilla only has 3 damage states the benefit is reduced; 0.667 * 2 + 1 = 2.333, or 16.7% additional uses, and if you always use them until they are very damaged the benefit is zero (0.667 * 3 = 2), but this can still benefit as very damaged anvils could break at any time, and it helps offset cases where they become damaged after only a few uses (the reason why I added an additional damage state in the first place was to help even out randomness; a 12% chance of being damaged per use with 3 states gives the same lifetime as 16% with 4 states, but the variation is reduced; a 100% chance with 25 states would always give 25 uses):
What about all those buckets or horse armor you find in dungeons (I only take diamond horse armor, which still eventually fills up multiple double chests. There is no crafting recipe so I just have them return one ingot):
Another way of recycling that I added is a "hammer", which breaks down many blocks into their original resources, with some loss in most cases ("storage" blocks are guaranteed to always give 100% back); Fortune can be used to increase the yield in cases where there is a loss:
The furnace dropped 3 cobblestone, crafting table 2 planks, anvil 21 ingots (this is more than you get from smelting but you get no XP), planks 2 sticks (no loss compared to crafting sticks), and quartz 4 quartz (also no loss):
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
With ingots instead of nuggets for smelted tools and armour, this would be a far superior way of getting renewable iron than iron farms.
No Village is required, just naturally spawning Zombies at night time which would drop any iron tool or armour plate at random when killed.
This means players can now use this to reliably replace anvils that were broken without spending any more of their ores on this, when the ores could be focused on permanent items instead such as iron bars, trapdoors, doors and chains.
I'd support the addition of a hammer into the vanilla game, so would friends I play with, as not only could the hammer be used in "uncrafting", the hammer could also be used to break down cobblestone into gravel, which could then be fortuned for flint or be crafted into concrete and would also be a great way to farm materials for concrete blocks.
But the important part here is the hammer would be a good way to handle recycling items into something useful for the player,
without wasting anything.
Even if there was a slight material loss in recycling a metal armour plate or tool, it wouldn't matter so long as
mob drops are involved where any lost material could be replaced given enough time and patience. The
problem with Mojang's implementation is the material loss is too severe or unfair, making recycling by smelting pointless.
Again though, what about durability? What happens if you smelt a shovel with 1 durability left? So you can just melt it down and keep crafting a new one without ever needing more resources? That is exactly why I use nuggests and use the amount of durability left to determine how many you get back, at the same time, you should expect some loss, which is why you only get a third back (and you actually do get a gain, however small, by smelting nearly broken items since 1/251 * 9 = .0.036 nuggets but you always get at least one, even as the multiplier is 3 instead of 9). No matter what, you should never get nothing from a smelting operation, that would simply be unfair, and why do you hate nuggets so much? Mojang just didn't apply them properly, giving back just one from smelting any item (this is in fact why I added the same mechanic to TMCW, not because I actually wanted it, like so many other things).
The only potential issue with my method is you can only smelt 2 intact chestplates before the output slot is full (3 would yield 72 items and I avoid overflow by making sure there is enough room) but that can easily be solved by using a hopper to empty it. The alternative, returning either nuggets or ingots depending on how much you'd get back, would be much harder to code in and you can't get two different output items at the same time (e.g. an ingot and 2 nuggets instead of 11 nuggets, or just ingots if the result would be a multiple of 9 nuggets, which could work but again requires that the output slot be kept empty so operations can proceed).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
I see your point, there are 250 uses or durability points on any iron tool, so I completely understand where you are coming from.
but what we do agree on is how poorly Mojang implemented this, they designed this so you only get 1 nugget from smelting an iron or gold tool item, no matter how much durability is left, and this is where most of the scorn is coming from.
If it were implemented in the way you suggested then nuggets wouldn't have had as much of a bad rep as they do now.
It's just that to rely on recycling damaged tools or armour plates for renewable gold or iron, it leaves unsatisfactory results which only encourages people to rely on more broken mechanics like AFK Iron golem farms for renewable iron instead. Whether people consider it cheating to rely on such automated farms to begin with is subjective, but one cannot deny there is an imbalance when items are being given away for free just for being in a loaded chunk, something I've grown to accept over the experiences I've had with the game and I'd much rather renewable iron be done in a better way.
But recycling iron tools is not it, because you need 9 nuggets to make 1 ingot, times that by 31 for making a new anvil,
you'd need to smelt an item 279 times for this, 10 x 31 = 310, 310 - 31 = 279.
do you see why people hate nuggets in the game now? it simply is not an efficient way to get resources back or to replace anything which was lost, accidental or otherwise.
Yes, that is exactly why I implemented by own version of this mechanic - and pretty much everything else; "TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4. [including fixing Mojang's poorly-implemented tool/armor smelting system; as well as Mending, attack cooldown, automated mob farms, optimizations and bug fixes (or avoiding major increases in resource usage), and much more]".
Also, it seems that the root cause is that Mojang doesn't want to patch furnaces so they can properly smelt items which produce more than one output item, which was quite easy for me to do (IIRC when I first added a recipe with multiple results it either capped it at 64, losing items, or overflowed past 64):
https://www.reddit.com/r/minecraftsuggestions/comments/12brtyq/make_furnace_recipes_be_able_to_output_more_than/
How easy is the fix? As is often the case a single line of code is all that is needed (I check if the sum of the result and output items is less than or equal to the limit; by contrast, vanilla only checks if the output item is less than the limit, thus it can only add one item at a time without overflowing):
The furnace refuses to smelt a third chestplate since it would result in more than 64 items in the output slot:
However, if I put a damaged chestplate in it does smelt it, yielding a total of 62 items (141/241 durability * 8 ingots/chestplate * 3 nuggets/ingot = 14 nuggets):
Another way I improved furnaces was to allow them to handle items with metadata; for example, smelting glowstone returns a "light block" (unrelated to the block added in a recent version), which is the same block ID with a data value of 1, which vanilla would happily smelt into the exact same item but I fixed that by checking the data value of the input item (currently in a hardcoded manner, with more such items it would be better to change the smelting recipe itself, which is currently only indexed by ID):
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
And although only gaining a third of the resources back is a little harsh for my liking I'd much rather take your solution than Mojang's, so would anybody else, it would at least make smelting a viable option for recycling or repurposing resources for other items in the game.
We don't need to have millions of chests full of pickaxes for any reason, because really, who dies enough times to lose this many pickaxes in a short period of time?, and the surplus iron pickaxes could be smelted to be made into something more useful, like a beacon pyramid, an anvil, a rail, or even iron bars. Iron bars have the same function as fences but with a different texture and being non flammable, can be used for building cages or prisons as well as barred windows on buildings.
I am aware that iron rails can still be useful sometimes, and they do work wonders when moving minecarts downhill as gravity powers the movement of minecarts in this case. Powered rails are only needed for moving anything uphill or along a horizontal railway system, and even then powered rails can be mixed with non powered rails for a cheaper automated transport system, if setup properly, can still be high speed.
Iron golems made by the player, as far as I am aware don't attack players who accidentally hit them, only Villager golems will, this means building our own iron golems can be useful sometimes.
But even without any of the above I mentioned, your solution would mean players would be more encouraged to craft their own lanterns, as opposed to simply relying on Villager trades from a Librarian to provide them an infinite amount every time. After all you only need 8 iron nuggets plus torch per lantern, getting 27 nuggets back would mean the player would be able to craft 3 lanterns per smelted item, assuming enough durability had been remaining on the item at the time and this would be something like an iron chestplate, where the original cost of crafting them would've been 8 iron ingots.
Even being able to craft 1 lantern per smelted tool or armour plate makes smelting an actual useful mechanic,
as players are being rewarded more for going after mob drops to be smelted in furnaces.
And of course players get enough resources from mob drops to continuously repair their iron gear with mending on them,
without having to reply on mining every single time. You did say your idea was to change mending so that indefinite repairs
would require the anvil and the use of rubies to prevent prior work penalty from making items too expensive.
I still think the addition of steel in the game, via the use of a Smithing table to increase the base durability of iron tools would be a good idea though. These items could still be made to require iron ingots for each repair even with enchantments,
but their base durability without Unbreaking increases from 250 to 750, making these tools half as durable as diamond,
while not being nearly as expensive to maintain.
Ultimately even a simple suggestion gets very complicated here.
I think proportional material recycling is the best way to deal with the renewability issue of iron and even gold items, I'd prefer it too as it is a much more engaging system than watching Iron Golems go toward an auto killing system. While their drops are intentional and not exactly a glitch, it doesn't change the fact that it is unbalanced.
But I would love to see iron golem farming be replaced with something better, and you proposed it here.
The resources you get from smelting should be dependent on the durability left on tools or armour, with varying amounts of durability left on armour plates or tools dropped by mob kills.
To eliminate cheesing
1) Mobs must be required to be able to path find to a player
2) Mobs must have at least 75% of the damage dealt to them by players, not environmental in addition to being killed or finished off by a player.
3) Mob spawners have a lower drop rate of items compared to those which are naturally spawned in dark caves or at night on surface.
If all 3 requirements had been met, then the armour drops be allowed,
and increase in likelihood if a player spends more time within a region, but with the hostile mobs themselves
being harder to deal with because of wearing that gear you try to loot them for.
I would also like regulated proportional recycling.