mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 05:02:34 +00:00
Improve code readability in binnie.genetics package
Drop unused (empty) method MachinePackage#register() from all classes
This commit is contained in:
1 parent
856f08b752
commit
730043ba9c
112 files changed
+4354
-4697
No files matched your search
@@ -1,86 +1,89 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import binnie.core.craftgui.events.EventMouse;
|
||||
import binnie.core.craftgui.WidgetAttribute;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import binnie.genetics.genetics.Engineering;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.Binnie;
|
||||
import binnie.core.craftgui.Tooltip;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.ITooltip;
|
||||
import binnie.genetics.api.IGene;
|
||||
import binnie.core.craftgui.controls.core.IControlValue;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.Tooltip;
|
||||
import binnie.core.craftgui.WidgetAttribute;
|
||||
import binnie.core.craftgui.controls.core.Control;
|
||||
import binnie.core.craftgui.controls.core.IControlValue;
|
||||
import binnie.core.craftgui.events.EventMouse;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.genetics.api.IGene;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.genetics.Engineering;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ControlGene extends Control implements IControlValue<IGene>, ITooltip
|
||||
{
|
||||
IGene gene;
|
||||
public class ControlGene extends Control implements IControlValue<IGene>, ITooltip {
|
||||
protected IGene gene;
|
||||
|
||||
@Override
|
||||
public void getTooltip(final Tooltip tooltip) {
|
||||
final String cName = Binnie.Genetics.getSystem(this.gene.getSpeciesRoot()).getChromosomeName(this.gene.getChromosome());
|
||||
tooltip.add(cName + ": " + this.gene.getName());
|
||||
if (this.isMouseOver() && this.canFill(Window.get(this).getHeldItemStack())) {
|
||||
tooltip.add("Left click to assign gene");
|
||||
final IGene existingGene = Engineering.getGene(Window.get(this).getHeldItemStack(), this.gene.getChromosome().ordinal());
|
||||
if (existingGene == null) {
|
||||
return;
|
||||
}
|
||||
final String dName = Binnie.Genetics.getSystem(this.gene.getSpeciesRoot()).getChromosomeName(this.gene.getChromosome());
|
||||
tooltip.add("Will replace " + dName + ": " + existingGene.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canFill(final ItemStack stack) {
|
||||
return stack != null && stack.stackSize == 1 && Engineering.isGeneAcceptor(stack) && Engineering.canAcceptGene(stack, this.getValue());
|
||||
}
|
||||
|
||||
protected ControlGene(final IWidget parent, final float x, final float y) {
|
||||
protected ControlGene(IWidget parent, float x, float y) {
|
||||
super(parent, x, y, 16.0f, 16.0f);
|
||||
this.addAttribute(WidgetAttribute.MouseOver);
|
||||
this.addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
addAttribute(WidgetAttribute.MouseOver);
|
||||
addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventMouse.Down event) {
|
||||
if (ControlGene.this.canFill(Window.get(ControlGene.this.getWidget()).getHeldItemStack())) {
|
||||
final NBTTagCompound action = new NBTTagCompound();
|
||||
final NBTTagCompound geneNBT = new NBTTagCompound();
|
||||
ControlGene.this.getValue().writeToNBT(geneNBT);
|
||||
action.setTag("gene", geneNBT);
|
||||
Window.get(ControlGene.this.getWidget()).sendClientAction("gene-select", action);
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
if (!canFill(Window.get(getWidget()).getHeldItemStack())) {
|
||||
return;
|
||||
}
|
||||
|
||||
NBTTagCompound action = new NBTTagCompound();
|
||||
NBTTagCompound geneNBT = new NBTTagCompound();
|
||||
getValue().writeToNBT(geneNBT);
|
||||
action.setTag("gene", geneNBT);
|
||||
Window.get(getWidget()).sendClientAction("gene-select", action);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGene getValue() {
|
||||
return this.gene;
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
String cName = Binnie.Genetics.getSystem(gene.getSpeciesRoot()).getChromosomeName(gene.getChromosome());
|
||||
tooltip.add(cName + ": " + gene.getName());
|
||||
if (isMouseOver() && canFill(Window.get(this).getHeldItemStack())) {
|
||||
tooltip.add("Left click to assign gene");
|
||||
IGene existingGene = Engineering.getGene(Window.get(this).getHeldItemStack(), gene.getChromosome().ordinal());
|
||||
if (existingGene == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String dName = Binnie.Genetics.getSystem(gene.getSpeciesRoot()).getChromosomeName(gene.getChromosome());
|
||||
tooltip.add("Will replace " + dName + ": " + existingGene.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canFill(ItemStack stack) {
|
||||
return stack != null
|
||||
&& stack.stackSize == 1
|
||||
&& Engineering.isGeneAcceptor(stack)
|
||||
&& Engineering.canAcceptGene(stack, getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(final IGene value) {
|
||||
this.gene = value;
|
||||
public IGene getValue() {
|
||||
return gene;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(IGene value) {
|
||||
gene = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
if (this.isMouseOver() && this.canFill(Window.get(this).getHeldItemStack())) {
|
||||
CraftGUI.Render.solid(this.getArea(), -1);
|
||||
CraftGUI.Render.solid(this.getArea().inset(1), -12303292);
|
||||
if (isMouseOver() && canFill(Window.get(this).getHeldItemStack())) {
|
||||
CraftGUI.Render.solid(getArea(), -1);
|
||||
CraftGUI.Render.solid(getArea().inset(1), -12303292);
|
||||
}
|
||||
|
||||
CraftGUI.Render.colour(-1);
|
||||
CraftGUI.Render.iconItem(IPoint.ZERO, GeneticsTexture.dnaIcon.getIcon());
|
||||
}
|
||||
|
||||
@@ -1,87 +1,86 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.genetics.Gene;
|
||||
import java.util.ArrayList;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import java.util.List;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import java.util.Map;
|
||||
import binnie.Binnie;
|
||||
import binnie.genetics.genetics.GeneTracker;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
import binnie.core.craftgui.controls.core.IControlValue;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.craftgui.controls.core.Control;
|
||||
import binnie.core.craftgui.controls.core.IControlValue;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
import binnie.core.genetics.Gene;
|
||||
import binnie.genetics.genetics.GeneTracker;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
|
||||
public class ControlGeneScroll extends Control implements IControlValue<BreedingSystem>
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ControlGeneScroll extends Control implements IControlValue<BreedingSystem> {
|
||||
private String filter;
|
||||
private BreedingSystem system;
|
||||
|
||||
protected ControlGeneScroll(final IWidget parent, final float x, final float y, final float w, final float h) {
|
||||
protected ControlGeneScroll(IWidget parent, float x, float y, float w, float h) {
|
||||
super(parent, x, y, w, h);
|
||||
this.filter = "";
|
||||
this.system = null;
|
||||
filter = "";
|
||||
system = null;
|
||||
}
|
||||
|
||||
public void setFilter(final String filter) {
|
||||
public void setFilter(String filter) {
|
||||
this.filter = filter.toLowerCase();
|
||||
this.refresh();
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void setGenes(final BreedingSystem system) {
|
||||
public void setGenes(BreedingSystem system) {
|
||||
this.system = system;
|
||||
this.refresh();
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
this.deleteAllChildren();
|
||||
final GeneTracker tracker = GeneTracker.getTracker(Window.get(this).getWorld(), Window.get(this).getUsername());
|
||||
final Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(this.system.getSpeciesRoot());
|
||||
int x = 0;
|
||||
deleteAllChildren();
|
||||
GeneTracker tracker = GeneTracker.getTracker(Window.get(this).getWorld(), Window.get(this).getUsername());
|
||||
Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(system.getSpeciesRoot());
|
||||
int x;
|
||||
int y = 0;
|
||||
final boolean isNEI = ((WindowGeneBank) Window.get(this)).isNei;
|
||||
for (final Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
|
||||
final List<IAllele> discovered = new ArrayList<IAllele>();
|
||||
for (final IAllele allele : entry.getValue()) {
|
||||
final Gene gene = new Gene(allele, entry.getKey(), this.system.getSpeciesRoot());
|
||||
if ((isNEI || tracker.isSequenced(new Gene(allele, entry.getKey(), this.system.getSpeciesRoot()))) && gene.getName().toLowerCase().contains(this.filter)) {
|
||||
boolean isNEI = ((WindowGeneBank) Window.get(this)).isNei;
|
||||
|
||||
for (Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
|
||||
List<IAllele> discovered = new ArrayList<IAllele>();
|
||||
for (IAllele allele : entry.getValue()) {
|
||||
Gene gene = new Gene(allele, entry.getKey(), system.getSpeciesRoot());
|
||||
if ((isNEI || tracker.isSequenced(new Gene(allele, entry.getKey(), system.getSpeciesRoot()))) && gene.getName().toLowerCase().contains(filter)) {
|
||||
discovered.add(allele);
|
||||
}
|
||||
}
|
||||
|
||||
if (discovered.size() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
x = 0;
|
||||
new ControlText(this, new IPoint(x, y), this.system.getChromosomeName(entry.getKey()));
|
||||
new ControlText(this, new IPoint(x, y), system.getChromosomeName(entry.getKey()));
|
||||
y += 12;
|
||||
for (final IAllele allele : discovered) {
|
||||
if (x + 18 > this.getSize().x()) {
|
||||
for (IAllele allele : discovered) {
|
||||
if (x + 18 > getSize().x()) {
|
||||
y += 20;
|
||||
x = 0;
|
||||
}
|
||||
new ControlGene(this, x, y).setValue(new Gene(allele, entry.getKey(), this.system.getSpeciesRoot()));
|
||||
new ControlGene(this, x, y).setValue(new Gene(allele, entry.getKey(), system.getSpeciesRoot()));
|
||||
x += 18;
|
||||
}
|
||||
y += 24;
|
||||
}
|
||||
this.setSize(new IPoint(this.getSize().x(), y));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(final BreedingSystem system) {
|
||||
this.setGenes(system);
|
||||
setSize(new IPoint(getSize().x(), y));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BreedingSystem getValue() {
|
||||
return this.system;
|
||||
return system;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(BreedingSystem system) {
|
||||
setGenes(system);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
|
||||
public class ControlProcessTemporary extends ControlMachineProgress
|
||||
{
|
||||
// TODO unused class?
|
||||
public class ControlProcessTemporary extends ControlMachineProgress {
|
||||
public ControlProcessTemporary(final IWidget parent, final int x, final int y, final int width, final int height) {
|
||||
super(parent, x, y, null, null, null);
|
||||
this.setSize(new IPoint(width, height));
|
||||
setSize(new IPoint(width, height));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.solid(this.getArea(), -4868683);
|
||||
final float w = this.getSize().y() * this.progress / 100.0f;
|
||||
CraftGUI.Render.solid(new IArea(this.getArea().x(), this.getArea().y(), w, this.getArea().h()), -65536);
|
||||
CraftGUI.Render.solid(getArea(), -4868683);
|
||||
final float w = getSize().y() * progress / 100.0f;
|
||||
CraftGUI.Render.solid(new IArea(getArea().x(), getArea().y(), w, getArea().h()), -65536);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.IWidget;
|
||||
@@ -18,47 +14,51 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class ControlSequencerProgress extends ControlProgressBase
|
||||
{
|
||||
ControlText textControl;
|
||||
public class ControlSequencerProgress extends ControlProgressBase {
|
||||
protected ControlText textControl;
|
||||
|
||||
public ControlSequencerProgress(final IWidget parent, final int x, final int y) {
|
||||
public ControlSequencerProgress(IWidget parent, int x, int y) {
|
||||
super(parent, x, y, 100.0f, 52.0f);
|
||||
final Panel panel = new Panel(this, 0.0f, 0.0f, 100.0f, 52.0f, MinecraftGUI.PanelType.Gray);
|
||||
this.textControl = new ControlText(panel, new IArea(4.0f, 4.0f, 92.0f, 44.0f), "", TextJustification.MiddleCenter);
|
||||
Panel panel = new Panel(this, 0.0f, 0.0f, 100.0f, 52.0f, MinecraftGUI.PanelType.Gray);
|
||||
textControl = new ControlText(panel, new IArea(4.0f, 4.0f, 92.0f, 44.0f), "", TextJustification.MiddleCenter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateClient() {
|
||||
super.onUpdateClient();
|
||||
final ItemStack stack = Machine.getMachine(Window.get(this).getInventory()).getMachineUtil().getStack(5);
|
||||
ItemStack stack = Machine.getMachine(Window.get(this).getInventory()).getMachineUtil().getStack(5);
|
||||
if (stack == null) {
|
||||
this.textControl.setValue("");
|
||||
textControl.setValue("");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
final Random rand = new Random(stack.getDisplayName().length());
|
||||
String text = "";
|
||||
final String[] codes = { "A", "T", "G", "C" };
|
||||
EnumChatFormatting[] colors = {
|
||||
EnumChatFormatting.GREEN,
|
||||
EnumChatFormatting.LIGHT_PURPLE,
|
||||
EnumChatFormatting.AQUA,
|
||||
EnumChatFormatting.RED
|
||||
};
|
||||
|
||||
for (int i = 0; i < 65; ++i) {
|
||||
final int k = rand.nextInt(4);
|
||||
final String code = codes[k];
|
||||
if (rand.nextFloat() < this.progress) {
|
||||
String col = colors[k].toString();
|
||||
text = text + EnumChatFormatting.RESET + col + EnumChatFormatting.BOLD + code;
|
||||
}
|
||||
else {
|
||||
text = text + EnumChatFormatting.RESET + EnumChatFormatting.GRAY
|
||||
+ EnumChatFormatting.OBFUSCATED + EnumChatFormatting.BOLD + code;
|
||||
}
|
||||
Random rand = new Random(stack.getDisplayName().length());
|
||||
StringBuilder text = new StringBuilder();
|
||||
String[] codes = {"A", "T", "G", "C"};
|
||||
EnumChatFormatting[] colors = {
|
||||
EnumChatFormatting.GREEN,
|
||||
EnumChatFormatting.LIGHT_PURPLE,
|
||||
EnumChatFormatting.AQUA,
|
||||
EnumChatFormatting.RED
|
||||
};
|
||||
|
||||
for (int i = 0; i < 65; ++i) {
|
||||
int k = rand.nextInt(4);
|
||||
String code = codes[k];
|
||||
if (rand.nextFloat() < progress) {
|
||||
String col = colors[k].toString();
|
||||
text.append(EnumChatFormatting.RESET)
|
||||
.append(col)
|
||||
.append(EnumChatFormatting.BOLD)
|
||||
.append(code);
|
||||
} else {
|
||||
text.append(EnumChatFormatting.RESET)
|
||||
.append(EnumChatFormatting.GRAY)
|
||||
.append(EnumChatFormatting.OBFUSCATED)
|
||||
.append(EnumChatFormatting.BOLD)
|
||||
.append(code);
|
||||
}
|
||||
this.textControl.setValue(text);
|
||||
}
|
||||
textControl.setValue(text.toString());
|
||||
}
|
||||
}
|
||||
@@ -1,54 +1,51 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.minecraft.control.ControlProgressBase;
|
||||
|
||||
public class ControlSplicerProgress extends ControlProgressBase
|
||||
{
|
||||
public class ControlSplicerProgress extends ControlProgressBase {
|
||||
float strength;
|
||||
|
||||
public ControlSplicerProgress(final IWidget parent, final float x, final float y, final float w, final float h) {
|
||||
public ControlSplicerProgress(IWidget parent, float x, float y, float w, float h) {
|
||||
super(parent, x, y, w, h);
|
||||
this.strength = 0.0f;
|
||||
this.strength = 0.0f;
|
||||
strength = 0.0f;
|
||||
strength = 0.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
final float progress = this.getProcess().getCurrentProgress() / 100.0f;
|
||||
final float n = this.getProcess().getProcessTime() / 12.0f;
|
||||
final float spacing = 10.0f;
|
||||
final float range = this.w();
|
||||
final float h = 8.0f;
|
||||
final float ooy = -((n - 1.0f) * spacing) - range / 2.0f;
|
||||
final float ddy = (n - 1.0f) * spacing + range;
|
||||
final float oy = ooy + ddy * progress;
|
||||
float progress = getProcess().getCurrentProgress() / 100.0f;
|
||||
float n = getProcess().getProcessTime() / 12.0f;
|
||||
float spacing = 10.0f;
|
||||
float range = w();
|
||||
float h = 8.0f;
|
||||
float ooy = -((n - 1.0f) * spacing) - range / 2.0f;
|
||||
float ddy = (n - 1.0f) * spacing + range;
|
||||
float oy = ooy + ddy * progress;
|
||||
|
||||
for (int i = 0; i < n; ++i) {
|
||||
final int seed = 432523;
|
||||
final int[] colours = { 10027008, 30464, 255, 10057472 };
|
||||
int seed = 432523;
|
||||
int[] colours = {0x990000, 0x007700, 0x0000ff, 0x997700};
|
||||
int c1 = colours[(int) Math.abs(13.0 * Math.sin(i) + 48.0 * Math.cos(i) + 25.0 * Math.sin(7 * i)) % 4];
|
||||
int c2 = colours[(int) Math.abs(23.0 * Math.sin(i) + 28.0 * Math.cos(i) + 15.0 * Math.sin(7 * i)) % 4];
|
||||
int c3 = colours[(int) Math.abs(43.0 * Math.sin(i) + 38.0 * Math.cos(i) + 55.0 * Math.sin(7 * i)) % 4];
|
||||
int c4 = colours[(int) Math.abs(3.0 * Math.sin(i) + 18.0 * Math.cos(i) + 35.0 * Math.sin(7 * i)) % 4];
|
||||
final float y = oy + i * spacing;
|
||||
float y = oy + i * spacing;
|
||||
|
||||
if (y > -range / 2.0f && y < range / 2.0f) {
|
||||
final float percentView = (float) Math.sqrt(1.0f - Math.abs(2.0f * y / range));
|
||||
final float offMovement = (this.h() - 2.0f * h) / 2.0f;
|
||||
final int alpha = 16777216 * (int) (255.0f * percentView);
|
||||
float percentView = (float) Math.sqrt(1.0f - Math.abs(2.0f * y / range));
|
||||
float offMovement = (h() - 2.0f * h) / 2.0f;
|
||||
int alpha = 16777216 * (int) (255.0f * percentView);
|
||||
c1 += alpha;
|
||||
c2 += alpha;
|
||||
c3 += alpha;
|
||||
c4 += alpha;
|
||||
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, offMovement * percentView, 4.0f, h / 2.0f), c1);
|
||||
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, offMovement * percentView + 4.0f, 4.0f, h / 2.0f), (y < 0.0f) ? c2 : c3);
|
||||
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, this.h() - offMovement * percentView - 8.0f, 4.0f, h / 2.0f), (y < 0.0f) ? c3 : c2);
|
||||
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, this.h() - offMovement * percentView - 4.0f, 4.0f, h / 2.0f), c4);
|
||||
CraftGUI.Render.solidAlpha(new IArea(w() / 2.0f + y, offMovement * percentView, 4.0f, h / 2.0f), c1);
|
||||
CraftGUI.Render.solidAlpha(new IArea(w() / 2.0f + y, offMovement * percentView + 4.0f, 4.0f, h / 2.0f), (y < 0.0f) ? c2 : c3);
|
||||
CraftGUI.Render.solidAlpha(new IArea(w() / 2.0f + y, h() - offMovement * percentView - 8.0f, 4.0f, h / 2.0f), (y < 0.0f) ? c3 : c2);
|
||||
CraftGUI.Render.solidAlpha(new IArea(w() / 2.0f + y, h() - offMovement * percentView - 4.0f, 4.0f, h / 2.0f), c4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +1,44 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.genetics.machine.Acclimatiser;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowAcclimatiser extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public static final int[] slotReserve;
|
||||
public static final int slotTarget = 4;
|
||||
public static final int[] slotAcclimatiser;
|
||||
public static final int[] slotDone;
|
||||
public class WindowAcclimatiser extends WindowMachine {
|
||||
public static int[] slotReserve = new int[]{0, 1, 2, 3};
|
||||
public static int slotTarget = 4;
|
||||
public static int[] slotAcclimatiser = new int[]{5, 6, 7};
|
||||
public static int[] slotDone = new int[]{8, 9, 10, 11};
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowAcclimatiser(player, inventory, side);
|
||||
protected static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public WindowAcclimatiser(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowAcclimatiser(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowAcclimatiser(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Acclimatiser");
|
||||
setTitle("Acclimatiser");
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.slotReserve);
|
||||
x += 54;
|
||||
new ControlSlot(this, x + 18, y).assign(4);
|
||||
@@ -68,12 +64,4 @@ public class WindowAcclimatiser extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Acclimatiser";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowAcclimatiser.ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
WindowAcclimatiser.Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
slotReserve = new int[] { 0, 1, 2, 3 };
|
||||
slotAcclimatiser = new int[] { 5, 6, 7 };
|
||||
slotDone = new int[] { 8, 9, 10, 11 };
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,39 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.MinecraftGUI;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlProgress;
|
||||
import binnie.core.craftgui.minecraft.MinecraftGUI;
|
||||
import binnie.core.craftgui.window.Panel;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.genetics.machine.Analyser;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.core.craftgui.window.Panel;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Analyser;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowAnalyser extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowAnalyser extends WindowMachine {
|
||||
protected static Texture ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowAnalyser(player, inventory, side);
|
||||
public WindowAnalyser(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(220, 210, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowAnalyser(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(220, 210, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowAnalyser(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +41,7 @@ public class WindowAnalyser extends WindowMachine
|
||||
WindowAnalyser.ProgressBase = new StandardTexture(0, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
WindowAnalyser.Progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.slotReserve);
|
||||
x += 28;
|
||||
new ControlSlot(this, x, y + 54 + 8).assign(13);
|
||||
@@ -63,7 +58,7 @@ public class WindowAnalyser extends WindowMachine
|
||||
x += 96;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.slotFinished);
|
||||
x += 52;
|
||||
this.setTitle("Analyser");
|
||||
setTitle("Analyser");
|
||||
new ControlPlayerInventory(this);
|
||||
}
|
||||
|
||||
@@ -81,9 +76,4 @@ public class WindowAnalyser extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Analyser";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowAnalyser.ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
WindowAnalyser.Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.Binnie;
|
||||
@@ -42,93 +38,98 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class WindowGeneBank extends WindowMachine
|
||||
{
|
||||
public class WindowGeneBank extends WindowMachine {
|
||||
public static IIcon[] iconsDNA;
|
||||
public boolean isNei;
|
||||
ControlGeneScroll genes;
|
||||
|
||||
@Override
|
||||
public void recieveGuiNBT(final Side side, final EntityPlayer player, final String name, final NBTTagCompound nbt) {
|
||||
super.recieveGuiNBT(side, player, name, nbt);
|
||||
if (side == Side.SERVER && name.equals("gene-select")) {
|
||||
final Gene gene = new Gene(nbt.getCompoundTag("gene"));
|
||||
if (gene != null && !gene.isCorrupted()) {
|
||||
final ItemStack held = this.getHeldItemStack();
|
||||
final ItemStack converted = Engineering.addGene(held, gene);
|
||||
this.getPlayer().inventory.setItemStack(converted);
|
||||
this.getPlayer().inventory.markDirty();
|
||||
if (this.getPlayer() instanceof EntityPlayerMP) {
|
||||
((EntityPlayerMP) this.getPlayer()).sendContainerToPlayer(player.inventoryContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected ControlGeneScroll genes;
|
||||
|
||||
public WindowGeneBank(EntityPlayer player, IInventory inventory, Side side, boolean isNEI) {
|
||||
super(320, 224, player, inventory, side);
|
||||
isNei = isNEI;
|
||||
}
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowGeneBank(player, inventory, side, false);
|
||||
}
|
||||
|
||||
public WindowGeneBank(final EntityPlayer player, final IInventory inventory, final Side side, final boolean isNEI) {
|
||||
super(320, 224, player, inventory, side);
|
||||
this.isNei = isNEI;
|
||||
@Override
|
||||
public void recieveGuiNBT(Side side, EntityPlayer player, String name, NBTTagCompound nbt) {
|
||||
super.recieveGuiNBT(side, player, name, nbt);
|
||||
if (side != Side.SERVER || !name.equals("gene-select")) {
|
||||
return;
|
||||
}
|
||||
|
||||
Gene gene = new Gene(nbt.getCompoundTag("gene"));
|
||||
if (gene.isCorrupted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack held = getHeldItemStack();
|
||||
ItemStack converted = Engineering.addGene(held, gene);
|
||||
getPlayer().inventory.setItemStack(converted);
|
||||
getPlayer().inventory.markDirty();
|
||||
if (getPlayer() instanceof EntityPlayerMP) {
|
||||
((EntityPlayerMP) getPlayer()).sendContainerToPlayer(player.inventoryContainer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseServer() {
|
||||
final GeneTracker tracker = GeneTracker.getTracker(this.getWorld(), this.getUsername());
|
||||
GeneTracker tracker = GeneTracker.getTracker(getWorld(), getUsername());
|
||||
if (tracker != null) {
|
||||
tracker.synchToPlayer(this.getPlayer());
|
||||
tracker.synchToPlayer(getPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Gene Bank");
|
||||
this.addEventHandler(new EventValueChanged.Handler() {
|
||||
setTitle("Gene Bank");
|
||||
addEventHandler(new EventValueChanged.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventValueChanged event) {
|
||||
public void onEvent(EventValueChanged event) {
|
||||
if (event.value instanceof BreedingSystem) {
|
||||
WindowGeneBank.this.genes.setValue((BreedingSystem) event.value);
|
||||
genes.setValue((BreedingSystem) event.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
int boxX = 100;
|
||||
|
||||
int boxX;
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlPlayerInventory(this, x, y);
|
||||
x += 124;
|
||||
boxX = x;
|
||||
final int geneBoxWidth = 120;
|
||||
int geneBoxWidth = 120;
|
||||
new Panel(this, boxX + 24, 32.0f, geneBoxWidth, 120.0f, MinecraftGUI.PanelType.Black);
|
||||
new Panel(this, boxX + 24 + geneBoxWidth, 32.0f, 14.0f, 120.0f, MinecraftGUI.PanelType.Gray);
|
||||
final ControlScrollableContent scroll = new ControlScrollableContent(this, boxX + 24 + 2, 34.0f, geneBoxWidth + 10, 116.0f, 12.0f);
|
||||
final ControlTextEdit edit = new ControlTextEdit(this, boxX + 27 + geneBoxWidth - 70, 18.0f, 80.0f, 12.0f);
|
||||
this.addEventHandler(new EventTextEdit.Handler() {
|
||||
ControlScrollableContent scroll = new ControlScrollableContent(this, boxX + 24 + 2, 34.0f, geneBoxWidth + 10, 116.0f, 12.0f);
|
||||
ControlTextEdit edit = new ControlTextEdit(this, boxX + 27 + geneBoxWidth - 70, 18.0f, 80.0f, 12.0f);
|
||||
addEventHandler(new EventTextEdit.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventTextEdit event) {
|
||||
WindowGeneBank.this.genes.setFilter(event.getValue());
|
||||
public void onEvent(EventTextEdit event) {
|
||||
genes.setFilter(event.getValue());
|
||||
}
|
||||
}.setOrigin(EventHandler.Origin.Self, edit));
|
||||
scroll.setScrollableContent(this.genes = new ControlGeneScroll(scroll, 1.0f, 1.0f, geneBoxWidth, 116.0f));
|
||||
this.genes.setGenes(Binnie.Genetics.beeBreedingSystem);
|
||||
final ControlTabBar<BreedingSystem> tabBar = new ControlTabBar<BreedingSystem>(this, boxX, 32.0f, 24.0f, 120.0f, Position.Left) {
|
||||
scroll.setScrollableContent(genes = new ControlGeneScroll(scroll, 1.0f, 1.0f, geneBoxWidth, 116.0f));
|
||||
genes.setGenes(Binnie.Genetics.beeBreedingSystem);
|
||||
ControlTabBar<BreedingSystem> tabBar = new ControlTabBar<BreedingSystem>(this, boxX, 32.0f, 24.0f, 120.0f, Position.Left) {
|
||||
@Override
|
||||
public ControlTab<BreedingSystem> createTab(final float x, final float y, final float w, final float h, final BreedingSystem value) {
|
||||
public ControlTab<BreedingSystem> createTab(float x, float y, float w, float h, BreedingSystem value) {
|
||||
return new ControlTabIcon<BreedingSystem>(this, x, y, w, h, value) {
|
||||
@Override
|
||||
public void getTooltip(final Tooltip tooltip) {
|
||||
tooltip.add(this.getValue().toString());
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
tooltip.add(getValue().toString());
|
||||
int totalGenes = 0;
|
||||
int seqGenes = 0;
|
||||
final GeneTracker tracker = GeneTracker.getTracker(WindowGeneBank.this.getWorld(), WindowGeneBank.this.getUsername());
|
||||
final Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(this.getValue().getSpeciesRoot());
|
||||
for (final Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
|
||||
GeneTracker tracker = GeneTracker.getTracker(getWorld(), getUsername());
|
||||
Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(getValue().getSpeciesRoot());
|
||||
for (Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
|
||||
totalGenes += entry.getValue().size();
|
||||
for (final IAllele allele : entry.getValue()) {
|
||||
final Gene gene = new Gene(allele, entry.getKey(), this.getValue().getSpeciesRoot());
|
||||
for (IAllele allele : entry.getValue()) {
|
||||
Gene gene = new Gene(allele, entry.getKey(), getValue().getSpeciesRoot());
|
||||
if (tracker.isSequenced(gene)) {
|
||||
++seqGenes;
|
||||
seqGenes++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,28 +138,31 @@ public class WindowGeneBank extends WindowMachine
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
tabBar.setValues(Binnie.Genetics.getActiveSystems());
|
||||
tabBar.setValue(Binnie.Genetics.beeBreedingSystem);
|
||||
boxX -= 8;
|
||||
final ControlTabBar<String> infoTabs = new ControlTabBar<String>(this, boxX + 8, 160.0f, 16.0f, 50.0f, Position.Left);
|
||||
ControlTabBar<String> infoTabs = new ControlTabBar<String>(this, boxX + 8, 160.0f, 16.0f, 50.0f, Position.Left);
|
||||
infoTabs.setValues(Arrays.asList("Stats", "Ranking"));
|
||||
infoTabs.setValue("Info");
|
||||
final Panel panelProject = new Panel(this, boxX + 24, 160.0f, geneBoxWidth + 20, 50.0f, MinecraftGUI.PanelType.Black);
|
||||
Panel panelProject = new Panel(this, boxX + 24, 160.0f, geneBoxWidth + 20, 50.0f, MinecraftGUI.PanelType.Black);
|
||||
int totalGenes = 0;
|
||||
int seqGenes = 0;
|
||||
for (final BreedingSystem system : Binnie.Genetics.getActiveSystems()) {
|
||||
final GeneTracker tracker = GeneTracker.getTracker(this.getWorld(), this.getUsername());
|
||||
final Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(system.getSpeciesRoot());
|
||||
for (final Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
|
||||
|
||||
for (BreedingSystem system : Binnie.Genetics.getActiveSystems()) {
|
||||
GeneTracker tracker = GeneTracker.getTracker(getWorld(), getUsername());
|
||||
Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(system.getSpeciesRoot());
|
||||
for (Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
|
||||
totalGenes += entry.getValue().size();
|
||||
for (final IAllele allele : entry.getValue()) {
|
||||
final Gene gene = new Gene(allele, entry.getKey(), system.getSpeciesRoot());
|
||||
for (IAllele allele : entry.getValue()) {
|
||||
Gene gene = new Gene(allele, entry.getKey(), system.getSpeciesRoot());
|
||||
if (tracker.isSequenced(gene)) {
|
||||
++seqGenes;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new ControlText(panelProject, new IPoint(4.0f, 4.0f), EnumChatFormatting.UNDERLINE + "Full Genome Project");
|
||||
new ControlText(panelProject, new IPoint(4.0f, 18.0f), EnumChatFormatting.ITALIC.toString() + EnumChatFormatting.YELLOW + "quenced " + EnumChatFormatting.RESET + seqGenes + "/" + totalGenes + " " + EnumChatFormatting.ITALIC + "Genes");
|
||||
}
|
||||
@@ -177,20 +181,4 @@ public class WindowGeneBank extends WindowMachine
|
||||
protected String getName() {
|
||||
return "GeneBank";
|
||||
}
|
||||
|
||||
public static class ChromosomeType
|
||||
{
|
||||
IChromosomeType chromosome;
|
||||
BreedingSystem system;
|
||||
|
||||
public ChromosomeType(final IChromosomeType chromosome, final BreedingSystem system) {
|
||||
this.chromosome = chromosome;
|
||||
this.system = system;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.system.getChromosomeName(this.chromosome);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,12 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowGeneBankNEI
|
||||
{
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
public class WindowGeneBankNEI {
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowGeneBank(player, inventory, side, true);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,14 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.genetics.Genetics;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowGeneProject extends Window
|
||||
{
|
||||
// TODO unused class?
|
||||
public class WindowGeneProject extends Window {
|
||||
public WindowGeneProject(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(100.0f, 100.0f, player, inventory, side);
|
||||
}
|
||||
@@ -29,6 +25,6 @@ public class WindowGeneProject extends Window
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Gene Projects");
|
||||
setTitle("Gene Projects");
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,44 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.genetics.machine.Genepool;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowGenepool extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowGenepool extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowGenepool(player, inventory, side);
|
||||
public WindowGenepool(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowGenepool(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowGenepool(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Genepool");
|
||||
setTitle("Genepool");
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(1);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Genepool.slotReserve);
|
||||
@@ -76,9 +71,4 @@ public class WindowGenepool extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Genepool";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowGenepool.ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
WindowGenepool.Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,20 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.genetics.Genetics;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowGenomeAssembler extends WindowMachine
|
||||
{
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowGenomeAssembler(player, inventory, side);
|
||||
// TODO unused class?
|
||||
public class WindowGenomeAssembler extends WindowMachine {
|
||||
public WindowGenomeAssembler(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(320, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowGenomeAssembler(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(320, 240, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowGenomeAssembler(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,48 +1,43 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.genetics.machine.Incubator;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Incubator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowIncubator extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowIncubator extends WindowMachine {
|
||||
protected static Texture ProgressBase = new StandardTexture(0, 91, 38, 32, GeneticsTexture.GUIProcess);
|
||||
protected static Texture Progress = new StandardTexture(38, 91, 38, 32, GeneticsTexture.GUIProcess);
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowIncubator(player, inventory, side);
|
||||
public WindowIncubator(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(228, 196, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowIncubator(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(228, 196, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowIncubator(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Incubator");
|
||||
setTitle("Incubator");
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(0);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.slotQueue);
|
||||
@@ -77,9 +72,4 @@ public class WindowIncubator extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Incubator";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowIncubator.ProgressBase = new StandardTexture(0, 91, 38, 32, GeneticsTexture.GUIProcess);
|
||||
WindowIncubator.Progress = new StandardTexture(38, 91, 38, 32, GeneticsTexture.GUIProcess);
|
||||
}
|
||||
}
|
||||
@@ -1,50 +1,45 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.geometry.CraftGUIUtil;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.genetics.machine.Inoculator;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Inoculator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowInoculator extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowInoculator extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowInoculator(player, inventory, side);
|
||||
public WindowInoculator(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(266, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowInoculator(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(266, 240, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowInoculator(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Inoculator");
|
||||
setTitle("Inoculator");
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y + 18 + 16).setTankID(0);
|
||||
CraftGUIUtil.horizontalGrid(x, y, new ControlSlotArray(this, 0, 0, 2, 1).create(Inoculator.slotSerumReserve), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(0), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlotArray(this, 0, 0, 2, 1).create(Inoculator.slotSerumExpended));
|
||||
x += 18;
|
||||
@@ -72,9 +67,4 @@ public class WindowInoculator extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Inoculator";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowInoculator.ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
WindowInoculator.Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,44 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.genetics.machine.Isolator;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowIsolator extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowIsolator extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowIsolator(player, inventory, side);
|
||||
public WindowIsolator(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(330, 208, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowIsolator(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(330, 208, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowIsolator(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Isolator");
|
||||
setTitle("Isolator");
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(0);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Isolator.slotReserve);
|
||||
@@ -82,9 +77,4 @@ public class WindowIsolator extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Isolator";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowIsolator.ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
WindowIsolator.Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,12 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public abstract class WindowMachine extends Window
|
||||
{
|
||||
public WindowMachine(final int width, final int height, final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
public abstract class WindowMachine extends Window {
|
||||
public WindowMachine(int width, int height, EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(width, height, player, inventory, side);
|
||||
}
|
||||
|
||||
@@ -19,6 +14,6 @@ public abstract class WindowMachine extends Window
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle(this.getTitle());
|
||||
setTitle(getTitle());
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,47 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.genetics.machine.Polymeriser;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Polymeriser;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowPolymeriser extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowPolymeriser extends WindowMachine {
|
||||
protected static Texture ProgressBase = new StandardTexture(76, 170, 160, 79, GeneticsTexture.GUIProcess.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(76, 91, 160, 79, GeneticsTexture.GUIProcess.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowPolymeriser(player, inventory, side);
|
||||
static {
|
||||
}
|
||||
|
||||
public WindowPolymeriser(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
public WindowPolymeriser(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(278, 212, player, inventory, side);
|
||||
}
|
||||
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowPolymeriser(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
final int y = 38;
|
||||
int y = 38;
|
||||
new ControlSlotArray(this, x, y, 1, 4).create(Polymeriser.slotSerumReserve);
|
||||
new ControlIconDisplay(this, x + 18, y + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 34;
|
||||
@@ -57,7 +55,7 @@ public class WindowPolymeriser extends WindowMachine
|
||||
new ControlSlotCharge(this, x + 30 + 20, y + 18 + 8, 1).setColor(16766976);
|
||||
x += 138;
|
||||
new ControlSlotArray(this, x, y + 9, 2, 2).create(Polymeriser.slotSerumFinished);
|
||||
final ControlErrorState errorState = new ControlErrorState(this, 244.0f, 97.0f);
|
||||
ControlErrorState errorState = new ControlErrorState(this, 244.0f, 97.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
}
|
||||
|
||||
@@ -75,9 +73,4 @@ public class WindowPolymeriser extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Polymeriser";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowPolymeriser.ProgressBase = new StandardTexture(76, 170, 160, 79, GeneticsTexture.GUIProcess.getTexture());
|
||||
WindowPolymeriser.Progress = new StandardTexture(76, 91, 160, 79, GeneticsTexture.GUIProcess.getTexture());
|
||||
}
|
||||
}
|
||||
@@ -1,77 +1,73 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.craftgui.geometry.CraftGUIUtil;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.geometry.CraftGUIUtil;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.genetics.machine.Sequencer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class WindowSequencer extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
ControlText slotText;
|
||||
public class WindowSequencer extends WindowMachine {
|
||||
protected static Texture ProgressBase = new StandardTexture(64, 114, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(64, 123, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowSequencer(player, inventory, side);
|
||||
}
|
||||
protected ControlText slotText;
|
||||
|
||||
public WindowSequencer(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
public WindowSequencer(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(226, 224, player, inventory, side);
|
||||
}
|
||||
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowSequencer(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recieveGuiNBT(final Side side, final EntityPlayer player, final String name, final NBTTagCompound nbt) {
|
||||
public void recieveGuiNBT(Side side, EntityPlayer player, String name, NBTTagCompound nbt) {
|
||||
if (side == Side.CLIENT && name.equals("username")) {
|
||||
this.slotText.setValue(EnumChatFormatting.DARK_GRAY + "Genes will be sequenced by " + nbt.getString("username"));
|
||||
slotText.setValue(EnumChatFormatting.DARK_GRAY + "Genes will be sequenced by " + nbt.getString("username"));
|
||||
}
|
||||
super.recieveGuiNBT(side, player, name, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Sequencer");
|
||||
setTitle("Sequencer");
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
CraftGUIUtil.horizontalGrid(x, y, TextJustification.MiddleCenter, 2.0f, new ControlSlotArray(this, 0, 0, 2, 2).create(Sequencer.slotReserve), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSequencerProgress(this, 0, 0), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(6));
|
||||
final ControlSlot slotTarget = new ControlSlot(this, x + 96, y + 16);
|
||||
ControlSlot slotTarget = new ControlSlot(this, x + 96, y + 16);
|
||||
slotTarget.assign(5);
|
||||
x = 34;
|
||||
y = 92;
|
||||
this.slotText = new ControlText(this, new IArea(0.0f, y, this.w(), 12.0f), EnumChatFormatting.DARK_GRAY + "Userless. Will not save sequences", TextJustification.MiddleCenter);
|
||||
slotText = new ControlText(this, new IArea(0.0f, y, w(), 12.0f), EnumChatFormatting.DARK_GRAY + "Userless. Will not save sequences", TextJustification.MiddleCenter);
|
||||
y += 20;
|
||||
final ControlSlot slotDye = new ControlSlot(this, x, y);
|
||||
ControlSlot slotDye = new ControlSlot(this, x, y);
|
||||
slotDye.assign(0);
|
||||
x += 20;
|
||||
new ControlSlotCharge(this, x, y, 0).setColor(16750848);
|
||||
x += 32;
|
||||
new ControlEnergyBar(this, x, y, 60, 16, Position.Left);
|
||||
x += 92;
|
||||
final ControlErrorState errorState = new ControlErrorState(this, x, y + 1);
|
||||
ControlErrorState errorState = new ControlErrorState(this, x, y + 1);
|
||||
new ControlPlayerInventory(this);
|
||||
}
|
||||
|
||||
@@ -89,9 +85,4 @@ public class WindowSequencer extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Sequencer";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowSequencer.ProgressBase = new StandardTexture(64, 114, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
WindowSequencer.Progress = new StandardTexture(64, 123, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
}
|
||||
}
|
||||
@@ -1,56 +1,50 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.genetics.machine.Inoculator;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.geometry.CraftGUIUtil;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.GUIIcon;
|
||||
import binnie.genetics.machine.Splicer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
import binnie.core.craftgui.minecraft.control.ControlIconDisplay;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Inoculator;
|
||||
import binnie.genetics.machine.Splicer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowSplicer extends WindowMachine
|
||||
{
|
||||
static Texture ProgressBase;
|
||||
static Texture Progress;
|
||||
public class WindowSplicer extends WindowMachine {
|
||||
protected static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowSplicer(player, inventory, side);
|
||||
public WindowSplicer(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(280, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
public WindowSplicer(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(280, 240, player, inventory, side);
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowSplicer(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Splicer");
|
||||
setTitle("Splicer");
|
||||
int x = 16;
|
||||
new ControlSplicerProgress(this, 84.0f, 32.0f, this.w() - 172.0f, 102.0f);
|
||||
new ControlSplicerProgress(this, 84.0f, 32.0f, w() - 172.0f, 102.0f);
|
||||
CraftGUIUtil.horizontalGrid(x, 62.0f, new ControlSlotArray(this, 0, 0, 2, 1).create(Splicer.slotSerumReserve), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(0));
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1).create(Splicer.slotSerumExpended);
|
||||
new ControlIconDisplay(this, x + 12 + 36 + 4, 86.0f, GUIIcon.ArrowUpLeft.getIcon());
|
||||
new ControlEnergyBar(this, 196, 64, 60, 16, Position.Left);
|
||||
new ControlErrorState(this, 218.0f, 86.0f);
|
||||
x += 142;
|
||||
CraftGUIUtil.verticalGrid((this.w() - 72.0f) / 2.0f, 32.0f, TextJustification.MiddleCenter, 4.0f, new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.slotReserve), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(9), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()), new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.slotFinished));
|
||||
CraftGUIUtil.verticalGrid((w() - 72.0f) / 2.0f, 32.0f, TextJustification.MiddleCenter, 4.0f, new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.slotReserve), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(9), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()), new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.slotFinished));
|
||||
new ControlPlayerInventory(this);
|
||||
}
|
||||
|
||||
@@ -68,9 +62,4 @@ public class WindowSplicer extends WindowMachine
|
||||
protected String getName() {
|
||||
return "Inoculator";
|
||||
}
|
||||
|
||||
static {
|
||||
WindowSplicer.ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
WindowSplicer.Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user