aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/craftgui
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/binnie/craftgui')
-rw-r--r--src/Java/binnie/craftgui/botany/ControlColourDisplay.java47
-rw-r--r--src/Java/binnie/craftgui/botany/ControlColourMixBox.java31
-rw-r--r--src/Java/binnie/craftgui/botany/ControlColourMixItem.java37
-rw-r--r--src/Java/binnie/craftgui/botany/ControlColourMixSymbol.java58
-rw-r--r--src/Java/binnie/craftgui/botany/ControlColourOption.java38
-rw-r--r--src/Java/binnie/craftgui/botany/PageColourMix.java40
-rw-r--r--src/Java/binnie/craftgui/botany/PageColourMixResultant.java40
-rw-r--r--src/Java/binnie/craftgui/botany/PageSpeciesFlowerGenome.java137
-rw-r--r--src/Java/binnie/craftgui/botany/WindowBotanistDatabase.java103
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlBlockIconDisplay.java25
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlBreweryProgress.java115
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlDistilleryProgress.java104
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlFruitPressProgress.java90
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlLumbermillProgress.java96
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlRecipeSlot.java42
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/ControlTileSelect.java197
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/DialogBreweryRecipe.java17
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/PageFruit.java47
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksOverview.java103
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksTrees.java40
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesImage.java31
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesTreeGenome.java175
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/PageWood.java40
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowArboristDatabase.java133
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowBrewery.java61
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowDistillery.java59
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowLepidopteristDatabase.java57
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowLumbermill.java56
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowPress.java77
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowSetSquare.java35
-rw-r--r--src/Java/binnie/craftgui/extratrees/dictionary/WindowWoodworker.java110
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/ControlDropDownMenu.java18
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/ControlDropdownButton.java36
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/ControlFluidDisplay.java103
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotFluid.java77
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotGlassware.java35
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/ControlTankSlot.java49
-rw-r--r--src/Java/binnie/craftgui/extratrees/kitchen/WindowBottleRack.java48
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/ControlGene.java101
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/ControlGeneScroll.java97
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/ControlProcessTemporary.java27
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/ControlSequencerProgress.java64
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/ControlSplicerProgress.java60
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowAcclimatiser.java80
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowAnalyser.java110
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowGeneBank.java256
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowGeneBankNEI.java14
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowGeneProject.java32
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowGenepool.java96
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowGenomeAssembler.java37
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowIncubator.java99
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowInoculator.java107
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowIsolator.java116
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowMachine.java22
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowPolymeriser.java101
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java116
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowSplicer.java93
57 files changed, 0 insertions, 4235 deletions
diff --git a/src/Java/binnie/craftgui/botany/ControlColourDisplay.java b/src/Java/binnie/craftgui/botany/ControlColourDisplay.java
deleted file mode 100644
index 21408ec4ad..0000000000
--- a/src/Java/binnie/craftgui/botany/ControlColourDisplay.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IFlowerColour;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.controls.core.IControlValue;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.ITooltip;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.renderer.Renderer;
-
-public class ControlColourDisplay
- extends Control
- implements IControlValue<IFlowerColour>, ITooltip
-{
- IFlowerColour value;
-
- public ControlColourDisplay(IWidget parent, float x, float y)
- {
- super(parent, x, y, 16.0F, 16.0F);
- addAttribute(Attribute.MouseOver);
- }
-
- public IFlowerColour getValue()
- {
- return this.value;
- }
-
- public void setValue(IFlowerColour value)
- {
- this.value = value;
- }
-
- public void onRenderBackground()
- {
- CraftGUI.Render.solid(getArea(), -1);
- CraftGUI.Render.solid(getArea().inset(1), -16777216 + getValue().getColor(false));
- }
-
- public void getTooltip(Tooltip tooltip)
- {
- super.getTooltip(tooltip);
- tooltip.add(this.value.getName());
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/ControlColourMixBox.java b/src/Java/binnie/craftgui/botany/ControlColourMixBox.java
deleted file mode 100644
index 7ca4fa98f2..0000000000
--- a/src/Java/binnie/craftgui/botany/ControlColourMixBox.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IColourMix;
-import binnie.craftgui.controls.listbox.ControlList;
-import binnie.craftgui.controls.listbox.ControlListBox;
-import binnie.craftgui.core.IWidget;
-
-public class ControlColourMixBox
- extends ControlListBox<IColourMix>
-{
- private int index;
- private Type type;
-
- public IWidget createOption(IColourMix value, int y)
- {
- return new ControlColourMixItem((ControlList)getContent(), value, y);
- }
-
- static enum Type
- {
- Resultant, Further;
-
- private Type() {}
- }
-
- public ControlColourMixBox(IWidget parent, int x, int y, int width, int height, Type type)
- {
- super(parent, x, y, width, height, 12.0F);
- this.type = type;
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/ControlColourMixItem.java b/src/Java/binnie/craftgui/botany/ControlColourMixItem.java
deleted file mode 100644
index cf519b9a8e..0000000000
--- a/src/Java/binnie/craftgui/botany/ControlColourMixItem.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IColourMix;
-import binnie.core.genetics.BreedingSystem;
-import binnie.craftgui.controls.listbox.ControlList;
-import binnie.craftgui.controls.listbox.ControlOption;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-
-public class ControlColourMixItem
- extends ControlOption<IColourMix>
-{
- ControlColourDisplay itemWidget1;
- ControlColourDisplay itemWidget2;
- ControlColourDisplay itemWidget3;
- ControlColourMixSymbol addSymbol;
- ControlColourMixSymbol arrowSymbol;
-
- public ControlColourMixItem(ControlList<IColourMix> controlList, IColourMix option, int y)
- {
- super(controlList, option, y);
- this.itemWidget1 = new ControlColourDisplay(this, 4.0F, 4.0F);
- this.itemWidget2 = new ControlColourDisplay(this, 44.0F, 4.0F);
- this.itemWidget3 = new ControlColourDisplay(this, 104.0F, 4.0F);
- this.addSymbol = new ControlColourMixSymbol(this, 24, 4, 0);
- this.arrowSymbol = new ControlColourMixSymbol(this, 64, 4, 1);
-
- BreedingSystem system = ((WindowAbstractDatabase)getSuperParent()).getBreedingSystem();
- if (getValue() != null)
- {
- this.itemWidget1.setValue(((IColourMix)getValue()).getColour1());
- this.itemWidget2.setValue(((IColourMix)getValue()).getColour2());
- this.itemWidget3.setValue(((IColourMix)getValue()).getResult());
- this.addSymbol.setValue((IColourMix)getValue());
- this.arrowSymbol.setValue((IColourMix)getValue());
- }
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/ControlColourMixSymbol.java b/src/Java/binnie/craftgui/botany/ControlColourMixSymbol.java
deleted file mode 100644
index 5afb98d54f..0000000000
--- a/src/Java/binnie/craftgui/botany/ControlColourMixSymbol.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IColourMix;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.ITooltip;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.CraftGUITextureSheet;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-
-public class ControlColourMixSymbol
- extends Control
- implements ITooltip
-{
- static Texture MutationPlus = new StandardTexture(2, 94, 16, 16, CraftGUITextureSheet.Controls2);
- static Texture MutationArrow = new StandardTexture(20, 94, 32, 16, CraftGUITextureSheet.Controls2);
- IColourMix value;
- int type;
-
- public void onRenderBackground()
- {
- super.onRenderBackground();
- if (this.type == 0) {
- CraftGUI.Render.texture(MutationPlus, IPoint.ZERO);
- } else {
- CraftGUI.Render.texture(MutationArrow, IPoint.ZERO);
- }
- }
-
- protected ControlColourMixSymbol(IWidget parent, int x, int y, int type)
- {
- super(parent, x, y, 16 + type * 16, 16.0F);
- this.value = null;
- this.type = type;
- addAttribute(Attribute.MouseOver);
- }
-
- public void setValue(IColourMix value)
- {
- this.value = value;
-
- setColour(16777215);
- }
-
- public void getTooltip(Tooltip tooltip)
- {
- if (this.type == 1)
- {
- float chance = this.value.getChance();
- tooltip.add("Current Chance - " + chance + "%");
- }
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/ControlColourOption.java b/src/Java/binnie/craftgui/botany/ControlColourOption.java
deleted file mode 100644
index 0a94e5690f..0000000000
--- a/src/Java/binnie/craftgui/botany/ControlColourOption.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IFlowerColour;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.listbox.ControlList;
-import binnie.craftgui.controls.listbox.ControlTextOption;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.geometry.CraftGUIUtil;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-
-public class ControlColourOption
- extends ControlTextOption<IFlowerColour>
-{
- ControlColourDisplay controlBee;
- IPoint boxPosition;
-
- public ControlColourOption(ControlList<IFlowerColour> controlList, IFlowerColour option, int y)
- {
- super(controlList, option, option.getName(), y);
- setSize(new IPoint(getSize().x(), 20.0F));
-
- this.controlBee = new ControlColourDisplay(this, 2.0F, 2.0F);
- this.controlBee.setValue(option);
-
- addAttribute(Attribute.MouseOver);
-
- CraftGUIUtil.moveWidget(this.textWidget, new IPoint(22.0F, 0.0F));
- this.textWidget.setSize(this.textWidget.getSize().sub(new IPoint(24.0F, 0.0F)));
-
- int th = (int)CraftGUI.Render.textHeight(this.textWidget.getValue(), this.textWidget.getSize().x());
- int height = Math.max(20, th + 6);
- setSize(new IPoint(size().x(), height));
- this.textWidget.setSize(new IPoint(this.textWidget.getSize().x(), height));
- this.boxPosition = new IPoint(2.0F, (height - 18) / 2);
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/PageColourMix.java b/src/Java/binnie/craftgui/botany/PageColourMix.java
deleted file mode 100644
index 5fc7e335db..0000000000
--- a/src/Java/binnie/craftgui/botany/PageColourMix.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IColourMix;
-import binnie.botany.api.IFlowerColour;
-import binnie.botany.api.IFlowerRoot;
-import binnie.botany.core.BotanyCore;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.ControlTextCentered;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageAbstract;
-import java.util.ArrayList;
-import java.util.List;
-
-public class PageColourMix
- extends PageAbstract<IFlowerColour>
-{
- ControlText pageSpeciesFurther_Title;
- ControlColourMixBox pageSpeciesFurther_List;
-
- public PageColourMix(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
-
- this.pageSpeciesFurther_Title = new ControlTextCentered(this, 8.0F, "Further Mixes");
-
- this.pageSpeciesFurther_List = new ControlColourMixBox(this, 4, 20, 136, 152, ControlColourMixBox.Type.Further);
- }
-
- public void onValueChanged(IFlowerColour colour)
- {
- List<IColourMix> mixes = new ArrayList();
- for (IColourMix mix : BotanyCore.getFlowerRoot().getColourMixes(false)) {
- if ((mix.getColour1() == colour) || (mix.getColour2() == colour)) {
- mixes.add(mix);
- }
- }
- this.pageSpeciesFurther_List.setOptions(mixes);
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/PageColourMixResultant.java b/src/Java/binnie/craftgui/botany/PageColourMixResultant.java
deleted file mode 100644
index a8a50f2cb7..0000000000
--- a/src/Java/binnie/craftgui/botany/PageColourMixResultant.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.botany.api.IColourMix;
-import binnie.botany.api.IFlowerColour;
-import binnie.botany.api.IFlowerRoot;
-import binnie.botany.core.BotanyCore;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.ControlTextCentered;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageAbstract;
-import java.util.ArrayList;
-import java.util.List;
-
-public class PageColourMixResultant
- extends PageAbstract<IFlowerColour>
-{
- ControlText pageSpeciesFurther_Title;
- ControlColourMixBox pageSpeciesFurther_List;
-
- public PageColourMixResultant(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
-
- this.pageSpeciesFurther_Title = new ControlTextCentered(this, 8.0F, "Resultant Mixes");
-
- this.pageSpeciesFurther_List = new ControlColourMixBox(this, 4, 20, 136, 152, ControlColourMixBox.Type.Resultant);
- }
-
- public void onValueChanged(IFlowerColour colour)
- {
- List<IColourMix> mixes = new ArrayList();
- for (IColourMix mix : BotanyCore.getFlowerRoot().getColourMixes(false)) {
- if (mix.getResult() == colour) {
- mixes.add(mix);
- }
- }
- this.pageSpeciesFurther_List.setOptions(mixes);
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/PageSpeciesFlowerGenome.java b/src/Java/binnie/craftgui/botany/PageSpeciesFlowerGenome.java
deleted file mode 100644
index dece27f306..0000000000
--- a/src/Java/binnie/craftgui/botany/PageSpeciesFlowerGenome.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.Binnie;
-import binnie.botany.api.EnumFlowerChromosome;
-import binnie.botany.api.EnumFlowerStage;
-import binnie.botany.api.IAlleleFlowerSpecies;
-import binnie.botany.api.IFlower;
-import binnie.botany.api.IFlowerGenome;
-import binnie.botany.api.IFlowerRoot;
-import binnie.botany.core.BotanyCore;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.core.language.ManagerLanguage;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.controls.scroll.ControlScrollableContent;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.minecraft.control.ControlItemDisplay;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageSpecies;
-import forestry.api.core.EnumTemperature;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IAlleleSpecies;
-import forestry.api.genetics.IGenome;
-import forestry.api.genetics.IIndividual;
-import net.minecraft.item.ItemStack;
-
-public class PageSpeciesFlowerGenome
- extends PageSpecies
-{
- public PageSpeciesFlowerGenome(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
- }
-
- public void onValueChanged(IAlleleSpecies species)
- {
- deleteAllChildren();
- IAllele[] template = Binnie.Genetics.getFlowerRoot().getTemplate(species.getUID());
- if (template == null) {
- return;
- }
- IFlower tree = Binnie.Genetics.getFlowerRoot().templateAsIndividual(template);
- if (tree == null) {
- return;
- }
- IFlowerGenome genome = tree.getGenome();
- IAlleleFlowerSpecies treeSpecies = genome.getPrimary();
-
- int w = 144;
- int h = 176;
-
- new ControlText(this, new IArea(0.0F, 4.0F, w, 16.0F), "Genome", TextJustification.MiddleCenter);
-
- ControlScrollableContent scrollable = new ControlScrollableContent(this, 4.0F, 20.0F, w - 8, h - 8 - 16, 12.0F);
-
- Control contents = new Control(scrollable, 0.0F, 0.0F, w - 8 - 12, h - 8 - 16);
-
- int tw = w - 8 - 12;
- int w1 = 55;
- int w2 = tw - 50;
- int y = 0;
- int th = 14;
- int th2 = 18;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), "Temp. : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), treeSpecies.getTemperature().getName(), TextJustification.MiddleLeft);
-
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), "Moist. : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), Binnie.Language.localise(treeSpecies.getMoisture()), TextJustification.MiddleLeft);
-
-
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), "pH. : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), Binnie.Language.localise(treeSpecies.getPH()), TextJustification.MiddleLeft);
-
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), "Fertility : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getFertility() + "x", TextJustification.MiddleLeft);
- y += th;
-
- float lifespan = genome.getLifespan() * 68.269997F / genome.getAgeChance() / 24000.0F;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), "Lifespan : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), "" + String.format("%.2f", new Object[] { Float.valueOf(lifespan) }) + " days", TextJustification.MiddleLeft);
-
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), "Nectar : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getActiveAllele(EnumFlowerChromosome.SAPPINESS).getName(), TextJustification.MiddleLeft);
-
-
- y += th;
-
- int x = w1;
- int tot = 0;
- for (IIndividual vid : BotanyCore.getFlowerRoot().getIndividualTemplates()) {
- if (vid.getGenome().getPrimary() == treeSpecies)
- {
- if ((tot > 0) && (tot % 3 == 0))
- {
- x -= 54;
- y += 18;
- }
- ItemStack stack = BotanyCore.getFlowerRoot().getMemberStack((IFlower)vid, EnumFlowerStage.FLOWER.ordinal());
- ControlItemDisplay display = new ControlItemDisplay(contents, x, y);
- display.setItemStack(stack);
- tot++;
- x += 18;
- }
- }
- int numOfLines = 1 + (tot - 1) / 3;
-
- new ControlText(contents, new IArea(0.0F, y - (numOfLines - 1) * 18, w1, 4 + 18 * numOfLines), "Varieties : ", TextJustification.MiddleRight);
-
-
- y += th;
-
- contents.setSize(new IPoint(contents.size().x(), y));
-
- scrollable.setScrollableContent(contents);
- }
-
- public static String tolerated(boolean t)
- {
- if (t) {
- return "Tolerated";
- }
- return "Not Tolerated";
- }
-}
diff --git a/src/Java/binnie/craftgui/botany/WindowBotanistDatabase.java b/src/Java/binnie/craftgui/botany/WindowBotanistDatabase.java
deleted file mode 100644
index 69a2a291ca..0000000000
--- a/src/Java/binnie/craftgui/botany/WindowBotanistDatabase.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package binnie.craftgui.botany;
-
-import binnie.Binnie;
-import binnie.botany.Botany;
-import binnie.botany.api.IFlowerColour;
-import binnie.botany.genetics.EnumFlowerColor;
-import binnie.botany.proxy.Proxy;
-import binnie.core.AbstractMod;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.craftgui.controls.listbox.ControlList;
-import binnie.craftgui.controls.listbox.ControlListBox;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.IDatabaseMode;
-import binnie.craftgui.mod.database.PageBranchOverview;
-import binnie.craftgui.mod.database.PageBranchSpecies;
-import binnie.craftgui.mod.database.PageBreeder;
-import binnie.craftgui.mod.database.PageSpeciesClassification;
-import binnie.craftgui.mod.database.PageSpeciesMutations;
-import binnie.craftgui.mod.database.PageSpeciesOverview;
-import binnie.craftgui.mod.database.PageSpeciesResultant;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import binnie.craftgui.mod.database.WindowAbstractDatabase.Mode;
-import binnie.craftgui.mod.database.WindowAbstractDatabase.ModeWidgets;
-import cpw.mods.fml.relauncher.Side;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-
-public class WindowBotanistDatabase
- extends WindowAbstractDatabase
-{
- ControlListBox<EnumFlowerColor> selectionBoxColors;
-
- static enum FlowerMode
- implements IDatabaseMode
- {
- Colour;
-
- private FlowerMode() {}
-
- public String getName()
- {
- return Botany.proxy.localise("gui.database.mode." + name().toLowerCase());
- }
- }
-
- public WindowBotanistDatabase(EntityPlayer player, Side side, boolean nei)
- {
- super(player, side, nei, Binnie.Genetics.flowerBreedingSystem, 130.0F);
- }
-
- public static Window create(EntityPlayer player, Side side, boolean nei)
- {
- return new WindowBotanistDatabase(player, side, nei);
- }
-
- protected void addTabs()
- {
- new PageSpeciesOverview(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(Botany.instance, "species.overview", 0));
- new PageSpeciesFlowerGenome(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(Botany.instance, "species.genome", 0));
- new PageSpeciesClassification(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(Botany.instance, "species.classification", 0));
- new PageSpeciesResultant(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(Botany.instance, "species.resultant", 0));
- new PageSpeciesMutations(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(Botany.instance, "species.further", 0));
-
- new PageBranchOverview(getInfoPages(WindowAbstractDatabase.Mode.Branches), new DatabaseTab(Botany.instance, "branches.overview", 0));
- new PageBranchSpecies(getInfoPages(WindowAbstractDatabase.Mode.Branches), new DatabaseTab(Botany.instance, "branches.species", 0));
-
- createMode(FlowerMode.Colour, new WindowAbstractDatabase.ModeWidgets(FlowerMode.Colour, this)
- {
- public void createListBox(IArea area)
- {
- this.listBox = new ControlListBox(this.modePage, area.x(), area.y(), area.w(), area.h(), 12.0F)
- {
- public IWidget createOption(IFlowerColour value, int y)
- {
- return new ControlColourOption((ControlList)getContent(), value, y);
- }
- };
- List<IFlowerColour> colors = new ArrayList();
- for (IFlowerColour c : EnumFlowerColor.values()) {
- colors.add(c);
- }
- this.listBox.setOptions(colors);
- }
- });
- new PageColourMixResultant(getInfoPages(FlowerMode.Colour), new DatabaseTab(Botany.instance, "colour.resultant", 0));
- new PageColourMix(getInfoPages(FlowerMode.Colour), new DatabaseTab(Botany.instance, "colour.further", 0));
- new PageBreeder(getInfoPages(WindowAbstractDatabase.Mode.Breeder), getUsername(), new DatabaseTab(Botany.instance, "breeder", 0));
- }
-
- protected AbstractMod getMod()
- {
- return Botany.instance;
- }
-
- protected String getName()
- {
- return "FlowerDatabase";
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlBlockIconDisplay.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlBlockIconDisplay.java
deleted file mode 100644
index 58b93a2782..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlBlockIconDisplay.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import net.minecraft.util.IIcon;
-
-public class ControlBlockIconDisplay
- extends Control
-{
- IIcon icon;
-
- public ControlBlockIconDisplay(IWidget parent, float x, float y, IIcon icon)
- {
- super(parent, x, y, 18.0F, 18.0F);
- this.icon = icon;
- }
-
- public void onRenderBackground()
- {
- CraftGUI.Render.iconBlock(IPoint.ZERO, this.icon);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlBreweryProgress.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlBreweryProgress.java
deleted file mode 100644
index d6d18d3a69..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlBreweryProgress.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.machines.Machine;
-import binnie.core.util.ItemStackSet;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlProgressBase;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extratrees.core.ExtraTreeTexture;
-import binnie.extratrees.machines.Brewery;
-import binnie.extratrees.machines.Brewery.BreweryCrafting;
-import binnie.extratrees.machines.Brewery.ComponentBreweryLogic;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import org.lwjgl.opengl.GL11;
-
-public class ControlBreweryProgress
- extends ControlProgressBase
-{
- static Texture Brewery = new StandardTexture(0, 69, 34, 39, ExtraTreeTexture.Gui);
- static Texture BreweryOverlay = new StandardTexture(34, 69, 34, 39, ExtraTreeTexture.Gui);
-
- public void onRenderBackground()
- {
- CraftGUI.Render.texture(Brewery, new IPoint(0.0F, 0.0F));
-
- Brewery.ComponentBreweryLogic logic = (Brewery.ComponentBreweryLogic)Machine.getInterface(Brewery.ComponentBreweryLogic.class, Window.get(this).getInventory());
- if (logic.currentCrafting == null) {
- return;
- }
- if (logic.currentCrafting.currentInput == null) {
- return;
- }
- int fermentedHeight = (int)(32.0F * logic.getProgress() / 100.0F);
-
- CraftGUI.Render.limitArea(new IArea(new IPoint(1.0F, 6.0F).add(getAbsolutePosition()), new IPoint(32.0F, 32 - fermentedHeight)));
-
- GL11.glEnable(3089);
-
- renderFluid(logic.currentCrafting.currentInput, new IPoint(1.0F, 6.0F));
- renderFluid(logic.currentCrafting.currentInput, new IPoint(17.0F, 6.0F));
- renderFluid(logic.currentCrafting.currentInput, new IPoint(1.0F, 22.0F));
- renderFluid(logic.currentCrafting.currentInput, new IPoint(17.0F, 22.0F));
-
- GL11.glDisable(3089);
-
- CraftGUI.Render.limitArea(new IArea(new IPoint(1.0F, 38 - fermentedHeight).add(getAbsolutePosition()), new IPoint(32.0F, fermentedHeight)));
-
-
- GL11.glEnable(3089);
-
- renderFluid(Brewery.getOutput(logic.currentCrafting), new IPoint(1.0F, 6.0F));
- renderFluid(Brewery.getOutput(logic.currentCrafting), new IPoint(17.0F, 6.0F));
- renderFluid(Brewery.getOutput(logic.currentCrafting), new IPoint(1.0F, 22.0F));
- renderFluid(Brewery.getOutput(logic.currentCrafting), new IPoint(17.0F, 22.0F));
-
- GL11.glDisable(3089);
-
- ItemStackSet stacks = new ItemStackSet();
- for (ItemStack stack : logic.currentCrafting.inputs) {
- stacks.add(stack);
- }
- stacks.add(logic.currentCrafting.ingr);
-
- int x = 1;
- int y = 6;
- for (ItemStack stack : stacks)
- {
- CraftGUI.Render.item(new IPoint(x, y), stack);
- x += 16;
- if (x > 18)
- {
- x = 1;
- y += 16;
- }
- }
- }
-
- public void onRenderForeground() {}
-
- protected ControlBreweryProgress(IWidget parent, float x, float y)
- {
- super(parent, x, y, 34.0F, 39.0F);
- addAttribute(Attribute.MouseOver);
- }
-
- public void renderFluid(FluidStack fluid, IPoint pos)
- {
- int hex = fluid.getFluid().getColor(fluid);
-
- int r = (hex & 0xFF0000) >> 16;
- int g = (hex & 0xFF00) >> 8;
- int b = hex & 0xFF;
-
- IIcon icon = fluid.getFluid().getIcon();
-
- GL11.glColor4f(r / 255.0F, g / 255.0F, b / 255.0F, 1.0F);
-
- GL11.glEnable(3042);
-
- GL11.glBlendFunc(770, 771);
-
- CraftGUI.Render.iconBlock(pos, fluid.getFluid().getIcon());
-
- GL11.glDisable(3042);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlDistilleryProgress.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlDistilleryProgress.java
deleted file mode 100644
index 5a44b09ca3..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlDistilleryProgress.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.machines.Machine;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlProgressBase;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extratrees.core.ExtraTreeTexture;
-import binnie.extratrees.machines.Distillery.ComponentDistilleryLogic;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import org.lwjgl.opengl.GL11;
-
-public class ControlDistilleryProgress
- extends ControlProgressBase
-{
- static Texture DistilleryBase = new StandardTexture(43, 0, 58, 66, ExtraTreeTexture.Gui);
- static Texture DistilleryOverlay = new StandardTexture(139, 0, 18, 66, ExtraTreeTexture.Gui);
- static Texture LiquidFlow = new StandardTexture(101, 0, 38, 66, ExtraTreeTexture.Gui);
- static Texture Output = new StandardTexture(68, 66, 17, 7, ExtraTreeTexture.Gui);
-
- public void onRenderBackground()
- {
- CraftGUI.Render.texture(DistilleryBase, new IPoint(0.0F, 0.0F));
- CraftGUI.Render.texturePercentage(LiquidFlow, new IArea(18.0F, 0.0F, 38.0F, 66.0F), Position.Left, this.progress);
-
- Distillery.ComponentDistilleryLogic component = (Distillery.ComponentDistilleryLogic)Machine.getInterface(Distillery.ComponentDistilleryLogic.class, Window.get(this).getInventory());
-
-
- FluidStack stack = null;
- if (component != null) {
- stack = component.currentFluid;
- }
- if (stack != null) {
- for (int y = 0; y < 4; y++) {
- renderFluid(stack, new IPoint(1.0F, 1 + y * 16));
- }
- }
- }
-
- public void onRenderForeground()
- {
- int level = ((Distillery.ComponentDistilleryLogic)Machine.getInterface(Distillery.ComponentDistilleryLogic.class, Window.get(this).getInventory())).level;
- CraftGUI.Render.texture(Output, new IPoint(47.0F, 14 + level * 15));
- CraftGUI.Render.texture(DistilleryOverlay, new IPoint(0.0F, 0.0F));
- }
-
- protected ControlDistilleryProgress(IWidget parent, float x, float y)
- {
- super(parent, x, y, 58.0F, 66.0F);
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- int distillationLevel = -1;
- if (new IArea(45.0F, 8.0F, 19.0F, 11.0F).contains(ControlDistilleryProgress.this.getRelativeMousePosition())) {
- distillationLevel = 0;
- } else if (new IArea(45.0F, 23.0F, 19.0F, 11.0F).contains(ControlDistilleryProgress.this.getRelativeMousePosition())) {
- distillationLevel = 1;
- } else if (new IArea(45.0F, 38.0F, 19.0F, 11.0F).contains(ControlDistilleryProgress.this.getRelativeMousePosition())) {
- distillationLevel = 2;
- }
- if (distillationLevel >= 0)
- {
- NBTTagCompound nbt = new NBTTagCompound();
- nbt.setByte("i", (byte)distillationLevel);
- Window.get(ControlDistilleryProgress.this.getWidget()).sendClientAction("still-level", nbt);
- }
- }
- });
- }
-
- public void renderFluid(FluidStack fluid, IPoint pos)
- {
- int hex = fluid.getFluid().getColor(fluid);
-
- int r = (hex & 0xFF0000) >> 16;
- int g = (hex & 0xFF00) >> 8;
- int b = hex & 0xFF;
-
- IIcon icon = fluid.getFluid().getIcon();
-
- GL11.glColor4f(r / 255.0F, g / 255.0F, b / 255.0F, 1.0F);
-
- GL11.glEnable(3042);
-
- GL11.glBlendFunc(770, 771);
-
- CraftGUI.Render.iconBlock(pos, fluid.getFluid().getIcon());
-
- GL11.glDisable(3042);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlFruitPressProgress.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlFruitPressProgress.java
deleted file mode 100644
index 79d21a3025..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlFruitPressProgress.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.ContainerCraftGUI;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlProgressBase;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extratrees.core.ExtraTreeTexture;
-import binnie.extratrees.machines.Press;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import org.lwjgl.opengl.GL11;
-
-public class ControlFruitPressProgress
- extends ControlProgressBase
-{
- static Texture PressTexture = new StandardTexture(6, 0, 24, 52, ExtraTreeTexture.Gui);
- static Texture PressSlot = new StandardTexture(9, 52, 34, 17, ExtraTreeTexture.Gui);
-
- public void onRenderBackground()
- {
- CraftGUI.Render.texture(PressSlot, new IPoint(3.0F, 52.0F));
-
- ItemStack input = Window.get(this).getContainer().getSlotFromInventory(Window.get(this).getInventory(), Press.slotCurrent).getStack();
- if ((input == null) || (Press.getOutput(input) == null)) {
- return;
- }
- Fluid fluid = Press.getOutput(input).getFluid();
-
- int hex = fluid.getColor(Press.getOutput(input));
-
- int r = (hex & 0xFF0000) >> 16;
- int g = (hex & 0xFF00) >> 8;
- int b = hex & 0xFF;
-
- IIcon icon = fluid.getIcon();
-
- GL11.glColor4f(r / 255.0F, g / 255.0F, b / 255.0F, 1.0F);
-
- GL11.glEnable(3042);
-
- GL11.glBlendFunc(770, 771);
-
- CraftGUI.Render.iconBlock(new IPoint(4.0F, 52.0F), fluid.getIcon());
-
- GL11.glDisable(3042);
-
- icon = input.getIconIndex();
- CraftGUI.Render.iconItem(new IPoint(4.0F, 52.0F), icon);
- }
-
- public void onRenderForeground()
- {
- CraftGUI.Render.texture(PressTexture, new IPoint(0.0F, 16.0F * this.progress));
- }
-
- protected ControlFruitPressProgress(IWidget parent, float x, float y)
- {
- super(parent, x, y, 37.0F, 69.0F);
- addAttribute(Attribute.MouseOver);
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- if (event.getButton() == 0)
- {
- NBTTagCompound action = new NBTTagCompound();
- Window.get(ControlFruitPressProgress.this.getWidget()).sendClientAction("fruitpress-click", action);
- }
- else if (event.getButton() == 1)
- {
- NBTTagCompound action = new NBTTagCompound();
- Window.get(ControlFruitPressProgress.this.getWidget()).sendClientAction("clear-fruit", action);
- }
- }
- });
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlLumbermillProgress.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlLumbermillProgress.java
deleted file mode 100644
index b315c23927..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlLumbermillProgress.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlProgressBase;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.craftgui.window.Panel;
-import binnie.extratrees.core.ExtraTreeTexture;
-import binnie.extratrees.machines.Lumbermill;
-import net.minecraft.block.Block;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import org.lwjgl.opengl.GL11;
-
-public class ControlLumbermillProgress
- extends ControlProgressBase
-{
- public void onUpdateClient()
- {
- super.onUpdateClient();
- if (this.oldProgress != this.progress)
- {
- this.oldProgress = this.progress;
- this.animation += 5.0F;
- }
- }
-
- float oldProgress = 0.0F;
- float animation = 0.0F;
- static Texture Saw = new StandardTexture(0, 0, 6, 32, ExtraTreeTexture.Gui);
- static Texture Saw2 = new StandardTexture(2, 0, 4, 32, ExtraTreeTexture.Gui);
-
- public void onRenderForeground()
- {
- GL11.glDisable(2896);
- int sawX = (int)(63.0F * this.progress);
-
- CraftGUI.Render.texture(Saw, new IPoint(sawX, -8.0F + 6.0F * (float)Math.sin(this.animation)));
-
- ItemStack item = Window.get(this).getInventory().getStackInSlot(Lumbermill.slotWood);
- if (item == null) {
- return;
- }
- GL11.glDisable(2896);
-
- Block block = null;
- if ((item.getItem() instanceof ItemBlock)) {
- block = ((ItemBlock)item.getItem()).field_150939_a;
- }
- if (block == null) {
- return;
- }
- IIcon icon = block.getIcon(2, item.getItemDamage());
- for (int i = 0; i < 4; i++) {
- CraftGUI.Render.iconBlock(new IPoint(1 + i * 16, 1.0F), icon);
- }
- ItemStack result = Lumbermill.getPlankProduct(item);
- if (result == null) {
- return;
- }
- Block block2 = null;
- if ((item.getItem() instanceof ItemBlock)) {
- block2 = ((ItemBlock)result.getItem()).field_150939_a;
- }
- if (block2 == null) {
- return;
- }
- IIcon icon2 = block2.getIcon(2, result.getItemDamage());
-
- IPoint size = getSize();
- IPoint pos = getAbsolutePosition();
- CraftGUI.Render.limitArea(new IArea(pos.add(new IPoint(0.0F, 0.0F)), new IPoint(this.progress * 64.0F + 2.0F, 18.0F)));
-
- GL11.glEnable(3089);
- for (int i = 0; i < 4; i++) {
- CraftGUI.Render.iconBlock(new IPoint(1 + i * 16, 1.0F), icon2);
- }
- GL11.glDisable(3089);
-
- CraftGUI.Render.texture(Saw2, new IPoint(sawX + 2, -8.0F + 6.0F * (float)Math.sin(this.animation)));
- }
-
- protected ControlLumbermillProgress(IWidget parent, float x, float y)
- {
- super(parent, x, y, 66.0F, 18.0F);
- new Panel(this, 0.0F, 0.0F, 66.0F, 18.0F, MinecraftGUI.PanelType.Black);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlRecipeSlot.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlRecipeSlot.java
deleted file mode 100644
index d65e825cb8..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlRecipeSlot.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.machines.Machine;
-import binnie.core.machines.TileEntityMachine;
-import binnie.core.machines.component.IComponentRecipe;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlSlotBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-
-public class ControlRecipeSlot
- extends ControlSlotBase
-{
- public ControlRecipeSlot(IWidget parent, int x, int y)
- {
- super(parent, x, y, 50);
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- TileEntity tile = (TileEntity)Window.get(ControlRecipeSlot.this.getWidget()).getInventory();
- if ((tile == null) || (!(tile instanceof TileEntityMachine))) {
- return;
- }
- NBTTagCompound nbt = new NBTTagCompound();
- Window.get(ControlRecipeSlot.this.getWidget()).sendClientAction("recipe", nbt);
- }
- });
- setRotating();
- }
-
- public ItemStack getItemStack()
- {
- IComponentRecipe recipe = (IComponentRecipe)Machine.getInterface(IComponentRecipe.class, Window.get(this).getInventory());
- return recipe.isRecipe() ? recipe.getProduct() : null;
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/ControlTileSelect.java b/src/Java/binnie/craftgui/extratrees/dictionary/ControlTileSelect.java
deleted file mode 100644
index cc5c79c529..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/ControlTileSelect.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.Binnie;
-import binnie.core.BinnieCore;
-import binnie.core.language.ManagerLanguage;
-import binnie.core.machines.Machine;
-import binnie.core.machines.TileEntityMachine;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.controls.core.IControlValue;
-import binnie.craftgui.controls.scroll.IControlScrollable;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.ITooltip;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.resource.minecraft.CraftGUITexture;
-import binnie.extratrees.api.CarpentryManager;
-import binnie.extratrees.api.ICarpentryInterface;
-import binnie.extratrees.api.IDesign;
-import binnie.extratrees.api.IDesignCategory;
-import binnie.extratrees.carpentry.EnumDesign;
-import binnie.extratrees.machines.Designer.ComponentWoodworkerRecipe;
-import binnie.extratrees.machines.DesignerType;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class ControlTileSelect
- extends Control
- implements IControlValue<IDesign>, IControlScrollable
-{
- public static class ControlTile
- extends Control
- implements IControlValue<IDesign>, ITooltip
- {
- IDesign value;
-
- protected ControlTile(IWidget parent, float x, float y, IDesign value)
- {
- super(x, y, 18.0F, 18.0F);
- setValue(value);
- addAttribute(Attribute.MouseOver);
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- TileEntityMachine tile = (TileEntityMachine)Window.get(ControlTileSelect.ControlTile.this.getWidget()).getInventory();
- if (tile == null) {
- return;
- }
- Designer.ComponentWoodworkerRecipe recipe = (Designer.ComponentWoodworkerRecipe)tile.getMachine().getComponent(Designer.ComponentWoodworkerRecipe.class);
-
- NBTTagCompound nbt = new NBTTagCompound();
- nbt.setShort("d", (short)CarpentryManager.carpentryInterface.getDesignIndex(ControlTileSelect.ControlTile.this.getValue()));
-
- Window.get(ControlTileSelect.ControlTile.this.getWidget()).sendClientAction("design", nbt);
- }
- });
- }
-
- public void getTooltip(Tooltip tooltip)
- {
- tooltip.add(Binnie.Language.localise(BinnieCore.instance, "gui.designer.pattern", new Object[] { getValue().getName() }));
- }
-
- public IDesign getValue()
- {
- return this.value;
- }
-
- public void onRenderBackground()
- {
- CraftGUI.Render.texture(CraftGUITexture.Slot, IPoint.ZERO);
- }
-
- public void onRenderForeground()
- {
- ItemStack image = ((WindowWoodworker)getSuperParent()).getDesignerType().getDisplayStack(getValue());
- CraftGUI.Render.item(new IPoint(1.0F, 1.0F), image);
- if (((IControlValue)getParent()).getValue() != getValue()) {
- if (Window.get(this).getMousedOverWidget() == this) {
- CraftGUI.Render.gradientRect(getArea().inset(1), 1157627903, 1157627903);
- } else {
- CraftGUI.Render.gradientRect(getArea().inset(1), -1433892728, -1433892728);
- }
- }
- }
-
- public void setValue(IDesign value)
- {
- this.value = value;
- }
- }
-
- IDesign value = EnumDesign.Blank;
- float shownHeight = 92.0F;
-
- protected ControlTileSelect(IWidget parent, float x, float y)
- {
- super(parent, x, y, 102.0F, 20 * (CarpentryManager.carpentryInterface.getSortedDesigns().size() / 4) + 22);
-
- refresh("");
- }
-
- public float getPercentageIndex()
- {
- return 0.0F;
- }
-
- public float getPercentageShown()
- {
- return 0.0F;
- }
-
- public IDesign getValue()
- {
- return this.value;
- }
-
- public void movePercentage(float percentage) {}
-
- public void onUpdateClient()
- {
- super.onUpdateClient();
- TileEntityMachine tile = (TileEntityMachine)Window.get(this).getInventory();
- if (tile == null) {
- return;
- }
- Designer.ComponentWoodworkerRecipe recipe = (Designer.ComponentWoodworkerRecipe)tile.getMachine().getComponent(Designer.ComponentWoodworkerRecipe.class);
-
- setValue(recipe.getDesign());
- }
-
- public void refresh(String filterText)
- {
- deleteAllChildren();
- int cx = 2;
- int cy = 2;
-
- Map<IDesignCategory, List<IDesign>> designs = new HashMap();
- for (IDesignCategory category : CarpentryManager.carpentryInterface.getAllDesignCategories())
- {
- designs.put(category, new ArrayList());
- for (IDesign tile : category.getDesigns()) {
- if ((filterText == "") || (tile.getName().toLowerCase().contains(filterText))) {
- ((List)designs.get(category)).add(tile);
- }
- }
- if (((List)designs.get(category)).isEmpty()) {
- designs.remove(category);
- }
- }
- for (IDesignCategory category : designs.keySet())
- {
- cx = 2;
- new ControlText(this, new IPoint(cx, cy + 3), category.getName());
- cy += 16;
- for (IDesign tile : (List)designs.get(category))
- {
- if (cx > 90)
- {
- cx = 2;
- cy += 20;
- }
- new ControlTile(this, cx, cy, tile);
- cx += 20;
- }
- cy += 20;
- }
- int height = cy;
-
- setSize(new IPoint(getSize().x(), height));
- }
-
- public void setPercentageIndex(float index) {}
-
- public void setValue(IDesign value)
- {
- this.value = value;
- }
-
- public float getMovementRange()
- {
- return 0.0F;
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/DialogBreweryRecipe.java b/src/Java/binnie/craftgui/extratrees/dictionary/DialogBreweryRecipe.java
deleted file mode 100644
index f761aaea29..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/DialogBreweryRecipe.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.minecraft.Dialog;
-
-public class DialogBreweryRecipe
- extends Dialog
-{
- public DialogBreweryRecipe(IWidget parent, float w, float h)
- {
- super(parent, w, h);
- }
-
- public void initialise() {}
-
- public void onClose() {}
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/PageFruit.java b/src/Java/binnie/craftgui/extratrees/dictionary/PageFruit.java
deleted file mode 100644
index c6983deef9..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/PageFruit.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.genetics.TreeBreedingSystem;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.mod.database.ControlSpeciesBox;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageAbstract;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.proxy.Proxy;
-import forestry.api.genetics.IAlleleSpecies;
-import java.util.Collection;
-import net.minecraft.item.ItemStack;
-
-public class PageFruit
- extends PageAbstract<ItemStack>
-{
- boolean treesThatBearFruit;
-
- public PageFruit(IWidget parent, DatabaseTab tab, boolean treesThatBearFruit)
- {
- super(parent, tab);
- this.treesThatBearFruit = treesThatBearFruit;
- }
-
- public void onValueChanged(ItemStack species)
- {
- deleteAllChildren();
- WindowAbstractDatabase database = (WindowAbstractDatabase)WindowAbstractDatabase.get(this);
- new ControlText(this, new IArea(0.0F, 0.0F, size().x(), 24.0F), ExtraTrees.proxy.localise("gui.database.tab.fruit." + (this.treesThatBearFruit ? "natural" : "potential")), TextJustification.MiddleCenter);
-
-
- Collection<IAlleleSpecies> trees = this.treesThatBearFruit ? ((TreeBreedingSystem)database.getBreedingSystem()).getTreesThatBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername()) : ((TreeBreedingSystem)database.getBreedingSystem()).getTreesThatCanBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername());
-
-
-
-
-
-
-
- new ControlSpeciesBox(this, 4.0F, 24.0F, size().x() - 8.0F, size().y() - 4.0F - 24.0F).setOptions(trees);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksOverview.java b/src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksOverview.java
deleted file mode 100644
index f27fa6967b..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksOverview.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.BinnieCore;
-import binnie.core.proxy.BinnieProxy;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.minecraft.control.ControlItemDisplay;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageAbstract;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.block.DoorType;
-import binnie.extratrees.block.IPlankType;
-import binnie.extratrees.block.WoodManager;
-import binnie.extratrees.block.decor.FenceType;
-import binnie.extratrees.proxy.Proxy;
-import net.minecraft.item.ItemStack;
-
-public class PagePlanksOverview
- extends PageAbstract<ItemStack>
-{
- public PagePlanksOverview(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
- }
-
- public void onValueChanged(ItemStack species)
- {
- deleteAllChildren();
- WindowAbstractDatabase database = (WindowAbstractDatabase)WindowAbstractDatabase.get(this);
- new ControlText(this, new IArea(0.0F, 0.0F, size().x(), 24.0F), species.getDisplayName(), TextJustification.MiddleCenter);
-
-
-
- new ControlText(this, new IArea(12.0F, 24.0F, size().x() - 24.0F, 24.0F), ExtraTrees.proxy.localise("gui.database.planks.use"), TextJustification.MiddleLeft);
-
-
- IPlankType type = WoodManager.get(species);
-
- int x = 12;
- if (type != null)
- {
- ItemStack fence = WoodManager.getFence(type, new FenceType(0), 1);
- ItemStack gate = WoodManager.getGate(type);
- ItemStack door = WoodManager.getDoor(type, DoorType.Standard);
- if (fence != null)
- {
- new ControlItemDisplay(this, x, 48.0F).setItemStack(fence);
- x += 22;
- }
- if (gate != null)
- {
- new ControlItemDisplay(this, x, 48.0F).setItemStack(gate);
- x += 22;
- }
- if (door != null)
- {
- new ControlItemDisplay(this, x, 48.0F).setItemStack(door);
- x += 22;
- }
- }
- ControlText controlDescription = new ControlText(this, new IArea(8.0F, 84.0F, getSize().x() - 16.0F, 0.0F), "", TextJustification.MiddleCenter);
-
-
- ControlText controlSignature = new ControlText(this, new IArea(8.0F, 84.0F, getSize().x() - 16.0F, 0.0F), "", TextJustification.BottomRight);
-
-
-
- String desc = "";
- if (type != null) {
- desc = type.getDescription();
- }
- String descBody = "§o";
- String descSig = "";
- if ((desc == null) || (desc.length() == 0))
- {
- descBody = descBody + BinnieCore.proxy.localise("gui.database.nodescription");
- }
- else
- {
- String[] descStrings = desc.split("\\|");
- descBody = descBody + descStrings[0];
- for (int i = 1; i < descStrings.length - 1; i++) {
- descBody = descBody + " " + descStrings[i];
- }
- if (descStrings.length > 1) {
- descSig = descSig + descStrings[(descStrings.length - 1)];
- }
- }
- controlDescription.setValue(descBody + "§r");
- controlSignature.setValue(descSig + "§r");
-
- float descHeight = CraftGUI.Render.textHeight(controlDescription.getValue(), controlDescription.getSize().x());
-
-
- controlSignature.setPosition(new IPoint(controlSignature.pos().x(), controlDescription.getPosition().y() + descHeight + 10.0F));
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksTrees.java b/src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksTrees.java
deleted file mode 100644
index 8702edbe95..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/PagePlanksTrees.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.genetics.TreeBreedingSystem;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.mod.database.ControlSpeciesBox;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageAbstract;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import forestry.api.genetics.IAlleleSpecies;
-import java.util.Collection;
-import net.minecraft.item.ItemStack;
-
-public class PagePlanksTrees
- extends PageAbstract<ItemStack>
-{
- public PagePlanksTrees(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
- }
-
- public void onValueChanged(ItemStack species)
- {
- deleteAllChildren();
- WindowAbstractDatabase database = (WindowAbstractDatabase)WindowAbstractDatabase.get(this);
- new ControlText(this, new IArea(0.0F, 0.0F, size().x(), 24.0F), species.getDisplayName(), TextJustification.MiddleCenter);
-
-
-
- Collection<IAlleleSpecies> trees = ((TreeBreedingSystem)database.getBreedingSystem()).getTreesThatMakePlanks(species, database.isNEI(), database.getWorld(), database.getUsername());
-
-
-
-
- new ControlSpeciesBox(this, 4.0F, 24.0F, size().x() - 8.0F, size().y() - 4.0F - 24.0F).setOptions(trees);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesImage.java b/src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesImage.java
deleted file mode 100644
index d6fd929447..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesImage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.craftgui.controls.ControlTextCentered;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.mod.database.ControlDatabaseIndividualDisplay;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.EnumDiscoveryState;
-import binnie.craftgui.mod.database.PageSpecies;
-import binnie.craftgui.window.Panel;
-import forestry.api.genetics.IAlleleSpecies;
-
-public class PageSpeciesImage
- extends PageSpecies
-{
- ControlDatabaseIndividualDisplay display;
-
- public PageSpeciesImage(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
- new Panel(this, 7.0F, 25.0F, 130.0F, 120.0F, MinecraftGUI.PanelType.Gray);
- this.display = new ControlDatabaseIndividualDisplay(this, 12.0F, 25.0F, 120.0F);
- this.display.hastooltip = false;
- new ControlTextCentered(this, 8.0F, ((DatabaseTab)getValue()).toString());
- }
-
- public void onValueChanged(IAlleleSpecies species)
- {
- this.display.setSpecies(species, EnumDiscoveryState.Show);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesTreeGenome.java b/src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesTreeGenome.java
deleted file mode 100644
index 22a1a67b29..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/PageSpeciesTreeGenome.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.Binnie;
-import binnie.core.BinnieCore;
-import binnie.core.genetics.BreedingSystem;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.core.proxy.BinnieProxy;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.controls.scroll.ControlScrollableContent;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.minecraft.control.ControlItemDisplay;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageSpecies;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.proxy.Proxy;
-import forestry.api.arboriculture.EnumTreeChromosome;
-import forestry.api.arboriculture.IAlleleTreeSpecies;
-import forestry.api.arboriculture.IFruitProvider;
-import forestry.api.arboriculture.IGrowthProvider;
-import forestry.api.arboriculture.ITree;
-import forestry.api.arboriculture.ITreeGenome;
-import forestry.api.arboriculture.ITreeRoot;
-import forestry.api.core.EnumTemperature;
-import forestry.api.core.ForestryAPI;
-import forestry.api.core.ITextureManager;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IAlleleSpecies;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.common.EnumPlantType;
-
-public class PageSpeciesTreeGenome
- extends PageSpecies
-{
- public PageSpeciesTreeGenome(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
- }
-
- public void onValueChanged(IAlleleSpecies species)
- {
- deleteAllChildren();
- IAllele[] template = Binnie.Genetics.getTreeRoot().getTemplate(species.getUID());
- if (template == null) {
- return;
- }
- ITree tree = Binnie.Genetics.getTreeRoot().templateAsIndividual(template);
- if (tree == null) {
- return;
- }
- ITreeGenome genome = tree.getGenome();
- IAlleleTreeSpecies treeSpecies = genome.getPrimary();
-
- int w = 144;
- int h = 176;
-
- new ControlText(this, new IArea(0.0F, 4.0F, w, 16.0F), ((DatabaseTab)getValue()).toString(), TextJustification.MiddleCenter);
-
- ControlScrollableContent scrollable = new ControlScrollableContent(this, 4.0F, 20.0F, w - 8, h - 8 - 16, 12.0F);
-
- Control contents = new Control(scrollable, 0.0F, 0.0F, w - 8 - 12, h - 8 - 16);
-
- int tw = w - 8 - 12;
- int w1 = 65;
- int w2 = tw - 50;
- int y = 0;
- int th = 14;
- int th2 = 18;
-
- BreedingSystem syst = Binnie.Genetics.treeBreedingSystem;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.PLANT) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), treeSpecies.getPlantType().toString(), TextJustification.MiddleLeft);
-
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), BinnieCore.proxy.localise("gui.temperature.short") + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), treeSpecies.getTemperature().getName(), TextJustification.MiddleLeft);
-
- y += th;
-
- IIcon leaf = ForestryAPI.textureManager.getIcon(treeSpecies.getLeafIconIndex(tree, false));
-
- IIcon fruit = null;
- int fruitColour = 16777215;
- try
- {
- fruit = ForestryAPI.textureManager.getIcon(genome.getFruitProvider().getIconIndex(genome, null, 0, 0, 0, 100, false));
- fruitColour = genome.getFruitProvider().getColour(genome, null, 0, 0, 0, 100);
- }
- catch (Exception e) {}
- if (leaf != null)
- {
- new ControlText(contents, new IArea(0.0F, y, w1, th2), ExtraTrees.proxy.localise("gui.database.leaves") + " : ", TextJustification.MiddleRight);
-
- new ControlBlockIconDisplay(contents, w1, y, leaf).setColour(treeSpecies.getLeafColour(tree));
- if ((fruit != null) && (!treeSpecies.getUID().equals("forestry.treeOak"))) {
- new ControlBlockIconDisplay(contents, w1, y, fruit).setColour(fruitColour);
- }
- y += th2;
- }
- ItemStack log = treeSpecies.getLogStacks().length > 0 ? treeSpecies.getLogStacks()[0] : null;
- if (log != null)
- {
- new ControlText(contents, new IArea(0.0F, y, w1, th2), ExtraTrees.proxy.localise("gui.database.log") + " : ", TextJustification.MiddleRight);
-
- ControlItemDisplay display = new ControlItemDisplay(contents, w1, y);
- display.setItemStack(log);
- display.setTooltip();
-
- y += th2;
- }
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.GROWTH) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getGrowthProvider().getDescription(), TextJustification.MiddleLeft);
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.HEIGHT) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getHeight() + "x", TextJustification.MiddleLeft);
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.FERTILITY) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getFertility() + "x", TextJustification.MiddleLeft);
- y += th;
-
- List<ItemStack> fruits = new ArrayList();
- for (ItemStack stack : genome.getFruitProvider().getProducts()) {
- fruits.add(stack);
- }
- if (!fruits.isEmpty())
- {
- new ControlText(contents, new IArea(0.0F, y, w1, th2), syst.getChromosomeShortName(EnumTreeChromosome.FRUITS) + " : ", TextJustification.MiddleRight);
- for (ItemStack fruitw : fruits)
- {
- ControlItemDisplay display = new ControlItemDisplay(contents, w1, y);
- display.setItemStack(fruitw);
- display.setTooltip();
-
- y += th2;
- }
- }
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.YIELD) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getYield() + "x", TextJustification.MiddleLeft);
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.SAPPINESS) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getSappiness() + "x", TextJustification.MiddleLeft);
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.MATURATION) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getMaturationTime() + "x", TextJustification.MiddleLeft);
- y += th;
-
- new ControlText(contents, new IArea(0.0F, y, w1, th), syst.getChromosomeShortName(EnumTreeChromosome.GIRTH) + " : ", TextJustification.MiddleRight);
- new ControlText(contents, new IArea(w1, y, w2, th), genome.getGirth() + "x" + genome.getGirth(), TextJustification.MiddleLeft);
- y += th;
-
- contents.setSize(new IPoint(contents.size().x(), y));
-
- scrollable.setScrollableContent(contents);
- }
-
- public static String tolerated(boolean t)
- {
- if (t) {
- return BinnieCore.proxy.localise("gui.tolerated");
- }
- return BinnieCore.proxy.localise("gui.nottolerated");
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/PageWood.java b/src/Java/binnie/craftgui/extratrees/dictionary/PageWood.java
deleted file mode 100644
index e7e80a1456..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/PageWood.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.genetics.TreeBreedingSystem;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.mod.database.ControlSpeciesBox;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageAbstract;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import forestry.api.genetics.IAlleleSpecies;
-import java.util.Collection;
-import net.minecraft.item.ItemStack;
-
-public class PageWood
- extends PageAbstract<ItemStack>
-{
- public PageWood(IWidget parent, DatabaseTab tab)
- {
- super(parent, tab);
- }
-
- public void onValueChanged(ItemStack species)
- {
- deleteAllChildren();
- WindowAbstractDatabase database = (WindowAbstractDatabase)WindowAbstractDatabase.get(this);
- new ControlText(this, new IArea(0.0F, 0.0F, size().x(), 24.0F), ((DatabaseTab)getValue()).toString(), TextJustification.MiddleCenter);
-
-
-
- Collection<IAlleleSpecies> trees = ((TreeBreedingSystem)database.getBreedingSystem()).getTreesThatHaveWood(species, database.isNEI(), database.getWorld(), database.getUsername());
-
-
-
-
- new ControlSpeciesBox(this, 4.0F, 24.0F, size().x() - 8.0F, size().y() - 4.0F - 24.0F).setOptions(trees);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowArboristDatabase.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowArboristDatabase.java
deleted file mode 100644
index e8096c6d77..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowArboristDatabase.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.Binnie;
-import binnie.core.AbstractMod;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.core.genetics.TreeBreedingSystem;
-import binnie.craftgui.controls.listbox.ControlList;
-import binnie.craftgui.controls.listbox.ControlListBox;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.mod.database.ControlItemStackOption;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.IDatabaseMode;
-import binnie.craftgui.mod.database.PageBranchOverview;
-import binnie.craftgui.mod.database.PageBranchSpecies;
-import binnie.craftgui.mod.database.PageBreeder;
-import binnie.craftgui.mod.database.PageSpeciesClassification;
-import binnie.craftgui.mod.database.PageSpeciesMutations;
-import binnie.craftgui.mod.database.PageSpeciesOverview;
-import binnie.craftgui.mod.database.PageSpeciesResultant;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import binnie.craftgui.mod.database.WindowAbstractDatabase.Mode;
-import binnie.craftgui.mod.database.WindowAbstractDatabase.ModeWidgets;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.proxy.Proxy;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
-public class WindowArboristDatabase
- extends WindowAbstractDatabase
-{
- ControlListBox<ItemStack> selectionBoxFruit;
- ControlListBox<ItemStack> selectionBoxWood;
- ControlListBox<ItemStack> selectionBoxPlanks;
-
- static enum TreeMode
- implements IDatabaseMode
- {
- Fruit, Wood, Planks;
-
- private TreeMode() {}
-
- public String getName()
- {
- return ExtraTrees.proxy.localise("gui.database.mode." + name().toLowerCase());
- }
- }
-
- public WindowArboristDatabase(EntityPlayer player, Side side, boolean nei)
- {
- super(player, side, nei, Binnie.Genetics.treeBreedingSystem, 120.0F);
- }
-
- public static Window create(EntityPlayer player, Side side, boolean nei)
- {
- return new WindowArboristDatabase(player, side, nei);
- }
-
- protected void addTabs()
- {
- new PageSpeciesOverview(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "species.overview", 0));
- new PageSpeciesTreeGenome(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "species.genome", 0));
- new PageSpeciesClassification(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "species.classification", 0));
- new PageSpeciesResultant(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "species.resultant", 0));
- new PageSpeciesMutations(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "species.further", 0));
-
- new PageBranchOverview(getInfoPages(WindowAbstractDatabase.Mode.Branches), new DatabaseTab(ExtraTrees.instance, "branches.overview", 0));
- new PageBranchSpecies(getInfoPages(WindowAbstractDatabase.Mode.Branches), new DatabaseTab(ExtraTrees.instance, "branches.species", 0));
-
- new PageBreeder(getInfoPages(WindowAbstractDatabase.Mode.Breeder), getUsername(), new DatabaseTab(ExtraTrees.instance, "breeder", 0));
-
- createMode(TreeMode.Fruit, new WindowAbstractDatabase.ModeWidgets(TreeMode.Fruit, this)
- {
- public void createListBox(IArea area)
- {
- this.listBox = new ControlListBox(this.modePage, area.x(), area.y(), area.w(), area.h(), 12.0F)
- {
- public IWidget createOption(ItemStack value, int y)
- {
- return new ControlItemStackOption((ControlList)getContent(), value, y);
- }
- };
- this.listBox.setOptions(((TreeBreedingSystem)WindowArboristDatabase.this.getBreedingSystem()).allFruits);
- }
- });
- createMode(TreeMode.Wood, new WindowAbstractDatabase.ModeWidgets(TreeMode.Wood, this)
- {
- public void createListBox(IArea area)
- {
- this.listBox = new ControlListBox(this.modePage, area.x(), area.y(), area.w(), area.h(), 12.0F)
- {
- public IWidget createOption(ItemStack value, int y)
- {
- return new ControlItemStackOption((ControlList)getContent(), value, y);
- }
- };
- this.listBox.setOptions(((TreeBreedingSystem)WindowArboristDatabase.this.getBreedingSystem()).allWoods);
- }
- });
- createMode(TreeMode.Planks, new WindowAbstractDatabase.ModeWidgets(TreeMode.Planks, this)
- {
- public void createListBox(IArea area)
- {
- this.listBox = new ControlListBox(this.modePage, area.x(), area.y(), area.w(), area.h(), 12.0F)
- {
- public IWidget createOption(ItemStack value, int y)
- {
- return new ControlItemStackOption((ControlList)getContent(), value, y);
- }
- };
- }
- });
- new PageFruit(getInfoPages(TreeMode.Fruit), new DatabaseTab(ExtraTrees.instance, "fruit.natural", 0), true);
- new PageFruit(getInfoPages(TreeMode.Fruit), new DatabaseTab(ExtraTrees.instance, "fruit.potential", 0), false);
-
- new PageWood(getInfoPages(TreeMode.Wood), new DatabaseTab(ExtraTrees.instance, "wood.natural", 0));
-
- new PagePlanksOverview(getInfoPages(TreeMode.Planks), new DatabaseTab(ExtraTrees.instance, "planks.overview", 0));
- new PagePlanksTrees(getInfoPages(TreeMode.Planks), new DatabaseTab(ExtraTrees.instance, "planks.natural", 1));
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "TreeDatabase";
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowBrewery.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowBrewery.java
deleted file mode 100644
index 89e4118880..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowBrewery.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.AbstractMod;
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachinePackage;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.machines.Brewery;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowBrewery
- extends Window
-{
- public WindowBrewery(EntityPlayer player, IInventory inventory, Side side)
- {
- super(228.0F, 218.0F, player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "Brewery";
- }
-
- public void initialiseClient()
- {
- setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
- new ControlSlotArray(this, 42, 32, 1, 3).create(Brewery.slotRecipeGrains);
- new ControlSlot(this, 16.0F, 41.0F).assign(Brewery.slotRecipeInput);
- new ControlSlot(this, 105.0F, 77.0F).assign(Brewery.slotRecipeYeast);
- new ControlLiquidTank(this, 76, 32).setTankID(Brewery.tankInput);
- new ControlLiquidTank(this, 162, 32).setTankID(Brewery.tankOutput);
- new ControlEnergyBar(this, 196, 32, 16, 60, Position.Bottom);
- new ControlBreweryProgress(this, 110.0F, 32.0F);
-
- new ControlSlotArray(this, (int)(getSize().x() / 2.0F - 81.0F), 104, 9, 1).create(Brewery.slotInventory);
-
- new ControlPlayerInventory(this);
- new ControlErrorState(this, 133.0F, 79.0F);
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowBrewery(player, inventory, side);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowDistillery.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowDistillery.java
deleted file mode 100644
index 2d002c2755..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowDistillery.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.AbstractMod;
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachinePackage;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.machines.Distillery;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowDistillery
- extends Window
-{
- public WindowDistillery(EntityPlayer player, IInventory inventory, Side side)
- {
- super(224.0F, 192.0F, player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "Distillery";
- }
-
- public void initialiseClient()
- {
- setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
-
- int x = 16;
-
- new ControlLiquidTank(this, x, 35).setTankID(Distillery.tankInput);
- x += 34;
- new ControlDistilleryProgress(this, x, 32.0F);
- x += 64;
- new ControlLiquidTank(this, x, 35).setTankID(Distillery.tankOutput);
- x += 34;
- new ControlEnergyBar(this, x, 36, 60, 16, Position.Left);
-
- new ControlPlayerInventory(this);
- new ControlErrorState(this, x + 21, 62.0F);
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowDistillery(player, inventory, side);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowLepidopteristDatabase.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowLepidopteristDatabase.java
deleted file mode 100644
index 5d5b6511ef..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowLepidopteristDatabase.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.Binnie;
-import binnie.core.AbstractMod;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.mod.database.DatabaseTab;
-import binnie.craftgui.mod.database.PageBranchOverview;
-import binnie.craftgui.mod.database.PageBranchSpecies;
-import binnie.craftgui.mod.database.PageBreeder;
-import binnie.craftgui.mod.database.PageSpeciesClassification;
-import binnie.craftgui.mod.database.PageSpeciesMutations;
-import binnie.craftgui.mod.database.PageSpeciesOverview;
-import binnie.craftgui.mod.database.PageSpeciesResultant;
-import binnie.craftgui.mod.database.WindowAbstractDatabase;
-import binnie.craftgui.mod.database.WindowAbstractDatabase.Mode;
-import binnie.extratrees.ExtraTrees;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-
-public class WindowLepidopteristDatabase
- extends WindowAbstractDatabase
-{
- public WindowLepidopteristDatabase(EntityPlayer player, Side side, boolean nei)
- {
- super(player, side, nei, Binnie.Genetics.mothBreedingSystem, 160.0F);
- }
-
- public static Window create(EntityPlayer player, Side side, boolean nei)
- {
- return new WindowLepidopteristDatabase(player, side, nei);
- }
-
- protected void addTabs()
- {
- new PageSpeciesOverview(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "butterfly.species.overview", 0));
- new PageSpeciesClassification(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "butterfly.species.classification", 0));
- new PageSpeciesImage(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "butterfly.species.specimen", 0));
- new PageSpeciesResultant(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "butterfly.species.resultant", 0));
- new PageSpeciesMutations(getInfoPages(WindowAbstractDatabase.Mode.Species), new DatabaseTab(ExtraTrees.instance, "butterfly.species.further", 0));
-
- new PageBranchOverview(getInfoPages(WindowAbstractDatabase.Mode.Branches), new DatabaseTab(ExtraTrees.instance, "butterfly.branches.overview", 0));
- new PageBranchSpecies(getInfoPages(WindowAbstractDatabase.Mode.Branches), new DatabaseTab(ExtraTrees.instance, "butterfly.branches.species", 0));
-
- new PageBreeder(getInfoPages(WindowAbstractDatabase.Mode.Breeder), getUsername(), new DatabaseTab(ExtraTrees.instance, "butterfly.breeder", 0));
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "MothDatabase";
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowLumbermill.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowLumbermill.java
deleted file mode 100644
index dc9bca1253..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowLumbermill.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.AbstractMod;
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachinePackage;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.machines.Lumbermill;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowLumbermill
- extends Window
-{
- public WindowLumbermill(EntityPlayer player, IInventory inventory, Side side)
- {
- super(220.0F, 192.0F, player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "Lumbermill";
- }
-
- public void initialiseClient()
- {
- setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
- new ControlSlot(this, 42.0F, 43.0F).assign(Lumbermill.slotWood);
- new ControlSlot(this, 148.0F, 43.0F).assign(Lumbermill.slotPlanks);
- new ControlSlot(this, 172.0F, 28.0F).assign(Lumbermill.slotBark);
- new ControlSlot(this, 172.0F, 58.0F).assign(Lumbermill.slotSawdust);
- new ControlLumbermillProgress(this, 70.0F, 43.0F);
- new ControlLiquidTank(this, 16, 32);
- new ControlEnergyBar(this, 8, 112, 16, 60, Position.Bottom);
- new ControlPlayerInventory(this);
- new ControlErrorState(this, 95.0F, 73.0F);
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowLumbermill(player, inventory, side);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowPress.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowPress.java
deleted file mode 100644
index 773bc70323..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowPress.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.AbstractMod;
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachinePackage;
-import binnie.core.machines.power.ErrorState.InsufficientPower;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.ContainerCraftGUI;
-import binnie.craftgui.minecraft.InventoryType;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.machines.Press;
-import binnie.extratrees.machines.Press.ComponentFruitPressLogic;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class WindowPress
- extends Window
-{
- public WindowPress(EntityPlayer player, IInventory inventory, Side side)
- {
- super(194.0F, 192.0F, player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "Press";
- }
-
- public void initialiseClient()
- {
- setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
- new ControlSlot(this, 24.0F, 52.0F).assign(Press.slotFruit);
- new ControlLiquidTank(this, 99, 32).setTankID(Press.tankWater);
- new ControlEnergyBar(this, 154, 32, 16, 60, Position.Bottom);
- new ControlPlayerInventory(this);
- new ControlErrorState(this, 128.0F, 54.0F);
- new ControlFruitPressProgress(this, 62.0F, 24.0F);
-
- ((Window)getSuperParent()).getContainer().getOrCreateSlot(InventoryType.Machine, Press.slotCurrent);
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowPress(player, inventory, side);
- }
-
- public void recieveGuiNBT(Side side, EntityPlayer player, String name, NBTTagCompound action)
- {
- Press.ComponentFruitPressLogic logic = (Press.ComponentFruitPressLogic)Machine.getInterface(Press.ComponentFruitPressLogic.class, getInventory());
- super.recieveGuiNBT(side, player, name, action);
- if ((side == Side.SERVER) && (name.equals("fruitpress-click"))) {
- if ((logic.canWork() == null) && ((logic.canProgress() == null) || ((logic.canProgress() instanceof ErrorState.InsufficientPower))))
- {
- logic.alterProgress(2.0F);
- }
- else if ((side == Side.SERVER) && (name.equals("clear-fruit")))
- {
- logic.setProgress(0.0F);
- getInventory().setInventorySlotContents(Press.slotCurrent, null);
- }
- }
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowSetSquare.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowSetSquare.java
deleted file mode 100644
index ba444d7b0f..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowSetSquare.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.minecraft.Window;
-import binnie.extratrees.ExtraTrees;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.world.World;
-
-public class WindowSetSquare
- extends Window
-{
- public WindowSetSquare(EntityPlayer player, IInventory inventory, Side side)
- {
- super(150.0F, 150.0F, player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return null;
- }
-
- public void initialiseClient() {}
-
- public static Window create(EntityPlayer player, World world, int x, int y, int z, Side side)
- {
- return new WindowSetSquare(player, null, side);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/dictionary/WindowWoodworker.java b/src/Java/binnie/craftgui/extratrees/dictionary/WindowWoodworker.java
deleted file mode 100644
index 9e9c6fb7d0..0000000000
--- a/src/Java/binnie/craftgui/extratrees/dictionary/WindowWoodworker.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package binnie.craftgui.extratrees.dictionary;
-
-import binnie.core.AbstractMod;
-import binnie.core.BinnieCore;
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachinePackage;
-import binnie.core.proxy.BinnieProxy;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.ControlTextEdit;
-import binnie.craftgui.controls.scroll.ControlScrollableContent;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.events.EventHandler.Origin;
-import binnie.craftgui.events.EventTextEdit;
-import binnie.craftgui.events.EventTextEdit.Handler;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.window.Panel;
-import binnie.extratrees.ExtraTrees;
-import binnie.extratrees.machines.Designer;
-import binnie.extratrees.machines.Designer.ComponentWoodworkerRecipe;
-import binnie.extratrees.machines.DesignerType;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowWoodworker
- extends Window
-{
- ControlTextEdit textEdit;
- ControlTileSelect tileSelect;
-
- public void initialiseClient()
- {
- setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
-
- new ControlText(this, new IArea(190.0F, 36.0F, 114.0F, 10.0F), BinnieCore.proxy.localise("gui.design"), TextJustification.TopCenter).setColour(4473924);
-
- new Panel(this, 188.0F, 48.0F, 118.0F, 126.0F, MinecraftGUI.PanelType.Gray);
-
- this.textEdit = new ControlTextEdit(this, 188.0F, 178.0F, 118.0F, 12.0F);
-
- ControlScrollableContent scroll = new ControlScrollableContent(this, 190.0F, 50.0F, 114.0F, 122.0F, 12.0F);
-
-
-
- this.tileSelect = new ControlTileSelect(scroll, 0.0F, 0.0F);
-
- scroll.setScrollableContent(this.tileSelect);
-
-
-
-
-
- new ControlPlayerInventory(this).setPosition(new IPoint(14.0F, 96.0F));
-
- new ControlErrorState(this, 76.0F, 65.0F);
- ControlRecipeSlot slotFinished;
- if (getInventory() != null)
- {
- ControlSlot slotWood1 = new ControlSlot(this, 22.0F, 34.0F);
- slotWood1.assign(Designer.design1Slot);
- ControlSlot slotWood2 = new ControlSlot(this, 62.0F, 34.0F);
- slotWood2.assign(Designer.design2Slot);
-
- ControlSlot slotBeeswax = new ControlSlot(this, 42.0F, 64.0F);
- slotBeeswax.assign(Designer.beeswaxSlot);
-
- slotFinished = new ControlRecipeSlot(this, 112, 34);
- }
- }
-
- public WindowWoodworker(EntityPlayer player, IInventory inventory, Side side)
- {
- super(320.0F, 216.0F, player, inventory, side);
-
- addEventHandler(new EventTextEdit.Handler()
- {
- public void onEvent(EventTextEdit event)
- {
- WindowWoodworker.this.tileSelect.refresh((String)event.getValue());
- }
- }.setOrigin(EventHandler.Origin.DirectChild, this));
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowWoodworker(player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "Woodworker";
- }
-
- public DesignerType getDesignerType()
- {
- return ((Designer.ComponentWoodworkerRecipe)Machine.getInterface(Designer.ComponentWoodworkerRecipe.class, getInventory())).getDesignerType();
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/ControlDropDownMenu.java b/src/Java/binnie/craftgui/extratrees/kitchen/ControlDropDownMenu.java
deleted file mode 100644
index 0d9c982400..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/ControlDropDownMenu.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.window.Panel;
-
-public class ControlDropDownMenu
- extends Panel
-{
- public ControlDropDownMenu(IWidget parent, float x, float y, float width, float height)
- {
- super(parent, x, y, width, 2.0F, MinecraftGUI.PanelType.Gray);
- addAttribute(Attribute.CanFocus);
- }
-
- public boolean stayOpenOnChildClick = false;
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/ControlDropdownButton.java b/src/Java/binnie/craftgui/extratrees/kitchen/ControlDropdownButton.java
deleted file mode 100644
index 069272b82a..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/ControlDropdownButton.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.craftgui.controls.button.ControlButton;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.Window;
-
-public abstract class ControlDropdownButton
- extends ControlButton
-{
- public ControlDropdownButton(IWidget parent, float x, float y, float width, float height, String text)
- {
- super(parent, x, y, width, height, text);
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- ControlDropDownMenu menu = (ControlDropDownMenu)ControlDropdownButton.this.getWidget(ControlDropDownMenu.class);
- ControlDropdownButton.this.deleteChild((IWidget)ControlDropdownButton.this.getWidget(ControlDropDownMenu.class));
- if (ControlDropdownButton.this.getWidget(ControlDropDownMenu.class) == null)
- {
- menu = ControlDropdownButton.this.createDropDownMenu();
- Window.get(ControlDropdownButton.this.getWidget()).setFocusedWidget(menu);
- }
- else
- {
- ControlDropdownButton.this.deleteChild((IWidget)ControlDropdownButton.this.getWidget(ControlDropDownMenu.class));
- }
- }
- });
- }
-
- public abstract ControlDropDownMenu createDropDownMenu();
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/ControlFluidDisplay.java b/src/Java/binnie/craftgui/extratrees/kitchen/ControlFluidDisplay.java
deleted file mode 100644
index 7ec1124226..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/ControlFluidDisplay.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.ITooltip;
-import binnie.craftgui.core.ITopLevelWidget;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.minecraft.Window;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import org.lwjgl.opengl.GL11;
-
-public class ControlFluidDisplay
- extends Control
- implements ITooltip
-{
- FluidStack itemStack = null;
- public boolean hastooltip = false;
-
- public void setTooltip()
- {
- this.hastooltip = true;
- addAttribute(Attribute.MouseOver);
- }
-
- public ControlFluidDisplay(IWidget parent, float f, float y)
- {
- this(parent, f, y, 16.0F);
- }
-
- public ControlFluidDisplay(IWidget parent, float f, float y, FluidStack stack, boolean tooltip)
- {
- this(parent, f, y, 16.0F);
- setItemStack(stack);
- if (tooltip) {
- setTooltip();
- }
- }
-
- public ControlFluidDisplay(IWidget parent, float x, float y, float size)
- {
- super(parent, x, y, size, size);
- }
-
- public void onRenderForeground()
- {
- if (this.itemStack == null) {
- return;
- }
- IPoint relativeToWindow = getAbsolutePosition().sub(getSuperParent().getPosition());
- if ((relativeToWindow.x() > Window.get(this).getSize().x() + 100.0F) || (relativeToWindow.y() > Window.get(this).getSize().y() + 100.0F)) {
- return;
- }
- if (this.itemStack != null)
- {
- Fluid fluid = this.itemStack.getFluid();
-
- int hex = fluid.getColor(this.itemStack);
-
- int r = (hex & 0xFF0000) >> 16;
- int g = (hex & 0xFF00) >> 8;
- int b = hex & 0xFF;
-
- IIcon icon = this.itemStack.getFluid().getIcon(this.itemStack);
-
- GL11.glColor4f(r / 255.0F, g / 255.0F, b / 255.0F, 1.0F);
-
- GL11.glEnable(3042);
-
- GL11.glBlendFunc(770, 771);
- if (getSize().x() != 16.0F)
- {
- GL11.glPushMatrix();
- float scale = getSize().x() / 16.0F;
- GL11.glScalef(scale, scale, 1.0F);
- CraftGUI.Render.iconBlock(IPoint.ZERO, this.itemStack.getFluid().getIcon(this.itemStack));
- GL11.glPopMatrix();
- }
- else
- {
- CraftGUI.Render.iconBlock(IPoint.ZERO, this.itemStack.getFluid().getIcon(this.itemStack));
- }
- GL11.glDisable(3042);
- }
- }
-
- public void setItemStack(FluidStack itemStack)
- {
- this.itemStack = itemStack;
- }
-
- public void getTooltip(Tooltip tooltip)
- {
- if ((this.hastooltip) && (this.itemStack != null)) {
- tooltip.add(this.itemStack.getLocalizedName());
- }
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotFluid.java b/src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotFluid.java
deleted file mode 100644
index 5cd82c39de..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotFluid.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.ITooltip;
-import binnie.craftgui.core.ITopLevelWidget;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.events.EventWidget.ChangeSize;
-import binnie.craftgui.events.EventWidget.ChangeSize.Handler;
-import binnie.craftgui.resource.minecraft.CraftGUITexture;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-
-public class ControlSlotFluid
- extends Control
- implements ITooltip
-{
- ControlFluidDisplay itemDisplay;
- FluidStack fluidStack;
-
- public ControlSlotFluid(IWidget parent, int x, int y, FluidStack fluid)
- {
- this(parent, x, y, 18, fluid);
- }
-
- public ControlSlotFluid(IWidget parent, int x, int y, int size, FluidStack fluid)
- {
- super(parent, x, y, size, size);
- addAttribute(Attribute.MouseOver);
- this.itemDisplay = new ControlFluidDisplay(this, 1.0F, 1.0F, size - 2);
- this.fluidStack = fluid;
-
- addSelfEventHandler(new EventWidget.ChangeSize.Handler()
- {
- public void onEvent(EventWidget.ChangeSize event)
- {
- if (ControlSlotFluid.this.itemDisplay != null) {
- ControlSlotFluid.this.itemDisplay.setSize(ControlSlotFluid.this.getSize().sub(new IPoint(2.0F, 2.0F)));
- }
- }
- });
- }
-
- public void onRenderBackground()
- {
- int size = (int)getSize().x();
- CraftGUI.Render.texture(CraftGUITexture.Slot, getArea());
- if (getSuperParent().getMousedOverWidget() == this) {
- CraftGUI.Render.gradientRect(new IArea(new IPoint(1.0F, 1.0F), getArea().size().sub(new IPoint(2.0F, 2.0F))), -2130706433, -2130706433);
- }
- }
-
- public void onUpdateClient()
- {
- super.onUpdateClient();
- this.itemDisplay.setItemStack(getFluidStack());
- }
-
- public void getTooltip(Tooltip tooltip)
- {
- FluidStack item = getFluidStack();
- if (item == null) {
- return;
- }
- tooltip.add(item.getFluid().getLocalizedName());
- }
-
- public FluidStack getFluidStack()
- {
- return this.fluidStack;
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotGlassware.java b/src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotGlassware.java
deleted file mode 100644
index fa7cd3df84..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/ControlSlotGlassware.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.craftgui.controls.core.IControlValue;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.minecraft.control.ControlSlotBase;
-import binnie.extratrees.alcohol.Glassware;
-import net.minecraft.item.ItemStack;
-
-public class ControlSlotGlassware
- extends ControlSlotBase
- implements IControlValue<Glassware>
-{
- Glassware glassware;
-
- public ControlSlotGlassware(IWidget parent, int x, int y, Glassware glassware)
- {
- super(parent, x, y);
- this.glassware = glassware;
- }
-
- public Glassware getValue()
- {
- return this.glassware;
- }
-
- public void setValue(Glassware value)
- {
- this.glassware = value;
- }
-
- public ItemStack getItemStack()
- {
- return this.glassware.get(1);
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/ControlTankSlot.java b/src/Java/binnie/craftgui/extratrees/kitchen/ControlTankSlot.java
deleted file mode 100644
index c1caf1772f..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/ControlTankSlot.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.core.machines.power.TankInfo;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.ContainerCraftGUI;
-import binnie.craftgui.minecraft.Window;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-
-public class ControlTankSlot
- extends ControlSlotFluid
-{
- int tankID = 0;
-
- public ControlTankSlot(IWidget parent, int x, int y, int i)
- {
- super(parent, x, y, null);
- this.tankID = i;
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- if (event.getButton() == 0)
- {
- NBTTagCompound nbt = new NBTTagCompound();
- nbt.setByte("id", (byte)ControlTankSlot.this.tankID);
- Window.get(ControlTankSlot.this.getWidget()).sendClientAction("tank-click", nbt);
- }
- }
- });
- }
-
- public void onUpdateClient()
- {
- this.fluidStack = Window.get(this).getContainer().getTankInfo(this.tankID).liquid;
- int height = (int)(16.0F * ((this.fluidStack == null ? 0 : this.fluidStack.amount) / 1000.0F));
- this.itemDisplay.setCroppedZone(this.itemDisplay, new IArea(0.0F, 16 - height, 16.0F, 16.0F));
- super.onUpdateClient();
- }
-
- public void onRenderBackground()
- {
- super.onRenderBackground();
- }
-}
diff --git a/src/Java/binnie/craftgui/extratrees/kitchen/WindowBottleRack.java b/src/Java/binnie/craftgui/extratrees/kitchen/WindowBottleRack.java
deleted file mode 100644
index 8fffff9ed2..0000000000
--- a/src/Java/binnie/craftgui/extratrees/kitchen/WindowBottleRack.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package binnie.craftgui.extratrees.kitchen;
-
-import binnie.core.AbstractMod;
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachinePackage;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.extratrees.ExtraTrees;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowBottleRack
- extends Window
-{
- public WindowBottleRack(EntityPlayer player, IInventory inventory, Side side)
- {
- super(248.0F, 180.0F, player, inventory, side);
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowBottleRack(player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return ExtraTrees.instance;
- }
-
- protected String getName()
- {
- return "BottleBank";
- }
-
- public void initialiseClient()
- {
- setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
- for (int i = 0; i < 36; i++)
- {
- int x = i % 12;
- int y = i / 12;
- new ControlTankSlot(this, 16 + x * 18, 32 + y * 18, i);
- }
- new ControlPlayerInventory(this);
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/ControlGene.java b/src/Java/binnie/craftgui/genetics/machine/ControlGene.java
deleted file mode 100644
index a5c830154e..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/ControlGene.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.Binnie;
-import binnie.core.genetics.BreedingSystem;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.core.resource.BinnieIcon;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.controls.core.IControlValue;
-import binnie.craftgui.core.Attribute;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.ITooltip;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.events.EventMouse.Down;
-import binnie.craftgui.events.EventMouse.Down.Handler;
-import binnie.craftgui.minecraft.Window;
-import binnie.genetics.api.IGene;
-import binnie.genetics.core.GeneticsTexture;
-import binnie.genetics.genetics.Engineering;
-import forestry.api.genetics.IChromosomeType;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class ControlGene
- extends Control
- implements IControlValue<IGene>, ITooltip
-{
- IGene gene;
-
- public void getTooltip(Tooltip tooltip)
- {
- String cName = Binnie.Genetics.getSystem(this.gene.getSpeciesRoot()).getChromosomeName(this.gene.getChromosome());
- tooltip.add(cName + ": " + this.gene.getName());
- if ((isMouseOver()) && (canFill(Window.get(this).getHeldItemStack())))
- {
- tooltip.add("Left click to assign gene");
- IGene existingGene = Engineering.getGene(Window.get(this).getHeldItemStack(), this.gene.getChromosome().ordinal());
- if (existingGene == null) {
- return;
- }
- String dName = Binnie.Genetics.getSystem(this.gene.getSpeciesRoot()).getChromosomeName(this.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()));
- }
-
- protected ControlGene(IWidget parent, float x, float y)
- {
- super(parent, x, y, 16.0F, 16.0F);
- addAttribute(Attribute.MouseOver);
-
- addSelfEventHandler(new EventMouse.Down.Handler()
- {
- public void onEvent(EventMouse.Down event)
- {
- if (ControlGene.this.canFill(Window.get(ControlGene.this.getWidget()).getHeldItemStack()))
- {
- NBTTagCompound action = new NBTTagCompound();
-
- NBTTagCompound geneNBT = new NBTTagCompound();
- ControlGene.this.getValue().writeToNBT(geneNBT);
-
- action.setTag("gene", geneNBT);
-
- Window.get(ControlGene.this.getWidget()).sendClientAction("gene-select", action);
- }
- }
- });
- }
-
- public IGene getValue()
- {
- return this.gene;
- }
-
- public void setValue(IGene value)
- {
- this.gene = value;
- }
-
- public void onRenderForeground() {}
-
- public void onRenderBackground()
- {
- 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());
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/ControlGeneScroll.java b/src/Java/binnie/craftgui/genetics/machine/ControlGeneScroll.java
deleted file mode 100644
index a779933050..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/ControlGeneScroll.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.Binnie;
-import binnie.core.genetics.BreedingSystem;
-import binnie.core.genetics.Gene;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.core.Control;
-import binnie.craftgui.controls.core.IControlValue;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.minecraft.Window;
-import binnie.genetics.genetics.GeneTracker;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IChromosomeType;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-public class ControlGeneScroll
- extends Control
- implements IControlValue<BreedingSystem>
-{
- protected ControlGeneScroll(IWidget parent, float x, float y, float w, float h)
- {
- super(parent, x, y, w, h);
- }
-
- private String filter = "";
- private BreedingSystem system = null;
-
- public void setFilter(String filter)
- {
- this.filter = filter.toLowerCase();
- refresh();
- }
-
- public void setGenes(BreedingSystem system)
- {
- this.system = system;
- refresh();
- }
-
- public void refresh()
- {
- deleteAllChildren();
-
- GeneTracker tracker = GeneTracker.getTracker(Window.get(this).getWorld(), Window.get(this).getUsername());
-
- Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(this.system.getSpeciesRoot());
-
- int x = 0;
- int y = 0;
-
- boolean isNEI = ((WindowGeneBank)Window.get(this)).isNei;
- for (Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet())
- {
- List<IAllele> discovered = new ArrayList();
- for (IAllele allele : (List)entry.getValue())
- {
- Gene gene = new Gene(allele, (IChromosomeType)entry.getKey(), this.system.getSpeciesRoot());
- if (((isNEI) || (tracker.isSequenced(new Gene(allele, (IChromosomeType)entry.getKey(), this.system.getSpeciesRoot())))) && (gene.getName().toLowerCase().contains(this.filter))) {
- discovered.add(allele);
- }
- }
- if (discovered.size() != 0)
- {
- x = 0;
- new ControlText(this, new IPoint(x, y), this.system.getChromosomeName((IChromosomeType)entry.getKey()));
- y += 12;
- for (IAllele allele : discovered)
- {
- if (x + 18 > getSize().x())
- {
- y += 20;
- x = 0;
- }
- new ControlGene(this, x, y).setValue(new Gene(allele, (IChromosomeType)entry.getKey(), this.system.getSpeciesRoot()));
- x += 18;
- }
- y += 24;
- }
- }
- setSize(new IPoint(getSize().x(), y));
- }
-
- public void setValue(BreedingSystem system)
- {
- setGenes(system);
- }
-
- public BreedingSystem getValue()
- {
- return this.system;
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/ControlProcessTemporary.java b/src/Java/binnie/craftgui/genetics/machine/ControlProcessTemporary.java
deleted file mode 100644
index 43e32dc9ad..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/ControlProcessTemporary.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.minecraft.control.ControlMachineProgress;
-
-public class ControlProcessTemporary
- extends ControlMachineProgress
-{
- public ControlProcessTemporary(IWidget parent, int x, int y, int width, int height)
- {
- super(parent, x, y, null, null, null);
- setSize(new IPoint(width, height));
- }
-
- public void onRenderBackground()
- {
- CraftGUI.Render.solid(getArea(), -4868683);
-
- float w = getSize().y() * this.progress / 100.0F;
-
- CraftGUI.Render.solid(new IArea(getArea().x(), getArea().y(), w, getArea().h()), -65536);
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/ControlSequencerProgress.java b/src/Java/binnie/craftgui/genetics/machine/ControlSequencerProgress.java
deleted file mode 100644
index 1a80f71676..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/ControlSequencerProgress.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.machines.IMachine;
-import binnie.core.machines.Machine;
-import binnie.core.machines.MachineUtil;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlProgressBase;
-import binnie.craftgui.window.Panel;
-import java.util.Random;
-import net.minecraft.item.ItemStack;
-
-public class ControlSequencerProgress
- extends ControlProgressBase
-{
- ControlText textControl;
-
- public ControlSequencerProgress(IWidget parent, int x, int y)
- {
- super(parent, x, y, 100.0F, 52.0F);
-
- 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);
- }
-
- public void onUpdateClient()
- {
- super.onUpdateClient();
-
- ItemStack stack = Machine.getMachine(Window.get(this).getInventory()).getMachineUtil().getStack(5);
- if (stack == null)
- {
- this.textControl.setValue("");
- }
- else
- {
- Random rand = new Random(stack.getDisplayName().length());
-
- String text = "";
- String[] codes = { "A", "T", "G", "C" };
- String[] colors = { "a", "d", "b", "c" };
- for (int i = 0; i < 65; i++)
- {
- int k = rand.nextInt(4);
- String code = codes[k];
- if (rand.nextFloat() < this.progress)
- {
- String col = "§" + colors[k];
- text = text + "§r" + col + "§l" + code;
- }
- else
- {
- text = text + "§r§7§k§l" + code;
- }
- }
- this.textControl.setValue(text);
- }
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/ControlSplicerProgress.java b/src/Java/binnie/craftgui/genetics/machine/ControlSplicerProgress.java
deleted file mode 100644
index 7afa16f31f..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/ControlSplicerProgress.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.machines.power.ProcessInfo;
-import binnie.craftgui.core.CraftGUI;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.renderer.Renderer;
-import binnie.craftgui.minecraft.control.ControlProgressBase;
-
-public class ControlSplicerProgress
- extends ControlProgressBase
-{
- float strength = 0.0F;
-
- public ControlSplicerProgress(IWidget parent, float x, float y, float w, float h)
- {
- super(parent, x, y, w, h);
- this.strength = 0.0F;
- }
-
- public void onRenderBackground()
- {
- 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++)
- {
- int seed = 432523;
- int[] colours = { 10027008, 30464, 255, 10057472 };
- int c1 = colours[((int)Math.abs(13.0D * Math.sin(i) + 48.0D * Math.cos(i) + 25.0D * Math.sin(7 * i)) % 4)];
- int c2 = colours[((int)Math.abs(23.0D * Math.sin(i) + 28.0D * Math.cos(i) + 15.0D * Math.sin(7 * i)) % 4)];
- int c3 = colours[((int)Math.abs(43.0D * Math.sin(i) + 38.0D * Math.cos(i) + 55.0D * Math.sin(7 * i)) % 4)];
- int c4 = colours[((int)Math.abs(3.0D * Math.sin(i) + 18.0D * Math.cos(i) + 35.0D * Math.sin(7 * i)) % 4)];
-
- float y = oy + i * spacing;
- if ((y > -range / 2.0F) && (y < range / 2.0F))
- {
- 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(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);
- }
- }
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowAcclimatiser.java b/src/Java/binnie/craftgui/genetics/machine/WindowAcclimatiser.java
deleted file mode 100644
index 8ed95dd0ef..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowAcclimatiser.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extrabees.core.ExtraBeeTexture;
-import binnie.genetics.Genetics;
-import binnie.genetics.machine.Acclimatiser;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowAcclimatiser
- extends WindowMachine
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowAcclimatiser(player, inventory, side);
- }
-
- public WindowAcclimatiser(EntityPlayer player, IInventory inventory, Side side)
- {
- super(280, 198, player, inventory, side);
- }
-
- 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 final int[] slotReserve = { 0, 1, 2, 3 };
- public static final int slotTarget = 4;
- public static final int[] slotAcclimatiser = { 5, 6, 7 };
- public static final int[] slotDone = { 8, 9, 10, 11 };
-
- public void initialiseClient()
- {
- setTitle("Acclimatiser");
-
- int x = 16;
- int y = 32;
-
- new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.slotReserve);
-
- x += 54;
-
- new ControlSlot(this, x + 18, y).assign(4);
- new ControlSlotArray(this, x, y + 18 + 18, 3, 1).create(Acclimatiser.slotAcclimatiser);
-
- x += 72;
-
- new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.slotDone);
-
-
- new ControlEnergyBar(this, 21, 115, 16, 60, Position.Bottom);
-
- new ControlErrorState(this, 181.0F, 83.0F);
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Acclimatiser";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Acclimatiser";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowAnalyser.java b/src/Java/binnie/craftgui/genetics/machine/WindowAnalyser.java
deleted file mode 100644
index c1a2ac5305..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowAnalyser.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlProgress;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.minecraft.control.ControlSlotCharge;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.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
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowAnalyser(player, inventory, side);
- }
-
- 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 WindowAnalyser(EntityPlayer player, IInventory inventory, Side side)
- {
- super(220, 210, player, inventory, side);
- }
-
- public void initialiseClient()
- {
- ProgressBase = new StandardTexture(0, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
- Progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
-
-
-
-
- int x = 16;
- int y = 32;
-
- new ControlSlotArray(this, x, y, 2, 3).create(Analyser.slotReserve);
-
-
- x += 28;
-
- new ControlSlot(this, x, y + 54 + 8).assign(13);
- new ControlSlotCharge(this, x + 20, y + 54 + 8, 13).setColour(10040319);
- new ControlEnergyBar(this, x + 24 + 16, y + 54 + 8 + 1, 60, 16, Position.Left);
- new ControlErrorState(this, x + 24 + 16 + 60 + 16, y + 54 + 8 + 1);
-
-
- x -= 28;
-
- new ControlIconDisplay(this, x + 36 + 2, y + 18, GUIIcon.ArrowRight.getIcon());
-
-
- x += 56;
-
- new Panel(this, x, y, 76.0F, 50.0F, MinecraftGUI.PanelType.Tinted);
-
- new ControlProgress(this, x + 5, y + 5, ProgressBase, Progress, Position.Left);
-
- new ControlSlot(this, x + 38 - 9, y + 25 - 9).assign(6);
-
- new ControlIconDisplay(this, x + 76 + 2, y + 18, GUIIcon.ArrowRight.getIcon());
-
-
- x += 96;
-
-
-
- new ControlSlotArray(this, x, y, 2, 3).create(Analyser.slotFinished);
-
-
- x += 52;
-
- setTitle("Analyser");
-
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Analyser";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Analyser";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowGeneBank.java b/src/Java/binnie/craftgui/genetics/machine/WindowGeneBank.java
deleted file mode 100644
index e13bca4ce5..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowGeneBank.java
+++ /dev/null
@@ -1,256 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.Binnie;
-import binnie.core.AbstractMod;
-import binnie.core.genetics.BreedingSystem;
-import binnie.core.genetics.Gene;
-import binnie.core.genetics.ManagerGenetics;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.controls.ControlTextEdit;
-import binnie.craftgui.controls.scroll.ControlScrollableContent;
-import binnie.craftgui.controls.tab.ControlTab;
-import binnie.craftgui.controls.tab.ControlTabBar;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.Tooltip;
-import binnie.craftgui.core.geometry.IPoint;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.events.EventHandler.Origin;
-import binnie.craftgui.events.EventTextEdit;
-import binnie.craftgui.events.EventTextEdit.Handler;
-import binnie.craftgui.events.EventValueChanged;
-import binnie.craftgui.events.EventValueChanged.Handler;
-import binnie.craftgui.minecraft.MinecraftGUI.PanelType;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlTabIcon;
-import binnie.craftgui.window.Panel;
-import binnie.genetics.Genetics;
-import binnie.genetics.genetics.Engineering;
-import binnie.genetics.genetics.GeneTracker;
-import cpw.mods.fml.relauncher.Side;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IChromosomeType;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.IIcon;
-
-public class WindowGeneBank
- extends WindowMachine
-{
- public static IIcon[] iconsDNA;
- public boolean isNei;
- ControlGeneScroll genes;
-
- public void recieveGuiNBT(Side side, EntityPlayer player, String name, NBTTagCompound action)
- {
- super.recieveGuiNBT(side, player, name, action);
- if ((side == Side.SERVER) && (name.equals("gene-select")))
- {
- Gene gene = new Gene(action.getCompoundTag("gene"));
- if ((gene != null) && (!gene.isCorrupted()))
- {
- 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);
- }
- }
- }
- }
-
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowGeneBank(player, inventory, side, false);
- }
-
- public WindowGeneBank(EntityPlayer player, IInventory inventory, Side side, boolean isNEI)
- {
- super(320, 224, player, inventory, side);
- this.isNei = isNEI;
- }
-
- public void initialiseServer()
- {
- GeneTracker tracker = GeneTracker.getTracker(getWorld(), getUsername());
- if (tracker != null) {
- tracker.synchToPlayer(getPlayer());
- }
- }
-
- public void initialiseClient()
- {
- setTitle("Gene Bank");
-
- addEventHandler(new EventValueChanged.Handler()
- {
- public void onEvent(EventValueChanged event)
- {
- if ((event.value instanceof BreedingSystem)) {
- WindowGeneBank.this.genes.setValue((BreedingSystem)event.value);
- }
- }
- });
- int boxX = 100;
-
- int x = 16;
- int y = 32;
-
- new ControlPlayerInventory(this, x, y);
-
- x += 124;
-
- boxX = x;
-
- 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);
- 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()
- {
- public void onEvent(EventTextEdit event)
- {
- WindowGeneBank.this.genes.setFilter((String)event.getValue());
- }
- }.setOrigin(EventHandler.Origin.Self, edit));
-
-
-
- this.genes = new ControlGeneScroll(scroll, 1.0F, 1.0F, geneBoxWidth, 116.0F);
- scroll.setScrollableContent(this.genes);
-
-
-
-
-
- this.genes.setGenes(Binnie.Genetics.beeBreedingSystem);
-
- ControlTabBar<BreedingSystem> tabBar = new ControlTabBar(this, boxX, 32.0F, 24.0F, 120.0F, Position.Left)
- {
- public ControlTab<BreedingSystem> createTab(float x, float y, float w, float h, BreedingSystem value)
- {
- new ControlTabIcon(this, x, y, w, h, value)
- {
- public void getTooltip(Tooltip tooltip)
- {
- tooltip.add(((BreedingSystem)getValue()).toString());
-
- int totalGenes = 0;
- int seqGenes = 0;
-
- GeneTracker tracker = GeneTracker.getTracker(WindowGeneBank.this.getWorld(), WindowGeneBank.this.getUsername());
-
- Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(((BreedingSystem)getValue()).getSpeciesRoot());
- for (Iterator i$ = genes.entrySet().iterator(); i$.hasNext();)
- {
- entry = (Map.Entry)i$.next();
- totalGenes += ((List)entry.getValue()).size();
- for (IAllele allele : (List)entry.getValue())
- {
- Gene gene = new Gene(allele, (IChromosomeType)entry.getKey(), ((BreedingSystem)getValue()).getSpeciesRoot());
- if (tracker.isSequenced(gene)) {
- seqGenes++;
- }
- }
- }
- Map.Entry<IChromosomeType, List<IAllele>> entry;
- tooltip.add("" + seqGenes + "/" + totalGenes + " Genes");
- }
- };
- }
- };
- tabBar.setValues(Binnie.Genetics.getActiveSystems());
-
- tabBar.setValue(Binnie.Genetics.beeBreedingSystem);
-
- boxX -= 8;
-
- ControlTabBar<String> infoTabs = new ControlTabBar(this, boxX + 8, 160.0F, 16.0F, 50.0F, Position.Left);
-
- infoTabs.setValues(Arrays.asList(new String[] { "Stats", "Ranking" }));
-
- infoTabs.setValue("Info");
-
- Panel panelProject = new Panel(this, boxX + 24, 160.0F, geneBoxWidth + 20, 50.0F, MinecraftGUI.PanelType.Black);
-
- int totalGenes = 0;
- int seqGenes = 0;
- for (Iterator i$ = Binnie.Genetics.getActiveSystems().iterator(); i$.hasNext();)
- {
- system = (BreedingSystem)i$.next();
-
- tracker = GeneTracker.getTracker(getWorld(), getUsername());
-
- Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(system.getSpeciesRoot());
- for (i$ = genes.entrySet().iterator(); i$.hasNext();)
- {
- entry = (Map.Entry)i$.next();
- totalGenes += ((List)entry.getValue()).size();
- for (IAllele allele : (List)entry.getValue())
- {
- Gene gene = new Gene(allele, (IChromosomeType)entry.getKey(), system.getSpeciesRoot());
- if (tracker.isSequenced(gene)) {
- seqGenes++;
- }
- }
- }
- }
- BreedingSystem system;
- GeneTracker tracker;
- Iterator i$;
- Map.Entry<IChromosomeType, List<IAllele>> entry;
- new ControlText(panelProject, new IPoint(4.0F, 4.0F), "§nFull Genome Project");
- new ControlText(panelProject, new IPoint(4.0F, 18.0F), "§oSequenced §r" + seqGenes + "/" + totalGenes + " §oGenes");
- }
-
- public String getTitle()
- {
- return "Gene Bank";
- }
-
- public static class ChromosomeType
- {
- IChromosomeType chromosome;
- BreedingSystem system;
-
- public ChromosomeType(IChromosomeType chromosome, BreedingSystem system)
- {
- this.chromosome = chromosome;
- this.system = system;
- }
-
- public String toString()
- {
- return this.system.getChromosomeName(this.chromosome);
- }
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "GeneBank";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowGeneBankNEI.java b/src/Java/binnie/craftgui/genetics/machine/WindowGeneBankNEI.java
deleted file mode 100644
index 08e680c68d..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowGeneBankNEI.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.craftgui.minecraft.Window;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowGeneBankNEI
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowGeneBank(player, inventory, side, true);
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowGeneProject.java b/src/Java/binnie/craftgui/genetics/machine/WindowGeneProject.java
deleted file mode 100644
index c79e6f7d0c..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowGeneProject.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.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
-{
- public WindowGeneProject(EntityPlayer player, IInventory inventory, Side side)
- {
- super(100.0F, 100.0F, player, inventory, side);
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "GeneProjects";
- }
-
- public void initialiseClient()
- {
- setTitle("Gene Projects");
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowGenepool.java b/src/Java/binnie/craftgui/genetics/machine/WindowGenepool.java
deleted file mode 100644
index c91b95c0bb..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowGenepool.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlMachineProgress;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.minecraft.control.ControlSlotCharge;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extrabees.core.ExtraBeeTexture;
-import binnie.genetics.Genetics;
-import binnie.genetics.machine.Genepool;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowGenepool
- extends WindowMachine
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowGenepool(player, inventory, side);
- }
-
- public WindowGenepool(EntityPlayer player, IInventory inventory, Side side)
- {
- super(280, 198, player, inventory, side);
- }
-
- 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 void initialiseClient()
- {
- setTitle("Genepool");
-
- int x = 16;
- int y = 32;
-
- new ControlLiquidTank(this, x, y).setTankID(1);
-
- x += 26;
-
- new ControlSlotArray(this, x, y + 3, 2, 3).create(Genepool.slotReserve);
-
- x += 38;
-
- new ControlIconDisplay(this, x, y + 3 + 18 + 1, GUIIcon.ArrowRight.getIcon());
-
- x += 18;
-
- new ControlSlot(this, x, y + 3 + 18).assign(0);
-
- x += 18;
-
- new ControlMachineProgress(this, x, y + 19, ProgressBase, Progress, Position.Left);
-
- x += 130;
-
- new ControlLiquidTank(this, x, y).setTankID(0);
-
-
- new ControlEnergyBar(this, 21, 115, 16, 60, Position.Bottom);
-
- new ControlSlot(this, 121.0F, 82.0F).assign(7);
- new ControlSlotCharge(this, 143, 82, 7).setColour(15722671);
-
-
- new ControlErrorState(this, 181.0F, 83.0F);
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Genepool";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Genepool";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowGenomeAssembler.java b/src/Java/binnie/craftgui/genetics/machine/WindowGenomeAssembler.java
deleted file mode 100644
index d6e31c3c69..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowGenomeAssembler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.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 WindowGenomeAssembler
- extends WindowMachine
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowGenomeAssembler(player, inventory, side);
- }
-
- public WindowGenomeAssembler(EntityPlayer player, IInventory inventory, Side side)
- {
- super(320, 240, player, inventory, side);
- }
-
- public String getTitle()
- {
- return "Genome Assembler";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "GenomeAssembler";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowIncubator.java b/src/Java/binnie/craftgui/genetics/machine/WindowIncubator.java
deleted file mode 100644
index f52a0b1717..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowIncubator.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlMachineProgress;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.resource.Texture;
-import binnie.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
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowIncubator(player, inventory, side);
- }
-
- public WindowIncubator(EntityPlayer player, IInventory inventory, Side side)
- {
- super(228, 196, player, inventory, side);
- }
-
- static Texture ProgressBase = new StandardTexture(0, 91, 38, 32, GeneticsTexture.GUIProcess);
- static Texture Progress = new StandardTexture(38, 91, 38, 32, GeneticsTexture.GUIProcess);
-
- public void initialiseClient()
- {
- setTitle("Incubator");
-
- int x = 16;
- int y = 32;
-
-
- new ControlLiquidTank(this, x, y).setTankID(0);
-
- x += 26;
-
- new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.slotQueue);
-
- x += 20;
-
- new ControlIconDisplay(this, x, y + 3 + 10, GUIIcon.ArrowRight.getIcon());
-
- x += 18;
-
- new ControlMachineProgress(this, x, y + 6, ProgressBase, Progress, Position.Left);
-
- new ControlSlot(this, x + 11, y + 3 + 10).assign(3);
-
- x += 40;
-
- new ControlIconDisplay(this, x, y + 3 + 10, GUIIcon.ArrowRight.getIcon());
-
- x += 18;
-
- new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.slotOutput);
-
- x += 26;
-
- new ControlLiquidTank(this, x, y).setTankID(1);
-
- x += 34;
-
- new ControlEnergyBar(this, x, y + 3, 16, 54, Position.Bottom);
-
- new ControlErrorState(this, 91.0F, 82.0F);
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Incubator";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Incubator";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowInoculator.java b/src/Java/binnie/craftgui/genetics/machine/WindowInoculator.java
deleted file mode 100644
index 894170efd0..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowInoculator.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.CraftGUIUtil;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlMachineProgress;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.resource.Texture;
-import binnie.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
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowInoculator(player, inventory, side);
- }
-
- public WindowInoculator(EntityPlayer player, IInventory inventory, Side side)
- {
- super(266, 240, player, inventory, side);
- }
-
- 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 void initialiseClient()
- {
- setTitle("Inoculator");
-
- int x = 16;
- int y = 32;
-
-
- new ControlLiquidTank(this, x, y + 18 + 16).setTankID(0);
-
-
- CraftGUIUtil.horizontalGrid(x, y, new IWidget[] { 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;
-
- new ControlMachineProgress(this, x, y + 24, ProgressBase, Progress, Position.Left);
-
-
- new ControlEnergyBar(this, 91, 118, 60, 16, Position.Left);
- new ControlErrorState(this, 161.0F, 118.0F);
-
-
- x += 142;
-
-
- CraftGUIUtil.verticalGrid(x, y, TextJustification.MiddleLeft, 8.0F, new IWidget[] { new ControlSlotArray(this, x, y, 4, 1).create(Inoculator.slotReserve), new ControlSlot(this, x, y + 18 + 8).assign(9), new ControlSlotArray(this, x, y + 18 + 8 + 18 + 8, 4, 1).create(Inoculator.slotFinished) });
-
-
-
-
-
- new ControlIconDisplay(this, x + 18, y + 18 + 2, GUIIcon.ArrowUpLeft.getIcon());
- new ControlIconDisplay(this, x + 18, y + 18 + 18, GUIIcon.ArrowLeftDown.getIcon());
-
-
-
-
-
-
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Inoculator";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Inoculator";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowIsolator.java b/src/Java/binnie/craftgui/genetics/machine/WindowIsolator.java
deleted file mode 100644
index 6d494250ee..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowIsolator.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlProgress;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.minecraft.control.ControlSlotCharge;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extrabees.core.ExtraBeeTexture;
-import binnie.genetics.Genetics;
-import binnie.genetics.machine.Isolator;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-
-public class WindowIsolator
- extends WindowMachine
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowIsolator(player, inventory, side);
- }
-
- 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 WindowIsolator(EntityPlayer player, IInventory inventory, Side side)
- {
- super(330, 208, player, inventory, side);
- }
-
- public void initialiseClient()
- {
- setTitle("Isolator");
-
- int x = 16;
- int y = 32;
-
- new ControlLiquidTank(this, x, y).setTankID(0);
-
- x += 26;
-
- new ControlSlotArray(this, x, y + 3, 1, 3).create(Isolator.slotReserve);
-
- x += 20;
-
- new ControlIconDisplay(this, x, y + 3 + 1, GUIIcon.ArrowRight.getIcon());
-
- x += 18;
-
- new ControlSlot(this, x, y + 3).assign(5);
-
- new ControlSlot(this, x, y + 36 + 3).assign(0);
- new ControlSlotCharge(this, x + 18 + 2, y + 36 + 3, 0).setColour(15722671);
-
-
-
- x += 18;
-
- new ControlProgress(this, x, y + 3, ProgressBase, Progress, Position.Left);
-
- x += 142;
-
- new ControlSlot(this, x, y + 3).assign(6);
-
- new ControlSlot(this, x, y + 3 + 36).assign(1);
-
- new ControlIconDisplay(this, x + 1, y + 3 + 19, GUIIcon.ArrowUp.getIcon());
-
- x += 20;
-
-
- new ControlIconDisplay(this, x, y + 3 + 1, GUIIcon.ArrowRight.getIcon());
-
- x += 18;
-
- new ControlSlotArray(this, x, y + 3, 2, 3).create(Isolator.slotFinished);
-
-
- new ControlEnergyBar(this, 260, 130, 16, 60, Position.Bottom);
-
-
-
-
-
-
-
- new ControlErrorState(this, 153.0F, 81.0F);
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Incubator";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Isolator";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowMachine.java b/src/Java/binnie/craftgui/genetics/machine/WindowMachine.java
deleted file mode 100644
index 6b357a36d7..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowMachine.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.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(int width, int height, EntityPlayer player, IInventory inventory, Side side)
- {
- super(width, height, player, inventory, side);
- }
-
- public abstract String getTitle();
-
- public void initialiseClient()
- {
- setTitle(getTitle());
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowPolymeriser.java b/src/Java/binnie/craftgui/genetics/machine/WindowPolymeriser.java
deleted file mode 100644
index edf9e371f7..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowPolymeriser.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlLiquidTank;
-import binnie.craftgui.minecraft.control.ControlMachineProgress;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.minecraft.control.ControlSlotCharge;
-import binnie.craftgui.resource.Texture;
-import binnie.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
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowPolymeriser(player, inventory, side);
- }
-
- public WindowPolymeriser(EntityPlayer player, IInventory inventory, Side side)
- {
- super(278, 212, player, inventory, side);
- }
-
- static Texture ProgressBase = new StandardTexture(76, 170, 160, 79, GeneticsTexture.GUIProcess.getTexture());
- static Texture Progress = new StandardTexture(76, 91, 160, 79, GeneticsTexture.GUIProcess.getTexture());
-
- public void initialiseClient()
- {
- super.initialiseClient();
-
- int x = 16;
- 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;
-
- new ControlMachineProgress(this, x + 18, y - 6, ProgressBase, Progress, Position.Left);
-
-
- new ControlSlot(this, x, y).assign(0);
-
-
- new ControlLiquidTank(this, x, y + 18 + 16, true).setTankID(0);
-
- new ControlLiquidTank(this, x, y + 18 + 16 + 18 + 8, true).setTankID(1);
-
- new ControlEnergyBar(this, x + 120, 96, 64, 16, Position.Left);
-
- x += 40;
-
- new ControlSlot(this, x + 30, y + 18 + 8).assign(1);
- new ControlSlotCharge(this, x + 30 + 20, y + 18 + 8, 1).setColour(16766976);
-
-
-
-
- x += 138;
-
- new ControlSlotArray(this, x, y + 9, 2, 2).create(Polymeriser.slotSerumFinished);
-
- ControlErrorState errorState = new ControlErrorState(this, 244.0F, 97.0F);
-
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Polymeriser";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Polymeriser";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java b/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java
deleted file mode 100644
index 9e2f580b53..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.controls.ControlText;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.CraftGUIUtil;
-import binnie.craftgui.core.geometry.IArea;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.minecraft.control.ControlSlotCharge;
-import binnie.craftgui.resource.Texture;
-import binnie.craftgui.resource.minecraft.StandardTexture;
-import binnie.extrabees.core.ExtraBeeTexture;
-import binnie.genetics.Genetics;
-import binnie.genetics.machine.Sequencer;
-import cpw.mods.fml.relauncher.Side;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class WindowSequencer
- extends WindowMachine
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowSequencer(player, inventory, side);
- }
-
- public WindowSequencer(EntityPlayer player, IInventory inventory, Side side)
- {
- super(226, 224, player, inventory, side);
- }
-
- static Texture ProgressBase = new StandardTexture(64, 114, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
- static Texture Progress = new StandardTexture(64, 123, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
- ControlText slotText;
-
- public void recieveGuiNBT(Side side, EntityPlayer player, String name, NBTTagCompound action)
- {
- if ((side == Side.CLIENT) && (name.equals("username"))) {
- this.slotText.setValue("§8Genes will be sequenced by " + action.getString("username"));
- }
- super.recieveGuiNBT(side, player, name, action);
- }
-
- public void initialiseClient()
- {
- setTitle("Sequencer");
-
-
- int x = 16;
- int y = 32;
-
-
-
-
- CraftGUIUtil.horizontalGrid(x, y, TextJustification.MiddleCenter, 2.0F, new IWidget[] { 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) });
-
-
-
-
-
-
-
-
- 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, w(), 12.0F), "§8Userless. Will not save sequences", TextJustification.MiddleCenter);
-
-
-
- y += 20;
-
- ControlSlot slotDye = new ControlSlot(this, x, y);
- slotDye.assign(0);
- x += 20;
- new ControlSlotCharge(this, x, y, 0).setColour(16750848);
-
- x += 32;
- new ControlEnergyBar(this, x, y, 60, 16, Position.Left);
-
- x += 92;
- ControlErrorState errorState = new ControlErrorState(this, x, y + 1);
-
-
-
- new ControlPlayerInventory(this);
- }
-
- public String getTitle()
- {
- return "Incubator";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Sequencer";
- }
-}
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowSplicer.java b/src/Java/binnie/craftgui/genetics/machine/WindowSplicer.java
deleted file mode 100644
index 23d7cd8015..0000000000
--- a/src/Java/binnie/craftgui/genetics/machine/WindowSplicer.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package binnie.craftgui.genetics.machine;
-
-import binnie.core.AbstractMod;
-import binnie.craftgui.core.IWidget;
-import binnie.craftgui.core.geometry.CraftGUIUtil;
-import binnie.craftgui.core.geometry.Position;
-import binnie.craftgui.core.geometry.TextJustification;
-import binnie.craftgui.minecraft.GUIIcon;
-import binnie.craftgui.minecraft.Window;
-import binnie.craftgui.minecraft.control.ControlEnergyBar;
-import binnie.craftgui.minecraft.control.ControlErrorState;
-import binnie.craftgui.minecraft.control.ControlIconDisplay;
-import binnie.craftgui.minecraft.control.ControlPlayerInventory;
-import binnie.craftgui.minecraft.control.ControlSlot;
-import binnie.craftgui.minecraft.control.ControlSlotArray;
-import binnie.craftgui.resource.Texture;
-import binnie.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
-{
- public static Window create(EntityPlayer player, IInventory inventory, Side side)
- {
- return new WindowSplicer(player, inventory, side);
- }
-
- public WindowSplicer(EntityPlayer player, IInventory inventory, Side side)
- {
- super(280, 240, player, inventory, side);
- }
-
- 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 void initialiseClient()
- {
- setTitle("Splicer");
-
- int x = 16;
-
-
-
-
- new ControlSplicerProgress(this, 84.0F, 32.0F, w() - 172.0F, 102.0F);
-
- CraftGUIUtil.horizontalGrid(x, 62.0F, new IWidget[] { 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((w() - 72.0F) / 2.0F, 32.0F, TextJustification.MiddleCenter, 4.0F, new IWidget[] { 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);
- }
-
- public String getTitle()
- {
- return "Inoculator";
- }
-
- protected AbstractMod getMod()
- {
- return Genetics.instance;
- }
-
- protected String getName()
- {
- return "Inoculator";
- }
-}