From 1f92dc5f40712ecf5e2a3ddfbb8382d9a513cb99 Mon Sep 17 00:00:00 2001 From: XxFran10xX <318299142+XxFran10xX@users.noreply.github.com> Date: Mon, 26 Oct 2026 10:52:43 +0100 Subject: [PATCH 1/2] fix: give milk and water-only sauces a plated splash Pouring a milk sauce on a plate showed the saucepan's milk surface: a full-width sheet of liquid floating over the food, because sauce-dict's plated entry for ffffff pointed at the station model. Water-only sauces had the same problem through liquid-fallback. Add milk_plated and water_plated to the cooking pack (the station texture cut with the shared splash mask, like the other plated sauces), point milk's plated entry at it, and give plates their own plated-liquid-fallback. A test checks that every bundled sauce has a distinct plated model that exists in the bundled pack. Co-Authored-By: Claude Opus 5.5 --- ItemsAdder/tfmc_cooking/contents/items.yml | 14 ++++ .../models/item/liquid/milk_plated.json | 22 +++++ .../models/item/liquid/water_plated.json | 22 +++++ .../textures/item/liquid/milk_plated.png | Bin 0 -> 595 bytes .../item/liquid/milk_plated.png.mcmeta | 5 ++ .../textures/item/liquid/water_plated.png | Bin 0 -> 653 bytes .../item/liquid/water_plated.png.mcmeta | 5 ++ .../cooking/cache/CategoryDictionary.java | 13 ++- .../tfminecraft/cooking/cache/ItemCache.java | 1 + .../cooking/loader/ConfigLoader.java | 1 + .../cooking/manager/PlateManager.java | 2 +- src/main/resources/config.yml | 3 +- .../cache/BundledSauceVisualsTest.java | 77 ++++++++++++++++++ .../cooking/cache/CachesCoverageTest.java | 7 +- .../cooking/cache/SauceColourTest.java | 15 ++-- 15 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/milk_plated.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/water_plated.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/milk_plated.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/milk_plated.png.mcmeta create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/water_plated.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/water_plated.png.mcmeta create mode 100644 src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java diff --git a/ItemsAdder/tfmc_cooking/contents/items.yml b/ItemsAdder/tfmc_cooking/contents/items.yml index 24f0b64..ae06fee 100644 --- a/ItemsAdder/tfmc_cooking/contents/items.yml +++ b/ItemsAdder/tfmc_cooking/contents/items.yml @@ -1293,6 +1293,20 @@ items: generate: false model_path: item/liquid/red_dark_plated + milk_plated: + display_name: "Milk Plated" + resource: + material: TROPICAL_FISH + generate: false + model_path: item/liquid/milk_plated + + water_plated: + display_name: "Water Plated" + resource: + material: TROPICAL_FISH + generate: false + model_path: item/liquid/water_plated + ladle: display_name: "Ladle" resource: diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/milk_plated.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/milk_plated.json new file mode 100644 index 0000000..bf022fb --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/milk_plated.json @@ -0,0 +1,22 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/liquid/milk_plated", + "particle": "tfmc_cooking:item/liquid/milk_plated" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 0, 16], + "faces": { + "north": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/water_plated.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/water_plated.json new file mode 100644 index 0000000..3f6b8df --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/liquid/water_plated.json @@ -0,0 +1,22 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/liquid/water_plated", + "particle": "tfmc_cooking:item/liquid/water_plated" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 0, 16], + "faces": { + "north": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/milk_plated.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/milk_plated.png new file mode 100644 index 0000000000000000000000000000000000000000..607992a647fedd17966870a70989501ce4dbc4d9 GIT binary patch literal 595 zcmV-Z0<8UsP)p+!+HOAOC^@P4$eE>Gv?8(F$e9ZC2TFG+JSw3EkD}620K6 zTp(OH1ZK3tP1_v7T{PKo{PVKB2u46gD~xQg;F!$|_Wq6*$Y_O99HqIE_B#V{k}_Mw z@oj9;vw6Y#x}|&r(KcYTLbr%Fms&;4hylHm>J0z@tc2C_2>}42XygH8d2s^l*3AO^ z{Pmjw08D2&)a%mIPE6t?WmJbOog5_GeZBLj#YxJf;7AmWR`|LRa3VqQQ=ZmR$Qw%aY-KRmK?1GL{6TU-{RDB1=_qeF+MvmD&w_1is| zsa}^jo#kg&+GvIBvwpxr8AAcGovCs9u-ej@RoFjaI?U?0W|c8At!Tte(*| z8{1Ylm@;4E2bMJj&|nZF*&T+(1tb=3;;8QjqHQ2fQkKmNmgNPDlay8E!s@2q{m%Fk zIMl)+1{4<=qfT~wXa>kDR?8dh(5S`&8uC<#;k&4Og?{RvFduVU{iBVO_9E=YRzh`l}si+c&Yp~fI$l_fLv8C?G znAw?mZ{9o*dJg4@FrRZVp zo>yxCr|zpx*g_&8;B5-3lE#fu360D#;? zf34>*>g_=Dc7QOsF8}}#{mM*GJbt@A!fzC96BNIHkOs@BqAZqXsZaHs=)&(Uky zHI_aNXs;lX`vUP(1pwfnd$ln~sQEbRgvByXXU%%MSFdeS!WI(hoo6}^38M@hf2S`f zRr*kumLKS)vR2hx**-|EA9OqH+E=fTj2IHmGwmU0{)z78=G5|N_O+DpqY*Y=kgcDm nv!Kz!MRmR(n91Ig^u@dZzlwPHMkFcp00000NkvXXu0mjfqaZD8 literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/water_plated.png.mcmeta b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/water_plated.png.mcmeta new file mode 100644 index 0000000..994ad4a --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/liquid/water_plated.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 15 + } +} \ No newline at end of file diff --git a/src/main/java/net/tfminecraft/cooking/cache/CategoryDictionary.java b/src/main/java/net/tfminecraft/cooking/cache/CategoryDictionary.java index dd506ad..7ee5a3d 100644 --- a/src/main/java/net/tfminecraft/cooking/cache/CategoryDictionary.java +++ b/src/main/java/net/tfminecraft/cooking/cache/CategoryDictionary.java @@ -24,12 +24,17 @@ public static String getName(String key) { return StringFormatter.formatHex(dictionary.getOrDefault(key, "#8f8f8f" + WordUtils.capitalize(new String(key).replace("_", " ")))); } + /** sauce-dict entries are "station model|plated model"; index 1 picks the plated one. */ + public static final int PLATED = 1; + public static String getSauceItemPath(String colour, int index) { + // A plate needs a splash: the station fallback is a pan-sized liquid surface. + String fallback = index == PLATED ? ItemCache.platedLiquidFallback : ItemCache.liquidFallback; // Uncoloured names (water-only mixes, or older "000000Mixed Sauce" items) have no hex to read. - if (colour == null) return ItemCache.liquidFallback; + if (colour == null) return fallback; int rTotal = 0, gTotal = 0, bTotal = 0, count = 0; String hex = colour.replace("#", ""); - if (hex.equalsIgnoreCase("000000")) return ItemCache.liquidFallback; + if (hex.equalsIgnoreCase("000000")) return fallback; try { int r = Integer.parseInt(hex.substring(0, 2), 16); @@ -43,7 +48,7 @@ public static String getSauceItemPath(String colour, int index) { } catch (Exception ignored) {} if (count == 0) - return ItemCache.liquidFallback; + return fallback; int rAvg = rTotal / count; int gAvg = gTotal / count; @@ -82,6 +87,6 @@ public static String getSauceItemPath(String colour, int index) { } } - return ItemCache.liquidFallback; + return fallback; } } diff --git a/src/main/java/net/tfminecraft/cooking/cache/ItemCache.java b/src/main/java/net/tfminecraft/cooking/cache/ItemCache.java index 5a04408..f95782c 100644 --- a/src/main/java/net/tfminecraft/cooking/cache/ItemCache.java +++ b/src/main/java/net/tfminecraft/cooking/cache/ItemCache.java @@ -47,6 +47,7 @@ public class ItemCache { public static HashMap liquidModels = new HashMap<>(); public static HashMap colourMap = new HashMap<>(); public static String liquidFallback; + public static String platedLiquidFallback; //TOOLS public static String ladle; diff --git a/src/main/java/net/tfminecraft/cooking/loader/ConfigLoader.java b/src/main/java/net/tfminecraft/cooking/loader/ConfigLoader.java index 36640a1..7e8b69a 100644 --- a/src/main/java/net/tfminecraft/cooking/loader/ConfigLoader.java +++ b/src/main/java/net/tfminecraft/cooking/loader/ConfigLoader.java @@ -55,6 +55,7 @@ public void loadConfig(File configFile) { ItemCache.firePitSpinAxis = config.getString("fire-pit-spin-axis", "x").toLowerCase(); ItemCache.carveTool = config.getString("carve-tool", "ia.tfmc_cooking:cutting_knife"); ItemCache.liquidFallback = config.getString("liquid-fallback", "ia.tfmc_cooking:water"); + ItemCache.platedLiquidFallback = config.getString("plated-liquid-fallback", "ia.tfmc_cooking:water_plated"); ItemCache.water = config.getString("water", "v.water_bucket"); ItemCache.emptyCup = config.getString("empty-cup", "ia.tfmc_cooking:empty_cup"); diff --git a/src/main/java/net/tfminecraft/cooking/manager/PlateManager.java b/src/main/java/net/tfminecraft/cooking/manager/PlateManager.java index df3d78d..dfff5b0 100644 --- a/src/main/java/net/tfminecraft/cooking/manager/PlateManager.java +++ b/src/main/java/net/tfminecraft/cooking/manager/PlateManager.java @@ -171,7 +171,7 @@ public void addSauce(Player p, Furniture f, FoodItem sauce, ItemStack base) { ItemMeta baseMeta = base.getItemMeta(); String saucePath = CategoryDictionary.getSauceItemPath(sauceColour( baseMeta.getPersistentDataContainer().get(Keys.SAUCE_COLOUR, PersistentDataType.STRING), - baseMeta.getDisplayName()), 1); + baseMeta.getDisplayName()), CategoryDictionary.PLATED); ItemStack visual = TLibs.getItemAPI().getCreator().getItemFromPath(saucePath); if (visual != null && !visual.getType().isAir()) f.getOrCreatePlacedSlot("sauce").forceModel(visual); f.getLoc().getWorld().playSound(f.getLoc(), Sound.ITEM_BUCKET_FILL, 1f, 1f); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 411332a..57c2efa 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -33,6 +33,7 @@ carve-tool: ia.tfmc_cooking:cutting_knife water: ia.tfmc_cooking:water liquid-fallback: ia.tfmc_cooking:water +plated-liquid-fallback: ia.tfmc_cooking:water_plated empty-cup: ia.tfmc_cooking:empty_cup cup-of-water: ia.tfmc_cooking:cup_of_water cup-of-milk: ia.tfmc_cooking:cup_of_milk @@ -181,7 +182,7 @@ dictionary: liquid: "#3d85c6Liquid" sauce-dict: - - ffffff ia.tfmc_cooking:milk|ia.tfmc_cooking:milk + - ffffff ia.tfmc_cooking:milk|ia.tfmc_cooking:milk_plated - 80352e ia.tfmc_cooking:red_dark|ia.tfmc_cooking:red_dark_plated - a8552e ia.tfmc_cooking:red_light|ia.tfmc_cooking:red_light_plated - a86c2e ia.tfmc_cooking:brown_light|ia.tfmc_cooking:brown_light_plated diff --git a/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java b/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java new file mode 100644 index 0000000..267acb6 --- /dev/null +++ b/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java @@ -0,0 +1,77 @@ +package net.tfminecraft.cooking.cache; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.YamlConfiguration; +import org.junit.jupiter.api.Test; + +/** The bundled sauce visuals have to exist in the bundled ItemsAdder pack and fit their furniture. */ +class BundledSauceVisualsTest { + private static final String NAMESPACE = "ia.tfmc_cooking:"; + private static final File PACK = new File("ItemsAdder/tfmc_cooking"); + // Model JSON is indented with tabs, which YAML refuses, so read the texture paths directly. + private static final Pattern TEXTURE = Pattern.compile("\"tfmc_cooking:([^\"]+)\""); + + private final YamlConfiguration config = YamlConfiguration.loadConfiguration(new File("src/main/resources/config.yml")); + private final ConfigurationSection items = YamlConfiguration + .loadConfiguration(new File(PACK, "contents/items.yml")).getConfigurationSection("items"); + + @Test + void everySauceHasItsOwnPlatedSplash() { + List entries = config.getStringList("sauce-dict"); + assertTrue(entries.size() > 0); + for (String entry : entries) { + String[] paths = entry.split("\\s+")[1].split("\\|", 2); + assertEquals(2, paths.length, entry); + // A station model on a plate is a pan-sized sheet of liquid floating over the food. + assertNotEquals(paths[0], paths[1], entry); + assertTrue(paths[1].endsWith("_plated"), entry); + assertPackItem(paths[0]); + assertPackItem(paths[1]); + } + } + + @Test + void fallbacksMatchTheirFurniture() { + assertPackItem(config.getString("liquid-fallback")); + String plated = config.getString("plated-liquid-fallback"); + assertTrue(plated.endsWith("_plated"), plated); + assertPackItem(plated); + } + + private static String read(File file) { + try { + return Files.readString(file.toPath()); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + private void assertPackItem(String path) { + assertTrue(path.startsWith(NAMESPACE), path); + ConfigurationSection item = items.getConfigurationSection(path.substring(NAMESPACE.length())); + assertTrue(item != null, path + " is not in the bundled pack"); + String model = item.getString("resource.model_path"); + File json = new File(PACK, "resourcepack/assets/tfmc_cooking/models/" + model + ".json"); + assertTrue(json.isFile(), json.getPath()); + Matcher texture = TEXTURE.matcher(read(json)); + int found = 0; + while (texture.find()) { + File png = new File(PACK, "resourcepack/assets/tfmc_cooking/textures/" + texture.group(1) + ".png"); + assertTrue(png.isFile(), png.getPath()); + found++; + } + assertTrue(found > 0, json.getPath()); + } +} diff --git a/src/test/java/net/tfminecraft/cooking/cache/CachesCoverageTest.java b/src/test/java/net/tfminecraft/cooking/cache/CachesCoverageTest.java index 53d09bd..98b18d6 100644 --- a/src/test/java/net/tfminecraft/cooking/cache/CachesCoverageTest.java +++ b/src/test/java/net/tfminecraft/cooking/cache/CachesCoverageTest.java @@ -156,13 +156,16 @@ class CachesCoverageTest { @Test void categoryNamesAndSauceColoursUseConfiguredValuesOrFallbacks() { CategoryDictionary.dictionary.put("meat","Custom Meat"); assertEquals("Custom Meat",CategoryDictionary.getName("meat")); assertTrue(CategoryDictionary.getName("garden_vegetable").endsWith("Garden Vegetable")); - ItemCache.liquidFallback="fallback"; CategoryDictionary.sauceDict.put("ff0000","red|deep.red"); + ItemCache.liquidFallback="fallback"; ItemCache.platedLiquidFallback="plated.fallback"; CategoryDictionary.sauceDict.put("ff0000","red|deep.red"); CategoryDictionary.sauceDict.put("000000","black"); CategoryDictionary.sauceDict.put("bad","invalid"); assertEquals("red",CategoryDictionary.getSauceItemPath("#fe0101",0)); assertEquals("deep.red",CategoryDictionary.getSauceItemPath("ff0000",1)); for(String colour:new String[]{null,"000000","bad"}) assertEquals("fallback",CategoryDictionary.getSauceItemPath(colour,0)); + for(String colour:new String[]{null,"000000","bad"}) assertEquals("plated.fallback",CategoryDictionary.getSauceItemPath(colour,CategoryDictionary.PLATED)); assertEquals("fallback",CategoryDictionary.getSauceItemPath("ff0000",-1)); assertEquals("fallback",CategoryDictionary.getSauceItemPath("ff0000",2)); - CategoryDictionary.sauceDict.put("ff0000","red| "); assertEquals("fallback",CategoryDictionary.getSauceItemPath("ff0000",1)); + CategoryDictionary.sauceDict.put("ff0000","red| "); assertEquals("plated.fallback",CategoryDictionary.getSauceItemPath("ff0000",1)); + CategoryDictionary.sauceDict.put("ff0000","red"); assertEquals("plated.fallback",CategoryDictionary.getSauceItemPath("ff0000",1)); CategoryDictionary.sauceDict.clear(); assertEquals("fallback",CategoryDictionary.getSauceItemPath("ff0000",0)); + assertEquals("plated.fallback",CategoryDictionary.getSauceItemPath("ff0000",1)); assertNotNull(new CategoryDictionary()); } diff --git a/src/test/java/net/tfminecraft/cooking/cache/SauceColourTest.java b/src/test/java/net/tfminecraft/cooking/cache/SauceColourTest.java index d6c32f7..07e52c3 100644 --- a/src/test/java/net/tfminecraft/cooking/cache/SauceColourTest.java +++ b/src/test/java/net/tfminecraft/cooking/cache/SauceColourTest.java @@ -15,16 +15,20 @@ class SauceColourTest { private static final String WATER = "ia.test:water"; + private static final String WATER_PLATED = "ia.test:water_plated"; private static final String MILK_PLATED = "ia.test:milk_plated"; private String previousFallback; + private String previousPlatedFallback; private HashMap previousDict; @BeforeEach void setUp() { previousFallback = ItemCache.liquidFallback; + previousPlatedFallback = ItemCache.platedLiquidFallback; previousDict = CategoryDictionary.sauceDict; ItemCache.liquidFallback = WATER; + ItemCache.platedLiquidFallback = WATER_PLATED; CategoryDictionary.sauceDict = new HashMap<>(); CategoryDictionary.sauceDict.put("ffffff", "ia.test:milk|" + MILK_PLATED); } @@ -32,6 +36,7 @@ void setUp() { @AfterEach void tearDown() { ItemCache.liquidFallback = previousFallback; + ItemCache.platedLiquidFallback = previousPlatedFallback; CategoryDictionary.sauceDict = previousDict; } @@ -52,23 +57,23 @@ void uncolouredMixesAreNamedWhite() { } @Test - void waterOnlySauceNameShowsTheWaterVisual() { + void waterOnlySauceNameShowsThePlatedWaterVisual() { String name = StringFormatter.formatHex( DisplayUtils.getNameColour(DisplayUtils.getMergedColour(List.of("000000"))) + "Mixed Sauce"); assertEquals("§fMixed Sauce", name); assertNull(StringFormatter.extractHexColor(name)); - assertEquals(WATER, CategoryDictionary.getSauceItemPath(StringFormatter.extractHexColor(name), 1)); + assertEquals(WATER_PLATED, CategoryDictionary.getSauceItemPath(StringFormatter.extractHexColor(name), CategoryDictionary.PLATED)); } @Test - void olderUncolouredSauceNameShowsTheWaterVisual() { - assertEquals(WATER, CategoryDictionary.getSauceItemPath(StringFormatter.extractHexColor("000000Mixed Sauce"), 1)); + void olderUncolouredSauceNameShowsThePlatedWaterVisual() { + assertEquals(WATER_PLATED, CategoryDictionary.getSauceItemPath(StringFormatter.extractHexColor("000000Mixed Sauce"), CategoryDictionary.PLATED)); } @Test void milkOnlySauceColourShowsTheMilkVisual() { // Scooping stores this merged colour on the ladle; the name alone can't carry it (Paper keeps #ffffff as named white). - assertEquals(MILK_PLATED, CategoryDictionary.getSauceItemPath(DisplayUtils.getMergedColour(List.of("ffffff")), 1)); + assertEquals(MILK_PLATED, CategoryDictionary.getSauceItemPath(DisplayUtils.getMergedColour(List.of("ffffff")), CategoryDictionary.PLATED)); } } From 6ad5c2d61b226f64fece2b2521d4304d6bd8060c Mon Sep 17 00:00:00 2001 From: XxFran10xX <318299142+XxFran10xX@users.noreply.github.com> Date: Mon, 26 Oct 2026 10:55:12 +0100 Subject: [PATCH 2/2] test: use assertNotNull for missing pack items Co-Authored-By: Claude Opus 5.5 --- .../net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java b/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java index 267acb6..21c9db9 100644 --- a/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java +++ b/src/test/java/net/tfminecraft/cooking/cache/BundledSauceVisualsTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.File; @@ -61,7 +62,7 @@ private static String read(File file) { private void assertPackItem(String path) { assertTrue(path.startsWith(NAMESPACE), path); ConfigurationSection item = items.getConfigurationSection(path.substring(NAMESPACE.length())); - assertTrue(item != null, path + " is not in the bundled pack"); + assertNotNull(item, path + " is not in the bundled pack"); String model = item.getString("resource.model_path"); File json = new File(PACK, "resourcepack/assets/tfmc_cooking/models/" + model + ".json"); assertTrue(json.isFile(), json.getPath());