Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whoops, normal multiblocks aren't supposed to use laser hatches! #25

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,6 @@ public static TraceabilityPredicate maintenanceOrParallel(MultiblockControllerBa
return predicate;
}

public static TraceabilityPredicate autoEnergyInputs(int min, int max, int previewCount) {
return new TraceabilityPredicate(abilities(MultiblockAbility.INPUT_ENERGY, MultiblockAbility.INPUT_LASER)
.setMinGlobalLimited(min).setMaxGlobalLimited(max).setPreviewCount(previewCount));
}

public static TraceabilityPredicate autoEnergyInputs(int min, int max) {
return autoEnergyInputs(min, max, 2);
}

public static TraceabilityPredicate autoEnergyInputs() {
return autoEnergyInputs(1, 3);
}

public static Supplier<?> getMaintenanceHatchMTE() {
return () -> ConfigHolder.machines.enableMaintenance ? MetaTileEntities.MAINTENANCE_HATCH :
MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.INVAR_HEATPROOF);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) {
.where('C', heatingCoils())
.where('X', states(getCasingState())
.or(autoAbilities(false, true, true, true, true, true, false))
.or(TraceabilityPredicates.autoEnergyInputs(1, 8)))
.or(abilities(MultiblockAbility.INPUT_ENERGY)
.setMinGlobalLimited(1)
.setMaxGlobalLimited(8)
.setPreviewCount(8)))
.where('M', abilities(MultiblockAbility.MUFFLER_HATCH))
.where('#', air())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.api.metatileentity.multiblock.IMultiblockPart;
import gregtech.api.metatileentity.multiblock.MultiblockAbility;
import gregtech.api.metatileentity.multiblock.RecipeMapMultiblockController;
import gregtech.api.pattern.BlockPattern;
import gregtech.api.pattern.FactoryBlockPattern;
Expand Down Expand Up @@ -46,8 +47,11 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) {
.where('S', selfPredicate())
.where('X', states(getCasingState())
.or(TraceabilityPredicates.autoBusesAndHatches(getRecipeMap()))
.or(TraceabilityPredicates.autoEnergyInputs(1, 8))
.or(TraceabilityPredicates.maintenanceOrParallel(this)))
.or(TraceabilityPredicates.maintenanceOrParallel(this))
.or(abilities(MultiblockAbility.INPUT_ENERGY)
.setMinGlobalLimited(1)
.setMaxGlobalLimited(8)
.setPreviewCount(8)))
.where('#', air())
.build();
}
Expand Down