mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 19:39:37 +00:00
30 lines
694 B
Java
30 lines
694 B
Java
package binnie.botany.api;
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
import net.minecraft.util.IStringSerializable;
|
|
import net.minecraft.util.text.TextFormatting;
|
|
import net.minecraft.util.text.translation.I18n;
|
|
|
|
public enum EnumMoisture implements IStringSerializable {
|
|
DRY(TextFormatting.YELLOW),
|
|
NORMAL(null),
|
|
DAMP(TextFormatting.DARK_BLUE);
|
|
|
|
@Nullable
|
|
final TextFormatting color;
|
|
|
|
EnumMoisture(@Nullable TextFormatting color) {
|
|
this.color = color;
|
|
}
|
|
|
|
@Override
|
|
public String getName() {
|
|
return name().toLowerCase();
|
|
}
|
|
|
|
public String getTranslated(boolean withColor) {
|
|
return (withColor && color != null ? color : "") + I18n.translateToLocal("botany.moisture." + getName());
|
|
}
|
|
}
|