From e40bde9c84330ea95b347c9c547ae33ad325d367 Mon Sep 17 00:00:00 2001 From: Ruling-0 <47913168+Ruling-0@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:50:50 -0500 Subject: [PATCH] Doc and code style pass --- .../alchemicalWizardry/BloodMagicConfiguration.java | 2 +- .../common/summoning/meteor/MeteorComponent.java | 4 ++-- .../common/summoning/meteor/MeteorRegistry.java | 11 ++++------- .../compat/materiallib/MaterialLibStacks.java | 9 ++++----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 51bd3224..dc508c55 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -114,7 +114,7 @@ public class BloodMagicConfiguration { The block to use for filler in meteors if none is provided in the meteor's config file and that meteor's fillerChance is greater than 0. Also used as a fallback for empty ore lists in meteor configs. Specify the block with the format: - "modId:itemName:meta", or a MaterialLib block with the format "ml:material:shape". + "modId:itemName:meta", or "ml:material:shape" for a MaterialLib block. Defaults to minecraft:stone:0 if no block is provided or the provided block cannot be found."""); MeteorComponent.setDefaultMeteorBlock(); AlchemicalWizardry.allowedCrushedOresArray = config.get( diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorComponent.java index 5936eda8..8087a03f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorComponent.java @@ -55,8 +55,8 @@ public class MeteorComponent { this.reagent = reagent; } - /// The default meteor block named as `ml::`, whose stack [#getBlock] resolves on first use: the - /// config it comes from is read at preInit, before MaterialLib resolves its shapes. + /// The default meteor block named as `ml::`. Its stack is resolved on the first [#getBlock] + /// call -- the config is read at preInit, before MaterialLib resolves its shapes. private MeteorComponent(String materialName, String shapeToken) { this.itemStack = null; this.materialName = materialName; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java index e491605c..d602e26d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java @@ -28,7 +28,7 @@ public class MeteorRegistry { private static int materialLibInvalid; /// The stack a `ml::` entry names, or null when MaterialLib is absent or the entry resolves to - /// nothing. Every resolution is tallied for [#logMaterialLibTally]. + /// nothing. Counts the outcome into the tally [#logMaterialLibTally] reports. static ItemStack resolveMaterialLibStack(String materialName, String shapeToken) { ItemStack stack = Loader.isModLoaded("materiallib") ? MaterialLibStacks.getStack(materialName, shapeToken) : null; @@ -40,14 +40,11 @@ public class MeteorRegistry { return stack; } - /// Logs how many `ml:` entries the meteor and reagent configs resolved, then clears the tally. Call once both - /// have been loaded. + /// Logs the `ml:` entry tally and clears it. Call once every config that can carry such entries is loaded. public static void logMaterialLibTally() { if (materialLibResolved + materialLibInvalid > 0) { - AlchemicalWizardry.logger.info( - "Blood Magic: resolved {} MaterialLib entries ({} invalid)", - materialLibResolved, - materialLibInvalid); + AlchemicalWizardry.logger + .info("Resolved {} MaterialLib entries ({} invalid)", materialLibResolved, materialLibInvalid); } materialLibResolved = 0; materialLibInvalid = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/compat/materiallib/MaterialLibStacks.java b/src/main/java/WayofTime/alchemicalWizardry/compat/materiallib/MaterialLibStacks.java index c5c319f3..70b973ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/compat/materiallib/MaterialLibStacks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/compat/materiallib/MaterialLibStacks.java @@ -4,16 +4,15 @@ import net.minecraft.item.ItemStack; import com.ruling_0.materiallib.api.StackResolver; -/// Resolves a MaterialLib item from the material name and shape token a config entry names, for the `ml:` entry forms -/// of the meteor configs. +/// Resolves a MaterialLib item from a material name and a shape token. /// -/// MaterialLib types are named only here, so every caller can gate loading this class on `materiallib` being present. +/// MaterialLib types are named only in this class, so it loads only where `materiallib` is present. public final class MaterialLibStacks { private MaterialLibStacks() {} - /// The stack of the named material in the named shape, or null when either name matches nothing or the material - /// does not generate the shape. A miss is logged by MaterialLib. + /// A single item of the named material in the named shape; see [StackResolver#getStack] for the naming rules and + /// the null cases. public static ItemStack getStack(String materialName, String shapeToken) { return StackResolver.getStack(materialName, shapeToken, 1); }