Temporary fix for REI fluid cells integration (#1921)

This commit is contained in:
vhd 2019-12-25 00:15:40 +02:00 committed by modmuss50
parent d4abd56a3c
commit f7661681bc
2 changed files with 6 additions and 10 deletions

View file

@ -58,6 +58,11 @@ public class MachineRecipeDisplay<R extends RebornRecipe> implements RecipeDispl
this.fluidInstance = ((RebornFluidRecipe) recipe).getFluidInstance(); this.fluidInstance = ((RebornFluidRecipe) recipe).getFluidInstance();
inputs.add(Collections.singletonList(EntryStack.create(fluidInstance.getFluid(), fluidInstance.getAmount().getRawValue()))); inputs.add(Collections.singletonList(EntryStack.create(fluidInstance.getFluid(), fluidInstance.getAmount().getRawValue())));
} }
for (List<EntryStack> entries : inputs)
for (EntryStack stack : entries)
ReiPlugin.applyCellEntry(stack);
for (EntryStack stack : outputs)
ReiPlugin.applyCellEntry(stack);
} }
public int getEnergy() { public int getEnergy() {

View file

@ -171,18 +171,9 @@ public class ReiPlugin implements REIPluginV0 {
// Check Tags will not check the amount of the ItemStack, but will enable checking their tags. // Check Tags will not check the amount of the ItemStack, but will enable checking their tags.
for (EntryStack stack : RoughlyEnoughItemsCore.getEntryRegistry().getStacksList()) for (EntryStack stack : RoughlyEnoughItemsCore.getEntryRegistry().getStacksList())
applyCellEntry(stack); applyCellEntry(stack);
for (List<RecipeDisplay> displays : RecipeHelper.getInstance().getAllRecipes().values()) {
for (RecipeDisplay display : displays) {
for (List<EntryStack> entries : display.getInputEntries())
for (EntryStack stack : entries)
applyCellEntry(stack);
for (EntryStack stack : display.getOutputEntries())
applyCellEntry(stack);
}
}
} }
private void applyCellEntry(EntryStack stack) { public static void applyCellEntry(EntryStack stack) {
// getItem can be null but this works // getItem can be null but this works
if (stack.getItem() == TRContent.CELL) if (stack.getItem() == TRContent.CELL)
stack.addSetting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE); stack.addSetting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE);