mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-19 11:49:10 +00:00
spotless apply
This commit is contained in:
1 parent
6acf2bace1
commit
5e31096c7e
191 files changed
+5046
-5165
No files matched your search
@@ -18,7 +18,10 @@ public class DefaultExtractorLoader implements Runnable {
|
||||
|
||||
if (ModAndClassUtil.GT5) {
|
||||
for (GT_Recipe.GT_Recipe_Map tMap : GT_Recipe.GT_Recipe_Map.sMappings) {
|
||||
FluidRecipe.addRecipeMap(tMap.mNEIName, new GregTech5RecipeExtractor(tMap.mNEIName.equals("gt.recipe.scanner") || tMap.mNEIName.equals("gt.recipe.fakeAssemblylineProcess")));
|
||||
FluidRecipe.addRecipeMap(
|
||||
tMap.mNEIName,
|
||||
new GregTech5RecipeExtractor(tMap.mNEIName.equals("gt.recipe.scanner")
|
||||
|| tMap.mNEIName.equals("gt.recipe.fakeAssemblylineProcess")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +82,5 @@ public class DefaultExtractorLoader implements Runnable {
|
||||
FluidRecipe.addRecipeMap("oreWashing", new IndustrialCraftRecipeExtractor());
|
||||
FluidRecipe.addRecipeMap("solidcanner", new IndustrialCraftRecipeExtractor());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,16 +6,12 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import com.glodblock.github.nei.object.IRecipeExtractor;
|
||||
import com.glodblock.github.nei.object.IRecipeExtractorLegacy;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
import gregtech.common.items.GT_FluidDisplayItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public final class FluidRecipe {
|
||||
|
||||
@@ -86,6 +82,4 @@ public final class FluidRecipe {
|
||||
if (useOther) tmp.addAll(recipe.getOtherStacks(index));
|
||||
return extractor.getOutputIngredients(tmp, recipe, index);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+13
-18
@@ -8,22 +8,20 @@ import com.glodblock.github.nei.object.OrderStack;
|
||||
import com.glodblock.github.util.Ae2Reflect;
|
||||
import crazypants.enderio.machine.crusher.CrusherRecipeManager;
|
||||
import crazypants.enderio.nei.VatRecipeHandler;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
|
||||
public EnderIORecipeExtractor() {
|
||||
}
|
||||
public EnderIORecipeExtractor() {}
|
||||
|
||||
@Override
|
||||
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawInputs.size(); i ++) {
|
||||
for (int i = 0; i < rawInputs.size(); i++) {
|
||||
if (rawInputs.get(i) == null) continue;
|
||||
OrderStack<?> stack = OrderStack.pack(rawInputs.get(i), i);
|
||||
if (stack != null) tmp.add(stack);
|
||||
@@ -34,7 +32,7 @@ public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawOutputs.size(); i ++) {
|
||||
for (int i = 0; i < rawOutputs.size(); i++) {
|
||||
if (rawOutputs.get(i) == null) continue;
|
||||
OrderStack<?> stack = OrderStack.pack(rawOutputs.get(i), i);
|
||||
if (stack != null) tmp.add(stack);
|
||||
@@ -49,7 +47,7 @@ public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
if (tRecipe.arecipes.get(index) instanceof VatRecipeHandler.InnerVatRecipe) {
|
||||
VatRecipeHandler.InnerVatRecipe vatRecipe = (VatRecipeHandler.InnerVatRecipe) tRecipe.arecipes.get(index);
|
||||
ArrayList<PositionedStack> inputs = ReflectEIO.getInputs(vatRecipe);
|
||||
for (int i = 0; i < inputs.size(); i ++) {
|
||||
for (int i = 0; i < inputs.size(); i++) {
|
||||
if (inputs.get(i) == null) continue;
|
||||
OrderStack<?> stack = OrderStack.pack(rawInputs.get(i), i);
|
||||
if (stack != null) tmp.add(stack);
|
||||
@@ -60,7 +58,7 @@ public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
return tmp;
|
||||
} else if (tRecipe.getOverlayIdentifier().equals("EnderIOSagMill")) {
|
||||
for (int i = rawInputs.size() - 1; i >= 0; i --) {
|
||||
for (int i = rawInputs.size() - 1; i >= 0; i--) {
|
||||
PositionedStack stack = rawInputs.get(i);
|
||||
if (stack != null && CrusherRecipeManager.getInstance().isValidSagBall(stack.items[0])) {
|
||||
rawInputs.remove(i);
|
||||
@@ -68,14 +66,14 @@ public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
}
|
||||
return getInputIngredients(rawInputs);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return getInputIngredients(rawInputs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs, IRecipeHandler recipe, int index) {
|
||||
public List<OrderStack<?>> getOutputIngredients(
|
||||
List<PositionedStack> rawOutputs, IRecipeHandler recipe, int index) {
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipe;
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
if (tRecipe.arecipes.get(index) instanceof VatRecipeHandler.InnerVatRecipe) {
|
||||
@@ -85,17 +83,16 @@ public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
tmp.add(new OrderStack<>(result, 0));
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return getOutputIngredients(rawOutputs);
|
||||
}
|
||||
}
|
||||
|
||||
private static class ReflectEIO {
|
||||
|
||||
private final static Field inputsF;
|
||||
private final static Field resultF;
|
||||
private final static Field inFluidF;
|
||||
private static final Field inputsF;
|
||||
private static final Field resultF;
|
||||
private static final Field inFluidF;
|
||||
|
||||
static {
|
||||
try {
|
||||
@@ -118,7 +115,5 @@ public class EnderIORecipeExtractor implements IRecipeExtractor {
|
||||
private static FluidStack getInputFluid(VatRecipeHandler.InnerVatRecipe vat) {
|
||||
return Ae2Reflect.readField(vat, inFluidF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+10
-10
@@ -9,11 +9,10 @@ import forestry.core.recipes.nei.PositionedFluidTank;
|
||||
import forestry.core.recipes.nei.RecipeHandlerBase;
|
||||
import forestry.factory.recipes.nei.NEIHandlerFabricator;
|
||||
import forestry.factory.recipes.nei.NEIHandlerSqueezer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
|
||||
|
||||
@@ -31,7 +30,7 @@ public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
|
||||
@Override
|
||||
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawInputs.size(); i ++) {
|
||||
for (int i = 0; i < rawInputs.size(); i++) {
|
||||
if (rawInputs.get(i) == null) continue;
|
||||
OrderStack<?> stack = OrderStack.pack(rawInputs.get(i), i);
|
||||
if (stack != null) tmp.add(stack);
|
||||
@@ -42,7 +41,7 @@ public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawOutputs.size(); i ++) {
|
||||
for (int i = 0; i < rawOutputs.size(); i++) {
|
||||
if (rawOutputs.get(i) == null) continue;
|
||||
OrderStack<?> stack = OrderStack.pack(rawOutputs.get(i), i);
|
||||
if (stack != null) tmp.add(stack);
|
||||
@@ -56,7 +55,8 @@ public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
|
||||
List<OrderStack<?>> tmp = new ArrayList<>();
|
||||
if (tRecipe.arecipes.get(index) instanceof RecipeHandlerBase.CachedBaseRecipe) {
|
||||
tmp = getInputIngredients(rawInputs);
|
||||
List<PositionedFluidTank> tanks = ((RecipeHandlerBase.CachedBaseRecipe) tRecipe.arecipes.get(index)).getFluidTanks();
|
||||
List<PositionedFluidTank> tanks =
|
||||
((RecipeHandlerBase.CachedBaseRecipe) tRecipe.arecipes.get(index)).getFluidTanks();
|
||||
if (tanks.size() > 0 && !(handler instanceof NEIHandlerSqueezer)) {
|
||||
FluidStack fluid = tanks.get(0).tank.getFluid();
|
||||
if (fluid != null) {
|
||||
@@ -68,20 +68,21 @@ public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs, IRecipeHandler recipe, int index) {
|
||||
public List<OrderStack<?>> getOutputIngredients(
|
||||
List<PositionedStack> rawOutputs, IRecipeHandler recipe, int index) {
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipe;
|
||||
removeGlass(rawOutputs);
|
||||
List<OrderStack<?>> tmp = new ArrayList<>();
|
||||
if (tRecipe.arecipes.get(index) instanceof RecipeHandlerBase.CachedBaseRecipe) {
|
||||
tmp = getOutputIngredients(rawOutputs);
|
||||
List<PositionedFluidTank> tanks = ((RecipeHandlerBase.CachedBaseRecipe) tRecipe.arecipes.get(index)).getFluidTanks();
|
||||
List<PositionedFluidTank> tanks =
|
||||
((RecipeHandlerBase.CachedBaseRecipe) tRecipe.arecipes.get(index)).getFluidTanks();
|
||||
if (tanks.size() > 0 && handler instanceof NEIHandlerSqueezer) {
|
||||
FluidStack fluid = tanks.get(0).tank.getFluid();
|
||||
if (fluid != null) {
|
||||
tmp.add(new OrderStack<>(fluid, rawOutputs.size()));
|
||||
}
|
||||
}
|
||||
else if (tanks.size() > 1) {
|
||||
} else if (tanks.size() > 1) {
|
||||
FluidStack fluid = tanks.get(1).tank.getFluid();
|
||||
if (fluid != null) {
|
||||
tmp.add(new OrderStack<>(fluid, rawOutputs.size()));
|
||||
@@ -96,5 +97,4 @@ public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
|
||||
list.remove(list.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,5 +9,4 @@ public class GTPPRecipeExtractor extends GregTech5RecipeExtractor {
|
||||
public GTPPRecipeExtractor(boolean removeSpecial) {
|
||||
super(removeSpecial);
|
||||
}
|
||||
|
||||
}
|
||||
+8
-9
@@ -5,14 +5,13 @@ import com.glodblock.github.nei.object.IRecipeExtractor;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.common.items.GT_FluidDisplayItem;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class GregTech5RecipeExtractor implements IRecipeExtractor {
|
||||
|
||||
boolean removeSpecial;
|
||||
@@ -25,7 +24,7 @@ public class GregTech5RecipeExtractor implements IRecipeExtractor {
|
||||
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
|
||||
if (removeSpecial) removeSpecial(rawInputs);
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawInputs.size(); i ++) {
|
||||
for (int i = 0; i < rawInputs.size(); i++) {
|
||||
if (rawInputs.get(i) == null) continue;
|
||||
ItemStack item = rawInputs.get(i).items[0].copy();
|
||||
OrderStack<?> stack;
|
||||
@@ -46,7 +45,7 @@ public class GregTech5RecipeExtractor implements IRecipeExtractor {
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawOutputs.size(); i ++) {
|
||||
for (int i = 0; i < rawOutputs.size(); i++) {
|
||||
if (rawOutputs.get(i) == null) continue;
|
||||
ItemStack item = rawOutputs.get(i).items[0].copy();
|
||||
OrderStack<?> stack;
|
||||
@@ -65,14 +64,14 @@ public class GregTech5RecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
|
||||
private void removeSpecial(List<PositionedStack> list) {
|
||||
for (int i = list.size() - 1; i >= 0; i --) {
|
||||
for (int i = list.size() - 1; i >= 0; i--) {
|
||||
PositionedStack positionedStack = list.get(i);
|
||||
if (positionedStack != null &&
|
||||
(positionedStack.items[0].isItemEqual(ItemList.Tool_DataStick.get(1)) || positionedStack.items[0].isItemEqual(ItemList.Tool_DataOrb.get(1)))) {
|
||||
if (positionedStack != null
|
||||
&& (positionedStack.items[0].isItemEqual(ItemList.Tool_DataStick.get(1))
|
||||
|| positionedStack.items[0].isItemEqual(ItemList.Tool_DataOrb.get(1)))) {
|
||||
list.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+5
-7
@@ -5,11 +5,10 @@ import com.glodblock.github.nei.object.IRecipeExtractor;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
import gregapi.item.ItemFluidDisplay;
|
||||
import gregapi.recipes.Recipe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class GregTech6RecipeExtractor implements IRecipeExtractor {
|
||||
|
||||
@@ -23,7 +22,7 @@ public class GregTech6RecipeExtractor implements IRecipeExtractor {
|
||||
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
|
||||
this.removeMachine(rawInputs);
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawInputs.size(); i ++) {
|
||||
for (int i = 0; i < rawInputs.size(); i++) {
|
||||
if (rawInputs.get(i) == null) continue;
|
||||
ItemStack item = rawInputs.get(i).items[0].copy();
|
||||
OrderStack<?> stack;
|
||||
@@ -43,7 +42,7 @@ public class GregTech6RecipeExtractor implements IRecipeExtractor {
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawOutputs.size(); i ++) {
|
||||
for (int i = 0; i < rawOutputs.size(); i++) {
|
||||
if (rawOutputs.get(i) == null) continue;
|
||||
ItemStack item = rawOutputs.get(i).items[0].copy();
|
||||
OrderStack<?> stack;
|
||||
@@ -61,7 +60,7 @@ public class GregTech6RecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
|
||||
private void removeMachine(List<PositionedStack> list) {
|
||||
for (int i = list.size() - 1; i >= 0; i --) {
|
||||
for (int i = list.size() - 1; i >= 0; i--) {
|
||||
PositionedStack positionedStack = list.get(i);
|
||||
if (positionedStack != null) {
|
||||
for (ItemStack machine : this.Recipes.mRecipeMachineList) {
|
||||
@@ -73,5 +72,4 @@ public class GregTech6RecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+18
-16
@@ -7,22 +7,21 @@ import com.glodblock.github.nei.object.OrderStack;
|
||||
import com.glodblock.github.util.Ae2Reflect;
|
||||
import ic2.neiIntegration.core.recipehandler.FluidCannerRecipeHandler;
|
||||
import ic2.neiIntegration.core.recipehandler.OreWashingRecipeHandler;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class IndustrialCraftRecipeExtractor implements IRecipeExtractor {
|
||||
|
||||
@Override
|
||||
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawInputs.size(); i ++) {
|
||||
for (int i = 0; i < rawInputs.size(); i++) {
|
||||
if (rawInputs.get(i) == null) continue;
|
||||
tmp.add(OrderStack.pack(rawInputs.get(i), i));
|
||||
}
|
||||
@@ -32,7 +31,7 @@ public class IndustrialCraftRecipeExtractor implements IRecipeExtractor {
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawOutputs.size(); i ++) {
|
||||
for (int i = 0; i < rawOutputs.size(); i++) {
|
||||
if (rawOutputs.get(i) == null) continue;
|
||||
tmp.add(OrderStack.pack(rawOutputs.get(i), i));
|
||||
}
|
||||
@@ -44,13 +43,14 @@ public class IndustrialCraftRecipeExtractor implements IRecipeExtractor {
|
||||
List<OrderStack<?>> stacks = new LinkedList<>();
|
||||
|
||||
if (recipe instanceof FluidCannerRecipeHandler) {
|
||||
FluidCannerRecipeHandler.CachedFluidCannerRecipe cachedRecipe = (FluidCannerRecipeHandler.CachedFluidCannerRecipe) ((FluidCannerRecipeHandler) recipe).arecipes.get(index);
|
||||
FluidCannerRecipeHandler.CachedFluidCannerRecipe cachedRecipe =
|
||||
(FluidCannerRecipeHandler.CachedFluidCannerRecipe)
|
||||
((FluidCannerRecipeHandler) recipe).arecipes.get(index);
|
||||
FluidStack input = ReflectIC2.getInputFluid(cachedRecipe);
|
||||
PositionedStack add = rawInputs.size() > 1 ? rawInputs.get(1) : null;
|
||||
stacks.add(OrderStack.pack(add, 0));
|
||||
stacks.add(new OrderStack<>(input, 1));
|
||||
}
|
||||
else if (recipe instanceof OreWashingRecipeHandler) {
|
||||
} else if (recipe instanceof OreWashingRecipeHandler) {
|
||||
stacks = getInputIngredients(rawInputs);
|
||||
int water = ReflectIC2.getOreWasherWater((OreWashingRecipeHandler) recipe, index);
|
||||
stacks.add(new OrderStack<>(new FluidStack(FluidRegistry.WATER, water), stacks.size()));
|
||||
@@ -62,11 +62,14 @@ public class IndustrialCraftRecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs, IRecipeHandler recipe, int index) {
|
||||
public List<OrderStack<?>> getOutputIngredients(
|
||||
List<PositionedStack> rawOutputs, IRecipeHandler recipe, int index) {
|
||||
List<OrderStack<?>> stacks = new LinkedList<>();
|
||||
|
||||
if (recipe instanceof FluidCannerRecipeHandler) {
|
||||
FluidCannerRecipeHandler.CachedFluidCannerRecipe cachedRecipe = (FluidCannerRecipeHandler.CachedFluidCannerRecipe) ((FluidCannerRecipeHandler) recipe).arecipes.get(index);
|
||||
FluidCannerRecipeHandler.CachedFluidCannerRecipe cachedRecipe =
|
||||
(FluidCannerRecipeHandler.CachedFluidCannerRecipe)
|
||||
((FluidCannerRecipeHandler) recipe).arecipes.get(index);
|
||||
FluidStack output = ReflectIC2.getOutputFluid(cachedRecipe);
|
||||
stacks.add(new OrderStack<>(output, 0));
|
||||
} else {
|
||||
@@ -78,15 +81,16 @@ public class IndustrialCraftRecipeExtractor implements IRecipeExtractor {
|
||||
|
||||
private static class ReflectIC2 {
|
||||
|
||||
private final static Field inputsF;
|
||||
private final static Field resultF;
|
||||
private static final Field inputsF;
|
||||
private static final Field resultF;
|
||||
|
||||
private final static Method oreWasherWater;
|
||||
private static final Method oreWasherWater;
|
||||
|
||||
static {
|
||||
try {
|
||||
inputsF = Ae2Reflect.reflectField(FluidCannerRecipeHandler.CachedFluidCannerRecipe.class, "fluidInput");
|
||||
resultF = Ae2Reflect.reflectField(FluidCannerRecipeHandler.CachedFluidCannerRecipe.class, "fluidOutput");
|
||||
resultF =
|
||||
Ae2Reflect.reflectField(FluidCannerRecipeHandler.CachedFluidCannerRecipe.class, "fluidOutput");
|
||||
oreWasherWater = Ae2Reflect.reflectMethod(OreWashingRecipeHandler.class, "getreqWater", int.class);
|
||||
} catch (NoSuchFieldException | NoSuchMethodException e) {
|
||||
throw new IllegalStateException("Failed to initialize IC2 reflection hacks!", e);
|
||||
@@ -108,7 +112,5 @@ public class IndustrialCraftRecipeExtractor implements IRecipeExtractor {
|
||||
throw new IllegalStateException("Failed to invoke method: " + oreWasherWater, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+2
-4
@@ -3,7 +3,6 @@ package com.glodblock.github.nei.recipes.extractor;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import com.glodblock.github.nei.object.IRecipeExtractor;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,7 +17,7 @@ public class VanillaRecipeExtractor implements IRecipeExtractor {
|
||||
@Override
|
||||
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawInputs.size(); i ++) {
|
||||
for (int i = 0; i < rawInputs.size(); i++) {
|
||||
if (rawInputs.get(i) == null) continue;
|
||||
final int col = (rawInputs.get(i).relx - 25) / 18;
|
||||
final int row = (rawInputs.get(i).rely - 6) / 18;
|
||||
@@ -32,7 +31,7 @@ public class VanillaRecipeExtractor implements IRecipeExtractor {
|
||||
@Override
|
||||
public List<OrderStack<?>> getOutputIngredients(List<PositionedStack> rawOutputs) {
|
||||
List<OrderStack<?>> tmp = new LinkedList<>();
|
||||
for (int i = 0; i < rawOutputs.size(); i ++) {
|
||||
for (int i = 0; i < rawOutputs.size(); i++) {
|
||||
if (rawOutputs.get(i) == null) continue;
|
||||
final int col = (rawOutputs.get(i).relx - 25) / 18;
|
||||
final int row = (rawOutputs.get(i).rely - 6) / 18;
|
||||
@@ -42,5 +41,4 @@ public class VanillaRecipeExtractor implements IRecipeExtractor {
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user