mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-22 21:09:43 +00:00
refactor 6
This commit is contained in:
1 parent
5b62c4fdc8
commit
8d072f0c89
78 files changed
+525
-882
No files matched your search
+3
-11
@@ -4,8 +4,7 @@ import codechicken.nei.api.IOverlayHandler;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternTerminal;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternTerminalEx;
|
||||
import com.glodblock.github.client.gui.base.FCGuiEncodeTerminal;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
import com.glodblock.github.nei.recipes.FluidRecipe;
|
||||
import com.glodblock.github.network.CPacketTransferRecipe;
|
||||
@@ -29,11 +28,8 @@ public class FluidPatternTerminalRecipeTransferHandler implements IOverlayHandle
|
||||
|
||||
@Override
|
||||
public void overlayRecipe(GuiContainer firstGui, IRecipeHandler recipe, int recipeIndex, boolean shift) {
|
||||
if (isCorrectGui(firstGui)) {
|
||||
boolean priority = false;
|
||||
if (firstGui instanceof GuiFluidPatternTerminalEx) {
|
||||
priority = ((GuiFluidPatternTerminalEx) firstGui).container.prioritize;
|
||||
}
|
||||
if (firstGui instanceof FCGuiEncodeTerminal) {
|
||||
boolean priority = ((FCGuiEncodeTerminal) firstGui).container.prioritize;
|
||||
List<OrderStack<?>> in = FluidRecipe.getPackageInputs(recipe, recipeIndex, priority);
|
||||
List<OrderStack<?>> out = FluidRecipe.getPackageOutputs(recipe, recipeIndex, !notUseOther(recipe));
|
||||
boolean craft = shouldCraft(recipe);
|
||||
@@ -41,10 +37,6 @@ public class FluidPatternTerminalRecipeTransferHandler implements IOverlayHandle
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isCorrectGui(GuiContainer firstGui) {
|
||||
return firstGui instanceof GuiFluidPatternTerminal || firstGui instanceof GuiFluidPatternTerminalEx;
|
||||
}
|
||||
|
||||
private boolean notUseOther(IRecipeHandler recipeHandler) {
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipeHandler;
|
||||
return notOtherSet.contains(tRecipe.getOverlayIdentifier());
|
||||
|
||||
Reference in new issue
Block a user