Skip to content

Commit

Permalink
fix large distillery always requiring maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 committed Mar 5, 2023
1 parent 8628dba commit 84e8a7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

* Added additional Alloy Blast Smelter recipes for materials containing fluids and alloy smelter materials
* Added new material flag "disable_alloy_blast" to disable alloy blast recipes
* Fix Fractionating Distillery requiring maintenance hatch with config disabled
* Added ru_ru translation (#20)
* Updated zn_cn translation (#10)
* Added compat for GTCEu 2.5.3 (#37)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import gregtech.api.recipes.RecipeMaps;
import gregtech.client.renderer.ICubeRenderer;
import gregtech.client.renderer.texture.cube.OrientedOverlayRenderer;
import gregtech.common.ConfigHolder;
import gregtech.common.blocks.BlockBoilerCasing;
import gregtech.common.blocks.MetaBlocks;
import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityMultiFluidHatch;
Expand Down Expand Up @@ -48,11 +49,12 @@ protected Function<BlockPos, Integer> multiblockPartSorter() {
return BlockPos::getY; // todo this needs to be "relative up" with Freedom Wrench
}

@Nonnull
@Override
protected BlockPattern createStructurePattern() {
TraceabilityPredicate casingPredicate = states(getCasingState()).setMinGlobalLimited(40); // Different characters use common constraints
TraceabilityPredicate maintenancePredicate = hasMaintenanceMechanics() ? abilities(MultiblockAbility.MAINTENANCE_HATCH).setMinGlobalLimited(1).setMaxGlobalLimited(1) :
casingPredicate;
TraceabilityPredicate maintenancePredicate = this.hasMaintenanceMechanics() && ConfigHolder.machines.enableMaintenance ?
abilities(MultiblockAbility.MAINTENANCE_HATCH).setMinGlobalLimited(1).setMaxGlobalLimited(1) : casingPredicate;
return FactoryBlockPattern.start(RIGHT, FRONT, DOWN)
.aisle("#####", "#ZZZ#", "#ZCZ#", "#ZZZ#", "#####")
.aisle("##X##", "#XAX#", "XAPAX", "#XAX#", "##X##").setRepeatable(1, 12)
Expand Down

0 comments on commit 84e8a7d

Please sign in to comment.