Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -2,86 +2,76 @@ package techreborn.compat.nei;
|
|||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import techreborn.compat.nei.recipes.AlloySmelterRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.BlastFurnaceRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.CentrifugeRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.GrinderRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.IndustrialElectrolyzerRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.LatheRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.PlateCuttingMachineRecipeHandler;
|
||||
import techreborn.compat.nei.recipes.*;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class NEIConfig implements IConfigureNEI {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ModInfo.MOD_ID;
|
||||
}
|
||||
@Override
|
||||
public String getName() {
|
||||
return ModInfo.MOD_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return ModInfo.MOD_VERSION;
|
||||
}
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return ModInfo.MOD_VERSION;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
ShapedRollingMachineHandler shapedRollingMachineHandler = new ShapedRollingMachineHandler();
|
||||
ShapelessRollingMachineHandler shapelessRollingMachineHandler = new ShapelessRollingMachineHandler();
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
ShapedRollingMachineHandler shapedRollingMachineHandler = new ShapedRollingMachineHandler();
|
||||
ShapelessRollingMachineHandler shapelessRollingMachineHandler = new ShapelessRollingMachineHandler();
|
||||
|
||||
ImplosionCompressorRecipeHandler implosion = new ImplosionCompressorRecipeHandler();
|
||||
API.registerUsageHandler(implosion);
|
||||
API.registerRecipeHandler(implosion);
|
||||
ImplosionCompressorRecipeHandler implosion = new ImplosionCompressorRecipeHandler();
|
||||
API.registerUsageHandler(implosion);
|
||||
API.registerRecipeHandler(implosion);
|
||||
|
||||
AlloySmelterRecipeHandler alloy = new AlloySmelterRecipeHandler();
|
||||
API.registerUsageHandler(alloy);
|
||||
API.registerRecipeHandler(alloy);
|
||||
AlloySmelterRecipeHandler alloy = new AlloySmelterRecipeHandler();
|
||||
API.registerUsageHandler(alloy);
|
||||
API.registerRecipeHandler(alloy);
|
||||
|
||||
AssemblingMachineRecipeHandler assembling = new AssemblingMachineRecipeHandler();
|
||||
API.registerUsageHandler(assembling);
|
||||
API.registerRecipeHandler(assembling);
|
||||
AssemblingMachineRecipeHandler assembling = new AssemblingMachineRecipeHandler();
|
||||
API.registerUsageHandler(assembling);
|
||||
API.registerRecipeHandler(assembling);
|
||||
|
||||
LatheRecipeHandler lathe = new LatheRecipeHandler();
|
||||
API.registerUsageHandler(lathe);
|
||||
API.registerRecipeHandler(lathe);
|
||||
LatheRecipeHandler lathe = new LatheRecipeHandler();
|
||||
API.registerUsageHandler(lathe);
|
||||
API.registerRecipeHandler(lathe);
|
||||
|
||||
IndustrialSawmillRecipeHandler sawmill = new IndustrialSawmillRecipeHandler();
|
||||
API.registerUsageHandler(sawmill);
|
||||
API.registerRecipeHandler(sawmill);
|
||||
IndustrialSawmillRecipeHandler sawmill = new IndustrialSawmillRecipeHandler();
|
||||
API.registerUsageHandler(sawmill);
|
||||
API.registerRecipeHandler(sawmill);
|
||||
|
||||
PlateCuttingMachineRecipeHandler plate = new PlateCuttingMachineRecipeHandler();
|
||||
API.registerUsageHandler(plate);
|
||||
API.registerRecipeHandler(plate);
|
||||
PlateCuttingMachineRecipeHandler plate = new PlateCuttingMachineRecipeHandler();
|
||||
API.registerUsageHandler(plate);
|
||||
API.registerRecipeHandler(plate);
|
||||
|
||||
ChemicalReactorRecipeHandler chem = new ChemicalReactorRecipeHandler();
|
||||
API.registerUsageHandler(chem);
|
||||
API.registerRecipeHandler(chem);
|
||||
ChemicalReactorRecipeHandler chem = new ChemicalReactorRecipeHandler();
|
||||
API.registerUsageHandler(chem);
|
||||
API.registerRecipeHandler(chem);
|
||||
|
||||
CentrifugeRecipeHandler cent = new CentrifugeRecipeHandler();
|
||||
API.registerUsageHandler(cent);
|
||||
API.registerRecipeHandler(cent);
|
||||
CentrifugeRecipeHandler cent = new CentrifugeRecipeHandler();
|
||||
API.registerUsageHandler(cent);
|
||||
API.registerRecipeHandler(cent);
|
||||
|
||||
GrinderRecipeHandler grind = new GrinderRecipeHandler();
|
||||
API.registerUsageHandler(grind);
|
||||
API.registerRecipeHandler(grind);
|
||||
|
||||
IndustrialElectrolyzerRecipeHandler elec = new IndustrialElectrolyzerRecipeHandler();
|
||||
API.registerUsageHandler(elec);
|
||||
API.registerRecipeHandler(elec);
|
||||
|
||||
BlastFurnaceRecipeHandler blast = new BlastFurnaceRecipeHandler();
|
||||
API.registerUsageHandler(blast);
|
||||
API.registerRecipeHandler(blast);
|
||||
|
||||
API.registerUsageHandler(shapedRollingMachineHandler);
|
||||
API.registerRecipeHandler(shapedRollingMachineHandler);
|
||||
GrinderRecipeHandler grind = new GrinderRecipeHandler();
|
||||
API.registerUsageHandler(grind);
|
||||
API.registerRecipeHandler(grind);
|
||||
|
||||
API.registerUsageHandler(shapelessRollingMachineHandler);
|
||||
API.registerRecipeHandler(shapelessRollingMachineHandler);
|
||||
IndustrialElectrolyzerRecipeHandler elec = new IndustrialElectrolyzerRecipeHandler();
|
||||
API.registerUsageHandler(elec);
|
||||
API.registerRecipeHandler(elec);
|
||||
|
||||
}
|
||||
BlastFurnaceRecipeHandler blast = new BlastFurnaceRecipeHandler();
|
||||
API.registerUsageHandler(blast);
|
||||
API.registerRecipeHandler(blast);
|
||||
|
||||
API.registerUsageHandler(shapedRollingMachineHandler);
|
||||
API.registerRecipeHandler(shapedRollingMachineHandler);
|
||||
|
||||
API.registerUsageHandler(shapelessRollingMachineHandler);
|
||||
API.registerRecipeHandler(shapelessRollingMachineHandler);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,91 +16,91 @@ import java.util.List;
|
|||
|
||||
public class ShapedRollingMachineHandler extends ShapedRecipeHandler {
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiRollingMachine.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiRollingMachine.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24,
|
||||
18), "rollingcrafting", new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24,
|
||||
18), "rollingcrafting", new Object[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "rollingcrafting";
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "rollingcrafting";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "rollingcrafting";
|
||||
}
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "rollingcrafting";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("rollingcrafting")
|
||||
&& getClass() == ShapedRollingMachineHandler.class) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) RollingMachineRecipe.instance
|
||||
.getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes)
|
||||
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("rollingcrafting")
|
||||
&& getClass() == ShapedRollingMachineHandler.class) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) RollingMachineRecipe.instance
|
||||
.getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes)
|
||||
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) RollingMachineRecipe.instance
|
||||
.getRecipeList()) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(
|
||||
irecipe.getRecipeOutput(), result)) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes)
|
||||
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) RollingMachineRecipe.instance
|
||||
.getRecipeList()) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(
|
||||
irecipe.getRecipeOutput(), result)) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes)
|
||||
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) RollingMachineRecipe.instance
|
||||
.getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes)
|
||||
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) RollingMachineRecipe.instance
|
||||
.getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes)
|
||||
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null
|
||||
|| !recipe.contains(recipe.ingredients,
|
||||
ingredient.getItem()))
|
||||
continue;
|
||||
if (recipe == null
|
||||
|| !recipe.contains(recipe.ingredients,
|
||||
ingredient.getItem()))
|
||||
continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
recipe.computeVisuals();
|
||||
if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,96 +16,96 @@ import java.util.List;
|
|||
|
||||
public class ShapelessRollingMachineHandler extends ShapelessRecipeHandler {
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiRollingMachine.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiRollingMachine.class;
|
||||
}
|
||||
|
||||
public String getRecipeName() {
|
||||
return "Shapeless Rolling Machine";
|
||||
}
|
||||
public String getRecipeName() {
|
||||
return "Shapeless Rolling Machine";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18),
|
||||
"rollingcraftingnoshape"));
|
||||
}
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18),
|
||||
"rollingcraftingnoshape"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "rollingcraftingnoshape";
|
||||
}
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "rollingcraftingnoshape";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("rollingcraftingnoshape")
|
||||
&& getClass() == ShapelessRollingMachineHandler.class) {
|
||||
List<IRecipe> allrecipes = RollingMachineRecipe.instance
|
||||
.getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedShapelessRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessRecipes)
|
||||
recipe = shapelessRecipe((ShapelessRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapelessOreRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessOreRecipe) irecipe);
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("rollingcraftingnoshape")
|
||||
&& getClass() == ShapelessRollingMachineHandler.class) {
|
||||
List<IRecipe> allrecipes = RollingMachineRecipe.instance
|
||||
.getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedShapelessRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessRecipes)
|
||||
recipe = shapelessRecipe((ShapelessRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapelessOreRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
List<IRecipe> allrecipes = RollingMachineRecipe.instance
|
||||
.getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(
|
||||
irecipe.getRecipeOutput(), result)) {
|
||||
CachedShapelessRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessRecipes)
|
||||
recipe = shapelessRecipe((ShapelessRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapelessOreRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessOreRecipe) irecipe);
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
List<IRecipe> allrecipes = RollingMachineRecipe.instance
|
||||
.getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(
|
||||
irecipe.getRecipeOutput(), result)) {
|
||||
CachedShapelessRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessRecipes)
|
||||
recipe = shapelessRecipe((ShapelessRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapelessOreRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
List<IRecipe> allrecipes = RollingMachineRecipe.instance
|
||||
.getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedShapelessRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessRecipes)
|
||||
recipe = shapelessRecipe((ShapelessRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapelessOreRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessOreRecipe) irecipe);
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
List<IRecipe> allrecipes = RollingMachineRecipe.instance
|
||||
.getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedShapelessRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessRecipes)
|
||||
recipe = shapelessRecipe((ShapelessRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapelessOreRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
|
||||
if (recipe.recipeItems == null)
|
||||
return null;
|
||||
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
|
||||
if (recipe.recipeItems == null)
|
||||
return null;
|
||||
|
||||
return new CachedShapelessRecipe(recipe.recipeItems,
|
||||
recipe.getRecipeOutput());
|
||||
}
|
||||
return new CachedShapelessRecipe(recipe.recipeItems,
|
||||
recipe.getRecipeOutput());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,42 +12,42 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class AlloySmelterRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 47 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 47 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 65 - offset, 17 - offset);
|
||||
input.add(pStack2);
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 65 - offset, 17 - offset);
|
||||
input.add(pStack2);
|
||||
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.alloySmelteRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.alloySmelteRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/electric_alloy_furnace.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/electric_alloy_furnace.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiAlloySmelter.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiAlloySmelter.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,48 +12,48 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class AssemblingMachineRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 47 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 65 - offset, 17 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 47 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 65 - offset, 17 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.assemblingMachineRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.assemblingMachineRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/assembling_machine.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/assembling_machine.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiAssemblingMachine.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiAssemblingMachine.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
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 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]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,66 +14,66 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class BlastFurnaceRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 40 - offset, 25 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 40 - offset, 25 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 40 - offset, 43 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 40 - offset, 43 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 100 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 118 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 100 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.blastFurnaceRecipe;
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 118 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_blast_furnace.png";
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.blastFurnaceRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiBlastFurnace.class;
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_blast_furnace.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(55, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiBlastFurnace.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof BlastFurnaceRecipe) {
|
||||
BlastFurnaceRecipe blastFurnaceRecipeHandler = (BlastFurnaceRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
GuiDraw.drawString("Requires " + blastFurnaceRecipeHandler.neededHeat + " heat", 14, 135, -1);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(55, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof BlastFurnaceRecipe) {
|
||||
BlastFurnaceRecipe blastFurnaceRecipeHandler = (BlastFurnaceRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
GuiDraw.drawString("Requires " + blastFurnaceRecipeHandler.neededHeat + " heat", 14, 135, -1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,64 +12,64 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class CentrifugeRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 80 - offset, 35 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 50 - offset, 5 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 80 - offset, 35 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 50 - offset, 5 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 80 - offset, 5 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 80 - offset, 5 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 110 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 110 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 80 - offset, 65 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 80 - offset, 65 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 50 - offset, 35 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 50 - offset, 35 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.centrifugeRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.centrifugeRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_centrifuge.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_centrifuge.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiCentrifuge.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiCentrifuge.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(64, 25, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(94, 25, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(78, 15, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(78, 40, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(64, 25, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(94, 25, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(78, 15, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(78, 40, 10, 10), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,48 +12,48 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class ChemicalReactorRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 70 - offset, 21 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 70 - offset, 21 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 90 - offset, 21 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 90 - offset, 21 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 80 - offset, 51 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 80 - offset, 51 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.chemicalReactorRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.chemicalReactorRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/chemical_reactor.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/chemical_reactor.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiChemicalReactor.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiChemicalReactor.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(70, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(70, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,118 +16,118 @@ import java.util.List;
|
|||
|
||||
public abstract class GenericRecipeHander extends TemplateRecipeHandler {
|
||||
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return null;
|
||||
}
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public class CachedGenericRecipe extends CachedRecipe {
|
||||
public class CachedGenericRecipe extends CachedRecipe {
|
||||
|
||||
private List<PositionedStack> input = new ArrayList<PositionedStack>();
|
||||
private List<PositionedStack> outputs = new ArrayList<PositionedStack>();
|
||||
public Point focus;
|
||||
public IBaseRecipeType recipie;
|
||||
public INeiBaseRecipe neiBaseRecipe;
|
||||
private List<PositionedStack> input = new ArrayList<PositionedStack>();
|
||||
private List<PositionedStack> outputs = new ArrayList<PositionedStack>();
|
||||
public Point focus;
|
||||
public IBaseRecipeType recipie;
|
||||
public INeiBaseRecipe neiBaseRecipe;
|
||||
|
||||
public CachedGenericRecipe(IBaseRecipeType recipe, INeiBaseRecipe neiBaseRecipe) {
|
||||
this.recipie = recipe;
|
||||
this.neiBaseRecipe = neiBaseRecipe;
|
||||
neiBaseRecipe.addPositionedStacks(input, outputs, recipe);
|
||||
}
|
||||
public CachedGenericRecipe(IBaseRecipeType recipe, INeiBaseRecipe neiBaseRecipe) {
|
||||
this.recipie = recipe;
|
||||
this.neiBaseRecipe = neiBaseRecipe;
|
||||
neiBaseRecipe.addPositionedStacks(input, outputs, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return this.getCycledIngredients(cycleticks / 20, this.input);
|
||||
}
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return this.getCycledIngredients(cycleticks / 20, this.input);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getOtherStacks() {
|
||||
return this.outputs;
|
||||
}
|
||||
@Override
|
||||
public List<PositionedStack> getOtherStacks() {
|
||||
return this.outputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return RecipeHandler.getUserFreindlyName(getNeiBaseRecipe().getRecipeName());
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return RecipeHandler.getUserFreindlyName(getNeiBaseRecipe().getRecipeName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return getNeiBaseRecipe().getGuiTexture();
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return getNeiBaseRecipe().getGuiTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return getNeiBaseRecipe().getGuiClass();
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return getNeiBaseRecipe().getGuiClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GuiDraw.changeTexture(getGuiTexture());
|
||||
GuiDraw.drawTexturedModalRect(0, 0, 4, 4, 166, 78);
|
||||
GuiDraw.drawTooltipBox(10, 80, 145, 50);
|
||||
GuiDraw.drawString("Info:", 14, 84, -1);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
CachedGenericRecipe genericRecipe = (CachedGenericRecipe) recipe;
|
||||
float scale = 0.9F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GuiDraw.drawString("EU needed: " + (String.format("%,d", genericRecipe.recipie.euPerTick() * genericRecipe.recipie.tickTime())), 16, 105, -1);
|
||||
GuiDraw.drawString("Ticks to process: "+ genericRecipe.recipie.tickTime(), 14, 115, -1);
|
||||
GuiDraw.drawString("Time to process: " + genericRecipe.recipie.tickTime() / 20 + " seconds", 14, 125, -1);
|
||||
}
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GuiDraw.changeTexture(getGuiTexture());
|
||||
GuiDraw.drawTexturedModalRect(0, 0, 4, 4, 166, 78);
|
||||
GuiDraw.drawTooltipBox(10, 80, 145, 50);
|
||||
GuiDraw.drawString("Info:", 14, 84, -1);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
CachedGenericRecipe genericRecipe = (CachedGenericRecipe) recipe;
|
||||
float scale = 0.9F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GuiDraw.drawString("EU needed: " + (String.format("%,d", genericRecipe.recipie.euPerTick() * genericRecipe.recipie.tickTime())), 16, 105, -1);
|
||||
GuiDraw.drawString("Ticks to process: " + genericRecipe.recipie.tickTime(), 14, 115, -1);
|
||||
GuiDraw.drawString("Time to process: " + genericRecipe.recipie.tickTime() / 20 + " seconds", 14, 125, -1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int recipiesPerPage() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int recipiesPerPage() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 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())) {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals(getNeiBaseRecipe().getRecipeName())) {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
for (int i = 0; i < recipeType.getOutputsSize(); i++) {
|
||||
if (ItemUtils.isItemEqual(recipeType.getOutput(i), result, true, false, true)) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
for (int i = 0; i < recipeType.getOutputsSize(); i++) {
|
||||
if (ItemUtils.isItemEqual(recipeType.getOutput(i), result, true, false, true)) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
for (ItemStack input : recipeType.getInputs()) {
|
||||
if (ItemUtils.isItemEqual(ingredient, input, true, false, true)) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
for (ItemStack input : recipeType.getInputs()) {
|
||||
if (ItemUtils.isItemEqual(ingredient, input, true, false, true)) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addCached(IBaseRecipeType recipie) {
|
||||
this.arecipes.add(new CachedGenericRecipe(recipie, getNeiBaseRecipe()));
|
||||
}
|
||||
private void addCached(IBaseRecipeType recipie) {
|
||||
this.arecipes.add(new CachedGenericRecipe(recipie, getNeiBaseRecipe()));
|
||||
}
|
||||
|
||||
}
|
|
@ -18,87 +18,87 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class GrinderRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 32 - offset, 26 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 32 - offset, 26 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 32 - offset, 44 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 32 - offset, 44 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 77 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 77 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 95 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 95 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 113 - offset, 35 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 113 - offset, 35 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 131 - offset, 35 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 131 - offset, 35 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.grinderRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.grinderRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_grinder.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_grinder.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiGrinder.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiGrinder.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(44, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof GrinderRecipe) {
|
||||
GrinderRecipe grinderRecipe = (GrinderRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
if (grinderRecipe.fluidStack != null) {
|
||||
IIcon fluidIcon = grinderRecipe.fluidStack.getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(44, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = grinderRecipe.fluidStack.amount * 100 / 16000;
|
||||
GuiUtil.drawRepeated(fluidIcon, 7, 22 + 47 - liquidHeight, 14.0D, liquidHeight, GuiDraw.gui.getZLevel());
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof GrinderRecipe) {
|
||||
GrinderRecipe grinderRecipe = (GrinderRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
if (grinderRecipe.fluidStack != null) {
|
||||
IIcon fluidIcon = grinderRecipe.fluidStack.getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
|
||||
}
|
||||
GuiDraw.drawString(grinderRecipe.fluidStack.amount + "mb of " + grinderRecipe.fluidStack.getLocalizedName(), 14, 135, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = grinderRecipe.fluidStack.amount * 100 / 16000;
|
||||
GuiUtil.drawRepeated(fluidIcon, 7, 22 + 47 - liquidHeight, 14.0D, liquidHeight, GuiDraw.gui.getZLevel());
|
||||
|
||||
}
|
||||
}
|
||||
GuiDraw.drawString(grinderRecipe.fluidStack.amount + "mb of " + grinderRecipe.fluidStack.getLocalizedName(), 14, 135, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,26 +11,26 @@ import java.util.List;
|
|||
*/
|
||||
public interface INeiBaseRecipe {
|
||||
|
||||
/**
|
||||
* Add the inputs and the outputs
|
||||
*
|
||||
* @param input add the input stacks to this
|
||||
* @param outputs add this output stacks to this
|
||||
*/
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType);
|
||||
/**
|
||||
* Add the inputs and the outputs
|
||||
*
|
||||
* @param input add the input stacks to this
|
||||
* @param outputs add this output stacks to this
|
||||
*/
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType);
|
||||
|
||||
/**
|
||||
* @return the recipe name that is used for the recipe
|
||||
*/
|
||||
public String getRecipeName();
|
||||
/**
|
||||
* @return the recipe name that is used for the recipe
|
||||
*/
|
||||
public String getRecipeName();
|
||||
|
||||
/**
|
||||
* @return the guiTexture location
|
||||
*/
|
||||
public String getGuiTexture();
|
||||
/**
|
||||
* @return the guiTexture location
|
||||
*/
|
||||
public String getGuiTexture();
|
||||
|
||||
/**
|
||||
* @return the gui class for the recipe
|
||||
*/
|
||||
public Class<? extends GuiContainer> getGuiClass();
|
||||
/**
|
||||
* @return the gui class for the recipe
|
||||
*/
|
||||
public Class<? extends GuiContainer> getGuiClass();
|
||||
}
|
||||
|
|
|
@ -12,53 +12,53 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class ImplosionCompressorRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 37 - offset, 26 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 37 - offset, 26 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 37 - offset, 44 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 37 - offset, 44 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 93 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 93 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 111 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 111 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.implosionCompressorRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.implosionCompressorRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/implosion_compressor.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/implosion_compressor.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiImplosionCompressor.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiImplosionCompressor.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(50, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(50, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,62 +12,62 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class IndustrialElectrolyzerRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 80 - offset, 51 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 80 - offset, 51 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 50 - offset, 51 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 50 - offset, 51 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 50 - offset, 19 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 50 - offset, 19 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 70 - offset, 19 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 90 - offset, 19 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 110 - offset, 19 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 70 - offset, 19 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 90 - offset, 19 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 110 - offset, 19 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.industrialElectrolyzerRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.industrialElectrolyzerRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_electrolyzer.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_electrolyzer.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiIndustrialElectrolyzer.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiIndustrialElectrolyzer.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(80, 20, 15, 15), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(80, 20, 15, 15), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,81 +17,81 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class IndustrialSawmillRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 32 - offset, 26 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 32 - offset, 26 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(recipeType.getInputs().get(1), 32 - offset, 44 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack2 = new PositionedStack(recipeType.getInputs().get(1), 32 - offset, 44 - offset);
|
||||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 84 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 84 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 102 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 102 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 120 - offset, 35 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 120 - offset, 35 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.industrialSawmillRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.industrialSawmillRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_sawmill.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_sawmill.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiIndustrialSawmill.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiIndustrialSawmill.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(50, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof IndustrialSawmillRecipe) {
|
||||
IndustrialSawmillRecipe grinderRecipe = (IndustrialSawmillRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
if (grinderRecipe.fluidStack != null) {
|
||||
IIcon fluidIcon = grinderRecipe.fluidStack.getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(50, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = grinderRecipe.fluidStack.amount * 100 / 16000;
|
||||
GuiUtil.drawRepeated(fluidIcon, 7, 22 + 47 - liquidHeight, 14.0D, liquidHeight, GuiDraw.gui.getZLevel());
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof IndustrialSawmillRecipe) {
|
||||
IndustrialSawmillRecipe grinderRecipe = (IndustrialSawmillRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
if (grinderRecipe.fluidStack != null) {
|
||||
IIcon fluidIcon = grinderRecipe.fluidStack.getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
|
||||
}
|
||||
GuiDraw.drawString(grinderRecipe.fluidStack.amount + "mb of " + grinderRecipe.fluidStack.getLocalizedName(), 14, 135, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = grinderRecipe.fluidStack.amount * 100 / 16000;
|
||||
GuiUtil.drawRepeated(fluidIcon, 7, 22 + 47 - liquidHeight, 14.0D, liquidHeight, GuiDraw.gui.getZLevel());
|
||||
|
||||
}
|
||||
}
|
||||
GuiDraw.drawString(grinderRecipe.fluidStack.amount + "mb of " + grinderRecipe.fluidStack.getLocalizedName(), 14, 135, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,43 +12,43 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class LatheRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 56 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 56 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.latheRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.latheRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/lathe.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/lathe.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiLathe.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiLathe.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 20, 25, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,42 +12,42 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
|
||||
public class PlateCuttingMachineRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 56 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
if (recipeType.getInputs().size() > 0) {
|
||||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 56 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.plateCuttingMachineRecipe;
|
||||
}
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return Reference.plateCuttingMachineRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/plate_cutting_machine.png";
|
||||
}
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/plate_cutting_machine.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiPlateCuttingMachine.class;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiPlateCuttingMachine.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 20, 20, 20), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue