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

Fix: Precise Assembler cannot accept UEV+ machine blocks. #3844

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

import javax.annotation.Nonnull;

Expand Down Expand Up @@ -159,11 +160,22 @@ public IStructureDefinition<MTEPreciseAssembler> getStructureDefinition() {
withChannel(
"machine casing",
StructureUtility.ofBlocksTiered(
(block, meta) -> (block == GregTechAPI.sBlockCasings1 && meta >= 0 && meta <= 9) ? meta
: -2,
IntStream.range(0, 10)
.mapToObj(
meta -> org.apache.commons.lang3.tuple.Pair.of(GregTechAPI.sBlockCasings1, meta))
(block,
meta) -> (block == GregTechAPI.sBlockCasings1 && meta >= 0 && meta <= 9)
|| (block == GregTechAPI.sBlockCasingsNH && meta >= 10 && meta <= 14) ? meta : -2,
Stream.concat(
IntStream.range(0, 10)
.mapToObj(
meta -> org.apache.commons.lang3.tuple.Pair
.of(GregTechAPI.sBlockCasings1, meta))
.collect(Collectors.toList())
.stream(),
IntStream.range(10, 15)
.mapToObj(
meta -> org.apache.commons.lang3.tuple.Pair
.of(GregTechAPI.sBlockCasingsNH, meta))
.collect(Collectors.toList())
.stream())
.collect(Collectors.toList()),
-1,
MTEPreciseAssembler::setMachineTier,
Expand Down
Loading