aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bartworks
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/bartworks')
-rw-r--r--src/main/java/bartworks/API/BorosilicateGlass.java4
-rw-r--r--src/main/java/bartworks/common/configs/LanderType.java2
-rw-r--r--src/main/java/bartworks/common/loaders/StaticRecipeChangeLoaders.java7
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java6
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java2
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java2
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java10
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java12
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java12
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java6
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java8
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java8
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java5
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java8
-rw-r--r--src/main/java/bartworks/neiHandler/OreNEIHandler.java9
-rw-r--r--src/main/java/bartworks/system/material/BWMetaGeneratedBlocks.java2
-rw-r--r--src/main/java/bartworks/system/material/BWMetaGeneratedItems.java6
-rw-r--r--src/main/java/bartworks/system/material/BWTileEntityMetaGeneratedSmallOre.java2
-rw-r--r--src/main/java/bartworks/system/material/Werkstoff.java15
-rw-r--r--src/main/java/bartworks/system/material/gtenhancement/PlatinumSludgeOverHaul.java1
-rw-r--r--src/main/java/bartworks/system/material/processingLoaders/AdditionalRecipes.java1
-rw-r--r--src/main/java/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java4
-rw-r--r--src/main/java/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java6
-rw-r--r--src/main/java/bartworks/system/oregen/BWOreLayer.java6
-rw-r--r--src/main/java/bartworks/system/oregen/BWWordGenerator.java2
-rw-r--r--src/main/java/bartworks/system/worldgen/MapGenRuins.java4
-rw-r--r--src/main/java/bartworks/util/MurmurHash3.java6
-rw-r--r--src/main/java/bartworks/util/NoiseUtil/SimplexNoise.java26
-rw-r--r--src/main/java/bartworks/util/NonNullWrappedHashMap.java2
-rw-r--r--src/main/java/bartworks/util/Pair.java4
-rw-r--r--src/main/java/bartworks/util/accessprioritylist/AccessPriorityList.java2
31 files changed, 86 insertions, 104 deletions
diff --git a/src/main/java/bartworks/API/BorosilicateGlass.java b/src/main/java/bartworks/API/BorosilicateGlass.java
index b33f43689f..1c15104f63 100644
--- a/src/main/java/bartworks/API/BorosilicateGlass.java
+++ b/src/main/java/bartworks/API/BorosilicateGlass.java
@@ -112,9 +112,9 @@ public class BorosilicateGlass {
/**
* Register a new block as valid borosilicate glass with given tier (even if it doesn't contain boron at all)
- *
+ * <p>
* Does not support matching by more complex stuff like tile entity!
- *
+ * <p>
* Can only be called at INIT stage.
*/
public static void registerGlass(Block block, int meta, byte tier) {
diff --git a/src/main/java/bartworks/common/configs/LanderType.java b/src/main/java/bartworks/common/configs/LanderType.java
index a392ec3e38..a97006c390 100644
--- a/src/main/java/bartworks/common/configs/LanderType.java
+++ b/src/main/java/bartworks/common/configs/LanderType.java
@@ -3,5 +3,5 @@ package bartworks.common.configs;
public enum LanderType {
MoonLander,
LandingBalloons,
- AsteroidsLander;
+ AsteroidsLander
}
diff --git a/src/main/java/bartworks/common/loaders/StaticRecipeChangeLoaders.java b/src/main/java/bartworks/common/loaders/StaticRecipeChangeLoaders.java
index f266c2fdc2..ae1c037589 100644
--- a/src/main/java/bartworks/common/loaders/StaticRecipeChangeLoaders.java
+++ b/src/main/java/bartworks/common/loaders/StaticRecipeChangeLoaders.java
@@ -17,7 +17,7 @@ import static gregtech.api.enums.Mods.TinkerConstruct;
import java.lang.reflect.Field;
import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -59,8 +59,9 @@ public class StaticRecipeChangeLoaders {
private static TObjectDoubleHashMap<Materials> gtEbfGasRecipeTimeMultipliers = null;
private static TObjectDoubleHashMap<Materials> gtEbfGasRecipeConsumptionMultipliers = null;
- public static final List<ItemStack> whitelistForEBFNoGasRecipeDontCheckItemData = Arrays
- .asList(GTModHandler.getModItem(TinkerConstruct.ID, "materials", 1L, 12) // Raw Aluminum -> Aluminium Ingot
+ public static final List<ItemStack> whitelistForEBFNoGasRecipeDontCheckItemData = Collections
+ .singletonList(GTModHandler.getModItem(TinkerConstruct.ID, "materials", 1L, 12) // Raw Aluminum -> Aluminium
+ // Ingot
// (coremod)
);
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java
index 88c5888878..d3b2aa804b 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java
@@ -313,7 +313,7 @@ public class MTEBioVat extends MTEEnhancedMultiBlockBase<MTEBioVat> implements I
return false;
}
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null || !(aMetaTileEntity instanceof GT_MetaTileEntity_RadioHatch)) {
+ if (!(aMetaTileEntity instanceof GT_MetaTileEntity_RadioHatch)) {
return false;
} else {
((GT_MetaTileEntity_RadioHatch) aMetaTileEntity).updateTexture(CasingIndex);
@@ -332,8 +332,8 @@ public class MTEBioVat extends MTEEnhancedMultiBlockBase<MTEBioVat> implements I
return this.mCasing >= 19 && this.mRadHatches.size() <= 1
&& this.mOutputHatches.size() == 1
&& this.mMaintenanceHatches.size() == 1
- && this.mInputHatches.size() > 0
- && this.mEnergyHatches.size() > 0;
+ && !this.mInputHatches.isEmpty()
+ && !this.mEnergyHatches.isEmpty();
}
@Override
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java b/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java
index 46f5e66649..63558feb8b 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java
@@ -416,7 +416,7 @@ public class MTECircuitAssemblyLine extends MTEEnhancedMultiBlockBase<MTECircuit
return false;
}
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null || !(aMetaTileEntity instanceof MTEHatchInput)) {
+ if (!(aMetaTileEntity instanceof MTEHatchInput)) {
return false;
} else {
((MTEHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java b/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java
index 76cf946f85..dcb1a7586e 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java
@@ -466,7 +466,7 @@ public class MTEElectricImplosionCompressor extends MTEExtendedPowerMultiBlockBa
mMaxHatchTier = Math.max(mMaxHatchTier, hatch.mTier);
}
- isOK = isOK && this.mMaintenanceHatches.size() == 1 && energyHatches.size() >= 1;
+ isOK = isOK && this.mMaintenanceHatches.size() == 1 && !energyHatches.isEmpty();
if (isOK) {
this.activatePiston();
return true;
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java b/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java
index 3250c7ce0d..22143ad543 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java
@@ -185,11 +185,11 @@ public class MTEHighTempGasCooledReactor extends MTEEnhancedMultiBlockBase<MTEHi
this.mCasing = 0;
return this.checkPiece("main", 5, 11, 0) && this.mCasing >= 500
&& this.mMaintenanceHatches.size() == 1
- && this.mInputHatches.size() > 0
- && this.mOutputHatches.size() > 0
- && this.mInputBusses.size() > 0
- && this.mOutputBusses.size() > 0
- && this.mEnergyHatches.size() > 0;
+ && !this.mInputHatches.isEmpty()
+ && !this.mOutputHatches.isEmpty()
+ && !this.mInputBusses.isEmpty()
+ && !this.mOutputBusses.isEmpty()
+ && !this.mEnergyHatches.isEmpty();
}
@Override
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java b/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java
index 2533fd5213..d6306badee 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java
@@ -93,13 +93,13 @@ public class MTEManualTrafo extends MTEEnhancedMultiBlockBase<MTEManualTrafo> {
2))
.addElement('t', ofBlock(BW_BLOCKS[2], 1))
.addElement('f', ofBlock(BW_BLOCKS[2], 0))
- .addElement('T', new IStructureElementNoPlacement<MTEManualTrafo>() {
+ .addElement('T', new IStructureElementNoPlacement<>() {
@Override
public boolean check(MTEManualTrafo te, World world, int x, int y, int z) {
if (world.isAirBlock(x, y, z)) return true;
TileEntity tileEntity = world.getTileEntity(x, y, z);
- if (tileEntity == null || !(tileEntity instanceof IGregTechTileEntity)) return true;
+ if (!(tileEntity instanceof IGregTechTileEntity)) return true;
IMetaTileEntity mte = ((IGregTechTileEntity) tileEntity).getMetaTileEntity();
if (mte instanceof MTEHatchDynamo || mte instanceof MTEHatchEnergy) {
int intier = te.mEnergyHatches.get(0).mTier;
@@ -208,7 +208,7 @@ public class MTEManualTrafo extends MTEEnhancedMultiBlockBase<MTEManualTrafo> {
@Override
public long getInputTier() {
- if (this.mEnergyHatches.size() > 0) return GTUtility.getTier(
+ if (!this.mEnergyHatches.isEmpty()) return GTUtility.getTier(
this.mEnergyHatches.get(0)
.getBaseMetaTileEntity()
.getInputVoltage());
@@ -217,7 +217,7 @@ public class MTEManualTrafo extends MTEEnhancedMultiBlockBase<MTEManualTrafo> {
@Override
public long getOutputTier() {
- if (this.mDynamoHatches.size() > 0) return GTUtility.getTier(
+ if (!this.mDynamoHatches.isEmpty()) return GTUtility.getTier(
this.mDynamoHatches.get(0)
.getBaseMetaTileEntity()
.getOutputVoltage());
@@ -253,7 +253,7 @@ public class MTEManualTrafo extends MTEEnhancedMultiBlockBase<MTEManualTrafo> {
this.upstep = this.mode % 2 == 0;
boolean tapmode = this.mode > 1;
- if (!this.checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0) || this.mEnergyHatches.size() == 0) return false;
+ if (!this.checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0) || this.mEnergyHatches.isEmpty()) return false;
byte intier = this.mEnergyHatches.get(0).mTier;
for (MTEHatchEnergy in : this.mEnergyHatches) if (in.mTier != intier) return false;
@@ -268,7 +268,7 @@ public class MTEManualTrafo extends MTEEnhancedMultiBlockBase<MTEManualTrafo> {
if (!this.checkPiece(STRUCTURE_PIECE_TOP, 1, mHeight, 0)) return false;
this.mTiers = mHeight - 1;
- if (this.mDynamoHatches.size() == 0 || this.mMaintenanceHatches.size() != 1 || this.mTiers == 0) return false;
+ if (this.mDynamoHatches.isEmpty() || this.mMaintenanceHatches.size() != 1 || this.mTiers == 0) return false;
byte outtier = this.mDynamoHatches.get(0).mTier;
for (MTEHatchDynamo out : this.mDynamoHatches) {
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java b/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java
index ee9b8a5baf..04a0b86feb 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java
@@ -171,11 +171,11 @@ public class MTEThoriumHighTempReactor extends MTEEnhancedMultiBlockBase<MTEThor
this.mCasing = 0;
return this.checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0) && this.mCasing >= 500
&& this.mMaintenanceHatches.size() == 1
- && this.mInputHatches.size() > 0
- && this.mOutputHatches.size() > 0
- && this.mInputBusses.size() > 0
- && this.mOutputBusses.size() > 0
- && this.mEnergyHatches.size() > 0;
+ && !this.mInputHatches.isEmpty()
+ && !this.mOutputHatches.isEmpty()
+ && !this.mInputBusses.isEmpty()
+ && !this.mOutputBusses.isEmpty()
+ && !this.mEnergyHatches.isEmpty();
}
@Override
@@ -207,8 +207,6 @@ public class MTEThoriumHighTempReactor extends MTEEnhancedMultiBlockBase<MTEThor
.min(MTEThoriumHighTempReactor.HELIUM_NEEDED - this.HeliumSupply, fluidStack.amount);
fluidStack.amount -= toget;
this.HeliumSupply += toget;
- if (MTEThoriumHighTempReactor.HELIUM_NEEDED == this.HeliumSupply && fluidStack.amount == 0)
- fluidStack = null;
}
}
}
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java b/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java
index 7069e7533d..23b865da2b 100644
--- a/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java
@@ -145,7 +145,7 @@ public class MTEWindmill extends MTEEnhancedMultiBlockBase<MTEWindmill>
}
})))
.addElement('b', ofBlock(Blocks.brick_block, 0))
- .addElement('s', new IStructureElement<MTEWindmill>() {
+ .addElement('s', new IStructureElement<>() {
@Override
public boolean check(MTEWindmill t, World world, int x, int y, int z) {
@@ -325,7 +325,7 @@ public class MTEWindmill extends MTEEnhancedMultiBlockBase<MTEWindmill>
ItemStack tmp = this.mOutputItems[0].copy();
tmp.stackSize = amount;
splitStacks.add(tmp);
- this.mOutputItems = splitStacks.toArray(new ItemStack[splitStacks.size()]);
+ this.mOutputItems = splitStacks.toArray(new ItemStack[0]);
}
this.mMaxProgresstime = tRecipe.mDuration * 2 * 100 * this.mMulti / this.getSpeed(this.rotorBlock);
this.mMulti = 16;
@@ -372,11 +372,9 @@ public class MTEWindmill extends MTEEnhancedMultiBlockBase<MTEWindmill>
}
if (GTUtility.areStacksEqual(tHatch.getStackInSlot(i), aStack)) {
- aStack = null;
return true;
}
tHatch.setInventorySlotContents(i, null);
- aStack = null;
return false;
}
}
diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java
index e43da001f0..337154953a 100644
--- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java
+++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java
@@ -60,6 +60,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.logic.ProcessingLogic;
import gregtech.api.metatileentity.implementations.MTEHatch;
+import gregtech.api.metatileentity.implementations.MTEHatchEnergy;
import gregtech.api.metatileentity.implementations.MTEHatchMuffler;
import gregtech.api.metatileentity.implementations.MTEHatchOutput;
import gregtech.api.recipe.RecipeMap;
@@ -385,8 +386,7 @@ public class MTEMegaBlastFurnace extends MegaMultiBlockBase<MTEMegaBlastFurnace>
|| this.mMaintenanceHatches.size() != 1) return false;
if (this.glassTier < 8) {
- for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) {
- MTEHatch hatch = this.mExoticEnergyHatches.get(i);
+ for (MTEHatch hatch : this.mExoticEnergyHatches) {
if (hatch.getConnectionType() == MTEHatch.ConnectionType.LASER) {
return false;
}
@@ -394,8 +394,8 @@ public class MTEMegaBlastFurnace extends MegaMultiBlockBase<MTEMegaBlastFurnace>
return false;
}
}
- for (int i = 0; i < this.mEnergyHatches.size(); ++i) {
- if (this.glassTier < this.mEnergyHatches.get(i).mTier) {
+ for (MTEHatchEnergy mEnergyHatch : this.mEnergyHatches) {
+ if (this.glassTier < mEnergyHatch.mTier) {
return false;
}
}
diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java
index 3c15af0fae..f1620abebc 100644
--- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java
+++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java
@@ -47,6 +47,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.logic.ProcessingLogic;
import gregtech.api.metatileentity.implementations.MTEHatch;
+import gregtech.api.metatileentity.implementations.MTEHatchEnergy;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
@@ -202,8 +203,7 @@ public class MTEMegaChemicalReactor extends MegaMultiBlockBase<MTEMegaChemicalRe
if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 0) || this.mMaintenanceHatches.size() != 1) return false;
if (this.glassTier < 8) {
- for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) {
- MTEHatch hatch = this.mExoticEnergyHatches.get(i);
+ for (MTEHatch hatch : this.mExoticEnergyHatches) {
if (hatch.getConnectionType() == MTEHatch.ConnectionType.LASER) {
return false;
}
@@ -211,8 +211,8 @@ public class MTEMegaChemicalReactor extends MegaMultiBlockBase<MTEMegaChemicalRe
return false;
}
}
- for (int i = 0; i < this.mEnergyHatches.size(); ++i) {
- if (this.glassTier < this.mEnergyHatches.get(i).mTier) {
+ for (MTEHatchEnergy mEnergyHatch : this.mEnergyHatches) {
+ if (this.glassTier < mEnergyHatch.mTier) {
return false;
}
}
diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java
index ac6a0ae6b4..112205efe7 100644
--- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java
+++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java
@@ -206,10 +206,9 @@ public class MTEMegaDistillTower extends MegaMultiBlockBase<MTEMegaDistillTower>
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof MTEHatchOutput))
- return false;
+ if (aTileEntity == null || aTileEntity.isDead()
+ || !(aTileEntity.getMetaTileEntity() instanceof MTEHatchOutput tHatch)) return false;
while (this.mOutputHatchesByLayer.size() < this.mHeight) this.mOutputHatchesByLayer.add(new ArrayList<>());
- MTEHatchOutput tHatch = (MTEHatchOutput) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
return this.mOutputHatchesByLayer.get(this.mHeight - 1)
.add(tHatch);
diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java
index 4424bc62cc..9686425bed 100644
--- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java
+++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java
@@ -58,6 +58,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.logic.ProcessingLogic;
import gregtech.api.metatileentity.implementations.MTEHatch;
+import gregtech.api.metatileentity.implementations.MTEHatchEnergy;
import gregtech.api.metatileentity.implementations.MTEHatchInput;
import gregtech.api.metatileentity.implementations.MTEHatchMultiInput;
import gregtech.api.metatileentity.implementations.MTEHatchOutput;
@@ -255,8 +256,7 @@ public class MTEMegaOilCracker extends MegaMultiBlockBase<MTEMegaOilCracker> imp
if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 6, 6, 0) || this.mMaintenanceHatches.size() != 1) return false;
if (this.glassTier < 8) {
- for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) {
- MTEHatch hatch = this.mExoticEnergyHatches.get(i);
+ for (MTEHatch hatch : this.mExoticEnergyHatches) {
if (hatch.getConnectionType() == MTEHatch.ConnectionType.LASER) {
return false;
}
@@ -264,8 +264,8 @@ public class MTEMegaOilCracker extends MegaMultiBlockBase<MTEMegaOilCracker> imp
return false;
}
}
- for (int i = 0; i < this.mEnergyHatches.size(); ++i) {
- if (this.glassTier < this.mEnergyHatches.get(i).mTier) {
+ for (MTEHatchEnergy mEnergyHatch : this.mEnergyHatches) {
+ if (this.glassTier < mEnergyHatch.mTier) {
return false;
}
}
diff --git a/src/main/java/bartworks/neiHandler/OreNEIHandler.java b/src/main/java/bartworks/neiHandler/OreNEIHandler.java
index 7b5e5eee40..3732c56aff 100644
--- a/src/main/java/bartworks/neiHandler/OreNEIHandler.java
+++ b/src/main/java/bartworks/neiHandler/OreNEIHandler.java
@@ -94,13 +94,10 @@ public class OreNEIHandler extends TemplateRecipeHandler {
@Override
public void drawExtras(int recipe) {
- if (recipe < this.arecipes.size() && this.arecipes.get(recipe) instanceof CachedOreRecipe) {
- CachedOreRecipe cachedOreRecipe = (CachedOreRecipe) this.arecipes.get(recipe);
+ if (recipe < this.arecipes.size() && this.arecipes.get(recipe) instanceof CachedOreRecipe cachedOreRecipe) {
- if (cachedOreRecipe == null || cachedOreRecipe.getOtherStacks() == null
- || cachedOreRecipe.getOtherStacks()
- .size() == 0)
- return;
+ if (cachedOreRecipe.getOtherStacks() == null || cachedOreRecipe.getOtherStacks()
+ .isEmpty()) return;
if (!cachedOreRecipe.small) {
if (cachedOreRecipe.getOtherStacks()
diff --git a/src/main/java/bartworks/system/material/BWMetaGeneratedBlocks.java b/src/main/java/bartworks/system/material/BWMetaGeneratedBlocks.java
index db838d059a..533f16089f 100644
--- a/src/main/java/bartworks/system/material/BWMetaGeneratedBlocks.java
+++ b/src/main/java/bartworks/system/material/BWMetaGeneratedBlocks.java
@@ -86,7 +86,7 @@ public abstract class BWMetaGeneratedBlocks extends BWTileEntityContainer {
@Override
public int getRenderType() {
if (BWBlockOreRenderer.INSTANCE == null) return super.getRenderType();
- return BWBlockOreRenderer.INSTANCE.renderID;
+ return BWBlockOreRenderer.renderID;
}
@Override
diff --git a/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java b/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java
index bdeab62cfd..cd8e360da6 100644
--- a/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java
+++ b/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java
@@ -100,17 +100,15 @@ public class BWMetaGeneratedItems extends MetaGeneratedItem implements IRadMater
OrePrefixes.dust,
aMaterial,
aItemEntity.getEntityItem().stackSize));
- aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
- return true;
} else {
aItemEntity.setEntityItemStack(
WerkstoffLoader.getCorrespondingItemStack(
OrePrefixes.crushedPurified,
aMaterial,
aItemEntity.getEntityItem().stackSize));
- aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
- return true;
}
+ aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
+ return true;
}
}
}
diff --git a/src/main/java/bartworks/system/material/BWTileEntityMetaGeneratedSmallOre.java b/src/main/java/bartworks/system/material/BWTileEntityMetaGeneratedSmallOre.java
index 8764c7891e..737b486cf9 100644
--- a/src/main/java/bartworks/system/material/BWTileEntityMetaGeneratedSmallOre.java
+++ b/src/main/java/bartworks/system/material/BWTileEntityMetaGeneratedSmallOre.java
@@ -90,7 +90,7 @@ public class BWTileEntityMetaGeneratedSmallOre extends BWTileEntityMetaGenerated
tSelector.add(tStack);
}
}
- if (tSelector.size() > 0) {
+ if (!tSelector.isEmpty()) {
int i = 0;
for (int j = Math.max(1, aFortune > 0 ? tRandom.nextInt(1 + aFortune) : 0); i < j; ++i) {
diff --git a/src/main/java/bartworks/system/material/Werkstoff.java b/src/main/java/bartworks/system/material/Werkstoff.java
index d9b6b4503c..5ae7136934 100644
--- a/src/main/java/bartworks/system/material/Werkstoff.java
+++ b/src/main/java/bartworks/system/material/Werkstoff.java
@@ -278,7 +278,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
this.mID = (short) mID;
this.defaultName = defaultName;
// Ensure that localization key are written to the lang file
- GregTechAPI.sAfterGTPreload.add(() -> { this.getLocalizedName(); });
+ GregTechAPI.sAfterGTPreload.add(() -> this.getLocalizedName());
this.stats = stats;
this.type = type;
this.generationFeatures = generationFeatures;
@@ -316,7 +316,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
// this.toolTip = "The formula is to long...";
// Ensure that localization key are written to the lang file
- GregTechAPI.sAfterGTPreload.add(() -> { this.getLocalizedToolTip(); });
+ GregTechAPI.sAfterGTPreload.add(() -> this.getLocalizedToolTip());
if (this.stats.protons == 0) {
long tmpprotons = 0;
@@ -427,13 +427,12 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
public List<TCAspects.TC_AspectStack> getGTWrappedTCAspects() {
final List<TCAspects.TC_AspectStack> ret = new ArrayList<>();
Arrays.stream(this.getTCAspects())
- .forEach(objectIntegerPair -> {
- new TCAspects.TC_AspectStack(
+ .forEach(
+ objectIntegerPair -> new TCAspects.TC_AspectStack(
TCAspects.valueOf(
((Aspect) objectIntegerPair.getKey()).getName()
.toUpperCase(Locale.US)),
- objectIntegerPair.getValue()).addToAspectList(ret);
- });
+ objectIntegerPair.getValue()).addToAspectList(ret));
return ret;
}
@@ -476,7 +475,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public ISubTagContainer getOreByProductRaw(int aNumber) {
- if (this.mOreByProducts.size() == 0) return null;
+ if (this.mOreByProducts.isEmpty()) return null;
if (aNumber < 0) aNumber = this.mOreByProducts.size() + aNumber;
while (aNumber >= this.mOreByProducts.size()) aNumber--;
ISubTagContainer o = this.mOreByProducts.get(aNumber);
@@ -485,7 +484,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public ItemStack getOreByProduct(int aNumber, OrePrefixes prefixes) {
- if (this.mOreByProducts.size() == 0) return null;
+ if (this.mOreByProducts.isEmpty()) return null;
if (aNumber < 0) aNumber = this.mOreByProducts.size() + aNumber;
while (aNumber >= this.mOreByProducts.size()) aNumber--;
Object o = this.mOreByProducts.get(aNumber);
diff --git a/src/main/java/bartworks/system/material/gtenhancement/PlatinumSludgeOverHaul.java b/src/main/java/bartworks/system/material/gtenhancement/PlatinumSludgeOverHaul.java
index e3504a4e9c..1d0c6fa140 100644
--- a/src/main/java/bartworks/system/material/gtenhancement/PlatinumSludgeOverHaul.java
+++ b/src/main/java/bartworks/system/material/gtenhancement/PlatinumSludgeOverHaul.java
@@ -1030,7 +1030,6 @@ public class PlatinumSludgeOverHaul {
PlatinumSludgeOverHaul.runHelperrecipes();
}
- @SuppressWarnings("deprecation")
private static void replaceHVCircuitMaterials() {
GTValues.RA.stdBuilder()
.itemInputs(Materials.Redstone.getDust(1), Materials.Electrum.getDust(1), GTUtility.getIntegratedCircuit(1))
diff --git a/src/main/java/bartworks/system/material/processingLoaders/AdditionalRecipes.java b/src/main/java/bartworks/system/material/processingLoaders/AdditionalRecipes.java
index ab331d2ba6..d103312e55 100644
--- a/src/main/java/bartworks/system/material/processingLoaders/AdditionalRecipes.java
+++ b/src/main/java/bartworks/system/material/processingLoaders/AdditionalRecipes.java
@@ -274,7 +274,6 @@ public class AdditionalRecipes {
.addTo(BartWorksRecipeMaps.acidGenFuels);
}
- @SuppressWarnings("deprecation")
public static void run() {
runBWRecipes();
diff --git a/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java b/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
index 32aa00bd41..5b24b1e6ee 100644
--- a/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
+++ b/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
@@ -166,7 +166,7 @@ public class CellLoader implements IWerkstoffRunnable {
null,
null,
new FluidStack[] { null },
- new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ new FluidStack[] { !flOutputs.isEmpty() ? flOutputs.get(0) : null },
(int) Math.max(
1L,
Math.abs(
@@ -192,7 +192,7 @@ public class CellLoader implements IWerkstoffRunnable {
null,
null,
new FluidStack[] { null },
- new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ new FluidStack[] { !flOutputs.isEmpty() ? flOutputs.get(0) : null },
(int) Math.max(
1L,
Math.abs(
diff --git a/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java b/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
index bcc5d422b0..04db75e0d3 100644
--- a/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
+++ b/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
@@ -190,7 +190,7 @@ public class DustLoader implements IWerkstoffRunnable {
null,
null,
new FluidStack[] { null },
- new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ new FluidStack[] { !flOutputs.isEmpty() ? flOutputs.get(0) : null },
(int) Math.max(
1L,
Math.abs(
@@ -215,7 +215,7 @@ public class DustLoader implements IWerkstoffRunnable {
null,
null,
new FluidStack[] { null },
- new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ new FluidStack[] { !flOutputs.isEmpty() ? flOutputs.get(0) : null },
(int) Math.max(
1L,
Math.abs(
@@ -266,7 +266,7 @@ public class DustLoader implements IWerkstoffRunnable {
new ItemStack[] { input },
null,
null,
- new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ new FluidStack[] { !flOutputs.isEmpty() ? flOutputs.get(0) : null },
null,
(int) Math.max(
1L,
diff --git a/src/main/java/bartworks/system/oregen/BWOreLayer.java b/src/main/java/bartworks/system/oregen/BWOreLayer.java
index 5f9688e68c..80cca68d3a 100644
--- a/src/main/java/bartworks/system/oregen/BWOreLayer.java
+++ b/src/main/java/bartworks/system/oregen/BWOreLayer.java
@@ -173,12 +173,10 @@ public abstract class BWOreLayer extends GTWorldgen {
}
private boolean shouldPlace(Random aRandom, int cX, int eX, int tX, int cZ, int eZ, int tZ) {
- if (aRandom.nextInt(
+ return aRandom.nextInt(
Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0
|| aRandom.nextInt(
- Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)
- return true;
- return false;
+ Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0;
}
public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre) {
diff --git a/src/main/java/bartworks/system/oregen/BWWordGenerator.java b/src/main/java/bartworks/system/oregen/BWWordGenerator.java
index 10a3c862af..909bb0cd94 100644
--- a/src/main/java/bartworks/system/oregen/BWWordGenerator.java
+++ b/src/main/java/bartworks/system/oregen/BWWordGenerator.java
@@ -97,7 +97,7 @@ public class BWWordGenerator implements IWorldGenerator {
if (!BWWordGenerator.WorldGenContainer.mGenerated.contains(centerChunk)
&& this.surroundingChunksLoaded(xCenter, zCenter)) {
BWWordGenerator.WorldGenContainer.mGenerated.add(centerChunk);
- if (BWOreLayer.sWeight > 0 && BWOreLayer.sList.size() > 0) {
+ if (BWOreLayer.sWeight > 0 && !BWOreLayer.sList.isEmpty()) {
boolean temp = true;
int tRandomWeight;
for (int i = 0; i < 256 && temp; i++) {
diff --git a/src/main/java/bartworks/system/worldgen/MapGenRuins.java b/src/main/java/bartworks/system/worldgen/MapGenRuins.java
index a192575743..7c3e4046ca 100644
--- a/src/main/java/bartworks/system/worldgen/MapGenRuins.java
+++ b/src/main/java/bartworks/system/worldgen/MapGenRuins.java
@@ -250,7 +250,7 @@ public abstract class MapGenRuins extends WorldGenerator {
this.ToBuildWith[3][0]);
} else if (dx == 0 && dz == -5 && (dy == 1 || dy == 2)) {
if (dy == 1) {
- this.setBlock(worldObj, x + dx, y + 1, z + -5, Blocks.iron_door, 1);
+ this.setBlock(worldObj, x + dx, y + 1, z - 5, Blocks.iron_door, 1);
}
if (dy == 2) {
this.setBlock(worldObj, x + dx, y + 2, z + dz, Blocks.iron_door, 8);
@@ -303,7 +303,7 @@ public abstract class MapGenRuins extends WorldGenerator {
this.setBlock(worldObj, x + 3, y + 1, z + dz, Blocks.crafting_table, 0);
}
if (dx == -3 && (dz == -3 || dz == -2)) {
- this.setBlock(worldObj, x + -3, y + dy, z + dz, Blocks.chest, 5);
+ this.setBlock(worldObj, x - 3, y + dy, z + dz, Blocks.chest, 5);
IInventory chest = (IInventory) worldObj.getTileEntity(x + dx, y + dy, z + dz);
if (chest != null) {
WeightedRandomChestContent.generateChestContents(
diff --git a/src/main/java/bartworks/util/MurmurHash3.java b/src/main/java/bartworks/util/MurmurHash3.java
index 825c83cca2..e32356bae1 100644
--- a/src/main/java/bartworks/util/MurmurHash3.java
+++ b/src/main/java/bartworks/util/MurmurHash3.java
@@ -128,11 +128,11 @@ public final class MurmurHash3 {
/***
* // optimized ascii implementation (currently slower!!! code size?) if (shift == 24) { k1 = k1 | (code
* << 24);
- *
+ * <p>
* k1 *= c1; k1 = (k1 << 15) | (k1 >>> 17); // ROTL32(k1,15); k1 *= c2;
- *
+ * <p>
* h1 ^= k1; h1 = (h1 << 13) | (h1 >>> 19); // ROTL32(h1,13); h1 = h1*5+0xe6546b64;
- *
+ * <p>
* shift = 0; nBytes += 4; k1 = 0; } else { k1 |= code << shift; shift += 8; } continue;
***/
} else if (code < 0x800) {
diff --git a/src/main/java/bartworks/util/NoiseUtil/SimplexNoise.java b/src/main/java/bartworks/util/NoiseUtil/SimplexNoise.java
index ea2e571910..c6418d2213 100644
--- a/src/main/java/bartworks/util/NoiseUtil/SimplexNoise.java
+++ b/src/main/java/bartworks/util/NoiseUtil/SimplexNoise.java
@@ -11,11 +11,11 @@ import bartworks.util.MathUtils;
public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
- private static Grad[] grad3 = { new Grad(1, 1, 0), new Grad(-1, 1, 0), new Grad(1, -1, 0), new Grad(-1, -1, 0),
- new Grad(1, 0, 1), new Grad(-1, 0, 1), new Grad(1, 0, -1), new Grad(-1, 0, -1), new Grad(0, 1, 1),
- new Grad(0, -1, 1), new Grad(0, 1, -1), new Grad(0, -1, -1) };
+ private static final Grad[] grad3 = { new Grad(1, 1, 0), new Grad(-1, 1, 0), new Grad(1, -1, 0),
+ new Grad(-1, -1, 0), new Grad(1, 0, 1), new Grad(-1, 0, 1), new Grad(1, 0, -1), new Grad(-1, 0, -1),
+ new Grad(0, 1, 1), new Grad(0, -1, 1), new Grad(0, 1, -1), new Grad(0, -1, -1) };
- private static Grad[] grad4 = { new Grad(0, 1, 1, 1), new Grad(0, 1, 1, -1), new Grad(0, 1, -1, 1),
+ private static final Grad[] grad4 = { new Grad(0, 1, 1, 1), new Grad(0, 1, 1, -1), new Grad(0, 1, -1, 1),
new Grad(0, 1, -1, -1), new Grad(0, -1, 1, 1), new Grad(0, -1, 1, -1), new Grad(0, -1, -1, 1),
new Grad(0, -1, -1, -1), new Grad(1, 0, 1, 1), new Grad(1, 0, 1, -1), new Grad(1, 0, -1, 1),
new Grad(1, 0, -1, -1), new Grad(-1, 0, 1, 1), new Grad(-1, 0, 1, -1), new Grad(-1, 0, -1, 1),
@@ -25,20 +25,20 @@ public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
new Grad(1, -1, -1, 0), new Grad(-1, 1, 1, 0), new Grad(-1, 1, -1, 0), new Grad(-1, -1, 1, 0),
new Grad(-1, -1, -1, 0) };
- private static short[] p = { 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103,
- 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117,
- 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48,
- 27, 166, 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102,
- 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188,
- 159, 86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82,
- 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154,
+ private static final short[] p = { 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36,
+ 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203,
+ 117, 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139,
+ 48, 27, 166, 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244,
+ 102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116,
+ 188, 159, 86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255,
+ 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154,
163, 70, 221, 153, 101, 155, 167, 43, 172, 9, 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185,
112, 104, 218, 246, 97, 228, 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249,
14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138,
236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180 };
// To remove the need for index wrapping, double the permutation table length
- private static short[] perm = new short[512];
- private static short[] permMod12 = new short[512];
+ private static final short[] perm = new short[512];
+ private static final short[] permMod12 = new short[512];
static {
for (int i = 0; i < 512; i++) {
diff --git a/src/main/java/bartworks/util/NonNullWrappedHashMap.java b/src/main/java/bartworks/util/NonNullWrappedHashMap.java
index a11cb6a6af..650c4e5c18 100644
--- a/src/main/java/bartworks/util/NonNullWrappedHashMap.java
+++ b/src/main/java/bartworks/util/NonNullWrappedHashMap.java
@@ -21,7 +21,7 @@ import java.util.Optional;
public class NonNullWrappedHashMap<K, V> extends HashMap<K, V> {
private static final long serialVersionUID = 46345163103910175L;
- private V defaultValue;
+ private final V defaultValue;
public NonNullWrappedHashMap(int initialCapacity, float loadFactor, V defaultValue) {
super(initialCapacity, loadFactor);
diff --git a/src/main/java/bartworks/util/Pair.java b/src/main/java/bartworks/util/Pair.java
index 1361460e31..32c55da91c 100644
--- a/src/main/java/bartworks/util/Pair.java
+++ b/src/main/java/bartworks/util/Pair.java
@@ -34,9 +34,7 @@ public class Pair<A, B> implements Map.Entry<A, B> {
@Override
public boolean equals(Object o) {
if (this == o) return true;
- if (!(o instanceof Pair)) return false;
-
- Pair<?, ?> pair1 = (Pair<?, ?>) o;
+ if (!(o instanceof Pair<?, ?>pair1)) return false;
// Probably incorrect - comparing Object[] arrays with Arrays.equals
return Arrays.equals(this.pair, pair1.pair);
diff --git a/src/main/java/bartworks/util/accessprioritylist/AccessPriorityList.java b/src/main/java/bartworks/util/accessprioritylist/AccessPriorityList.java
index 7a41b712b5..fa5df08d56 100644
--- a/src/main/java/bartworks/util/accessprioritylist/AccessPriorityList.java
+++ b/src/main/java/bartworks/util/accessprioritylist/AccessPriorityList.java
@@ -72,7 +72,6 @@ public class AccessPriorityList<E> implements List<E>, Deque<E>, Set<E> {
this.head = node.getNext();
this.head.setBefore(null);
node.destroy();
- node = null;
this.size--;
return first;
}
@@ -84,7 +83,6 @@ public class AccessPriorityList<E> implements List<E>, Deque<E>, Set<E> {
this.tail = node.getBefore();
this.tail.setNext(null);
node.destroy();
- node = null;
this.size--;
return last;
}