From 8ac58626bd4caa9e49f58acc6b97ac031f6c2107 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Mon, 10 Apr 2023 17:49:16 +0100 Subject: Update spotless config to 0.2.2 --- .../GT_MetaTileEntity_AdvSeismicProspector.java | 245 ++++---- .../basic/GT_MetaTileEntity_Boxinator.java | 185 +++--- .../machines/basic/GT_MetaTileEntity_Charger.java | 53 +- .../basic/GT_MetaTileEntity_CuringOven.java | 107 ++-- .../basic/GT_MetaTileEntity_IndustrialApiary.java | 651 ++++++++++----------- .../basic/GT_MetaTileEntity_Massfabricator.java | 148 +++-- ..._MetaTileEntity_MicrowaveEnergyTransmitter.java | 197 +++---- .../machines/basic/GT_MetaTileEntity_Miner.java | 225 ++++--- .../basic/GT_MetaTileEntity_MonsterRepellent.java | 74 +-- .../basic/GT_MetaTileEntity_PotionBrewer.java | 159 +++-- .../machines/basic/GT_MetaTileEntity_Printer.java | 56 +- .../machines/basic/GT_MetaTileEntity_Pump.java | 285 +++++---- .../basic/GT_MetaTileEntity_Replicator.java | 157 +++-- .../basic/GT_MetaTileEntity_RockBreaker.java | 156 ++--- .../machines/basic/GT_MetaTileEntity_Scanner.java | 271 ++++----- .../basic/GT_MetaTileEntity_SeismicProspector.java | 301 +++++----- .../basic/GT_MetaTileEntity_Teleporter.java | 294 +++++----- 17 files changed, 1700 insertions(+), 1864 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities/machines/basic') diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index ad55276576..089713f01a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -42,66 +42,66 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba int cZ; public GT_MetaTileEntity_AdvSeismicProspector(int aID, String aName, String aNameRegional, int aTier, int aRadius, - int aStep) { + int aStep) { super( - aID, - aName, - aNameRegional, - aTier, - 1, // amperage - "", - 1, // input slot count - 1, // output slot count - "Default.png", // GUI name - "", // NEI name - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW) - .glow() - .build())); + aID, + aName, + aNameRegional, + aTier, + 1, // amperage + "", + 1, // input slot count + 1, // output slot count + "Default.png", // GUI name + "", // NEI name + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW) + .glow() + .build())); radius = aRadius; step = aStep; } @@ -109,14 +109,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba @Override public String[] getDescription() { return new String[] { "Place, activate with explosives", - "2 Powderbarrels, " + "4 Glyceryl Trinitrate, " + "16 TNT, or " + "8 ITNT", - "Use Data Stick, Scan Data Stick, Print Data Stick, Bind Pages into Book", - "Ore prospecting area = " + radius * 2 + "x" + radius * 2 + " ONLY blocks below prospector", - "Oil prospecting area 3x3 oilfields, each is 8x8 chunks" }; + "2 Powderbarrels, " + "4 Glyceryl Trinitrate, " + "16 TNT, or " + "8 ITNT", + "Use Data Stick, Scan Data Stick, Print Data Stick, Bind Pages into Book", + "Ore prospecting area = " + radius * 2 + "x" + radius * 2 + " ONLY blocks below prospector", + "Oil prospecting area 3x3 oilfields, each is 8x8 chunks" }; } protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures, String aGUIName, String aNEIName, int aRadius, int aStep) { + ITexture[][][] aTextures, String aGUIName, String aNEIName, int aRadius, int aStep) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); radius = aRadius; step = aStep; @@ -125,14 +125,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AdvSeismicProspector( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName, - this.radius, - this.step); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName, + this.radius, + this.step); } @Override @@ -141,43 +141,43 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba ItemStack aStack = aPlayer.getCurrentEquippedItem(); if (!ready && (GT_Utility.consumeItems(aPlayer, aStack, Item.getItemFromBlock(Blocks.tnt), 16) - || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 8) - || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 4) - || GT_Utility.consumeItems(aPlayer, aStack, ItemList.Block_Powderbarrel.getItem(), 2))) { + || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 8) + || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 4) + || GT_Utility.consumeItems(aPlayer, aStack, ItemList.Block_Powderbarrel.getItem(), 2))) { this.ready = true; this.mMaxProgresstime = (aPlayer.capabilities.isCreativeMode ? 20 : 800); } else if (ready && mMaxProgresstime == 0 - && aStack != null - && aStack.stackSize == 1 - && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { - this.ready = false; - - // prospecting ores - HashMap tOres = new HashMap<>(36); - - prospectOres(tOres); - - // prospecting oils - ArrayList tOils = new ArrayList<>(); - prospectOils(tOils); - - GT_Utility.ItemNBT.setAdvancedProspectionData( - mTier, - aStack, - this.getBaseMetaTileEntity() - .getXCoord(), - this.getBaseMetaTileEntity() - .getYCoord(), - this.getBaseMetaTileEntity() - .getZCoord(), - this.getBaseMetaTileEntity() - .getWorld().provider.dimensionId, - tOils, - GT_Utility.sortByValueToList(tOres), - radius); - } + && aStack != null + && aStack.stackSize == 1 + && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { + this.ready = false; + + // prospecting ores + HashMap tOres = new HashMap<>(36); + + prospectOres(tOres); + + // prospecting oils + ArrayList tOils = new ArrayList<>(); + prospectOils(tOils); + + GT_Utility.ItemNBT.setAdvancedProspectionData( + mTier, + aStack, + this.getBaseMetaTileEntity() + .getXCoord(), + this.getBaseMetaTileEntity() + .getYCoord(), + this.getBaseMetaTileEntity() + .getZCoord(), + this.getBaseMetaTileEntity() + .getWorld().provider.dimensionId, + tOils, + GT_Utility.sortByValueToList(tOres), + radius); + } } return true; @@ -202,9 +202,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba for (int i = 0; i < oilfieldSize; i++) { for (int j = 0; j < oilfieldSize; j++) { Chunk tChunk = getBaseMetaTileEntity().getWorld() - .getChunkFromChunkCoords( - xChunk + i + x * oilfieldSize, - zChunk + j + z * oilfieldSize); + .getChunkFromChunkCoords(xChunk + i + x * oilfieldSize, zChunk + j + z * oilfieldSize); FluidStack tFluid = undergroundOilReadInformation(tChunk); if (tFluid != null) { if (tFluid.amount > max) max = tFluid.amount; @@ -217,13 +215,13 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba } aOils.add( - ++oilFieldCount + "," - + min - + "-" - + max - + "," - + tFluids.get(cInts) - .getLocalizedName()); + ++oilFieldCount + "," + + min + + "-" + + max + + "," + + tFluids.get(cInts) + .getLocalizedName()); } } } catch (Exception ignored) {} @@ -231,13 +229,11 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectOres(Map aOres) { int tLeftXBound = this.getBaseMetaTileEntity() - .getXCoord() - - radius; + .getXCoord() - radius; int tRightXBound = tLeftXBound + 2 * radius; int tLeftZBound = this.getBaseMetaTileEntity() - .getZCoord() - - radius; + .getZCoord() - radius; int tRightZBound = tLeftZBound + 2 * radius; for (int i = tLeftXBound; i <= tRightXBound; i += step) { @@ -258,7 +254,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectHole(int i, int k, Map aOres) { String tFoundOre; for (int j = this.getBaseMetaTileEntity() - .getYCoord(); j > 0; j--) { + .getYCoord(); j > 0; j--) { tFoundOre = checkForOre(i, j, k); if (tFoundOre != null) countOre(aOres, tFoundOre, cX, cZ); } @@ -266,28 +262,27 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private String checkForOre(int x, int y, int z) { Block tBlock = this.getBaseMetaTileEntity() - .getBlock(x, y, z); + .getBlock(x, y, z); if (tBlock instanceof GT_Block_Ores_Abstract) { TileEntity tTileEntity = getBaseMetaTileEntity().getWorld() - .getTileEntity(x, y, z); + .getTileEntity(x, y, z); if ((tTileEntity instanceof GT_TileEntity_Ores) && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering // small // ores Materials tMaterial = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData - % 1000]; + % 1000]; if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName; } } else { int tMetaID = getBaseMetaTileEntity().getWorld() - .getBlockMetadata(x, y, z); + .getBlockMetadata(x, y, z); ItemStack is = new ItemStack(tBlock, 1, tMetaID); ItemData association = GT_OreDictUnificator.getAssociation(is); if ((association != null) && (association.mPrefix.toString() - .startsWith("ore"))) - return association.mMaterial.mMaterial.mDefaultLocalName; + .startsWith("ore"))) return association.mMaterial.mMaterial.mDefaultLocalName; else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName(); } return null; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java index 1b30282781..02c1897522 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -22,85 +22,85 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Puts things into Boxes", - 2, - 1, - "Packager.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_BOXINATOR), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_BOXINATOR_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_BOXINATOR), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_BOXINATOR_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_BOXINATOR), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_BOXINATOR_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW) - .glow() - .build())); + aID, + aName, + aNameRegional, + aTier, + 1, + "Puts things into Boxes", + 2, + 1, + "Packager.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_BOXINATOR), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_BOXINATOR_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_BOXINATOR), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_BOXINATOR_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_BOXINATOR), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_BOXINATOR_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW) + .glow() + .build())); } public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_Boxinator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boxinator( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -110,10 +110,9 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine private boolean hasValidCache(ItemStack mItem, int mType, boolean mClearOnFailure) { if (aInputCache != null && aOutputCache != null - && aTypeCache == mType - && aInputCache.isItemEqual(mItem) - && ItemStack.areItemStackTagsEqual(mItem, aInputCache)) - return true; + && aTypeCache == mType + && aInputCache.isItemEqual(mItem) + && ItemStack.areItemStackTagsEqual(mItem, aInputCache)) return true; // clear cache if it was invalid if (mClearOnFailure) { aInputCache = null; @@ -138,7 +137,7 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine ItemStack tSlot0 = getInputAt(0); ItemStack tSlot1 = getInputAt(1); if ((GT_Utility.isStackValid(tSlot0)) && (GT_Utility.isStackValid(tSlot1)) - && (GT_Utility.getContainerItem(tSlot0, true) == null)) { + && (GT_Utility.getContainerItem(tSlot0, true) == null)) { if ((ItemList.Schematic_1by1.isStackEqual(tSlot1)) && (tSlot0.stackSize >= 1)) { boolean tIsCached = hasValidCache(tSlot0, 1, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0); @@ -158,7 +157,7 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine if ((ItemList.Schematic_2by2.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 4)) { boolean tIsCached = hasValidCache(tSlot0, 2, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() - : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); + : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 4; @@ -175,16 +174,8 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine if ((ItemList.Schematic_3by3.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 9)) { boolean tIsCached = hasValidCache(tSlot0, 3, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() - : GT_ModHandler.getRecipeOutput( - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0); + : GT_ModHandler + .getRecipeOutput(tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 9; @@ -204,39 +195,31 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { if (!super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) { return false; } ItemStack tInput1 = getInputAt(1); if ((ItemList.Schematic_1by1.isStackEqual(tInput1)) || (ItemList.Schematic_2by2.isStackEqual(tInput1)) - || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { + || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { if (hasValidCache(aStack, aTypeCache, false)) return true; if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe( - getBaseMetaTileEntity(), - true, - gregtech.api.enums.GT_Values.V[mTier], - null, - GT_Utility.copyAmount(64L, aStack), - tInput1) != null) { + getBaseMetaTileEntity(), + true, + gregtech.api.enums.GT_Values.V[mTier], + null, + GT_Utility.copyAmount(64L, aStack), + tInput1) != null) { return true; } if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(aStack) != null) return true; if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) - && GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) { + && GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) { return true; } - return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput( - aStack, - aStack, - aStack, - aStack, - aStack, - aStack, - aStack, - aStack, - aStack) != null); + return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler + .getRecipeOutput(aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack) != null); } else { return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java index f273197026..de43fd715e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java @@ -14,17 +14,17 @@ import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuffer { public GT_MetaTileEntity_Charger(int aID, String aName, String aNameRegional, int aTier, String aDescription, - int aSlotCount) { + int aSlotCount) { super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); } public GT_MetaTileEntity_Charger(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - int aSlotCount) { + int aSlotCount) { super(aName, aTier, aDescription, aTextures, aSlotCount); } public GT_MetaTileEntity_Charger(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - int aSlotCount) { + int aSlotCount) { super(aName, aTier, aDescription, aTextures, aSlotCount); } @@ -62,40 +62,41 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf if (mBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity mMetaTileEntity) { // for (int t = 0; t < 6; t++) { if (mMetaTileEntity.dechargerSlotCount() > 0 - && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { + && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), - k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null - && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { + && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { mBaseMetaTileEntity.increaseStoredEnergyUnits( - GT_ModHandler.dischargeElectricItem( - mMetaTileEntity.mInventory[i], - GT_Utility.safeInt( - Math.min( - V[mTier] * 15, - mBaseMetaTileEntity.getEUCapacity() - - mBaseMetaTileEntity.getStoredEU())), - (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), - true, - false, - false), - true); + GT_ModHandler.dischargeElectricItem( + mMetaTileEntity.mInventory[i], + GT_Utility.safeInt( + Math.min( + V[mTier] * 15, + mBaseMetaTileEntity.getEUCapacity() + - mBaseMetaTileEntity.getStoredEU())), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), + true, + false, + false), + true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } } } if (mMetaTileEntity.rechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), - k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (mBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { - mBaseMetaTileEntity.decreaseStoredEU( + mBaseMetaTileEntity + .decreaseStoredEU( GT_ModHandler.chargeElectricItem( - mMetaTileEntity.mInventory[i], - GT_Utility.safeInt( - Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), - (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), - true, - false), + mMetaTileEntity.mInventory[i], + GT_Utility + .safeInt(Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), + true, + false), true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java index fb0bbfb4c2..01832d0d96 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java @@ -21,55 +21,52 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine public GT_MetaTileEntity_CuringOven(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Heats tools for hardening", - 1, - 1, - "E_Oven.png", - "", - TextureFactory.of( - new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), - TextureFactory.of( - new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), - TextureFactory.of( - new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))); + aID, + aName, + aNameRegional, + aTier, + 1, + "Heats tools for hardening", + 1, + 1, + "E_Oven.png", + "", + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))); } public GT_MetaTileEntity_CuringOven(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_CuringOven(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_CuringOven( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return (super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) - && ItemList.Cell_Empty.isStackEqual(aStack); + && ItemList.Cell_Empty.isStackEqual(aStack); } @Override @@ -81,34 +78,34 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { for (ItemStack tStack : mInventory) if (tStack != null && tStack.getItem() instanceof GT_MetaGenerated_Tool - && getBaseMetaTileEntity().getStoredEU() > 0) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(24, true); - NBTTagCompound aNBT = tStack.getTagCompound(); - if (aNBT != null) { - int tHeat = 300; - long tWorldTime = getBaseMetaTileEntity().getWorld() - .getTotalWorldTime(); - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if (aNBT != null && aNBT.hasKey("Heat")) { - tHeat = aNBT.getInteger("Heat"); - if (aNBT.hasKey("HeatTime")) { - long tHeatTime = aNBT.getLong("HeatTime"); - if (tWorldTime > (tHeatTime + 10)) { - tHeat = (int) (tHeat - ((tWorldTime - tHeatTime) / 10)); - if (tHeat < 300) tHeat = 300; - } + && getBaseMetaTileEntity().getStoredEU() > 0) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(24, true); + NBTTagCompound aNBT = tStack.getTagCompound(); + if (aNBT != null) { + int tHeat = 300; + long tWorldTime = getBaseMetaTileEntity().getWorld() + .getTotalWorldTime(); + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if (aNBT != null && aNBT.hasKey("Heat")) { + tHeat = aNBT.getInteger("Heat"); + if (aNBT.hasKey("HeatTime")) { + long tHeatTime = aNBT.getLong("HeatTime"); + if (tWorldTime > (tHeatTime + 10)) { + tHeat = (int) (tHeat - ((tWorldTime - tHeatTime) / 10)); + if (tHeat < 300) tHeat = 300; } } - tHeat++; - if (aNBT != null) { - aNBT.setInteger("Heat", tHeat); - aNBT.setLong("HeatTime", tWorldTime); - } - if (tHeat > GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint) { - mInventory[0] = null; - } + } + tHeat++; + if (aNBT != null) { + aNBT.setInteger("Heat", tHeat); + aNBT.setLong("HeatTime", tWorldTime); + } + if (tHeat > GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint) { + mInventory[0] = null; } } + } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java index 70b9ecbc22..a0e5561559 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java @@ -76,7 +76,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicMachine - implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener, IAddUIWidgets { + implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener, IAddUIWidgets { public static final int beeCycleLength = 550; public static final int baseEUtUsage = 37; @@ -95,85 +95,85 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM public GT_MetaTileEntity_IndustrialApiary(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 4, - new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba }, - 6, - 9, - "IndustrialApiary.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW) - .glow() - .build())); + aID, + aName, + aNameRegional, + aTier, + 4, + new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba }, + 6, + 9, + "IndustrialApiary.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW) + .glow() + .build())); } public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 4, aDescription, aTextures, 6, 9, aGUIName, aNEIName); } public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 4, aDescription, aTextures, 6, 9, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_IndustrialApiary( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -195,11 +195,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM private void openGUI(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { IndustrialApiaryUI.open( - aPlayer, - aBaseMetaTileEntity.getWorld(), - aBaseMetaTileEntity.getXCoord(), - aBaseMetaTileEntity.getYCoord(), - aBaseMetaTileEntity.getZCoord()); + aPlayer, + aBaseMetaTileEntity.getWorld(), + aBaseMetaTileEntity.getXCoord(), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getZCoord()); } @Override @@ -256,13 +256,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (isRetrievingPollen && floweringMod > 0f) { final int icycles = (int) cycles - + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); + + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); for (int z = 0; z < icycles; z++) { final IIndividual p = bee.retrievePollen(this); if (p != null) { final ItemStack s = p.getGenome() - .getSpeciesRoot() - .getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); + .getSpeciesRoot() + .getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); if (s != null) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s); pollen.computeIfAbsent(id, k -> { @@ -290,45 +290,37 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM final HashMap dropstacks = new HashMap<>(); for (Map.Entry entry : primary.getProductChances() - .entrySet()) { + .entrySet()) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); drops.merge( - id, - Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f) * (float) entry.getKey().stackSize - * cycles, - Float::sum); + id, + Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f) * (float) entry.getKey().stackSize + * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } for (Map.Entry entry : secondary.getProductChances() - .entrySet()) { + .entrySet()) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); drops.merge( - id, - Bee.getFinalChance(entry.getValue() / 2f, speed, prodMod, 8f) - * (float) entry.getKey().stackSize - * cycles, - Float::sum); + id, + Bee.getFinalChance(entry.getValue() / 2f, speed, prodMod, 8f) * (float) entry.getKey().stackSize + * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } if (primary.isJubilant(genome, this) && secondary.isJubilant(genome, this)) for (Map.Entry entry : primary.getSpecialtyChances() - .entrySet()) { - final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy( - entry.getKey()); - drops.merge( - id, - Bee.getFinalChance( - entry.getValue(), - speed, - prodMod, - 8f) - * (float) entry.getKey().stackSize - * cycles, - Float::sum); - dropstacks.computeIfAbsent( - id, - k -> entry.getKey()); - } + .entrySet()) { + final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); + drops.merge( + id, + Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f) + * (float) entry.getKey().stackSize + * cycles, + Float::sum); + dropstacks.computeIfAbsent(id, k -> entry.getKey()); + } int i = 0; final int imax = mOutputItems.length; @@ -370,11 +362,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM for (Map.Entry entry : drops.entrySet()) { final ItemStack s = dropstacks.get(entry.getKey()) - .copy(); + .copy(); s.stackSize = entry.getValue() - .intValue() - + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue() - .intValue()) ? 1 : 0); + .intValue() + + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue() + .intValue()) ? 1 : 0); if (s.stackSize > 0 && i < imax) while (true) { if (s.stackSize <= s.getMaxStackSize()) { this.mOutputItems[i++] = s; @@ -426,7 +418,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM this.mOutputItems[0] = new ItemStack(PluginApiculture.items.beeQueenGE); this.mOutputItems[0].setTagCompound(nbttagcompound); beeRoot.getBreedingTracker(getWorld(), getOwner()) - .registerQueen(princess); + .registerQueen(princess); setQueen(null); getDrone().stackSize -= 1; @@ -484,12 +476,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (effect instanceof IAlleleBeeAcceleratableEffect) { effectData[0] = effect.validateStorage(effectData[0]); effectData[0] = ((IAlleleBeeAcceleratableEffect) effect).doEffectAccelerated( - genome, - effectData[0], - this, - usedBeeLife / (effect instanceof AlleleEffectThrottled - ? (float) AlleleBeeEffectThrottledField.getInt(effect) - : 1f)); + genome, + effectData[0], + this, + usedBeeLife / (effect instanceof AlleleEffectThrottled + ? (float) AlleleBeeEffectThrottledField.getInt(effect) + : 1f)); } if (!effect.isCombinable()) return; @@ -500,12 +492,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (secondary instanceof IAlleleBeeAcceleratableEffect) { effectData[1] = secondary.validateStorage(effectData[1]); effectData[1] = ((IAlleleBeeAcceleratableEffect) secondary).doEffectAccelerated( - genome, - effectData[0], - this, - usedBeeLife / (secondary instanceof AlleleEffectThrottled - ? (float) AlleleBeeEffectThrottledField.getInt(secondary) - : 1f)); + genome, + effectData[0], + this, + usedBeeLife / (secondary instanceof AlleleEffectThrottled + ? (float) AlleleBeeEffectThrottledField.getInt(secondary) + : 1f)); } } catch (Exception ex) { ex.printStackTrace(); @@ -542,9 +534,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (!aBaseMetaTileEntity.isActive()) { if (aBaseMetaTileEntity.isAllowedToWork() - && (aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 - || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) - && hasEnoughEnergyToCheckRecipe()) { + && (aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 + || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) + && hasEnoughEnergyToCheckRecipe()) { final int check = checkRecipe(); if (check == FOUND_AND_SUCCESSFULLY_USED_RECIPE) { aBaseMetaTileEntity.setActive(true); @@ -577,11 +569,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (usedQueenBee == null) usedQueenBee = beeRoot.getMember(usedQueen); doEffect(); if (!retrievingPollenInThisOperation && floweringMod > 0f - && this.mProgresstime % pollinationDelay == 0) { + && this.mProgresstime % pollinationD