Cuberite Forum
Zubb's Breakdown Recipes - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Zubb's Breakdown Recipes (/thread-2303.html)



Zubb's Breakdown Recipes - Zubb - 01-07-2016

Hello,

I looked around the forum first to see if someone had posted something like this already but I didn't see anything so I felt like sharing something I did with the community. If this is in the wrong forum section, please move it.

I've added some custom crafting recipes to the Cuberite server I'm hosting. I wanted to give players the option to break down some blocks and items into their resources. This idea only works for recipes that use one resource to create a block or item. The idea behind this is to help reduce clutter in chests of unused items such as armor you collected from mob drops that you will never use or just to break down stuff and craft the resources into new stuff. I kept true to how many items make up something and it is the same amount you get back when you break it down. For example, a gold chestplate that is put inside a crafting table (work bench) will now break down into eight gold ingots. Using these recipes are optional.

However, if you would like to use these just copy and paste the following to the bottom of your crafting.txt file.

Code:
#
# Zubb's Breakdown Recipes [Custom]
#

# Anvil Breakdown
IronIngot, 31 = Anvil, *

# Armor Breakdown: Diamond
Diamond, 5 = DiamondHelmet, *
Diamond, 8 = DiamondChestplate, *
Diamond, 7 = DiamondPants, *
Diamond, 4 = DiamondBoots, *

# Armor Breakdown: Gold
GoldIngot, 5 = GoldenHelmet, *
GoldIngot, 8 = GoldenChestplate, *
GoldIngot, 7 = GoldenPants, *
GoldIngot, 4 = GoldenBoots, *

# Armor Breakdown: Iron
IronIngot, 5 = IronHelmet, *
IronIngot, 8 = IronChestplate, *
IronIngot, 7 = IronPants, *
IronIngot, 4 = IronBoots, *

# Armor Breakdown: Leather
Leather, 5 = LeatherHelmet, *
Leather, 8 = LeatherChestplate, *
Leather, 7 = LeatherPants, *
Leather, 4 = LeatherBoots, *

# Bucket Breakdown
IronIngot, 3 = Bucket, *

# Cauldron Breakdown
IronIngot, 7 = Cauldron, *

# Chest Breakdown
# Using OakPlanks here, but you can change it
OakPlanks, 8 = Chest, *

# Furnace Breakdown
Cobblestone, 8 = Furnace, *

# Gravel Breakdown
Flint, 1 = Gravel, *

# Minecart Breakdown
IronIngot, 5 = Minecart, *

# Shears Breakdown
IronIngot, 2 = Shears, *

# Wool Breakdown
String, 4 = Wool, *

# Workbench Breakdown
# Using OakPlanks here, but you can change it
OakPlanks, 4 = Workbench, *

Enjoying Cuberite; joined recently and having a blast!


RE: Zubb's Breakdown Recipes - xoft - 01-07-2016

Hello, welcome to the forum.

That's an interesting idea, but it gives the player a somewhat unfair advantage. Consider an armor, for example - you craft it, you wear it until it's almost broken, and then you break it down into the base resources and re-craft a brand new armor out of it.

I think a more balanced scenario would be to use a plugin to actually calculate the amount of returned resources, based on the item damage. The more it is damaged, the less resources you get back. However, this can't be done in a simple recipe file, it needs to be a plugin that overrides crafting.

Incidentally, if you do decide to code such a plugin, it would make an awesome "example code" for the crafting hooks documentation pages ( http://apidocs.cuberite.org/OnPreCrafting.html )


RE: Zubb's Breakdown Recipes - NiLSPACE - 01-07-2016

NiceBig Grin perhaps instead of a single file we should make a folder. In there we put our crafting.txt file by default, and people can throw in more files for custom recipes.


RE: Zubb's Breakdown Recipes - Zubb - 01-07-2016

@ xoft , You raise good points. I will look into making a plugin.

@ NiLSPACE , Hey the main page says "custom", I was just rolling with itTongue


RE: Zubb's Breakdown Recipes - ThuGie - 01-07-2016

What would be nice to be able to set the amount it took to make it.
So if the item is fully repaired it turns back to the amount that you took to make it.
But if its lets say 50% you only get half etc. but if it took 5 to make it you get 2 back and a few nuggets if the resource supports it of course else just count down to 2.

Though for this instead of a recipe change a plugin would be needed i would be thinking.
This way if it was a pick axe you could even return the sticks :p.