From 13a8f23247497ac5cd9d59b6869e19097ee307be Mon Sep 17 00:00:00 2001 From: unimatrixgit <95320811+unimatrixgit@users.noreply.github.com> Date: Thu, 3 Dec 2026 22:22:11 +0100 Subject: [PATCH] Derive soul campfire grade from its vanilla base recipe --- .../src/main/resources/item-templates.json | 2 +- .../com/dunerealms/jarvis/CraftingGradesTest.java | 13 +++++++++++++ network/content-assets/cookbook/spice-crafting.json | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/JarvisConnector/src/main/resources/item-templates.json b/JarvisConnector/src/main/resources/item-templates.json index 3f197f6e..ff605cc8 100644 --- a/JarvisConnector/src/main/resources/item-templates.json +++ b/JarvisConnector/src/main/resources/item-templates.json @@ -1485,7 +1485,7 @@ "spice_soul_campfire": { "itemClass": "resource", "quality": "uncommon", - "equipmentMark": 5, + "equipmentMark": 4, "material": "SOUL_CAMPFIRE", "policy": "s1-item-metadata-v1" }, diff --git a/JarvisConnector/src/test/java/com/dunerealms/jarvis/CraftingGradesTest.java b/JarvisConnector/src/test/java/com/dunerealms/jarvis/CraftingGradesTest.java index 2854a35a..c8dec46b 100644 --- a/JarvisConnector/src/test/java/com/dunerealms/jarvis/CraftingGradesTest.java +++ b/JarvisConnector/src/test/java/com/dunerealms/jarvis/CraftingGradesTest.java @@ -13,6 +13,19 @@ class CraftingGradesTest { var grades=CraftingGrades.resolve(Map.of("cheap",1,"costly",14,"output",1,"final",1),Map.of("cheap",2,"costly",14),List.of(recipe("output","costly"),recipe("output","cheap"),recipe("final","costly"))); assertEquals(3,grades.get("output"));assertEquals(14,grades.get("final")); } + @Test void infusedCampfiresFollowTheirDistinctVanillaRecipes() throws Exception { + var nativeMarks=Map.of("bamboo",1,"log",1,"soul_sand",1,"soul_soil",1); + var fixed=Map.of("planks",2,"coal",3,"charcoal",3); + var recipes=List.of(recipe("stick","planks"),recipe("stick","bamboo"), + new CraftingGrades.Recipe("campfire",List.of(Set.of("stick"),Set.of("log"),Set.of("coal","charcoal"))), + new CraftingGrades.Recipe("soul_campfire",List.of(Set.of("stick"),Set.of("log"),Set.of("soul_sand","soul_soil")))); + var grades=CraftingGrades.resolve(nativeMarks,fixed,recipes); + try(var template=CraftingGradesTest.class.getResourceAsStream("/item-templates.json")){ + var policy=new ItemMetadataPolicy(template); + assertEquals(String.valueOf(grades.get("campfire")+1),policy.template("spice_campfire","CAMPFIRE").mark()); + assertEquals(String.valueOf(grades.get("soul_campfire")+1),policy.template("spice_soul_campfire","SOUL_CAMPFIRE").mark()); + } + } @Test void unanchoredCyclesCannotManufactureMarks(){ assertEquals(Map.of("a",1,"b",1),CraftingGrades.resolve(Map.of("a",1,"b",1),Map.of(),List.of(recipe("a","b"),recipe("b","a")))); } diff --git a/network/content-assets/cookbook/spice-crafting.json b/network/content-assets/cookbook/spice-crafting.json index 256b6ed2..ff314ff9 100644 --- a/network/content-assets/cookbook/spice-crafting.json +++ b/network/content-assets/cookbook/spice-crafting.json @@ -43,8 +43,8 @@ "id": "spice_soul_campfire", "name": "Spice-Infused Soul Campfire", "material": "SOUL_CAMPFIRE", - "baseMark": 4, - "mark": 5, + "baseMark": 3, + "mark": 4, "quality": "uncommon", "ingredients": "4 Iron Ingots · 4 raw Melange Spice · 1 Soul Campfire", "details": "Put the vanilla cooker in the centre, spice on the four sides, and iron in the corners. Cooks twice as fast."