Skip to content

Commit 14a3ed6

Browse files
committed
Close #3782 Fix log spam when duplicate items are found in the creative menu
1 parent b7f27fd commit 14a3ed6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Library/src/main/java/mezz/jei/library/plugins/vanilla/ingredients/ItemStackListFactory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import mezz.jei.common.Internal;
55
import mezz.jei.common.config.IClientConfig;
66
import mezz.jei.common.config.IJeiClientConfigs;
7+
import mezz.jei.common.platform.Services;
78
import mezz.jei.common.util.ErrorUtil;
89
import mezz.jei.common.util.RegistryUtil;
910
import mezz.jei.common.util.StackHelper;
@@ -19,8 +20,10 @@
1920
import net.minecraft.world.item.CreativeModeTabs;
2021
import net.minecraft.world.item.ItemStack;
2122
import org.apache.commons.lang3.StringUtils;
23+
import org.apache.logging.log4j.Level;
2224
import org.apache.logging.log4j.LogManager;
2325
import org.apache.logging.log4j.Logger;
26+
import org.apache.logging.log4j.Marker;
2427
import org.jetbrains.annotations.Nullable;
2528
import org.jetbrains.annotations.Unmodifiable;
2629

@@ -177,7 +180,8 @@ private static void addFromTab(
177180
);
178181
}
179182
if (duplicateInTabCount > 0) {
180-
LOGGER.warn(
183+
Level level = Services.PLATFORM.getModHelper().isInDev() ? Level.WARN : Level.DEBUG;
184+
LOGGER.log(level,
181185
"""
182186
{} duplicate items were found in '{}' creative tab's: {}
183187
This may indicate that these types of item need a subtype interpreter added to JEI:

0 commit comments

Comments
 (0)