MultiblockTweaker

MultiblockTweaker

562k Downloads

Energyless recipes with CEu

ThePansmith opened this issue ยท 1 comments

commented

ALSON mentioned that you were able to pull something together that would allow recipes to bypass CE's recipe validation checks, allowing recipes to not require energy in any way.

Could get this ported to CEu?

commented

Just for future reference, these seem to be the relevant bits in the GTCE version:

@NotNull
protected EnumValidationResult validate() {
if (this.EUt == 0) {
int eUt = EUt;
EUt = 1;
super.validate();
EUt = eUt;
} else {
super.validate();
}
return this.recipeStatus;
}

@Override
protected boolean checkStructureComponents(List<IMultiblockPart> parts, Map<MultiblockAbility<Object>, List<Object>> abilities) {
int itemInputsCount = (abilities.getOrDefault(MultiblockAbility.IMPORT_ITEMS, Collections.emptyList())).stream()
.map(IItemHandler.class::cast).mapToInt(IItemHandler::getSlots).sum();
int fluidInputsCount = abilities.getOrDefault(MultiblockAbility.IMPORT_FLUIDS, Collections.emptyList()).size();
return itemInputsCount >= this.recipeMap.getMinInputs()
&& fluidInputsCount >= this.recipeMap.getMinFluidInputs()
&& (multiblock.noEnergy ||
abilities.containsKey(MultiblockAbility.INPUT_ENERGY) ||
abilities.containsKey(MultiblockAbility.OUTPUT_ENERGY));
}

Not sure what the relevant changes for GTCEu would be.