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/gtPlusPlus/xmod/forestry/bees | |
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/gtPlusPlus/xmod/forestry/bees')
8 files changed, 9 insertions, 16 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPPBeeDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPPBeeDefinition.java index 6b9c5ae8f2..0154597d09 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPPBeeDefinition.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPPBeeDefinition.java @@ -515,10 +515,7 @@ public enum GTPPBeeDefinition implements IBeeDefinition { } private static IAlleleBeeSpecies getSpecies(String name) { - return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele( - (new StringBuilder()).append("forestry.species") - .append(name) - .toString()); + return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele("forestry.species" + name); } protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies); diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPDropType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPDropType.java index 0ae34d599c..3a4bdc0a3d 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPDropType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPDropType.java @@ -29,7 +29,7 @@ public enum GTPPDropType { return GTPP_Bees.sDropMappings.get(aID); } - private GTPPDropType(int aID, String aName, boolean aShow, int... aColour) { + GTPPDropType(int aID, String aName, boolean aShow, int... aColour) { this.mID = aID; this.mName = aName; this.mNameUnlocal = aName.toLowerCase() diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPollenType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPollenType.java index 08b8f84dca..2775f26438 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPollenType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPollenType.java @@ -28,7 +28,7 @@ public enum GTPPPollenType { return GTPP_Bees.sPollenMappings.get(aID); } - private GTPPPollenType(int aID, String aName, boolean aShow, int... aColour) { + GTPPPollenType(int aID, String aName, boolean aShow, int... aColour) { this.mID = aID; this.mName = aName; this.mNameUnlocal = aName.toLowerCase() diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPropolisType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPropolisType.java index f97da9f4df..f68810f3f4 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPropolisType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPPPropolisType.java @@ -29,7 +29,7 @@ public enum GTPPPropolisType { return GTPP_Bees.sPropolisMappings.get(aID); } - private GTPPPropolisType(int aID, String aName, boolean aShow, int aColour) { + GTPPPropolisType(int aID, String aName, boolean aShow, int aColour) { this.mID = aID; this.mName = aName; this.mNameUnlocal = aName.toLowerCase() diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FRItemRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FRItemRegistry.java index ab2353cc37..7ded5cc171 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FRItemRegistry.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FRItemRegistry.java @@ -2,7 +2,7 @@ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available * at http://www.gnu.org/licenses/lgpl-3.0.txt - * + * <p> * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie, * MysteriousAges ******************************************************************************/ diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MBItemFrame.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MBItemFrame.java index b196598f43..54b003386e 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MBItemFrame.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MBItemFrame.java @@ -45,7 +45,7 @@ public class MBItemFrame extends Item implements IHiveFrame { @Override public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if ((this.toolTip != "") || !this.toolTip.equals("")) { + if (!this.toolTip.isEmpty()) { list.add(EnumChatFormatting.GRAY + this.toolTip); } super.addInformation(stack, aPlayer, list, bool); @@ -79,10 +79,7 @@ public class MBItemFrame extends Item implements IHiveFrame { @Override public boolean hasEffect(final ItemStack par1ItemStack, final int pass) { - if ((this.rarity_value == EnumRarity.uncommon) || (this.rarity_value == EnumRarity.common)) { - return false; - } - return true; + return this.rarity_value != EnumRarity.uncommon && this.rarity_value != EnumRarity.common; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java index 95813e45bd..d1206d5296 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java @@ -184,8 +184,7 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { case GTPP_Bees.GREGTECH -> "gregtech.species" + name; default -> "forestry.species" + name; }; - IAlleleBeeSpecies ret = (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(s); - return ret; + return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(s); } private void setSpeciesProperties(GTPPAlleleBeeSpecies species2) { diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java index 39af813dec..34d87cb943 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java @@ -73,7 +73,7 @@ public enum GTPP_BranchDefinition { return Arrays.copyOf(defaultTemplate, defaultTemplate.length); } - private final void setBranchProperties(IAllele[] template) { + private void setBranchProperties(IAllele[] template) { this.mBranchProperties.accept(template); } |