diff options
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/IHatchElement.java')
-rw-r--r-- | src/main/java/gregtech/api/interfaces/IHatchElement.java | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IHatchElement.java b/src/main/java/gregtech/api/interfaces/IHatchElement.java index 254d9562c2..5b825880ae 100644 --- a/src/main/java/gregtech/api/interfaces/IHatchElement.java +++ b/src/main/java/gregtech/api/interfaces/IHatchElement.java @@ -59,21 +59,35 @@ public interface IHatchElement<T> { default <T2 extends T> IStructureElement<T2> newAny(int aCasingIndex, int aDot) { if (aCasingIndex < 0 || aDot < 0) throw new IllegalArgumentException(); - return GT_StructureUtility.<T2>buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) - .continueIfSuccess().build(); + return GT_StructureUtility.<T2>buildHatchAdder() + .anyOf(this) + .casingIndex(aCasingIndex) + .dot(aDot) + .continueIfSuccess() + .build(); } default <T2 extends T> IStructureElement<T2> newAny(int aCasingIndex, int aDot, ForgeDirection... allowedFacings) { if (aCasingIndex < 0 || aDot < 0) throw new IllegalArgumentException(); - return GT_StructureUtility.<T2>buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) - .continueIfSuccess().allowOnly(allowedFacings).build(); + return GT_StructureUtility.<T2>buildHatchAdder() + .anyOf(this) + .casingIndex(aCasingIndex) + .dot(aDot) + .continueIfSuccess() + .allowOnly(allowedFacings) + .build(); } default <T2 extends T> IStructureElement<T2> newAny(int aCasingIndex, int aDot, BiPredicate<? super T2, ? super IGregTechTileEntity> aShouldSkip) { if (aCasingIndex < 0 || aDot < 0 || aShouldSkip == null) throw new IllegalArgumentException(); - return GT_StructureUtility.<T2>buildHatchAdder().anyOf(this).casingIndex(aCasingIndex).dot(aDot) - .shouldSkip(aShouldSkip).continueIfSuccess().build(); + return GT_StructureUtility.<T2>buildHatchAdder() + .anyOf(this) + .casingIndex(aCasingIndex) + .dot(aDot) + .shouldSkip(aShouldSkip) + .continueIfSuccess() + .build(); } default <T2 extends T> IHatchElement<T2> or(IHatchElement<? super T2> fallback) { @@ -95,13 +109,18 @@ class HatchElementEither<T> implements IHatchElement<T> { @Override public List<? extends Class<? extends IMetaTileEntity>> mteClasses() { if (mMteClasses == null) mMteClasses = ImmutableList.<Class<? extends IMetaTileEntity>>builder() - .addAll(first.mteClasses()).addAll(second.mteClasses()).build(); + .addAll(first.mteClasses()) + .addAll(second.mteClasses()) + .build(); return mMteClasses; } @Override public IGT_HatchAdder<? super T> adder() { - return ((t, te, i) -> first.adder().apply(t, te, i) || second.adder().apply(t, te, i)); + return ((t, te, i) -> first.adder() + .apply(t, te, i) + || second.adder() + .apply(t, te, i)); } @Override |