Removed Recipes button and moved to progress bar

This commit is contained in:
Gig 2015-06-27 10:01:39 +01:00
parent 6f08a56df2
commit d1196d0a7c
25 changed files with 90 additions and 41 deletions

View file

@ -26,11 +26,8 @@ public class GuiAlloyFurnace extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -24,10 +24,8 @@ public class GuiAlloySmelter extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -26,10 +26,8 @@ public class GuiAssemblingMachine extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -18,8 +18,7 @@ public class GuiBlastFurnace extends GuiContainer {
TileBlastFurnace blastfurnace;
public GuiBlastFurnace(EntityPlayer player,
TileBlastFurnace tileblastfurnace)
public GuiBlastFurnace(EntityPlayer player, TileBlastFurnace tileblastfurnace)
{
super(new ContainerBlastFurnace(tileblastfurnace, player));
this.xSize = 176;
@ -29,17 +28,13 @@ public class GuiBlastFurnace extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
int p_146976_2_, int p_146976_3_)
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;

View file

@ -24,10 +24,8 @@ public class GuiCentrifuge extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -26,10 +26,8 @@ public class GuiChemicalReactor extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -25,8 +25,7 @@ public class GuiGasTurbine extends GuiContainer {
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
int p_146976_2_, int p_146976_3_)
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;

View file

@ -29,10 +29,8 @@ public class GuiImplosionCompressor extends GuiContainer{
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -31,10 +31,8 @@ public class GuiIndustrialElectrolyzer extends GuiContainer {
@Override
public void initGui() {
// this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
// this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -27,11 +27,8 @@ public class GuiIndustrialSawmill extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -26,10 +26,8 @@ public class GuiLathe extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -27,10 +27,8 @@ public class GuiPlateCuttingMachine extends GuiContainer {
@Override
public void initGui() {
this.buttonList.clear();
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
super.initGui();
}

View file

@ -15,8 +15,7 @@ public class GuiRollingMachine extends GuiContainer {
"techreborn", "textures/gui/rolling_machine.png");
TileRollingMachine rollingMachine;
public GuiRollingMachine(EntityPlayer player,
TileRollingMachine tileRollingmachine)
public GuiRollingMachine(EntityPlayer player, TileRollingMachine tileRollingmachine)
{
super(new ContainerRollingMachine(tileRollingmachine, player));
this.xSize = 176;
@ -25,8 +24,7 @@ public class GuiRollingMachine extends GuiContainer {
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
int p_146976_2_, int p_146976_3_)
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;

View file

@ -25,8 +25,7 @@ public class GuiSemifluidGenerator extends GuiContainer {
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
int p_146976_2_, int p_146976_3_)
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiAlloySmelter;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class AlloySmelterRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -41,4 +43,10 @@ public class AlloySmelterRecipeHandler extends GenericRecipeHander implements IN
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiAssemblingMachine;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class AssemblingMachineRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -47,4 +49,10 @@ public class AssemblingMachineRecipeHandler extends GenericRecipeHander implemen
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -1,12 +1,14 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiAlloySmelter;
import techreborn.client.gui.GuiBlastFurnace;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class BlastFurnaceRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -53,4 +55,10 @@ public class BlastFurnaceRecipeHandler extends GenericRecipeHander implements IN
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiCentrifuge;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class CentrifugeRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -61,4 +63,10 @@ public class CentrifugeRecipeHandler extends GenericRecipeHander implements INei
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiChemicalReactor;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class ChemicalReactorRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -47,4 +49,10 @@ public class ChemicalReactorRecipeHandler extends GenericRecipeHander implements
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -89,10 +89,10 @@ public abstract class GenericRecipeHander extends TemplateRecipeHandler {
return 1;
}
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(0, 0, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
// public void loadTransferRects() {
// this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
// new Rectangle(0, 0, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
// }
public void loadCraftingRecipes(String outputId, Object... results) {
if (outputId.equals(getNeiBaseRecipe().getRecipeName())) {

View file

@ -2,6 +2,7 @@ package techreborn.compat.nei.recipes;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import ic2.core.util.DrawUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
@ -12,6 +13,7 @@ import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.client.gui.GuiGrinder;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
import org.lwjgl.opengl.GL11;
@ -72,6 +74,12 @@ public class GrinderRecipeHandler extends GenericRecipeHander implements INeiBas
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(40, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
@Override
public void drawBackground(int recipeIndex) {
super.drawBackground(recipeIndex);

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiImplosionCompressor;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class ImplosionCompressorRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -52,4 +54,10 @@ public class ImplosionCompressorRecipeHandler extends GenericRecipeHander implem
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -2,6 +2,7 @@ package techreborn.compat.nei.recipes;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import ic2.core.util.DrawUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
@ -12,6 +13,7 @@ import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.client.gui.GuiIndustrialSawmill;
import java.awt.Rectangle;
import java.util.List;
public class IndustrialSawmillRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -64,6 +66,12 @@ public class IndustrialSawmillRecipeHandler extends GenericRecipeHander implemen
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
@Override
public void drawBackground(int recipeIndex) {
super.drawBackground(recipeIndex);

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiLathe;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class LatheRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -42,4 +44,10 @@ public class LatheRecipeHandler extends GenericRecipeHander implements INeiBaseR
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}

View file

@ -1,11 +1,13 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiPlateCuttingMachine;
import techreborn.util.ItemUtils;
import java.awt.Rectangle;
import java.util.List;
public class PlateCuttingMachineRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@ -41,4 +43,10 @@ public class PlateCuttingMachineRecipeHandler extends GenericRecipeHander implem
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
@Override
public void loadTransferRects() {
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
new Rectangle(80, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
}
}