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

@ -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;
@ -71,6 +73,12 @@ public class GrinderRecipeHandler extends GenericRecipeHander implements INeiBas
public INeiBaseRecipe getNeiBaseRecipe() {
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) {

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 {
@ -63,6 +65,12 @@ public class IndustrialSawmillRecipeHandler 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]));
}
@Override
public void drawBackground(int 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]));
}
}