Burger icon indicating copy to clipboard operation
Burger copied to clipboard

Smelting Data

Open njt1982 opened this issue 4 years ago • 4 comments

Hi,

I cant seem to find any existing recipes for smelting information (only crafting recipes).

Would this be a new "topping"?

For example:

data/minecraft/recipes/iron_ingot.json

That file contains:

{
  "type": "minecraft:smelting",
  "ingredient": {
    "item": "minecraft:iron_ore"
  },
  "result": "minecraft:iron_ingot",
  "experience": 0.7,
  "cookingtime": 200
}

There is a whole load of recipes "missing" from the recipes.json output, although I can appreciate why that is. Maybe these should be in their own aggregation?

grep 'minecraft:smelting' *
baked_potato.json:  "type": "minecraft:smelting",
black_glazed_terracotta.json:  "type": "minecraft:smelting",
blue_glazed_terracotta.json:  "type": "minecraft:smelting",
brick.json:  "type": "minecraft:smelting",
brown_glazed_terracotta.json:  "type": "minecraft:smelting",
charcoal.json:  "type": "minecraft:smelting",
coal_from_smelting.json:  "type": "minecraft:smelting",
cooked_beef.json:  "type": "minecraft:smelting",
cooked_chicken.json:  "type": "minecraft:smelting",
cooked_cod.json:  "type": "minecraft:smelting",
cooked_mutton.json:  "type": "minecraft:smelting",
cooked_porkchop.json:  "type": "minecraft:smelting",
cooked_rabbit.json:  "type": "minecraft:smelting",
cooked_salmon.json:  "type": "minecraft:smelting",
cracked_stone_bricks.json:  "type": "minecraft:smelting",
cyan_glazed_terracotta.json:  "type": "minecraft:smelting",
diamond_from_smelting.json:  "type": "minecraft:smelting",
dried_kelp_from_smelting.json:  "type": "minecraft:smelting",
emerald_from_smelting.json:  "type": "minecraft:smelting",
glass.json:  "type": "minecraft:smelting",
gold_ingot.json:  "type": "minecraft:smelting",
gold_nugget_from_smelting.json:  "type": "minecraft:smelting",
gray_glazed_terracotta.json:  "type": "minecraft:smelting",
green_dye.json:  "type": "minecraft:smelting",
green_glazed_terracotta.json:  "type": "minecraft:smelting",
iron_ingot.json:  "type": "minecraft:smelting",
iron_nugget_from_smelting.json:  "type": "minecraft:smelting",
lapis_from_smelting.json:  "type": "minecraft:smelting",
light_blue_glazed_terracotta.json:  "type": "minecraft:smelting",
light_gray_glazed_terracotta.json:  "type": "minecraft:smelting",
lime_dye_from_smelting.json:  "type": "minecraft:smelting",
lime_glazed_terracotta.json:  "type": "minecraft:smelting",
magenta_glazed_terracotta.json:  "type": "minecraft:smelting",
nether_brick.json:  "type": "minecraft:smelting",
orange_glazed_terracotta.json:  "type": "minecraft:smelting",
pink_glazed_terracotta.json:  "type": "minecraft:smelting",
popped_chorus_fruit.json:  "type": "minecraft:smelting",
purple_glazed_terracotta.json:  "type": "minecraft:smelting",
quartz.json:  "type": "minecraft:smelting",
red_glazed_terracotta.json:  "type": "minecraft:smelting",
redstone_from_smelting.json:  "type": "minecraft:smelting",
smooth_quartz.json:  "type": "minecraft:smelting",
smooth_red_sandstone.json:  "type": "minecraft:smelting",
smooth_sandstone.json:  "type": "minecraft:smelting",
smooth_stone.json:  "type": "minecraft:smelting",
sponge.json:  "type": "minecraft:smelting",
stone.json:  "type": "minecraft:smelting",
terracotta.json:  "type": "minecraft:smelting",
white_glazed_terracotta.json:  "type": "minecraft:smelting",
yellow_glazed_terracotta.json:  "type": "minecraft:smelting",

njt1982 avatar Jun 02 '20 00:06 njt1982

Oh... This would do it...

https://github.com/mcdevs/Burger/blob/fdff962aeb1aa0351fc222e005af3fa9248345fb/burger/toppings/recipes.py#L136

Why don't we care about those?

njt1982 avatar Jun 02 '20 00:06 njt1982

Currently, recipes other than minecraft:crafting_shaped and minecraft:crafting_shapeless are ignored:

https://github.com/mcdevs/Burger/blob/fdff962aeb1aa0351fc222e005af3fa9248345fb/burger/toppings/recipes.py#L135-L137

It wouldn't be that hard to add them (for versions that use JSON-based smelting recipes at least), but I'm also not sure how useful that information would be to include (especially since the smoker and blast furnace also exist and have mostly redundant data, and then there's other devices as well...)

Pokechu22 avatar Jun 02 '20 00:06 Pokechu22

@Pokechu22 Thanks for the response.

So for my needs (some context), the lack of furnace data in the downstream https://github.com/PrismarineJS/minecraft-data package due to it being excluded here means my little browser app has no data for iron_ore (amongst the rest of the list above).

https://njt1982.github.io/minecraft-item-browser/#/iron_ore

Would you bundle this data into recipes.json or would you put it in its own topping?

njt1982 avatar Jun 02 '20 00:06 njt1982

For burger, if I did include it, it would be in the same recipes section (burger only generates one JSON file), since I'd want to process it in the same recipes topping (since that handles the other JSON recipes). About 40% of the current burger JSON files are recipe data, and adding more data to it seems a bit overkill (given that there isn't really much of a processing step to it; it's just taking data already in JSON and expanding tags).

It might be easier for minecraft-data to use the data generator system (or directly extracting the JSON files from the minecart jar) themselves, and bundle it into their own recipes.json or equivalent, rather than that data first being put into burger and then put into minecraft-data.

Pokechu22 avatar Jun 02 '20 04:06 Pokechu22