AsherGlick / ResourceCalculator

A Video Game Resource Calculator
https://resourcecalculator.com
GNU General Public License v3.0
57 stars 32 forks source link

Cut Copper* recipies for the Stone Cutter missing #56

Closed mmodrow closed 2 years ago

mmodrow commented 2 years ago

I just noticed, that Cut Copper items produce 4x the output when using the stone cutter, but that recipe is still missing in the resource calculator.

1 Block of Copper = 4 Blocks of cut copper/4 Cut Copper Stairs/8 Cut Copper Slabs (See: https://minecraft.fandom.com/wiki/Block_of_Copper#Stonecutting) obviously this only applies to copper-> cut copper. Cut copper->cut copper stairs still is 1:1.

The same applies to all the variants.

I actually farmed ~15k copper ingots, while 1/4 of that would've been sufficient! Yikes!

AsherGlick commented 2 years ago

Apparently I flagged this change when it occurred in the snapshot but forgot to actually merge it in when the official release happened. #57 fixes this.

mmodrow commented 2 years ago

@AsherGlick thanks for the quick fix - but you forgot the 1:8 slabs recipe.

AsherGlick commented 2 years ago

Oh no! Ill have some time later today to add it in.

mmodrow commented 2 years ago

BTW, I've been thinking about a possibility to automatically extract items & recipes from the code or the default data pack (haven't yet looked into it). Once that exists it should be fairly easy to port that data to your yaml structure.

Would you be interested in using such a tool if it turned out possible & feasible and I would develop it, @AsherGlick ?

That data has to be somewhere in the game and it cannot be the best way to update this for every update by hand.

AsherGlick commented 2 years ago

I have looked into that before. The item recipes are not stored in the default datapack last I checked and instead stored inside of the code of the game itself. However if you come up with a method of reliably extracting the data from the game I would be happy to use it, the changes will still need to be curated by a human but at the very least it should prevent the problem of "missing" a recipe.

I do have code currently that automatically extracts the images from the creative menu, along with the item names.

mmodrow commented 2 years ago

I found a python script that's supposed to pull all crafting (and smelting etc) recipes from an extracted jar. I will look into that and see what I come up with.

AsherGlick commented 2 years ago

That would be very intriguing if it works! Even if it is only able to provide partial coverage of the recipes we can take advantage of it. Similarly to how coppergen.py, woodgen.py, and stonecutter_validation.py work

AsherGlick commented 2 years ago

Cut Copper Slabs should correctly be producing 8 output from uncut copper blocks now f1ad76c

mmodrow commented 2 years ago

@AsherGlick I took a brief peek into the case and the recipes are stored in json files within the jar. I should be able to whip up a portable/OS agnostic dotnet cli app to feed a minecraft jar in and get resource calculator compatible yaml recipes out.

AsherGlick commented 2 years ago

Oh wow. I just looked into the 1.18.2 jar file I have and it seems that you are correct! data/minecraft/recipes seems to contain all the json files. I see recipes for crafting and stone-cutting just as a spot check.

I don't want to add java as a dependency if at all possible, but if it is absolutely necessary then I will accept it. If all the data is in a json format inside the jar then you can just extract it and read the json files. I created a little mockup that does the extraction here. If you want to continue this discussion it is probably wise to open a new issue so we dont keep a record of this on a closed issue about a missing recipe.

I am eager to see what you come up with.

mmodrow commented 2 years ago

I wouldn't add dependencies for you and resource calculator, as this feels like a meta tool, that should have its own repo. I planned creating a repo on my account and let you use it freely. It will most likely be dotnet 6 and as such run platform agnostic, as long as the .net runtime is installed. I could add a docker file for building and running it without local dependencies beyond docker.