diff --git a/common/src/main/java/com/howlite/cobblemoncards/CobblemonCardsConfig.java b/common/src/main/java/com/howlite/cobblemoncards/CobblemonCardsConfig.java index 7fee4ff6..a4663bd5 100644 --- a/common/src/main/java/com/howlite/cobblemoncards/CobblemonCardsConfig.java +++ b/common/src/main/java/com/howlite/cobblemoncards/CobblemonCardsConfig.java @@ -52,6 +52,9 @@ public class CobblemonCardsConfig extends MidnightConfig { @Entry public static boolean displayPercentStatOnCards = true; + @Entry + public static boolean doesMasterBinderProvideStats = false; + // --- Binder Config Options --- @Entry diff --git a/common/src/main/java/com/howlite/cobblemoncards/item/custom/BinderItem.java b/common/src/main/java/com/howlite/cobblemoncards/item/custom/BinderItem.java index 7ac7038e..a9485dc7 100644 --- a/common/src/main/java/com/howlite/cobblemoncards/item/custom/BinderItem.java +++ b/common/src/main/java/com/howlite/cobblemoncards/item/custom/BinderItem.java @@ -1,5 +1,6 @@ package com.howlite.cobblemoncards.item.custom; +import com.howlite.cobblemoncards.CobblemonCardsConfig; import com.howlite.cobblemoncards.component.CardStat; import com.howlite.cobblemoncards.util.PlatformHelper; import net.minecraft.ChatFormatting; @@ -84,6 +85,14 @@ public void appendHoverText(ItemStack stack, TooltipContext context, List statTotals = com.howlite.cobblemoncards.util.CardStatUtil.collectStats(stack); diff --git a/common/src/main/java/com/howlite/cobblemoncards/util/CardStatUtil.java b/common/src/main/java/com/howlite/cobblemoncards/util/CardStatUtil.java index d0c93af0..729ac1be 100644 --- a/common/src/main/java/com/howlite/cobblemoncards/util/CardStatUtil.java +++ b/common/src/main/java/com/howlite/cobblemoncards/util/CardStatUtil.java @@ -31,7 +31,7 @@ public class CardStatUtil { * vanilla {@link DataComponents#CONTAINER} component for saves that predate the migration. */ public static Iterable getBinderContents(ItemStack binderStack) { - if (binderStack == null || binderStack.isEmpty()) { + if (binderStack == null) { return Collections.emptyList(); } List binderItems = binderStack.get(ModDataComponents.BINDER_CONTENTS); diff --git a/fabric/src/main/java/com/howlite/cobblemoncards/fabric/item/FabricMasterAlbumItem.java b/fabric/src/main/java/com/howlite/cobblemoncards/fabric/item/FabricMasterAlbumItem.java index 9db46f08..10a04e29 100644 --- a/fabric/src/main/java/com/howlite/cobblemoncards/fabric/item/FabricMasterAlbumItem.java +++ b/fabric/src/main/java/com/howlite/cobblemoncards/fabric/item/FabricMasterAlbumItem.java @@ -1,5 +1,6 @@ package com.howlite.cobblemoncards.fabric.item; +import com.howlite.cobblemoncards.CobblemonCardsConfig; import com.howlite.cobblemoncards.component.CardStat; import com.howlite.cobblemoncards.item.custom.MasterAlbumItem; import io.wispforest.accessories.api.Accessory; @@ -22,6 +23,9 @@ public FabricMasterAlbumItem(Properties properties) { @Override public void getDynamicModifiers(ItemStack stack, SlotReference reference, AccessoryAttributeBuilder builder) { + // If configured, master tier binders do not provide stats + if (!CobblemonCardsConfig.doesMasterBinderProvideStats) return; + // Shared reader: BINDER_CONTENTS with a fallback to vanilla CONTAINER for unmigrated saves. Map statTotals = com.howlite.cobblemoncards.util.CardStatUtil.collectStats(stack); diff --git a/neoforge/src/main/java/com/howlite/cobblemoncards/neoforge/item/NeoForgeMasterAlbumItem.java b/neoforge/src/main/java/com/howlite/cobblemoncards/neoforge/item/NeoForgeMasterAlbumItem.java index ebeb000c..91d7a5dd 100644 --- a/neoforge/src/main/java/com/howlite/cobblemoncards/neoforge/item/NeoForgeMasterAlbumItem.java +++ b/neoforge/src/main/java/com/howlite/cobblemoncards/neoforge/item/NeoForgeMasterAlbumItem.java @@ -1,5 +1,6 @@ package com.howlite.cobblemoncards.neoforge.item; +import com.howlite.cobblemoncards.CobblemonCardsConfig; import com.howlite.cobblemoncards.item.custom.MasterAlbumItem; import com.howlite.cobblemoncards.component.CardStat; import io.wispforest.accessories.api.Accessory; @@ -22,6 +23,9 @@ public NeoForgeMasterAlbumItem(Properties properties) { @Override public void getDynamicModifiers(ItemStack stack, SlotReference reference, AccessoryAttributeBuilder builder) { + // If configured, master tier binders do not provide stats + if (!CobblemonCardsConfig.doesMasterBinderProvideStats) return; + // Shared reader: BINDER_CONTENTS with a fallback to vanilla CONTAINER for unmigrated saves. Map statTotals = com.howlite.cobblemoncards.util.CardStatUtil.collectStats(stack);