[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 19:14:12 -08:00
1 parent 07f445757b
commit 91bf137a94
809 files changed
+6761 -5793

No files matched your search

@@ -1,5 +1,12 @@
package binnie.genetics.gui;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
import binnie.botany.api.EnumFlowerChromosome;
import binnie.botany.api.IFlower;
import binnie.core.craftgui.IWidget;
@@ -19,13 +26,9 @@ import forestry.api.genetics.IAlleleTolerance;
import forestry.api.genetics.IIndividual;
import forestry.api.lepidopterology.EnumButterflyChromosome;
import forestry.api.lepidopterology.IButterfly;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
public class AnalystPageClimate extends ControlAnalystPage {
public AnalystPageClimate(IWidget parent, IArea area, IIndividual ind) {
super(parent, area);
setColor(0x006633);
@@ -48,9 +51,8 @@ public class AnalystPageClimate extends ControlAnalystPage {
}
if (ind instanceof IButterfly) {
tempTol = ((IAlleleTolerance)
ind.getGenome().getActiveAllele(EnumButterflyChromosome.TEMPERATURE_TOLERANCE))
.getValue();
tempTol = ((IAlleleTolerance) ind.getGenome()
.getActiveAllele(EnumButterflyChromosome.TEMPERATURE_TOLERANCE)).getValue();
humidTol = ((IAlleleTolerance) ind.getGenome().getActiveAllele(EnumButterflyChromosome.HUMIDITY_TOLERANCE))
.getValue();
}
@@ -60,32 +62,29 @@ public class AnalystPageClimate extends ControlAnalystPage {
y += 16;
new ControlText(
this,
new IArea(4.0f, y, w() - 8.0f, 14.0f),
I18N.localise("genetics.gui.analyst.climate.temperature"),
TextJustification.MIDDLE_CENTER)
.setColor(getColor());
this,
new IArea(4.0f, y, w() - 8.0f, 14.0f),
I18N.localise("genetics.gui.analyst.climate.temperature"),
TextJustification.MIDDLE_CENTER).setColor(getColor());
y += 12;
createTemperatureBar(this, (w() - 100.0f) / 2.0f, y, 100.0f, 10.0f, temp, tempTol);
y += 16;
if (!(ind instanceof IFlower)) {
new ControlText(
this,
new IArea(4.0f, y, w() - 8.0f, 14.0f),
I18N.localise("genetics.gui.analyst.climate.humidity"),
TextJustification.MIDDLE_CENTER)
.setColor(getColor());
this,
new IArea(4.0f, y, w() - 8.0f, 14.0f),
I18N.localise("genetics.gui.analyst.climate.humidity"),
TextJustification.MIDDLE_CENTER).setColor(getColor());
y += 12;
createHumidity(this, (w() - 100.0f) / 2.0f, y, 100.0f, 10.0f, humid, humidTol);
y += 16;
}
new ControlText(
this,
new IArea(4.0f, y, w() - 8.0f, 14.0f),
I18N.localise("genetics.gui.analyst.climate.biomes"),
TextJustification.MIDDLE_CENTER)
.setColor(getColor());
this,
new IArea(4.0f, y, w() - 8.0f, 14.0f),
I18N.localise("genetics.gui.analyst.climate.biomes"),
TextJustification.MIDDLE_CENTER).setColor(getColor());
y += 12;
List<BiomeGenBase> biomes = new ArrayList<>();
@@ -128,9 +127,10 @@ public class AnalystPageClimate extends ControlAnalystPage {
setSize(new IPoint(w(), y + dy + 18 + 8));
}
protected void createTemperatureBar(
IWidget parent, float x, float y, float w, float h, EnumTemperature value, EnumTolerance tol) {
protected void createTemperatureBar(IWidget parent, float x, float y, float w, float h, EnumTemperature value,
EnumTolerance tol) {
new ControlToleranceBar<EnumTemperature>(parent, x, y, w, h, EnumTemperature.class) {
@Override
protected String getName(EnumTemperature value) {
return value.name;
@@ -138,14 +138,15 @@ public class AnalystPageClimate extends ControlAnalystPage {
@Override
protected int getColor(EnumTemperature value) {
return (new int[] {0x00fffb, 0x78bbff, 0x4fff30, 0xffff00, 0xffa200, 0xff0000})[value.ordinal() - 1];
return (new int[] { 0x00fffb, 0x78bbff, 0x4fff30, 0xffff00, 0xffa200, 0xff0000 })[value.ordinal() - 1];
}
}.setValues(value, tol);
}
protected void createHumidity(
IWidget parent, float x, float y, float w, float h, EnumHumidity value, EnumTolerance tol) {
protected void createHumidity(IWidget parent, float x, float y, float w, float h, EnumHumidity value,
EnumTolerance tol) {
new ControlToleranceBar<EnumHumidity>(parent, x, y, w, h, EnumHumidity.class) {
@Override
protected String getName(EnumHumidity value) {
return value.name;
@@ -153,7 +154,7 @@ public class AnalystPageClimate extends ControlAnalystPage {
@Override
protected int getColor(EnumHumidity value) {
return (new int[] {0xffe7a3, 0x1aff00, 0x307cff})[value.ordinal()];
return (new int[] { 0xffe7a3, 0x1aff00, 0x307cff })[value.ordinal()];
}
}.setValues(value, tol);
}