wire up creatures config

This commit is contained in:
nossr50
2019-03-19 09:23:53 -07:00
parent 7cd8099d3c
commit 956b01a28e
15 changed files with 74 additions and 53 deletions

View File

@ -1,6 +1,16 @@
package com.gmail.nossr50.config.hocon.mobs;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionCombat {
@Setting(value = "Mob-Health-Bars", comment = "Health bars appear over a mobs world model when they are damaged by a player," +
"\nTypically this is a visually representation of their health using hearts.")
private ConfigSectionHealthBars healthBars = new ConfigSectionHealthBars();
public ConfigSectionHealthBars getHealthBars() {
return healthBars;
}
}

View File

@ -1,6 +1,39 @@
package com.gmail.nossr50.config.hocon.mobs;
import com.gmail.nossr50.datatypes.MobHealthbarType;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionHealthBars {
public static final boolean MOB_HEALTH_BARS_DEFAULT = true;
public static final int DISPLAY_TIME_SECONDS_DEFAULT = 3;
public static final String HEARTS = "HEARTS";
public static final String displayTypesList = "\nYou can use the following MobHealthBarType values: HEARTS, BAR";
@Setting(value = "Enable-Health-Bars", comment = "Turn this off to disable health bars appearing above mobs when damaged." +
"\nDefault value: "+MOB_HEALTH_BARS_DEFAULT)
private boolean enableHealthBars = MOB_HEALTH_BARS_DEFAULT;
@Setting(value = "Display-Bar-Type", comment = "The type of display to use for the mobs health bar." +
displayTypesList +
"\nDefault value: "+HEARTS)
private MobHealthbarType displayBarType = MobHealthbarType.HEARTS;
@Setting(value = "Display-Time-In-Seconds", comment = "How many seconds mob health bars should be displayed before being hidden." +
"\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT)
private int displayTimeSeconds = DISPLAY_TIME_SECONDS_DEFAULT;
public boolean isEnableHealthBars() {
return enableHealthBars;
}
public MobHealthbarType getDisplayBarType() {
return displayBarType;
}
public int getDisplayTimeSeconds() {
return displayTimeSeconds;
}
}