Skip to content

Commit

Permalink
Merge pull request #6 from GlodBlock/patch-1
Browse files Browse the repository at this point in the history
去除specialslot的闪存或数据球
  • Loading branch information
vfyjxf authored Aug 8, 2021
2 parents d6f3cb6 + bceea52 commit 5b53c52
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public List<PositionedStack> getRecipeInput(IRecipeHandler recipe, int recipeInd
if (gtDefaultClz.isInstance(recipe) || gtAssLineClz.isInstance(recipe)) {
List<PositionedStack> recipeInputs = new ArrayList<>(recipe.getIngredientStacks(recipeIndex));
recipeInputs.removeIf(positionedStack -> getFluidFromDisplayStack(positionedStack.items[0]) != null || positionedStack.item.stackSize == 0);
if (!recipeInputs.isEmpty()) {
ItemStack specialItem = recipeInputs.get(recipeInputs.size() - 1).items[0];
if ((specialItem.isItemEqual(ItemList.Tool_DataStick.get(1)) || specialItem.isItemEqual(ItemList.Tool_DataOrb.get(1)) && (recipe.getRecipeName().equals("gt.recipe.scanner") || recipe.getRecipeName().equals("gt.recipe.fakeAssemblylineProcess"))))
recipeInputs.remove(recipeInputs.size() - 1);
}
return recipeInputs;
}
return null;
Expand All @@ -66,7 +71,7 @@ public List<PositionedStack> getRecipeOutput(IRecipeHandler recipe, int recipeIn
if (gtDefaultClz.isInstance(recipe) || gtAssLineClz.isInstance(recipe)) {
List<PositionedStack> recipeOutputs = new ArrayList<>(recipe.getOtherStacks(recipeIndex));
recipeOutputs.removeIf(positionedStack -> getFluidFromDisplayStack(positionedStack.items[0]) != null);
//remove output if it's chance != 1
//remove output if it's chance != 10000
recipeOutputs.removeIf(stack -> stack instanceof FixedPositionedStack && !(((FixedPositionedStack) stack).mChance == 10000 || ((FixedPositionedStack) stack).mChance <= 0));
return recipeOutputs;
}
Expand Down

0 comments on commit 5b53c52

Please sign in to comment.