Update buildscript & spotlessApply

This commit is contained in:
DianeXD committed 2022-07-03 12:17:51 +08:00
1 parent e4329e2b8f
commit 8683a345c3
818 files changed
+51123 -49403

No files matched your search

@@ -13,37 +13,44 @@ import forestry.api.genetics.ISpeciesRoot;
import net.minecraft.util.EnumChatFormatting;
public class AnalystPageKaryogram extends ControlAnalystPage {
public AnalystPageKaryogram(IWidget parent, IArea area, IIndividual ind) {
super(parent, area);
setColor(0x9933ff);
int y = 4;
new ControlTextCentered(this, y, EnumChatFormatting.UNDERLINE + getTitle())
.setColor(getColor());
public AnalystPageKaryogram(IWidget parent, IArea area, IIndividual ind) {
super(parent, area);
setColor(0x9933ff);
int y = 4;
new ControlTextCentered(this, y, EnumChatFormatting.UNDERLINE + getTitle()).setColor(getColor());
y += 24;
ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(ind.getClass());
BreedingSystem system = Binnie.Genetics.getSystem(root);
int maxBiomePerLine = (int) ((w() + 4.0f - 16.0f) / 22.0f);
float karygramX = (w() - (Math.min(maxBiomePerLine, system.getActiveKaryotype().size()) * 18 - 4)) / 2.0f;
int dx = 0;
int dy = 0;
int rem = system.getActiveKaryotype().size();
for (IChromosomeType type : system.getActiveKaryotype()) {
new ControlAnalystChromosome(this, karygramX + dx, y + dy, root, type, ind.getGenome().getActiveAllele(type), ind.getGenome().getInactiveAllele(type));
dx += 22;
if (dx >= 22 * maxBiomePerLine - 22) {
rem -= maxBiomePerLine - 1;
if (rem < maxBiomePerLine) {
karygramX += (maxBiomePerLine - 1 - rem) * 22 / 2.0f;
}
dx = 0;
dy += 28;
}
}
}
y += 24;
ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(ind.getClass());
BreedingSystem system = Binnie.Genetics.getSystem(root);
int maxBiomePerLine = (int) ((w() + 4.0f - 16.0f) / 22.0f);
float karygramX =
(w() - (Math.min(maxBiomePerLine, system.getActiveKaryotype().size()) * 18 - 4)) / 2.0f;
int dx = 0;
int dy = 0;
int rem = system.getActiveKaryotype().size();
for (IChromosomeType type : system.getActiveKaryotype()) {
new ControlAnalystChromosome(
this,
karygramX + dx,
y + dy,
root,
type,
ind.getGenome().getActiveAllele(type),
ind.getGenome().getInactiveAllele(type));
dx += 22;
if (dx >= 22 * maxBiomePerLine - 22) {
rem -= maxBiomePerLine - 1;
if (rem < maxBiomePerLine) {
karygramX += (maxBiomePerLine - 1 - rem) * 22 / 2.0f;
}
dx = 0;
dy += 28;
}
}
}
@Override
public String getTitle() {
return I18N.localise("genetics.gui.analyst.karyogram");
}
@Override
public String getTitle() {
return I18N.localise("genetics.gui.analyst.karyogram");
}
}