aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/craftgui/extratrees
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/binnie/craftgui/extratrees')
-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
29 files changed, 0 insertions, 2076 deletions
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);
- }
-}