Log config data for debugging

Added debug statements to log configuration details including the attribute names and modifier values being processed. This will help in identifying and troubleshooting issues with entity modifiers setup.
This commit is contained in:
Teriuihi 2024-10-18 23:27:29 +02:00
parent 77f9cfe0a6
commit 4937b6e337

View File

@ -72,6 +72,7 @@ public class MobTypes extends AbstractConfig {
return;
}
EntityModifier value = getAttribute(attribute, config.getDouble(prefix + key + ".modifiers." + modifier, "value", 1));
System.out.println(prefix + key + ".modifiers." + modifier);
if (value == null)
return;
entityModifiers.add(value);
@ -83,6 +84,8 @@ public class MobTypes extends AbstractConfig {
private static EntityModifier getAttribute(String attributeName, double value) {
try {
Attribute attribute = Attribute.valueOf(attributeName);
System.out.println(attributeName);
System.out.println(attribute.name());
return new EntityAttributeModifier(config.main, attribute, value);
} catch (IllegalArgumentException e) {
log.error("Invalid attribute {}", attributeName, e);