From 61693d611a7d5742c7b7a83e5a95fbc930414092 Mon Sep 17 00:00:00 2001 From: Paula Date: Sun, 1 Nov 2026 00:49:05 -0300 Subject: [PATCH] Move farmers delight to bworld --- common/everything_registry.ts | 2 +- common/mod_api/server.ts | 2 +- common/mod_api/shared.ts | 2 +- common/mod_data.ts | 4 +- docs/modding/blocks/crops.md | 32 ++++----- docs/modding/blocks/index.md | 2 +- docs/modding/blocks/states.md | 2 +- docs/modding/blocks/tiledata.md | 4 +- docs/modding/concepts/registries.md | 2 +- docs/modding/gettingstarted/index.md | 4 +- docs/modding/inventories/menus.md | 4 +- docs/modding/items/food.md | 4 +- docs/modding/resources/recipes.md | 12 ++-- .../blocks/cabbages.json | 22 +++--- mods/bworld/blocks/cooking_pot.json | 25 +++++++ .../blocks/cutting_board.json | 10 +-- .../blocks/onions.json | 14 ++-- .../blocks/rice.json | 18 ++--- .../blocks/rice_panicles.json | 16 ++--- .../blocks/stove.json | 22 +++--- .../blocks/tomatoes.json | 24 +++---- .../items/cabbage.json | 4 +- .../items/cabbage_leaf.json | 4 +- .../items/cabbage_rolls.json | 4 +- mods/bworld/items/cabbage_seeds.json | 8 +++ .../items/cod_slice.json | 4 +- .../items/cooked_rice.json | 4 +- mods/bworld/items/cooking_pot.json | 9 +++ .../items/copper_knife.json | 4 +- .../items/gold_knife.json | 4 +- .../items/iron_knife.json | 4 +- .../items/onion.json | 6 +- mods/bworld/items/rice.json | 9 +++ mods/bworld/items/rice_panicle.json | 8 +++ .../items/salmon_slice.json | 4 +- .../items/stone_knife.json | 4 +- .../items/tomato.json | 4 +- .../items/tomato_sauce.json | 4 +- mods/bworld/items/tomato_seeds.json | 8 +++ .../items/wood_knife.json | 4 +- .../loot_tables/blocks/cabbages.json | 6 +- .../loot_tables/blocks/onions.json | 4 +- .../loot_tables/blocks/rice.json | 2 +- .../loot_tables/blocks/rice_panicles.json | 2 +- .../loot_tables/blocks/tomatoes.json | 4 +- .../loot_tables/harvest/tomatoes.json | 2 +- .../models/cooking_pot.json | 10 +-- .../models/cutting_board.json | 4 +- .../bworld/recipes/cooking_cabbage_rolls.json | 12 ++++ mods/bworld/recipes/cooking_cooked_rice.json | 10 +++ mods/bworld/recipes/cooking_tomato_sauce.json | 10 +++ .../recipes/crafting_cooking_pot.json | 2 +- .../recipes/crafting_cutting_board.json | 2 +- .../recipes/crafting_stove.json | 2 +- .../recipes/crafting_wood_knife.json | 2 +- mods/bworld/recipes/cutting_cabbage.json | 9 +++ mods/bworld/recipes/cutting_cod.json | 9 +++ mods/bworld/recipes/cutting_salmon.json | 9 +++ .../recipes/smithing_copper_knife.json | 4 +- .../recipes/smithing_gold_knife.json | 4 +- .../recipes/smithing_iron_knife.json | 4 +- .../recipes/smithing_stone_knife.json | 4 +- mods/bworld/scripts/client.ts | 16 +++++ .../server.ts => bworld/scripts/cooking.ts} | 35 ++++------ mods/bworld/scripts/server.ts | 6 +- .../textures/beef_stew.png | Bin .../textures/bone_broth.png | Bin .../textures/budding_tomatoes_stage0.png | Bin .../textures/budding_tomatoes_stage1.png | Bin .../textures/budding_tomatoes_stage2.png | Bin .../textures/budding_tomatoes_stage3.png | Bin .../textures/cabbage.png | Bin .../textures/cabbage_leaf.png | Bin .../textures/cabbage_rolls.png | Bin .../textures/cabbage_seeds.png | Bin .../textures/cabbages_stage0.png | Bin .../textures/cabbages_stage1.png | Bin .../textures/cabbages_stage2.png | Bin .../textures/cabbages_stage3.png | Bin .../textures/cabbages_stage4.png | Bin .../textures/cabbages_stage5.png | Bin .../textures/cabbages_stage6.png | Bin .../textures/cabbages_stage7.png | Bin .../textures/chicken_soup.png | Bin .../textures/cod_slice.png | Bin .../textures/cooked_rice.png | Bin .../textures/cooking_pot.png | Bin .../textures/cooking_pot_bottom.png | Bin .../textures/cooking_pot_parts.png | Bin .../textures/cooking_pot_side.png | Bin .../textures/cooking_pot_top.png | Bin .../textures/copper_knife.png | Bin .../textures/cutting_board.png | Bin .../textures/fish_stew.png | Bin .../textures/fried_egg.png | Bin .../textures/fried_rice.png | Bin .../textures/fruit_salad.png | Bin .../textures/gleaming_salad.png | Bin .../textures/gold_knife.png | Bin .../textures/iron_knife.png | Bin .../textures/mixed_salad.png | Bin .../textures/onion.png | Bin .../textures/onion_soup.png | Bin .../textures/onions_stage0.png | Bin .../textures/onions_stage1.png | Bin .../textures/onions_stage2.png | Bin .../textures/onions_stage3.png | Bin .../textures/pumpkin_soup.png | Bin .../textures/rice.png | Bin .../textures/rice_panicle.png | Bin .../textures/rice_panicles_stage0.png | Bin .../textures/rice_panicles_stage1.png | Bin .../textures/rice_panicles_stage2.png | Bin .../textures/rice_panicles_stage3.png | Bin .../textures/rice_stage0.png | Bin .../textures/rice_stage1.png | Bin .../textures/rice_stage2.png | Bin .../textures/rice_stage3.png | Bin .../textures/rice_supporting.png | Bin .../textures/salmon_slice.png | Bin .../textures/stone_knife.png | Bin .../textures/stove_bottom.png | Bin .../textures/stove_front.png | Bin .../textures/stove_front_on.json | 0 .../textures/stove_front_on.png | Bin .../textures/stove_side.png | Bin .../textures/stove_top.png | Bin .../textures/stove_top_on.png | Bin .../textures/tomato.png | Bin .../textures/tomato_sauce.png | Bin .../textures/tomato_seeds.png | Bin .../textures/tomatoes_stage0.png | Bin .../textures/tomatoes_stage1.png | Bin .../textures/tomatoes_stage2.png | Bin .../textures/tomatoes_stage3.png | Bin .../textures/vegetable_soup.png | Bin .../textures/wood_knife.png | Bin mods/farmersdelight/CREDITS.md | 28 -------- mods/farmersdelight/blocks/cooking_pot.json | 25 ------- mods/farmersdelight/items/cabbage_seeds.json | 8 --- mods/farmersdelight/items/cooking_pot.json | 9 --- mods/farmersdelight/items/rice.json | 9 --- mods/farmersdelight/items/rice_panicle.json | 8 --- mods/farmersdelight/items/tomato_seeds.json | 8 --- mods/farmersdelight/manifest.json | 23 ------- .../recipes/cooking_cabbage_rolls.json | 12 ---- .../recipes/cooking_cooked_rice.json | 10 --- .../recipes/cooking_tomato_sauce.json | 10 --- .../recipes/cutting_cabbage.json | 9 --- mods/farmersdelight/recipes/cutting_cod.json | 9 --- .../recipes/cutting_salmon.json | 9 --- mods/farmersdelight/scripts/client.ts | 26 ------- mods/recipe_viewer/README.md | 5 +- mods/recipe_viewer/scripts/categories.ts | 6 +- tests/commands_test.ts | 10 +-- tests/cooking_test.ts | 64 +++++++++--------- tests/cutting_board_test.ts | 26 +++---- tests/farming_test.ts | 24 +++---- tests/recipe_viewer_test.ts | 20 +++--- tests/tags_test.ts | 4 +- tests/waterlog_test.ts | 6 +- 161 files changed, 403 insertions(+), 466 deletions(-) rename mods/{farmersdelight => bworld}/blocks/cabbages.json (62%) create mode 100644 mods/bworld/blocks/cooking_pot.json rename mods/{farmersdelight => bworld}/blocks/cutting_board.json (68%) rename mods/{farmersdelight => bworld}/blocks/onions.json (69%) rename mods/{farmersdelight => bworld}/blocks/rice.json (72%) rename mods/{farmersdelight => bworld}/blocks/rice_panicles.json (59%) rename mods/{farmersdelight => bworld}/blocks/stove.json (51%) rename mods/{farmersdelight => bworld}/blocks/tomatoes.json (59%) rename mods/{farmersdelight => bworld}/items/cabbage.json (74%) rename mods/{farmersdelight => bworld}/items/cabbage_leaf.json (61%) rename mods/{farmersdelight => bworld}/items/cabbage_rolls.json (60%) create mode 100644 mods/bworld/items/cabbage_seeds.json rename mods/{farmersdelight => bworld}/items/cod_slice.json (62%) rename mods/{farmersdelight => bworld}/items/cooked_rice.json (68%) create mode 100644 mods/bworld/items/cooking_pot.json rename mods/{farmersdelight => bworld}/items/copper_knife.json (60%) rename mods/{farmersdelight => bworld}/items/gold_knife.json (61%) rename mods/{farmersdelight => bworld}/items/iron_knife.json (61%) rename mods/{farmersdelight => bworld}/items/onion.json (55%) create mode 100644 mods/bworld/items/rice.json create mode 100644 mods/bworld/items/rice_panicle.json rename mods/{farmersdelight => bworld}/items/salmon_slice.json (61%) rename mods/{farmersdelight => bworld}/items/stone_knife.json (60%) rename mods/{farmersdelight => bworld}/items/tomato.json (75%) rename mods/{farmersdelight => bworld}/items/tomato_sauce.json (65%) create mode 100644 mods/bworld/items/tomato_seeds.json rename mods/{farmersdelight => bworld}/items/wood_knife.json (61%) rename mods/{farmersdelight => bworld}/loot_tables/blocks/cabbages.json (85%) rename mods/{farmersdelight => bworld}/loot_tables/blocks/onions.json (85%) rename mods/{farmersdelight => bworld}/loot_tables/blocks/rice.json (75%) rename mods/{farmersdelight => bworld}/loot_tables/blocks/rice_panicles.json (83%) rename mods/{farmersdelight => bworld}/loot_tables/blocks/tomatoes.json (77%) rename mods/{farmersdelight => bworld}/loot_tables/harvest/tomatoes.json (81%) rename mods/{farmersdelight => bworld}/models/cooking_pot.json (90%) rename mods/{farmersdelight => bworld}/models/cutting_board.json (96%) create mode 100644 mods/bworld/recipes/cooking_cabbage_rolls.json create mode 100644 mods/bworld/recipes/cooking_cooked_rice.json create mode 100644 mods/bworld/recipes/cooking_tomato_sauce.json rename mods/{farmersdelight => bworld}/recipes/crafting_cooking_pot.json (71%) rename mods/{farmersdelight => bworld}/recipes/crafting_cutting_board.json (82%) rename mods/{farmersdelight => bworld}/recipes/crafting_stove.json (75%) rename mods/{farmersdelight => bworld}/recipes/crafting_wood_knife.json (83%) create mode 100644 mods/bworld/recipes/cutting_cabbage.json create mode 100644 mods/bworld/recipes/cutting_cod.json create mode 100644 mods/bworld/recipes/cutting_salmon.json rename mods/{farmersdelight => bworld}/recipes/smithing_copper_knife.json (61%) rename mods/{farmersdelight => bworld}/recipes/smithing_gold_knife.json (62%) rename mods/{farmersdelight => bworld}/recipes/smithing_iron_knife.json (61%) rename mods/{farmersdelight => bworld}/recipes/smithing_stone_knife.json (60%) rename mods/{farmersdelight/scripts/server.ts => bworld/scripts/cooking.ts} (92%) rename mods/{farmersdelight => bworld}/textures/beef_stew.png (100%) rename mods/{farmersdelight => bworld}/textures/bone_broth.png (100%) rename mods/{farmersdelight => bworld}/textures/budding_tomatoes_stage0.png (100%) rename mods/{farmersdelight => bworld}/textures/budding_tomatoes_stage1.png (100%) rename mods/{farmersdelight => bworld}/textures/budding_tomatoes_stage2.png (100%) rename mods/{farmersdelight => bworld}/textures/budding_tomatoes_stage3.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbage.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbage_leaf.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbage_rolls.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbage_seeds.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage0.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage1.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage2.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage3.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage4.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage5.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage6.png (100%) rename mods/{farmersdelight => bworld}/textures/cabbages_stage7.png (100%) rename mods/{farmersdelight => bworld}/textures/chicken_soup.png (100%) rename mods/{farmersdelight => bworld}/textures/cod_slice.png (100%) rename mods/{farmersdelight => bworld}/textures/cooked_rice.png (100%) rename mods/{farmersdelight => bworld}/textures/cooking_pot.png (100%) rename mods/{farmersdelight => bworld}/textures/cooking_pot_bottom.png (100%) rename mods/{farmersdelight => bworld}/textures/cooking_pot_parts.png (100%) rename mods/{farmersdelight => bworld}/textures/cooking_pot_side.png (100%) rename mods/{farmersdelight => bworld}/textures/cooking_pot_top.png (100%) rename mods/{farmersdelight => bworld}/textures/copper_knife.png (100%) rename mods/{farmersdelight => bworld}/textures/cutting_board.png (100%) rename mods/{farmersdelight => bworld}/textures/fish_stew.png (100%) rename mods/{farmersdelight => bworld}/textures/fried_egg.png (100%) rename mods/{farmersdelight => bworld}/textures/fried_rice.png (100%) rename mods/{farmersdelight => bworld}/textures/fruit_salad.png (100%) rename mods/{farmersdelight => bworld}/textures/gleaming_salad.png (100%) rename mods/{farmersdelight => bworld}/textures/gold_knife.png (100%) rename mods/{farmersdelight => bworld}/textures/iron_knife.png (100%) rename mods/{farmersdelight => bworld}/textures/mixed_salad.png (100%) rename mods/{farmersdelight => bworld}/textures/onion.png (100%) rename mods/{farmersdelight => bworld}/textures/onion_soup.png (100%) rename mods/{farmersdelight => bworld}/textures/onions_stage0.png (100%) rename mods/{farmersdelight => bworld}/textures/onions_stage1.png (100%) rename mods/{farmersdelight => bworld}/textures/onions_stage2.png (100%) rename mods/{farmersdelight => bworld}/textures/onions_stage3.png (100%) rename mods/{farmersdelight => bworld}/textures/pumpkin_soup.png (100%) rename mods/{farmersdelight => bworld}/textures/rice.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_panicle.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_panicles_stage0.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_panicles_stage1.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_panicles_stage2.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_panicles_stage3.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_stage0.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_stage1.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_stage2.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_stage3.png (100%) rename mods/{farmersdelight => bworld}/textures/rice_supporting.png (100%) rename mods/{farmersdelight => bworld}/textures/salmon_slice.png (100%) rename mods/{farmersdelight => bworld}/textures/stone_knife.png (100%) rename mods/{farmersdelight => bworld}/textures/stove_bottom.png (100%) rename mods/{farmersdelight => bworld}/textures/stove_front.png (100%) rename mods/{farmersdelight => bworld}/textures/stove_front_on.json (100%) rename mods/{farmersdelight => bworld}/textures/stove_front_on.png (100%) rename mods/{farmersdelight => bworld}/textures/stove_side.png (100%) rename mods/{farmersdelight => bworld}/textures/stove_top.png (100%) rename mods/{farmersdelight => bworld}/textures/stove_top_on.png (100%) rename mods/{farmersdelight => bworld}/textures/tomato.png (100%) rename mods/{farmersdelight => bworld}/textures/tomato_sauce.png (100%) rename mods/{farmersdelight => bworld}/textures/tomato_seeds.png (100%) rename mods/{farmersdelight => bworld}/textures/tomatoes_stage0.png (100%) rename mods/{farmersdelight => bworld}/textures/tomatoes_stage1.png (100%) rename mods/{farmersdelight => bworld}/textures/tomatoes_stage2.png (100%) rename mods/{farmersdelight => bworld}/textures/tomatoes_stage3.png (100%) rename mods/{farmersdelight => bworld}/textures/vegetable_soup.png (100%) rename mods/{farmersdelight => bworld}/textures/wood_knife.png (100%) delete mode 100644 mods/farmersdelight/CREDITS.md delete mode 100644 mods/farmersdelight/blocks/cooking_pot.json delete mode 100644 mods/farmersdelight/items/cabbage_seeds.json delete mode 100644 mods/farmersdelight/items/cooking_pot.json delete mode 100644 mods/farmersdelight/items/rice.json delete mode 100644 mods/farmersdelight/items/rice_panicle.json delete mode 100644 mods/farmersdelight/items/tomato_seeds.json delete mode 100644 mods/farmersdelight/manifest.json delete mode 100644 mods/farmersdelight/recipes/cooking_cabbage_rolls.json delete mode 100644 mods/farmersdelight/recipes/cooking_cooked_rice.json delete mode 100644 mods/farmersdelight/recipes/cooking_tomato_sauce.json delete mode 100644 mods/farmersdelight/recipes/cutting_cabbage.json delete mode 100644 mods/farmersdelight/recipes/cutting_cod.json delete mode 100644 mods/farmersdelight/recipes/cutting_salmon.json delete mode 100644 mods/farmersdelight/scripts/client.ts diff --git a/common/everything_registry.ts b/common/everything_registry.ts index 319d985..b6c12e7 100644 --- a/common/everything_registry.ts +++ b/common/everything_registry.ts @@ -157,7 +157,7 @@ export interface BlockRegistry { place_in?: string[]; // custom components from mods and their params, the server runs them components?: Record; - // draws the item a server script gives it (ServerWorld.set_block_item) on top of it, like farmer's delight's + // draws the item a server script gives it (ServerWorld.set_block_item) on top of it, like the // cutting board. surface is the height in pixels it lies on. turned with the variant's y item_display?: { surface: number }; // a fluid like water, drawn like luanti's: its top slopes down towards where it flows. see FluidProperties diff --git a/common/mod_api/server.ts b/common/mod_api/server.ts index d65e728..997996a 100644 --- a/common/mod_api/server.ts +++ b/common/mod_api/server.ts @@ -648,7 +648,7 @@ export interface RecipeApi { is_smeltable(item: Id): boolean; // the smithing recipe for these items, whatever the material's count. addition is the optional third item smithing(tool: Id, material: Id, addition?: Id): { result: Id; material_count: number } | undefined; - // every recipe of a mod's own type, like "farmersdelight:cooking", as its json. copies, in load order + // every recipe of a mod's own type, like "bworld:cooking", as its json. copies, in load order // deno-lint-ignore no-explicit-any list(type: Id): any[]; } diff --git a/common/mod_api/shared.ts b/common/mod_api/shared.ts index 2404bc3..7b9334a 100644 --- a/common/mod_api/shared.ts +++ b/common/mod_api/shared.ts @@ -132,7 +132,7 @@ export interface SharedContext { register(id: Id, rules: FluidRules): void; }; readonly recipes: { - // adds a recipe of type, like "shaped" or "farmersdelight:cooking", as a file in the mod's recipes/ with that + // adds a recipe of type, like "shaped" or "bworld:cooking", as a file in the mod's recipes/ with that // json would, only during setup. for recipes made from other data, like one for every item with a component. // shared scripts run on the server and every client alike, so they all have it without it being sent. it's // there for server and client scripts, which set up after, and it throws when it's broken like a file would diff --git a/common/mod_data.ts b/common/mod_data.ts index c9071cb..23f4e7e 100644 --- a/common/mod_data.ts +++ b/common/mod_data.ts @@ -631,12 +631,12 @@ const engine_recipes = new Map([ ["smithing", smithing_recipe], ]); -// a mod's own types, like "farmersdelight:cooking" for its cooking pot, are only stored by the engine. the mod's server +// a mod's own types, like "bworld:cooking" for its cooking pot, are only stored by the engine. the mod's server // script reads them with ctx.recipes.list and checks them const recipe_schema = by_kind( "type", (type) => engine_recipes.get(type) ?? (ID_PATTERN.test(type) ? json_object : undefined), - 'must be "shaped", "furnace", "fuel", "smithing" or a mod\'s own type like "farmersdelight:cooking"', + 'must be "shaped", "furnace", "fuel", "smithing" or a mod\'s own type like "bworld:cooking"', ); // a recipe type a mod made up, as opposed to the engine's shaped, furnace, fuel and smithing diff --git a/docs/modding/blocks/crops.md b/docs/modding/blocks/crops.md index 2f3da53..96c3d59 100644 --- a/docs/modding/blocks/crops.md +++ b/docs/modding/blocks/crops.md @@ -7,7 +7,7 @@ Crops grow on Stardew Valley's clock with Minecraft's rules: every morning at 06 the day before grows a day, then all farmland dries out. The crop shows the stage for how far along it is. A crop with `seasons` dies the first morning that's in another season, turning into a `bworld:dead_bush`, so a summer crop has to be harvested before autumn comes. The season is its biome's, so a crop that only grows in summer is always out of season in -a snowy biome. `mods/farmersdelight` adds its cabbages, onions, tomatoes and rice this way. +a snowy biome. ## A Basic Crop @@ -17,17 +17,17 @@ a snowy biome. `mods/farmersdelight` adds its cabbages, onions, tomatoes and ric { "format_version": 1, "block": { - "id": "farmersdelight:cabbages", + "id": "bworld:cabbages", "model": "engine:cross", - "textures": { "cross": "farmersdelight:cabbages_stage0" }, + "textures": { "cross": "bworld:cabbages_stage0" }, "variants": { - "age=1": { "textures": { "cross": "farmersdelight:cabbages_stage1" } }, - "age=2": { "textures": { "cross": "farmersdelight:cabbages_stage2" } } + "age=1": { "textures": { "cross": "bworld:cabbages_stage1" } }, + "age=2": { "textures": { "cross": "bworld:cabbages_stage2" } } }, "render_layer": "cutout", "collision": false, "mining": { "toughness": 0 }, - "loot_table": "farmersdelight:blocks/cabbages", + "loot_table": "bworld:blocks/cabbages", "item": false, "place_on": ["bworld:hoed_dirt"], "states": [{ "name": "age", "bits": 3, "default": 0 }], @@ -48,9 +48,9 @@ a snowy biome. `mods/farmersdelight` adds its cabbages, onions, tomatoes and ric { "format_version": 1, "item": { - "id": "farmersdelight:cabbage_seeds", - "texture": "farmersdelight:cabbage_seeds", - "places": "farmersdelight:cabbages" + "id": "bworld:cabbage_seeds", + "texture": "bworld:cabbage_seeds", + "places": "bworld:cabbages" } } ``` @@ -71,11 +71,11 @@ and 1 to 4 seeds, like Minecraft's wheat: { "entries": [ { - "item": "farmersdelight:cabbage", + "item": "bworld:cabbage", "conditions": [{ "condition": "block_state", "states": { "age": 7 } }] }, { - "item": "farmersdelight:cabbage_seeds", + "item": "bworld:cabbage_seeds", "conditions": [ { "condition": "inverted", "term": { "condition": "block_state", "states": { "age": 7 } } } ] @@ -86,7 +86,7 @@ and 1 to 4 seeds, like Minecraft's wheat: "conditions": [{ "condition": "block_state", "states": { "age": 7 } }], "entries": [ { - "item": "farmersdelight:cabbage_seeds", + "item": "bworld:cabbage_seeds", "functions": [{ "function": "set_count", "count": { "n": 3, "p": 0.5714 }, "add": true }] } ] @@ -119,7 +119,7 @@ Tomatoes are picked instead of broken: "days": 11, "stages": 8, "regrow_days": 4, - "harvest": "farmersdelight:harvest/tomatoes" + "harvest": "bworld:harvest/tomatoes" } ``` @@ -129,7 +129,7 @@ with `loot_tables/harvest/tomatoes.json` giving 1 or 2 tomatoes: { "format_version": 1, "loot_table": { - "pools": [{ "entries": [{ "item": "farmersdelight:tomato", "count": { "min": 1, "max": 2 } }] }] + "pools": [{ "entries": [{ "item": "bworld:tomato", "count": { "min": 1, "max": 2 } }] }] } } ``` @@ -147,7 +147,7 @@ block goes through its own `stages`: "days": 6, "stages": 4, "water": "always", - "upper": { "block": "farmersdelight:rice_panicles", "stages": 4, "supporting_age": 4 }, + "upper": { "block": "bworld:rice_panicles", "stages": 4, "supporting_age": 4 }, "leaves": "bworld:water" } } @@ -157,7 +157,7 @@ The top block uses `bworld:crop_top` with its own `stages`, and its own loot tab whole plant: ```json -"loot_table": "farmersdelight:blocks/rice_panicles", +"loot_table": "bworld:blocks/rice_panicles", "components": { "bworld:crop_top": { "stages": 4 } } diff --git a/docs/modding/blocks/index.md b/docs/modding/blocks/index.md index dcf57d6..aa7ab12 100644 --- a/docs/modding/blocks/index.md +++ b/docs/modding/blocks/index.md @@ -205,7 +205,7 @@ A block that isn't a fluid can hold one, like Minecraft's waterlogged fences. `w - Broken, it leaves a source of the fluid behind. - Raycasts with `fluids` other than `"none"` hit the fluid in it, filling the block, and say the fluid's id. -The base game's wooden fences are waterloggable, and Farmer's Delight's rice is `waterlogged_only`. +The base game's wooden fences are waterloggable, and rice is `waterlogged_only`. ## Tinting diff --git a/docs/modding/blocks/states.md b/docs/modding/blocks/states.md index 8780e1e..614b7e3 100644 --- a/docs/modding/blocks/states.md +++ b/docs/modding/blocks/states.md @@ -97,4 +97,4 @@ look, 0 to 3. Pair it with turning variants, like the furnace: A lit furnace facing east matches both `facing=1` (its turn) and `lit=1` (its textures). -Turning also turns a [displayed item](tiledata.md#showing-an-item), like the knife on Farmer's Delight's cutting board. +Turning also turns a [displayed item](tiledata.md#showing-an-item), like the knife on the cutting board. diff --git a/docs/modding/blocks/tiledata.md b/docs/modding/blocks/tiledata.md index 3a9e875..5ad0209 100644 --- a/docs/modding/blocks/tiledata.md +++ b/docs/modding/blocks/tiledata.md @@ -86,7 +86,7 @@ to every player near it. ## Showing an Item -A block with `item_display` draws one item lying on top of it, like the food on Farmer's Delight's cutting board: +A block with `item_display` draws one item lying on top of it, like the food on cutting board: ```json "item_display": { "surface": 1 } @@ -95,7 +95,7 @@ A block with `item_display` draws one item lying on top of it, like the food on `surface` is the height in pixels the item lies at, 0 to 16. The server script sets the item: ```ts -ctx.world.set_block_item(x, y, z, { id: "farmersdelight:cabbage", count: 1 }); +ctx.world.set_block_item(x, y, z, { id: "bworld:cabbage", count: 1 }); const shown = ctx.world.get_block_item(x, y, z); // a copy, or undefined ctx.world.set_block_item(x, y, z, undefined); // shows nothing ``` diff --git a/docs/modding/concepts/registries.md b/docs/modding/concepts/registries.md index b2b8f9c..f5d3161 100644 --- a/docs/modding/concepts/registries.md +++ b/docs/modding/concepts/registries.md @@ -5,7 +5,7 @@ under it once, while mods load. After that the game refers to things only by the ## Identifiers -An id looks like `namespace:name`, like `farmersdelight:cabbage`: +An id looks like `namespace:name`, like `bworld:cabbage`: - `namespace` is the id of the mod that registers it, 1-32 characters of `a-z`, `0-9` and `_`. - `name` is `a-z`, `0-9` and `_`. diff --git a/docs/modding/gettingstarted/index.md b/docs/modding/gettingstarted/index.md index cfe5b3e..38c205e 100644 --- a/docs/modding/gettingstarted/index.md +++ b/docs/modding/gettingstarted/index.md @@ -27,8 +27,8 @@ name. > [!TIP] > The mods already in the repository are the best reference. `mods/bworld` is the base game itself, written against the -> same API as any other mod. `mods/farmersdelight` adds crops, a stove, a cooking pot and a cutting board, and -> `mods/recipe_viewer` is a client-only mod with an inventory overlay and a screen of its own. +> same API as any other mod. `mods/creates` adds a lot of blocks and mechanics, and `mods/recipe_viewer` is a +> client-only mod with an inventory overlay and a screen of its own. ## Checking Your Mod diff --git a/docs/modding/inventories/menus.md b/docs/modding/inventories/menus.md index 6338e9a..9d59043 100644 --- a/docs/modding/inventories/menus.md +++ b/docs/modding/inventories/menus.md @@ -7,8 +7,8 @@ Menus are how players use [containers](containers.md), like NeoForge's. A GUI ha - The **screen** lives in the client script. It only draws the menu and sends the player's clicks. Every click goes to the server, which applies it following the menu's rules, so a modified client can only do what the -menu allows. Chests, furnaces, the smithing table and Farmer's Delight's cooking pot are all menus, and the base game's -curios slots are part of [the player's inventory](#the-players-inventory). +menu allows. Chests, furnaces, the smithing table and cooking pot are all menus, and the base game's curios slots are +part of [the player's inventory](#the-players-inventory). ## Registering a Menu Type diff --git a/docs/modding/items/food.md b/docs/modding/items/food.md index cc9f2b1..214c5a6 100644 --- a/docs/modding/items/food.md +++ b/docs/modding/items/food.md @@ -6,8 +6,8 @@ An item with a `food` property can be eaten. Players eat by right clicking while { "format_version": 1, "item": { - "id": "farmersdelight:cooked_rice", - "texture": "farmersdelight:cooked_rice", + "id": "bworld:cooked_rice", + "texture": "bworld:cooked_rice", "max_stack": 16, "food": { "nutrition": 6, "saturation_modifier": 0.4, "returns": "bworld:bowl" } } diff --git a/docs/modding/resources/recipes.md b/docs/modding/resources/recipes.md index 0521302..6544eef 100644 --- a/docs/modding/resources/recipes.md +++ b/docs/modding/resources/recipes.md @@ -155,16 +155,16 @@ Use a tag rather than listing ids when other mods might have more of the same th ## Custom Recipe Types -Any `type` with a namespace is a mod's own, like `farmersdelight:cooking` for the cooking pot. The engine only stores -these recipes. Everything else about them is up to the mod: +Any `type` with a namespace is a mod's own, like `bworld:cooking` for the cooking pot. The engine only stores these +recipes. Everything else about them is up to the mod: ```json { "format_version": 1, "recipe": { - "type": "farmersdelight:cooking", - "ingredients": ["farmersdelight:cabbage", ["bworld:carrot", "bworld:potato", "farmersdelight:onion"]], - "result": { "id": "farmersdelight:cabbage_rolls", "count": 1 }, + "type": "bworld:cooking", + "ingredients": ["bworld:cabbage", ["bworld:carrot", "bworld:potato", "bworld:onion"]], + "result": { "id": "bworld:cabbage_rolls", "count": 1 }, "cook_time": 100 } } @@ -173,7 +173,7 @@ these recipes. Everything else about them is up to the mod: The mod's server script reads them in `setup` and checks their fields itself: ```ts -const recipes = ctx.recipes.list("farmersdelight:cooking").map((json, i) => { +const recipes = ctx.recipes.list("bworld:cooking").map((json, i) => { if (!Array.isArray(json.ingredients) || json.ingredients.length > 6) { throw new Error(`cooking recipe ${i + 1}: ingredients must be 1 to 6 items`); } diff --git a/mods/farmersdelight/blocks/cabbages.json b/mods/bworld/blocks/cabbages.json similarity index 62% rename from mods/farmersdelight/blocks/cabbages.json rename to mods/bworld/blocks/cabbages.json index 427ca80..edc8295 100644 --- a/mods/farmersdelight/blocks/cabbages.json +++ b/mods/bworld/blocks/cabbages.json @@ -1,50 +1,50 @@ { "format_version": 1, "block": { - "id": "farmersdelight:cabbages", + "id": "bworld:cabbages", "textures": { - "cross": "farmersdelight:cabbages_stage0" + "cross": "bworld:cabbages_stage0" }, "model": "engine:cross", "variants": { "age=0": { "textures": { - "cross": "farmersdelight:cabbages_stage0" + "cross": "bworld:cabbages_stage0" } }, "age=1": { "textures": { - "cross": "farmersdelight:cabbages_stage1" + "cross": "bworld:cabbages_stage1" } }, "age=2": { "textures": { - "cross": "farmersdelight:cabbages_stage2" + "cross": "bworld:cabbages_stage2" } }, "age=3": { "textures": { - "cross": "farmersdelight:cabbages_stage3" + "cross": "bworld:cabbages_stage3" } }, "age=4": { "textures": { - "cross": "farmersdelight:cabbages_stage4" + "cross": "bworld:cabbages_stage4" } }, "age=5": { "textures": { - "cross": "farmersdelight:cabbages_stage5" + "cross": "bworld:cabbages_stage5" } }, "age=6": { "textures": { - "cross": "farmersdelight:cabbages_stage6" + "cross": "bworld:cabbages_stage6" } }, "age=7": { "textures": { - "cross": "farmersdelight:cabbages_stage7" + "cross": "bworld:cabbages_stage7" } } }, @@ -53,7 +53,7 @@ "mining": { "toughness": 0 }, - "loot_table": "farmersdelight:blocks/cabbages", + "loot_table": "bworld:blocks/cabbages", "item": false, "place_on": [ "bworld:hoed_dirt" diff --git a/mods/bworld/blocks/cooking_pot.json b/mods/bworld/blocks/cooking_pot.json new file mode 100644 index 0000000..0bf3b1d --- /dev/null +++ b/mods/bworld/blocks/cooking_pot.json @@ -0,0 +1,25 @@ +{ + "format_version": 1, + "block": { + "id": "bworld:cooking_pot", + "model": "bworld:cooking_pot", + "textures": { + "side": "bworld:cooking_pot_side", + "top": "bworld:cooking_pot_top", + "bottom": "bworld:cooking_pot_bottom", + "parts": "bworld:cooking_pot_parts" + }, + "render_layer": "cutout", + "shape": [[2, 0, 2, 14, 10, 14]], + "mining": { + "toughness": 2, + "tool": "pickaxe" + }, + "drops": "bworld:cooking_pot", + "item": false, + "interactive": true, + "components": { + "bworld:cooking_pot": {} + } + } +} diff --git a/mods/farmersdelight/blocks/cutting_board.json b/mods/bworld/blocks/cutting_board.json similarity index 68% rename from mods/farmersdelight/blocks/cutting_board.json rename to mods/bworld/blocks/cutting_board.json index 7dbfa8a..bd998b6 100644 --- a/mods/farmersdelight/blocks/cutting_board.json +++ b/mods/bworld/blocks/cutting_board.json @@ -1,10 +1,10 @@ { "format_version": 1, "block": { - "id": "farmersdelight:cutting_board", - "model": "farmersdelight:cutting_board", + "id": "bworld:cutting_board", + "model": "bworld:cutting_board", "textures": { - "main": "farmersdelight:cutting_board" + "main": "bworld:cutting_board" }, "variants": { "facing=1": { "y": 90 }, @@ -17,7 +17,7 @@ "toughness": 2, "tool": "axe" }, - "drops": "farmersdelight:cutting_board", + "drops": "bworld:cutting_board", "interactive": true, "item_display": { "surface": 1 }, "states": [ @@ -28,7 +28,7 @@ } ], "components": { - "farmersdelight:cutting_board": {} + "bworld:cutting_board": {} } } } diff --git a/mods/farmersdelight/blocks/onions.json b/mods/bworld/blocks/onions.json similarity index 69% rename from mods/farmersdelight/blocks/onions.json rename to mods/bworld/blocks/onions.json index 0e41578..7429335 100644 --- a/mods/farmersdelight/blocks/onions.json +++ b/mods/bworld/blocks/onions.json @@ -1,30 +1,30 @@ { "format_version": 1, "block": { - "id": "farmersdelight:onions", + "id": "bworld:onions", "textures": { - "crop": "farmersdelight:onions_stage0" + "crop": "bworld:onions_stage0" }, "model": "engine:crop", "variants": { "age=0": { "textures": { - "crop": "farmersdelight:onions_stage0" + "crop": "bworld:onions_stage0" } }, "age=1": { "textures": { - "crop": "farmersdelight:onions_stage1" + "crop": "bworld:onions_stage1" } }, "age=2": { "textures": { - "crop": "farmersdelight:onions_stage2" + "crop": "bworld:onions_stage2" } }, "age=3": { "textures": { - "crop": "farmersdelight:onions_stage3" + "crop": "bworld:onions_stage3" } } }, @@ -33,7 +33,7 @@ "mining": { "toughness": 0 }, - "loot_table": "farmersdelight:blocks/onions", + "loot_table": "bworld:blocks/onions", "item": false, "place_on": [ "bworld:hoed_dirt" diff --git a/mods/farmersdelight/blocks/rice.json b/mods/bworld/blocks/rice.json similarity index 72% rename from mods/farmersdelight/blocks/rice.json rename to mods/bworld/blocks/rice.json index b5f6985..6aefac8 100644 --- a/mods/farmersdelight/blocks/rice.json +++ b/mods/bworld/blocks/rice.json @@ -1,35 +1,35 @@ { "format_version": 1, "block": { - "id": "farmersdelight:rice", + "id": "bworld:rice", "textures": { - "cross": "farmersdelight:rice_stage0" + "cross": "bworld:rice_stage0" }, "model": "engine:cross", "variants": { "age=0": { "textures": { - "cross": "farmersdelight:rice_stage0" + "cross": "bworld:rice_stage0" } }, "age=1": { "textures": { - "cross": "farmersdelight:rice_stage1" + "cross": "bworld:rice_stage1" } }, "age=2": { "textures": { - "cross": "farmersdelight:rice_stage2" + "cross": "bworld:rice_stage2" } }, "age=3": { "textures": { - "cross": "farmersdelight:rice_stage3" + "cross": "bworld:rice_stage3" } }, "age=4": { "textures": { - "cross": "farmersdelight:rice_supporting" + "cross": "bworld:rice_supporting" } } }, @@ -40,7 +40,7 @@ "mining": { "toughness": 0 }, - "loot_table": "farmersdelight:blocks/rice", + "loot_table": "bworld:blocks/rice", "item": false, "place_on": [ "bworld:dirt", @@ -64,7 +64,7 @@ "fertilizer": "bworld:bone_meal", "water": "always", "upper": { - "block": "farmersdelight:rice_panicles", + "block": "bworld:rice_panicles", "stages": 4, "supporting_age": 4 }, diff --git a/mods/farmersdelight/blocks/rice_panicles.json b/mods/bworld/blocks/rice_panicles.json similarity index 59% rename from mods/farmersdelight/blocks/rice_panicles.json rename to mods/bworld/blocks/rice_panicles.json index 72bf7eb..f029300 100644 --- a/mods/farmersdelight/blocks/rice_panicles.json +++ b/mods/bworld/blocks/rice_panicles.json @@ -1,30 +1,30 @@ { "format_version": 1, "block": { - "id": "farmersdelight:rice_panicles", + "id": "bworld:rice_panicles", "textures": { - "cross": "farmersdelight:rice_panicles_stage0" + "cross": "bworld:rice_panicles_stage0" }, "model": "engine:cross", "variants": { "age=0": { "textures": { - "cross": "farmersdelight:rice_panicles_stage0" + "cross": "bworld:rice_panicles_stage0" } }, "age=1": { "textures": { - "cross": "farmersdelight:rice_panicles_stage1" + "cross": "bworld:rice_panicles_stage1" } }, "age=2": { "textures": { - "cross": "farmersdelight:rice_panicles_stage2" + "cross": "bworld:rice_panicles_stage2" } }, "age=3": { "textures": { - "cross": "farmersdelight:rice_panicles_stage3" + "cross": "bworld:rice_panicles_stage3" } } }, @@ -33,10 +33,10 @@ "mining": { "toughness": 0 }, - "loot_table": "farmersdelight:blocks/rice_panicles", + "loot_table": "bworld:blocks/rice_panicles", "item": false, "place_on": [ - "farmersdelight:rice" + "bworld:rice" ], "states": [ { diff --git a/mods/farmersdelight/blocks/stove.json b/mods/bworld/blocks/stove.json similarity index 51% rename from mods/farmersdelight/blocks/stove.json rename to mods/bworld/blocks/stove.json index fde0c64..748f6a5 100644 --- a/mods/farmersdelight/blocks/stove.json +++ b/mods/bworld/blocks/stove.json @@ -1,12 +1,12 @@ { "format_version": 1, "block": { - "id": "farmersdelight:stove", + "id": "bworld:stove", "textures": { - "top": "farmersdelight:stove_top", - "bottom": "farmersdelight:stove_bottom", - "front": "farmersdelight:stove_front", - "side": "farmersdelight:stove_side" + "top": "bworld:stove_top", + "bottom": "bworld:stove_bottom", + "front": "bworld:stove_front", + "side": "bworld:stove_side" }, "variants": { "facing=1": { "y": 90 }, @@ -14,10 +14,10 @@ "facing=3": { "y": 270 }, "lit=1": { "textures": { - "top": "farmersdelight:stove_top_on", - "bottom": "farmersdelight:stove_bottom", - "front": "farmersdelight:stove_front_on", - "side": "farmersdelight:stove_side" + "top": "bworld:stove_top_on", + "bottom": "bworld:stove_bottom", + "front": "bworld:stove_front_on", + "side": "bworld:stove_side" } } }, @@ -26,7 +26,7 @@ "tool": "pickaxe", "requires_tool": true }, - "drops": "farmersdelight:stove", + "drops": "bworld:stove", "states": [ { "name": "lit", @@ -40,7 +40,7 @@ } ], "components": { - "farmersdelight:stove": {} + "bworld:stove": {} } } } diff --git a/mods/farmersdelight/blocks/tomatoes.json b/mods/bworld/blocks/tomatoes.json similarity index 59% rename from mods/farmersdelight/blocks/tomatoes.json rename to mods/bworld/blocks/tomatoes.json index 3d7722c..1020533 100644 --- a/mods/farmersdelight/blocks/tomatoes.json +++ b/mods/bworld/blocks/tomatoes.json @@ -1,50 +1,50 @@ { "format_version": 1, "block": { - "id": "farmersdelight:tomatoes", + "id": "bworld:tomatoes", "textures": { - "cross": "farmersdelight:budding_tomatoes_stage0" + "cross": "bworld:budding_tomatoes_stage0" }, "model": "engine:cross", "variants": { "age=0": { "textures": { - "cross": "farmersdelight:budding_tomatoes_stage0" + "cross": "bworld:budding_tomatoes_stage0" } }, "age=1": { "textures": { - "cross": "farmersdelight:budding_tomatoes_stage1" + "cross": "bworld:budding_tomatoes_stage1" } }, "age=2": { "textures": { - "cross": "farmersdelight:budding_tomatoes_stage2" + "cross": "bworld:budding_tomatoes_stage2" } }, "age=3": { "textures": { - "cross": "farmersdelight:budding_tomatoes_stage3" + "cross": "bworld:budding_tomatoes_stage3" } }, "age=4": { "textures": { - "cross": "farmersdelight:tomatoes_stage0" + "cross": "bworld:tomatoes_stage0" } }, "age=5": { "textures": { - "cross": "farmersdelight:tomatoes_stage1" + "cross": "bworld:tomatoes_stage1" } }, "age=6": { "textures": { - "cross": "farmersdelight:tomatoes_stage2" + "cross": "bworld:tomatoes_stage2" } }, "age=7": { "textures": { - "cross": "farmersdelight:tomatoes_stage3" + "cross": "bworld:tomatoes_stage3" } } }, @@ -53,7 +53,7 @@ "mining": { "toughness": 0 }, - "loot_table": "farmersdelight:blocks/tomatoes", + "loot_table": "bworld:blocks/tomatoes", "item": false, "place_on": [ "bworld:hoed_dirt" @@ -71,7 +71,7 @@ "stages": 8, "fertilizer": "bworld:bone_meal", "regrow_days": 4, - "harvest": "farmersdelight:harvest/tomatoes", + "harvest": "bworld:harvest/tomatoes", "seasons": [ "summer" ] diff --git a/mods/farmersdelight/items/cabbage.json b/mods/bworld/items/cabbage.json similarity index 74% rename from mods/farmersdelight/items/cabbage.json rename to mods/bworld/items/cabbage.json index 198c860..96c1cfd 100644 --- a/mods/farmersdelight/items/cabbage.json +++ b/mods/bworld/items/cabbage.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:cabbage", - "texture": "farmersdelight:cabbage", + "id": "bworld:cabbage", + "texture": "bworld:cabbage", "food": { "nutrition": 2, "saturation_modifier": 0.4 diff --git a/mods/farmersdelight/items/cabbage_leaf.json b/mods/bworld/items/cabbage_leaf.json similarity index 61% rename from mods/farmersdelight/items/cabbage_leaf.json rename to mods/bworld/items/cabbage_leaf.json index 0f6e9c3..5a42bdc 100644 --- a/mods/farmersdelight/items/cabbage_leaf.json +++ b/mods/bworld/items/cabbage_leaf.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:cabbage_leaf", - "texture": "farmersdelight:cabbage_leaf", + "id": "bworld:cabbage_leaf", + "texture": "bworld:cabbage_leaf", "food": { "nutrition": 1, "saturation_modifier": 0.4 diff --git a/mods/farmersdelight/items/cabbage_rolls.json b/mods/bworld/items/cabbage_rolls.json similarity index 60% rename from mods/farmersdelight/items/cabbage_rolls.json rename to mods/bworld/items/cabbage_rolls.json index 096169d..f20a326 100644 --- a/mods/farmersdelight/items/cabbage_rolls.json +++ b/mods/bworld/items/cabbage_rolls.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:cabbage_rolls", - "texture": "farmersdelight:cabbage_rolls", + "id": "bworld:cabbage_rolls", + "texture": "bworld:cabbage_rolls", "food": { "nutrition": 5, "saturation_modifier": 0.5 diff --git a/mods/bworld/items/cabbage_seeds.json b/mods/bworld/items/cabbage_seeds.json new file mode 100644 index 0000000..64f30eb --- /dev/null +++ b/mods/bworld/items/cabbage_seeds.json @@ -0,0 +1,8 @@ +{ + "format_version": 1, + "item": { + "id": "bworld:cabbage_seeds", + "texture": "bworld:cabbage_seeds", + "places": "bworld:cabbages" + } +} diff --git a/mods/farmersdelight/items/cod_slice.json b/mods/bworld/items/cod_slice.json similarity index 62% rename from mods/farmersdelight/items/cod_slice.json rename to mods/bworld/items/cod_slice.json index fbd41ad..af37e08 100644 --- a/mods/farmersdelight/items/cod_slice.json +++ b/mods/bworld/items/cod_slice.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:cod_slice", - "texture": "farmersdelight:cod_slice", + "id": "bworld:cod_slice", + "texture": "bworld:cod_slice", "food": { "nutrition": 1, "saturation_modifier": 0.1 diff --git a/mods/farmersdelight/items/cooked_rice.json b/mods/bworld/items/cooked_rice.json similarity index 68% rename from mods/farmersdelight/items/cooked_rice.json rename to mods/bworld/items/cooked_rice.json index f7fd961..583ff28 100644 --- a/mods/farmersdelight/items/cooked_rice.json +++ b/mods/bworld/items/cooked_rice.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:cooked_rice", - "texture": "farmersdelight:cooked_rice", + "id": "bworld:cooked_rice", + "texture": "bworld:cooked_rice", "max_stack": 16, "food": { "nutrition": 6, diff --git a/mods/bworld/items/cooking_pot.json b/mods/bworld/items/cooking_pot.json new file mode 100644 index 0000000..d91779c --- /dev/null +++ b/mods/bworld/items/cooking_pot.json @@ -0,0 +1,9 @@ +{ + "format_version": 1, + "item": { + "id": "bworld:cooking_pot", + "texture": "bworld:cooking_pot", + "places": "bworld:cooking_pot", + "max_stack": 1 + } +} diff --git a/mods/farmersdelight/items/copper_knife.json b/mods/bworld/items/copper_knife.json similarity index 60% rename from mods/farmersdelight/items/copper_knife.json rename to mods/bworld/items/copper_knife.json index ba71850..98419f8 100644 --- a/mods/farmersdelight/items/copper_knife.json +++ b/mods/bworld/items/copper_knife.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:copper_knife", - "texture": "farmersdelight:copper_knife", + "id": "bworld:copper_knife", + "texture": "bworld:copper_knife", "tool": { "type": "knife", "tier": 1, diff --git a/mods/farmersdelight/items/gold_knife.json b/mods/bworld/items/gold_knife.json similarity index 61% rename from mods/farmersdelight/items/gold_knife.json rename to mods/bworld/items/gold_knife.json index 34336b3..c6ec044 100644 --- a/mods/farmersdelight/items/gold_knife.json +++ b/mods/bworld/items/gold_knife.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:gold_knife", - "texture": "farmersdelight:gold_knife", + "id": "bworld:gold_knife", + "texture": "bworld:gold_knife", "tool": { "type": "knife", "tier": 0, diff --git a/mods/farmersdelight/items/iron_knife.json b/mods/bworld/items/iron_knife.json similarity index 61% rename from mods/farmersdelight/items/iron_knife.json rename to mods/bworld/items/iron_knife.json index 5ac9705..507343a 100644 --- a/mods/farmersdelight/items/iron_knife.json +++ b/mods/bworld/items/iron_knife.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:iron_knife", - "texture": "farmersdelight:iron_knife", + "id": "bworld:iron_knife", + "texture": "bworld:iron_knife", "tool": { "type": "knife", "tier": 2, diff --git a/mods/farmersdelight/items/onion.json b/mods/bworld/items/onion.json similarity index 55% rename from mods/farmersdelight/items/onion.json rename to mods/bworld/items/onion.json index c0c7359..b1f14f9 100644 --- a/mods/farmersdelight/items/onion.json +++ b/mods/bworld/items/onion.json @@ -1,9 +1,9 @@ { "format_version": 1, "item": { - "id": "farmersdelight:onion", - "texture": "farmersdelight:onion", - "places": "farmersdelight:onions", + "id": "bworld:onion", + "texture": "bworld:onion", + "places": "bworld:onions", "food": { "nutrition": 2, "saturation_modifier": 0.4 diff --git a/mods/bworld/items/rice.json b/mods/bworld/items/rice.json new file mode 100644 index 0000000..a43a134 --- /dev/null +++ b/mods/bworld/items/rice.json @@ -0,0 +1,9 @@ +{ + "format_version": 1, + "item": { + "id": "bworld:rice", + "texture": "bworld:rice", + "places": "bworld:rice", + "base_sell_value": 13 + } +} diff --git a/mods/bworld/items/rice_panicle.json b/mods/bworld/items/rice_panicle.json new file mode 100644 index 0000000..1113e42 --- /dev/null +++ b/mods/bworld/items/rice_panicle.json @@ -0,0 +1,8 @@ +{ + "format_version": 1, + "item": { + "id": "bworld:rice_panicle", + "texture": "bworld:rice_panicle", + "base_sell_value": 10 + } +} diff --git a/mods/farmersdelight/items/salmon_slice.json b/mods/bworld/items/salmon_slice.json similarity index 61% rename from mods/farmersdelight/items/salmon_slice.json rename to mods/bworld/items/salmon_slice.json index 0c3bda3..f1f7dd3 100644 --- a/mods/farmersdelight/items/salmon_slice.json +++ b/mods/bworld/items/salmon_slice.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:salmon_slice", - "texture": "farmersdelight:salmon_slice", + "id": "bworld:salmon_slice", + "texture": "bworld:salmon_slice", "food": { "nutrition": 1, "saturation_modifier": 0.1 diff --git a/mods/farmersdelight/items/stone_knife.json b/mods/bworld/items/stone_knife.json similarity index 60% rename from mods/farmersdelight/items/stone_knife.json rename to mods/bworld/items/stone_knife.json index 437a810..7307229 100644 --- a/mods/farmersdelight/items/stone_knife.json +++ b/mods/bworld/items/stone_knife.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:stone_knife", - "texture": "farmersdelight:stone_knife", + "id": "bworld:stone_knife", + "texture": "bworld:stone_knife", "tool": { "type": "knife", "tier": 1, diff --git a/mods/farmersdelight/items/tomato.json b/mods/bworld/items/tomato.json similarity index 75% rename from mods/farmersdelight/items/tomato.json rename to mods/bworld/items/tomato.json index 8c0139b..7bccc9b 100644 --- a/mods/farmersdelight/items/tomato.json +++ b/mods/bworld/items/tomato.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:tomato", - "texture": "farmersdelight:tomato", + "id": "bworld:tomato", + "texture": "bworld:tomato", "food": { "nutrition": 1, "saturation_modifier": 0.3 diff --git a/mods/farmersdelight/items/tomato_sauce.json b/mods/bworld/items/tomato_sauce.json similarity index 65% rename from mods/farmersdelight/items/tomato_sauce.json rename to mods/bworld/items/tomato_sauce.json index 60c52ad..5da589a 100644 --- a/mods/farmersdelight/items/tomato_sauce.json +++ b/mods/bworld/items/tomato_sauce.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:tomato_sauce", - "texture": "farmersdelight:tomato_sauce", + "id": "bworld:tomato_sauce", + "texture": "bworld:tomato_sauce", "food": { "nutrition": 4, "saturation_modifier": 0.4, diff --git a/mods/bworld/items/tomato_seeds.json b/mods/bworld/items/tomato_seeds.json new file mode 100644 index 0000000..ae8c561 --- /dev/null +++ b/mods/bworld/items/tomato_seeds.json @@ -0,0 +1,8 @@ +{ + "format_version": 1, + "item": { + "id": "bworld:tomato_seeds", + "texture": "bworld:tomato_seeds", + "places": "bworld:tomatoes" + } +} diff --git a/mods/farmersdelight/items/wood_knife.json b/mods/bworld/items/wood_knife.json similarity index 61% rename from mods/farmersdelight/items/wood_knife.json rename to mods/bworld/items/wood_knife.json index db5075e..26ab277 100644 --- a/mods/farmersdelight/items/wood_knife.json +++ b/mods/bworld/items/wood_knife.json @@ -1,8 +1,8 @@ { "format_version": 1, "item": { - "id": "farmersdelight:wood_knife", - "texture": "farmersdelight:wood_knife", + "id": "bworld:wood_knife", + "texture": "bworld:wood_knife", "tool": { "type": "knife", "tier": 0, diff --git a/mods/farmersdelight/loot_tables/blocks/cabbages.json b/mods/bworld/loot_tables/blocks/cabbages.json similarity index 85% rename from mods/farmersdelight/loot_tables/blocks/cabbages.json rename to mods/bworld/loot_tables/blocks/cabbages.json index df0e681..f73a7ef 100644 --- a/mods/farmersdelight/loot_tables/blocks/cabbages.json +++ b/mods/bworld/loot_tables/blocks/cabbages.json @@ -5,7 +5,7 @@ { "entries": [ { - "item": "farmersdelight:cabbage", + "item": "bworld:cabbage", "conditions": [ { "condition": "block_state", @@ -16,7 +16,7 @@ ] }, { - "item": "farmersdelight:cabbage_seeds", + "item": "bworld:cabbage_seeds", "conditions": [ { "condition": "inverted", @@ -42,7 +42,7 @@ ], "entries": [ { - "item": "farmersdelight:cabbage_seeds", + "item": "bworld:cabbage_seeds", "functions": [ { "function": "set_count", diff --git a/mods/farmersdelight/loot_tables/blocks/onions.json b/mods/bworld/loot_tables/blocks/onions.json similarity index 85% rename from mods/farmersdelight/loot_tables/blocks/onions.json rename to mods/bworld/loot_tables/blocks/onions.json index 31e48d5..1a22c5d 100644 --- a/mods/farmersdelight/loot_tables/blocks/onions.json +++ b/mods/bworld/loot_tables/blocks/onions.json @@ -5,7 +5,7 @@ { "entries": [ { - "item": "farmersdelight:onion" + "item": "bworld:onion" } ] }, @@ -20,7 +20,7 @@ ], "entries": [ { - "item": "farmersdelight:onion", + "item": "bworld:onion", "functions": [ { "function": "set_count", diff --git a/mods/farmersdelight/loot_tables/blocks/rice.json b/mods/bworld/loot_tables/blocks/rice.json similarity index 75% rename from mods/farmersdelight/loot_tables/blocks/rice.json rename to mods/bworld/loot_tables/blocks/rice.json index 59098f4..b28701c 100644 --- a/mods/farmersdelight/loot_tables/blocks/rice.json +++ b/mods/bworld/loot_tables/blocks/rice.json @@ -5,7 +5,7 @@ { "entries": [ { - "item": "farmersdelight:rice" + "item": "bworld:rice" } ] } diff --git a/mods/farmersdelight/loot_tables/blocks/rice_panicles.json b/mods/bworld/loot_tables/blocks/rice_panicles.json similarity index 83% rename from mods/farmersdelight/loot_tables/blocks/rice_panicles.json rename to mods/bworld/loot_tables/blocks/rice_panicles.json index de819e6..26c244b 100644 --- a/mods/farmersdelight/loot_tables/blocks/rice_panicles.json +++ b/mods/bworld/loot_tables/blocks/rice_panicles.json @@ -13,7 +13,7 @@ ], "entries": [ { - "item": "farmersdelight:rice_panicle" + "item": "bworld:rice_panicle" } ] } diff --git a/mods/farmersdelight/loot_tables/blocks/tomatoes.json b/mods/bworld/loot_tables/blocks/tomatoes.json similarity index 77% rename from mods/farmersdelight/loot_tables/blocks/tomatoes.json rename to mods/bworld/loot_tables/blocks/tomatoes.json index 6a83403..769e7ac 100644 --- a/mods/farmersdelight/loot_tables/blocks/tomatoes.json +++ b/mods/bworld/loot_tables/blocks/tomatoes.json @@ -5,7 +5,7 @@ { "entries": [ { - "item": "farmersdelight:tomato_seeds" + "item": "bworld:tomato_seeds" } ] }, @@ -20,7 +20,7 @@ ], "entries": [ { - "item": "farmersdelight:tomato" + "item": "bworld:tomato" } ] } diff --git a/mods/farmersdelight/loot_tables/harvest/tomatoes.json b/mods/bworld/loot_tables/harvest/tomatoes.json similarity index 81% rename from mods/farmersdelight/loot_tables/harvest/tomatoes.json rename to mods/bworld/loot_tables/harvest/tomatoes.json index 5e94587..726b560 100644 --- a/mods/farmersdelight/loot_tables/harvest/tomatoes.json +++ b/mods/bworld/loot_tables/harvest/tomatoes.json @@ -5,7 +5,7 @@ { "entries": [ { - "item": "farmersdelight:tomato", + "item": "bworld:tomato", "count": { "min": 1, "max": 2 diff --git a/mods/farmersdelight/models/cooking_pot.json b/mods/bworld/models/cooking_pot.json similarity index 90% rename from mods/farmersdelight/models/cooking_pot.json rename to mods/bworld/models/cooking_pot.json index ce0b6f0..920c0c9 100644 --- a/mods/farmersdelight/models/cooking_pot.json +++ b/mods/bworld/models/cooking_pot.json @@ -1,12 +1,12 @@ { "format_version": 1, "model": { - "id": "farmersdelight:cooking_pot", + "id": "bworld:cooking_pot", "textures": { - "side": "farmersdelight:cooking_pot_side", - "top": "farmersdelight:cooking_pot_top", - "bottom": "farmersdelight:cooking_pot_bottom", - "parts": "farmersdelight:cooking_pot_parts" + "side": "bworld:cooking_pot_side", + "top": "bworld:cooking_pot_top", + "bottom": "bworld:cooking_pot_bottom", + "parts": "bworld:cooking_pot_parts" }, "elements": [ { diff --git a/mods/farmersdelight/models/cutting_board.json b/mods/bworld/models/cutting_board.json similarity index 96% rename from mods/farmersdelight/models/cutting_board.json rename to mods/bworld/models/cutting_board.json index da7172d..91c8a90 100644 --- a/mods/farmersdelight/models/cutting_board.json +++ b/mods/bworld/models/cutting_board.json @@ -1,9 +1,9 @@ { "format_version": 1, "model": { - "id": "farmersdelight:cutting_board", + "id": "bworld:cutting_board", "textures": { - "main": "farmersdelight:cutting_board" + "main": "bworld:cutting_board" }, "elements": [ { diff --git a/mods/bworld/recipes/cooking_cabbage_rolls.json b/mods/bworld/recipes/cooking_cabbage_rolls.json new file mode 100644 index 0000000..4a2a432 --- /dev/null +++ b/mods/bworld/recipes/cooking_cabbage_rolls.json @@ -0,0 +1,12 @@ +{ + "format_version": 1, + "recipe": { + "type": "bworld:cooking", + "ingredients": [ + "bworld:cabbage", + ["bworld:carrot", "bworld:potato", "bworld:onion", "bworld:tomato"] + ], + "result": { "id": "bworld:cabbage_rolls", "count": 1 }, + "cook_time": 100 + } +} diff --git a/mods/bworld/recipes/cooking_cooked_rice.json b/mods/bworld/recipes/cooking_cooked_rice.json new file mode 100644 index 0000000..0dc1805 --- /dev/null +++ b/mods/bworld/recipes/cooking_cooked_rice.json @@ -0,0 +1,10 @@ +{ + "format_version": 1, + "recipe": { + "type": "bworld:cooking", + "ingredients": ["bworld:rice"], + "result": { "id": "bworld:cooked_rice", "count": 1 }, + "container": "bworld:bowl", + "cook_time": 100 + } +} diff --git a/mods/bworld/recipes/cooking_tomato_sauce.json b/mods/bworld/recipes/cooking_tomato_sauce.json new file mode 100644 index 0000000..a272ab2 --- /dev/null +++ b/mods/bworld/recipes/cooking_tomato_sauce.json @@ -0,0 +1,10 @@ +{ + "format_version": 1, + "recipe": { + "type": "bworld:cooking", + "ingredients": ["bworld:tomato", "bworld:tomato"], + "result": { "id": "bworld:tomato_sauce", "count": 1 }, + "container": "bworld:bowl", + "cook_time": 100 + } +} diff --git a/mods/farmersdelight/recipes/crafting_cooking_pot.json b/mods/bworld/recipes/crafting_cooking_pot.json similarity index 71% rename from mods/farmersdelight/recipes/crafting_cooking_pot.json rename to mods/bworld/recipes/crafting_cooking_pot.json index b930c34..eaafc5b 100644 --- a/mods/farmersdelight/recipes/crafting_cooking_pot.json +++ b/mods/bworld/recipes/crafting_cooking_pot.json @@ -4,6 +4,6 @@ "type": "shaped", "pattern": ["iSi", "i i", "iii"], "key": { "i": "bworld:iron_ingot", "S": "bworld:stick" }, - "result": { "id": "farmersdelight:cooking_pot", "count": 1 } + "result": { "id": "bworld:cooking_pot", "count": 1 } } } diff --git a/mods/farmersdelight/recipes/crafting_cutting_board.json b/mods/bworld/recipes/crafting_cutting_board.json similarity index 82% rename from mods/farmersdelight/recipes/crafting_cutting_board.json rename to mods/bworld/recipes/crafting_cutting_board.json index 5a105b6..98fc838 100644 --- a/mods/farmersdelight/recipes/crafting_cutting_board.json +++ b/mods/bworld/recipes/crafting_cutting_board.json @@ -11,7 +11,7 @@ "P": "#bworld:planks" }, "result": { - "id": "farmersdelight:cutting_board", + "id": "bworld:cutting_board", "count": 1 } } diff --git a/mods/farmersdelight/recipes/crafting_stove.json b/mods/bworld/recipes/crafting_stove.json similarity index 75% rename from mods/farmersdelight/recipes/crafting_stove.json rename to mods/bworld/recipes/crafting_stove.json index 13637b5..05e519b 100644 --- a/mods/farmersdelight/recipes/crafting_stove.json +++ b/mods/bworld/recipes/crafting_stove.json @@ -4,6 +4,6 @@ "type": "shaped", "pattern": ["iii", "B B", "BCB"], "key": { "i": "bworld:iron_ingot", "B": "bworld:stone", "C": "bworld:coal" }, - "result": { "id": "farmersdelight:stove", "count": 1 } + "result": { "id": "bworld:stove", "count": 1 } } } diff --git a/mods/farmersdelight/recipes/crafting_wood_knife.json b/mods/bworld/recipes/crafting_wood_knife.json similarity index 83% rename from mods/farmersdelight/recipes/crafting_wood_knife.json rename to mods/bworld/recipes/crafting_wood_knife.json index 9a20ca5..28211fc 100644 --- a/mods/farmersdelight/recipes/crafting_wood_knife.json +++ b/mods/bworld/recipes/crafting_wood_knife.json @@ -11,7 +11,7 @@ "S": "bworld:stick" }, "result": { - "id": "farmersdelight:wood_knife", + "id": "bworld:wood_knife", "count": 1 } } diff --git a/mods/bworld/recipes/cutting_cabbage.json b/mods/bworld/recipes/cutting_cabbage.json new file mode 100644 index 0000000..29ec9b7 --- /dev/null +++ b/mods/bworld/recipes/cutting_cabbage.json @@ -0,0 +1,9 @@ +{ + "format_version": 1, + "recipe": { + "type": "bworld:cutting", + "ingredients": ["bworld:cabbage"], + "tool": "knife", + "result": [{ "id": "bworld:cabbage_leaf", "count": 2 }] + } +} diff --git a/mods/bworld/recipes/cutting_cod.json b/mods/bworld/recipes/cutting_cod.json new file mode 100644 index 0000000..c112c75 --- /dev/null +++ b/mods/bworld/recipes/cutting_cod.json @@ -0,0 +1,9 @@ +{ + "format_version": 1, + "recipe": { + "type": "bworld:cutting", + "ingredients": ["bworld:cod"], + "tool": "knife", + "result": [{ "id": "bworld:cod_slice", "count": 2 }, { "id": "bworld:bone_meal", "count": 1 }] + } +} diff --git a/mods/bworld/recipes/cutting_salmon.json b/mods/bworld/recipes/cutting_salmon.json new file mode 100644 index 0000000..6fac846 --- /dev/null +++ b/mods/bworld/recipes/cutting_salmon.json @@ -0,0 +1,9 @@ +{ + "format_version": 1, + "recipe": { + "type": "bworld:cutting", + "ingredients": ["bworld:salmon"], + "tool": "knife", + "result": [{ "id": "bworld:salmon_slice", "count": 2 }, { "id": "bworld:bone_meal", "count": 1 }] + } +} diff --git a/mods/farmersdelight/recipes/smithing_copper_knife.json b/mods/bworld/recipes/smithing_copper_knife.json similarity index 61% rename from mods/farmersdelight/recipes/smithing_copper_knife.json rename to mods/bworld/recipes/smithing_copper_knife.json index dba557a..fd18806 100644 --- a/mods/farmersdelight/recipes/smithing_copper_knife.json +++ b/mods/bworld/recipes/smithing_copper_knife.json @@ -2,11 +2,11 @@ "format_version": 1, "recipe": { "type": "smithing", - "tool": "farmersdelight:stone_knife", + "tool": "bworld:stone_knife", "material": { "id": "bworld:copper_ingot", "count": 5 }, - "result": "farmersdelight:copper_knife" + "result": "bworld:copper_knife" } } diff --git a/mods/farmersdelight/recipes/smithing_gold_knife.json b/mods/bworld/recipes/smithing_gold_knife.json similarity index 62% rename from mods/farmersdelight/recipes/smithing_gold_knife.json rename to mods/bworld/recipes/smithing_gold_knife.json index 54ad05f..c14501a 100644 --- a/mods/farmersdelight/recipes/smithing_gold_knife.json +++ b/mods/bworld/recipes/smithing_gold_knife.json @@ -2,11 +2,11 @@ "format_version": 1, "recipe": { "type": "smithing", - "tool": "farmersdelight:iron_knife", + "tool": "bworld:iron_knife", "material": { "id": "bworld:gold_ingot", "count": 5 }, - "result": "farmersdelight:gold_knife" + "result": "bworld:gold_knife" } } diff --git a/mods/farmersdelight/recipes/smithing_iron_knife.json b/mods/bworld/recipes/smithing_iron_knife.json similarity index 61% rename from mods/farmersdelight/recipes/smithing_iron_knife.json rename to mods/bworld/recipes/smithing_iron_knife.json index 47636e8..37bd0d3 100644 --- a/mods/farmersdelight/recipes/smithing_iron_knife.json +++ b/mods/bworld/recipes/smithing_iron_knife.json @@ -2,11 +2,11 @@ "format_version": 1, "recipe": { "type": "smithing", - "tool": "farmersdelight:copper_knife", + "tool": "bworld:copper_knife", "material": { "id": "bworld:iron_ingot", "count": 5 }, - "result": "farmersdelight:iron_knife" + "result": "bworld:iron_knife" } } diff --git a/mods/farmersdelight/recipes/smithing_stone_knife.json b/mods/bworld/recipes/smithing_stone_knife.json similarity index 60% rename from mods/farmersdelight/recipes/smithing_stone_knife.json rename to mods/bworld/recipes/smithing_stone_knife.json index 0fa8523..71ed0bb 100644 --- a/mods/farmersdelight/recipes/smithing_stone_knife.json +++ b/mods/bworld/recipes/smithing_stone_knife.json @@ -2,11 +2,11 @@ "format_version": 1, "recipe": { "type": "smithing", - "tool": "farmersdelight:wood_knife", + "tool": "bworld:wood_knife", "material": { "id": "bworld:stone", "count": 5 }, - "result": "farmersdelight:stone_knife" + "result": "bworld:stone_knife" } } diff --git a/mods/bworld/scripts/client.ts b/mods/bworld/scripts/client.ts index 5ba6d46..dd29a41 100644 --- a/mods/bworld/scripts/client.ts +++ b/mods/bworld/scripts/client.ts @@ -35,6 +35,22 @@ export function setup(ctx: ClientContext) { ctx.ui.register_menu_screen("bworld:stonecutter", (menu) => stonecutter_screen(ctx, menu)); ctx.ui.register_menu_screen("bworld:fishing_minigame", fishing_minigame_screen); ctx.render.register_visual("bworld:juicer", juicer_visual); + + ctx.ui.register_menu_screen("bworld:cooking_pot", (menu) => ({ + width: WIDTH, + height: HEIGHT, + on_render_background(g) { + g.panel(0, 0, WIDTH, HEIGHT); + // lit under the ingredients while something heats the pot, the arrow fills as the meal cooks + g.progress("bworld:fire_empty", "bworld:fire_full", 47, 53, 18, 18, menu.data.heated, "up"); + const { progress, progress_max } = menu.data; + g.progress("bworld:arrow_empty", "bworld:arrow_full", 95, 25, 18, 18, progress / progress_max); + }, + on_render_labels(g) { + g.text(menu.title, 8, 6); + g.text("Inventory", 8, 73); + }, + })); } // the middle of the bottom copy of what's in the juicer, just over its floor, and how much higher each next one is diff --git a/mods/farmersdelight/scripts/server.ts b/mods/bworld/scripts/cooking.ts similarity index 92% rename from mods/farmersdelight/scripts/server.ts rename to mods/bworld/scripts/cooking.ts index 17178f3..f029e1b 100644 --- a/mods/farmersdelight/scripts/server.ts +++ b/mods/bworld/scripts/cooking.ts @@ -5,13 +5,8 @@ // CookingPotBlockEntity, cooks its recipes while something hot is under it, keeps the meal, and serves it into the // container the meal needs (a bowl), or straight out when it needs none. the cutting board, like its // CuttingBoardBlockEntity, holds a stack of anything and cuts it one at a time with the right tool -import type { BlockRef, Container, ItemStack, ServerContext } from "bworld/server"; -export function setup(ctx: ServerContext) { - register_stove(ctx); - register_cooking_pot(ctx); - register_cutting_board(ctx); -} +import type { BlockRef, Container, ItemStack, ServerContext } from "bworld/server"; // stove @@ -23,12 +18,12 @@ const STOVE_EXTINGUISHER_TOOL = "shovel"; const STOVE_BURN_DAMAGE = 1; const STOVE_BURN_TICKS = 10; -function register_stove(ctx: ServerContext) { +export function register_stove(ctx: ServerContext) { const lit = (block: BlockRef) => ctx.world.get_state(block.x, block.y, block.z, "lit") === 1; const set_lit = (block: BlockRef, value: boolean) => ctx.world.set_state(block.x, block.y, block.z, "lit", value ? 1 : 0); - ctx.components.register_block("farmersdelight:stove", { + ctx.components.register_block("bworld:stove", { // placed lit, like the java mod. block data so it ticks, to burn whoever stands on it on_create(block) { block.data ??= {}; @@ -72,10 +67,10 @@ const DEFAULT_COOK_TIME = 200; // what's under the pot that heats it, and the state that has to be 1 for it to, like minecraft's heat_sources tag const HEAT_SOURCES: Record = { "bworld:furnace": "lit", - "farmersdelight:stove": "lit", + "bworld:stove": "lit", }; -// a farmersdelight:cooking recipe: the ingredients in any slots. in the json each is an item id or #tag, or a list of +// a bworld:cooking recipe: the ingredients in any slots. in the json each is an item id or #tag, or a list of // those any of which will do. here each is every item that will do interface CookingRecipe { ingredients: string[][]; @@ -105,8 +100,8 @@ function item_or_tag(ctx: ServerContext, where: string, id: unknown) { // checked when the server starts, so a broken recipe is a load error naming it function load_recipes(ctx: ServerContext): CookingRecipe[] { - return ctx.recipes.list("farmersdelight:cooking").map((json, i) => { - const where = `farmersdelight:cooking recipe ${i + 1} (${json.result?.id ?? "no result"})`; + return ctx.recipes.list("bworld:cooking").map((json, i) => { + const where = `bworld:cooking recipe ${i + 1} (${json.result?.id ?? "no result"})`; const item = (id: unknown) => { if (typeof id !== "string" || !ctx.items.exists(id)) throw new Error(`${where}: there's no item ${id}`); return id; @@ -166,7 +161,7 @@ function matches(ingredients: string[][], items: string[], used = new Set { @@ -185,7 +180,7 @@ function register_cooking_pot(ctx: ServerContext) { // like the java mod's CookingPotMenu, in gui pixels: the ingredients in 2 rows of 3, the meal, and the containers // and served meal under it. the screen is in scripts/client.ts - const menu_type = ctx.menus.register("farmersdelight:cooking_pot", (menu, block) => { + const menu_type = ctx.menus.register("bworld:cooking_pot", (menu, block) => { const container = ctx.containers.get(pot_data(block).container)!; menu.title = "Cooking Pot"; for (let slot = 0; slot < INGREDIENT_SLOTS; slot++) { @@ -248,7 +243,7 @@ function register_cooking_pot(ctx: ServerContext) { meal.count -= count; }; - ctx.components.register_block("farmersdelight:cooking_pot", { + ctx.components.register_block("bworld:cooking_pot", { on_create(block) { pot_data(block); }, @@ -302,7 +297,7 @@ function register_cooking_pot(ctx: ServerContext) { // cutting board -// a farmersdelight:cutting recipe, like the java mod's: one ingredient (an item, or a list any of which will do), the +// a bworld:cutting recipe, like the java mod's: one ingredient (an item, or a list any of which will do), the // tool type that cuts it, and everything one of it is cut into interface CuttingRecipe { ingredient: string[]; @@ -312,8 +307,8 @@ interface CuttingRecipe { // checked when the server starts, like the cooking pot's function load_cutting_recipes(ctx: ServerContext): CuttingRecipe[] { - return ctx.recipes.list("farmersdelight:cutting").map((json, i) => { - const where = `farmersdelight:cutting recipe ${i + 1} (${json.ingredients?.[0] ?? "no ingredient"})`; + return ctx.recipes.list("bworld:cutting").map((json, i) => { + const where = `bworld:cutting recipe ${i + 1} (${json.ingredients?.[0] ?? "no ingredient"})`; const item = (id: unknown) => { if (typeof id !== "string" || !ctx.items.exists(id)) throw new Error(`${where}: there's no item ${id}`); return id; @@ -341,13 +336,13 @@ function load_cutting_recipes(ctx: ServerContext): CuttingRecipe[] { // like the java mod's CuttingBoardBlock and CuttingBoardBlockEntity. what's on the board is the item it shows // (set_block_item), so the client draws it, like its CuttingBoardRenderer -function register_cutting_board(ctx: ServerContext) { +export function register_cutting_board(ctx: ServerContext) { const recipes = load_cutting_recipes(ctx); const on_board = (block: BlockRef) => ctx.world.get_block_item(block.x, block.y, block.z); const set_on_board = (block: BlockRef, item: ItemStack | undefined) => ctx.world.set_block_item(block.x, block.y, block.z, item); - ctx.components.register_block("farmersdelight:cutting_board", { + ctx.components.register_block("bworld:cutting_board", { on_interact(block, _params, player) { const held = player.inventory.get(player.selected_slot); const item = on_board(block); diff --git a/mods/bworld/scripts/server.ts b/mods/bworld/scripts/server.ts index 6bd6dd4..f5d3331 100644 --- a/mods/bworld/scripts/server.ts +++ b/mods/bworld/scripts/server.ts @@ -11,6 +11,7 @@ import { register_verdigris } from "./verdigris/server.ts"; import { type JuiceableParams, JUICER_CAPACITY, JUICER_PRESSES } from "./shared.ts"; import { juicing_for, juicing_recipes } from "./juicing.ts"; import { fermentable_recipes } from "./fermenting.ts"; +import { register_cooking_pot, register_cutting_board, register_stove } from "./cooking.ts"; export function setup(ctx: ServerContext) { register_hoeable(ctx); @@ -33,6 +34,9 @@ export function setup(ctx: ServerContext) { register_effects(ctx); register_growable_block(ctx); register_verdigris(ctx); + register_stove(ctx); + register_cooking_pot(ctx); + register_cutting_board(ctx); } // right clicking with a type of tool turns the block into another, like any hoe on grass @@ -279,7 +283,7 @@ function register_furnace(ctx: ServerContext) { } } - // burning, so it heats what's on top, like farmer's delight's cooking pot + // burning, so it heats what's on top, like the cooking pot const lit = data.fuel > 0 ? 1 : 0; if (ctx.world.get_state(block.x, block.y, block.z, "lit") !== lit) { ctx.world.set_state(block.x, block.y, block.z, "lit", lit); diff --git a/mods/farmersdelight/textures/beef_stew.png b/mods/bworld/textures/beef_stew.png similarity index 100% rename from mods/farmersdelight/textures/beef_stew.png rename to mods/bworld/textures/beef_stew.png diff --git a/mods/farmersdelight/textures/bone_broth.png b/mods/bworld/textures/bone_broth.png similarity index 100% rename from mods/farmersdelight/textures/bone_broth.png rename to mods/bworld/textures/bone_broth.png diff --git a/mods/farmersdelight/textures/budding_tomatoes_stage0.png b/mods/bworld/textures/budding_tomatoes_stage0.png similarity index 100% rename from mods/farmersdelight/textures/budding_tomatoes_stage0.png rename to mods/bworld/textures/budding_tomatoes_stage0.png diff --git a/mods/farmersdelight/textures/budding_tomatoes_stage1.png b/mods/bworld/textures/budding_tomatoes_stage1.png similarity index 100% rename from mods/farmersdelight/textures/budding_tomatoes_stage1.png rename to mods/bworld/textures/budding_tomatoes_stage1.png diff --git a/mods/farmersdelight/textures/budding_tomatoes_stage2.png b/mods/bworld/textures/budding_tomatoes_stage2.png similarity index 100% rename from mods/farmersdelight/textures/budding_tomatoes_stage2.png rename to mods/bworld/textures/budding_tomatoes_stage2.png diff --git a/mods/farmersdelight/textures/budding_tomatoes_stage3.png b/mods/bworld/textures/budding_tomatoes_stage3.png similarity index 100% rename from mods/farmersdelight/textures/budding_tomatoes_stage3.png rename to mods/bworld/textures/budding_tomatoes_stage3.png diff --git a/mods/farmersdelight/textures/cabbage.png b/mods/bworld/textures/cabbage.png similarity index 100% rename from mods/farmersdelight/textures/cabbage.png rename to mods/bworld/textures/cabbage.png diff --git a/mods/farmersdelight/textures/cabbage_leaf.png b/mods/bworld/textures/cabbage_leaf.png similarity index 100% rename from mods/farmersdelight/textures/cabbage_leaf.png rename to mods/bworld/textures/cabbage_leaf.png diff --git a/mods/farmersdelight/textures/cabbage_rolls.png b/mods/bworld/textures/cabbage_rolls.png similarity index 100% rename from mods/farmersdelight/textures/cabbage_rolls.png rename to mods/bworld/textures/cabbage_rolls.png diff --git a/mods/farmersdelight/textures/cabbage_seeds.png b/mods/bworld/textures/cabbage_seeds.png similarity index 100% rename from mods/farmersdelight/textures/cabbage_seeds.png rename to mods/bworld/textures/cabbage_seeds.png diff --git a/mods/farmersdelight/textures/cabbages_stage0.png b/mods/bworld/textures/cabbages_stage0.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage0.png rename to mods/bworld/textures/cabbages_stage0.png diff --git a/mods/farmersdelight/textures/cabbages_stage1.png b/mods/bworld/textures/cabbages_stage1.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage1.png rename to mods/bworld/textures/cabbages_stage1.png diff --git a/mods/farmersdelight/textures/cabbages_stage2.png b/mods/bworld/textures/cabbages_stage2.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage2.png rename to mods/bworld/textures/cabbages_stage2.png diff --git a/mods/farmersdelight/textures/cabbages_stage3.png b/mods/bworld/textures/cabbages_stage3.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage3.png rename to mods/bworld/textures/cabbages_stage3.png diff --git a/mods/farmersdelight/textures/cabbages_stage4.png b/mods/bworld/textures/cabbages_stage4.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage4.png rename to mods/bworld/textures/cabbages_stage4.png diff --git a/mods/farmersdelight/textures/cabbages_stage5.png b/mods/bworld/textures/cabbages_stage5.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage5.png rename to mods/bworld/textures/cabbages_stage5.png diff --git a/mods/farmersdelight/textures/cabbages_stage6.png b/mods/bworld/textures/cabbages_stage6.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage6.png rename to mods/bworld/textures/cabbages_stage6.png diff --git a/mods/farmersdelight/textures/cabbages_stage7.png b/mods/bworld/textures/cabbages_stage7.png similarity index 100% rename from mods/farmersdelight/textures/cabbages_stage7.png rename to mods/bworld/textures/cabbages_stage7.png diff --git a/mods/farmersdelight/textures/chicken_soup.png b/mods/bworld/textures/chicken_soup.png similarity index 100% rename from mods/farmersdelight/textures/chicken_soup.png rename to mods/bworld/textures/chicken_soup.png diff --git a/mods/farmersdelight/textures/cod_slice.png b/mods/bworld/textures/cod_slice.png similarity index 100% rename from mods/farmersdelight/textures/cod_slice.png rename to mods/bworld/textures/cod_slice.png diff --git a/mods/farmersdelight/textures/cooked_rice.png b/mods/bworld/textures/cooked_rice.png similarity index 100% rename from mods/farmersdelight/textures/cooked_rice.png rename to mods/bworld/textures/cooked_rice.png diff --git a/mods/farmersdelight/textures/cooking_pot.png b/mods/bworld/textures/cooking_pot.png similarity index 100% rename from mods/farmersdelight/textures/cooking_pot.png rename to mods/bworld/textures/cooking_pot.png diff --git a/mods/farmersdelight/textures/cooking_pot_bottom.png b/mods/bworld/textures/cooking_pot_bottom.png similarity index 100% rename from mods/farmersdelight/textures/cooking_pot_bottom.png rename to mods/bworld/textures/cooking_pot_bottom.png diff --git a/mods/farmersdelight/textures/cooking_pot_parts.png b/mods/bworld/textures/cooking_pot_parts.png similarity index 100% rename from mods/farmersdelight/textures/cooking_pot_parts.png rename to mods/bworld/textures/cooking_pot_parts.png diff --git a/mods/farmersdelight/textures/cooking_pot_side.png b/mods/bworld/textures/cooking_pot_side.png similarity index 100% rename from mods/farmersdelight/textures/cooking_pot_side.png rename to mods/bworld/textures/cooking_pot_side.png diff --git a/mods/farmersdelight/textures/cooking_pot_top.png b/mods/bworld/textures/cooking_pot_top.png similarity index 100% rename from mods/farmersdelight/textures/cooking_pot_top.png rename to mods/bworld/textures/cooking_pot_top.png diff --git a/mods/farmersdelight/textures/copper_knife.png b/mods/bworld/textures/copper_knife.png similarity index 100% rename from mods/farmersdelight/textures/copper_knife.png rename to mods/bworld/textures/copper_knife.png diff --git a/mods/farmersdelight/textures/cutting_board.png b/mods/bworld/textures/cutting_board.png similarity index 100% rename from mods/farmersdelight/textures/cutting_board.png rename to mods/bworld/textures/cutting_board.png diff --git a/mods/farmersdelight/textures/fish_stew.png b/mods/bworld/textures/fish_stew.png similarity index 100% rename from mods/farmersdelight/textures/fish_stew.png rename to mods/bworld/textures/fish_stew.png diff --git a/mods/farmersdelight/textures/fried_egg.png b/mods/bworld/textures/fried_egg.png similarity index 100% rename from mods/farmersdelight/textures/fried_egg.png rename to mods/bworld/textures/fried_egg.png diff --git a/mods/farmersdelight/textures/fried_rice.png b/mods/bworld/textures/fried_rice.png similarity index 100% rename from mods/farmersdelight/textures/fried_rice.png rename to mods/bworld/textures/fried_rice.png diff --git a/mods/farmersdelight/textures/fruit_salad.png b/mods/bworld/textures/fruit_salad.png similarity index 100% rename from mods/farmersdelight/textures/fruit_salad.png rename to mods/bworld/textures/fruit_salad.png diff --git a/mods/farmersdelight/textures/gleaming_salad.png b/mods/bworld/textures/gleaming_salad.png similarity index 100% rename from mods/farmersdelight/textures/gleaming_salad.png rename to mods/bworld/textures/gleaming_salad.png diff --git a/mods/farmersdelight/textures/gold_knife.png b/mods/bworld/textures/gold_knife.png similarity index 100% rename from mods/farmersdelight/textures/gold_knife.png rename to mods/bworld/textures/gold_knife.png diff --git a/mods/farmersdelight/textures/iron_knife.png b/mods/bworld/textures/iron_knife.png similarity index 100% rename from mods/farmersdelight/textures/iron_knife.png rename to mods/bworld/textures/iron_knife.png diff --git a/mods/farmersdelight/textures/mixed_salad.png b/mods/bworld/textures/mixed_salad.png similarity index 100% rename from mods/farmersdelight/textures/mixed_salad.png rename to mods/bworld/textures/mixed_salad.png diff --git a/mods/farmersdelight/textures/onion.png b/mods/bworld/textures/onion.png similarity index 100% rename from mods/farmersdelight/textures/onion.png rename to mods/bworld/textures/onion.png diff --git a/mods/farmersdelight/textures/onion_soup.png b/mods/bworld/textures/onion_soup.png similarity index 100% rename from mods/farmersdelight/textures/onion_soup.png rename to mods/bworld/textures/onion_soup.png diff --git a/mods/farmersdelight/textures/onions_stage0.png b/mods/bworld/textures/onions_stage0.png similarity index 100% rename from mods/farmersdelight/textures/onions_stage0.png rename to mods/bworld/textures/onions_stage0.png diff --git a/mods/farmersdelight/textures/onions_stage1.png b/mods/bworld/textures/onions_stage1.png similarity index 100% rename from mods/farmersdelight/textures/onions_stage1.png rename to mods/bworld/textures/onions_stage1.png diff --git a/mods/farmersdelight/textures/onions_stage2.png b/mods/bworld/textures/onions_stage2.png similarity index 100% rename from mods/farmersdelight/textures/onions_stage2.png rename to mods/bworld/textures/onions_stage2.png diff --git a/mods/farmersdelight/textures/onions_stage3.png b/mods/bworld/textures/onions_stage3.png similarity index 100% rename from mods/farmersdelight/textures/onions_stage3.png rename to mods/bworld/textures/onions_stage3.png diff --git a/mods/farmersdelight/textures/pumpkin_soup.png b/mods/bworld/textures/pumpkin_soup.png similarity index 100% rename from mods/farmersdelight/textures/pumpkin_soup.png rename to mods/bworld/textures/pumpkin_soup.png diff --git a/mods/farmersdelight/textures/rice.png b/mods/bworld/textures/rice.png similarity index 100% rename from mods/farmersdelight/textures/rice.png rename to mods/bworld/textures/rice.png diff --git a/mods/farmersdelight/textures/rice_panicle.png b/mods/bworld/textures/rice_panicle.png similarity index 100% rename from mods/farmersdelight/textures/rice_panicle.png rename to mods/bworld/textures/rice_panicle.png diff --git a/mods/farmersdelight/textures/rice_panicles_stage0.png b/mods/bworld/textures/rice_panicles_stage0.png similarity index 100% rename from mods/farmersdelight/textures/rice_panicles_stage0.png rename to mods/bworld/textures/rice_panicles_stage0.png diff --git a/mods/farmersdelight/textures/rice_panicles_stage1.png b/mods/bworld/textures/rice_panicles_stage1.png similarity index 100% rename from mods/farmersdelight/textures/rice_panicles_stage1.png rename to mods/bworld/textures/rice_panicles_stage1.png diff --git a/mods/farmersdelight/textures/rice_panicles_stage2.png b/mods/bworld/textures/rice_panicles_stage2.png similarity index 100% rename from mods/farmersdelight/textures/rice_panicles_stage2.png rename to mods/bworld/textures/rice_panicles_stage2.png diff --git a/mods/farmersdelight/textures/rice_panicles_stage3.png b/mods/bworld/textures/rice_panicles_stage3.png similarity index 100% rename from mods/farmersdelight/textures/rice_panicles_stage3.png rename to mods/bworld/textures/rice_panicles_stage3.png diff --git a/mods/farmersdelight/textures/rice_stage0.png b/mods/bworld/textures/rice_stage0.png similarity index 100% rename from mods/farmersdelight/textures/rice_stage0.png rename to mods/bworld/textures/rice_stage0.png diff --git a/mods/farmersdelight/textures/rice_stage1.png b/mods/bworld/textures/rice_stage1.png similarity index 100% rename from mods/farmersdelight/textures/rice_stage1.png rename to mods/bworld/textures/rice_stage1.png diff --git a/mods/farmersdelight/textures/rice_stage2.png b/mods/bworld/textures/rice_stage2.png similarity index 100% rename from mods/farmersdelight/textures/rice_stage2.png rename to mods/bworld/textures/rice_stage2.png diff --git a/mods/farmersdelight/textures/rice_stage3.png b/mods/bworld/textures/rice_stage3.png similarity index 100% rename from mods/farmersdelight/textures/rice_stage3.png rename to mods/bworld/textures/rice_stage3.png diff --git a/mods/farmersdelight/textures/rice_supporting.png b/mods/bworld/textures/rice_supporting.png similarity index 100% rename from mods/farmersdelight/textures/rice_supporting.png rename to mods/bworld/textures/rice_supporting.png diff --git a/mods/farmersdelight/textures/salmon_slice.png b/mods/bworld/textures/salmon_slice.png similarity index 100% rename from mods/farmersdelight/textures/salmon_slice.png rename to mods/bworld/textures/salmon_slice.png diff --git a/mods/farmersdelight/textures/stone_knife.png b/mods/bworld/textures/stone_knife.png similarity index 100% rename from mods/farmersdelight/textures/stone_knife.png rename to mods/bworld/textures/stone_knife.png diff --git a/mods/farmersdelight/textures/stove_bottom.png b/mods/bworld/textures/stove_bottom.png similarity index 100% rename from mods/farmersdelight/textures/stove_bottom.png rename to mods/bworld/textures/stove_bottom.png diff --git a/mods/farmersdelight/textures/stove_front.png b/mods/bworld/textures/stove_front.png similarity index 100% rename from mods/farmersdelight/textures/stove_front.png rename to mods/bworld/textures/stove_front.png diff --git a/mods/farmersdelight/textures/stove_front_on.json b/mods/bworld/textures/stove_front_on.json similarity index 100% rename from mods/farmersdelight/textures/stove_front_on.json rename to mods/bworld/textures/stove_front_on.json diff --git a/mods/farmersdelight/textures/stove_front_on.png b/mods/bworld/textures/stove_front_on.png similarity index 100% rename from mods/farmersdelight/textures/stove_front_on.png rename to mods/bworld/textures/stove_front_on.png diff --git a/mods/farmersdelight/textures/stove_side.png b/mods/bworld/textures/stove_side.png similarity index 100% rename from mods/farmersdelight/textures/stove_side.png rename to mods/bworld/textures/stove_side.png diff --git a/mods/farmersdelight/textures/stove_top.png b/mods/bworld/textures/stove_top.png similarity index 100% rename from mods/farmersdelight/textures/stove_top.png rename to mods/bworld/textures/stove_top.png diff --git a/mods/farmersdelight/textures/stove_top_on.png b/mods/bworld/textures/stove_top_on.png similarity index 100% rename from mods/farmersdelight/textures/stove_top_on.png rename to mods/bworld/textures/stove_top_on.png diff --git a/mods/farmersdelight/textures/tomato.png b/mods/bworld/textures/tomato.png similarity index 100% rename from mods/farmersdelight/textures/tomato.png rename to mods/bworld/textures/tomato.png diff --git a/mods/farmersdelight/textures/tomato_sauce.png b/mods/bworld/textures/tomato_sauce.png similarity index 100% rename from mods/farmersdelight/textures/tomato_sauce.png rename to mods/bworld/textures/tomato_sauce.png diff --git a/mods/farmersdelight/textures/tomato_seeds.png b/mods/bworld/textures/tomato_seeds.png similarity index 100% rename from mods/farmersdelight/textures/tomato_seeds.png rename to mods/bworld/textures/tomato_seeds.png diff --git a/mods/farmersdelight/textures/tomatoes_stage0.png b/mods/bworld/textures/tomatoes_stage0.png similarity index 100% rename from mods/farmersdelight/textures/tomatoes_stage0.png rename to mods/bworld/textures/tomatoes_stage0.png diff --git a/mods/farmersdelight/textures/tomatoes_stage1.png b/mods/bworld/textures/tomatoes_stage1.png similarity index 100% rename from mods/farmersdelight/textures/tomatoes_stage1.png rename to mods/bworld/textures/tomatoes_stage1.png diff --git a/mods/farmersdelight/textures/tomatoes_stage2.png b/mods/bworld/textures/tomatoes_stage2.png similarity index 100% rename from mods/farmersdelight/textures/tomatoes_stage2.png rename to mods/bworld/textures/tomatoes_stage2.png diff --git a/mods/farmersdelight/textures/tomatoes_stage3.png b/mods/bworld/textures/tomatoes_stage3.png similarity index 100% rename from mods/farmersdelight/textures/tomatoes_stage3.png rename to mods/bworld/textures/tomatoes_stage3.png diff --git a/mods/farmersdelight/textures/vegetable_soup.png b/mods/bworld/textures/vegetable_soup.png similarity index 100% rename from mods/farmersdelight/textures/vegetable_soup.png rename to mods/bworld/textures/vegetable_soup.png diff --git a/mods/farmersdelight/textures/wood_knife.png b/mods/bworld/textures/wood_knife.png similarity index 100% rename from mods/farmersdelight/textures/wood_knife.png rename to mods/bworld/textures/wood_knife.png diff --git a/mods/farmersdelight/CREDITS.md b/mods/farmersdelight/CREDITS.md deleted file mode 100644 index 63a59f8..0000000 --- a/mods/farmersdelight/CREDITS.md +++ /dev/null @@ -1,28 +0,0 @@ -# Farmer's Delight - -A bworld port of [Farmer's Delight](https://github.com/vectorwing/FarmersDelight) by vectorwing. Its textures and game -design come from the original, version 1.3.4 for NeoForge 1.21.1, under the MIT license: - -``` -MIT License - -Copyright (c) 2020 vectorwing - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` diff --git a/mods/farmersdelight/blocks/cooking_pot.json b/mods/farmersdelight/blocks/cooking_pot.json deleted file mode 100644 index 7fcde1a..0000000 --- a/mods/farmersdelight/blocks/cooking_pot.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "format_version": 1, - "block": { - "id": "farmersdelight:cooking_pot", - "model": "farmersdelight:cooking_pot", - "textures": { - "side": "farmersdelight:cooking_pot_side", - "top": "farmersdelight:cooking_pot_top", - "bottom": "farmersdelight:cooking_pot_bottom", - "parts": "farmersdelight:cooking_pot_parts" - }, - "render_layer": "cutout", - "shape": [[2, 0, 2, 14, 10, 14]], - "mining": { - "toughness": 2, - "tool": "pickaxe" - }, - "drops": "farmersdelight:cooking_pot", - "item": false, - "interactive": true, - "components": { - "farmersdelight:cooking_pot": {} - } - } -} diff --git a/mods/farmersdelight/items/cabbage_seeds.json b/mods/farmersdelight/items/cabbage_seeds.json deleted file mode 100644 index 8a594ee..0000000 --- a/mods/farmersdelight/items/cabbage_seeds.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "format_version": 1, - "item": { - "id": "farmersdelight:cabbage_seeds", - "texture": "farmersdelight:cabbage_seeds", - "places": "farmersdelight:cabbages" - } -} diff --git a/mods/farmersdelight/items/cooking_pot.json b/mods/farmersdelight/items/cooking_pot.json deleted file mode 100644 index 0089185..0000000 --- a/mods/farmersdelight/items/cooking_pot.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "format_version": 1, - "item": { - "id": "farmersdelight:cooking_pot", - "texture": "farmersdelight:cooking_pot", - "places": "farmersdelight:cooking_pot", - "max_stack": 1 - } -} diff --git a/mods/farmersdelight/items/rice.json b/mods/farmersdelight/items/rice.json deleted file mode 100644 index 0a175ef..0000000 --- a/mods/farmersdelight/items/rice.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "format_version": 1, - "item": { - "id": "farmersdelight:rice", - "texture": "farmersdelight:rice", - "places": "farmersdelight:rice", - "base_sell_value": 13 - } -} diff --git a/mods/farmersdelight/items/rice_panicle.json b/mods/farmersdelight/items/rice_panicle.json deleted file mode 100644 index 320f94e..0000000 --- a/mods/farmersdelight/items/rice_panicle.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "format_version": 1, - "item": { - "id": "farmersdelight:rice_panicle", - "texture": "farmersdelight:rice_panicle", - "base_sell_value": 10 - } -} diff --git a/mods/farmersdelight/items/tomato_seeds.json b/mods/farmersdelight/items/tomato_seeds.json deleted file mode 100644 index 6400469..0000000 --- a/mods/farmersdelight/items/tomato_seeds.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "format_version": 1, - "item": { - "id": "farmersdelight:tomato_seeds", - "texture": "farmersdelight:tomato_seeds", - "places": "farmersdelight:tomatoes" - } -} diff --git a/mods/farmersdelight/manifest.json b/mods/farmersdelight/manifest.json deleted file mode 100644 index 1c69f1d..0000000 --- a/mods/farmersdelight/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "format_version": 1, - "id": "farmersdelight", - "name": "Farmer's Delight", - "description": "A port of vectorwing's Farmer's Delight: its crops and the cooking pot.", - "version": "0.1.0", - "authors": [ - "vectorwing (original)", - "paula (port)" - ], - "game_version": ">=0.1.0", - "dependencies": [ - { - "id": "bworld", - "version": "*" - } - ], - "credits": "CREDITS.md", - "scripts": { - "server": "scripts/server.ts", - "client": "scripts/client.ts" - } -} diff --git a/mods/farmersdelight/recipes/cooking_cabbage_rolls.json b/mods/farmersdelight/recipes/cooking_cabbage_rolls.json deleted file mode 100644 index 6bffa0f..0000000 --- a/mods/farmersdelight/recipes/cooking_cabbage_rolls.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "format_version": 1, - "recipe": { - "type": "farmersdelight:cooking", - "ingredients": [ - "farmersdelight:cabbage", - ["bworld:carrot", "bworld:potato", "farmersdelight:onion", "farmersdelight:tomato"] - ], - "result": { "id": "farmersdelight:cabbage_rolls", "count": 1 }, - "cook_time": 100 - } -} diff --git a/mods/farmersdelight/recipes/cooking_cooked_rice.json b/mods/farmersdelight/recipes/cooking_cooked_rice.json deleted file mode 100644 index 75e209b..0000000 --- a/mods/farmersdelight/recipes/cooking_cooked_rice.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "format_version": 1, - "recipe": { - "type": "farmersdelight:cooking", - "ingredients": ["farmersdelight:rice"], - "result": { "id": "farmersdelight:cooked_rice", "count": 1 }, - "container": "bworld:bowl", - "cook_time": 100 - } -} diff --git a/mods/farmersdelight/recipes/cooking_tomato_sauce.json b/mods/farmersdelight/recipes/cooking_tomato_sauce.json deleted file mode 100644 index c7561f4..0000000 --- a/mods/farmersdelight/recipes/cooking_tomato_sauce.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "format_version": 1, - "recipe": { - "type": "farmersdelight:cooking", - "ingredients": ["farmersdelight:tomato", "farmersdelight:tomato"], - "result": { "id": "farmersdelight:tomato_sauce", "count": 1 }, - "container": "bworld:bowl", - "cook_time": 100 - } -} diff --git a/mods/farmersdelight/recipes/cutting_cabbage.json b/mods/farmersdelight/recipes/cutting_cabbage.json deleted file mode 100644 index 2525199..0000000 --- a/mods/farmersdelight/recipes/cutting_cabbage.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "format_version": 1, - "recipe": { - "type": "farmersdelight:cutting", - "ingredients": ["farmersdelight:cabbage"], - "tool": "knife", - "result": [{ "id": "farmersdelight:cabbage_leaf", "count": 2 }] - } -} diff --git a/mods/farmersdelight/recipes/cutting_cod.json b/mods/farmersdelight/recipes/cutting_cod.json deleted file mode 100644 index 6c26424..0000000 --- a/mods/farmersdelight/recipes/cutting_cod.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "format_version": 1, - "recipe": { - "type": "farmersdelight:cutting", - "ingredients": ["bworld:cod"], - "tool": "knife", - "result": [{ "id": "farmersdelight:cod_slice", "count": 2 }, { "id": "bworld:bone_meal", "count": 1 }] - } -} diff --git a/mods/farmersdelight/recipes/cutting_salmon.json b/mods/farmersdelight/recipes/cutting_salmon.json deleted file mode 100644 index 2072352..0000000 --- a/mods/farmersdelight/recipes/cutting_salmon.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "format_version": 1, - "recipe": { - "type": "farmersdelight:cutting", - "ingredients": ["bworld:salmon"], - "tool": "knife", - "result": [{ "id": "farmersdelight:salmon_slice", "count": 2 }, { "id": "bworld:bone_meal", "count": 1 }] - } -} diff --git a/mods/farmersdelight/scripts/client.ts b/mods/farmersdelight/scripts/client.ts deleted file mode 100644 index 205d61f..0000000 --- a/mods/farmersdelight/scripts/client.ts +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2026 Paula Wisnievski -// SPDX-License-Identifier: AGPL-3.0-or-later - -// the cooking pot's screen, like the java mod's CookingPotScreen. its slots are in scripts/server.ts, in gui pixels -import type { ClientContext } from "bworld/client"; - -const WIDTH = 176; -const HEIGHT = 166; - -export function setup(ctx: ClientContext) { - ctx.ui.register_menu_screen("farmersdelight:cooking_pot", (menu) => ({ - width: WIDTH, - height: HEIGHT, - on_render_background(g) { - g.panel(0, 0, WIDTH, HEIGHT); - // lit under the ingredients while something heats the pot, the arrow fills as the meal cooks - g.progress("bworld:fire_empty", "bworld:fire_full", 47, 53, 18, 18, menu.data.heated, "up"); - const { progress, progress_max } = menu.data; - g.progress("bworld:arrow_empty", "bworld:arrow_full", 95, 25, 18, 18, progress / progress_max); - }, - on_render_labels(g) { - g.text(menu.title, 8, 6); - g.text("Inventory", 8, 73); - }, - })); -} diff --git a/mods/recipe_viewer/README.md b/mods/recipe_viewer/README.md index d2589ac..440c63b 100644 --- a/mods/recipe_viewer/README.md +++ b/mods/recipe_viewer/README.md @@ -1,9 +1,8 @@ # Recipe Viewer A recipe viewer like Just Enough Items, as a client script. Every inventory screen gets the list of every item, then -every fluid, on its right, with the page on top and a search box under it (`@mod` searches by mod, like -`@farmersdelight`). Fluids are listed by id alone, without their data, so juice is there once and stands for every -juice. +every fluid, on its right, with the page on top and a search box under it (`@mod` searches by mod, like `@create`). +Fluids are listed by id alone, without their data, so juice is there once and stands for every juice. - Left click an item or fluid, or press R over any (in the list, a slot or a recipe), for the recipes that make it. - Right click, or U, for the recipes that use it. The uses of a block that makes recipes, like the furnace, are all of diff --git a/mods/recipe_viewer/scripts/categories.ts b/mods/recipe_viewer/scripts/categories.ts index 9e50f48..6500ee3 100644 --- a/mods/recipe_viewer/scripts/categories.ts +++ b/mods/recipe_viewer/scripts/categories.ts @@ -35,8 +35,8 @@ export interface RecipeCategory { // where each mod's recipe type is made, for the categories made from json const MOD_CATALYSTS: Record = { - "farmersdelight:cooking": ["farmersdelight:cooking_pot"], - "farmersdelight:cutting": ["farmersdelight:cutting_board"], + "bworld:cooking": ["bworld:cooking_pot"], + "bworld:cutting": ["bworld:cutting_board"], "create:pressing": ["create:mechanical_press"], "create:compacting": ["create:mechanical_press", "create:basin"], }; @@ -319,7 +319,7 @@ export function make_categories(ctx: ClientContext, recipes: Recipe[]): RecipeCa })); } -// "Crafting", or a mod type's name: farmersdelight:cooking is "Cooking" +// "Crafting", or a mod type's name: bworld:cooking is "Cooking" export function category_name(type: string): string { const base: Record = { shaped: "Crafting", diff --git a/tests/commands_test.ts b/tests/commands_test.ts index cab38c8..5526e06 100644 --- a/tests/commands_test.ts +++ b/tests/commands_test.ts @@ -136,12 +136,12 @@ Deno.test("/give suggests item ids as they're typed", async () => { const ids = (text: string) => suggest(text).suggestions.map((s: { text: string }) => s.text); assertEquals(ids("/give ").length, 100); assert(ids("/give bworld:sto").includes("bworld:stone")); - assert(ids("/give farmersdelight:cab").includes("farmersdelight:cabbage")); + assert(ids("/give bworld:cab").includes("bworld:cabbage")); assert(!ids("/give bworld:a").includes("bworld:air")); - assertEquals(suggest("/give farmersdelight:tom").suggestions.map((s: { text: string }) => s.text), [ - "farmersdelight:tomato", - "farmersdelight:tomato_sauce", - "farmersdelight:tomato_seeds", + assertEquals(suggest("/give bworld:tom").suggestions.map((s: { text: string }) => s.text), [ + "bworld:tomato", + "bworld:tomato_sauce", + "bworld:tomato_seeds", ]); assertEquals(suggest("/gi").suggestions, [{ text: "give" }]); diff --git a/tests/cooking_test.ts b/tests/cooking_test.ts index 31f72e6..010de56 100644 --- a/tests/cooking_test.ts +++ b/tests/cooking_test.ts @@ -18,7 +18,7 @@ async function setup() { stone_floor(t.game); t.send(1, { type: "move", x: 2.5, y: 100, z: 2.5, yaw: 0, pitch: 0 }); t.game.set_block(...FURNACE, "bworld:furnace"); - t.game.set_block(...POT, "farmersdelight:cooking_pot"); + t.game.set_block(...POT, "bworld:cooking_pot"); const container = (at: readonly [number, number, number]) => { const id = (t.game.world.get_tile(...at)?.mod_data as { container: string }).container; @@ -43,12 +43,12 @@ async function setup() { Deno.test("the pot only cooks over a lit furnace, then serves the meal into bowls", async () => { const t = await setup(); - t.put(0, "farmersdelight:tomato", 2); - t.put(3, "farmersdelight:tomato", 2); + t.put(0, "bworld:tomato", 2); + t.put(3, "bworld:tomato", 2); // cold: nothing happens t.ticks(150); - assertEquals(t.slot(0), "farmersdelight:tomato 2"); + assertEquals(t.slot(0), "bworld:tomato 2"); assertEquals(t.slot(6), ""); t.light_furnace(); @@ -56,13 +56,13 @@ Deno.test("the pot only cooks over a lit furnace, then serves the meal into bowl assertEquals(t.game.world.get_block_id(...FURNACE), "bworld:furnace"); t.ticks(100); // one sauce, one tomato from each slot, waiting in the pot for a bowl - assertEquals(t.slot(6), "farmersdelight:tomato_sauce 1"); - assertEquals(t.slot(0), "farmersdelight:tomato 1"); - assertEquals(t.slot(3), "farmersdelight:tomato 1"); + assertEquals(t.slot(6), "bworld:tomato_sauce 1"); + assertEquals(t.slot(0), "bworld:tomato 1"); + assertEquals(t.slot(3), "bworld:tomato 1"); assertEquals(t.slot(8), ""); t.ticks(100); - assertEquals(t.slot(6), "farmersdelight:tomato_sauce 2"); + assertEquals(t.slot(6), "bworld:tomato_sauce 2"); assertEquals(t.slot(0), ""); // bowls take it out @@ -70,59 +70,59 @@ Deno.test("the pot only cooks over a lit furnace, then serves the meal into bowl t.ticks(1); assertEquals(t.slot(6), ""); assertEquals(t.slot(7), "bworld:bowl 3"); - assertEquals(t.slot(8), "farmersdelight:tomato_sauce 2"); + assertEquals(t.slot(8), "bworld:tomato_sauce 2"); }); Deno.test("ingredients go in any slots, lists take any of their items, and meals without a container come right out", async () => { const t = await setup(); t.light_furnace(); t.put(5, "bworld:potato"); - t.put(1, "farmersdelight:cabbage"); + t.put(1, "bworld:cabbage"); t.ticks(101); - assertEquals(t.slot(8), "farmersdelight:cabbage_rolls 1"); + assertEquals(t.slot(8), "bworld:cabbage_rolls 1"); assertEquals(t.slot(6), ""); // something extra matches nothing - t.put(0, "farmersdelight:cabbage"); - t.put(1, "farmersdelight:onion"); - t.put(2, "farmersdelight:rice"); + t.put(0, "bworld:cabbage"); + t.put(1, "bworld:onion"); + t.put(2, "bworld:rice"); t.ticks(300); - assertEquals(t.slot(8), "farmersdelight:cabbage_rolls 1"); - assertEquals(t.slot(0), "farmersdelight:cabbage 1"); + assertEquals(t.slot(8), "bworld:cabbage_rolls 1"); + assertEquals(t.slot(0), "bworld:cabbage 1"); // a different meal waits until the pot's empty of the other t.pot.set_item(0, undefined); t.pot.set_item(1, undefined); t.ticks(100); - assertEquals(t.slot(6), "farmersdelight:cooked_rice 1"); - t.put(0, "farmersdelight:tomato", 2); - t.put(1, "farmersdelight:tomato", 2); + assertEquals(t.slot(6), "bworld:cooked_rice 1"); + t.put(0, "bworld:tomato", 2); + t.put(1, "bworld:tomato", 2); t.ticks(300); - assertEquals(t.slot(6), "farmersdelight:cooked_rice 1"); - assertEquals(t.slot(0), "farmersdelight:tomato 2"); + assertEquals(t.slot(6), "bworld:cooked_rice 1"); + assertEquals(t.slot(0), "bworld:tomato 2"); }); Deno.test("holding a bowl serves the meal straight into your hand, and breaking the pot drops everything", async () => { const t = await setup(); t.light_furnace(); - t.put(0, "farmersdelight:rice", 3); + t.put(0, "bworld:rice", 3); t.ticks(301); - assertEquals(t.slot(6), "farmersdelight:cooked_rice 3"); + assertEquals(t.slot(6), "bworld:cooked_rice 3"); t.send(1, { type: "chat", text: "/give bworld:bowl 2" }); const inventory = () => t.game.players()[0].inventory.to_data().filter((i) => i); t.send(1, { type: "select_slot", slot: 0 }); t.send(1, { type: "use_block", x: POT[0], y: POT[1], z: POT[2], face: "top" }); - assertEquals(t.slot(6), "farmersdelight:cooked_rice 2"); - assertEquals(inventory().map((i) => `${i!.id} ${i!.count}`), ["bworld:bowl 1", "farmersdelight:cooked_rice 1"]); + assertEquals(t.slot(6), "bworld:cooked_rice 2"); + assertEquals(inventory().map((i) => `${i!.id} ${i!.count}`), ["bworld:bowl 1", "bworld:cooked_rice 1"]); t.game.destroy_block(...POT); const dropped = t.game.item_entities().map((e) => `${e.item.type_id} ${e.item.amount}`); - assert(dropped.includes("farmersdelight:cooked_rice 2"), String(dropped)); + assert(dropped.includes("bworld:cooked_rice 2"), String(dropped)); }); Deno.test("mods' own recipe types are accepted, and model faces can turn their texture", () => { - assertEquals(validate_recipe({ type: "farmersdelight:cooking", anything: 1 }), []); + assertEquals(validate_recipe({ type: "bworld:cooking", anything: 1 }), []); assertEquals(validate_recipe({ type: "cooking" }).length, 1); const face = (rotation?: number) => @@ -144,21 +144,21 @@ Deno.test("a stove is placed lit and heats the pot, coal relights it, and standi const t = await setup(); const info = () => t.game.world.get_block_info(...FURNACE)!; const lit = () => get_state_value(t.game.world.get_block_value(...FURNACE), info(), "lit"); - t.game.set_block(...FURNACE, "farmersdelight:stove"); + t.game.set_block(...FURNACE, "bworld:stove"); assertEquals(lit(), 1); - t.put(0, "farmersdelight:rice"); + t.put(0, "bworld:rice"); t.ticks(101); - assertEquals(t.slot(6), "farmersdelight:cooked_rice 1"); + assertEquals(t.slot(6), "bworld:cooked_rice 1"); // out, it doesn't cook t.game.set_block_state( ...FURNACE, set_state_value(t.game.world.get_block_value(...FURNACE), info(), "lit", 0)! >>> 16, ); - t.put(0, "farmersdelight:rice"); + t.put(0, "bworld:rice"); t.ticks(150); - assertEquals(t.slot(6), "farmersdelight:cooked_rice 1"); + assertEquals(t.slot(6), "bworld:cooked_rice 1"); // coal lights it again, used up t.send(1, { type: "chat", text: "/give bworld:coal 2" }); diff --git a/tests/cutting_board_test.ts b/tests/cutting_board_test.ts index 7b8a995..939feb3 100644 --- a/tests/cutting_board_test.ts +++ b/tests/cutting_board_test.ts @@ -14,10 +14,10 @@ async function setup(yaw = 0) { t.join(1, "alice"); stone_floor(t.game); t.send(1, { type: "move", x: 2.5, y: 100, z: 2.5, yaw, pitch: 0 }); - t.send(1, { type: "chat", text: "/give farmersdelight:cutting_board" }); + t.send(1, { type: "chat", text: "/give bworld:cutting_board" }); t.send(1, { type: "select_slot", slot: 0 }); t.send(1, { type: "use_block", x: BOARD[0], y: BOARD[1] - 1, z: BOARD[2], face: "top" }); - assertEquals(t.game.world.get_block_id(...BOARD), "farmersdelight:cutting_board"); + assertEquals(t.game.world.get_block_id(...BOARD), "bworld:cutting_board"); const use = (slot: number) => { t.send(1, { type: "select_slot", slot }); @@ -58,15 +58,15 @@ Deno.test("so does any block with a facing state, like the furnace, keeping its Deno.test("a stack goes on the board, and a knife cuts one at a time by its recipe", async () => { const t = await setup(); t.send(1, { type: "chat", text: "/give bworld:cod 3" }); - t.send(1, { type: "chat", text: "/give farmersdelight:iron_knife" }); + t.send(1, { type: "chat", text: "/give bworld:iron_knife" }); t.use(0); assertEquals(t.on_board(), "bworld:cod 3"); - assertEquals(t.inventory(), ["farmersdelight:iron_knife 1"]); + assertEquals(t.inventory(), ["bworld:iron_knife 1"]); t.use(1); assertEquals(t.on_board(), "bworld:cod 2"); - assertEquals(t.dropped(), ["bworld:bone_meal 1", "farmersdelight:cod_slice 2"]); + assertEquals(t.dropped(), ["bworld:bone_meal 1", "bworld:cod_slice 2"]); t.use(1); t.use(1); assertEquals(t.on_board(), ""); @@ -74,25 +74,25 @@ Deno.test("a stack goes on the board, and a knife cuts one at a time by its reci // on an empty board the knife goes on it, like the java mod, and cutting nothing does nothing t.use(1); - assertEquals(t.on_board(), "farmersdelight:iron_knife 1"); - t.send(1, { type: "chat", text: "/give farmersdelight:stone_knife" }); + assertEquals(t.on_board(), "bworld:iron_knife 1"); + t.send(1, { type: "chat", text: "/give bworld:stone_knife" }); t.use(0); - assertEquals(t.on_board(), "farmersdelight:iron_knife 1"); - assertEquals(t.inventory(), ["farmersdelight:stone_knife 1"]); + assertEquals(t.on_board(), "bworld:iron_knife 1"); + assertEquals(t.inventory(), ["bworld:stone_knife 1"]); }); Deno.test("an empty hand takes it all back, and breaking the board drops it", async () => { const t = await setup(); - t.send(1, { type: "chat", text: "/give farmersdelight:cabbage 5" }); + t.send(1, { type: "chat", text: "/give bworld:cabbage 5" }); t.use(0); - assertEquals(t.on_board(), "farmersdelight:cabbage 5"); + assertEquals(t.on_board(), "bworld:cabbage 5"); t.use(1); assertEquals(t.on_board(), ""); - assertEquals(t.inventory(), ["farmersdelight:cabbage 5"]); + assertEquals(t.inventory(), ["bworld:cabbage 5"]); t.use(0); t.game.destroy_block(...BOARD); - assertEquals(t.dropped(), ["farmersdelight:cabbage 5", "farmersdelight:cutting_board 1"]); + assertEquals(t.dropped(), ["bworld:cabbage 5", "bworld:cutting_board 1"]); assertEquals(t.game.world.get_tile(...BOARD), undefined); }); diff --git a/tests/farming_test.ts b/tests/farming_test.ts index 4201809..3fc99a7 100644 --- a/tests/farming_test.ts +++ b/tests/farming_test.ts @@ -161,8 +161,8 @@ Deno.test("each crop takes its own number of watered days to grow", async () => assertEquals(grow(t, 0, "bworld:carrots", 3), [1, 2, 3]); assertEquals(grow(t, 1, "bworld:potatoes", 6), [0, 1, 1, 2, 2, 3]); assertEquals(grow(t, 2, "bworld:wheat", 7), [1, 2, 3, 4, 5, 6, 7]); - assertEquals(grow(t, -1, "farmersdelight:onions", 4), [0, 1, 2, 3]); - const cabbage = grow(t, -2, "farmersdelight:cabbages", 12); + assertEquals(grow(t, -1, "bworld:onions", 4), [0, 1, 2, 3]); + const cabbage = grow(t, -2, "bworld:cabbages", 12); assertEquals(cabbage.at(-2), 6, "not grown a day early"); assertEquals(cabbage.at(-1), 7); @@ -191,16 +191,16 @@ Deno.test("tomatoes take 11 days, are picked by hand, and grow back in 4", async // they only grow in summer, which starts on day 50 t.game.set_time(49 * CYCLE_TICKS); t.game.tick(); - const ages = grow(t, 1, "farmersdelight:tomatoes", 11); + const ages = grow(t, 1, "bworld:tomatoes", 11); assertEquals(ages.at(-1), 7); assertEquals(ages.at(-2), 6); t.use(1, 101, 0); const picked = t.game.item_entities().map((e) => e.item.to_data()); assertEquals(picked.length, 1); - assertEquals(picked[0].id, "farmersdelight:tomato"); + assertEquals(picked[0].id, "bworld:tomato"); assert(picked[0].count >= 1 && picked[0].count <= 2); - assertEquals(t.game.world.get_block_id(1, 101, 0), "farmersdelight:tomatoes", "the plant stays"); + assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:tomatoes", "the plant stays"); assertEquals(t.state(1, 101, 0, "age"), 4, "back to a young vine"); // 3 watered mornings isn't enough, the 4th is @@ -212,24 +212,24 @@ Deno.test("tomatoes take 11 days, are picked by hand, and grow back in 4", async }); Deno.test("rice is planted in water, grows panicles on top without watering, and leaves its water when harvested", async () => { - const t = await setup(["farmersdelight:rice 2"]); + const t = await setup(["bworld:rice 2"]); t.game.set_block(1, 99, 0, "bworld:dirt"); t.game.set_block(1, 100, 0, "bworld:water"); t.game.set_block(2, 100, 0, "bworld:hoed_dirt"); // not on land - t.hold("farmersdelight:rice"); + t.hold("bworld:rice"); t.use(2, 100, 0); assertEquals(t.game.world.get_block_id(2, 101, 0), "bworld:air"); // into the water, standing on the dirt under it t.use(1, 100, 0); - assertEquals(t.game.world.get_block_id(1, 100, 0), "farmersdelight:rice"); + assertEquals(t.game.world.get_block_id(1, 100, 0), "bworld:rice"); for (let day = 0; day < 3; day++) t.next_morning(); assertEquals(t.state(1, 100, 0, "age"), 3); assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:air"); for (let day = 0; day < 3; day++) t.next_morning(); - assertEquals(t.game.world.get_block_id(1, 101, 0), "farmersdelight:rice_panicles"); + assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:rice_panicles"); assertEquals(t.state(1, 101, 0, "age"), 3, "fully grown after 6 days"); assertEquals(t.state(1, 100, 0, "age"), 4, "the stalk holding them up"); @@ -239,7 +239,7 @@ Deno.test("rice is planted in water, grows panicles on top without watering, and t.game.tick(); t.game.tick(); const dropped = t.game.item_entities().map((e) => e.item.type_id).sort(); - assertEquals(dropped, ["farmersdelight:rice", "farmersdelight:rice_panicle"]); + assertEquals(dropped, ["bworld:rice", "bworld:rice_panicle"]); assertEquals(t.game.world.get_block_id(1, 100, 0), "bworld:water"); assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:air"); }); @@ -263,9 +263,9 @@ Deno.test("a crop dies into a dead bush the first morning out of its seasons", a Deno.test("a two block crop dies whole, its top going without dropping anything", async () => { const t = await setup(); t.game.set_block(1, 99, 0, "bworld:dirt"); - t.game.set_block(1, 100, 0, "farmersdelight:rice"); + t.game.set_block(1, 100, 0, "bworld:rice"); for (let day = 0; day < 6; day++) t.next_morning(); - assertEquals(t.game.world.get_block_id(1, 101, 0), "farmersdelight:rice_panicles"); + assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:rice_panicles"); // rice grows in autumn, dies in winter, winter starts on day 148 t.game.set_time(147 * CYCLE_TICKS - 1); diff --git a/tests/recipe_viewer_test.ts b/tests/recipe_viewer_test.ts index f911638..b195a35 100644 --- a/tests/recipe_viewer_test.ts +++ b/tests/recipe_viewer_test.ts @@ -65,21 +65,21 @@ Deno.test("the recipe viewer finds what makes and uses an item, in any recipe ty assertEquals(outputs(bowl), [{ ids: ["bworld:bowl"], count: 4 }]); // the cooking pot's own type: ingredients, alternatives, and the bowl it's served in - const [rolls] = making("farmersdelight:cabbage_rolls"); + const [rolls] = making("bworld:cabbage_rolls"); assertEquals(category_name(rolls.type), "Cooking"); assertEquals(ids(inputs(rolls)), [ - "farmersdelight:cabbage", - "bworld:carrot|bworld:potato|farmersdelight:onion|farmersdelight:tomato", + "bworld:cabbage", + "bworld:carrot|bworld:potato|bworld:onion|bworld:tomato", ]); - const [rice] = making("farmersdelight:cooked_rice"); - assertEquals(ids(inputs(rice)), ["farmersdelight:rice", "bworld:bowl"]); + const [rice] = making("bworld:cooked_rice"); + assertEquals(ids(inputs(rice)), ["bworld:rice", "bworld:bowl"]); // uses: the bowl serves meals, coal is fuel and in the stove, potatoes are in cabbage rolls const served_in_bowls = using("bworld:bowl").map((r) => outputs(r)[0].ids[0]); - assert(served_in_bowls.includes("farmersdelight:cooked_rice")); - assert(served_in_bowls.includes("farmersdelight:tomato_sauce")); + assert(served_in_bowls.includes("bworld:cooked_rice")); + assert(served_in_bowls.includes("bworld:tomato_sauce")); assert(using("bworld:coal").some((r) => r.type === "fuel")); - assert(using("bworld:coal").some((r) => r.type === "shaped" && outputs(r)[0].ids[0] === "farmersdelight:stove")); + assert(using("bworld:coal").some((r) => r.type === "shaped" && outputs(r)[0].ids[0] === "bworld:stove")); assert(using("bworld:potato").includes(rolls)); // smelting and smithing @@ -96,8 +96,8 @@ Deno.test("recipes are found by category in jei's order, and a catalyst's uses a const titles = index.categories.map((category) => category.title); assertEquals(titles.slice(0, 4), ["Crafting", "Smelting", "Fuel", "Smithing"]); assert(titles.includes("Cooking")); - assertEquals(index.categories.find((c) => c.type === "farmersdelight:cooking")?.catalysts, [ - "farmersdelight:cooking_pot", + assertEquals(index.categories.find((c) => c.type === "bworld:cooking")?.catalysts, [ + "bworld:cooking_pot", ]); const furnace_uses = index.find(item("bworld:furnace"), "uses").map(( diff --git a/tests/tags_test.ts b/tests/tags_test.ts index d370e42..1568e77 100644 --- a/tests/tags_test.ts +++ b/tests/tags_test.ts @@ -186,7 +186,7 @@ Deno.test("check-mods finds broken tags and tags nobody defines", async () => { recipe: { type: "fuel", item: "#maple:nothing_here", burn_time: 100 }, }); // another mod's namespace, without depending on it - write("tags/items/farmersdelight/knives.json", { format_version: 1, tag: { values: ["maple:maple_planks"] } }); + write("tags/items/kitchen/knives.json", { format_version: 1, tag: { values: ["maple:maple_planks"] } }); const report = (await check_mods(dir, { typecheck: false })).find((r) => r.id === "maple")!; const has = (list: string[], text: string) => @@ -197,7 +197,7 @@ Deno.test("check-mods finds broken tags and tags nobody defines", async () => { has(report.errors, "tags/items/misplaced.json: tag files go in tags///"); has(report.errors, `tags/fluids/maple/sap.json: registry must be "blocks", "items", "entities"`); has(report.errors, "recipes/uses_missing_tag.json: item tag #maple:nothing_here doesn't exist"); - has(report.warnings, `uses #farmersdelight:knives but doesn't list "farmersdelight" in dependencies`); + has(report.warnings, `uses #kitchen:knives but doesn't list "kitchen" in dependencies`); // the shared namespace and optional entries need no dependency assert(!report.warnings.some((w) => w.includes("c:wood") || w.includes("other_mod")), report.warnings.join("\n")); Deno.removeSync(dir, { recursive: true }); diff --git a/tests/waterlog_test.ts b/tests/waterlog_test.ts index cd01d7b..227490b 100644 --- a/tests/waterlog_test.ts +++ b/tests/waterlog_test.ts @@ -80,7 +80,7 @@ Deno.test("water flows out of a waterlogged fence, which never drains, and break }); Deno.test("rice is only planted in a water source, holds it, and leaves it behind when broken", async () => { - const t = await setup([["farmersdelight:rice", 1]]); + const t = await setup([["bworld:rice", 1]]); for (const x of [-2, 2, 4]) t.game.set_block(x, 99, 0, "bworld:dirt"); t.game.set_block(2, 100, 0, "bworld:water"); // not in flowing water, or out of water @@ -91,8 +91,8 @@ Deno.test("rice is only planted in a water source, holds it, and leaves it behin assertEquals(t.game.world.get_block_id(4, 100, 0), "bworld:air"); t.send(1, { type: "use_block", x: 2, y: 100, z: 0, face: "top", hit: [0.5, 1, 0.5] }); - assertEquals(t.game.world.get_block_id(2, 100, 0), "farmersdelight:rice"); - const rice = EverythingRegistry.get("blocks", "farmersdelight:rice")!; + assertEquals(t.game.world.get_block_id(2, 100, 0), "bworld:rice"); + const rice = EverythingRegistry.get("blocks", "bworld:rice")!; assertEquals(get_state_value(t.game.world.get_block_value(2, 100, 0), rice, "waterlogged"), 1); assert(t.game.entities.is_fluid(2, 100, 0));