Skip to content

Commit

Permalink
Close #3782 Fix log spam when duplicate items are found in the creati…
Browse files Browse the repository at this point in the history
…ve menu
  • Loading branch information
mezz committed Oct 1, 2024
1 parent 1bae8b5 commit 48d8fbf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import mezz.jei.common.Internal;
import mezz.jei.common.config.IClientConfig;
import mezz.jei.common.config.IJeiClientConfigs;
import mezz.jei.common.platform.Services;
import mezz.jei.common.util.ErrorUtil;
import mezz.jei.common.util.RegistryUtil;
import mezz.jei.common.util.StackHelper;
Expand All @@ -19,8 +20,10 @@
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.ItemStack;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;

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

0 comments on commit 48d8fbf

Please sign in to comment.