Improve code readability in binnie.genetics package

Drop unused (empty) method MachinePackage#register() from all classes
This commit is contained in:
kordum authored and mezz committed 2017-04-27 14:48:45 -07:00
1 parent 856f08b752
commit 730043ba9c
112 files changed
+4354 -4697

No files matched your search

@@ -1,7 +1,3 @@
//
// Decompiled by Procyon v0.5.30
//
package binnie.genetics.gui;
import binnie.core.craftgui.IWidget;
@@ -23,60 +19,58 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.Collection;
public class AnalystPageWood extends AnalystPageProduce
{
public AnalystPageWood(final IWidget parent, final IArea area, final ITree ind) {
public class AnalystPageWood extends AnalystPageProduce {
public AnalystPageWood(IWidget parent, IArea area, ITree ind) {
super(parent, area);
this.setColor(6697728);
final ITreeGenome genome = ind.getGenome();
setColor(6697728);
ITreeGenome genome = ind.getGenome();
int y = 4;
new ControlTextCentered(this, y, EnumChatFormatting.UNDERLINE + "Wood").setColor(this.getColor());
new ControlTextCentered(this, y, EnumChatFormatting.UNDERLINE + "Wood").setColor(getColor());
y += 12;
if (((IAlleleBoolean) ind.getGenome().getActiveAllele(EnumTreeChromosome.FIREPROOF)).getValue()) {
new ControlIconDisplay(this, (this.w() - 16.0f) / 2.0f, y, ModuleItem.iconNoFire.getIcon()).addTooltip("Fireproof");
}
else {
new ControlIconDisplay(this, (this.w() - 16.0f) / 2.0f, y, ModuleItem.iconFire.getIcon()).addTooltip("Flammable");
new ControlIconDisplay(this, (w() - 16.0f) / 2.0f, y, ModuleItem.iconNoFire.getIcon()).addTooltip("Fireproof");
} else {
new ControlIconDisplay(this, (w() - 16.0f) / 2.0f, y, ModuleItem.iconFire.getIcon()).addTooltip("Flammable");
}
y += 30;
final Collection<ItemStack> products = new UniqueItemStackSet();
Collection<ItemStack> products = new UniqueItemStackSet();
genome.getPrimary().getGenerator().setLogBlock(genome, FakeWorld.instance, 0, 0, 0, ForgeDirection.UP);
ItemStack stackWood = FakeWorld.instance.getWooLog();
if (stackWood != null) {
products.add(stackWood);
}
// for (final ItemStack stack :
// for (ItemStack stack :
// ind.getGenome().getFruitProvider().getProducts()) {
// products.add(stack);
// }
if (products.size() > 0) {
new ControlTextCentered(this, y, "Logs").setColor(this.getColor());
new ControlTextCentered(this, y, "Logs").setColor(getColor());
y += 10;
final int w = products.size() * 18 - 2;
final int i = 0;
for (final ItemStack stack : products) {
final ControlItemDisplay d = new ControlItemDisplay(this, (this.w() - w) / 2.0f + 18 * i, y);
int w = products.size() * 18 - 2;
int i = 0;
for (ItemStack stack : products) {
ControlItemDisplay d = new ControlItemDisplay(this, (w() - w) / 2.0f + 18 * i, y);
d.setTooltip();
d.setItemStack(stack);
}
y += 26;
}
final Collection<ItemStack> allProducts = new UniqueItemStackSet();
for (final ItemStack stack2 : products) {
Collection<ItemStack> allProducts = new UniqueItemStackSet();
for (ItemStack stack2 : products) {
allProducts.add(stack2);
}
final Collection<ItemStack> refinedProducts = new UniqueItemStackSet();
refinedProducts.addAll(this.getAllProductsAndFluids(allProducts));
Collection<ItemStack> refinedProducts = new UniqueItemStackSet();
refinedProducts.addAll(getAllProductsAndFluids(allProducts));
if (refinedProducts.size() > 0) {
y = this.getRefined("Refined Products", y, refinedProducts);
y = getRefined("Refined Products", y, refinedProducts);
y += 8;
}
if (products.size() == 0) {
new ControlTextCentered(this, y, "This tree has no \nfruits or nuts").setColor(this.getColor());
new ControlTextCentered(this, y, "This tree has no \nfruits or nuts").setColor(getColor());
y += 28;
}
this.setSize(new IPoint(this.w(), y + 8));
setSize(new IPoint(w(), y + 8));
}
@Override