Stop spamming console

This commit is contained in:
Bruno Rybársky 2024-05-05 14:51:17 +02:00
parent 45e8d2e26d
commit 4edeadf4f9

@ -22,7 +22,7 @@ public class RegexingHoppers implements ModInitializer {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
LOGGER.info("RegexingHoppers initialized!");
LOGGER.debug("RegexingHoppers initialized!");
}
public static boolean shouldNotMove(Inventory hopper, String itemName) {
@ -33,7 +33,7 @@ public class RegexingHoppers implements ModInitializer {
String customName = factory.getDisplayName().getLiteralString();
// Log the custom name used for matching
LOGGER.info("Custom regex pattern from hopper: {}", customName);
LOGGER.debug("Custom regex pattern from hopper: {}", customName);
if (customName != null && !customName.isEmpty()) {
if (hopper instanceof HopperBlockEntity) {
@ -48,7 +48,7 @@ public class RegexingHoppers implements ModInitializer {
// Log the result of the regex matching
boolean matches = matcher.matches();
LOGGER.info("Regex matching result: {}", matches);
LOGGER.debug("Regex matching result: {}", matches);
if (!matches) {
if (hopper instanceof HopperBlockEntity) {
@ -59,15 +59,15 @@ public class RegexingHoppers implements ModInitializer {
return !matches;
} catch (PatternSyntaxException e) {
// Log exception if regex pattern is invalid
LOGGER.info("Invalid regex pattern: {}", customName, e);
LOGGER.debug("Invalid regex pattern: {}", customName, e);
}
} else {
// Log case when custom name is null or empty
LOGGER.info("Custom name is null or empty, not performing regex matching.");
LOGGER.debug("Custom name is null or empty, not performing regex matching.");
}
} else {
// Log if hopper is not an instance of NamedScreenHandlerFactory
LOGGER.info("Hopper is not an instance of NamedScreenHandlerFactory.");
LOGGER.debug("Hopper is not an instance of NamedScreenHandlerFactory.");
}
// Default return value in case no conditions are met