diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-10-02 07:31:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 05:31:08 +0000 |
commit | 3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3 (patch) | |
tree | 107d9d2442891990ef1cdef1d8bb2df6bb96952a /src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java | |
parent | bfc7b2b07f72d0903a70791ff96f9c837ddd5ff0 (diff) | |
download | GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.tar.gz GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.tar.bz2 GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.zip |
Cleanup the codebase (#3311)
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java')
-rw-r--r-- | src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java index 2d3eb590d9..0de075f497 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java @@ -219,7 +219,7 @@ public class MTEMegaIndustrialApiary extends KubaTechGTMultiBlockBase<MTEMegaInd .addElement( 'W', ofChain(ofBlock(Blocks.water, 0), ofBlock(BlocksItems.getFluidBlock(InternalName.fluidDistilledWater), 0))) - .addElement('F', new IStructureElementNoPlacement<MTEMegaIndustrialApiary>() { + .addElement('F', new IStructureElementNoPlacement<>() { @Override public boolean check(MTEMegaIndustrialApiary mte, World world, int x, int y, int z) { @@ -248,7 +248,7 @@ public class MTEMegaIndustrialApiary extends KubaTechGTMultiBlockBase<MTEMegaInd public void onRemoval() { super.onRemoval(); if (getBaseMetaTileEntity().isServerSide()) - tryOutputAll(mStorage, s -> Collections.singletonList(((BeeSimulator) s).queenStack)); + tryOutputAll(mStorage, s -> Collections.singletonList(s.queenStack)); } private boolean isCacheDirty = true; @@ -467,9 +467,8 @@ public class MTEMegaIndustrialApiary extends KubaTechGTMultiBlockBase<MTEMegaInd if (mStorage.size() >= mMaxSlots) break; } updateSlots(); - } else if (mPrimaryMode == 1 && mStorage.size() > 0) { - if (tryOutputAll(mStorage, s -> Collections.singletonList(((BeeSimulator) s).queenStack))) - isCacheDirty = true; + } else if (mPrimaryMode == 1 && !mStorage.isEmpty()) { + if (tryOutputAll(mStorage, s -> Collections.singletonList(s.queenStack))) isCacheDirty = true; } else return CheckRecipeResultRegistry.NO_RECIPE; mMaxProgresstime = 10; mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); @@ -594,7 +593,7 @@ public class MTEMegaIndustrialApiary extends KubaTechGTMultiBlockBase<MTEMegaInd if (this.mGlassTier < 10 && !this.mEnergyHatches.isEmpty()) for (MTEHatchEnergy hatchEnergy : this.mEnergyHatches) if (this.mGlassTier < hatchEnergy.mTier) return false; - boolean valid = this.mMaintenanceHatches.size() == 1 && this.mEnergyHatches.size() >= 1 && this.mCasing >= 190; + boolean valid = this.mMaintenanceHatches.size() == 1 && !this.mEnergyHatches.isEmpty() && this.mCasing >= 190; flowersError = valid && !this.flowersCheck.isEmpty(); if (valid) updateMaxSlots(); return valid; |