Made button functional added icon + proper functionality

This commit is contained in:
Runakai1 committed 2022-08-13 15:41:55 +02:00
1 parent 2fc407ce61
commit b3f3ecfe2e
5 files changed
+22 -13

No files matched your search

@@ -41,16 +41,22 @@ public final class FluidRecipe {
IRecipeExtractor extractor = IdentifierMap.get(tRecipe.getOverlayIdentifier());
if (extractor == null) return new ArrayList<>();
List<PositionedStack> tmp = new ArrayList<>(tRecipe.getIngredientStacks(index));
List<PositionedStack> fluidClone = new ArrayList<>();
if (priority) {
for (int i = 0; i < tmp.size(); i++) {
if(tmp.get(i).item.getItem() instanceof GT_FluidDisplayItem) {
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(new ChatComponentText(String.valueOf(tmp.size())));
PositionedStack Stack = tmp.get(i);
tmp.remove(Stack);
tmp.add(0, Stack);
fluidClone.add(Stack);
}
}
for (int i = 0; i < fluidClone.size(); i++) {
tmp.remove(fluidClone.get(i));
}
Collections.reverse(fluidClone);
for (int i = 0; i < fluidClone.size(); i++) {
tmp.add(0, fluidClone.get(i));
}
}
return extractor.getInputIngredients(tmp, recipe, index);
}