Fix config string format in MobTypes.java

Replaced concatenation with String.format for clarity and consistency. This change ensures that the configuration strings are constructed correctly, preventing potential runtime errors.
This commit is contained in:
Teriuihi 2024-10-18 23:53:59 +02:00
parent e8b926ab41
commit 3da2b37aed

View File

@ -81,7 +81,7 @@ public class MobTypes extends AbstractConfig {
return; return;
} }
log.info("8"); log.info("8");
EntityModifier value = getAttribute(attribute, config.getDouble(prefix + key + ".modifiers." + modifier, "value", 1)); EntityModifier value = getAttribute(attribute, config.getDouble(String.format("%s%s.modifiers.%s.", prefix, key, modifier), "value", 1));
log.info("9"); log.info("9");
if (value == null) { if (value == null) {
log.info("RETURN (10)"); log.info("RETURN (10)");