From d5842e8f65e7db2ccfe21efa56254d34dbf30a0a Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Mon, 16 Oct 2023 02:44:25 +0100 Subject: [PATCH 1/8] Remove playerAPI --- dependencies.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index f1c58ff361..7e6c2caea7 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -10,7 +10,6 @@ dependencies { compileOnly('com.github.GTNewHorizons:EnderCore:0.2.18:dev') {transitive=false} compileOnly('com.github.GTNewHorizons:SC2:2.0.2:dev') {transitive=false} compileOnly('com.github.GTNewHorizons:Binnie:2.2.0:dev') {transitive = false} - compileOnly('curse.maven:PlayerAPI-228969:2248928') {transitive=false} compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false} compileOnly('com.github.GTNewHorizons:Chisel:2.11.4-GTNH:dev') {transitive=false} From 119f1143ee7a49cf58f67df8dbd8ec8efd83dafb Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:28:27 +0100 Subject: [PATCH 2/8] Remove playerAPI --- src/main/java/gtPlusPlus/GTplusplus.java | 1 - .../gtPlusPlus/core/common/BasePlayer.java | 211 ------------------ .../core/common/compat/COMPAT_Baubles.java | 5 +- .../core/common/compat/COMPAT_PlayerAPI.java | 38 ---- .../handler/events/CustomMovementHandler.java | 143 ------------ .../core/handler/events/SneakManager.java | 129 ----------- .../item/general/ItemSlowBuildingRing.java | 69 ++---- .../gtPlusPlus/core/proxy/ClientProxy.java | 58 ++--- 8 files changed, 32 insertions(+), 622 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/core/common/BasePlayer.java delete mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java delete mode 100644 src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java delete mode 100644 src/main/java/gtPlusPlus/core/handler/events/SneakManager.java diff --git a/src/main/java/gtPlusPlus/GTplusplus.java b/src/main/java/gtPlusPlus/GTplusplus.java index 9d4e041bbb..5c9fafbb35 100644 --- a/src/main/java/gtPlusPlus/GTplusplus.java +++ b/src/main/java/gtPlusPlus/GTplusplus.java @@ -68,7 +68,6 @@ name = CORE.name, version = CORE.VERSION, dependencies = "required-after:Forge;" + " after:TConstruct;" - + " after:PlayerAPI;" + " after:dreamcraft;" + " after:IC2;" + " required-after:gregtech;" diff --git a/src/main/java/gtPlusPlus/core/common/BasePlayer.java b/src/main/java/gtPlusPlus/core/common/BasePlayer.java deleted file mode 100644 index d119ca2015..0000000000 --- a/src/main/java/gtPlusPlus/core/common/BasePlayer.java +++ /dev/null @@ -1,211 +0,0 @@ -package gtPlusPlus.core.common; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.util.MovementInputFromOptions; - -import api.player.client.ClientPlayerAPI; -import api.player.client.ClientPlayerBase; -import gtPlusPlus.core.handler.events.CustomMovementHandler; -import gtPlusPlus.core.handler.events.SneakManager; - -public class BasePlayer extends ClientPlayerBase { - - private final Minecraft mc = Minecraft.getMinecraft(); - private final CustomMovementHandler customMovementInput = new CustomMovementHandler(); - private final GameSettings settings = this.mc.gameSettings; - - public BasePlayer(final ClientPlayerAPI api) { - super(api); - } - - /* - * EntityPlayerSP.onLivingUpdate() - Adapted to PlayerAPI - */ - @Override - public void onLivingUpdate() { - - super.onLivingUpdate(); - EntityPlayer aPlayer = this.player; - if (aPlayer != null) { - SneakManager aSneak = SneakManager.get(aPlayer); - if (!aSneak.isWearingRing()) { - return; - } - } - - if (this.player.sprintingTicksLeft > 0) { - --this.player.sprintingTicksLeft; - if (this.player.sprintingTicksLeft == 0) { - this.player.setSprinting(false); - } - } - - if (this.playerAPI.getSprintToggleTimerField() > 0) { - this.playerAPI.setSprintToggleTimerField(this.playerAPI.getSprintToggleTimerField() - 1); - } - - if (this.mc.playerController.enableEverythingIsScrewedUpMode()) { - this.player.posX = this.player.posZ = 0.5D; - this.player.posX = 0.0D; - this.player.posZ = 0.0D; - this.player.rotationYaw = this.player.ticksExisted / 12.0F; - this.player.rotationPitch = 10.0F; - this.player.posY = 68.5D; - } else { - - final boolean isJumping = this.player.movementInput.jump; - - final float minSpeed = 0.8F; - final boolean isMovingForward = this.player.movementInput.moveForward >= minSpeed; - this.customMovementInput.update(this.mc, (MovementInputFromOptions) this.player.movementInput, this.player); - - /* - * Begin ToggleSneak Changes - ToggleSprint - */ - SneakManager aSneak = SneakManager.get(this.player); - - final boolean isSprintDisabled = false; - final boolean canDoubleTap = aSneak.optionDoubleTap; - - // Detect when ToggleSprint was disabled in the in-game options menu - if (aSneak.wasSprintDisabled) { - this.player.setSprinting(false); - this.customMovementInput.UpdateSprint(false, false, aSneak); - aSneak.wasSprintDisabled = false; - } - - // Default Sprint routine converted to PlayerAPI, use if ToggleSprint is disabled - TODO - Disable sprinting - // as a whole - if (isSprintDisabled) { - // Utils.LOG_INFO("Sprint pressed"); - if (aSneak.optionDoubleTap && this.player.onGround - && !isMovingForward - && (this.player.movementInput.moveForward >= minSpeed) - && !this.player.isSprinting() - && !this.player.isUsingItem() - && !this.player.isPotionActive(Potion.blindness)) { - if ((this.playerAPI.getSprintToggleTimerField() <= 0) - && !this.settings.keyBindSprint.getIsKeyPressed()) { - this.playerAPI.setSprintToggleTimerField(7); - } else { - if (aSneak.Sprinting()) { - this.player.setSprinting(true); - this.customMovementInput.UpdateSprint(true, false, aSneak); - } else { - this.player.setSprinting(false); - this.customMovementInput.UpdateSprint(false, false, aSneak); - } - } - } - - if (!this.player.isSprinting() && (this.player.movementInput.moveForward >= minSpeed) - && !this.player.isUsingItem() - && !this.player.isPotionActive(Potion.blindness) - && this.settings.keyBindSprint.getIsKeyPressed()) { - if (aSneak.Sprinting()) { - this.player.setSprinting(true); - this.customMovementInput.UpdateSprint(true, false, aSneak); - } else { - this.player.setSprinting(false); - this.customMovementInput.UpdateSprint(false, false, aSneak); - } - } - } else { - final boolean state = this.customMovementInput.sprint; - - // Only handle changes in state under the following conditions: - // On ground, not hungry, not eating/using item, not blind, and not Vanilla - // - // 5/6/14 - onGround check removed to match vanilla's 'start sprint while jumping' behavior. - // if(this.player.onGround && enoughHunger && !this.player.isUsingItem() && - // !this.player.isPotionActive(Potion.blindness) && !this.customMovementInput.sprintHeldAndReleased) - - if (!this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) - && !this.customMovementInput.sprintHeldAndReleased) { - if ((canDoubleTap && !this.player.isSprinting()) || !canDoubleTap) { - if (aSneak.Sprinting()) { - this.player.setSprinting(state); - } else { - this.player.setSprinting(false); - } - } - } - - if (canDoubleTap && !state - && this.player.onGround - && !isMovingForward - && (this.player.movementInput.moveForward >= minSpeed) - && !this.player.isSprinting() - && !this.player.isUsingItem() - && !this.player.isPotionActive(Potion.blindness)) { - if (this.playerAPI.getSprintToggleTimerField() == 0) { - this.playerAPI.setSprintToggleTimerField(7); - } else { - if (aSneak.Sprinting()) { - this.player.setSprinting(true); - this.customMovementInput.UpdateSprint(true, true, aSneak); - this.playerAPI.setSprintToggleTimerField(0); - } - } - } - } - - // If sprinting, break the sprint in appropriate circumstances: - // Player stops moving forward, runs into something, or gets too hungry - if (this.player.isSprinting() - && ((this.player.movementInput.moveForward < minSpeed) || this.player.isCollidedHorizontally)) { - this.player.setSprinting(false); - - // Undo toggle if we resumed vanilla operation due to Hold&Release, DoubleTap, Fly, Ride - if ((this.customMovementInput.sprintHeldAndReleased == true) || isSprintDisabled - || this.customMovementInput.sprintDoubleTapped - || this.player.capabilities.isFlying - || this.player.isRiding()) { - this.customMovementInput.UpdateSprint(false, false, aSneak); - } - } - - /* - * End ToggleSneak Changes - ToggleSprint - */ - - // // - // // Debug Framework - Added 5/7/2014 - // // - // if (this.showDebug && this.settings.keyBindPickBlock.getIsKeyPressed() && !this.handledDebugPress) - // { - // this.player.addChatMessage(new ChatComponentText("+--------------------------------------+")); - // this.player.addChatMessage(new ChatComponentText("| ToggleSneak Debug Info |")); - // this.player.addChatMessage(new ChatComponentText("+--------------------------------------+")); - // this.player.addChatMessage(new ChatComponentText(" ")); - // this.player.addChatMessage(new ChatComponentText("isFlying - " + - // (this.player.capabilities.isFlying == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("isCreative - " + - // (this.player.capabilities.isCreativeMode == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("enableFlyBoost - " + - // (SneakManager.optionEnableFlyBoost == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("flyBoostAmount - " + - // SneakManager.optionFlyBoostAmount)); - // this.player.addChatMessage(new ChatComponentText(" ")); - // this.player.addChatMessage(new ChatComponentText("keybindSprint - " + - // (this.settings.keyBindSprint.getIsKeyPressed() == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("keybindSneak - " + - // (this.settings.keyBindSneak.getIsKeyPressed() == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("keybindJump - " + - // (this.settings.keyBindJump.getIsKeyPressed() == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText(" ")); - // this.player.addChatMessage(new ChatComponentText(" ")); - // - // this.handledDebugPress = true; - // } - // else if (this.showDebug && !this.settings.keyBindPickBlock.getIsKeyPressed() && this.handledDebugPress) - // { - // this.handledDebugPress = false; - // } - - } - } -} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java index be35a360d1..284fe73e15 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java @@ -1,7 +1,6 @@ package gtPlusPlus.core.common.compat; import static gregtech.api.enums.Mods.Baubles; -import static gregtech.api.enums.Mods.PlayerAPI; import static gregtech.client.GT_TooltipHandler.Tier.EV; import static gregtech.client.GT_TooltipHandler.Tier.HV; import static gregtech.client.GT_TooltipHandler.Tier.IV; @@ -57,8 +56,6 @@ public static void baublesLoaded() { ModItems.itemChargePack_High_4 = new BatteryPackBaseBauble(9); registerTieredTooltip(new ItemStack(ModItems.itemChargePack_High_4, 1, OreDictionary.WILDCARD_VALUE), UHV); - if (PlayerAPI.isModLoaded()) { - ModItems.itemSlowBuildingRing = new ItemSlowBuildingRing(); - } + ModItems.itemSlowBuildingRing = new ItemSlowBuildingRing(); } } diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java deleted file mode 100644 index 286de43fcb..0000000000 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java +++ /dev/null @@ -1,38 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import api.player.client.ClientPlayerAPI; -import gtPlusPlus.core.common.BasePlayer; - -public class COMPAT_PlayerAPI { - - public static class commonProxy { - - public static void initPre() {} - - public static void Init() {} - - public static void initPost() {} - } - - public static class clientProxy { - - public static void initPre() { - // Utils.registerEvent(SneakManager.instance); - } - - public static void Init() { - ClientPlayerAPI.register("SneakManager", BasePlayer.class); - } - - public static void initPost() {} - } - - public static class serverProxy { - - public static void initPre() {} - - public static void Init() {} - - public static void initPost() {} - } -} diff --git a/src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java b/src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java deleted file mode 100644 index 3546d47f65..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java +++ /dev/null @@ -1,143 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.util.MovementInputFromOptions; - -/* - * Replacement for MovementInputFromOptions - Built from the source of ToggleSneak 3.0.3 - */ - -public class CustomMovementHandler { - - public boolean isDisabled; - public boolean canDoubleTap; - - public boolean sprint = false; - public boolean sprintHeldAndReleased = false; - public boolean sprintDoubleTapped = false; - - private long lastPressed; - private long lastSprintPressed; - private boolean handledSneakPress; - private boolean handledSprintPress; - private boolean wasRiding; - - /* - * MovementInputFromOptions.updatePlayerMoveState() - */ - public void update(final Minecraft mc, final MovementInputFromOptions options, final EntityPlayerSP thisPlayer) { - options.moveStrafe = 0.0F; - options.moveForward = 0.0F; - - final GameSettings settings = mc.gameSettings; - - if (settings.keyBindForward.getIsKeyPressed()) { - ++options.moveForward; - } - - if (settings.keyBindBack.getIsKeyPressed()) { - --options.moveForward; - } - - if (settings.keyBindLeft.getIsKeyPressed()) { - ++options.moveStrafe; - } - - if (settings.keyBindRight.getIsKeyPressed()) { - --options.moveStrafe; - } - - options.jump = settings.keyBindJump.getIsKeyPressed(); - - // - // Sneak Toggle - Essentially the same as old ToggleSneak - // - - // Check to see if Enabled - Added 6/17/14 to provide option to disable Sneak Toggle - final boolean isSneaking = SneakManager.get(thisPlayer).Sneaking(); - // Utils.LOG_INFO("Can sneak: "+isSneaking); - // Utils.LOG_INFO("Can sprint: "+SneakManager.Sprinting()); - if (isSneaking) { - // Key Pressed - if (settings.keyBindSneak.getIsKeyPressed() && !this.handledSneakPress) { - // Descend if we are flying, note if we were riding (so we can unsneak once dismounted) - if (thisPlayer.isRiding() || thisPlayer.capabilities.isFlying) { - options.sneak = true; - this.wasRiding = thisPlayer.isRiding(); - } else { - options.sneak = !options.sneak; - } - - this.lastPressed = System.currentTimeMillis(); - this.handledSneakPress = true; - } - - // Key Released - if (!settings.keyBindSneak.getIsKeyPressed() && this.handledSneakPress) { - // If we are flying or riding, stop sneaking after descent/dismount. - if (thisPlayer.capabilities.isFlying || this.wasRiding) { - options.sneak = false; - this.wasRiding = false; - } - // If the key was held down for more than 300ms, stop sneaking upon release. - else if ((System.currentTimeMillis() - this.lastPressed) > 300L) { - options.sneak = false; - } - - this.handledSneakPress = false; - } - } else { - options.sneak = settings.keyBindSneak.getIsKeyPressed(); - } - - if (options.sneak || SneakManager.get(thisPlayer).Sneaking()) { - options.moveStrafe = (float) (options.moveStrafe * 0.3D); - options.moveForward = (float) (options.moveForward * 0.3D); - } - - // - // Sprint Toggle - Updated 6/18/2014 - // - - // Establish conditions where we don't want to start a sprint - sneaking, riding, flying, hungry - final boolean enoughHunger = (thisPlayer.getFoodStats().getFoodLevel() > 6.0F) - || thisPlayer.capabilities.isFlying; - final boolean canSprint = !options.sneak && !thisPlayer.isRiding() - && !thisPlayer.capabilities.isFlying - && enoughHunger; - - this.isDisabled = !SneakManager.get(thisPlayer).Sprinting(); - this.canDoubleTap = SneakManager.get(thisPlayer).optionDoubleTap; - - // Key Pressed - if ((canSprint || this.isDisabled) && settings.keyBindSprint.getIsKeyPressed() && !this.handledSprintPress) { - if (!this.isDisabled) { - this.sprint = !this.sprint; - this.lastSprintPressed = System.currentTimeMillis(); - this.handledSprintPress = true; - this.sprintHeldAndReleased = false; - } - } - - // Key Released - if ((canSprint || this.isDisabled) && !settings.keyBindSprint.getIsKeyPressed() && this.handledSprintPress) { - // Was key held for longer than 300ms? If so, mark it so we can resume vanilla behavior - if ((System.currentTimeMillis() - this.lastSprintPressed) > 300L) { - this.sprintHeldAndReleased = true; - } - this.handledSprintPress = false; - } - } - - public void UpdateSprint(final boolean newValue, final boolean doubleTapped, SneakManager aSneak) { - if (!aSneak.Sprinting()) { - this.sprint = false; - this.sprintDoubleTapped = doubleTapped; - } else { - this.sprint = newValue; - this.sprintDoubleTapped = doubleTapped; - } - } -} diff --git a/src/main/java/gtPlusPlus/core/handler/events/SneakManager.java b/src/main/java/gtPlusPlus/core/handler/events/SneakManager.java deleted file mode 100644 index 14e9af20ec..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/events/SneakManager.java +++ /dev/null @@ -1,129 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import java.util.concurrent.ConcurrentHashMap; - -import net.minecraft.entity.player.EntityPlayer; - -import gtPlusPlus.api.objects.Logger; - -public class SneakManager { - - // We make this a singleton for clientside data storage. - - public static ConcurrentHashMap mPlayerCache = new ConcurrentHashMap(); - - private static void addPlayer(EntityPlayer aPlayer) { - String aKey = getKey(aPlayer); - if (!mPlayerCache.containsKey(aKey)) { - mPlayerCache.put(aKey, new SneakManager(aPlayer)); - } - } - - public static SneakManager get(EntityPlayer aPlayer) { - - String aKey = getKey(aPlayer); - if (!mPlayerCache.containsKey(aKey)) { - addPlayer(aPlayer); - } - return mPlayerCache.get(aKey); - } - - private static String getKey(EntityPlayer aPlayer) { - return "" + aPlayer.getGameProfile().getId().toString(); - } - - public SneakManager instance; - public EntityPlayer owner; - public boolean canSprint = true; - public boolean isSneaking = true; - public boolean optionDoubleTap = true; - public boolean wasSprintDisabled = false; - public boolean mIsWearingRing = false; - - private State Sprinting = State.ON; - private State Crouching = State.OFF; - - public SneakManager(EntityPlayer aPlayer) { - owner = aPlayer; - } - - public boolean Sneaking() { - return Crouching.getState(); - } - - public boolean Sprinting() { - return Sprinting.getState(); - } - - public State getSneakingState() { - return Crouching; - } - - public State getSprintingDisabledState() { - return Sprinting; - } - - public void toggleSneaking() { - toggleState(Crouching); - } - - public void toggleSprinting() { - toggleState(Sprinting); - } - - private State toggleState(final State state) { - Logger.INFO("State Toggle"); - if (state == State.ON) { - return State.OFF; - } - return State.ON; - } - - private State setCrouchingStateON() { - return Crouching = State.ON; - } - - private State setCrouchingStateOFF() { - return Crouching = State.OFF; - } - - private State setSprintingStateON() { - return Sprinting = State.ON; - } - - private State setSprintingStateOFF() { - return Sprinting = State.OFF; - } - - public void putRingOn() { - mIsWearingRing = true; - setSprintingStateOFF(); - setCrouchingStateON(); - } - - public void takeRingOff() { - mIsWearingRing = false; - setSprintingStateON(); - setCrouchingStateOFF(); - } - - public boolean isWearingRing() { - return mIsWearingRing; - } - - public static enum State { - - ON(true), - OFF(false); - - private final boolean STATE; - - private State(final boolean State) { - this.STATE = State; - } - - public boolean getState() { - return this.STATE; - } - } -} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java b/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java index a182c4bdb9..d609ceea33 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java @@ -18,8 +18,6 @@ import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.Mods; import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.events.CustomMovementHandler; -import gtPlusPlus.core.handler.events.SneakManager; import gtPlusPlus.core.util.minecraft.ItemUtils; @Optional.InterfaceList( @@ -27,16 +25,14 @@ @Optional.Interface(iface = "baubles.api.BaubleType", modid = Mods.Names.BAUBLES) }) public class ItemSlowBuildingRing extends Item implements IBauble { - private final String unlocalizedName = "SlowBuildingRing"; - CustomMovementHandler x; - public ItemSlowBuildingRing() { this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setUnlocalizedName(this.unlocalizedName); + String unlocalizedName = "SlowBuildingRing"; + this.setUnlocalizedName(unlocalizedName); this.setMaxStackSize(1); this.setTextureName(GTPlusPlus.ID + ":" + "itemSlowBuildersRing"); ItemUtils.getSimpleStack(this); - GameRegistry.registerItem(this, this.unlocalizedName); + GameRegistry.registerItem(this, unlocalizedName); } @Override @@ -79,58 +75,23 @@ public BaubleType getBaubleType(final ItemStack arg0) { return BaubleType.RING; } - @Override // TODO - public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { - try { - EntityPlayer aPlayer; - if (arg1 instanceof EntityPlayer) { - aPlayer = (EntityPlayer) arg1; - SneakManager s = SneakManager.get(aPlayer); - s.putRingOn(); - } - } catch (Throwable t) { - t.printStackTrace(); - } - } + @Override + public void onWornTick(ItemStack itemstack, EntityLivingBase entity) { + if(entity instanceof EntityPlayer player) { - @Override // TODO - public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { - try { - EntityPlayer aPlayer; - if (arg1 instanceof EntityPlayer) { - aPlayer = (EntityPlayer) arg1; - SneakManager s = SneakManager.get(aPlayer); - s.takeRingOff(); - } - } catch (Throwable t) { - t.printStackTrace(); + // Continuously set the sprinting flag to false to ensure the player doesn't sprint + player.setSprinting(false); } } - @Override // TODO - public void onWornTick(final ItemStack arg0, final EntityLivingBase arg1) { - doEffect(arg1); + @Override + public void onEquipped(ItemStack itemstack, EntityLivingBase player) { + } - private static void doEffect(final EntityLivingBase arg1) { - try { - // Get World - World aWorld = arg1.worldObj; - if (aWorld != null && !aWorld.isRemote) { - EntityPlayer aPlayer; - if (arg1 instanceof EntityPlayer) { - aPlayer = (EntityPlayer) arg1; - SneakManager s = SneakManager.get(aPlayer); - if (!aPlayer.isSneaking()) { - aPlayer.setSneaking(true); - } - if (aPlayer.isSprinting()) { - aPlayer.setSprinting(false); - } - } - } - } catch (Throwable t) { - t.printStackTrace(); - } + @Override + public void onUnequipped(ItemStack itemstack, EntityLivingBase player) { + } + } diff --git a/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java b/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java index f1052d9332..1c42d48803 100644 --- a/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java +++ b/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java @@ -1,28 +1,8 @@ package gtPlusPlus.core.proxy; -import static gregtech.api.enums.Mods.PlayerAPI; - -import java.util.ArrayList; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.entity.RenderFireball; -import net.minecraft.client.renderer.entity.RenderSnowball; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.MinecraftForgeClient; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLLoadCompleteEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; @@ -32,7 +12,6 @@ import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Mods; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.Pair; @@ -44,7 +23,6 @@ import gtPlusPlus.core.client.renderer.RenderStaballoyConstruct; import gtPlusPlus.core.client.renderer.RenderToxinball; import gtPlusPlus.core.common.CommonProxy; -import gtPlusPlus.core.common.compat.COMPAT_PlayerAPI; import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; import gtPlusPlus.core.entity.monster.EntitySickBlaze; import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; @@ -62,6 +40,22 @@ import gtPlusPlus.xmod.gregtech.common.render.GTPP_FlaskRenderer; import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; import ic2.core.item.ItemFluidCell; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.entity.RenderFireball; +import net.minecraft.client.renderer.entity.RenderSnowball; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; public class ClientProxy extends CommonProxy implements Runnable { @@ -94,18 +88,10 @@ public void preInit(final FMLPreInitializationEvent e) { } // Do this weird things for textures. GTplusplus.loadTextures(); - // We boot up the sneak manager. - if (PlayerAPI.isModLoaded()) { - this.init_PlayerAPI_PRE(); - } } @Override public void init(final FMLInitializationEvent e) { - if (PlayerAPI.isModLoaded()) { - this.init_PlayerAPI_INIT(); - } - /** * Custom Block Renderers */ @@ -186,18 +172,6 @@ public void generateMysteriousParticles(final Entity theEntity) { @Override public void serverStarting(final FMLServerStartingEvent e) {} - @Optional.Method(modid = Mods.Names.PLAYER_API) - private void init_PlayerAPI_PRE() { - // Register player instance - COMPAT_PlayerAPI.clientProxy.initPre(); - } - - @Optional.Method(modid = Mods.Names.PLAYER_API) - private void init_PlayerAPI_INIT() { - // Register player instance - COMPAT_PlayerAPI.clientProxy.Init(); - } - public void onPreLoad() { /* * if (ConfigSwitches.enableCustomCapes){ String arr$[] = { "draknyte1", "fobius" }; int len$ = arr$.length; for From fe79b7cc5e3a2526dae4608262094ce7885b3cd4 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:52:51 +0100 Subject: [PATCH 3/8] More crap removed and cleaned. Removed slow build ring on request of Alex to reduce deps on PlayerAPI. --- src/main/java/gtPlusPlus/GTplusplus.java | 10 -- .../gtPlusPlus/core/commands/CommandMath.java | 89 --------------- .../gtPlusPlus/core/common/CommonProxy.java | 5 - .../core/common/compat/COMPAT_Baubles.java | 3 - .../core/common/compat/COMPAT_IC2.java | 58 ---------- .../core/common/compat/COMPAT_OpenBlocks.java | 4 +- .../core/handler/COMPAT_HANDLER.java | 11 -- .../gtPlusPlus/core/handler/MobMentality.java | 61 ---------- .../Recipes/LateRegistrationHandler.java | 14 +-- .../handler/Recipes/RegistrationHandler.java | 2 +- .../handler/events/LoginEventHandler.java | 104 ------------------ .../handler/events/MissingMappingsEvent.java | 47 -------- .../events/PickaxeBlockBreakEventHandler.java | 20 ---- .../java/gtPlusPlus/core/item/ModItems.java | 1 - .../item/general/ItemSlowBuildingRing.java | 97 ---------------- .../core/util/minecraft/RecipeUtils.java | 52 +++------ 16 files changed, 24 insertions(+), 554 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/core/commands/CommandMath.java delete mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java delete mode 100644 src/main/java/gtPlusPlus/core/handler/MobMentality.java delete mode 100644 src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java delete mode 100644 src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java delete mode 100644 src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java delete mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java diff --git a/src/main/java/gtPlusPlus/GTplusplus.java b/src/main/java/gtPlusPlus/GTplusplus.java index 5c9fafbb35..a0e4b3c23c 100644 --- a/src/main/java/gtPlusPlus/GTplusplus.java +++ b/src/main/java/gtPlusPlus/GTplusplus.java @@ -39,15 +39,11 @@ import gtPlusPlus.core.chunkloading.GTPP_ChunkManager; import gtPlusPlus.core.commands.CommandDebugChunks; import gtPlusPlus.core.commands.CommandEnableDebugWhileRunning; -import gtPlusPlus.core.commands.CommandMath; import gtPlusPlus.core.common.CommonProxy; import gtPlusPlus.core.config.ConfigHandler; import gtPlusPlus.core.handler.BookHandler; -import gtPlusPlus.core.handler.MobMentality; import gtPlusPlus.core.handler.PacketHandler; import gtPlusPlus.core.handler.Recipes.RegistrationHandler; -import gtPlusPlus.core.handler.events.LoginEventHandler; -import gtPlusPlus.core.handler.events.MissingMappingsEvent; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; @@ -173,11 +169,6 @@ public void preInit(final FMLPreInitializationEvent event) { CORE.DEVENV = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); // Utils.LOG_INFO("User's Country: " + CORE.USER_COUNTRY); - Utils.registerEvent(new LoginEventHandler()); - Utils.registerEvent(new MissingMappingsEvent()); - Utils.registerEvent(new MobMentality()); - Logger.INFO("Login Handler Initialized"); - proxy.preInit(event); Logger.INFO("Setting up our own GT_Proxy."); Meta_GT_Proxy.preInit(); @@ -238,7 +229,6 @@ public void postInit(final FMLPostInitializationEvent event) { @EventHandler public synchronized void serverStarting(final FMLServerStartingEvent event) { INIT_PHASE.SERVER_START.setPhaseActive(true); - event.registerServerCommand(new CommandMath()); event.registerServerCommand(new CommandEnableDebugWhileRunning()); event.registerServerCommand(new CommandDebugChunks()); if (Thaumcraft.isModLoaded()) { diff --git a/src/main/java/gtPlusPlus/core/commands/CommandMath.java b/src/main/java/gtPlusPlus/core/commands/CommandMath.java deleted file mode 100644 index 8659c00246..0000000000 --- a/src/main/java/gtPlusPlus/core/commands/CommandMath.java +++ /dev/null @@ -1,89 +0,0 @@ -package gtPlusPlus.core.commands; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.MiningUtils; - -public class CommandMath implements ICommand { - - private final List aliases; - - protected String fullEntityName; - protected Entity conjuredEntity; - - public CommandMath() { - this.aliases = new ArrayList<>(); - // this.aliases.add("hometele"); - // this.aliases.add("warphome"); - } - - @Override - public int compareTo(final Object o) { - return 0; - } - - @Override - public String getCommandName() { - return "alkalus"; - } - - @Override - public String getCommandUsage(final ICommandSender var1) { - return "/alkalus [Dev Command]"; - } - - @Override - public List getCommandAliases() { - return this.aliases; - } - - @Override - public void processCommand(final ICommandSender S, final String[] argString) { - Logger.INFO("Debug Command"); - final World W = S.getEntityWorld(); - final EntityPlayer P = CommandUtils.getPlayer(S); - if (P.getDisplayName().equalsIgnoreCase("draknyte1")) { - Logger.INFO("[Bedrock Miner] OreType Scan"); - MiningUtils.iterateAllOreTypes(); - } - } - - @Override - public boolean canCommandSenderUseCommand(final ICommandSender var1) { - final EntityPlayer P = CommandUtils.getPlayer(var1); - if (P == null) { - return false; - } - if (P.getDisplayName().toLowerCase().equals("draknyte1") - || P.getCommandSenderName().toLowerCase().equals("draknyte1") - || CORE.DEVENV) { - return true; - } - return false; - } - - @Override - public List addTabCompletionOptions(final ICommandSender var1, final String[] var2) { - return null; - } - - @Override - public boolean isUsernameIndex(final String[] var1, final int var2) { - // TODO Auto-generated method stub - return false; - } - - public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost) { - - return true; - } -} diff --git a/src/main/java/gtPlusPlus/core/common/CommonProxy.java b/src/main/java/gtPlusPlus/core/common/CommonProxy.java index ee624b3f24..ef449f0b0d 100644 --- a/src/main/java/gtPlusPlus/core/common/CommonProxy.java +++ b/src/main/java/gtPlusPlus/core/common/CommonProxy.java @@ -32,7 +32,6 @@ import gtPlusPlus.core.handler.events.EnderDragonDeathHandler; import gtPlusPlus.core.handler.events.EntityDeathHandler; import gtPlusPlus.core.handler.events.GeneralTooltipEventHandler; -import gtPlusPlus.core.handler.events.PickaxeBlockBreakEventHandler; import gtPlusPlus.core.handler.events.PlayerSleepEventHandler; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.CORE; @@ -99,8 +98,6 @@ public void init(final FMLInitializationEvent e) { */ // Prevents my Safes being destroyed. - Utils.registerEvent(new PickaxeBlockBreakEventHandler()); - // Block Handler for all events. Utils.registerEvent(new GeneralTooltipEventHandler()); // Handles Tooltips for items giving custom multiblock behaviour Utils.registerEvent(new SpecialBehaviourTooltipHandler()); @@ -134,8 +131,6 @@ public void postInit(final FMLPostInitializationEvent e) { } // Compat Handling - Logger.INFO("Removing recipes from other mods."); - COMPAT_HANDLER.RemoveRecipesFromOtherMods(); Logger.INFO("Initialising Handler, Then Adding Recipes"); COMPAT_HANDLER.InitialiseHandlerThenAddRecipes(); Logger.INFO("Loading Intermod staging."); diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java index 284fe73e15..e90596c876 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java @@ -21,7 +21,6 @@ import gtPlusPlus.core.item.bauble.FireProtectionBauble; import gtPlusPlus.core.item.general.ItemCloakingDevice; import gtPlusPlus.core.item.general.ItemHealingDevice; -import gtPlusPlus.core.item.general.ItemSlowBuildingRing; public class COMPAT_Baubles { @@ -55,7 +54,5 @@ public static void baublesLoaded() { registerTieredTooltip(new ItemStack(ModItems.itemChargePack_High_3, 1, OreDictionary.WILDCARD_VALUE), UV); ModItems.itemChargePack_High_4 = new BatteryPackBaseBauble(9); registerTieredTooltip(new ItemStack(ModItems.itemChargePack_High_4, 1, OreDictionary.WILDCARD_VALUE), UHV); - - ModItems.itemSlowBuildingRing = new ItemSlowBuildingRing(); } } diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java deleted file mode 100644 index 92da90184f..0000000000 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import static gtPlusPlus.core.handler.COMPAT_HANDLER.RemoveRecipeQueue; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.recipe.ShapedRecipeObject; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class COMPAT_IC2 { - - private static ItemStack itemCropnalyzer = ItemUtils.simpleMetaStack("IC2:itemCropnalyzer", 0, 1); - private static ItemStack itemSolarHelmet = ItemUtils.simpleMetaStack("IC2:itemSolarHelmet", 0, 1); - - public static ShapedRecipeObject Cropnalyzer = new ShapedRecipeObject( - "ore:cableGt02Copper", - "ore:cableGt02Copper", - null, - "minecraft:redstone", - "ore:blockGlass", - "minecraft:redstone", - "minecraft:redstone", - "ore:circuitBasic", - "minecraft:redstone", - itemCropnalyzer); - public static ShapedRecipeObject SolarHelmet = new ShapedRecipeObject( - "ore:plateIron", - "ore:plateIron", - "ore:plateIron", - "ore:plateIron", - "gregtech:gt.metaitem.01:32750", - "ore:plateIron", - "ore:craftingWireCopper", - "ore:craftingWireCopper", - "ore:craftingWireCopper", - itemSolarHelmet); - - public static void OreDict() { - run(); - } - - private static final void run() { - - if (ConfigSwitches.disableIC2Recipes) { - - // Remove these. - RemoveRecipeQueue.add("IC2:itemCable"); - RemoveRecipeQueue.add("IC2:itemCable:1"); - RemoveRecipeQueue.add("IC2:itemCable:2"); - RemoveRecipeQueue.add("IC2:itemCable:3"); - RemoveRecipeQueue.add("IC2:itemCable:5"); - RemoveRecipeQueue.add("IC2:itemCable:6"); - RemoveRecipeQueue.add("IC2:itemCable:10"); - RemoveRecipeQueue.add("IC2:itemCable:13"); - } - } -} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java index 94b3d27c7e..68c0b8e0a5 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java @@ -8,11 +8,13 @@ public class COMPAT_OpenBlocks { + + // Todo move this code to openblocks itself public static void OreDict() { run(); } - private static final void run() { + private static void run() { Item aGraveItem = ItemUtils.getItemFromFQRN("OpenBlocks:grave"); if (aGraveItem == null) { diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java index 5b7d1de7fb..d6a14b6612 100644 --- a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -21,7 +21,6 @@ import gtPlusPlus.api.objects.minecraft.ItemPackage; import gtPlusPlus.core.common.compat.COMPAT_ExtraUtils; import gtPlusPlus.core.common.compat.COMPAT_HarvestCraft; -import gtPlusPlus.core.common.compat.COMPAT_IC2; import gtPlusPlus.core.common.compat.COMPAT_OpenBlocks; import gtPlusPlus.core.common.compat.COMPAT_Thaumcraft; import gtPlusPlus.core.common.compat.COMPAT_Witchery; @@ -33,7 +32,6 @@ import gtPlusPlus.core.recipe.RECIPES_LaserEngraver; import gtPlusPlus.core.recipe.ShapedRecipeObject; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_FluidCanning; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling; import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_ChemicalSkips; @@ -104,7 +102,6 @@ public class COMPAT_HANDLER { - public static Queue RemoveRecipeQueue = new LinkedList<>(); public static Queue AddRecipeQueue = new LinkedList<>(); public static Boolean areInitItemsLoaded = false; @@ -205,20 +202,12 @@ public static void intermodOreDictionarySupport() { if (PamsHarvestCraft.isModLoaded()) { COMPAT_HarvestCraft.OreDict(); } - COMPAT_IC2.OreDict(); if (Witchery.isModLoaded()) { COMPAT_Witchery.OreDict(); } } - public static void RemoveRecipesFromOtherMods() { - // Removal of Recipes - for (final Object item : RemoveRecipeQueue) { - RecipeUtils.removeCraftingRecipe(item); - } - } - public static void InitialiseHandlerThenAddRecipes() { RegistrationHandler.run(); } diff --git a/src/main/java/gtPlusPlus/core/handler/MobMentality.java b/src/main/java/gtPlusPlus/core/handler/MobMentality.java deleted file mode 100644 index 15be7cc4f4..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/MobMentality.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.core.handler; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.event.entity.living.LivingHurtEvent; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class MobMentality { - - public static HashSet> sIgnoredTypes = new HashSet>(); - - @SubscribeEvent - public void onEntityDamaged(LivingHurtEvent event) { - final EntityLivingBase target = event.entityLiving; - for (Class aEntityClass : sIgnoredTypes) { - if (aEntityClass.isInstance(target)) { - return; - } - } - if (target instanceof EntityLivingBase) { - final EntityLivingBase entity = target; - final Entity attacker = event.source.getSourceOfDamage(); - if ( - /* this.configuration.shouldIgnoreNeutralMobs() && */ !(entity instanceof IMob)) { - return; - } - if (attacker == null) { - return; - } - if (attacker instanceof EntityLivingBase && !PlayerUtils.isRealPlayer((EntityLivingBase) attacker)) { - return; - } - if (attacker instanceof EntityPlayer && PlayerUtils.isCreative((EntityPlayer) attacker)) { - return; - } - if (attacker instanceof EntityLivingBase) { - List aEntityList = target.worldObj.loadedEntityList; - List aRangedEntity = new ArrayList(); - for (Entity aEntity : aEntityList) { - if (target.getClass().isInstance(aEntity)) { - if (EntityUtils.getDistance(target, aEntity) <= 32) { - aRangedEntity.add((EntityLivingBase) aEntity); - } - } - } - for (EntityLivingBase aEntity : aRangedEntity) { - aEntity.setRevengeTarget((EntityLivingBase) attacker); - } - } - } - } -} diff --git a/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java b/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java index 3e20194498..6e027d7bd8 100644 --- a/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java @@ -6,22 +6,12 @@ public class LateRegistrationHandler { - public static int recipesSuccess = 0; - public static int recipesFailed = 0; public static void run() { init(); } - private static final void init() { - for (final ShapedRecipeObject item : COMPAT_HANDLER.AddRecipeQueue) { - item.buildRecipe(); - } - try { - Thread.sleep(10); - } catch (final InterruptedException e) { - Logger.INFO(e.toString()); - } - Logger.INFO("Late Recipes Loaded: " + recipesSuccess + " Failed: " + recipesFailed); + private static void init() { + } } diff --git a/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java b/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java index 005ebba204..2f1eb92b80 100644 --- a/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java @@ -16,7 +16,7 @@ public static void run() { init(); } - private static final void init() { + private static void init() { RECIPES_General.loadRecipes(); RECIPES_Machines.loadRecipes(); RECIPES_MachineComponents.loadRecipes(); diff --git a/src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java deleted file mode 100644 index fec88a5d74..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java +++ /dev/null @@ -1,104 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import java.util.Timer; -import java.util.TimerTask; -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.proxy.ClientProxy; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.player.PlayerCache; - -public class LoginEventHandler { - - public String localPlayersName; - public UUID localPlayersUUID; - private EntityPlayer localPlayerRef; - - @SubscribeEvent - public void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent event) { - - this.localPlayerRef = event.player; - this.localPlayersName = event.player.getDisplayName(); - this.localPlayersUUID = event.player.getUniqueID(); - - // Set this for easier use elsewhere. - if (event.player.getEntityWorld().isRemote) { - ClientProxy.playerName = this.localPlayersName; - } - - try { - // new SegmentAnalytics(event.player); - } catch (Throwable t) { - // SegmentAnalytics.LOG("Failed to create Analytics submission during log in process."); - } - - try { - - if (this.localPlayerRef instanceof EntityPlayerMP) { - - // Populates player cache - if (!this.localPlayerRef.worldObj.isRemote) { - PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString()); - } - - /* - * if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009") || - * localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){ - * Utils.LOG_INFO("Spawning a new Santa Thread."); Thread t = new Thread() { UUID threadHandlerIDthing = - * localPlayersUUID; - * @Override public void run() { while(true && Minecraft.getMinecraft().getIntegratedServer() != null) { - * try { if(localPlayerRef == null){ localPlayerRef = - * Utils.getPlayerOnServerFromUUID(threadHandlerIDthing); } //ImQ009 is a legend. if - * (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009")){ - * Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread."); - * localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems. - * itemIngotRaisinBread, MathUtils.randInt(1, 5))); } if - * (localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){ - * Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread."); - * localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems. - * itemIngotRaisinBread, MathUtils.randInt(1, 5))); } Thread.sleep(1000*60*MathUtils.randInt(15, 90)); } - * catch (InterruptedException ie) { Utils.LOG_INFO("Santa Mode Disabled."); } } - * Utils.LOG_INFO("Thread Stopped. Handler Closed."); } }; //t.start(); } - */ - - } - } catch (final Throwable errr) { - Logger.INFO("Login Handler encountered an error."); - } - } - - // Handles notifying the player about a version update. - public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) { - Timer timer; - timer = new Timer(); - timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000); - return timer; - } - - // Timer Task for notifying the player. - class NotifyPlayer extends TimerTask { - - final EntityPlayer toMessage; - - public NotifyPlayer(EntityPlayer localPlayer) { - toMessage = localPlayer; - } - - @Override - public void run() { - if (toMessage != null) { - if (toMessage instanceof EntityPlayerMP) { - PlayerUtils.messagePlayer( - toMessage, - "You're not using the latest recommended version of GT++, consider updating."); - } - } - } - } -} diff --git a/src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java b/src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java deleted file mode 100644 index 7ba06f4bbd..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import static gregtech.api.enums.Mods.GTPlusPlus; -import static gtPlusPlus.core.item.base.dusts.BaseItemDustEx.mCachedPileLinkages; - -import net.minecraft.item.ItemStack; - -import org.apache.commons.lang3.StringUtils; - -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.event.FMLMissingMappingsEvent; -import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; -import gtPlusPlus.api.objects.Logger; - -public class MissingMappingsEvent { - - @EventHandler - public void onMissingMapping(FMLMissingMappingsEvent event) { - for (MissingMapping mapping : event.get()) { - boolean bool1 = mapping.name.contains(GTPlusPlus.ID); - // Missing Blocks - if (mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.BLOCK && bool1) { - - // Example - // if(mapping.name.equals("PneumaticCraft:etchingAcid")) { - // mapping.remap(Fluids.etchingAcid.getBlock()); - // } - - } - - // Missing Items - if (mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.ITEM && bool1) { - if (mapping.name.contains("miscutils:itemDustTiny")) { - ItemStack stack = null; - String missingItemString = StringUtils.remove(mapping.name, "miscutils:itemDustTiny"); - missingItemString = StringUtils.prependIfMissing(missingItemString, "item.itemDust"); - if (mCachedPileLinkages.containsKey(missingItemString)) { - // stack = ItemUtils.getSimpleStack(Item.itemRegistry.) - Logger.REFLECTION("Mapping Event Found Missing Item in the Pile Linkage Cache."); - } - - // mapping.remap(stack.getItem()); - } - } - } - } -} diff --git a/src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java deleted file mode 100644 index 05dc46b2b2..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import net.minecraftforge.event.entity.player.PlayerInteractEvent; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -public class PickaxeBlockBreakEventHandler { - - @SubscribeEvent - public void onPlayerInteraction(final PlayerInteractEvent aEvent) { - if ((aEvent.entityPlayer != null) && (aEvent.entityPlayer.worldObj != null) - && (aEvent.action != null) - && (aEvent.world.provider != null) - && !aEvent.entityPlayer.worldObj.isRemote - && (aEvent.action != null) - && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)) { - // Utils.LOG_ERROR("Test"); - } - } -} diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index ef18d4dd5b..ee462146fa 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -109,7 +109,6 @@ public final class ModItems { public static Item itemPersonalCloakingDevice; public static Item itemPersonalHealingDevice; public static Item itemSupremePizzaGloves; - public static Item itemSlowBuildingRing; public static ItemBlueprint itemBlueprintBase; diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java b/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java deleted file mode 100644 index d609ceea33..0000000000 --- a/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java +++ /dev/null @@ -1,97 +0,0 @@ -package gtPlusPlus.core.item.general; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import baubles.api.BaubleType; -import baubles.api.IBauble; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Mods; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -@Optional.InterfaceList( - value = { @Optional.Interface(iface = "baubles.api.IBauble", modid = Mods.Names.BAUBLES), - @Optional.Interface(iface = "baubles.api.BaubleType", modid = Mods.Names.BAUBLES) }) -public class ItemSlowBuildingRing extends Item implements IBauble { - - public ItemSlowBuildingRing() { - this.setCreativeTab(AddToCreativeTab.tabMachines); - String unlocalizedName = "SlowBuildingRing"; - this.setUnlocalizedName(unlocalizedName); - this.setMaxStackSize(1); - this.setTextureName(GTPlusPlus.ID + ":" + "itemSlowBuildersRing"); - ItemUtils.getSimpleStack(this); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, - final boolean p_77663_5_) { - if (worldObj.isRemote) { - return; - } - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) { - return false; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(""); - list.add(StatCollector.translateToLocal("item.SlowBuildingRing.tooltip.0")); - list.add(StatCollector.translateToLocal("item.SlowBuildingRing.tooltip.1")); - list.add(StatCollector.translateToLocal("item.SlowBuildingRing.tooltip.2")); - list.add(""); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public BaubleType getBaubleType(final ItemStack arg0) { - return BaubleType.RING; - } - - @Override - public void onWornTick(ItemStack itemstack, EntityLivingBase entity) { - if(entity instanceof EntityPlayer player) { - - // Continuously set the sprinting flag to false to ensure the player doesn't sprint - player.setSprinting(false); - } - } - - @Override - public void onEquipped(ItemStack itemstack, EntityLivingBase player) { - - } - - @Override - public void onUnequipped(ItemStack itemstack, EntityLivingBase player) { - - } - -} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java index 5e7c96a0c3..e50d839d11 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java @@ -1,20 +1,5 @@ package gtPlusPlus.core.util.minecraft; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; - import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.Materials; import gregtech.api.objects.ItemData; @@ -29,19 +14,32 @@ import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.minecraft.ShapedRecipe; import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler; import gtPlusPlus.core.handler.Recipes.RegistrationHandler; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.data.ArrayUtils; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapelessRecipes; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; public class RecipeUtils { public static int mInvalidID = 1; - public static boolean recipeBuilder(final Object slot_1, final Object slot_2, final Object slot_3, - final Object slot_4, final Object slot_5, final Object slot_6, final Object slot_7, final Object slot_8, - final Object slot_9, ItemStack resultItem) { + public static void recipeBuilder(final Object slot_1, final Object slot_2, final Object slot_3, + final Object slot_4, final Object slot_5, final Object slot_6, final Object slot_7, final Object slot_8, + final Object slot_9, ItemStack resultItem) { // Old Debug Code, useful for finding recipes loading too early. /* @@ -74,7 +72,7 @@ public static boolean recipeBuilder(final Object slot_1, final Object slot_2, fi ? resultItem.getDisplayName() : "Bad Output Item" + " | Please report this issue on Github."); RegistrationHandler.recipesFailed++; - return false; + return; } Object[] o = new Object[] { slot_1, slot_2, slot_3, slot_4, slot_5, slot_6, slot_7, slot_8, slot_9 }; @@ -86,12 +84,8 @@ public static boolean recipeBuilder(final Object slot_1, final Object slot_2, fi if (COMPAT_HANDLER.mRecipesToGenerate.size() > size) { if (!COMPAT_HANDLER.areInitItemsLoaded) { RegistrationHandler.recipesSuccess++; - } else { - LateRegistrationHandler.recipesSuccess++; } - return true; } - return false; } catch (RuntimeException k) { // k.getMessage(); // k.getClass(); @@ -102,10 +96,7 @@ public static boolean recipeBuilder(final Object slot_1, final Object slot_2, fi : "INVALID OUTPUT ITEM"); if (!COMPAT_HANDLER.areInitItemsLoaded) { RegistrationHandler.recipesFailed++; - } else { - LateRegistrationHandler.recipesFailed++; } - return false; } } @@ -326,7 +317,6 @@ private static boolean attemptRecipeRemoval(final Item I) { if ((is != null) && (is.getItem() == I)) { items.remove(); Logger.RECIPE("Remove a recipe with " + I.getUnlocalizedName() + " as output."); - continue; } } Logger.RECIPE("All recipes should be gone?"); @@ -409,8 +399,6 @@ public static boolean addShapedGregtechRecipe(final Object InputItem1, final Obj if (COMPAT_HANDLER.mGtRecipesToGenerate.size() > size) { if (!COMPAT_HANDLER.areInitItemsLoaded) { RegistrationHandler.recipesSuccess++; - } else { - LateRegistrationHandler.recipesSuccess++; } return true; } @@ -455,8 +443,6 @@ public static boolean addShapedGregtechRecipe(final Object[] inputs, ItemStack o if (COMPAT_HANDLER.mGtRecipesToGenerate.size() > size) { if (!COMPAT_HANDLER.areInitItemsLoaded) { RegistrationHandler.recipesSuccess++; - } else { - LateRegistrationHandler.recipesSuccess++; } return true; } @@ -784,8 +770,6 @@ private static boolean addShapedRecipe(Object[] Inputs, ItemStack aOutputStack) if (COMPAT_HANDLER.mRecipesToGenerate.size() > size) { if (!COMPAT_HANDLER.areInitItemsLoaded) { RegistrationHandler.recipesSuccess++; - } else { - LateRegistrationHandler.recipesSuccess++; } return true; } From 57835037e1d8159644576b8fda69b25aabe56fad Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 17 Oct 2023 01:39:26 +0100 Subject: [PATCH 4/8] Remove unused final from methods --- src/main/java/gtPlusPlus/GTplusplus.java | 2 +- .../java/gtPlusPlus/GenerateDictionaries.java | 2 +- .../java/gtPlusPlus/api/objects/Logger.java | 2 +- .../gtPlusPlus/api/objects/data/AutoMap.java | 2 +- .../api/objects/minecraft/SafeTexture.java | 2 +- .../core/block/base/BlockBaseFluid.java | 2 +- .../core/common/compat/COMPAT_ExtraUtils.java | 2 +- .../common/compat/COMPAT_HarvestCraft.java | 2 +- .../core/common/compat/COMPAT_Thaumcraft.java | 2 +- .../core/common/compat/COMPAT_Witchery.java | 2 +- .../core/handler/PacketHandler.java | 20 +++++------ .../workbench/Workbench_CraftingHandler.java | 2 +- .../core/item/base/BaseItemDamageable.java | 4 +-- .../core/item/chemistry/GenericChem.java | 8 ++--- .../core/item/chemistry/IonParticles.java | 4 +-- .../core/item/food/BaseItemMetaFood.java | 2 +- .../core/item/general/ItemAirFilter.java | 4 +-- .../general/ItemBasicScrubberTurbine.java | 4 +-- .../core/item/general/ItemHealingDevice.java | 4 +-- .../core/item/general/ItemLavaFilter.java | 4 +-- .../item/tool/staballoy/StaballoySpade.java | 12 +++---- src/main/java/gtPlusPlus/core/lib/CORE.java | 4 +-- .../gtPlusPlus/core/material/Material.java | 2 +- .../recipe/RECIPES_MachineComponents.java | 2 +- .../core/recipe/RECIPES_Machines.java | 2 +- .../gtPlusPlus/core/recipe/common/CI.java | 4 +-- src/main/java/gtPlusPlus/core/util/Utils.java | 4 +-- .../java/gtPlusPlus/core/util/data/AES.java | 6 ++-- .../gtPlusPlus/core/util/math/MathUtils.java | 4 +-- .../core/util/minecraft/FluidUtils.java | 36 +++++++++---------- .../core/util/minecraft/PlayerUtils.java | 4 +-- .../core/util/player/PlayerCache.java | 2 +- .../plugin/agrichem/AlgaeDefinition.java | 2 +- .../plugin/agrichem/BioRecipes.java | 12 +++---- .../java/gtPlusPlus/preloader/DevHelper.java | 4 +-- .../preloader/Preloader_Logger.java | 2 +- .../ClassTransformer_TT_ThaumicRestorer.java | 10 +++--- .../xmod/bartcrops/LoaderOfTheCrops.java | 6 ++-- .../covers/GTPP_Cover_ToggleVisual.java | 4 +-- .../helpers/autocrafter/AC_Helper_Utils.java | 6 ++-- .../helpers/tesseract/TesseractHelper.java | 28 +++++++-------- .../common/items/MetaCustomCoverItem.java | 8 ++--- .../common/render/GTPP_CapeRenderer.java | 18 +++++----- .../GT_MetaTileEntity_CropHarvestor.java | 2 +- .../GregtechMetaTileEntity_IsaMill.java | 2 +- .../gregtech/GregtechBufferDynamos.java | 2 +- .../gtPlusPlus/xmod/ob/GliderHandler.java | 4 +-- .../thaumcraft/aspect/GTPP_AspectCompat.java | 2 +- .../xmod/thaumcraft/util/ThaumcraftUtils.java | 2 +- .../xmod/tinkers/HANDLER_Tinkers.java | 2 +- .../xmod/tinkers/util/TinkersUtils.java | 4 +-- 51 files changed, 139 insertions(+), 139 deletions(-) diff --git a/src/main/java/gtPlusPlus/GTplusplus.java b/src/main/java/gtPlusPlus/GTplusplus.java index a0e4b3c23c..0dc6f9b72a 100644 --- a/src/main/java/gtPlusPlus/GTplusplus.java +++ b/src/main/java/gtPlusPlus/GTplusplus.java @@ -309,7 +309,7 @@ protected void dumpGtRecipeMap(final GT_Recipe_Map r) { } } - private static final boolean setupMaterialBlacklist() { + private static boolean setupMaterialBlacklist() { Material.invalidMaterials.put(Materials._NULL); Material.invalidMaterials.put(Materials.Clay); Material.invalidMaterials.put(Materials.Phosphorus); diff --git a/src/main/java/gtPlusPlus/GenerateDictionaries.java b/src/main/java/gtPlusPlus/GenerateDictionaries.java index 0ac2a3241d..492b68c1a4 100644 --- a/src/main/java/gtPlusPlus/GenerateDictionaries.java +++ b/src/main/java/gtPlusPlus/GenerateDictionaries.java @@ -99,7 +99,7 @@ private static final class Utils { private static final Charset utf8 = StandardCharsets.UTF_8; private static final Random rand = new XSTR(); - private static final void log(String s) { + private static void log(String s) { System.out.println("[GTPP-Proguard] " + s); } diff --git a/src/main/java/gtPlusPlus/api/objects/Logger.java b/src/main/java/gtPlusPlus/api/objects/Logger.java index 9b6591abd2..a8b53fbdc6 100644 --- a/src/main/java/gtPlusPlus/api/objects/Logger.java +++ b/src/main/java/gtPlusPlus/api/objects/Logger.java @@ -23,7 +23,7 @@ public static org.apache.logging.log4j.Logger makeLogger() { private static final boolean enabled = !AsmConfig.disableAllLogging; - public static final org.apache.logging.log4j.Logger getLogger() { + public static org.apache.logging.log4j.Logger getLogger() { return modLogger; } diff --git a/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java b/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java index f4b2550b5a..e2d30928f8 100644 --- a/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java +++ b/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java @@ -10,7 +10,7 @@ import java.util.Queue; import java.util.Set; -public class AutoMap implements Iterable, Cloneable, Serializable, Collection, Queue, List { +public class AutoMap implements Iterable, Serializable, Collection, Queue, List { /** * The Internal Map diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java b/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java index 84f5fe5fba..e3dcff5cc4 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java @@ -29,7 +29,7 @@ public class SafeTexture implements Runnable { private final String mTextureName; - private static final String getKey(String aTexPath) { + private static String getKey(String aTexPath) { String aNameKey = Utils.sanitizeString(aTexPath); aNameKey = aNameKey.replace('/', ' '); aNameKey = aNameKey.toLowerCase(); diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java index e992d01d60..e5c1fbf804 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java @@ -45,7 +45,7 @@ public BlockBaseFluid(String materialName, Fluid fluid, Material material) { public BlockFluidClassic setParticleColor(int arg0) { return this - .setParticleColor((arg0 >> 16 & 255) / 255.0F, (arg0 >> 8 & 255) / 255.0F, (arg0 >> 0 & 255) / 255.0F); + .setParticleColor((arg0 >> 16 & 255) / 255.0F, (arg0 >> 8 & 255) / 255.0F, (arg0 & 255) / 255.0F); } public BlockFluidClassic setParticleColor(float arg0, float arg1, float arg2) { diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java index e17bccb60a..907e6a0c42 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java @@ -14,7 +14,7 @@ public static void OreDict() { run(); } - private static final void run() { + private static void run() { ItemUtils.getItemForOreDict("ExtraUtilities:bedrockiumIngot", "ingotBedrockium", "Bedrockium Ingot", 0); // GT_OreDictUnificator.registerOre("plateBedrockium", new ItemStack(ModItems.itemPlateBedrockium)); diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java index f3c83785c4..9a9557e418 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java @@ -8,7 +8,7 @@ public static void OreDict() { run(); } - private static final void run() { + private static void run() { FishTrapHandler.pamsHarvestCraftCompat(); } } diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java index fd760af771..768414b9f0 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java @@ -15,7 +15,7 @@ public static void OreDict() { } } - private static final void run() { + private static void run() { for (int i = 0; i <= 6; i++) { ItemUtils.getItemForOreDict("Thaumcraft:ItemShard", "shardAny", "TC Shard " + i, i); diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java index f746042c2d..726aa897df 100644 --- a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java @@ -13,7 +13,7 @@ public static void OreDict() { run(); } - private static final void run() { + private static void run() { // Koboldite ItemStack aKobolditeDust = ItemUtils .getItemStackWithMeta(Witchery.isModLoaded(), "witchery:ingredient", "Koboldite Dust", 148, 1); diff --git a/src/main/java/gtPlusPlus/core/handler/PacketHandler.java b/src/main/java/gtPlusPlus/core/handler/PacketHandler.java index 8e04b5b68f..0ab1cba068 100644 --- a/src/main/java/gtPlusPlus/core/handler/PacketHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/PacketHandler.java @@ -22,7 +22,7 @@ public class PacketHandler { private static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(GTPlusPlus.ID); - public static final void init() { + public static void init() { registerMessage(Packet_VolumetricFlaskGui.class, Packet_VolumetricFlaskGui.class); registerMessage(Packet_VolumetricFlaskGui2.class, Packet_VolumetricFlaskGui2.class); } @@ -30,12 +30,12 @@ public static final void init() { /** * Registers a message and message handler */ - private static final void registerMessage(Class handlerClass, Class messageClass) { + private static void registerMessage(Class handlerClass, Class messageClass) { Side side = AbstractClientMessageHandler.class.isAssignableFrom(handlerClass) ? Side.CLIENT : Side.SERVER; registerMessage(handlerClass, messageClass, side); } - private static final void registerMessage(Class handlerClass, Class messageClass, Side side) { + private static void registerMessage(Class handlerClass, Class messageClass, Side side) { INSTANCE.registerMessage(handlerClass, messageClass, packetId++, side); if (AbstractPacket.class.isInstance(messageClass.getClass())) { AbstractPacket aPacket = ReflectionUtils.createNewInstanceFromConstructor( @@ -50,7 +50,7 @@ private static final void registerMessage(Class handlerClass, Class messageClass /** * Send this message to the specified player. See {@link SimpleNetworkWrapper#sendTo(IMessage, EntityPlayerMP)} */ - public static final void sendTo(IMessage message, EntityPlayerMP player) { + public static void sendTo(IMessage message, EntityPlayerMP player) { INSTANCE.sendTo(message, player); } @@ -58,22 +58,22 @@ public static final void sendTo(IMessage message, EntityPlayerMP player) { * Send this message to everyone within a certain range of a point. See * {@link SimpleNetworkWrapper#sendToDimension(IMessage, NetworkRegistry.TargetPoint)} */ - public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { + public static void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { INSTANCE.sendToAllAround(message, point); } /** * Sends a message to everyone within a certain range of the coordinates in the same dimension. */ - public static final void sendToAllAround(IMessage message, int dimension, double x, double y, double z, - double range) { + public static void sendToAllAround(IMessage message, int dimension, double x, double y, double z, + double range) { sendToAllAround(message, new NetworkRegistry.TargetPoint(dimension, x, y, z, range)); } /** * Sends a message to everyone within a certain range of the player provided. */ - public static final void sendToAllAround(IMessage message, EntityPlayer player, double range) { + public static void sendToAllAround(IMessage message, EntityPlayer player, double range) { sendToAllAround(message, player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, range); } @@ -81,14 +81,14 @@ public static final void sendToAllAround(IMessage message, EntityPlayer player, * Send this message to everyone within the supplied dimension. See * {@link SimpleNetworkWrapper#sendToDimension(IMessage, int)} */ - public static final void sendToDimension(IMessage message, int dimensionId) { + public static void sendToDimension(IMessage message, int dimensionId) { INSTANCE.sendToDimension(message, dimensionId); } /** * Send this message to the server. See {@link SimpleNetworkWrapper#sendToServer(IMessage)} */ - public static final void sendToServer(IMessage message) { + public static void sendToServer(IMessage message) { INSTANCE.sendToServer(message); } } diff --git a/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java index e9e2609e1e..2ec47a5cc7 100644 --- a/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java @@ -20,7 +20,7 @@ public class Workbench_CraftingHandler { private static final Workbench_CraftingHandler instance = new Workbench_CraftingHandler(); private final List recipes = new ArrayList(); - public static final Workbench_CraftingHandler getInstance() { + public static Workbench_CraftingHandler getInstance() { return instance; } diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java index 8fbc005ce8..8e49a19930 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java @@ -101,7 +101,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final long getItemDamage(final ItemStack aStack) { + public static long getItemDamage(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("Damage"); @@ -114,7 +114,7 @@ public static final long getItemDamage(final ItemStack aStack) { return 0L; } - public static final boolean setItemDamage(final ItemStack aStack, final long aDamage) { + public static boolean setItemDamage(final ItemStack aStack, final long aDamage) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("Damage"); diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java index f37cb14ec5..0a9e69d771 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java @@ -805,19 +805,19 @@ private void recipeHydrogenPeroxide() { } - private static final ItemStack getTierOneChip() { + private static ItemStack getTierOneChip() { return CI.getNumberedAdvancedCircuit(4); } - private static final ItemStack getTierTwoChip() { + private static ItemStack getTierTwoChip() { return CI.getNumberedAdvancedCircuit(8); } - private static final ItemStack getTierThreeChip() { + private static ItemStack getTierThreeChip() { return CI.getNumberedAdvancedCircuit(12); } - private static final ItemStack getTierFourChip() { + private static ItemStack getTierFourChip() { return CI.getNumberedAdvancedCircuit(16); } diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java b/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java index db495f3955..05fe817dea 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java @@ -72,7 +72,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final long getChargeState(final ItemStack aStack) { + public static long getChargeState(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("Ion"); @@ -85,7 +85,7 @@ public static final long getChargeState(final ItemStack aStack) { return 0L; } - public static final boolean setChargeState(final ItemStack aStack, final long aCharge) { + public static boolean setChargeState(final ItemStack aStack, final long aCharge) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("Ion"); diff --git a/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java b/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java index 0b1c8eeadd..ec8064ab19 100644 --- a/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java +++ b/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java @@ -221,7 +221,7 @@ public BaseItemMetaFood() { BaseItemMetaFood.registerMetaFoods(); } - private static final int getMetaKey(ItemStack aStack) { + private static int getMetaKey(ItemStack aStack) { return aStack.getItemDamage(); } diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java b/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java index 7989187a7e..8a9c370bc1 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java @@ -88,7 +88,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final long getFilterDamage(final ItemStack aStack) { + public static long getFilterDamage(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("AirFilter"); @@ -101,7 +101,7 @@ public static final long getFilterDamage(final ItemStack aStack) { return 0L; } - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + public static boolean setFilterDamage(final ItemStack aStack, final long aDamage) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("AirFilter"); diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java b/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java index ee1afdb6bf..acb3381237 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java @@ -85,7 +85,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final long getFilterDamage(final ItemStack aStack) { + public static long getFilterDamage(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("BasicTurbine"); @@ -98,7 +98,7 @@ public static final long getFilterDamage(final ItemStack aStack) { return 0L; } - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + public static boolean setFilterDamage(final ItemStack aStack, final long aDamage) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("BasicTurbine"); diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java b/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java index 9467730cce..d5b5431927 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java @@ -347,7 +347,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final boolean getShowMessages(final ItemStack aStack) { + public static boolean getShowMessages(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT == null) { if (!createNBT(aStack)) { @@ -359,7 +359,7 @@ public static final boolean getShowMessages(final ItemStack aStack) { return aNBT.getBoolean("ShowMSG"); } - public static final boolean setShowMessages(final ItemStack aStack, final boolean aShow) { + public static boolean setShowMessages(final ItemStack aStack, final boolean aShow) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT == null) { if (!createNBT(aStack)) { diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java b/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java index e760039d68..55b05cf4ea 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java @@ -59,7 +59,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final long getFilterDamage(final ItemStack aStack) { + public static long getFilterDamage(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("LavaFilter"); @@ -72,7 +72,7 @@ public static final long getFilterDamage(final ItemStack aStack) { return 0L; } - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + public static boolean setFilterDamage(final ItemStack aStack, final long aDamage) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("LavaFilter"); diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java index c9a4def88c..44cf3046d7 100644 --- a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java @@ -59,7 +59,7 @@ private static boolean createNBT(ItemStack rStack) { * Is the player facing horizontally? */ - public static final boolean isFacingHorizontal(final ItemStack aStack) { + public static boolean isFacingHorizontal(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("PickStats"); @@ -72,7 +72,7 @@ public static final boolean isFacingHorizontal(final ItemStack aStack) { return true; } - public static final boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) { + public static boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("PickStats"); @@ -88,7 +88,7 @@ public static final boolean setFacingHorizontal(final ItemStack aStack, final bo * Handles the Direction the player is facing */ - public static final String getFacingDirection(final ItemStack aStack) { + public static String getFacingDirection(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("PickStats"); @@ -101,7 +101,7 @@ public static final String getFacingDirection(final ItemStack aStack) { return "north"; } - public static final boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) { + public static boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("PickStats"); @@ -117,7 +117,7 @@ public static final boolean setFacingDirection(final ItemStack aStack, final Str * The Looking Direction handlers */ - public static final String getLookingDirection(final ItemStack aStack) { + public static String getLookingDirection(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("PickStats"); @@ -130,7 +130,7 @@ public static final String getLookingDirection(final ItemStack aStack) { return ""; } - public static final boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) { + public static boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("PickStats"); diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java index acb2ab1a07..a0c0c535a9 100644 --- a/src/main/java/gtPlusPlus/core/lib/CORE.java +++ b/src/main/java/gtPlusPlus/core/lib/CORE.java @@ -269,11 +269,11 @@ public static class Everglades { public static final String VERSION = "GRADLETOKEN_VERSION"; } - public static final void crash() { + public static void crash() { crash("Generic Crash"); } - public static final void crash(String aReason) { + public static void crash(String aReason) { try { Logger.INFO("=========================================================="); Logger.INFO("[GT++ CRASH]"); diff --git a/src/main/java/gtPlusPlus/core/material/Material.java b/src/main/java/gtPlusPlus/core/material/Material.java index 8068d6ab35..5390ca28a3 100644 --- a/src/main/java/gtPlusPlus/core/material/Material.java +++ b/src/main/java/gtPlusPlus/core/material/Material.java @@ -1384,7 +1384,7 @@ public final boolean queueFluidGeneration() { return isFluidQueued = true; } - public static final void generateQueuedFluids() { + public static void generateQueuedFluids() { for (Material m : mMaterialMap) { if (m.isFluidQueued) {} } diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java index 29a09fc2b4..83156543a8 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java @@ -89,7 +89,7 @@ public class RECIPES_MachineComponents { public static String smallGearTier9 = "gearGtSmallOsmium"; public static String smallGearTier10 = "gearGtSmallNeutronium"; - public static final void loadRecipes() { + public static void loadRecipes() { Logger.INFO("Loading Recipes for the Various Circuits and Machine components."); onlyULVComponents(); } diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index bd75847153..d52a7ce786 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -219,7 +219,7 @@ public class RECIPES_Machines { // Misc public static ItemStack INPUT_RCCokeOvenBlock; - public static final void loadRecipes() { + public static void loadRecipes() { run(); Logger.INFO("Loading Recipes for the Various machine blocks."); } diff --git a/src/main/java/gtPlusPlus/core/recipe/common/CI.java b/src/main/java/gtPlusPlus/core/recipe/common/CI.java index 98c77865a3..c558d48d7a 100644 --- a/src/main/java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/main/java/gtPlusPlus/core/recipe/common/CI.java @@ -329,7 +329,7 @@ public static ItemStack getDataStick() { return ItemList.Tool_DataStick.get(1); } - public static final ItemStack getTieredMachineHull(int tier) { + public static ItemStack getTieredMachineHull(int tier) { if (tier == 0) { return machineHull_ULV; } else if (tier == 1) { @@ -355,7 +355,7 @@ public static final ItemStack getTieredMachineHull(int tier) { } } - public static final ItemStack getTieredMachineCasing(int tier) { + public static ItemStack getTieredMachineCasing(int tier) { if (tier == 0) { if (machineCasing_ULV == null) { machineCasing_ULV = ItemList.Casing_ULV.get(1); diff --git a/src/main/java/gtPlusPlus/core/util/Utils.java b/src/main/java/gtPlusPlus/core/util/Utils.java index 04c70beae6..962c20cb67 100644 --- a/src/main/java/gtPlusPlus/core/util/Utils.java +++ b/src/main/java/gtPlusPlus/core/util/Utils.java @@ -59,11 +59,11 @@ public class Utils { public static final int WILDCARD_VALUE = Short.MAX_VALUE; - public static final boolean isServer() { + public static boolean isServer() { return FMLCommonHandler.instance().getEffectiveSide().isServer(); } - public static final boolean isClient() { + public static boolean isClient() { return FMLCommonHandler.instance().getEffectiveSide().isClient(); } diff --git a/src/main/java/gtPlusPlus/core/util/data/AES.java b/src/main/java/gtPlusPlus/core/util/data/AES.java index 8f9580c760..ac1224974a 100644 --- a/src/main/java/gtPlusPlus/core/util/data/AES.java +++ b/src/main/java/gtPlusPlus/core/util/data/AES.java @@ -33,12 +33,12 @@ public AES(String aSecret) { secretKey = generateKey(key); } - private static final String getHashedString(String aString) { + private static String getHashedString(String aString) { return toHexString(getSHA(aString)); } - private static final byte[] getSHA(String input) { + private static byte[] getSHA(String input) { MessageDigest md; @@ -56,7 +56,7 @@ private static final byte[] getSHA(String input) { return new byte[] {}; } - private static final String toHexString(byte[] hash) { + private static String toHexString(byte[] hash) { BigInteger number = new BigInteger(1, hash); diff --git a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java index 5a04502ae8..29f7fddbb3 100644 --- a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java +++ b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java @@ -316,12 +316,12 @@ private static long gcd(final long[] input) { return result; } - public static final int getRgbAsHex(final short[] RGBA) { + public static int getRgbAsHex(final short[] RGBA) { final int returnValue = Utils.rgbtoHexValue(RGBA[0], RGBA[1], RGBA[2]); return (returnValue == 0) ? 0 : returnValue; } - public static final int returnLargestNumber(final int a, final int b) { + public static int returnLargestNumber(final int a, final int b) { if (a > b) { return a; } else if (a == b) { diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java index 1b06ea58e0..03da3c3b4d 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java @@ -507,8 +507,8 @@ public static ItemStack container(final ItemStack aStack, final boolean aCheckIF return amount(aStacksize, container(aStack, aCheckIFluidContainerItems)); } - public static final Fluid generateFluid(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, boolean aGenerateCell) { + public static Fluid generateFluid(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, boolean aGenerateCell) { FluidStack aFStack = (FluidUtils.getFluidStack("molten" + "." + unlocalizedName.toLowerCase(), 1)); if (aFStack == null) { Logger.WARNING("Generating our own fluid."); @@ -530,13 +530,13 @@ public static final Fluid generateFluid(final String unlocalizedName, final Stri } } - public static final Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell) { + public static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell) { return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, null, null, 0, aGenerateCell); } - public static final Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2) { + public static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2) { return generateFluidNonMolten( unlocalizedName, localizedName, @@ -548,9 +548,9 @@ public static final Fluid generateFluidNonMolten(final String unlocalizedName, f true); } - public static final Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2, - final boolean aGenerateCell) { + public static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2, + final boolean aGenerateCell) { return generateFluidNonMolten( unlocalizedName, localizedName, @@ -562,9 +562,9 @@ public static final Fluid generateFluidNonMolten(final String unlocalizedName, f aGenerateCell); } - public static final Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, ItemStack dustStack, final ItemStack dustStack2, - final int amountPerItem, final boolean aGenerateCell) { + public static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, ItemStack dustStack, final ItemStack dustStack2, + final int amountPerItem, final boolean aGenerateCell) { if (dustStack == null) { dustStack = ItemUtils .getItemStackOfAmountFromOreDictNoBroken("dust" + Utils.sanitizeString(localizedName), 1); @@ -602,13 +602,13 @@ public static final Fluid generateFluidNonMolten(final String unlocalizedName, f } } - public static final Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA) { + public static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA) { return generateFluidNoPrefix(unlocalizedName, localizedName, MeltingPoint, RGBA, true); } - public static final Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell) { + public static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell) { Fluid gtFluid; if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null) { Logger.WARNING("Generating our own fluid."); @@ -628,8 +628,8 @@ public static final Fluid generateFluidNoPrefix(final String unlocalizedName, fi return gtFluid; } - public static final Fluid generateGas(final String unlocalizedName, final String localizedName, - final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell) { + public static Fluid generateGas(final String unlocalizedName, final String localizedName, + final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell) { Fluid gtFluid; if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null) { Logger.WARNING("Generating our own gas."); diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java index 2be3f781a3..a3901f430c 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java @@ -178,7 +178,7 @@ public static Item getItemInPlayersHand(final EntityPlayer player) { return null; } - public static final EntityPlayer getPlayerEntityByName(final String aPlayerName) { + public static EntityPlayer getPlayerEntityByName(final String aPlayerName) { final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName); if (player != null) { return player; @@ -186,7 +186,7 @@ public static final EntityPlayer getPlayerEntityByName(final String aPlayerName) return null; } - public static final UUID getPlayersUUIDByName(final String aPlayerName) { + public static UUID getPlayersUUIDByName(final String aPlayerName) { final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName); if (player != null) { return player.getUniqueID(); diff --git a/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java b/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java index f3452dcbe8..a754ee8546 100644 --- a/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java +++ b/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java @@ -22,7 +22,7 @@ public class PlayerCache { private static final File cache = new File("PlayerCache.dat"); - public static final void initCache() { + public static void initCache() { if (CORE.PlayerCache == null) { try { diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java index 4eb1b553c1..c7138dad86 100644 --- a/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java +++ b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java @@ -51,7 +51,7 @@ public static AlgaeDefinition getByIndex(int aIndex) { } } - private static final int getRGB(int r, int g, int b) { + private static int getRGB(int r, int g, int b) { return AlgaeUtils.rgbtoHexValue(r, g, b); } } diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java index f3125325ed..ab3528509c 100644 --- a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java +++ b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java @@ -96,23 +96,23 @@ public class BioRecipes { private static Fluid mButanol; private static Fluid mAcetone; - private static final ItemStack getGreenAlgaeRecipeChip() { + private static ItemStack getGreenAlgaeRecipeChip() { return getBioChip(4); } - private static final ItemStack getBrownAlgaeRecipeChip() { + private static ItemStack getBrownAlgaeRecipeChip() { return getBioChip(8); } - private static final ItemStack getGoldenBrownAlgaeRecipeChip() { + private static ItemStack getGoldenBrownAlgaeRecipeChip() { return getBioChip(12); } - private static final ItemStack getRedAlgaeRecipeChip() { + private static ItemStack getRedAlgaeRecipeChip() { return getBioChip(16); } - private static final ItemStack getBioChip(int aID) { + private static ItemStack getBioChip(int aID) { return ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, aID, 0); } @@ -126,7 +126,7 @@ public static void init() { Logger.INFO("[Bio] Finished with recipes"); } - private static final void initRecipeVars() { + private static void initRecipeVars() { mFert = AgriculturalChem.dustOrganicFertilizer; mDustDirt = AgriculturalChem.dustDirt; diff --git a/src/main/java/gtPlusPlus/preloader/DevHelper.java b/src/main/java/gtPlusPlus/preloader/DevHelper.java index bc240b1b5d..bf9bc37849 100644 --- a/src/main/java/gtPlusPlus/preloader/DevHelper.java +++ b/src/main/java/gtPlusPlus/preloader/DevHelper.java @@ -62,11 +62,11 @@ public static Method getForgeMethod(Class c, String s, Class... varags) { return null; } - private static final synchronized DevHelper getInstance() { + private static synchronized DevHelper getInstance() { return mInstance; } - public static final synchronized boolean isValidHelperObject() { + public static synchronized boolean isValidHelperObject() { return mIsValidHelper; } diff --git a/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java b/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java index 471476be60..7a316feccc 100644 --- a/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java +++ b/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java @@ -17,7 +17,7 @@ public static Logger makeLogger() { return gtPlusPlusLogger; } - public static final org.apache.logging.log4j.Logger getLogger() { + public static org.apache.logging.log4j.Logger getLogger() { return MODLOGGER; } diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java index 9f48313f8f..4b9cb4193e 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java @@ -82,23 +82,23 @@ public class ClassTransformer_TT_ThaumicRestorer { // thaumic.tinkerer.common.block.tile.TileRepairer - private static final boolean isTConstructTool(ItemStack aStack) { + private static boolean isTConstructTool(ItemStack aStack) { return ReflectionUtils.invoke(null, mIsTcTool, new Object[] { aStack }); } - private static final int getDamage(ItemStack aStack) { + private static int getDamage(ItemStack aStack) { return (int) ReflectionUtils.invokeNonBool(null, mGetTcDamage, new Object[] { aStack }); } - private static final boolean fixDamage(ItemStack aStack, int aAmount) { + private static boolean fixDamage(ItemStack aStack, int aAmount) { return ReflectionUtils.invoke(null, mFixTcDamage, new Object[] { aStack, aAmount }); } - private static final int drawEssentia(TileEntity aTile) { + private static int drawEssentia(TileEntity aTile) { return (int) ReflectionUtils.invokeNonBool(aTile, mDrawEssentia, new Object[] {}); } - private static final void sparkle(float a, float b, float c, int d) { + private static void sparkle(float a, float b, float c, int d) { ReflectionUtils.invokeVoid(ReflectionUtils.getFieldValue(mProxyTC), mSparkle, new Object[] { a, b, c, d }); } diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java index e1b1d53b45..a96bcfd519 100644 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java @@ -53,7 +53,7 @@ public static List cropLoader() { return p; } - private static final List cropObjs() { + private static List cropObjs() { List p = new ArrayList(); for (int i = 0; i < mCropList.size(); ++i) { @@ -63,7 +63,7 @@ private static final List cropObjs() { return p; } - private static final List setBaseSeed() { + private static List setBaseSeed() { List p = new ArrayList(); for (int i = 0; i < mCropList.size(); ++i) { @@ -73,7 +73,7 @@ private static final List setBaseSeed() { return p; } - private static final List setnames() { + private static List setnames() { List s = new ArrayList(); for (int i = 0; i < mCropList.size(); ++i) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java index 2366bbe87f..1c371002a7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java @@ -153,7 +153,7 @@ public static boolean getConnectionState(int aCoverVar) { return aCoverVar == VALUE_ON; } - private static final void trySetState(ForgeDirection side, int aState, ICoverable aTile) { + private static void trySetState(ForgeDirection side, int aState, ICoverable aTile) { // Try set cover state directly if (aTile instanceof IGregTechTileEntity gTileEntity) { gTileEntity.setCoverDataAtSide(side, new ISerializableObject.LegacyCoverData(aState)); @@ -171,7 +171,7 @@ public static boolean getConnectionState(String aKey) { return b != null ? b == VALUE_ON : false; } - public static final boolean getCoverConnections(final ItemStack aStack) { + public static boolean getCoverConnections(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("CustomCoverMeta"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java index a3c33f0290..a35b035087 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java @@ -15,7 +15,7 @@ public class AC_Helper_Utils { public static final Map sAutocrafterMap = new HashMap(); // Add Crafter - public static final int addCrafter(GT4Entity_AutoCrafter AC) { + public static int addCrafter(GT4Entity_AutoCrafter AC) { if (!sAutocrafterMap.containsValue(AC)) { int increase = sAutocrafterMap.size() + 1; sAutocrafterMap.put(increase, AC); @@ -27,7 +27,7 @@ public static final int addCrafter(GT4Entity_AutoCrafter AC) { return 0; } - public static final boolean removeCrafter(GT4Entity_AutoCrafter AC) { + public static boolean removeCrafter(GT4Entity_AutoCrafter AC) { if (!sAutocrafterMap.isEmpty()) { if (sAutocrafterMap.containsValue(AC)) { sAutocrafterMap.remove(getIDByCrafter(AC)); @@ -37,7 +37,7 @@ public static final boolean removeCrafter(GT4Entity_AutoCrafter AC) { return false; } - public static final int getIDByCrafter(GT4Entity_AutoCrafter AC) { + public static int getIDByCrafter(GT4Entity_AutoCrafter AC) { if (!sAutocrafterMap.isEmpty()) { Set> players = sAutocrafterMap.entrySet(); Iterator> i = players.iterator(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java index 93442675ca..bc5d5755ef 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java @@ -26,8 +26,8 @@ public class TesseractHelper { */ // Checks if a Generator is owned by a player. - public static final boolean isGeneratorOwnedByPlayer(EntityPlayer player, - GT_MetaTileEntity_TesseractGenerator generator) { + public static boolean isGeneratorOwnedByPlayer(EntityPlayer player, + GT_MetaTileEntity_TesseractGenerator generator) { if (player == null) { Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]"); return false; @@ -53,8 +53,8 @@ public static final boolean isGeneratorOwnedByPlayer(EntityPlayer player, } // Saves A Generator to the Players UUID map along with the Freq. - public static final boolean setGeneratorOwnershipByPlayer(EntityPlayer player, int freq, - GT_MetaTileEntity_TesseractGenerator generator) { + public static boolean setGeneratorOwnershipByPlayer(EntityPlayer player, int freq, + GT_MetaTileEntity_TesseractGenerator generator) { if (player == null) { return false; } @@ -86,7 +86,7 @@ public static final boolean setGeneratorOwnershipByPlayer(EntityPlayer player, i } // Gets Generator based on Frequency. - public static final GT_MetaTileEntity_TesseractGenerator getGeneratorByFrequency(EntityPlayer player, int freq) { + public static GT_MetaTileEntity_TesseractGenerator getGeneratorByFrequency(EntityPlayer player, int freq) { if (player == null) { return null; } @@ -112,7 +112,7 @@ public static final GT_MetaTileEntity_TesseractGenerator getGeneratorByFrequency } // Remove Tesseract Generator - public static final boolean removeGenerator(EntityPlayer player, int frequency) { + public static boolean removeGenerator(EntityPlayer player, int frequency) { if (player == null) { return false; } @@ -133,8 +133,8 @@ public static final boolean removeGenerator(EntityPlayer player, int frequency) */ // Checks if a Terminal is owned by a player. - public static final boolean isTerminalOwnedByPlayer(EntityPlayer player, - GT_MetaTileEntity_TesseractTerminal generator) { + public static boolean isTerminalOwnedByPlayer(EntityPlayer player, + GT_MetaTileEntity_TesseractTerminal generator) { if (player == null) { return false; } @@ -154,8 +154,8 @@ public static final boolean isTerminalOwnedByPlayer(EntityPlayer player, } // Saves A Terminal to the Players UUID map along with the Freq. - public static final boolean setTerminalOwnershipByPlayer(EntityPlayer player, int freq, - GT_MetaTileEntity_TesseractTerminal generator) { + public static boolean setTerminalOwnershipByPlayer(EntityPlayer player, int freq, + GT_MetaTileEntity_TesseractTerminal generator) { if (player == null) { return false; } @@ -186,7 +186,7 @@ public static final boolean setTerminalOwnershipByPlayer(EntityPlayer player, in } // Gets Terminal based on Frequency. - public static final GT_MetaTileEntity_TesseractTerminal getTerminalByFrequency(EntityPlayer player, int freq) { + public static GT_MetaTileEntity_TesseractTerminal getTerminalByFrequency(EntityPlayer player, int freq) { if (player == null) { return null; } @@ -209,7 +209,7 @@ public static final GT_MetaTileEntity_TesseractTerminal getTerminalByFrequency(E } // Remove Tesseract Terminal - public static final boolean removeTerminal(EntityPlayer player, int frequency) { + public static boolean removeTerminal(EntityPlayer player, int frequency) { if (player == null) { return false; } @@ -226,7 +226,7 @@ public static final boolean removeTerminal(EntityPlayer player, int frequency) { * Internal Methods * */ - private static final Map getGeneratorOwnershipByPlayer( + private static Map getGeneratorOwnershipByPlayer( EntityPlayer player) { UUID playerIdentifier = player.getUniqueID(); if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { @@ -243,7 +243,7 @@ private static final Map getGener return null; } - private static final Map getTerminalOwnershipByPlayer( + private static Map getTerminalOwnershipByPlayer( EntityPlayer player) { UUID playerIdentifier = player.getUniqueID(); if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java index 1a0a92b2ef..7037ace2c4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java @@ -112,7 +112,7 @@ private static boolean createNBT(ItemStack rStack) { return true; } - public static final long getCoverDamage(final ItemStack aStack) { + public static long getCoverDamage(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("CustomCoverMeta"); @@ -125,7 +125,7 @@ public static final long getCoverDamage(final ItemStack aStack) { return 0L; } - public static final boolean setCoverDamage(final ItemStack aStack, final long aDamage) { + public static boolean setCoverDamage(final ItemStack aStack, final long aDamage) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("CustomCoverMeta"); @@ -137,7 +137,7 @@ public static final boolean setCoverDamage(final ItemStack aStack, final long aD return false; } - public static final boolean getCoverConnections(final ItemStack aStack) { + public static boolean getCoverConnections(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("CustomCoverMeta"); @@ -150,7 +150,7 @@ public static final boolean getCoverConnections(final ItemStack aStack) { return false; } - public static final boolean setCoverConnections(final ItemStack aStack, final boolean aConnections) { + public static boolean setCoverConnections(final ItemStack aStack, final boolean aConnections) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("CustomCoverMeta"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index ae3a40cff9..74d704ea0a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -241,7 +241,7 @@ private static class CapeUtils { private static final AutoMap> mPatreonCapes = new AutoMap>(); private static final AutoMap> mDevCapes = new AutoMap>(); - private static final boolean init() { + private static boolean init() { CapeUtils.handleOldCapeCache(); if (CORE.DEVENV) { return true; @@ -267,7 +267,7 @@ private static boolean shouldDownloadCapeList() { return false; } - private static final boolean isCapeCacheWeekOld() { + private static boolean isCapeCacheWeekOld() { if (!doesCapeCacheExistLocally()) { return true; } else { @@ -281,7 +281,7 @@ private static final boolean isCapeCacheWeekOld() { return false; } - private static final void downloadCapeList() { + private static void downloadCapeList() { try { File dat = getCapeCache(); File temp = allocateTempFile(); @@ -297,7 +297,7 @@ private static final void downloadCapeList() { } } - private static final boolean isDownloadedCapeListBigger(File aFile) { + private static boolean isDownloadedCapeListBigger(File aFile) { double aExistingFileSize = (doesCapeCacheExistLocally() ? getCapeCache().length() : 0); double aNewFileSize = aFile.length(); if (aNewFileSize > aExistingFileSize) { @@ -313,7 +313,7 @@ private static void handleOldCapeCache() { } } - private static final boolean doesCapeCacheExistLocally() { + private static boolean doesCapeCacheExistLocally() { File aCacheFile = FileUtils.getFile("CapeCache", "dat"); if (FileUtils.doesFileExist(aCacheFile)) { return true; @@ -321,7 +321,7 @@ private static final boolean doesCapeCacheExistLocally() { return false; } - private static final File getCapeCache() { + private static File getCapeCache() { File aCacheFile = FileUtils.getFile("CapeCache", "dat"); if (FileUtils.doesFileExist(aCacheFile)) { FileUtils.createFile(aCacheFile); @@ -329,7 +329,7 @@ private static final File getCapeCache() { return aCacheFile; } - public static final List getDataFromCache() { + public static List getDataFromCache() { File aCacheFile = getCapeCache(); List aCache = FileUtils.readLines(aCacheFile); if (aCache != null && !aCache.isEmpty()) { @@ -338,7 +338,7 @@ public static final List getDataFromCache() { return new AutoMap(); } - private static final File allocateTempFile() { + private static File allocateTempFile() { File tempFile = null; try { tempFile = File.createTempFile("gtpp-", null); @@ -353,7 +353,7 @@ private static final File allocateTempFile() { return tempFile; } - public static final void writeCacheToMaps() { + public static void writeCacheToMaps() { List aCacheData = getDataFromCache(); if (aCacheData != null && !aCacheData.isEmpty()) { if (sAES == null) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java index 1d8d3a42d3..3871d14ed9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java @@ -151,7 +151,7 @@ public int getSizeInventory() { return 21; } - private static final int getRange(int aTier) { + private static int getRange(int aTier) { switch (aTier) { case 1: return 1; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java index aef24e2f69..e674738024 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java @@ -278,7 +278,7 @@ private int getPlayerDamageValue(EntityPlayer player, int damage) { return Math.max(reducedDamage, 0); } - private static final AutoMap getEntities(AutoMap aPositionsToCheck, World aWorld) { + private static AutoMap getEntities(AutoMap aPositionsToCheck, World aWorld) { AutoMap aEntities = new AutoMap(); HashSet aChunksToCheck = new HashSet(); if (!aPositionsToCheck.isEmpty()) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java index 7fd68be584..67d70e45e4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java @@ -18,7 +18,7 @@ public static void run() { run2(); } - private static final void run2() { + private static void run2() { GregtechItemList.Hatch_Buffer_Dynamo_ULV.set( new GT_MetaTileEntity_Hatch_DynamoBuffer( mID++, diff --git a/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java b/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java index 45ccca163b..37908f850c 100644 --- a/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java +++ b/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java @@ -66,7 +66,7 @@ public void onItemUsageEx(final PlayerInteractEvent event) { } } - private static final boolean canPlayerGlideInThisDimension(EntityPlayer aPlayer) { + private static boolean canPlayerGlideInThisDimension(EntityPlayer aPlayer) { World aWorld = aPlayer.worldObj; if (aWorld == null) { return false; @@ -85,7 +85,7 @@ private static final boolean canPlayerGlideInThisDimension(EntityPlayer aPlayer) return true; } - static final void populateBlacklist() { + static void populateBlacklist() { if (!mDimensionalBlacklist.isEmpty()) { return; } diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java index feda254313..dab1408898 100644 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java @@ -124,7 +124,7 @@ private TC_Aspect_Wrapper get(TC_Aspects aGtObjects) { } } - public static final synchronized TC_AspectList_Wrapper getTC_AspectList_Wrapper( + public static synchronized TC_AspectList_Wrapper getTC_AspectList_Wrapper( final List aAspects) { TC_AspectList_Wrapper o = null; try { diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java index 78da4ff31f..7ab0c977e2 100644 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java @@ -439,7 +439,7 @@ public static void completeResearchNote(World aWorld, ItemStack aStack) { } } - public static final synchronized TC_AspectList_Wrapper getAspectList_Ex(final List aAspects) { + public static synchronized TC_AspectList_Wrapper getAspectList_Ex(final List aAspects) { final TC_AspectList_Wrapper rAspects = new TC_AspectList_Wrapper(); for (final GTPP_AspectStack tAspect : aAspects) { rAspects.add(tAspect.mAspect, tAspect.mAmount); diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java b/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java index b148e283ac..a386a8b3f2 100644 --- a/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java +++ b/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java @@ -14,7 +14,7 @@ public class HANDLER_Tinkers { public static AutoMap mTinkerMaterials = new AutoMap(); - public static final void postInit() { + public static void postInit() { if (TinkerConstruct.isModLoaded()) { Fluid pyrotheumFluid = FluidRegistry.getFluid("pyrotheum"); diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java index 6024e5192d..4859b4ab4d 100644 --- a/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java +++ b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java @@ -91,7 +91,7 @@ private static void setTiConDataInstance() { } } - public static final boolean isTiConFirstInOD() { + public static boolean isTiConFirstInOD() { if (TinkerConstruct.isModLoaded()) { try { return (boolean) ReflectionUtils.getField(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst") @@ -101,7 +101,7 @@ public static final boolean isTiConFirstInOD() { return false; } - public static final boolean stopTiconLoadingFirst() { + public static boolean stopTiconLoadingFirst() { if (isTiConFirstInOD()) { try { ReflectionUtils.setFinalFieldValue(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst", false); From 1adde875aa265587995e98ba65dedaa69786c09d Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 17 Oct 2023 01:40:09 +0100 Subject: [PATCH 5/8] Change variables to final where applicable. --- .../api/objects/data/TypeCounter.java | 2 +- .../api/objects/data/WeightedCollection.java | 4 +- .../core/block/base/BasicBlock.java | 6 +- .../core/block/base/BlockBaseModular.java | 2 +- .../core/client/model/ModelSickBlaze.java | 4 +- .../client/renderer/RenderDecayChest.java | 2 +- .../core/client/renderer/RenderToxinball.java | 2 +- .../core/gui/machine/GUI_RoundRobinator.java | 2 +- .../machine/GUI_VolumetricFlaskSetter.java | 4 +- .../events/PlayerSleepEventHandler.java | 6 +- .../core/item/base/BaseItemComponent.java | 8 +-- .../core/item/base/dusts/BaseItemDust.java | 2 +- .../item/base/ingots/BaseItemIngotHot.java | 2 +- .../base/itemblock/ItemBlockGtFrameBox.java | 4 +- .../item/base/itemblock/ItemBlockMeta.java | 2 +- .../item/base/itemblock/ItemBlockOre.java | 2 +- .../core/item/base/misc/BaseItemMisc.java | 6 +- .../core/item/base/ore/BaseOreComponent.java | 8 +-- .../core/item/bauble/BaseBauble.java | 2 +- .../item/bauble/FireProtectionBauble.java | 2 +- .../core/item/chemistry/AgriculturalChem.java | 2 +- .../core/item/crafting/ItemDummyResearch.java | 6 +- .../general/throwables/ItemThrowableBomb.java | 2 +- .../tool/misc/box/CustomBoxInventory.java | 2 +- .../core/material/state/MaterialState.java | 2 +- .../gtPlusPlus/core/players/FakeFarmer.java | 2 +- .../core/slots/SlotCraftingNoCollect.java | 2 +- .../tileentities/base/TileEntityBase.java | 59 +++++++++------ .../machines/TileEntityAdvPooCollector.java | 2 +- .../machines/TileEntityPooCollector.java | 2 +- .../core/util/data/StringUtils.java | 2 +- .../core/util/minecraft/FluidUtils.java | 2 +- .../core/util/minecraft/ItemUtils.java | 2 +- .../core/util/minecraft/MaterialUtils.java | 4 +- .../core/util/minecraft/MiningUtils.java | 14 ++-- .../util/minecraft/ModularArmourUtils.java | 2 +- .../gtPlusPlus/core/util/sys/SystemUtils.java | 2 +- .../everglades/chunk/ChunkProviderModded.java | 6 +- .../world/WorldChunkManagerCustom.java | 4 +- .../nei/DecayableRecipeHandler.java | 4 +- .../java/gtPlusPlus/preloader/DevHelper.java | 4 +- .../ClassTransformer_Forge_ChunkLoading.java | 2 +- .../xmod/bartcrops/LoaderOfTheCrops.java | 6 +- .../forestry/bees/custom/CustomCombs.java | 4 +- .../forestry/bees/handler/GTPP_CombType.java | 6 +- .../forestry/bees/handler/GTPP_DropType.java | 6 +- .../bees/handler/GTPP_PollenType.java | 6 +- .../bees/handler/GTPP_PropolisType.java | 6 +- .../bees/recipe/FR_Gregtech_Recipes.java | 48 ++++++------- .../GT_MetaTileEntity_Hatch_Naquadah.java | 2 +- .../GregtechMetaPipeEntity_Cable.java | 2 +- .../GregtechRocketFuelGeneratorBase.java | 2 +- .../GregtechMetaCasingBlocksPipeGearbox.java | 2 +- .../TexturesCentrifugeMultiblock.java | 72 +++++++++---------- .../textures/TexturesGrinderMultiblock.java | 72 +++++++++---------- .../blocks/textures/TexturesGtBlock.java | 4 +- .../autocrafter/AC_Helper_Container.java | 2 +- .../items/behaviours/Behaviour_Choocher.java | 2 +- .../common/render/GTPP_CapeRenderer.java | 2 +- .../GT_MetaTileEntity_CropHarvestor.java | 2 +- .../basic/GregtechMetaPollutionCreator.java | 2 +- .../basic/GregtechMetaPollutionDetector.java | 2 +- .../basic/GregtechMetaWirelessCharger.java | 4 +- ...chMetaTileEntity_IndustrialDehydrator.java | 2 +- ...regtechMetaTileEntity_SteamCompressor.java | 2 +- ...hMetaTileEntity_IndustrialFishingPond.java | 10 +-- .../chemplant/GregtechMTE_ChemicalPlant.java | 2 +- ...aTileEntity_PowerSubStationController.java | 2 +- .../RecipeGen_BlastSmelterGT_GTNH.java | 4 +- .../loaders/RecipeGen_FluidCanning.java | 2 +- .../gregtech/GregtechConduits.java | 4 +- .../xmod/ic2/recipe/RECIPE_IC2.java | 28 ++++---- .../thaumcraft/aspect/GTPP_AspectCompat.java | 2 +- .../wrapper/aspect/TC_Aspect_Wrapper.java | 4 +- .../xmod/thaumcraft/util/ThaumcraftUtils.java | 2 +- .../block/TF_Block_Fluid_Ender.java | 2 +- .../tinkers/material/BaseTinkersMaterial.java | 2 +- 77 files changed, 270 insertions(+), 253 deletions(-) diff --git a/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java b/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java index e4b4e0db88..b4058e9faf 100644 --- a/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java +++ b/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java @@ -10,7 +10,7 @@ public class TypeCounter implements Set { - private Map> mInternalMap = new LinkedHashMap>(); + private final Map> mInternalMap = new LinkedHashMap>(); private String mHighestValueKey; private int mHighestValue = 0; private final Class mClass; diff --git a/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java b/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java index 46cb8b35d9..0dfc9a2884 100644 --- a/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java +++ b/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java @@ -11,8 +11,8 @@ public class WeightedCollection implements Map { - private NavigableMap map = new TreeMap(); - private Random random; + private final NavigableMap map = new TreeMap(); + private final Random random; private int total = 0; public WeightedCollection() { diff --git a/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java b/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java index 72e3b24124..6542e348e3 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java +++ b/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java @@ -44,9 +44,9 @@ public static enum BlockTypes { FRAME("blockFrameGt", "wrench", soundTypeMetal), ORE("blockStone", "pickaxe", soundTypeStone); - private String TEXTURE_NAME; - private String HARVEST_TOOL; - private SoundType soundOfBlock; + private final String TEXTURE_NAME; + private final String HARVEST_TOOL; + private final SoundType soundOfBlock; private BlockTypes(final String textureName, final String harvestTool, final SoundType blockSound) { this.TEXTURE_NAME = textureName; diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java index f0ecd6def9..66bb7ffb7e 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java @@ -36,7 +36,7 @@ public class BlockBaseModular extends BasicBlock { protected String thisBlockMaterialTranslatedName; protected final String thisBlockType; - private static HashMap sBlockCache = new HashMap(); + private static final HashMap sBlockCache = new HashMap(); public static Block getMaterialBlock(Material aMaterial, BlockTypes aType) { return sBlockCache.get(aMaterial.getUnlocalizedName() + "." + aType.name()); diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java b/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java index 961f365f69..e96a0d9cc1 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java @@ -12,9 +12,9 @@ public class ModelSickBlaze extends ModelBlaze { /** The sticks that fly around the Blaze. */ - private ModelRenderer[] blazeSticks = new ModelRenderer[24]; + private final ModelRenderer[] blazeSticks = new ModelRenderer[24]; - private ModelRenderer blazeHead; + private final ModelRenderer blazeHead; public ModelSickBlaze() { for (int i = 0; i < this.blazeSticks.length; ++i) { diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderDecayChest.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderDecayChest.java index fefa6741da..0d5dd78b47 100644 --- a/src/main/java/gtPlusPlus/core/client/renderer/RenderDecayChest.java +++ b/src/main/java/gtPlusPlus/core/client/renderer/RenderDecayChest.java @@ -23,7 +23,7 @@ public class RenderDecayChest extends TileEntitySpecialRenderer { private static final ResourceLocation mChestTexture = new ResourceLocation( GTPlusPlus.ID, "textures/blocks/TileEntities/DecayablesChest_full.png"); - private ModelDecayChest mChestModel = new ModelDecayChest(); + private final ModelDecayChest mChestModel = new ModelDecayChest(); public static RenderDecayChest INSTANCE; public final int mRenderID; diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderToxinball.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderToxinball.java index 7d1b448cdc..0bfb7b6093 100644 --- a/src/main/java/gtPlusPlus/core/client/renderer/RenderToxinball.java +++ b/src/main/java/gtPlusPlus/core/client/renderer/RenderToxinball.java @@ -18,7 +18,7 @@ @SideOnly(Side.CLIENT) public class RenderToxinball extends Render { - private float mSize; + private final float mSize; public RenderToxinball(float scale) { this.mSize = scale; diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java index 40e4eafe7f..b872ad73d5 100644 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java @@ -28,7 +28,7 @@ public class GUI_RoundRobinator extends GuiContainer { GTPlusPlus.ID, "textures/gui/RoundRobinator.png"); private TileEntityRoundRobinator mTile; - private Container_RoundRobinator mContainer; + private final Container_RoundRobinator mContainer; private static final Method mDrawItemStack; static { diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java index ce0a05adc4..ee85239644 100644 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java @@ -24,10 +24,10 @@ public class GUI_VolumetricFlaskSetter extends GuiContainer { private static final ResourceLocation mGuiTextures = new ResourceLocation( GTPlusPlus.ID, "textures/gui/VolumetricFlaskSetter.png"); - private Container_VolumetricFlaskSetter mContainer; + private final Container_VolumetricFlaskSetter mContainer; private boolean mIsOpen = false; private GuiValueField mText; - private TileEntityVolumetricFlaskSetter mTile; + private final TileEntityVolumetricFlaskSetter mTile; public GUI_VolumetricFlaskSetter(Container_VolumetricFlaskSetter aContainer) { super(aContainer); diff --git a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java index 5fa5739940..0ef4d0bae8 100644 --- a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java @@ -22,10 +22,10 @@ public class PlayerSleepEventHandler { - private static Field sEffectDuration = ReflectionUtils + private static final Field sEffectDuration = ReflectionUtils .getField(PotionEffect.class, DevHelper.isObfuscatedEnvironment() ? "field_76460_b" : "duration"); - private static ArrayList sPositiveEffects = new ArrayList(); - private static ArrayList sNegativeEffects = new ArrayList(); + private static final ArrayList sPositiveEffects = new ArrayList(); + private static final ArrayList sNegativeEffects = new ArrayList(); public static void init() { Utils.registerEvent(new PlayerSleepEventHandler()); diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index b54811947f..9272c2a8ac 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -426,10 +426,10 @@ public static enum ComponentTypes { FINEWIRE("FineWire", "Fine @ Wire", "wireFine", OrePrefixes.wireFine), PLATEDENSE("PlateDense", "Dense @ Plate", "plateDense", OrePrefixes.plateDense),; - private String COMPONENT_NAME; - private String DISPLAY_NAME; - private String OREDICT_NAME; - private OrePrefixes a_GT_EQUAL; + private final String COMPONENT_NAME; + private final String DISPLAY_NAME; + private final String OREDICT_NAME; + private final OrePrefixes a_GT_EQUAL; private ComponentTypes(final String LocalName, final String DisplayName, final String OreDictName, final OrePrefixes aPrefix) { diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java index 435a055ede..804b0a111c 100644 --- a/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java @@ -5,7 +5,7 @@ public class BaseItemDust extends BaseItemComponent { - private BaseItemComponent[] mSizedDusts = new BaseItemComponent[2]; + private final BaseItemComponent[] mSizedDusts = new BaseItemComponent[2]; public BaseItemDust(Material aMat) { this(aMat, true); diff --git a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java index 99fef5e19e..94a55d3733 100644 --- a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java +++ b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java @@ -26,7 +26,7 @@ public class BaseItemIngotHot extends BaseItemIngot { private final ItemStack outputIngot; - private int tickCounter = 0; + private final int tickCounter = 0; private final int tickCounterMax = 200; private final int mTier; diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java index 914e39e2a5..535a57f6bf 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java @@ -20,8 +20,8 @@ public class ItemBlockGtFrameBox extends ItemBlock { protected int blockColour; - private Material mMaterial; - private int sRadiation; + private final Material mMaterial; + private final int sRadiation; public ItemBlockGtFrameBox(final Block block) { super(block); diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java index 8c1555a73a..30f63774f8 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java @@ -18,7 +18,7 @@ public class ItemBlockMeta extends ItemBlockWithMetadata { private final Block mBlock; - private HashMap> aTooltips = new LinkedHashMap>(); + private final HashMap> aTooltips = new LinkedHashMap>(); public ItemBlockMeta(final Block aBlock) { super(aBlock, aBlock); diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java index c8c6f01232..bebc931d48 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java @@ -49,7 +49,7 @@ public int getRenderColor(final int aMeta) { return this.mThisColour; } - private static Map> mMapOreBlockItemToDimName = new LinkedHashMap>(); + private static final Map> mMapOreBlockItemToDimName = new LinkedHashMap>(); private static boolean mInitOres_Everglades = false; private AutoMap mDimsForThisOre = new AutoMap(); diff --git a/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java b/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java index 64c5f76109..6560ac5ff2 100644 --- a/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java +++ b/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java @@ -130,9 +130,9 @@ public static enum MiscTypes { DROP("Droplet", " Droplet", "droplet"), MUSHROOM("Mushroom", " Mushroom", "mushroom"); - private String TYPE; - private String DISPLAY_NAME_SUFFIX; - private String OREDICT_PREFIX; + private final String TYPE; + private final String DISPLAY_NAME_SUFFIX; + private final String OREDICT_PREFIX; private MiscTypes(final String LocalName, final String DisplayNameSuffix, final String OreDictPrefix) { this.TYPE = LocalName; diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java index 6b4d3ab4a3..0eb82d57dc 100644 --- a/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java @@ -243,10 +243,10 @@ public static enum ComponentTypes { CRUSHEDPURIFIED("crushedPurified", "Purified Crushed ", " Ore", true), MILLED("milled", "Milled ", " Ore", true); - private String COMPONENT_NAME; - private String PREFIX; - private String DISPLAY_NAME; - private boolean HAS_OVERLAY; + private final String COMPONENT_NAME; + private final String PREFIX; + private final String DISPLAY_NAME; + private final boolean HAS_OVERLAY; private ComponentTypes(final String LocalName, final String prefix, final String DisplayName, final boolean overlay) { diff --git a/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java index 0ac31ef30b..26a2dce4f7 100644 --- a/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java +++ b/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java @@ -40,7 +40,7 @@ public class BaseBauble extends Item implements IBauble { */ private BaubleType mThisBauble; - private List damageNegations = new ArrayList(); + private final List damageNegations = new ArrayList(); Multimap attributes = HashMultimap.create(); public BaseBauble(BaubleType type, String displayName) { diff --git a/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java index ca4ec308f6..d703abe71d 100644 --- a/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java +++ b/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java @@ -22,7 +22,7 @@ public class FireProtectionBauble extends BaseBauble { - private static Field isImmuneToFire; + private static final Field isImmuneToFire; static { isImmuneToFire = ReflectionUtils diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java index 2dcb726171..d20f215ba3 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java @@ -46,7 +46,7 @@ public class AgriculturalChem extends ItemPackage { private static boolean aBOP; private static boolean aTiCon; - private static AutoMap mBloodFluids = new AutoMap(); + private static final AutoMap mBloodFluids = new AutoMap(); /** * Fluids diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java index cce12371b0..724b99bd4f 100644 --- a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -33,8 +33,8 @@ public static enum ASSEMBLY_LINE_RESEARCH { RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"), RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"); - private String mName; - private String mDesc; + private final String mName; + private final String mDesc; private ASSEMBLY_LINE_RESEARCH(String aName, String aDesc) { mName = aName; @@ -43,7 +43,7 @@ private ASSEMBLY_LINE_RESEARCH(String aName, String aDesc) { } } - private static Map mInternalNameToIdMap = new LinkedHashMap(); + private static final Map mInternalNameToIdMap = new LinkedHashMap(); public static ItemStack getResearchStack(ASSEMBLY_LINE_RESEARCH aResearchName, int aStacksize) { Integer aMeta = mInternalNameToIdMap.get(Utils.sanitizeString(aResearchName.mName)); diff --git a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java index 31d69044cc..21048e470e 100644 --- a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java +++ b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java @@ -26,7 +26,7 @@ public class ItemThrowableBomb extends CoreItem { - private static AutoMap mLighters = new AutoMap(); + private static final AutoMap mLighters = new AutoMap(); public static IIcon[] icons = new IIcon[10]; public ItemThrowableBomb() { diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java index 858689f33d..aa5a1db6b0 100644 --- a/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java @@ -21,7 +21,7 @@ public abstract class CustomBoxInventory implements IInventory { public final int INV_SIZE; /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory; + private final ItemStack[] inventory; /** * @param itemstack - the ItemStack to which this inventory belongs diff --git a/src/main/java/gtPlusPlus/core/material/state/MaterialState.java b/src/main/java/gtPlusPlus/core/material/state/MaterialState.java index 34abbd0844..9fb5cde101 100644 --- a/src/main/java/gtPlusPlus/core/material/state/MaterialState.java +++ b/src/main/java/gtPlusPlus/core/material/state/MaterialState.java @@ -10,7 +10,7 @@ public enum MaterialState { ORE(5), PURE_GAS(6); - private int STATE; + private final int STATE; private MaterialState(final int State) { this.STATE = State; diff --git a/src/main/java/gtPlusPlus/core/players/FakeFarmer.java b/src/main/java/gtPlusPlus/core/players/FakeFarmer.java index ba8d5f9d77..3e25c1c7cd 100644 --- a/src/main/java/gtPlusPlus/core/players/FakeFarmer.java +++ b/src/main/java/gtPlusPlus/core/players/FakeFarmer.java @@ -22,7 +22,7 @@ public class FakeFarmer extends EntityPlayerMP { private static final UUID uuid = UUID.fromString("c1ddfd7f-120a-4437-8b64-38660d3ec62d"); - private static GameProfile FAKE_PROFILE = new GameProfile(uuid, "[GT_Farm_Manager]"); + private static final GameProfile FAKE_PROFILE = new GameProfile(uuid, "[GT_Farm_Manager]"); public FakeFarmer(final WorldServer world) { super( diff --git a/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java b/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java index b3d249aed9..67aa04b204 100644 --- a/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java +++ b/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java @@ -18,7 +18,7 @@ public class SlotCraftingNoCollect extends SlotCrafting { /** The craft matrix inventory linked to this result slot. */ private final IInventory craftMatrix; /** The player that is using the GUI where this slot resides. */ - private EntityPlayer thePlayer; + private final EntityPlayer thePlayer; /** * The number of items that have been crafted so far. Gets passed to ItemStack.onCrafting before being reset. */ diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java index 762d5a4d61..5f48933780 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java @@ -305,35 +305,52 @@ public boolean isValidSlot(int aIndex) { protected int mAverageEUInputIndex = 0, mAverageEUOutputIndex = 0; protected boolean mReleaseEnergy = false; protected int[] mAverageEUInput = new int[11], mAverageEUOutput = new int[11]; - private boolean[] mActiveEUInputs = new boolean[] { false, false, false, false, false, false }, - mActiveEUOutputs = new boolean[] { false, false, false, false, false, false }; - private byte[] mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; - private int[] mCoverSides = new int[] { 0, 0, 0, 0, 0, 0 }, mCoverData = new int[] { 0, 0, 0, 0, 0, 0 }, - mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; + private final boolean[] mActiveEUInputs = new boolean[] { false, false, false, false, false, false }; + private final boolean[] mActiveEUOutputs = new boolean[] { false, false, false, false, false, false }; + private final byte[] mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; + private final int[] mCoverSides = new int[] { 0, 0, 0, 0, 0, 0 }; + private final int[] mCoverData = new int[] { 0, 0, 0, 0, 0, 0 }; + private final int[] mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; private boolean mHasEnoughEnergy = true; protected boolean mRunningThroughTick = false; protected boolean mInputDisabled = false; protected boolean mOutputDisabled = false; - private boolean mMuffler = false; - private boolean mLockUpgrade = false; - private boolean mActive = false; + private final boolean mMuffler = false; + private final boolean mLockUpgrade = false; + private final boolean mActive = false; private boolean mRedstone = false; - private boolean mWorkUpdate = false; - private boolean mSteamConverter = false; + private final boolean mWorkUpdate = false; + private final boolean mSteamConverter = false; private boolean mInventoryChanged = false; - private boolean mWorks = true; - private boolean mNeedsUpdate = true; - private boolean mNeedsBlockUpdate = true; + private final boolean mWorks = true; + private final boolean mNeedsUpdate = true; + private final boolean mNeedsBlockUpdate = true; private boolean mSendClientData = false; - private boolean oRedstone = false; - private boolean mEnergyStateReady = false; - private byte mColor = 0, oColor = 0, mStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, - oTexturePage = 0, oLightValueClient = -1, oLightValue = -1, mLightValue = 0, mOtherUpgrades = 0, - mFacing = 0, oFacing = 0, mWorkData = 0; - private int mDisplayErrorCode = 0, oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0, mLagWarningCount = 0; - private short mID = 0; + private final boolean oRedstone = false; + private final boolean mEnergyStateReady = false; + private final byte mColor = 0; + private final byte oColor = 0; + private byte mStrongRedstone = 0; + private final byte oRedstoneData = 63; + private final byte oTextureData = 0; + private final byte oUpdateData = 0; + private final byte oTexturePage = 0; + private final byte oLightValueClient = -1; + private final byte oLightValue = -1; + private byte mLightValue = 0; + private final byte mOtherUpgrades = 0; + private final byte mFacing = 0; + private final byte oFacing = 0; + private final byte mWorkData = 0; + private final int mDisplayErrorCode = 0; + private final int oX = 0; + private final int oY = 0; + private final int oZ = 0; + private final int mTimeStatisticsIndex = 0; + private final int mLagWarningCount = 0; + private final short mID = 0; protected long mTickTimer = 0; - private long oOutput = 0; + private final long oOutput = 0; private long mAcceptedAmperes = Long.MAX_VALUE; /** diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java index c256f73b4c..76884c6814 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java @@ -63,7 +63,7 @@ public boolean addDrop(V aPooMaker) { return false; } - private static AutoMap aEntityToDrain = new AutoMap(); + private static final AutoMap aEntityToDrain = new AutoMap(); @Override public AutoMap aThingsToLookFor() { diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java index ceff9d8528..73403f1fcd 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java @@ -67,7 +67,7 @@ public boolean addDrop(V aPooMaker) { return false; } - private static AutoMap aEntityToDrain = new AutoMap(); + private static final AutoMap aEntityToDrain = new AutoMap(); @Override public AutoMap aThingsToLookFor() { diff --git a/src/main/java/gtPlusPlus/core/util/data/StringUtils.java b/src/main/java/gtPlusPlus/core/util/data/StringUtils.java index 76cd82b096..1ae634d7e0 100644 --- a/src/main/java/gtPlusPlus/core/util/data/StringUtils.java +++ b/src/main/java/gtPlusPlus/core/util/data/StringUtils.java @@ -100,7 +100,7 @@ public static enum TextUtils { yellow('e'), white('f'); - private char colourValue; + private final char colourValue; private TextUtils(final char value) { this.colourValue = value; diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java index 03da3c3b4d..3f01182b18 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java @@ -32,7 +32,7 @@ public class FluidUtils { - private static HashMap sFluidCache = new HashMap(); + private static final HashMap sFluidCache = new HashMap(); public static FluidStack getWater(final int amount) { return FluidUtils.getFluidStack("water", amount); diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ItemUtils.java index 17a563df93..c3f67d4e04 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/ItemUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/ItemUtils.java @@ -694,7 +694,7 @@ public static ItemStack[] getBlockDrops(final ArrayList blockDrops) { return outputs; } - private static Map mModidCache = new HashMap(); + private static final Map mModidCache = new HashMap(); private static String getModId(final Item item) { if (mModidCache.containsKey(item)) { diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java index 36c630051b..fbfb42d459 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java @@ -36,7 +36,7 @@ public class MaterialUtils { public static short firstID = 791; @SuppressWarnings({ "rawtypes", "unused" }) - private static Class[][] commonTypes = { { Materials.class, int.class, TextureSet.class, float.class, int.class, + private static final Class[][] commonTypes = { { Materials.class, int.class, TextureSet.class, float.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, String.class, int.class, int.class, int.class, int.class, boolean.class, boolean.class, int.class, int.class, int.class, Dyes.class, int.class, List.class, List.class } }; @@ -51,7 +51,7 @@ public static List oreDictValuesForEntry(final String oredictName) { return null; } - private static Map mGeneratedMaterialMap = new HashMap(); + private static final Map mGeneratedMaterialMap = new HashMap(); public static Material generateMaterialFromGtENUM(final Materials material) { return generateMaterialFromGtENUM(material, null, null); diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java index 22469c0387..db473c0992 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java @@ -158,13 +158,13 @@ public static void iterateAllOreTypes() { } public static AutoMap[] mOreMaps = new AutoMap[7]; - private static AutoMap Ores_Overworld = new AutoMap(); - private static AutoMap Ores_Nether = new AutoMap(); - private static AutoMap Ores_End = new AutoMap(); - private static AutoMap Ores_Moon = new AutoMap(); - private static AutoMap Ores_Mars = new AutoMap(); - private static AutoMap Ores_Comets = new AutoMap(); - private static AutoMap Ores_Misc = new AutoMap(); + private static final AutoMap Ores_Overworld = new AutoMap(); + private static final AutoMap Ores_Nether = new AutoMap(); + private static final AutoMap Ores_End = new AutoMap(); + private static final AutoMap Ores_Moon = new AutoMap(); + private static final AutoMap Ores_Mars = new AutoMap(); + private static final AutoMap Ores_Comets = new AutoMap(); + private static final AutoMap Ores_Misc = new AutoMap(); public static boolean findAndMapOreTypesFromGT() { // Gets Moon ID diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java index a806a9a80c..1179914e95 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java @@ -27,7 +27,7 @@ public static enum Modifiers { BOOST_DAMAGE("skill.damageboost"), BOOST_HOLY("skill.holyboost"); - private String MODIFIER_NAME; + private final String MODIFIER_NAME; private Modifiers(final String mModifier) { this.MODIFIER_NAME = mModifier; diff --git a/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java b/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java index 71ed513618..b0c6dabb63 100644 --- a/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java +++ b/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java @@ -72,7 +72,7 @@ public static enum OS { SOLARIS(4), OTHER(0); - private int mID; + private final int mID; private OS(final int ID) { this.mID = ID; diff --git a/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java b/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java index 6567e75cfb..7a082384cd 100644 --- a/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java +++ b/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java @@ -36,7 +36,7 @@ public class ChunkProviderModded implements IChunkProvider { - private Random rand; + private final Random rand; private NoiseGeneratorOctaves field_147431_j; private NoiseGeneratorOctaves field_147432_k; private NoiseGeneratorOctaves field_147429_l; @@ -53,8 +53,8 @@ public class ChunkProviderModded implements IChunkProvider { /** * Reference to the World object. */ - private World worldObj; - private WorldType field_147435_p; + private final World worldObj; + private final WorldType field_147435_p; private final double[] field_147434_q; private final float[] parabolicField; private double[] stoneNoise = new double[256]; diff --git a/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java b/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java index 6a4ef65f17..bc12bd70f5 100644 --- a/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java +++ b/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java @@ -26,9 +26,9 @@ public class WorldChunkManagerCustom extends WorldChunkManager { /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */ private GenLayer biomeIndexLayer; /** The BiomeCache object for this world. */ - private BiomeCache biomeCache; + private final BiomeCache biomeCache; /** A list of biomes that the player can spawn in. */ - private List biomesToSpawnIn; + private final List biomesToSpawnIn; @SuppressWarnings({ "rawtypes" }) public WorldChunkManagerCustom() { diff --git a/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java b/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java index d08ec57054..a5fe2c42e0 100644 --- a/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java +++ b/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java @@ -211,8 +211,8 @@ public void drawExtras(int recipeIndex) { public class DecayableRecipeNEI extends TemplateRecipeHandler.CachedRecipe implements Comparable { - private PositionedStack input; - private PositionedStack output; + private final PositionedStack input; + private final PositionedStack output; public int time; @Override diff --git a/src/main/java/gtPlusPlus/preloader/DevHelper.java b/src/main/java/gtPlusPlus/preloader/DevHelper.java index bf9bc37849..bb10be4178 100644 --- a/src/main/java/gtPlusPlus/preloader/DevHelper.java +++ b/src/main/java/gtPlusPlus/preloader/DevHelper.java @@ -105,12 +105,12 @@ public static class DevHelperInternals { public static final Map srgToForge = new HashMap(); public static final Map forgeToSrg = new HashMap(); - private static WeakAutoMap> mInitMap = new WeakAutoMap>(); + private static final WeakAutoMap> mInitMap = new WeakAutoMap>(); // Obfuscation public static final Map obToDeOb = new HashMap(); public static final Map deObToOb = new HashMap(); - private static WeakAutoMap> mObInitMap = new WeakAutoMap>(); + private static final WeakAutoMap> mObInitMap = new WeakAutoMap>(); private static boolean init() { init1(); diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java index cda4384f7d..4e357d1dcf 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java @@ -67,7 +67,7 @@ public class ClassTransformer_Forge_ChunkLoading { String aWorld; String aEntity; - private static boolean doesMethodAlreadyExist = false; + private static final boolean doesMethodAlreadyExist = false; public ClassTransformer_Forge_ChunkLoading(byte[] basicClass, boolean obfuscated) { diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java index a96bcfd519..70fa1ad165 100644 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java @@ -19,10 +19,10 @@ */ public class LoaderOfTheCrops { - private static List mHasCropObj = new ArrayList(); - private CropCard mCropObj; + private static final List mHasCropObj = new ArrayList(); + private final CropCard mCropObj; private ItemStack mBaseSeed; - private static List mCropList = cropLoader(); + private static final List mCropList = cropLoader(); public LoaderOfTheCrops(CropCard cropObj) { this.mCropObj = cropObj; diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java index 031061bfc3..6bf3ea9cb6 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java @@ -34,7 +34,7 @@ public enum CustomCombs { SALT("salt", true, Materials.Salt, 75), SAND("sand", true, Materials.Sand, 100),; - private static int[][] colours = new int[][] { + private static final int[][] colours = new int[][] { { Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125) }, // SILICON { Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75) }, // RUBBER { Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175) }, // PLASTIC @@ -67,7 +67,7 @@ public enum CustomCombs { public boolean showInList; public Materials material; public int chance; - private String name; + private final String name; private CustomCombs(String pName, boolean show, Materials material, int chance) { this.name = pName; diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java index 3495869c97..46705cd597 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java @@ -17,9 +17,9 @@ public enum GTPP_CombType { public int mChance; public int mID; - private String mName; - private String mNameUnlocal; - private int[] mColour; + private final String mName; + private final String mNameUnlocal; + private final int[] mColour; private static void map(int aId, GTPP_CombType aType) { GTPP_Bees.sCombMappings.put(aId, aType); diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java index cbf448b7f6..0b0cd0dae4 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java @@ -17,9 +17,9 @@ public enum GTPP_DropType { public int mChance; public int mID; - private String mName; - private String mNameUnlocal; - private int[] mColour; + private final String mName; + private final String mNameUnlocal; + private final int[] mColour; private static void map(int aId, GTPP_DropType aType) { GTPP_Bees.sDropMappings.put(aId, aType); diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java index ec49643001..6628ccf9af 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java @@ -16,9 +16,9 @@ public enum GTPP_PollenType { public int mChance; public int mID; - private String mName; - private String mNameUnlocal; - private int[] mColour; + private final String mName; + private final String mNameUnlocal; + private final int[] mColour; private static void map(int aId, GTPP_PollenType aType) { GTPP_Bees.sPollenMappings.put(aId, aType); diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java index b857827d62..a4bd6e6217 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java @@ -17,9 +17,9 @@ public enum GTPP_PropolisType { public int mChance; public int mID; - private String mName; - private String mNameUnlocal; - private int mColour; + private final String mName; + private final String mNameUnlocal; + private final int mColour; private static void map(int aId, GTPP_PropolisType aType) { GTPP_Bees.sPropolisMappings.put(aId, aType); diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java index f16abb573d..23ba70c3b6 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java @@ -12,33 +12,33 @@ public class FR_Gregtech_Recipes { - private static String rod_Electrum = "stickElectrum"; - private static String rod_LongElectrum = "stickLongElectrum"; - private static String foil_Electrum = "foilElectrum"; - private static String rod_Uranium = "stickUranium"; - private static String rod_LongUranium = "stickLongUranium"; - private static String foil_Uranium235 = "foilUranium235"; - private static ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated); - private static ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic); - private static ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid); - private static ItemStack hiveFrameBusy = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameBusy); + private static final String rod_Electrum = "stickElectrum"; + private static final String rod_LongElectrum = "stickLongElectrum"; + private static final String foil_Electrum = "foilElectrum"; + private static final String rod_Uranium = "stickUranium"; + private static final String rod_LongUranium = "stickLongUranium"; + private static final String foil_Uranium235 = "foilUranium235"; + private static final ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated); + private static final ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic); + private static final ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid); + private static final ItemStack hiveFrameBusy = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameBusy); - private static ItemStack hiveFrameCocoa = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCocoa); - private static ItemStack hiveFrameCaged = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCaged); - private static ItemStack hiveFrameSoul = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSoul); - private static ItemStack hiveFrameClay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameClay); - private static ItemStack hiveFrameNova = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameNova); + private static final ItemStack hiveFrameCocoa = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCocoa); + private static final ItemStack hiveFrameCaged = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCaged); + private static final ItemStack hiveFrameSoul = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSoul); + private static final ItemStack hiveFrameClay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameClay); + private static final ItemStack hiveFrameNova = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameNova); - private static ItemStack hiveFrameImpregnated = ItemUtils.getItemStackFromFQRN("Forestry:frameImpregnated", 1); - private static ItemStack blockSoulSand = new ItemStack(Blocks.soul_sand, 1); - private static ItemStack blockIronBars = new ItemStack(Blocks.iron_bars, 1); - private static ItemStack itemClayDust = new ItemStack(Items.clay_ball, 1); - private static ItemStack itemCocoaBeans = new ItemStack(Items.dye, 1, 3); + private static final ItemStack hiveFrameImpregnated = ItemUtils.getItemStackFromFQRN("Forestry:frameImpregnated", 1); + private static final ItemStack blockSoulSand = new ItemStack(Blocks.soul_sand, 1); + private static final ItemStack blockIronBars = new ItemStack(Blocks.iron_bars, 1); + private static final ItemStack itemClayDust = new ItemStack(Items.clay_ball, 1); + private static final ItemStack itemCocoaBeans = new ItemStack(Items.dye, 1, 3); - private static ItemStack hiveFrameDecay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameDecay); - private static ItemStack hiveFrameSlow = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSlow); - private static ItemStack hiveFrameStalilize = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameStalilize); - private static ItemStack hiveFrameArborist = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameArborist); + private static final ItemStack hiveFrameDecay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameDecay); + private static final ItemStack hiveFrameSlow = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSlow); + private static final ItemStack hiveFrameStalilize = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameStalilize); + private static final ItemStack hiveFrameArborist = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameArborist); public static void registerItems() { // Magic Bee Like Frames diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java index 232d8a8c55..7573d07f6c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java @@ -118,7 +118,7 @@ public String[] getDescription() { return s2; } - private static String[] aDescCache = new String[3]; + private static final String[] aDescCache = new String[3]; private String formatFluidString(FluidStack f) { FluidStack mLockedStack = f; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java index 334eea41f1..3c6920fdd6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java @@ -16,7 +16,7 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implements IMetaTileEntityCable { - private static Textures.BlockIcons INSULATION_MEDIUM_PLUS; + private static final Textures.BlockIcons INSULATION_MEDIUM_PLUS; static { try { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java index 0200113e95..75edd89de6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java @@ -26,7 +26,7 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_BasicTank { - private boolean useFuel = false; + private final boolean useFuel = false; protected int pollMin, pollMax; public GregtechRocketFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java index f6c53e875e..729798ba2b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java @@ -15,7 +15,7 @@ public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlocksAbstract { - private static HashMap sMaterialMapping = new HashMap(); + private static final HashMap sMaterialMapping = new HashMap(); public GregtechMetaCasingBlocksPipeGearbox() { super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.pipesgears", GT_Material_Casings.INSTANCE); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java index 8ad5bd914d..dde28b2732 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java @@ -13,43 +13,43 @@ public class TexturesCentrifugeMultiblock { - private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1"); - private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1"); - private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2"); - private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2"); - private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3"); - private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3"); - private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4"); - private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4"); - private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); - private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); - private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6"); - private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6"); - private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7"); - private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7"); - private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8"); - private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8"); - private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9"); - private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9"); + private static final CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1"); + private static final CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1"); + private static final CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2"); + private static final CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2"); + private static final CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3"); + private static final CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3"); + private static final CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4"); + private static final CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4"); + private static final CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); + private static final CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); + private static final CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6"); + private static final CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6"); + private static final CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7"); + private static final CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7"); + private static final CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8"); + private static final CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8"); + private static final CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9"); + private static final CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9"); - private static CustomIcon frontFace_0 = (GT8_1); - private static CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static CustomIcon frontFace_1 = (GT8_2); - private static CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static CustomIcon frontFace_2 = (GT8_3); - private static CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static CustomIcon frontFace_3 = (GT8_4); - private static CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static CustomIcon frontFace_4 = (GT8_5); - private static CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static CustomIcon frontFace_5 = (GT8_6); - private static CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static CustomIcon frontFace_6 = (GT8_7); - private static CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static CustomIcon frontFace_7 = (GT8_8); - private static CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static CustomIcon frontFace_8 = (GT8_9); - private static CustomIcon frontFaceActive_8 = (GT8_9_Active); + private static final CustomIcon frontFace_0 = (GT8_1); + private static final CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static final CustomIcon frontFace_1 = (GT8_2); + private static final CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static final CustomIcon frontFace_2 = (GT8_3); + private static final CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static final CustomIcon frontFace_3 = (GT8_4); + private static final CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static final CustomIcon frontFace_4 = (GT8_5); + private static final CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static final CustomIcon frontFace_5 = (GT8_6); + private static final CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static final CustomIcon frontFace_6 = (GT8_7); + private static final CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static final CustomIcon frontFace_7 = (GT8_8); + private static final CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static final CustomIcon frontFace_8 = (GT8_9); + private static final CustomIcon frontFaceActive_8 = (GT8_9_Active); CustomIcon[] CENTRIFUGE = new CustomIcon[] { frontFace_0, frontFace_1, frontFace_2, frontFace_3, frontFace_4, frontFace_5, frontFace_6, frontFace_7, frontFace_8 }; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java index f042b88370..57fa796f72 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java @@ -13,43 +13,43 @@ public class TexturesGrinderMultiblock { - private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE1"); - private static CustomIcon GT8_1 = new CustomIcon("iconsets/Grinder/GRINDER1"); - private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE2"); - private static CustomIcon GT8_2 = new CustomIcon("iconsets/Grinder/GRINDER2"); - private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE3"); - private static CustomIcon GT8_3 = new CustomIcon("iconsets/Grinder/GRINDER3"); - private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE4"); - private static CustomIcon GT8_4 = new CustomIcon("iconsets/Grinder/GRINDER4"); - private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5"); - private static CustomIcon GT8_5 = new CustomIcon("iconsets/Grinder/GRINDER5"); - private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE6"); - private static CustomIcon GT8_6 = new CustomIcon("iconsets/Grinder/GRINDER6"); - private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE7"); - private static CustomIcon GT8_7 = new CustomIcon("iconsets/Grinder/GRINDER7"); - private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE8"); - private static CustomIcon GT8_8 = new CustomIcon("iconsets/Grinder/GRINDER8"); - private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE9"); - private static CustomIcon GT8_9 = new CustomIcon("iconsets/Grinder/GRINDER9"); + private static final CustomIcon GT8_1_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE1"); + private static final CustomIcon GT8_1 = new CustomIcon("iconsets/Grinder/GRINDER1"); + private static final CustomIcon GT8_2_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE2"); + private static final CustomIcon GT8_2 = new CustomIcon("iconsets/Grinder/GRINDER2"); + private static final CustomIcon GT8_3_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE3"); + private static final CustomIcon GT8_3 = new CustomIcon("iconsets/Grinder/GRINDER3"); + private static final CustomIcon GT8_4_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE4"); + private static final CustomIcon GT8_4 = new CustomIcon("iconsets/Grinder/GRINDER4"); + private static final CustomIcon GT8_5_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5"); + private static final CustomIcon GT8_5 = new CustomIcon("iconsets/Grinder/GRINDER5"); + private static final CustomIcon GT8_6_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE6"); + private static final CustomIcon GT8_6 = new CustomIcon("iconsets/Grinder/GRINDER6"); + private static final CustomIcon GT8_7_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE7"); + private static final CustomIcon GT8_7 = new CustomIcon("iconsets/Grinder/GRINDER7"); + private static final CustomIcon GT8_8_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE8"); + private static final CustomIcon GT8_8 = new CustomIcon("iconsets/Grinder/GRINDER8"); + private static final CustomIcon GT8_9_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE9"); + private static final CustomIcon GT8_9 = new CustomIcon("iconsets/Grinder/GRINDER9"); - private static CustomIcon frontFace_0 = (GT8_1); - private static CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static CustomIcon frontFace_1 = (GT8_2); - private static CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static CustomIcon frontFace_2 = (GT8_3); - private static CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static CustomIcon frontFace_3 = (GT8_4); - private static CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static CustomIcon frontFace_4 = (GT8_5); - private static CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static CustomIcon frontFace_5 = (GT8_6); - private static CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static CustomIcon frontFace_6 = (GT8_7); - private static CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static CustomIcon frontFace_7 = (GT8_8); - private static CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static CustomIcon frontFace_8 = (GT8_9); - private static CustomIcon frontFaceActive_8 = (GT8_9_Active); + private static final CustomIcon frontFace_0 = (GT8_1); + private static final CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static final CustomIcon frontFace_1 = (GT8_2); + private static final CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static final CustomIcon frontFace_2 = (GT8_3); + private static final CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static final CustomIcon frontFace_3 = (GT8_4); + private static final CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static final CustomIcon frontFace_4 = (GT8_5); + private static final CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static final CustomIcon frontFace_5 = (GT8_6); + private static final CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static final CustomIcon frontFace_6 = (GT8_7); + private static final CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static final CustomIcon frontFace_7 = (GT8_8); + private static final CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static final CustomIcon frontFace_8 = (GT8_9); + private static final CustomIcon frontFaceActive_8 = (GT8_9_Active); CustomIcon[] GRINDER = new CustomIcon[] { frontFace_0, frontFace_1, frontFace_2, frontFace_3, frontFace_4, frontFace_5, frontFace_6, frontFace_7, frontFace_8 }; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index cac8aa742f..a73e4ea49c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -17,9 +17,9 @@ public class TexturesGtBlock { - private static boolean mAnimated = CORE.ConfigSwitches.enableAnimatedTextures; + private static final boolean mAnimated = CORE.ConfigSwitches.enableAnimatedTextures; - private static AutoMap mCustomiconMap = new AutoMap(); + private static final AutoMap mCustomiconMap = new AutoMap(); static {} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java index e54542f35b..64ba317ba3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java @@ -20,7 +20,7 @@ public class AC_Helper_Container extends Container { public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); public IInventory craftResult = new InventoryCraftResult(); - private World worldObj; + private final World worldObj; public InventoryCrafting getMatrix() { return this.craftMatrix; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java index a7c23c69fc..4acfef87f2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java @@ -17,7 +17,7 @@ public class Behaviour_Choocher extends Behaviour_None { - private boolean isWrench = true; + private final boolean isWrench = true; private final Behaviour_Wrench wrench = new Behaviour_Wrench(150); private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250); private final String mTooltip1 = GT_LanguageManager diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index 74d704ea0a..3602901035 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -231,7 +231,7 @@ private final boolean renderCapeOnPlayer(RenderPlayerEvent.Specials.Pre aEvent, private static class CapeUtils { - private static char SPLIT_CHARACTER = '§'; + private static final char SPLIT_CHARACTER = '§'; private static AES sAES; // UUID - Username diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java index 3871d14ed9..3017139cad 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java @@ -176,7 +176,7 @@ private static int getRange(int aTier) { } } - private HashSet mCropCache = new HashSet(); + private final HashSet mCropCache = new HashSet(); private boolean mInvalidCache = false; public boolean doesInventoryHaveSpace() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java index 0c0e9664b5..3696fffa28 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java @@ -24,7 +24,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity { int mAveragePollutionArray[] = new int[10]; private int mArrayPos = 0; private int mTickTimer = 0; - private int mSecondTimer = 0; + private final int mSecondTimer = 0; public GregtechMetaPollutionCreator(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java index 0c75d91a1b..24b7fbfa05 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java @@ -26,7 +26,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity { int mAveragePollutionArray[] = new int[10]; private int mArrayPos = 0; private int mTickTimer = 0; - private int mSecondTimer = 0; + private final int mSecondTimer = 0; private long mRedstoneLevel = 0; public GregtechMetaPollutionDetector(final int aID, final String aName, final String aNameRegional, final int aTier, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java index 968f44630e..be5f5fb9f2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java @@ -447,8 +447,8 @@ public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { super.onFirstTick(aBaseMetaTileEntity); } - private Map mWirelessChargingMap = new HashMap(); - private Map mLocalChargingMap = new HashMap(); + private final Map mWirelessChargingMap = new HashMap(); + private final Map mLocalChargingMap = new HashMap(); private boolean isValidPlayer(EntityPlayer aPlayer) { BaseMetaTileEntity aTile = (BaseMetaTileEntity) this.getBaseMetaTileEntity(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java index 805468d4d4..b626a72f15 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java @@ -48,7 +48,7 @@ public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_MultiBlockBase implements ISurvivalConstructable { private static int CASING_TEXTURE_ID; - private static String mCasingName = "Vacuum Casing"; + private static final String mCasingName = "Vacuum Casing"; private HeatingCoilLevel mHeatingCapacity; private boolean mDehydratorMode = false; private int mCasing; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java index 0e396c5782..24baef1831 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java @@ -32,7 +32,7 @@ public class GregtechMetaTileEntity_SteamCompressor extends GregtechMeta_SteamMultiBase implements ISurvivalConstructable { - private String mCasingName = "Bronze Plated Bricks"; + private final String mCasingName = "Bronze Plated Bricks"; private static IStructureDefinition STRUCTURE_DEFINITION = null; private int mCasing; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java index c992e90947..9d154189f9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java @@ -342,10 +342,10 @@ private boolean isNotStaticWater(Block block, byte meta) { || (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0); } - private static AutoMap> categories = new AutoMap>(); - private static AutoMap categoryFish = new AutoMap(); - private static AutoMap categoryJunk = new AutoMap(); - private static AutoMap categoryLoot = new AutoMap(); + private static final AutoMap> categories = new AutoMap>(); + private static final AutoMap categoryFish = new AutoMap(); + private static final AutoMap categoryJunk = new AutoMap(); + private static final AutoMap categoryLoot = new AutoMap(); private static boolean hasGenerateRecipes = false; private int mMode = 14; private int mMax = 8; @@ -408,7 +408,7 @@ else if (j.getItemDamage() == 16) { } // reflection map - private static Map reflectiveFishMap = new HashMap(); + private static final Map reflectiveFishMap = new HashMap(); private ItemStack reflectiveFish(WeightedRandomFishable y) { if (reflectiveFishMap.containsKey(y)) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java index c454a1769e..02de162f8b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java @@ -79,7 +79,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase STRUCTURE_DEFINITION = null; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java index a6f19d05fe..651b33ccb2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java @@ -21,8 +21,8 @@ public class RecipeGen_BlastSmelterGT_GTNH { - private static Map mCachedIngotToFluidRegistry = new HashMap(); - private static Map mCachedHotToColdRegistry = new HashMap(); + private static final Map mCachedIngotToFluidRegistry = new HashMap(); + private static final Map mCachedHotToColdRegistry = new HashMap(); private static synchronized void setIngotToFluid(final ItemStackData stack, final FluidStack fluid) { if (stack != null && fluid != null) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java index 561c0884cd..12200f9d1b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java @@ -40,7 +40,7 @@ public String getInfoData() { private static boolean mHasRun = false; - private static HashSet mCache = new HashSet(); + private static final HashSet mCache = new HashSet(); private static void addRunnableToRecipeCache(RecipeGen_FluidCanning r) { if (mHasRun) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index 6c05c6e79f..b9583d17cb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -36,8 +36,8 @@ public class GregtechConduits { // 30000-30999 - private static int BaseWireID = 30600; - private static int BasePipeID = 30700; + private static final int BaseWireID = 30600; + private static final int BasePipeID = 30700; private static int BasePipeHexadecupleID = 30100; public static void run() { diff --git a/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java b/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java index d07f1f6314..301c8cc2fc 100644 --- a/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java +++ b/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java @@ -53,20 +53,20 @@ public class RECIPE_IC2 { public static String ring_T3 = "ringChrome"; public static String ring_T4 = "ringOsmiridium"; - private static ItemStack rotor_blade_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_1.getItem()); - private static ItemStack rotor_blade_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_2.getItem()); - private static ItemStack rotor_blade_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_3.getItem()); - private static ItemStack rotor_blade_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_4.getItem()); - - private static ItemStack shaft_T1 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_1.getItem()); - private static ItemStack shaft_T2 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_2.getItem()); - private static ItemStack shaft_T3 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_3.getItem()); - private static ItemStack shaft_T4 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_4.getItem()); - - private static ItemStack rotor_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_1.getItem()); - private static ItemStack rotor_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_2.getItem()); - private static ItemStack rotor_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_3.getItem()); - private static ItemStack rotor_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_4.getItem()); + private static final ItemStack rotor_blade_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_1.getItem()); + private static final ItemStack rotor_blade_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_2.getItem()); + private static final ItemStack rotor_blade_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_3.getItem()); + private static final ItemStack rotor_blade_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_4.getItem()); + + private static final ItemStack shaft_T1 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_1.getItem()); + private static final ItemStack shaft_T2 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_2.getItem()); + private static final ItemStack shaft_T3 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_3.getItem()); + private static final ItemStack shaft_T4 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_4.getItem()); + + private static final ItemStack rotor_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_1.getItem()); + private static final ItemStack rotor_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_2.getItem()); + private static final ItemStack rotor_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_3.getItem()); + private static final ItemStack rotor_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_4.getItem()); private static boolean checkForEnderIO() { if (!EnderIO.isModLoaded()) { diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java index dab1408898..0e1ffdf550 100644 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java @@ -21,7 +21,7 @@ public class GTPP_AspectCompat { public static volatile Method m = null; - private static HashMap mAspectCache = new LinkedHashMap(); + private static final HashMap mAspectCache = new LinkedHashMap(); public static TC_Aspect_Wrapper ASPECT_BALANCE; public static TC_Aspect_Wrapper ASPECT_LUST; diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java index 76d1998527..a7c8b258bd 100644 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java @@ -25,7 +25,7 @@ */ public class TC_Aspect_Wrapper { - private static Class mClass_Aspect; + private static final Class mClass_Aspect; private static Field mField_Aspects; private final String tag; @@ -231,7 +231,7 @@ public static TC_Aspect_Wrapper generate(Object aBaseAspect) { /** * Internal Map containing all the TC_Aspects. */ - private static Map mInternalAspectCache = new LinkedHashMap(); + private static final Map mInternalAspectCache = new LinkedHashMap(); /** * Public getter for all TC_Aspects diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java index 7ab0c977e2..696db1a90b 100644 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java @@ -38,7 +38,7 @@ public class ThaumcraftUtils { - private static Class mClass_Aspect; + private static final Class mClass_Aspect; private static Field mField_Aspects; static { diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java index 5bbf0ea3ab..3816489cc7 100644 --- a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java @@ -18,7 +18,7 @@ public class TF_Block_Fluid_Ender extends BlockFluidCoFHBase { public static final int LEVELS = 4; public static final Material materialFluidEnder = new MaterialLiquid(MapColor.greenColor); - private static boolean effect = true; + private static final boolean effect = true; public TF_Block_Fluid_Ender() { super(GTPlusPlus.ID, TF_Fluids.fluidEnder, materialFluidEnder, "ender"); diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java b/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java index 06f7ad47f5..b6896f5b96 100644 --- a/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java +++ b/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java @@ -20,7 +20,7 @@ public class BaseTinkersMaterial { - private static HashMap aInternalMaterialIdMap = new HashMap(); + private static final HashMap aInternalMaterialIdMap = new HashMap(); private static int aNextFreeID; public final String mLocalName; From 7cb5cfa0e4f6f54d80b9cb93034c0b7e84cd8f93 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:28:29 +0100 Subject: [PATCH 6/8] Lots of little clean ups --- .../java/gtPlusPlus/GenerateDictionaries.java | 2 - .../gtPlusPlus/api/objects/data/AutoMap.java | 17 +++----- .../api/objects/minecraft/BlockPos.java | 4 +- .../api/objects/minecraft/FakeBlockPos.java | 4 +- .../api/objects/minecraft/FakeWorld.java | 13 +++--- .../api/objects/minecraft/ItemPackage.java | 2 +- .../api/objects/minecraft/ShapedRecipe.java | 5 --- .../gtPlusPlus/api/objects/random/XSTR.java | 11 +++-- .../block/base/BasicTileBlockWithTooltip.java | 15 +++---- .../core/block/base/BlockBaseFluid.java | 2 - .../core/block/base/BlockBaseModular.java | 2 - .../core/block/general/BlockSuperLight.java | 6 +-- .../core/block/general/LightGlass.java | 7 ++- .../core/block/machine/CircuitProgrammer.java | 11 +++-- .../core/block/machine/DecayablesChest.java | 11 +++-- .../core/block/machine/FishTrap.java | 11 +++-- .../block/machine/Machine_PestKiller.java | 11 +++-- .../block/machine/Machine_ProjectTable.java | 11 +++-- .../block/machine/Machine_SuperJukebox.java | 3 -- .../block/machine/VolumetricFlaskSetter.java | 11 +++-- .../container/Container_DecayablesChest.java | 5 +-- .../core/container/Container_FishTrap.java | 5 +-- .../container/Container_ProjectTable.java | 2 - .../core/creative/AddToCreativeTab.java | 1 - .../core/entity/InternalEntityRegistry.java | 11 ----- .../core/entity/monster/EntitySickBlaze.java | 2 +- .../EntityHydrofluoricAcidPotion.java | 3 -- .../projectile/EntitySulfuricAcidPotion.java | 3 -- .../core/gui/beta/Gui_ID_Registry.java | 7 --- .../core/gui/machine/GUI_DecayablesChest.java | 3 -- .../core/gui/machine/GUI_ProjectTable.java | 3 -- .../java/gtPlusPlus/core/item/ModItems.java | 13 ------ .../core/item/base/BaseItemComponent.java | 4 -- .../gtPlusPlus/core/item/base/CoreItem.java | 2 - .../core/item/base/cell/BaseItemCell.java | 2 - .../item/base/cell/BaseItemPlasmaCell.java | 9 ++-- .../item/base/ingots/BaseItemIngotHot.java | 5 +-- .../item/base/itemblock/FluidItemBlock.java | 3 -- .../item/base/itemblock/ItemBlockGtBlock.java | 5 --- .../base/itemblock/ItemBlockGtFrameBox.java | 3 -- .../item/base/itemblock/ItemBlockMeta.java | 4 +- .../item/base/itemblock/ItemBlockOre.java | 8 ++-- .../core/item/chemistry/AgriculturalChem.java | 7 +-- .../core/item/chemistry/CoalTar.java | 4 -- .../core/item/chemistry/GenericChem.java | 6 +-- .../core/item/crafting/ItemDummyResearch.java | 4 +- .../core/item/food/BaseItemMetaFood.java | 5 +-- .../core/item/general/ItemBlueprint.java | 8 +--- .../core/item/general/ItemCloakingDevice.java | 6 +-- .../core/item/general/ItemHealingDevice.java | 6 +-- .../core/item/general/ItemLavaFilter.java | 2 +- .../item/tool/staballoy/StaballoySpade.java | 5 --- .../gtPlusPlus/core/material/Material.java | 19 +++----- .../core/tileentities/base/TileBasicTank.java | 14 +++--- .../tileentities/base/TileEntityBase.java | 11 ++--- .../general/TileEntityDecayablesChest.java | 2 +- .../redstone/TileEntityRedstoneHandler.java | 2 +- .../machines/TileEntityPestKiller.java | 8 ++-- src/main/java/gtPlusPlus/core/util/Utils.java | 2 - .../java/gtPlusPlus/core/util/data/AES.java | 28 ++---------- .../gtPlusPlus/core/util/math/MathUtils.java | 2 - .../core/util/minecraft/MaterialUtils.java | 2 - .../core/util/minecraft/PlayerUtils.java | 7 +-- .../core/util/minecraft/RecipeUtils.java | 4 -- .../world/explosions/MiningExplosion.java | 20 ++++----- .../block/BlockDarkWorldSludgeFluid.java | 2 - .../everglades/chunk/ChunkProviderModded.java | 2 - .../gen/gt/WorldGen_GT_Ore_Layer.java | 22 +++------- .../nei/DecayableRecipeHandler.java | 2 +- .../plugin/agrichem/AlgaeDefinition.java | 2 - .../plugin/agrichem/BioRecipes.java | 19 +++----- .../vanilla/VanillaBackgroundMusicFix.java | 10 ++--- .../fixes/vanilla/VanillaBedHeightFix.java | 4 +- .../fixes/vanilla/music/MusicTocker.java | 4 +- .../ClassTransformer_Forge_ChunkLoading.java | 3 +- .../ClassTransformer_LWJGL_Keyboard.java | 6 +-- .../ClassTransformer_TT_ThaumicRestorer.java | 15 +++---- .../xmod/bop/blocks/base/LeavesBase.java | 2 +- .../xmod/bop/blocks/base/LogBase.java | 2 +- .../xmod/bop/blocks/base/SaplingBase.java | 2 +- .../forestry/bees/custom/CustomCombs.java | 4 +- .../forestry/bees/handler/GTPP_CombType.java | 10 ++--- .../forestry/bees/handler/GTPP_DropType.java | 8 ++-- .../bees/handler/GTPP_PollenType.java | 8 ++-- .../bees/handler/GTPP_PropolisType.java | 8 ++-- .../forestry/bees/items/FR_ItemRegistry.java | 3 -- .../bees/recipe/FR_Gregtech_Recipes.java | 12 +++--- .../api/enums/GregtechOrePrefixes.java | 27 +++++++----- .../gregtech/api/items/Gregtech_MetaTool.java | 2 - .../GT_MetaTileEntity_Hatch_InputBattery.java | 3 -- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 2 - .../GT_MetaTileEntity_Hatch_Turbine.java | 2 +- ..._MetaTileEntity_Hatch_TurbineProvider.java | 4 +- .../base/GregtechMeta_MultiBlockBase.java | 6 +-- .../GregtechRocketFuelGeneratorBase.java | 4 -- .../blocks/textures/TexturesGtBlock.java | 2 - .../common/covers/GTPP_Cover_Overflow.java | 2 - .../common/items/MetaCustomCoverItem.java | 8 ++-- .../items/MetaGeneratedGregtechItems.java | 3 -- .../common/render/GTPP_CapeRenderer.java | 6 +-- .../GT_MetaTileEntity_Boiler_Base.java | 2 - .../GregtechMetaTileEntity_RTG.java | 4 -- .../basic/GregtechMetaPollutionCreator.java | 4 -- .../basic/GregtechMetaPollutionDetector.java | 4 -- ...chMetaTileEntity_IndustrialDehydrator.java | 2 +- ...MetaTileEntity_IndustrialMultiMachine.java | 2 +- ...regtechMetaTileEntity_SteamCompressor.java | 2 +- .../GregtechMetaTileEntityTreeFarm.java | 3 +- ...gtechMetaTileEntity_AlloyBlastSmelter.java | 13 +++--- .../algae/GregtechMTE_AlgaePondBase.java | 3 +- .../turbines/GT_MTE_LargeTurbine_Gas.java | 5 --- ...T_MetaTileEntity_RedstoneCircuitBlock.java | 6 +-- .../loaders/RecipeGen_FluidCanning.java | 8 ++-- .../xmod/gregtech/loaders/RecipeGen_Ore.java | 4 +- .../gregtech/GregtechConduits.java | 43 +++++++++---------- .../block/TF_Block_Fluid_Ender.java | 2 +- .../tinkers/material/BaseTinkersMaterial.java | 13 ------ .../xmod/tinkers/util/TinkersUtils.java | 4 -- 118 files changed, 243 insertions(+), 538 deletions(-) diff --git a/src/main/java/gtPlusPlus/GenerateDictionaries.java b/src/main/java/gtPlusPlus/GenerateDictionaries.java index 492b68c1a4..03203242e3 100644 --- a/src/main/java/gtPlusPlus/GenerateDictionaries.java +++ b/src/main/java/gtPlusPlus/GenerateDictionaries.java @@ -118,8 +118,6 @@ public static File createFile(File aFile) { boolean blnCreated = false; log("Trying to use relative path " + aFile.getPath()); try { - // log("Trying to use path "+aFile.getCanonicalPath()); - // log("Trying to use absolute path "+aFile.getAbsolutePath()); blnCreated = aFile.createNewFile(); } catch (IOException ioe) { log("Error while creating a new empty file :" + ioe); diff --git a/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java b/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java index e2d30928f8..a5bf178330 100644 --- a/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java +++ b/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java @@ -1,6 +1,7 @@ package gtPlusPlus.api.objects.data; import java.io.Serializable; +import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; @@ -48,9 +49,7 @@ public AutoMap(List aList) { mInternalMap = new LinkedHashMap(); mInternalNameMap = new LinkedHashMap(); if (aList != null && aList.size() > 0) { - for (V obj : aList) { - add(obj); - } + this.addAll(aList); } } @@ -63,9 +62,7 @@ public AutoMap(Set aList) { mInternalMap = new LinkedHashMap(); mInternalNameMap = new LinkedHashMap(); if (aList != null && aList.size() > 0) { - for (V obj : aList) { - add(obj); - } + this.addAll(aList); } } @@ -78,9 +75,7 @@ public AutoMap(Collection aList) { mInternalMap = new LinkedHashMap(); mInternalNameMap = new LinkedHashMap(); if (aList != null && aList.size() > 0) { - for (V obj : aList) { - add(obj); - } + this.addAll(aList); } } @@ -93,9 +88,7 @@ public AutoMap(V[] aArray) { mInternalMap = new LinkedHashMap(); mInternalNameMap = new LinkedHashMap(); if (aArray != null && aArray.length > 0) { - for (V obj : aArray) { - add(obj); - } + this.addAll(Arrays.asList(aArray)); } } diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java index cd6edf5411..ec06d05310 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java @@ -238,9 +238,7 @@ public Set getValidNeighboursAndSelf() { AutoMap h = getSimilarNeighbour(true); h.put(this); Set result = new HashSet(); - for (BlockPos f : h.values()) { - result.add(f); - } + result.addAll(h.values()); return result; } } diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java index 4af3df18ba..26969c8f3b 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java @@ -241,9 +241,7 @@ public Set getValidNeighboursAndSelf() { AutoMap h = getSimilarNeighbour(true); h.put(this); Set result = new HashSet(); - for (BlockPos f : h.values()) { - result.add(f); - } + result.addAll(h.values()); return result; } diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java index be158a38cd..492aa56283 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java @@ -22,12 +22,6 @@ public class FakeWorld implements IBlockAccess { public HashMap mFakeWorldData = new HashMap(); - /** - * Must be an odd number - */ - private int aWorldSize = 99; - - private final int aDistanceFromOrigin; private final int aWorldHeight; public FakeWorld() { @@ -38,8 +32,11 @@ public FakeWorld(int aSize) { if (MathUtils.isNumberEven(aSize)) { aSize++; } - aWorldSize = aSize; - aDistanceFromOrigin = ((aWorldSize - 1) / 2); + /** + * Must be an odd number + */ + int aWorldSize = aSize; + int aDistanceFromOrigin = ((aWorldSize - 1) / 2); aWorldHeight = aDistanceFromOrigin >= 255 ? 255 : aDistanceFromOrigin; Logger.WARNING("Created a Fake World with data:"); Logger.WARNING("World Size: " + aWorldSize); diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java index 6fe2f9ddb5..d68ef1a93f 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java @@ -33,7 +33,7 @@ public final String getInfoData() { public abstract boolean generateRecipes(); - private final void init() { + private void init() { items(); blocks(); fluids(); diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java index 12916af64b..720bb4d66b 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java @@ -72,11 +72,6 @@ public ShapedRecipe(Object[] aInputs, ItemStack aOutput) { + " has incorrect number of inputs. Size: " + aInputs.length + "."); - // Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(1)); - // Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(2)); - // Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(3)); - // Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(4)); - // Logger.RECIPE("Reciped exists at location: "+ReflectionUtils.getMethodName(1)); } // Build a Pair for each slot diff --git a/src/main/java/gtPlusPlus/api/objects/random/XSTR.java b/src/main/java/gtPlusPlus/api/objects/random/XSTR.java index 087f9535ce..da76ca8e10 100644 --- a/src/main/java/gtPlusPlus/api/objects/random/XSTR.java +++ b/src/main/java/gtPlusPlus/api/objects/random/XSTR.java @@ -28,7 +28,6 @@ public class XSTR extends Random implements Cloneable { private static final long serialVersionUID = 6208727693524452904L; private long seed; - private long last; private static final long GAMMA = 0x9e3779b97f4a7c15L; private static final int PROBE_INCREMENT = 0x9e3779b9; private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL; @@ -217,11 +216,11 @@ public int nextInt(final int bound) { * * (long) r) >> 31); } else { for (int u = r; u - (r = u % bound) + m < 0; u = next(31)) ; } return r; */ // speedup, new nextInt ~+40% - this.last = this.seed ^ (this.seed << 21); - this.last ^= (this.last >>> 35); - this.last ^= (this.last << 4); - this.seed = this.last; - final int out = (int) this.last % newBound; + long last = this.seed ^ (this.seed << 21); + last ^= (last >>> 35); + last ^= (last << 4); + this.seed = last; + final int out = (int) last % newBound; return (out < 0) ? -out : out; } diff --git a/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java b/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java index 7f0a504a79..210fd5d974 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java +++ b/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java @@ -43,12 +43,6 @@ public abstract class BasicTileBlockWithTooltip extends BlockContainer implement @SideOnly(Side.CLIENT) private AutoMap> mSidedTextureArray; - /** - * Holds the data for the six sides, each side holds an array of data for each respective meta. - */ - @SideOnly(Side.CLIENT) - private AutoMap> mSidedTexturePathArray; - /** * Does this block have any meta at all? * @@ -148,7 +142,7 @@ public BasicTileBlockWithTooltip(Material aBlockMat) { * * @return Sanitized {@link String}, containing no spaces or illegal characters. */ - private final String getTileEntityNameForTexturePathing() { + private String getTileEntityNameForTexturePathing() { return Utils.sanitizeString(getTileEntityName().replace(" ", "")); } @@ -175,13 +169,16 @@ public IIcon getIcon(IBlockAccess aWorld, int aX, int aY, int aZ, int ordinalSid } @SideOnly(Side.CLIENT) - private final void handleTextures() { + private void handleTextures() { Logger.INFO("[TeTexture] Building Texture Maps for " + getTileEntityName() + "."); // Init on the Client side only, to prevent Field initialisers existing in the Server side bytecode. mSidedTextureArray = new AutoMap<>(); - mSidedTexturePathArray = new AutoMap<>(); + /** + * Holds the data for the six sides, each side holds an array of data for each respective meta. + */ + AutoMap> mSidedTexturePathArray = new AutoMap<>(); // Store them in forge order // DOWN, UP, NORTH, SOUTH, WEST, EAST diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java index e5c1fbf804..33f4398f84 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java @@ -75,8 +75,6 @@ public IIcon getIcon(int ordinalSide, int meta) { public void registerBlockIcons(IIconRegister iicon) { this.textureArray[0] = iicon.registerIcon(GTPlusPlus.ID + ":" + "fluid/" + "Fluid_" + this.name + "_Still"); this.textureArray[1] = iicon.registerIcon(GTPlusPlus.ID + ":" + "fluid/" + "Fluid_" + this.name + "_Flow"); - // IconRegistry.addIcon("Fluid" + this.name, this.modName + ":fluid/Fluid_" + this.name + "_Still", arg0); - // IconRegistry.addIcon("Fluid" + this.name + "1", this.modName + ":fluid/Fluid_" + this.name + "_Flow", arg0); } @Override diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java index 66bb7ffb7e..633a0cbfb9 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java @@ -75,8 +75,6 @@ protected BlockBaseModular(final String unlocalizedName, final String blockMater this.thisBlockType = blockType.name().toUpperCase(); this.setBlockName(this.getUnlocalizedProperName()); int fx = getBlockTypeMeta(); - // ItemBlockGtBlock.sNameCache.put("block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase(), - // GetProperName()); GameRegistry.registerBlock( this, ItemBlockGtBlock.class, diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java index f62fc50a69..37c1309505 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java @@ -65,8 +65,6 @@ public static class TileEntitySuperLight extends TileEntity { private long mLastUpdateTick = 0; - private int mLitBlockCount = 0; - private int[][][][] aLitBlocks = new int[50][10][50][1]; private boolean mPowered = false; @@ -208,7 +206,7 @@ else if (!enable && aLight > 0) { } } } - mLitBlockCount = aLitCounter; + int mLitBlockCount = aLitCounter; doLargeBlockUpdate(aBlocksToUpdate); } @@ -217,8 +215,6 @@ public void doLargeBlockUpdate(AutoMap aUpdateMap) { return; } for (BlockPos p : aUpdateMap) { - // this.worldObj.markBlockForUpdate(p.xPos, p.yPos, p.zPos); - // this.worldObj.markBlocksDirtyVertical(p_72975_1_, p_72975_2_, p_72975_3_, p_72975_4_); } } } diff --git a/src/main/java/gtPlusPlus/core/block/general/LightGlass.java b/src/main/java/gtPlusPlus/core/block/general/LightGlass.java index 64b2455e41..96a3307d62 100644 --- a/src/main/java/gtPlusPlus/core/block/general/LightGlass.java +++ b/src/main/java/gtPlusPlus/core/block/general/LightGlass.java @@ -23,11 +23,9 @@ public class LightGlass extends BlockAir { private int state = 0; - private final int a = 255; private int r = 255; private int g = 0; private int b = 0; - private int hex; public LightGlass(final boolean bool) { super(); @@ -120,8 +118,9 @@ public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, this.state = 0; } } - this.hex = (this.a << 24) + (this.r << 16) + (this.g << 8) + (this.b); - return this.hex; + int a = 255; + int hex = (a << 24) + (this.r << 16) + (this.g << 8) + (this.b); + return hex; } /** diff --git a/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java b/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java index 0fc3b5b666..bd13be9635 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java +++ b/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java @@ -24,14 +24,13 @@ public class CircuitProgrammer extends BasicTileBlockWithTooltip { - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 4; - @Override public int getTooltipID() { - return this.mTooltipID; + /** + * Determines which tooltip is displayed within the itemblock. + */ + int mTooltipID = 4; + return mTooltipID; } public CircuitProgrammer() { diff --git a/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java b/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java index 1a2dba6e65..a0250b447c 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java +++ b/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java @@ -38,16 +38,15 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip { @SideOnly(Side.CLIENT) private IIcon textureFront; - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 5; - public final int field_149956_a = 0; @Override public int getTooltipID() { - return this.mTooltipID; + /** + * Determines which tooltip is displayed within the itemblock. + */ + int mTooltipID = 5; + return mTooltipID; } public DecayablesChest() { diff --git a/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java b/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java index 1fb1e97703..ae73e799d8 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java +++ b/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java @@ -36,14 +36,13 @@ public class FishTrap extends BlockContainer implements ITileTooltip { @SideOnly(Side.CLIENT) private IIcon textureFront; - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 0; - @Override public int getTooltipID() { - return this.mTooltipID; + /** + * Determines which tooltip is displayed within the itemblock. + */ + int mTooltipID = 0; + return mTooltipID; } public FishTrap() { diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java index 68532bc478..15e2d88695 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java @@ -37,14 +37,13 @@ public class Machine_PestKiller extends BlockContainer implements ITileTooltip { @SideOnly(Side.CLIENT) private IIcon textureFront; - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 6; - @Override public int getTooltipID() { - return this.mTooltipID; + /** + * Determines which tooltip is displayed within the itemblock. + */ + int mTooltipID = 6; + return mTooltipID; } public Machine_PestKiller() { diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java index 4d34d96b21..954730ddc0 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java @@ -42,14 +42,13 @@ public class Machine_ProjectTable extends BlockContainer implements ITileTooltip @SideOnly(Side.CLIENT) private IIcon textureFront; - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 3; - @Override public int getTooltipID() { - return this.mTooltipID; + /** + * Determines which tooltip is displayed within the itemblock. + */ + int mTooltipID = 3; + return mTooltipID; } public Machine_ProjectTable() { diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java index 52ddb7cc10..e389c174c8 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java @@ -109,9 +109,6 @@ public void playJukeboxRecord(World aWorld, int aX, int aY, int aZ) { if (itemstack != null) { aWorld.playAuxSFX(1005, aX, aY, aZ, Item.getIdFromItem(itemstack.getItem())); - // aWorld.playRecord((String) null, aX, aY, aZ); - // tileentityjukebox.func_145857_a((ItemStack) null); - // aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 0, 2); /* * float f = 0.7F; double d0 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; * double d1 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.2D + 0.6D; double d2 diff --git a/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java index 982b29ed97..be1a134048 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java +++ b/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java @@ -26,14 +26,13 @@ public class VolumetricFlaskSetter extends BasicTileBlockWithTooltip { - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 8; - @Override public int getTooltipID() { - return this.mTooltipID; + /** + * Determines which tooltip is displayed within the itemblock. + */ + int mTooltipID = 8; + return mTooltipID; } @Override diff --git a/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java b/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java index 55227e6ab0..002a582f90 100644 --- a/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java +++ b/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java @@ -27,8 +27,6 @@ public class Container_DecayablesChest extends Container { public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All // slots - private final int[] slotStorage = new int[15]; - public Container_DecayablesChest(final InventoryPlayer inventory, final TileEntityDecayablesChest te) { this.tile_entity = te; this.inventoryChest = te.getInventory(); @@ -46,7 +44,8 @@ public Container_DecayablesChest(final InventoryPlayer inventory, final TileEnti // Storage Side for (var6 = 0; var6 < 3; var6++) { for (var7 = 0; var7 < 5; var7++) { - this.slotStorage[o] = o; + int[] slotStorage = new int[15]; + slotStorage[o] = o; this.addSlotToContainer(new Slot(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); } } diff --git a/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java b/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java index 3dd73a1aaf..1e57a89ef3 100644 --- a/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java +++ b/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java @@ -28,8 +28,6 @@ public class Container_FishTrap extends Container { public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All // slots - private final int[] slotStorage = new int[15]; - public Container_FishTrap(final InventoryPlayer inventory, final TileEntityFishTrap te) { this.tile_entity = te; this.inventoryChest = te.getInventory(); @@ -47,7 +45,8 @@ public Container_FishTrap(final InventoryPlayer inventory, final TileEntityFishT // Storage Side for (var6 = 0; var6 < 3; var6++) { for (var7 = 0; var7 < 5; var7++) { - this.slotStorage[o] = o; + int[] slotStorage = new int[15]; + slotStorage[o] = o; this.addSlotToContainer(new SlotNoInput(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); } } diff --git a/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java b/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java index 4b71fefdb9..a98097967a 100644 --- a/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java +++ b/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java @@ -65,8 +65,6 @@ public Container_ProjectTable(final InventoryPlayer inventory, final TileEntityP // Storage Side for (var6 = 0; var6 < 3; ++var6) { for (var7 = 0; var7 < 3; ++var7) { - // Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * - // 18)); this.addSlotToContainer( new Slot(this.craftMatrix, nextFreeSlot, 8 + 18 + (var7 * 18), 8 + (var6 * 18))); this.slotGrid[o] = nextFreeSlot; diff --git a/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java b/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java index 1a01f47ef5..fa0d3844b2 100644 --- a/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java +++ b/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java @@ -8,7 +8,6 @@ public class AddToCreativeTab { public static CreativeTabs tabBlock; public static CreativeTabs tabMisc; - public static CreativeTabs tabCombat; public static CreativeTabs tabTools; public static CreativeTabs tabMachines; public static CreativeTabs tabOther; diff --git a/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java index 4be3605ff1..06f881b0ad 100644 --- a/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java +++ b/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java @@ -20,8 +20,6 @@ public class InternalEntityRegistry { public static void registerEntities() { Logger.INFO("Registering GT++ Entities."); - // EntityRegistry.registerGlobalEntityID(EntityPrimedMiningExplosive.class, "MiningCharge", - // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(125, 125, 125)); EntityRegistry.registerModEntity( EntityPrimedMiningExplosive.class, "MiningCharge", @@ -31,9 +29,6 @@ public static void registerEntities() { 20, true); - // EntityRegistry.registerGlobalEntityID(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", - // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(200, 0, 200), Utils.rgbtoHexValue(125, 125, - // 125)); EntityRegistry.registerModEntity( EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", @@ -43,8 +38,6 @@ public static void registerEntities() { 20, true); - // EntityRegistry.registerGlobalEntityID(EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric", - // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(255, 255, 255)); EntityRegistry.registerModEntity( EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric", @@ -54,8 +47,6 @@ public static void registerEntities() { 20, true); - // EntityRegistry.registerGlobalEntityID(EntityToxinballSmall.class, "toxinBall", - // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 25, 0), Utils.rgbtoHexValue(0, 125, 0)); EntityRegistry.registerModEntity( EntityToxinballSmall.class, "toxinBall", @@ -65,8 +56,6 @@ public static void registerEntities() { 20, true); - // EntityRegistry.registerGlobalEntityID(EntityStaballoyConstruct.class, "constructStaballoy", - // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 75, 0), Utils.rgbtoHexValue(50, 220, 50)); EntityRegistry.registerModEntity( EntityStaballoyConstruct.class, "constructStaballoy", diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java b/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java index 933109730c..39931b931d 100644 --- a/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java @@ -22,7 +22,6 @@ public class EntitySickBlaze extends EntityMob { private int heightOffsetUpdateTime; private int field_70846_g; - private final int mDataWatcherID = 30; public EntitySickBlaze(World p_i1731_1_) { super(p_i1731_1_); @@ -41,6 +40,7 @@ protected void applyEntityAttributes() { @Override protected void entityInit() { super.entityInit(); + int mDataWatcherID = 30; this.dataWatcher.addObject(mDataWatcherID, new Byte((byte) 0)); } diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java index da848575a3..fa1d0e30d5 100644 --- a/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java @@ -109,9 +109,6 @@ private boolean ravage(BlockPos blockpos) { 0.0D, 0.0D); - // GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), - // mPol); - if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium) { worldObj.setBlock(i, j + 1, h, Blocks.fire); worldObj.setBlock(i, j, h, Blocks.dirt); diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java index 3c865de497..352d97b837 100644 --- a/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java @@ -98,9 +98,6 @@ private boolean ravage(BlockPos blockpos) { 0.0D, 0.0D); - // GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), - // mPol); - if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium) { worldObj.setBlock(i, j + 1, h, Blocks.fire); worldObj.setBlock(i, j, h, Blocks.dirt); diff --git a/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java b/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java index 601f91b3e9..ba6cc14d68 100644 --- a/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java +++ b/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java @@ -13,13 +13,6 @@ public class Gui_ID_Registry { private static int nextId = 0; static { - // registerGuiHandlers(Gui_Types.Tile, Arrays.asList(new Class[] {TileAlveary.class})); - // registerGuiHandlers(MU_GuiType.Item, Arrays.asList(new Class[] { ItemBackpack.class, - // ItemBackpackNaturalist.class, ItemBeealyzer.class, ItemCatalogue.class, ItemFlutterlyzer.class, - // ItemHabitatLocator.class, ItemImprinter.class, ItemInfuser.class, ItemLetter.class, ItemSolderingIron.class, - // ItemTreealyzer.class })); - // registerGuiHandlers(MU_GuiType.Entity, Arrays.asList(new Class[] { EntityMinecartApiary.class, - // EntityMinecartBeehouse.class })); } private static void registerGuiHandlers(final Gui_Types MU_GuiType, diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java index 19d912b30f..eb019b500f 100644 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java @@ -26,9 +26,6 @@ public GUI_DecayablesChest(final InventoryPlayer player_inventory, final TileEnt @Override protected void drawGuiContainerForegroundLayer(final int i, final int j) { - // this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - // this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, - // 4210752); } diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java index f4a3c628de..db8019a93a 100644 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java @@ -27,9 +27,6 @@ public GUI_ProjectTable(final InventoryPlayer player_inventory, final TileEntity @Override protected void drawGuiContainerForegroundLayer(final int i, final int j) { - // this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - // this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, - // 4210752); } diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index ee462146fa..06787b48dd 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -377,9 +377,6 @@ public static void init() { MaterialGenerator.generate(ALLOY.TUNGSTEN_TITANIUM_CARBIDE); // LFTR Fuel components - // MaterialGenerator.generate(MISC_MATERIALS.HYDROXIDE); //LFTR fuel component - // MaterialGenerator.generate(MISC_MATERIALS.AMMONIA); //LFTR fuel component - // MaterialGenerator.generate(MISC_MATERIALS.AMMONIUM); //LFTR fuel component MaterialGenerator.generateNuclearDusts(FLUORIDES.AMMONIUM_BIFLUORIDE); // LFTR fuel component MaterialGenerator.generateNuclearDusts(FLUORIDES.BERYLLIUM_HYDROXIDE); // LFTR fuel component // MaterialGenerator.generateNuclearDusts(FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE); // LFTR fuel component @@ -612,12 +609,6 @@ public static void init() { // fluidLftrCore4 = FluidUtils.addGTFluidNoPrefix("LiFBeF2UF4", "LiFBeF2UF4", new short[]{50, 255, 100, 100}, 0, // 800, null, CI.emptyCells(1), 1000, true); // LFTR Blanket Fluid Processing - // fluidLftrBlanket1 = FluidUtils.addGTFluidNoPrefix("LiFThF4", "LiFThF4", new short[]{50, 150, 255, 50}, 0, - // 500, null, CI.emptyCells(1), 1000, true); - // fluidLftrBlanket2 = FluidUtils.addGTFluidNoPrefix("LiFBeF2ThF4", "LiFBeF2ThF4", new short[]{100, 150, 100, - // 100}, 0, 500, null, CI.emptyCells(1), 1000, true); - // fluidLftrBlanket3 = FluidUtils.addGTFluidNoPrefix("UF6F2", "UF6F2", new short[]{10, 150, 10, 100}, 0, 500, - // null, CI.emptyCells(1), 1000, true); fluidNuclearWaste = FluidUtils.addGTFluidNoPrefix( "nuclear.waste", "Nuclear Waste", @@ -665,10 +656,6 @@ public static void init() { * GT_OreDictUnificator.registerOre("dustZrF4", * ItemUtils.getItemStackOfAmountFromOreDict("dustZirconiumTetrafluoride", 1)); */ - // GT_OreDictUnificator.registerOre("cellZrF4", - // ItemUtils.getItemStackOfAmountFromOreDict("cellZirconiumTetrafluoride", 1)); - // GT_OreDictUnificator.registerOre("dustZrF4", - // ItemUtils.getItemStackOfAmountFromOreDict("dustZirconiumTetrafluoride", 1)); fluidZrF4 = FluidUtils.generateFluidNoPrefix( "ZirconiumTetrafluoride", "Zirconium Tetrafluoride", diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index 9272c2a8ac..75571d3299 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -79,11 +79,7 @@ public BaseItemComponent(final Material material, final ComponentTypes component GT_OreDictUnificator.registerOre("gear" + material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); } if (Thaumcraft.isModLoaded()) { - // ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), - // TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1); if (componentMaterial.isRadioactive) { - // ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), - // TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel); } } registerComponent(); diff --git a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java index b1b9e05b9e..f328479b70 100644 --- a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java +++ b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java @@ -221,8 +221,6 @@ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, fi list.add(tooltip); } else break; } - // list.add(this.descColour+this.itemDescription); - // super.addInformation(stack, aPlayer, list, bool); } @Override diff --git a/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemCell.java b/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemCell.java index cd1331be55..99b6407249 100644 --- a/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemCell.java +++ b/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemCell.java @@ -24,8 +24,6 @@ public class BaseItemCell extends BaseItemComponent { public BaseItemCell(final Material material) { super(material, BaseItemComponent.ComponentTypes.CELL); this.fluidColour = (short[]) material.getRGBA(); - // FluidContainerRegistry.registerFluidContainer(material.getFluid(1000), ItemUtils.getSimpleStack(this), - // Ic2Items.cell.copy()); } public BaseItemCell(final String unlocalName, final String localName, final short[] RGBa) { diff --git a/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java b/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java index cca8113e91..54a5104a97 100644 --- a/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java +++ b/src/main/java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java @@ -21,12 +21,10 @@ public class BaseItemPlasmaCell extends BaseItemComponent { private IIcon overlay; ComponentTypes PlasmaCell = ComponentTypes.PLASMACELL; private int tickCounter = 0; - private final int tickCounterMax = 200; - private final short[] fluidColour; public BaseItemPlasmaCell(final Material material) { super(material, ComponentTypes.PLASMACELL); - this.fluidColour = (short[]) material.getRGBA(); + short[] fluidColour = (short[]) material.getRGBA(); } @Override @@ -63,9 +61,10 @@ public void onUpdate(final ItemStack iStack, final World world, final Entity ent final boolean p_77663_5_) { if (this.componentMaterial != null) { if (!world.isRemote) { - if (this.tickCounter < this.tickCounterMax) { + int tickCounterMax = 200; + if (this.tickCounter < tickCounterMax) { this.tickCounter++; - } else if (this.tickCounter >= this.tickCounterMax) { + } else if (this.tickCounter >= tickCounterMax) { entityHolding.attackEntityFrom(DamageSource.onFire, 2); this.tickCounter = 0; } diff --git a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java index 94a55d3733..fa7920e181 100644 --- a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java +++ b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java @@ -28,7 +28,6 @@ public class BaseItemIngotHot extends BaseItemIngot { private final ItemStack outputIngot; private final int tickCounter = 0; private final int tickCounterMax = 200; - private final int mTier; private IIcon base; private IIcon overlay; @@ -37,7 +36,7 @@ public BaseItemIngotHot(final Material material) { super(material, ComponentTypes.HOTINGOT); this.setTextureName(GTPlusPlus.ID + ":" + "itemIngotHot"); this.outputIngot = material.getIngot(1); - this.mTier = material.vTier; + int mTier = material.vTier; this.generateRecipe(); } @@ -91,8 +90,6 @@ public void registerIcons(final IIconRegister i) { } else { this.base = i.registerIcon( GTPlusPlus.ID + ":" + "item" + BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()); - // this.overlay = i.registerIcon(GTPlusPlus.ID + ":" + - // "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()+"_Overlay"); } // this.overlay = cellMaterial.getFluid(1000).getFluid().get } diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java index 8c2278d50b..b4efc07500 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java @@ -22,9 +22,6 @@ public FluidItemBlock(final Block block) { this.blockColour = this.baseBlock.getRenderColor(1); this.name = this.baseBlock.getLocalizedName().replace("tile", "").replace("fluid", "").replace("name", "") .replace("block", "").replace(".", ""); - // GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", - // "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", - // ""), UtilsItems.getSimpleStack(this)); } public int getRenderColor(final int aMeta) { diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java index cde5ec3f24..072eb95e7c 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java @@ -87,11 +87,6 @@ public String GetProperName() { @Override public String getItemStackDisplayName(ItemStack stack) { return this.thisBlock.getLocalizedName(); - // Logger.INFO("Unlocal Name: "+this.getUnlocalizedName()); - // String aFormattedLangName = GetProperName(); - // return - // GT_LanguageManager.addStringLocalization("block."+mMaterial.getUnlocalizedName()+"."+this.thisBlockType.name().toLowerCase()+".name", - // aFormattedLangName); } public int getRenderColor(final int aMeta) { diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java index 535a57f6bf..cad83a1e9e 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java @@ -37,9 +37,6 @@ public ItemBlockGtFrameBox(final Block block) { sRadiation = 0; } - // GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", - // "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", - // ""), ItemUtils.getSimpleStack(this)); } public int getRenderColor(final int aMeta) { diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java index 30f63774f8..762d148125 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java @@ -39,9 +39,7 @@ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, fi if (!aTooltips.isEmpty()) { AutoMap h = aTooltips.get(stack.getItemDamage()); if (h != null && !h.isEmpty()) { - for (String s : h) { - list.add(s); - } + list.addAll(h); } } } diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java index bebc931d48..5b37ecc371 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java @@ -25,20 +25,20 @@ public class ItemBlockOre extends ItemBlock { - private final BlockBaseOre mThisOre; private final Material mThisMaterial; private final int mThisRadiation; private final int mThisColour; public ItemBlockOre(final Block block) { super(block); + BlockBaseOre mThisOre; if (block instanceof BlockBaseOre) { - this.mThisOre = (BlockBaseOre) block; - this.mThisMaterial = this.mThisOre.getMaterialEx(); + mThisOre = (BlockBaseOre) block; + this.mThisMaterial = mThisOre.getMaterialEx(); this.mThisRadiation = this.mThisMaterial.vRadiationLevel; this.mThisColour = this.mThisMaterial.getRgbAsHex(); } else { - this.mThisOre = null; + mThisOre = null; this.mThisMaterial = null; this.mThisRadiation = 0; this.mThisColour = Utils.rgbtoHexValue(255, 255, 255); diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java index d20f215ba3..c7f6449898 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java @@ -43,9 +43,6 @@ public class AgriculturalChem extends ItemPackage { - private static boolean aBOP; - private static boolean aTiCon; - private static final AutoMap mBloodFluids = new AutoMap(); /** @@ -291,8 +288,8 @@ public void fluids() { public AgriculturalChem() { super(); - aBOP = BiomesOPlenty.isModLoaded(); - aTiCon = TinkerConstruct.isModLoaded(); + boolean aBOP = BiomesOPlenty.isModLoaded(); + boolean aTiCon = TinkerConstruct.isModLoaded(); Logger.INFO("Adding Agrochemical content"); diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java index a6047efab8..7bbd78d3f5 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java @@ -156,8 +156,6 @@ public static void recipeCoalToCoalTar() { private static void recipeCoalTarToCoalTarOil() { // v - Distill (60% Tar oil/15% Naphtha/20% Ethylbenzene/5% Anthracene) // Create Coal Tar Oil - // FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, - // null); GT_Values.RA.addDistilleryRecipe( CI.getNumberedCircuit(1), // Circuit FluidUtils.getFluidStack("fluid.coaltar", 1000), // aInput @@ -299,8 +297,6 @@ public void items() { Utils.rgbtoHexValue(125, 125, 125)); // v - Dehydrate // Lithium Peroxide - 2 LiOOH → Li2O2 + H2O2 + 2 H2O - // Lithium_Peroxide = FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new - // short[]{135, 135, 135, 100}, null, null); } @Override diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java index 0a9e69d771..7c4cbdb759 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java @@ -100,8 +100,6 @@ public class GenericChem extends ItemPackage { public static ItemGenericChemBase mGenericChemItem1; public static Item mAdvancedCircuit; - private ItemStack mCatalystCarrier; - public static ItemStack mRedCatalyst; public static ItemStack mYellowCatalyst; public static ItemStack mBlueCatalyst; @@ -148,8 +146,6 @@ public void items() { "Phenolic Resin", "HOC6H4CH2OH", Utils.rgbtoHexValue(80, 40, 40))[0]; - // MaterialGenerator.generate(BAKELITE, false); - // MaterialGenerator.generate(NYLON, false); MaterialGenerator.generate(TEFLON, false); mGenericChemItem1 = new ItemGenericChemBase(); @@ -165,7 +161,7 @@ public void items() { public void registerItemStacks() { - mCatalystCarrier = ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 13, 1); + ItemStack mCatalystCarrier = ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 13, 1); mRedCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 0, 1); mYellowCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 1, 1); diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java index 724b99bd4f..5a8f939a6a 100644 --- a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -34,12 +34,10 @@ public static enum ASSEMBLY_LINE_RESEARCH { RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"); private final String mName; - private final String mDesc; private ASSEMBLY_LINE_RESEARCH(String aName, String aDesc) { mName = aName; - mDesc = aDesc; - ModItems.itemDummyResearch.register(mName, mDesc); + ModItems.itemDummyResearch.register(mName, aDesc); } } diff --git a/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java b/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java index ec8064ab19..72e21c9304 100644 --- a/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java +++ b/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java @@ -3,6 +3,7 @@ import static gregtech.api.enums.Mods.GTPlusPlus; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -428,9 +429,7 @@ private static AutoMap getPotionEffectPackage(PotionEffectP private static ArrayList getOreDictNamesAsArrayList(String... aOreDictNames) { ArrayList aPackage = new ArrayList(); if (aOreDictNames != null && aOreDictNames.length > 0) { - for (String aEffect : aOreDictNames) { - aPackage.add(aEffect); - } + aPackage.addAll(Arrays.asList(aOreDictNames)); } return aPackage; } diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java index 9407f5c5ad..2289bdce77 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java @@ -235,17 +235,13 @@ public boolean createNBT(final ItemStack itemStack) { && !itemStack.stackTagCompound.getString("mName").equals("")) { // Has Blueprint but invalid name set Logger.WARNING("Has Blueprint but invalid name set"); - // itemStack.stackTagCompound = null; - // createNBT(itemStack); - return false; + return false; } else if (!itemStack.stackTagCompound.getBoolean("mBlueprint") && itemStack.stackTagCompound.getString("mName").equals("")) { // Has no Blueprint, but strangely has a name Logger.WARNING("Has no Blueprint, but strangely has a name"); - // itemStack.stackTagCompound = null; - // createNBT(itemStack); - return false; + return false; } return false; } else if (!itemStack.hasTagCompound()) { diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemCloakingDevice.java b/src/main/java/gtPlusPlus/core/item/general/ItemCloakingDevice.java index e0949f830a..de13dded04 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemCloakingDevice.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemCloakingDevice.java @@ -31,7 +31,6 @@ @Optional.Interface(iface = "baubles.api.BaubleType", modid = Names.BAUBLES) }) public class ItemCloakingDevice extends Item implements IElectricItem, IElectricItemManager, IBauble { - private final String unlocalizedName = "personalCloakingDevice"; private final ItemStack thisStack; private static final int maxValueEU = 10000 * 20 * 500; protected double chargeEU = 0; @@ -39,7 +38,8 @@ public class ItemCloakingDevice extends Item implements IElectricItem, IElectric public ItemCloakingDevice(final double charge) { this.chargeEU = charge; this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setUnlocalizedName(this.unlocalizedName); + String unlocalizedName = "personalCloakingDevice"; + this.setUnlocalizedName(unlocalizedName); this.setMaxStackSize(1); this.setTextureName(GTPlusPlus.ID + ":" + "personalCloakingDevice"); this.thisStack = ItemUtils.getSimpleStack(this); @@ -47,7 +47,7 @@ public ItemCloakingDevice(final double charge) { if (charge == (10000 * 20 * 500)) { this.setDamage(this.thisStack, 13); } - GameRegistry.registerItem(this, this.unlocalizedName + "-" + charge); + GameRegistry.registerItem(this, unlocalizedName + "-" + charge); } @Override diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java b/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java index d5b5431927..42ff5a49c4 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java @@ -37,16 +37,16 @@ @Optional.Interface(iface = "baubles.api.BaubleType", modid = Mods.Names.BAUBLES) }) public class ItemHealingDevice extends Item implements IElectricItem, IElectricItemManager, IBauble { - private final String unlocalizedName = "personalHealingDevice"; private static final int maxValueEU = 1000000000; protected double chargeEU = 0; public ItemHealingDevice() { this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setUnlocalizedName(this.unlocalizedName); + String unlocalizedName = "personalHealingDevice"; + this.setUnlocalizedName(unlocalizedName); this.setMaxStackSize(1); this.setTextureName(GTPlusPlus.ID + ":" + "personalCloakingDevice"); - GameRegistry.registerItem(this, this.unlocalizedName); + GameRegistry.registerItem(this, unlocalizedName); } @Override diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java b/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java index 55b05cf4ea..a883700190 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java @@ -35,7 +35,7 @@ public ItemLavaFilter() { setGregtechItemList(); } - private final boolean setGregtechItemList() { + private boolean setGregtechItemList() { ItemList.Component_LavaFilter.set(this); return ItemList.Component_LavaFilter.get(1) != null ? true : false; } diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java index 44cf3046d7..e502f58ad7 100644 --- a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java @@ -217,9 +217,6 @@ private void GetDestroyOrientation(EntityPlayer player, final String FACING, fin // int heldItemDurability = heldItem.getDamage(1); Logger.WARNING("Total Loss: " + (int) DURABILITY_LOSS); - // heldItem.setDamage(heldStack, DURABILITY_LOSS); - // Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); - // Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack)); Logger.WARNING("1x: " + (heldItem.getItemDamage())); final int itemdmg = heldItem.getItemDamage(); final int maxdmg = heldItem.getMaxDamage(); @@ -316,8 +313,6 @@ public int removeBlockAndDropAsItem(final World world, final int X, final int Y, public boolean checkFacing(final ItemStack aStack, final EntityPlayer aPlayer, final World world) { if (aPlayer != null) { final int direction = MathHelper.floor_double((aPlayer.rotationYaw * 4F) / 360F + 0.5D) & 3; - // Utils.LOG_WARNING("Player - F: "+direction); - // Utils.LOG_WARNING("Player - getLookVec(): "+localPlayer.getLookVec().yCoord); /* * if (localPlayer.getLookVec().yCoord > 0){ localPlayer.getLookVec().yCoord; } diff --git a/src/main/java/gtPlusPlus/core/material/Material.java b/src/main/java/gtPlusPlus/core/material/Material.java index 5390ca28a3..4a948190a5 100644 --- a/src/main/java/gtPlusPlus/core/material/Material.java +++ b/src/main/java/gtPlusPlus/core/material/Material.java @@ -74,7 +74,6 @@ public class Material { private int boilingPointC; private long vProtons; private long vNeutrons; - private long vMass; public int smallestStackSizeWhenProcessing; // Add a check for <=0 || > 64 public int vTier; public int vVoltageMultiplier; @@ -85,8 +84,6 @@ public class Material { public int vToolQuality; public int vHarvestLevel; - private TC_Aspect_Wrapper[] vAspects; - public BaseTinkersMaterial vTiConHandler; public short werkstoffID; @@ -419,10 +416,8 @@ public Material(final String materialName, final MaterialState defaultState, fin for (int mnh = 0; mnh < 3; mnh++) { AutoMap aDataSet = new AutoMap(); Set set4 = new HashSet(); - for (Material u : mMaterialSet) { - // if (u.getState() == MaterialState.ORE || u.getState() == MaterialState.SOLID) - set4.add(u); - } + // if (u.getState() == MaterialState.ORE || u.getState() == MaterialState.SOLID) + set4.addAll(mMaterialSet); for (Material e : set4) { aDataSet.put(e.getRGB()[mnh]); } @@ -531,9 +526,9 @@ public Material(final String materialName, final MaterialState defaultState, fin this.vNeutrons = this.calculateNeutrons(); } - this.vAspects = null; + TC_Aspect_Wrapper[] vAspects = null; - this.vMass = this.getMass(); + long vMass = this.getMass(); // Sets tool Durability if (durability != 0) { @@ -702,7 +697,7 @@ public Material(final String materialName, final MaterialState defaultState, fin + ratio); Logger.MATERIALS("Protons: " + this.vProtons); Logger.MATERIALS("Neutrons: " + this.vNeutrons); - Logger.MATERIALS("Mass: " + this.vMass + "/units"); + Logger.MATERIALS("Mass: " + vMass + "/units"); Logger.MATERIALS("Melting Point: " + this.meltingPointC + "C."); Logger.MATERIALS("Boiling Point: " + this.boilingPointC + "C."); } catch (Throwable t) { @@ -1250,7 +1245,7 @@ public final int[] getMaterialCompositeStackSizes() { return new int[] {}; } - private final short getComponentCount(final MaterialStack[] inputs) { + private short getComponentCount(final MaterialStack[] inputs) { if (inputs == null || inputs.length < 1) { return 1; @@ -1276,8 +1271,6 @@ public final long[] getSmallestRatio(final ArrayList tempInput) { // Utils.LOG_MATERIALS("length: "+inputs.length); final long[] tempRatio = new long[tempInput.size()]; for (int x = 0; x < tempInput.size(); x++) { - // tempPercentage = tempPercentage+inputs[x].percentageToUse; - // this.mMaterialList.add(inputs[x]); if (tempInput.get(x) != null) { tempRatio[x] = tempInput.get(x).getPartsPerOneHundred(); } diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java index 563249672d..3fe2b445bc 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java @@ -32,33 +32,33 @@ public boolean onPreTick(long aTick) { return super.onPreTick(aTick); } - private final boolean canFillEx(ForgeDirection aSide, Fluid aFluid) { + private boolean canFillEx(ForgeDirection aSide, Fluid aFluid) { return this.fill(aSide, new FluidStack(aFluid, 1), false) == 1; } - private final boolean canDrainEx(ForgeDirection aSide, Fluid aFluid) { + private boolean canDrainEx(ForgeDirection aSide, Fluid aFluid) { return this.drain(aSide, new FluidStack(aFluid, 1), false) != null; } - private final FluidTankInfo[] getTankInfoEx(ForgeDirection aSide) { + private FluidTankInfo[] getTankInfoEx(ForgeDirection aSide) { return mTank.getCapacity() <= 0 ? new FluidTankInfo[0] : new FluidTankInfo[] { mTank.getInfo() }; } - private final int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + private int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { return mTank.fill(aFluid, doFill); } - private final int fillEx(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + private int fillEx(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { return this.fill_default(aSide, aFluid, doFill); } - private final FluidStack drainEx(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { + private FluidStack drainEx(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { return mTank.getFluid() != null && aFluid != null && mTank.getFluid().isFluidEqual(aFluid) ? mTank.drain(aFluid.amount, doDrain) : null; } - private final FluidStack drainEx(ForgeDirection aSide, int maxDrain, boolean doDrain) { + private FluidStack drainEx(ForgeDirection aSide, int maxDrain, boolean doDrain) { return mTank.drain(maxDrain, doDrain); } diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java index 5f48933780..4d584ab867 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java @@ -311,21 +311,18 @@ public boolean isValidSlot(int aIndex) { private final int[] mCoverSides = new int[] { 0, 0, 0, 0, 0, 0 }; private final int[] mCoverData = new int[] { 0, 0, 0, 0, 0, 0 }; private final int[] mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; - private boolean mHasEnoughEnergy = true; protected boolean mRunningThroughTick = false; protected boolean mInputDisabled = false; protected boolean mOutputDisabled = false; private final boolean mMuffler = false; private final boolean mLockUpgrade = false; private final boolean mActive = false; - private boolean mRedstone = false; private final boolean mWorkUpdate = false; private final boolean mSteamConverter = false; private boolean mInventoryChanged = false; private final boolean mWorks = true; private final boolean mNeedsUpdate = true; private final boolean mNeedsBlockUpdate = true; - private boolean mSendClientData = false; private final boolean oRedstone = false; private final boolean mEnergyStateReady = false; private final byte mColor = 0; @@ -357,7 +354,7 @@ public boolean isValidSlot(int aIndex) { * Cover Support */ public void issueClientUpdate() { - this.mSendClientData = true; + boolean mSendClientData = true; } protected final boolean canAccessData() { @@ -410,8 +407,9 @@ public long getInputVoltage() { @Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { + boolean mHasEnoughEnergy = true; return !this.canAccessData() ? false - : (this.mHasEnoughEnergy = this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy)); + : (mHasEnoughEnergy = this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy)); } @Override @@ -490,7 +488,7 @@ public boolean isInputFacing(ForgeDirection side) { public boolean ignoreUnloadedChunks = true; public boolean isDead = false; - private final void clearNullMarkersFromTileEntityBuffer() { + private void clearNullMarkersFromTileEntityBuffer() { for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { if (this.mBufferedTileEntities[i] == this) { this.mBufferedTileEntities[i] = null; @@ -940,7 +938,6 @@ public boolean hasInventoryBeenModified() { @Override public void setGenericRedstoneOutput(boolean aOnOff) { - mRedstone = aOnOff; } @Override diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java index 5da2560cde..56792c3540 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java @@ -353,7 +353,7 @@ public final void invalidate() { this.checkForAdjacentChests(); } - private final int updateSlots() { + private int updateSlots() { // Have slots changed? if (cachedChestType == 0) { return 0; diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/redstone/TileEntityRedstoneHandler.java b/src/main/java/gtPlusPlus/core/tileentities/general/redstone/TileEntityRedstoneHandler.java index 62b1e365aa..6dc18ad1ed 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/general/redstone/TileEntityRedstoneHandler.java +++ b/src/main/java/gtPlusPlus/core/tileentities/general/redstone/TileEntityRedstoneHandler.java @@ -86,7 +86,7 @@ public void writeToNBT(NBTTagCompound aNBT) { private boolean mHasUpdatedRecently = false; - private final boolean init() { + private boolean init() { if (mTilePos == null) { try { mTilePos = new BlockPos(this); diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java index 54014103cd..a868ad2de5 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java @@ -40,7 +40,6 @@ public class TileEntityPestKiller extends TileEntity implements ISidedInventory, IFluidHandler { - private final int mBaseTickRate = 20 * 30; private final InventoryPestKiller mInventory; private final FluidTank mTank; private int mChunkX; @@ -74,7 +73,7 @@ public FluidTank getTank() { return mTank; } - private final void setup() { + private void setup() { World w = this.worldObj; if (w != null) { Chunk c = w.getChunkFromBlockCoords(this.xCoord, this.zCoord); @@ -206,7 +205,8 @@ public void updateEntity() { handleInventory(); } } - if (this.mTickCounter % this.mBaseTickRate == 0) { + int mBaseTickRate = 20 * 30; + if (this.mTickCounter % mBaseTickRate == 0) { tryKillPests(); } updateTick(); @@ -491,7 +491,7 @@ public void updateTileEntity() { this.mNeedsUpdate = true; } - private final void updateTick() { + private void updateTick() { if (mNeedsUpdate) { if (mUpdateTick == 0) { mUpdateTick = 4; // every 4 ticks it will send an update diff --git a/src/main/java/gtPlusPlus/core/util/Utils.java b/src/main/java/gtPlusPlus/core/util/Utils.java index 962c20cb67..4d059c2e4d 100644 --- a/src/main/java/gtPlusPlus/core/util/Utils.java +++ b/src/main/java/gtPlusPlus/core/util/Utils.java @@ -351,8 +351,6 @@ public static int rgbtoHexValue(final int r, final int g, final int b) { final Color c = new Color(r, g, b); String temp = Integer.toHexString(c.getRGB() & 0xFFFFFF).toUpperCase(); temp = Utils.appenedHexNotationToString(String.valueOf(temp)); - // Logger.WARNING("Made " + temp + " - Hopefully it's not a mess."); - // Logger.WARNING("It will decode into " + Integer.decode(temp) + "."); return Integer.decode(temp); } diff --git a/src/main/java/gtPlusPlus/core/util/data/AES.java b/src/main/java/gtPlusPlus/core/util/data/AES.java index ac1224974a..4ebe5b03b2 100644 --- a/src/main/java/gtPlusPlus/core/util/data/AES.java +++ b/src/main/java/gtPlusPlus/core/util/data/AES.java @@ -13,7 +13,7 @@ public class AES { - private final String secret;; + ; private final SecretKeySpec secretKey; @@ -26,9 +26,7 @@ public AES() { public AES(String aSecret) { - secret = aSecret; - - key = getBytes(getHashedString(secret)); + key = getBytes(getHashedString(aSecret)); secretKey = generateKey(key); } @@ -70,7 +68,7 @@ private static String toHexString(byte[] hash) { return hexString.toString(); } - private final byte[] getBytes(String aKey) { + private byte[] getBytes(String aKey) { byte[] aKeyData; @@ -111,29 +109,11 @@ private final byte[] getBytes(String aKey) { return new byte[] {}; } - private final SecretKeySpec generateKey(byte[] aKey) { + private SecretKeySpec generateKey(byte[] aKey) { return new SecretKeySpec(aKey, "AES"); } - public String encode(String strToEncrypt) { - - try { - - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - - cipher.init(Cipher.ENCRYPT_MODE, secretKey); - - return Base64.getEncoder().encodeToString(cipher.doFinal(strToEncrypt.getBytes("UTF-8"))); - - } catch (Exception e) { - - System.out.println("Error while encrypting: " + e.toString()); - } - - return null; - } - public String decode(String strToDecrypt) { try { diff --git a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java index 29f7fddbb3..08480bef8d 100644 --- a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java +++ b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java @@ -278,8 +278,6 @@ public static int generateSingularRandomHexValue() { Logger.WARNING("Operating with " + temp); temp = Utils.appenedHexNotationToString(String.valueOf(temp)); - // Logger.WARNING("Made "+temp+" - Hopefully it's not a mess."); - // Logger.WARNING("It will decode into "+Integer.decode(temp)+"."); return Integer.decode(temp); } diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java index fbfb42d459..d700ecd1ed 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java @@ -154,8 +154,6 @@ public static Material generateMaterialFromGtENUM(final Materials material, shor || ((material == Materials.InfusedAir) || (material == Materials.InfusedFire) || (material == Materials.InfusedEarth) || (material == Materials.InfusedWater))) { - // ModItems.itemBaseDecidust = UtilsItems.generateDecidust(material); - // ModItems.itemBaseCentidust = UtilsItems.generateCentidust(material); Material M = new Material( name, materialState, diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java index a3901f430c..08c5084afa 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java @@ -48,11 +48,8 @@ public static void messagePlayer(final EntityPlayer P, final IChatComponent S) { public static EntityPlayer getPlayer(final String name) { try { final List i = new ArrayList<>(); - final Iterator iterator = MinecraftServer.getServer() - .getConfigurationManager().playerEntityList.iterator(); - while (iterator.hasNext()) { - i.add((iterator.next())); - } + i.addAll(MinecraftServer.getServer() + .getConfigurationManager().playerEntityList); for (final EntityPlayer temp : i) { if (temp.getDisplayName().toLowerCase().equals(name.toLowerCase())) { return temp; diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java index e50d839d11..82cc27ce25 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java @@ -87,10 +87,6 @@ public static void recipeBuilder(final Object slot_1, final Object slot_2, final } } } catch (RuntimeException k) { - // k.getMessage(); - // k.getClass(); - // k.printStackTrace(); - // k.getLocalizedMessage(); Logger.RECIPE( "[Fix] Invalid Recipe detected for: " + resultItem != null ? resultItem.getUnlocalizedName() : "INVALID OUTPUT ITEM"); diff --git a/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java b/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java index 08fa644785..d17dd53222 100644 --- a/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java +++ b/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java @@ -28,7 +28,6 @@ public class MiningExplosion extends Explosion { - private final int field_77289_h = 16; private final Random explosionRNG = new XSTR(); private final World worldObj; @@ -60,17 +59,18 @@ public void doExplosionA() { double d6; double d7; - for (i = 0; i < this.field_77289_h; ++i) { - for (j = 0; j < this.field_77289_h; ++j) { - for (k = 0; k < this.field_77289_h; ++k) { - if ((i == 0) || (i == (this.field_77289_h - 1)) + int field_77289_h = 16; + for (i = 0; i < field_77289_h; ++i) { + for (j = 0; j < field_77289_h; ++j) { + for (k = 0; k < field_77289_h; ++k) { + if ((i == 0) || (i == (field_77289_h - 1)) || (j == 0) - || (j == (this.field_77289_h - 1)) + || (j == (field_77289_h - 1)) || (k == 0) - || (k == (this.field_77289_h - 1))) { - double d0 = ((i / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; - double d1 = ((j / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; - double d2 = ((k / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; + || (k == (field_77289_h - 1))) { + double d0 = ((i / (field_77289_h - 1.0F)) * 2.0F) - 1.0F; + double d1 = ((j / (field_77289_h - 1.0F)) * 2.0F) - 1.0F; + double d2 = ((k / (field_77289_h - 1.0F)) * 2.0F) - 1.0F; final double d3 = Math.sqrt((d0 * d0) + (d1 * d1) + (d2 * d2)); d0 /= d3; d1 /= d3; diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java index e3ee1b91df..1b79e7b62c 100644 --- a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java @@ -11,8 +11,6 @@ public class BlockDarkWorldSludgeFluid extends Fluid { protected static int mapColor = 0xFFFFFFFF; protected static float overlayAlpha = 0.2F; - // protected static SoundEvent emptySound = SoundEvents.ITEM_BUCKET_EMPTY; - // protected static SoundEvent fillSound = SoundEvents.ITEM_BUCKET_FILL; protected static Material material = SLUDGE; public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour) { diff --git a/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java b/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java index 7a082384cd..3a6170c9d6 100644 --- a/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java +++ b/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java @@ -62,8 +62,6 @@ public class ChunkProviderModded implements IChunkProvider { /** * Holds Stronghold Generator */ - // private MapGenStronghold strongholdGenerator = new - // MapGenStronghold(); /** * Holds Village Generator */ diff --git a/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java index b8e53047af..79c3130c67 100644 --- a/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java +++ b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java @@ -56,9 +56,6 @@ public class WorldGen_GT_Ore_Layer extends WorldGen_GT { public static final int ORE_PLACED = 4; public static final int NO_OVERLAP_AIR_BLOCK = 5; - // public final boolean mMoon; - // public final boolean mMars; - // public final boolean mAsteroid; public final String aTextWorldgen = "worldgen."; public WorldGen_GT_Ore_Layer(String aName, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, @@ -92,10 +89,6 @@ public WorldGen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMax .get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); - // this.mMoon = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); - // this.mMars = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); - // this.mAsteroid = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", - // aAsteroid); this.mMinY = 5; short mMaxY = 14; if (mMaxY < (this.mMinY + 7)) { @@ -134,14 +127,6 @@ public WorldGen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMax // not exist"); if (this.mEnabled) { - // GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, - // aWeight, aOverworld, aNether, aEnd); - // GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, - // aWeight, aOverworld, aNether, aEnd); - // GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, - // aWeight, aOverworld, aNether, aEnd); - // GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, - // aWeight, aOverworld, aNether, aEnd); sWeight += this.mWeight; } } @@ -440,8 +425,10 @@ public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome return ORE_PLACED; } - private String fString = "unset", ore1String = "unset", ore2String = "unset", ore3String = "unset", - ore4String = "unset"; + private String ore1String = "unset"; + private String ore2String = "unset"; + private String ore3String = "unset"; + private String ore4String = "unset"; Map gtOreMap = new HashMap(); public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData, boolean isSmallOre, boolean air) { @@ -464,6 +451,7 @@ public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData ore4String = Utils.sanitizeString(this.mSporadicMeta.getLocalizedName().toLowerCase()); } + String fString = "unset"; if (this.mPrimaryMeta == aMetaData) { for (Materials f : Materials.values()) { if (!gtOreMap.containsKey(f)) { diff --git a/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java b/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java index a5fe2c42e0..d637a05f39 100644 --- a/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java +++ b/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java @@ -123,7 +123,7 @@ public void loadUsageRecipes(ItemStack ingredient) { } } - private final void sort() { + private void sort() { List g = new ArrayList(); for (CachedRecipe u : arecipes) { g.add((DecayableRecipeNEI) u); diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java index c7138dad86..466e6f3fcc 100644 --- a/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java +++ b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java @@ -17,14 +17,12 @@ public enum AlgaeDefinition { Paeophyta("Paeophyta", "Brown Algae", false, true, getRGB(94, 78, 47)), Xanthophyta("Xanthophyta", "Yellow-Green Algae", true, false, getRGB(118, 138, 16)); - public final String mScientificName; public final String mSimpleName; public final boolean mSaltWater; public final boolean mFreshWater; public final int mColour; AlgaeDefinition(String aScientificName, String aSimpleName, boolean aFresh, boolean aSalt, int aColour) { - mScientificName = aScientificName; mSimpleName = aSimpleName; mFreshWater = aFresh; mSaltWater = aSalt; diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java index ab3528509c..e93b40856f 100644 --- a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java +++ b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java @@ -64,14 +64,10 @@ public class BioRecipes { - private static Item mFert; - private static Item mDustDirt; - private static Fluid mSalineWater; private static Fluid mDistilledWater; private static Fluid mThermalWater; private static Fluid mAir; - private static Fluid mSulfuricWasteWater; private static Fluid mAmmonia; private static Fluid mMethanol; private static Fluid mAceticAcid; @@ -84,7 +80,6 @@ public class BioRecipes { private static Fluid mEthanol; private static Fluid mChlorine; private static Fluid mHydrogen; - private static Fluid mDilutedSulfuricAcid; private static Fluid mSulfuricAcid; private static Fluid mUrea; public static Fluid mFormaldehyde; @@ -93,8 +88,6 @@ public class BioRecipes { private static Fluid mBenzene; private static Fluid mEthylbenzene; private static Fluid mStyrene; - private static Fluid mButanol; - private static Fluid mAcetone; private static ItemStack getGreenAlgaeRecipeChip() { return getBioChip(4); @@ -127,8 +120,8 @@ public static void init() { } private static void initRecipeVars() { - mFert = AgriculturalChem.dustOrganicFertilizer; - mDustDirt = AgriculturalChem.dustDirt; + Item mFert = AgriculturalChem.dustOrganicFertilizer; + Item mDustDirt = AgriculturalChem.dustDirt; // 5.08 Salt Water Solution ;) if (!FluidUtils.doesFluidExist("saltwater")) { @@ -153,11 +146,11 @@ private static void initRecipeVars() { mDistilledWater = FluidUtils.getDistilledWater(1).getFluid(); mThermalWater = FluidUtils.getFluidStack("ic2hotwater", 1).getFluid(); mAir = FluidUtils.getFluidStack("air", 1).getFluid(); - mSulfuricWasteWater = FluidUtils.getFluidStack("sulfuricapatite", 1).getFluid(); + Fluid mSulfuricWasteWater = FluidUtils.getFluidStack("sulfuricapatite", 1).getFluid(); mAmmonia = MISC_MATERIALS.AMMONIA.getFluidStack(1).getFluid(); mEthylene = FluidUtils.getFluidStack("ethylene", 1).getFluid(); mEthanol = FluidUtils.getFluidStack("bioethanol", 1).getFluid(); - mDilutedSulfuricAcid = FluidUtils.getFluidStack("dilutedsulfuricacid", 1).getFluid(); + Fluid mDilutedSulfuricAcid = FluidUtils.getFluidStack("dilutedsulfuricacid", 1).getFluid(); mSulfuricAcid = FluidUtils.getFluidStack("sulfuricacid", 1).getFluid(); mFormaldehyde = FluidUtils.getFluidStack("fluid.formaldehyde", 1).getFluid(); mMethane = FluidUtils.getFluidStack("methane", 1).getFluid(); @@ -175,8 +168,8 @@ private static void initRecipeVars() { mUrea = AgrichemFluids.mUrea; mLiquidResin = AgrichemFluids.mLiquidResin; mFermentationBase = AgrichemFluids.mFermentationBase; - mButanol = AgrichemFluids.mButanol; - mAcetone = AgrichemFluids.mAcetone; + Fluid mButanol = AgrichemFluids.mButanol; + Fluid mAcetone = AgrichemFluids.mAcetone; } private static void recipeAlgaeBiomass() { diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java index 22ae6f29c6..d9911e0e9e 100644 --- a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java @@ -11,21 +11,19 @@ public class VanillaBackgroundMusicFix implements IBugFix { - private final IPlugin mParent; private final boolean enabled; private MusicTocker mFixInstance; public VanillaBackgroundMusicFix(IPlugin minstance) { - mParent = minstance; if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { - mParent.log("[BGM] Registering BGM delay Fix."); + minstance.log("[BGM] Registering BGM delay Fix."); enabled = true; - mFixInstance = new MusicTocker(mParent); + mFixInstance = new MusicTocker(minstance); } else if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isServer()) { - mParent.log("[BGM] Tried registering BGM delay Fix on Server, disabling."); + minstance.log("[BGM] Tried registering BGM delay Fix on Server, disabling."); enabled = false; } else { - mParent.log("[BGM] Not registering BGM delay Fix."); + minstance.log("[BGM] Not registering BGM delay Fix."); enabled = false; } } diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java index f4c4df492e..c07f677289 100644 --- a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java @@ -18,10 +18,8 @@ public class VanillaBedHeightFix implements IBugFix { private final Method mSleepInBedAt; - private final IPlugin mParent; public VanillaBedHeightFix(IPlugin minstance) { - mParent = minstance; if (DevHelper.isValidHelperObject()) { Method m; if (DevHelper.isObfuscatedEnvironment()) { @@ -36,7 +34,7 @@ public VanillaBedHeightFix(IPlugin minstance) { } if (m != null) { mSleepInBedAt = m; - mParent.log("Registering Bed Height Fix."); + minstance.log("Registering Bed Height Fix."); Utils.registerEvent(this); } else { mSleepInBedAt = null; diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java index c2af6ea591..7defa526c5 100644 --- a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java @@ -62,13 +62,13 @@ private boolean inject() { return false; } - private final void updateInternalNumber() { + private void updateInternalNumber() { if (ReflectionUtils.doesFieldExist(getClass(), "field_147676_d")) { ReflectionUtils.setField(this, "field_147676_d", mTimeUntilNextTrack); } } - private final void updateInternalSound(ISound aSound) { + private void updateInternalSound(ISound aSound) { if (ReflectionUtils.doesFieldExist(getClass(), "field_147678_c")) { ReflectionUtils.setField(this, "field_147678_c", aSound); } diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java index 4e357d1dcf..c6c9a61719 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java @@ -67,8 +67,6 @@ public class ClassTransformer_Forge_ChunkLoading { String aWorld; String aEntity; - private static final boolean doesMethodAlreadyExist = false; - public ClassTransformer_Forge_ChunkLoading(byte[] basicClass, boolean obfuscated) { ClassReader aTempReader = null; @@ -86,6 +84,7 @@ public ClassTransformer_Forge_ChunkLoading(byte[] basicClass, boolean obfuscated reader = aTempReader; writer = aTempWriter; + boolean doesMethodAlreadyExist = false; if (reader != null && writer != null && !doesMethodAlreadyExist) { aChunkCoordIntPair = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/ChunkCoordIntPair") diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java index 3f6de75f9d..54e36afe9d 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java @@ -88,9 +88,6 @@ public static void trySetClientKey(int aKey) { } } - @SuppressWarnings("rawtypes") - private static Class mKeyboard; - private static Field mKeyName; @SuppressWarnings("rawtypes") @@ -100,8 +97,7 @@ private static boolean init() { } Class aKeyboard = ReflectionUtils.getClass("org.lwjgl.input.Keyboard"); if (aKeyboard != null) { - mKeyboard = aKeyboard; - Field aKeyName = ReflectionUtils.getField(mKeyboard, "keyName"); + Field aKeyName = ReflectionUtils.getField(aKeyboard, "keyName"); if (aKeyName != null) { mKeyName = aKeyName; } diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java index 4b9cb4193e..3bb2bd46e6 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java @@ -60,10 +60,6 @@ public class ClassTransformer_TT_ThaumicRestorer { private static boolean mInit = false; private static Class mTileRepairerClass; - private static Class mTTConfigHandler; - private static Class mTinkersConstructCompat; - private static Class mThaumicTinkerer; - private static Class mTCProxy; private static Method mIsTcTool; private static Method mGetTcDamage; @@ -71,7 +67,6 @@ public class ClassTransformer_TT_ThaumicRestorer { private static Method mSparkle; private static Method mDrawEssentia; - private static Field mRepairTiconTools; private static Field mTicksExisted; private static Field mInventory; private static Field mTookLastTick; @@ -106,10 +101,10 @@ public static void updateEntity(TileEntity aTile) { if (!mInit) { // Set the classes we need mTileRepairerClass = ReflectionUtils.getClass("thaumic.tinkerer.common.block.tile.TileRepairer"); - mTTConfigHandler = ReflectionUtils.getClass("thaumic.tinkerer.common.core.handler.ConfigHandler"); - mTinkersConstructCompat = ReflectionUtils.getClass("thaumic.tinkerer.common.compat.TinkersConstructCompat"); - mThaumicTinkerer = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); - mTCProxy = ReflectionUtils.getClass("thaumcraft.common.CommonProxy"); + Class mTTConfigHandler = ReflectionUtils.getClass("thaumic.tinkerer.common.core.handler.ConfigHandler"); + Class mTinkersConstructCompat = ReflectionUtils.getClass("thaumic.tinkerer.common.compat.TinkersConstructCompat"); + Class mThaumicTinkerer = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); + Class mTCProxy = ReflectionUtils.getClass("thaumcraft.common.CommonProxy"); // Set the methods we need mIsTcTool = ReflectionUtils .getMethod(mTinkersConstructCompat, "isTConstructTool", new Class[] { ItemStack.class }); @@ -121,7 +116,7 @@ public static void updateEntity(TileEntity aTile) { .getMethod(mTCProxy, "sparkle", new Class[] { float.class, float.class, float.class, int.class }); mDrawEssentia = ReflectionUtils.getMethod(mTileRepairerClass, "drawEssentia", new Class[] {}); // Set the fields we need - mRepairTiconTools = ReflectionUtils.getField(mTTConfigHandler, "repairTConTools"); + Field mRepairTiconTools = ReflectionUtils.getField(mTTConfigHandler, "repairTConTools"); mTicksExisted = ReflectionUtils.getField(mTileRepairerClass, "ticksExisted"); mInventory = ReflectionUtils.getField(mTileRepairerClass, "inventorySlots"); mTookLastTick = ReflectionUtils.getField(mTileRepairerClass, "tookLastTick"); diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java index 3fb8229b7f..5e2a8af61d 100644 --- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java @@ -40,7 +40,7 @@ public LeavesBase(String blockNameLocalized, String blockNameUnlocalized, ItemSt Blocks.fire.setFireInfo(this, 80, 150); } - private final void setVanillaVariable(Object toSet, Object value) { + private void setVanillaVariable(Object toSet, Object value) { toSet = value; } diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java index 6c4ea6a556..3270fea55b 100644 --- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java @@ -40,7 +40,7 @@ public LogBase(String blockNameLocalized, String blockNameUnlocalized, String[] Blocks.fire.setFireInfo(this, 20, 100); } - private final void setVanillaVariable(Object toSet, Object value) { + private void setVanillaVariable(Object toSet, Object value) { toSet = value; } diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java index 1c1cd515bb..92149e3298 100644 --- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java @@ -48,7 +48,7 @@ protected SaplingBase(String blockNameLocalized, String blockNameUnlocalized, St this.setCreativeTab(AddToCreativeTab.tabBOP); } - private final void setVanillaVariable(Object toSet, Object value) { + private void setVanillaVariable(Object toSet, Object value) { toSet = value; } diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java index 6bf3ea9cb6..94f61296d6 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java @@ -65,8 +65,8 @@ public enum CustomCombs { { 0xEBA1EB, 0xF2C3F2 }, { 0x62626D, 0x161620 }, { 0xE6E6E6, 0xFFFFCC }, { 0xDADADA, 0xD1D1E0 }, { 0x19AF19, 0x169E16 }, { 0x335C33, 0x6B8F00 }, { 0x003300, 0x002400 }, }; public boolean showInList; - public Materials material; - public int chance; + public final Materials material; + public final int chance; private final String name; private CustomCombs(String pName, boolean show, Materials material, int chance) { diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java index 46705cd597..ccef581d33 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java @@ -13,11 +13,10 @@ public enum GTPP_CombType { FORCE(1, "Force", true, 30, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)); public boolean mShowInList; - public Material mMaterial; - public int mChance; - public int mID; + public final Material mMaterial; + public final int mChance; + public final int mID; - private final String mName; private final String mNameUnlocal; private final int[] mColour; @@ -31,14 +30,13 @@ public static GTPP_CombType get(int aID) { GTPP_CombType(int aID, String aName, boolean aShow, int aChance, int... aColour) { this.mID = aID; - this.mName = aName; this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); this.mChance = aChance; this.mShowInList = aShow; this.mColour = aColour; map(aID, this); this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); - GT_LanguageManager.addStringLocalization("gtplusplus.comb." + this.mNameUnlocal, this.mName + " Comb"); + GT_LanguageManager.addStringLocalization("gtplusplus.comb." + this.mNameUnlocal, aName + " Comb"); } public void setHidden() { diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java index 0b0cd0dae4..3e24ba941a 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java @@ -13,11 +13,10 @@ public enum GTPP_DropType { FORCE(1, "Force", true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)); public boolean mShowInList; - public Material mMaterial; + public final Material mMaterial; public int mChance; - public int mID; + public final int mID; - private final String mName; private final String mNameUnlocal; private final int[] mColour; @@ -31,13 +30,12 @@ public static GTPP_DropType get(int aID) { private GTPP_DropType(int aID, String aName, boolean aShow, int... aColour) { this.mID = aID; - this.mName = aName; this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); this.mShowInList = aShow; this.mColour = aColour; map(aID, this); this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); - GT_LanguageManager.addStringLocalization("gtplusplus.drop." + this.mNameUnlocal, this.mName + " Drop"); + GT_LanguageManager.addStringLocalization("gtplusplus.drop." + this.mNameUnlocal, aName + " Drop"); } public void setHidden() { diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java index 6628ccf9af..366060f211 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java @@ -12,11 +12,10 @@ public enum GTPP_PollenType { DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20)); public boolean mShowInList; - public Material mMaterial; + public final Material mMaterial; public int mChance; - public int mID; + public final int mID; - private final String mName; private final String mNameUnlocal; private final int[] mColour; @@ -30,13 +29,12 @@ public static GTPP_PollenType get(int aID) { private GTPP_PollenType(int aID, String aName, boolean aShow, int... aColour) { this.mID = aID; - this.mName = aName; this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); this.mShowInList = aShow; this.mColour = aColour; map(aID, this); this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); - GT_LanguageManager.addStringLocalization("gtplusplus.pollen." + this.mNameUnlocal, this.mName + " Pollen"); + GT_LanguageManager.addStringLocalization("gtplusplus.pollen." + this.mNameUnlocal, aName + " Pollen"); } public void setHidden() { diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java index a4bd6e6217..bbc68c8fa9 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java @@ -13,11 +13,10 @@ public enum GTPP_PropolisType { FORCE(1, "Force", true, Utils.rgbtoHexValue(250, 250, 20)); public boolean mShowInList; - public Material mMaterial; + public final Material mMaterial; public int mChance; - public int mID; + public final int mID; - private final String mName; private final String mNameUnlocal; private final int mColour; @@ -31,13 +30,12 @@ public static GTPP_PropolisType get(int aID) { private GTPP_PropolisType(int aID, String aName, boolean aShow, int aColour) { this.mID = aID; - this.mName = aName; this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); this.mShowInList = aShow; this.mColour = aColour; map(aID, this); this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); - GT_LanguageManager.addStringLocalization("gtplusplus.propolis." + this.mNameUnlocal, this.mName + " Propolis"); + GT_LanguageManager.addStringLocalization("gtplusplus.propolis." + this.mNameUnlocal, aName + " Propolis"); } public void setHidden() { diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java index 8af5b97b00..ab8771e6db 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java @@ -22,9 +22,6 @@ public class FR_ItemRegistry { // ----- Apiary Frames ---------------------- - // public static FR_ItemHiveFrame frameUntreated; - // public static FR_ItemHiveFrame frameImpregnated; - // public static FR_ItemHiveFrame frameProven; // Magic Bee Frame Items public static MB_ItemFrame hiveFrameAccelerated; diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java index 23ba70c3b6..c17beff545 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java @@ -12,12 +12,6 @@ public class FR_Gregtech_Recipes { - private static final String rod_Electrum = "stickElectrum"; - private static final String rod_LongElectrum = "stickLongElectrum"; - private static final String foil_Electrum = "foilElectrum"; - private static final String rod_Uranium = "stickUranium"; - private static final String rod_LongUranium = "stickLongUranium"; - private static final String foil_Uranium235 = "foilUranium235"; private static final ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated); private static final ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic); private static final ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid); @@ -42,6 +36,9 @@ public class FR_Gregtech_Recipes { public static void registerItems() { // Magic Bee Like Frames + String foil_Electrum = "foilElectrum"; + String rod_LongElectrum = "stickLongElectrum"; + String rod_Electrum = "stickElectrum"; RecipeUtils.addShapedGregtechRecipe( rod_LongElectrum, rod_Electrum, @@ -54,6 +51,9 @@ public static void registerItems() { rod_Electrum, hiveFrameAccelerated); + String foil_Uranium235 = "foilUranium235"; + String rod_LongUranium = "stickLongUranium"; + String rod_Uranium = "stickUranium"; RecipeUtils.addShapedGregtechRecipe( rod_LongUranium, rod_Uranium, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java index 61abc48a18..03ec5f3fc5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java @@ -109,7 +109,7 @@ public enum GregtechOrePrefixes { chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced ; - public static volatile int VERSION = 508; + public static final int VERSION = 508; static { ingotHot.mHeatDamage = 3.0F; @@ -132,11 +132,11 @@ public enum GregtechOrePrefixes { mGeneratedItems = new HashSet<>(); private final ArrayList mOreProcessing = new ArrayList<>(); private final ArrayList mOreProcessingFake = new ArrayList<>(); - public ItemStack mContainerItem = null; - public ICondition mCondition = null; + public final ItemStack mContainerItem = null; + public final ICondition mCondition = null; public byte mDefaultStackSize = 64; - public GregtechMaterialStack mSecondaryMaterial = null; - public GregtechOrePrefixes mPrefixInto = this; + public final GregtechMaterialStack mSecondaryMaterial = null; + public final GregtechOrePrefixes mPrefixInto = this; public float mHeatDamage = 0.0F; // Negative for Frost Damage /** * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check. @@ -657,15 +657,22 @@ public enum GT_Materials implements IColorModulationContainer, ISubTagContainer mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1; public long mDensity = M; public Element mElement = null; - public GT_Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, - mArcSmeltInto = this, mHandleMaterial = this; + public GT_Materials mDirectSmelting = this; + public GT_Materials mOreReplacement = this; + public GT_Materials mMacerateInto = this; + public GT_Materials mSmeltInto = this; + public GT_Materials mArcSmeltInto = this; + public final GT_Materials mHandleMaterial = this; public byte mToolQuality = 0; - public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null; + public final Fluid mSolid = null; + public Fluid mFluid = null; + public Fluid mGas = null; + public Fluid mPlasma = null; /** * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, what means 144 is one * Material Unit worth */ - public Fluid mStandardMoltenFluid = null; + public final Fluid mStandardMoltenFluid = null; private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final boolean aUnificatable) { @@ -1283,6 +1290,6 @@ public short[] getRGBA() { return this.mRGBa; } - public static volatile int VERSION = 508; + public static final int VERSION = 508; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java index a66cce394d..dcb77795d3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java @@ -481,8 +481,6 @@ private ItemStack getContainerItem(ItemStack aStack, final boolean playSound) { this.doDamage(aStack, tStats.getToolDamagePerContainerCraft()); aStack = aStack.stackSize > 0 ? aStack : null; if (playSound) { - // String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound(); - // GT_Utility.doSoundAtClient(sound, 1, 1.0F); } return aStack; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java index 1fca67d295..aff3460312 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java @@ -150,9 +150,6 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { } } } else { - // Utils.LOG_INFO("reCharger Slot Count = "+mMetaTileEntity.rechargerSlotCount()); - // Utils.LOG_INFO("getStoredEU = "+aBaseMetaTileEntity.getStoredEU()); - // Utils.LOG_INFO("getEUVar = "+mMetaTileEntity.getEUVar()); } } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java index d8ec187fff..efe5c70317 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -196,8 +196,6 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { } else { // Logger.INFO("B2"); if (this.getInventoryStack() == null) { - // Logger.INFO("D1"); - // Logger.INFO("Empty - "+this.mInventory.length); } else { // Logger.INFO("D2"); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java index e8ef0a454b..a319aba345 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -172,7 +172,7 @@ public void damageTurbine(long aEUt, int damageFactorLow, float damageFactorHigh } } - private final int getDamageToComponent(ItemStack aStack) { + private int getDamageToComponent(ItemStack aStack) { return 1; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java index 226086a1ff..2d289cf7f3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java @@ -64,7 +64,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { } } - private final void tryFindParentTurbine() { + private void tryFindParentTurbine() { Logger.INFO("This turbine housing has no parent, searching world."); IGregTechTileEntity T = this.getBaseMetaTileEntity(); World W = T.getWorld(); @@ -90,7 +90,7 @@ private final void tryFindParentTurbine() { } } - private final void tryRefillTurbine() { + private void tryRefillTurbine() { if (mParent == null) { tryFindParentTurbine(); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index fe394238a6..dcf31819d9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -159,9 +159,7 @@ public String[] getInfoData() { extra = new String[0]; } if (extra.length > 0) { - for (String s : extra) { - mInfo.add(s); - } + mInfo.addAll(Arrays.asList(extra)); } long seconds = (this.mTotalRunTime / 20); @@ -1209,7 +1207,7 @@ public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { tryTickWaitTimerDown(); } - private final void tryTickWaitTimerDown() { + private void tryTickWaitTimerDown() { /* * if (mStartUpCheck > 10) { mStartUpCheck = 10; } */ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java index 75edd89de6..2dcd14e975 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java @@ -319,10 +319,6 @@ public int getFuelValue(final FluidStack aLiquid) { // Logger.INFO("Found some fuel?"); int aperOp = this.consumedFluidPerOperation(tLiquid); int aConsume = (int) (((long) tFuel.mSpecialValue * this.getEfficiency() * aperOp) / 100); - // Logger.INFO("Fuel Value: "+tFuel.mSpecialValue); - // Logger.INFO("Efficiency: "+getEfficiency()); - // Logger.INFO("Consumed per op: "+aperOp); - // Logger.INFO("Consuming "+aConsume); return aConsume; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index a73e4ea49c..9d5675bad5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -276,8 +276,6 @@ public static GT_RenderedTexture getTextureFromIcon(CustomIcon aIcon, short[] aR public static final CustomIcon Casing_Redox_4 = new CustomIcon("redox/redox4"); public static final CustomIcon Casing_Redox_5 = new CustomIcon("redox/redox5"); public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6"); - // public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7"); - // public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8"); // Special Block 2 public static final CustomIcon Casing_Resonance_1 = new CustomIcon("special/block_1"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java index af80b7c684..a1259c3b40 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java @@ -46,8 +46,6 @@ public int doCoverThings(ForgeDirection side, byte aInputRedstone, int aCoverID, directionFrom = ForgeDirection.UNKNOWN; tTank1 = (IFluidHandler) aTileEntity; if (tTank1 != null) { - // Logger.INFO("Found Self. "+aSide); - // FluidStack aTankStack = tTank1.drain(ForgeDirection.UNKNOWN, 1, false); FluidStack aTankStack = tTank1.getTankInfo(directionFrom)[0].fluid; if (aTankStack != null) { // Logger.INFO("Found Fluid inside self - "+aTankStack.getLocalizedName()+", overflow point set at diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java index 7037ace2c4..1fc5918a7c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java @@ -31,7 +31,6 @@ public class MetaCustomCoverItem extends Item { protected final IIcon[] icons; - private final String mModID; private final String mTextureSetName; protected final IIconContainer[] mTextures; private final short[][] mRGB; @@ -40,20 +39,19 @@ public MetaCustomCoverItem(String aModId, int aTextureCount, String aTextureSetN short[][] aRGB) { super(); icons = new IIcon[aTextureCount]; - mModID = aModId; mTextureSetName = Utils.sanitizeString(aTextureSetName); mTextures = aTextures; mRGB = aRGB; this.setTextureName(GTPlusPlus.ID + ":" + "itemPlate"); this.setHasSubtypes(true); - String unlocalizedName = "itemCustomMetaCover." + mModID + "." + mTextureSetName; + String unlocalizedName = "itemCustomMetaCover." + aModId + "." + mTextureSetName; this.setUnlocalizedName(unlocalizedName); this.setCreativeTab(AddToCreativeTab.tabMisc); this.setMaxStackSize(1); GameRegistry.registerItem(this, unlocalizedName); registerCover(); Logger.INFO( - "[Covers] Generated Custom covers for " + mModID + "[Covers] Generated Custom covers for " + aModId + " using " + aTextureCount + " textures from " @@ -65,7 +63,7 @@ public boolean hide() { return true; } - private final void registerCover() { + private void registerCover() { // CommonProxy.registerItemRendererGlobal(this, new CustomItemBlockRenderer()); for (int i = 0; i < icons.length; i++) { ItemStack thisStack = ItemUtils.simpleMetaStack(this, i, 1); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index d7eccc0d6b..adfe49646f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -123,9 +123,6 @@ public void generateMetaItems() { getTcAspectStack(TC_Aspects.METALLUM, 48L), getTcAspectStack(TC_Aspects.POTENTIA, 64L) })); this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 20 * 300 / 4, GT_Values.V[8], 8L, -3L, false); - // ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_1.get(1), "batteryFutureBasic"); - // ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_2.get(1), "batteryFutureGood"); - // ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_3.get(1), "batteryFutureAdvanced"); /* * GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index 3602901035..a7660e5495 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -45,7 +45,7 @@ public GTPP_CapeRenderer() { mInit = init(); } - private final boolean init() { + private boolean init() { if (mInit) { return false; } @@ -165,7 +165,7 @@ public synchronized void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.P } } - private final boolean renderCapeOnPlayer(RenderPlayerEvent.Specials.Pre aEvent, AbstractClientPlayer aPlayer) { + private boolean renderCapeOnPlayer(RenderPlayerEvent.Specials.Pre aEvent, AbstractClientPlayer aPlayer) { float aPartialTicks = aEvent.partialRenderTick; try { if (tResource == null && CORE.DEVENV) { @@ -231,7 +231,6 @@ private final boolean renderCapeOnPlayer(RenderPlayerEvent.Specials.Pre aEvent, private static class CapeUtils { - private static final char SPLIT_CHARACTER = '§'; private static AES sAES; // UUID - Username @@ -372,6 +371,7 @@ public static void writeCacheToMaps() { boolean didProcessStringData = false; Logger.INFO("Decoded String Count: " + aDecodedData.size()); for (String aToSplit : aDecodedData) { + char SPLIT_CHARACTER = '§'; String[] aSplitData = aToSplit.split("" + SPLIT_CHARACTER); if (aSplitData != null && aSplitData.length >= 2) { if (aSplitData[0] != null) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java index ee85b16f5f..95c5a7eeaf 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java @@ -88,8 +88,6 @@ protected GT_RenderedTexture getCasingTexture() { } else { return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); } - // return new - // GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java index 3b54fb46a7..d9dd151abd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java @@ -326,8 +326,6 @@ public int getFuelValue(ItemStack aStack) { } else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_SR90.get(1))) { mTier2 = 1; } else { - // Utils.LOG_INFO("test:"+tFuel.mInputs[0].getDisplayName() + " | " + - // (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PU238.get(1)))); mTier2 = 0; } ReflectionUtils.setByte(this, "mTier", mTier2); @@ -345,8 +343,6 @@ public int getFuelValue(ItemStack aStack) { this.mDaysRemaining = MathUtils.roundToClosestInt(mTicksToBurnFor / 20 / 60 / 3); Logger.WARNING("step | " + (int) (mTicksToBurnFor * getEfficiency() / 100L)); return (int) (mTicksToBurnFor * getEfficiency() / 100L); - // return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L); - // return tFuel.mEUt; } Logger.WARNING("Not sure"); return 0; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java index 3696fffa28..68a4dac4a8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java @@ -393,10 +393,6 @@ public boolean isTransformerUpgradable() { return false; } - // int mCurrentPollution; - // int mAveragePollution; - // int mAveragePollutionArray[] = new int[10]; - @Override public void saveNBTData(final NBTTagCompound aNBT) { aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java index 24b7fbfa05..1b5338f0c1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java @@ -385,10 +385,6 @@ public boolean isTransformerUpgradable() { return false; } - // int mCurrentPollution; - // int mAveragePollution; - // int mAveragePollutionArray[] = new int[10]; - @Override public void saveNBTData(final NBTTagCompound aNBT) { aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java index b626a72f15..32f878b180 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java @@ -48,7 +48,6 @@ public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_MultiBlockBase implements ISurvivalConstructable { private static int CASING_TEXTURE_ID; - private static final String mCasingName = "Vacuum Casing"; private HeatingCoilLevel mHeatingCapacity; private boolean mDehydratorMode = false; private int mCasing; @@ -72,6 +71,7 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + String mCasingName = "Vacuum Casing"; tt.addMachineType(getMachineType()).addInfo("Factory Grade Vacuum Furnace") .addInfo("Can toggle the operation temperature with a Screwdriver") .addInfo("All Dehydrator recipes are Low Temp recipes") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java index 075adc065f..0e6757b29a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java @@ -224,7 +224,7 @@ private ItemStack getCircuit(ItemStack[] t) { return null; } - private final int getCircuitID(ItemStack circuit) { + private int getCircuitID(ItemStack circuit) { int H = circuit.getItemDamage(); int T = (H == 20 ? 0 : (H == 21 ? 1 : (H == 22 ? 2 : -1))); return MODE_MAP[this.mInternalMode][T]; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java index 24baef1831..4a90085cec 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java @@ -32,7 +32,6 @@ public class GregtechMetaTileEntity_SteamCompressor extends GregtechMeta_SteamMultiBase implements ISurvivalConstructable { - private final String mCasingName = "Bronze Plated Bricks"; private static IStructureDefinition STRUCTURE_DEFINITION = null; private int mCasing; @@ -67,6 +66,7 @@ public String getMachineType() { @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + String mCasingName = "Bronze Plated Bricks"; tt.addMachineType(getMachineType()).addInfo("Controller Block for the Steam Compressor") .addInfo("Compresses " + getMaxParallelRecipes() + " things at a time").addSeparator() .beginStructureBlock(3, 3, 4, true).addController("Front center") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index fb4a210d84..8883c1e0a1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -85,7 +85,6 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase< private int mCasing; private static IStructureDefinition STRUCTURE_DEFINITION = null; - private SAWTOOL mToolType; private ItemStack mSapling; private ItemStack mWood; private float heightModifier = 1.0f; @@ -183,7 +182,7 @@ public int getSawBoost(SAWTOOL sawType) { return SimpleCheckRecipeResult.ofFailure("no_saw"); if (!checkSapling()) return SimpleCheckRecipeResult.ofFailure("no_sapling"); - this.mToolType = TreeFarmHelper.isCorrectMachinePart(controllerStack); + SAWTOOL mToolType = TreeFarmHelper.isCorrectMachinePart(controllerStack); long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java index b7f5451071..36d20b78d0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java @@ -44,8 +44,6 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter extends GregtechMeta_MultiBlockBase implements ISurvivalConstructable { - private int mMode = 0; - private boolean isUsingControllerCircuit = false; private static Item circuit; private int mCasing; private static IStructureDefinition STRUCTURE_DEFINITION = null; @@ -156,25 +154,26 @@ public GT_Recipe.GT_Recipe_Map getRecipeMap() { @Override public boolean isCorrectMachinePart(final ItemStack aStack) { + boolean isUsingControllerCircuit = false; if (this.getBaseMetaTileEntity().isServerSide()) { // Get Controller Circuit if (circuit == null) { circuit = CI.getNumberedCircuit(0).getItem(); } if (aStack != null && aStack.getItem() == circuit) { - this.mMode = aStack.getItemDamage(); - return this.isUsingControllerCircuit = true; + int mMode = aStack.getItemDamage(); + return isUsingControllerCircuit = true; } else { if (aStack == null) { - this.isUsingControllerCircuit = false; + isUsingControllerCircuit = false; return true; // Allowed empty } Logger.WARNING("Not circuit in GUI inputs."); - return this.isUsingControllerCircuit = false; + return isUsingControllerCircuit = false; } } Logger.WARNING("No Circuit, clientside."); - return this.isUsingControllerCircuit = false; + return isUsingControllerCircuit = false; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java index a0225e7d48..b22dab5e67 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java @@ -56,7 +56,6 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase STRUCTURE_DEFINITION = null; private int checkMeta; - private int minTierOfHatch; private static final Class cofhWater; static { @@ -154,7 +153,7 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a mCasing = 0; mLevel = 0; checkMeta = 0; - minTierOfHatch = 100; + int minTierOfHatch = 100; if (checkPiece(mName, 4, 2, 0) && mCasing >= 64 && checkMeta > 0) { mLevel = checkMeta - 1; return mLevel <= minTierOfHatch; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java index ac79c96605..6b411443c4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java @@ -132,11 +132,6 @@ int fluidIntoPower(ArrayList aFluids, long aOptFlow, int aBaseEff, f if (totalFlow <= 0) return 0; tEU = GT_Utility.safeInt((long) totalFlow * fuelValue); - // log("Total Flow: "+totalFlow); - // log("Real Optimal Flow: "+actualOptimalFlow); - // log("Flow: "+flow); - // log("Remaining Flow: "+remainingFlow); - if (totalFlow == actualOptimalFlow) { tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } else { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java index 8fa38ac694..3d0932be3c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java @@ -161,8 +161,7 @@ public void loadNBTData(NBTTagCompound aNBT) { public void switchGateForward(boolean aShift) { try { Set tKeys = GregTech_API.sCircuitryBehaviors.keySet(); - ArrayList tList = new ArrayList(); - tList.addAll(tKeys); + ArrayList tList = new ArrayList<>(tKeys); if (tList.size() <= 0) return; Collections.sort(tList); if (!GregTech_API.sCircuitryBehaviors.containsKey(mGate)) mGate = tList.get(0); @@ -179,8 +178,7 @@ public void switchGateForward(boolean aShift) { public void switchGateBackward(boolean aShift) { try { Set tKeys = GregTech_API.sCircuitryBehaviors.keySet(); - ArrayList tList = new ArrayList(); - tList.addAll(tKeys); + ArrayList tList = new ArrayList(tKeys); if (tList.size() <= 0) return; Collections.sort(tList); if (!GregTech_API.sCircuitryBehaviors.containsKey(mGate)) mGate = tList.get(0); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java index 12200f9d1b..2f8432154c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java @@ -144,8 +144,6 @@ public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack a recipe = aRecipe; disableOptional = aExtracting; isValid = true; - // Logger.INFO("Passed Validity Check. Hash: "+recipe.hashCode()); - // Logger.INFO("Mapped as: "+(disableOptional ? "Extracting" : "Canning")); addRunnableToRecipeCache(this); } else { // Logger.INFO("Failed Validity Check."); @@ -174,7 +172,7 @@ private void generateRecipes() { } } - private final boolean addFluidExtractionRecipe(GT_Recipe aRecipe) { + private boolean addFluidExtractionRecipe(GT_Recipe aRecipe) { boolean result = false; CORE.crash(); Logger.INFO( @@ -211,7 +209,7 @@ private final boolean addFluidExtractionRecipe(GT_Recipe aRecipe) { return result; } - private final boolean addFluidCannerRecipe(GT_Recipe aRecipe) { + private boolean addFluidCannerRecipe(GT_Recipe aRecipe) { boolean result = false; int aCount1 = GT_Recipe_Map.sFluidCannerRecipes.mRecipeList.size(); int aCount2 = aCount1; @@ -257,7 +255,7 @@ private String buildLogString() { + " | "; } - private final int getMapSize(GT_Recipe_Map aMap) { + private int getMapSize(GT_Recipe_Map aMap) { return aMap.mRecipeList.size(); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java index fdbeea89cf..12f04b4876 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java @@ -74,9 +74,7 @@ private void generateRecipes(final Material material, final boolean disableOptio // Setup Bonuses ArrayList aMatComp = new ArrayList(); - for (Material j : MaterialUtils.getCompoundMaterialsRecursively(material)) { - aMatComp.add(j); - } + aMatComp.addAll(MaterialUtils.getCompoundMaterialsRecursively(material)); if (aMatComp.size() < 3) { while (aMatComp.size() < 3) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index b9583d17cb..f2ddbaccbb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -36,8 +36,6 @@ public class GregtechConduits { // 30000-30999 - private static final int BaseWireID = 30600; - private static final int BasePipeID = 30700; private static int BasePipeHexadecupleID = 30100; public static void run() { @@ -192,34 +190,36 @@ private static void generateFluidMultiPipes(Constructor private static void run1() { - wireFactory("RedstoneAlloy", 32, BaseWireID + 45, 0, 2, 1, new short[] { 178, 34, 34, 0 }); + int baseWireID = 30600; + wireFactory("RedstoneAlloy", 32, baseWireID + 45, 0, 2, 1, new short[] { 178, 34, 34, 0 }); // need to go back id because fluid pipes already occupy - makeCustomWires(ELEMENT.STANDALONE.HYPOGEN, BaseWireID - 15, 0, 0, 8, GT_Values.V[11], false, true); + makeCustomWires(ELEMENT.STANDALONE.HYPOGEN, baseWireID - 15, 0, 0, 8, GT_Values.V[11], false, true); } private static void run2() { - generateNonGTFluidPipes(GT_Materials.Staballoy, ALLOY.STABALLOY, BasePipeID, 12500, 7500, true); - generateNonGTFluidPipes(GT_Materials.Tantalloy60, ALLOY.TANTALLOY_60, BasePipeID + 5, 10000, 4250, true); - generateNonGTFluidPipes(GT_Materials.Tantalloy61, ALLOY.TANTALLOY_61, BasePipeID + 10, 12000, 5800, true); + int basePipeID = 30700; + generateNonGTFluidPipes(GT_Materials.Staballoy, ALLOY.STABALLOY, basePipeID, 12500, 7500, true); + generateNonGTFluidPipes(GT_Materials.Tantalloy60, ALLOY.TANTALLOY_60, basePipeID + 5, 10000, 4250, true); + generateNonGTFluidPipes(GT_Materials.Tantalloy61, ALLOY.TANTALLOY_61, basePipeID + 10, 12000, 5800, true); if (Thaumcraft.isModLoaded()) { - generateNonGTFluidPipes(GT_Materials.Void, null, BasePipeID + 15, 1600, 25000, true); + generateNonGTFluidPipes(GT_Materials.Void, null, basePipeID + 15, 1600, 25000, true); } - generateGTFluidPipes(Materials.Europium, BasePipeID + 20, 12000, 7500, true); - generateNonGTFluidPipes(GT_Materials.Potin, ALLOY.POTIN, BasePipeID + 25, 500, 2000, true); - generateNonGTFluidPipes(GT_Materials.MaragingSteel300, ALLOY.MARAGING300, BasePipeID + 30, 14000, 2500, true); - generateNonGTFluidPipes(GT_Materials.MaragingSteel350, ALLOY.MARAGING350, BasePipeID + 35, 16000, 2500, true); - generateNonGTFluidPipes(GT_Materials.Inconel690, ALLOY.INCONEL_690, BasePipeID + 40, 15000, 4800, true); - generateNonGTFluidPipes(GT_Materials.Inconel792, ALLOY.INCONEL_792, BasePipeID + 45, 16000, 5500, true); - generateNonGTFluidPipes(GT_Materials.HastelloyX, ALLOY.HASTELLOY_X, BasePipeID + 50, 20000, 4200, true); - - generateGTFluidPipes(Materials.Tungsten, BasePipeID + 55, 4320, 7200, true); + generateGTFluidPipes(Materials.Europium, basePipeID + 20, 12000, 7500, true); + generateNonGTFluidPipes(GT_Materials.Potin, ALLOY.POTIN, basePipeID + 25, 500, 2000, true); + generateNonGTFluidPipes(GT_Materials.MaragingSteel300, ALLOY.MARAGING300, basePipeID + 30, 14000, 2500, true); + generateNonGTFluidPipes(GT_Materials.MaragingSteel350, ALLOY.MARAGING350, basePipeID + 35, 16000, 2500, true); + generateNonGTFluidPipes(GT_Materials.Inconel690, ALLOY.INCONEL_690, basePipeID + 40, 15000, 4800, true); + generateNonGTFluidPipes(GT_Materials.Inconel792, ALLOY.INCONEL_792, basePipeID + 45, 16000, 5500, true); + generateNonGTFluidPipes(GT_Materials.HastelloyX, ALLOY.HASTELLOY_X, basePipeID + 50, 20000, 4200, true); + + generateGTFluidPipes(Materials.Tungsten, basePipeID + 55, 4320, 7200, true); if (EnderIO.isModLoaded()) { - generateGTFluidPipes(Materials.DarkSteel, BasePipeID + 60, 2320, 2750, true); + generateGTFluidPipes(Materials.DarkSteel, basePipeID + 60, 2320, 2750, true); } - generateGTFluidPipes(Materials.Clay, BasePipeID + 65, 100, 500, false); - generateGTFluidPipes(Materials.Lead, BasePipeID + 70, 350, 1200, true); + generateGTFluidPipes(Materials.Clay, basePipeID + 65, 100, 500, false); + generateGTFluidPipes(Materials.Lead, basePipeID + 70, 350, 1200, true); generateNonGTFluidPipes( GT_Materials.TriniumNaquadahCarbonite, @@ -648,9 +648,6 @@ private static void superConductorFactory(final GT_Materials Material, final int Logger.ERROR(Material.name() + " has defaulted to 8v."); V = 0; } - // makeWires(T, ID, 2L, 4L, 2L, GT_Values.V[V], true, false); - // makeSuperConductors(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false); - // makeWires(T, ID, bEC ? 2L : 2L, bEC ? 4L : 4L, 2L, gregtech.api.enums.GT_Values.V[V], true, false); } private static void generateGTFluidPipes(final Materials material, final int startID, final int transferRatePerSec, diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java index 3816489cc7..cb1d950ed1 100644 --- a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java @@ -18,7 +18,6 @@ public class TF_Block_Fluid_Ender extends BlockFluidCoFHBase { public static final int LEVELS = 4; public static final Material materialFluidEnder = new MaterialLiquid(MapColor.greenColor); - private static final boolean effect = true; public TF_Block_Fluid_Ender() { super(GTPlusPlus.ID, TF_Fluids.fluidEnder, materialFluidEnder, "ender"); @@ -43,6 +42,7 @@ public boolean preInit() { @Override public void onEntityCollidedWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Entity paramEntity) { + boolean effect = true; if ((!effect) || (paramWorld.isRemote)) { return; } diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java b/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java index b6896f5b96..0e818ffda0 100644 --- a/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java +++ b/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java @@ -142,14 +142,6 @@ public void generate() { int id = mID; if (id > 0) { - // Object aTinkersCustomMaterial = generateToolMaterial(mMaterial); - // Logger.INFO("[TiCon] Created Material: "+mLocalName); - - // TinkersUtils.addToolMaterial(id, aTinkersCustomMaterial); - // TinkersUtils.addDefaultToolPartMaterial(id); - // TinkersUtils.addBowMaterial(id, calcBowDrawSpeed(mMaterial), 1.0F); - // TinkersUtils.addArrowMaterial(id, calcProjectileMass(mMaterial), calcProjectileFragility(mMaterial)); - NBTTagCompound tag = new NBTTagCompound(); tag.setInteger("Id", id); tag.setString("Name", mUnlocalName); @@ -215,8 +207,6 @@ private boolean generateRecipes(Material aMaterial, int aID) { return false; } - // Smeltery.addMelting(new ItemStack(ExtraUtils.unstableIngot, 1, 0), ExtraUtils.decorative1, 5, 850, - // aMaterial.getFluid(72)); TinkersUtils.registerFluidType(mLocalName, aMatBlock, 0, aMelt, aFluid, true); TinkersUtils.addMelting(aMaterial.getBlock(1), aMatBlock, 0, aMelt, aMaterial.getFluidStack(144 * 9)); TinkersUtils.addMelting(aMaterial.getIngot(1), aMatBlock, 0, aMelt, aMaterial.getFluidStack(144)); @@ -234,9 +224,6 @@ private boolean generateRecipes(Material aMaterial, int aID) { boolean extended = TinkersUtils.generateCastingRecipes(aMaterial, aID); - // TConstructRegistry.getBasinCasting().addCastingRecipe(new ItemStack(ExtraUtils.decorative1, 1, 5), new - // FluidStack(unstable, 1296), (ItemStack)null, true, 100); - return true; } } diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java index 4859b4ab4d..e3e8697650 100644 --- a/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java +++ b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java @@ -300,12 +300,8 @@ public static Object getCastingInstance(int aType) { Method m = null; if (aType == 0) { m = ReflectionUtils.getMethod(mTinkersRegistryInstance, "getTableCasting", new Class[] {}); - // return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getTableCasting", new Class[] {}, new - // Object[] {}); } else if (aType == 1) { m = ReflectionUtils.getMethod(mTinkersRegistryInstance, "getBasinCasting", new Class[] {}); - // return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getBasinCasting", new Class[] {}, new - // Object[] {}); } else { // return null; } From 2a3b7e191c87e723ead9ef9f3f63daf35010d7b0 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:20:16 +0100 Subject: [PATCH 7/8] Conflicts --- .../minecraft/FormattedTooltipString.java | 23 -- .../item/base/itemblock/ItemBlockDoor.java | 101 ------ .../item/base/itemblock/ItemBlockNBT.java | 96 ------ .../core/item/tool/misc/box/BaseBoxItem.java | 75 ----- .../item/tool/misc/box/ContainerBoxBase.java | 314 ------------------ .../thaumcraft/aspect/GTPP_AspectStack.java | 14 - .../wrapper/aspect/TC_AspectList_Wrapper.java | 32 -- .../wrapper/recipe/Base_Recipe_Wrapper.java | 10 - .../recipe/TC_CrucibleRecipe_Wrapper.java | 18 - .../recipe/TC_IArcaneRecipe_Wrapper.java | 18 - .../TC_InfusionEnchantmentRecipe_Wrapper.java | 18 - .../recipe/TC_InfusionRecipe_Wrapper.java | 18 - .../wrapper/research/TC_PageType_Wrapper.java | 16 - .../TC_ResearchCategories_Wrapper.java | 92 ----- .../TC_ResearchCategoryList_Wrapper.java | 22 -- .../research/TC_ResearchItem_Wrapper.java | 245 -------------- .../research/TC_ResearchNoteData_Wrapper.java | 13 - .../research/TC_ResearchPage_Wrapper.java | 229 ------------- 18 files changed, 1354 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java delete mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java delete mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java delete mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java delete mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java deleted file mode 100644 index 73d17aba39..0000000000 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -public class FormattedTooltipString { - - public final String mText; - public final boolean mPrefix; - - public FormattedTooltipString(String aText, boolean aPrefix) { - mText = aText; - mPrefix = aPrefix; - } - - public String getTooltip(Object aTagValue) { - String aTip; - - if (mPrefix) { - aTip = mText + ": " + aTagValue.toString(); - } else { - aTip = "" + aTagValue.toString() + ": " + mText; - } - return aTip; - } -} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java deleted file mode 100644 index 54c8b89704..0000000000 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ItemBlockDoor extends ItemBlock { - - @SideOnly(Side.CLIENT) - private IIcon field_150938_b; - - public ItemBlockDoor(Block p_i45328_1_) { - super(p_i45328_1_); - } - - /** - * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return - * True if something happen and false if it don't. This is for ITEMS, not BLOCKS - */ - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, - int par5, int par6, int par7, float par8, float par9, float par10) { - if (par7 != 1) { - return false; - } else { - ++par5; - Block block; - - block = field_150939_a; - - if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) - && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)) { - if (!block.canPlaceBlockAt(par3World, par4, par5, par6)) { - return false; - } else { - int i1 = MathHelper.floor_double( - (double) ((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3; - byte b0 = 0; - byte b1 = 0; - - if (i1 == 0) { - b1 = 1; - } - - if (i1 == 1) { - b0 = -1; - } - - if (i1 == 2) { - b1 = -1; - } - - if (i1 == 3) { - b0 = 1; - } - - int i2 = (par3World.getBlock(par4 - b0, par5, par6 - b1).isNormalCube() ? 1 : 0) - + (par3World.getBlock(par4 - b0, par5 + 1, par6 - b1).isNormalCube() ? 1 : 0); - int j1 = (par3World.getBlock(par4 + b0, par5, par6 + b1).isNormalCube() ? 1 : 0) - + (par3World.getBlock(par4 + b0, par5 + 1, par6 + b1).isNormalCube() ? 1 : 0); - boolean flag = par3World.getBlock(par4 - b0, par5, par6 - b1) == block - || par3World.getBlock(par4 - b0, par5 + 1, par6 - b1) == block; - boolean flag1 = par3World.getBlock(par4 + b0, par5, par6 + b1) == block - || par3World.getBlock(par4 + b0, par5 + 1, par6 + b1) == block; - boolean flag2 = false; - - if (flag && !flag1) { - flag2 = true; - } else if (j1 > i2) { - flag2 = true; - } - - par3World.setBlock(par4, par5, par6, block, i1, 2); - par3World.setBlock(par4, par5 + 1, par6, block, 8 | (flag2 ? 1 : 0), 2); - par3World.notifyBlocksOfNeighborChange(par4, par5, par6, block); - par3World.notifyBlocksOfNeighborChange(par4, par5 + 1, par6, block); - - --par1ItemStack.stackSize; - return true; - } - } else { - return false; - } - } - } - - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { - p_77624_3_.add("This is a block, you can place it by right clicking"); - super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); - } -} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java deleted file mode 100644 index abbdd61ff1..0000000000 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java +++ /dev/null @@ -1,96 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class ItemBlockNBT extends ItemBlock { - - protected final int mID; - - public ItemBlockNBT(final Block block) { - super(block); - this.mID = ((ITileTooltip) block).getTooltipID(); - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - // if () - - if (this.mID == 0) { // blockDarkWorldPortalFrame - list.add("Assembled in the same shape as the Nether Portal."); - } - } - - @Override - public void onCreated(ItemStack item, World world, EntityPlayer player) { - addNBT(player, item); - super.onCreated(item, world, player); - } - - @Override - public void onUpdate(ItemStack item, World world, Entity entity, int p_77663_4_, boolean p_77663_5_) { - if (entity instanceof EntityPlayerMP) { - EntityPlayerMP mPlayer = (EntityPlayerMP) entity; - - NBTTagCompound rNBT = item.getTagCompound(); - rNBT = ((rNBT == null) ? new NBTTagCompound() : rNBT); - if (!rNBT.hasKey("mOwner")) { - addNBT(mPlayer, item); - } - } - super.onUpdate(item, world, entity, p_77663_4_, p_77663_5_); - } - - private void addNBT(EntityPlayer player, ItemStack item) { - NBTTagCompound rNBT = item.getTagCompound(); - rNBT = ((rNBT == null) ? new NBTTagCompound() : rNBT); - if (player != null) { - boolean mOP = PlayerUtils.isPlayerOP(player); - rNBT.setString("mOwner", player.getDisplayName()); - rNBT.setString("mUUID", "" + player.getUniqueID()); - rNBT.setBoolean("mOP", mOP); - } else if (player == null) { - rNBT.setString("mOwner", "fakeplayer"); - rNBT.setString("mUUID", "00000000"); - rNBT.setBoolean("mOP", false); - } - GT_Utility.ItemNBT.setNBT(item, rNBT); - } - - @Override - public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { - if (!(aWorld.setBlock(aX, aY, aZ, this.field_150939_a, 0, 3))) { - return false; - } - if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { - this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); - this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, aMeta); - } - TileEntityBase tTileEntity = (TileEntityBase) aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null && aPlayer != null) { - if (tTileEntity.isServerSide()) { - Logger.INFO("Setting Tile Entity information"); - NBTTagCompound aNBT = GT_Utility.ItemNBT.getNBT(aStack); - tTileEntity - .setOwnerInformation(aNBT.getString("mOwner"), aNBT.getString("mUUID"), aNBT.getBoolean("mOP")); - } - } - return true; - } -} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java deleted file mode 100644 index 2679441d76..0000000000 --- a/src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java +++ /dev/null @@ -1,75 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.util.Utils; - -public class BaseBoxItem extends CoreItem { - - private final int GUI; - - public BaseBoxItem(String displayName, String[] description, int GUI_ID) { - super( - "item." + Utils.sanitizeString(displayName), - displayName, - AddToCreativeTab.tabTools, - 1, - 0, - modifyDescriptionStringArray(description), - EnumRarity.uncommon, - EnumChatFormatting.GRAY, - false, - null); - GUI = GUI_ID; - } - - private static String[] modifyDescriptionStringArray(String[] array) { - String[] a = new String[array.length + 1]; - for (int b = 0; b < array.length; b++) { - a[b] = array[b]; - } - a[a.length - 1] = "Right Click to open"; - return a; - } - - // Without this method, your inventory will NOT work!!! - @Override - public int getMaxItemUseDuration(ItemStack stack) { - return 1; // return any value greater than zero - } - - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - if (!world.isRemote) { - // If player not sneaking, open the inventory gui - if (!player.isSneaking()) { - player.openGui( - GTplusplus.instance, - GUI, - world, - (int) player.posX, - (int) player.posY, - (int) player.posZ); - } - } - return itemstack; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(GTPlusPlus.ID + ":" + this.getUnlocalizedName().substring(5)); - } -} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java deleted file mode 100644 index 3f24ba5e29..0000000000 --- a/src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java +++ /dev/null @@ -1,314 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerBoxBase extends Container { - - /* - * Finally, in your Container class, you will need to check if the currently opened inventory's uniqueID is equal to - * the itemstack's uniqueID in the method 'transferStackInSlot' as well as check if the itemstack is the currently - * equipped item in the method 'slotClick'. In both cases, you'll need to prevent the itemstack from being moved or - * it will cause bad things to happen. - */ - - /** - * Step 3: Create a custom Container for your Inventory - */ - - /* - * There's a LOT of code in this one, but read through all of the comments carefully and it should become clear what - * everything does. As a bonus, one of my previous tutorials is included within! - * "How to Properly Override Shift-Clicking" is here and better than ever! At least in my opinion. If you're like - * me, and you find no end of frustration trying to figure out which f-ing index you should use for which slots in - * your container when overriding transferStackInSlot, or if your following the original tutorial, then read on. - */ - - /** - * The Item Inventory for this Container, only needed if you want to reference isUseableByPlayer - */ - private final CustomBoxInventory inventory; - /** - * Using these will make transferStackInSlot easier to understand and implement INV_START is the index of the first - * slot in the Player's Inventory, so our CustomBoxInventory's number of slots (e.g. 5 slots is array indices 0-4, - * so start at 5) Notice how we don't have to remember how many slots we made? We can just use - * CustomBoxInventory.INV_SIZE and if we ever change it, the Container updates automatically. - */ - private final int INV_START, INV_END, HOTBAR_START, HOTBAR_END; - - // If you're planning to add armor slots, put those first like this: - // ARMOR_START = CustomBoxInventory.INV_SIZE, ARMOR_END = ARMOR_START+3, - // INV_START = ARMOR_END+1, and then carry on like above. - - private Slot generateSlot(final Constructor aClazz, final IInventory base, final int id, final int x, - final int y) { - Slot aSlot; - try { - aSlot = (Slot) aClazz.newInstance(base, id, x, y); - if (aSlot != null) { - return aSlot; - } - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - public ContainerBoxBase(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, - CustomBoxInventory CustomBoxInventory, Class aClazz, int aSlotCount) { - - INV_START = aSlotCount; - INV_END = INV_START + 26; - HOTBAR_START = INV_END + 1; - HOTBAR_END = HOTBAR_START + 8; - - this.inventory = CustomBoxInventory; - try { - - Constructor constructor; - constructor = aClazz.getConstructor(IInventory.class, int.class, int.class, int.class); - - int i; - - // ITEM INVENTORY - you'll need to adjust the slot locations to match your - // texture file - // I have them set vertically in columns of 4 to the right of the player model - for (i = 0; i < CustomBoxInventory.INV_SIZE; ++i) { - // You can make a custom Slot if you need different behavior, - // such as only certain item types can be put into this slot - // We made a custom slot to prevent our inventory-storing item - // from being stored within itself, but if you want to allow that and - // you followed my advice at the end of the above step, then you - // could get away with using the vanilla Slot class - this.addSlotToContainer( - generateSlot( - constructor, - this.getInventoryObject(), - i, - 80 + (18 * (int) (i / 4)), - 8 + (18 * (i % 4)))); - } - - // If you want, you can add ARMOR SLOTS here as well, but you need to - // make a public version of SlotArmor. I won't be doing that in this tutorial. - /* - * for (i = 0; i < 4; ++i) { // These are the standard positions for survival inventory layout - * this.addSlotToContainer(new SlotArmor(this.player, inventoryPlayer, inventoryPlayer.getSizeInventory() - - * 1 - i, 8, 8 + i * 18, i)); } - */ - - // PLAYER INVENTORY - uses default locations for standard inventory texture file - for (i = 0; i < 3; ++i) { - for (int j = 0; j < 9; ++j) { - this.addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - // PLAYER ACTION BAR - uses default locations for standard action bar texture - // file - for (i = 0; i < 9; ++i) { - this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); - } - - } catch (NoSuchMethodException | SecurityException e) { - e.printStackTrace(); - } - } - - @Override - public boolean canInteractWith(EntityPlayer entityplayer) { - // be sure to return the inventory's isUseableByPlayer method - // if you defined special behavior there: - return getInventoryObject().isUseableByPlayer(entityplayer); - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. - */ - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int index) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(index); - - if (slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - // If item is in our custom Inventory or armor slot - if (index < INV_START) { - // try to place in player inventory / action bar - if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END + 1, true)) { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - // Item is in inventory / hotbar, try to place in custom inventory or armor - // slots - else { - /* - * If your inventory only stores certain instances of Items, you can implement shift-clicking to your - * inventory like this: // Check that the item is the right type if (itemstack1.getItem() instanceof - * ItemCustom) { // Try to merge into your custom inventory slots // We use - * 'CustomBoxInventory.INV_SIZE' instead of INV_START just in case // you also add armor or other custom - * slots if (!this.mergeItemStack(itemstack1, 0, CustomBoxInventory.INV_SIZE, false)) { return null; } } - * // If you added armor slots, check them here as well: // Item being shift-clicked is armor - try to - * put in armor slot if (itemstack1.getItem() instanceof ItemArmor) { int type = ((ItemArmor) - * itemstack1.getItem()).armorType; if (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START - * + type + 1, false)) { return null; } } Otherwise, you have basically 2 choices: 1. shift-clicking - * between player inventory and custom inventory 2. shift-clicking between action bar and inventory Be - * sure to choose only ONE of the following implementations!!! - */ - /** - * Implementation number 1: Shift-click into your custom inventory - */ - if (index >= INV_START) { - // place in custom inventory - if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) { - return null; - } - } - - /** - * Implementation number 2: Shift-click items between action bar and inventory - */ - // item is in player's inventory, but not in action bar - if (index >= INV_START && index < HOTBAR_START) { - // place in action bar - if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END + 1, false)) { - return null; - } - } - // item in action bar - place in player inventory - else if (index >= HOTBAR_START && index < HOTBAR_END + 1) { - if (!this.mergeItemStack(itemstack1, INV_START, INV_END + 1, false)) { - return null; - } - } - } - - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } - - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } - - return itemstack; - } - - /** - * You should override this method to prevent the player from moving the stack that opened the inventory, otherwise - * if the player moves it, the inventory will not be able to save properly - */ - @Override - public ItemStack slotClick(int slot, int button, int flag, EntityPlayer player) { - // this will prevent the player from interacting with the item that opened the - // inventory: - if (slot >= 0 && getSlot(slot) != null && getSlot(slot).getStack() == player.getHeldItem()) { - return null; - } - return super.slotClick(slot, button, flag, player); - } - - /* - * Special note: If your custom inventory's stack limit is 1 and you allow shift-clicking itemstacks into it, you - * will need to override mergeStackInSlot to avoid losing all the items but one in a stack when you shift-click. - */ - /** - * Vanilla mergeItemStack method doesn't correctly handle inventories whose max stack size is 1 when you shift-click - * into the inventory. This is a modified method I wrote to handle such cases. Note you only need it if your slot / - * inventory's max stack size is 1 - */ - @Override - protected boolean mergeItemStack(ItemStack stack, int start, int end, boolean backwards) { - boolean flag1 = false; - int k = (backwards ? end - 1 : start); - Slot slot; - ItemStack itemstack1; - - if (stack.isStackable()) { - while (stack.stackSize > 0 && (!backwards && k < end || backwards && k >= start)) { - slot = (Slot) inventorySlots.get(k); - itemstack1 = slot.getStack(); - - if (!slot.isItemValid(stack)) { - k += (backwards ? -1 : 1); - continue; - } - - if (itemstack1 != null && itemstack1.getItem() == stack.getItem() - && (!stack.getHasSubtypes() || stack.getItemDamage() == itemstack1.getItemDamage()) - && ItemStack.areItemStackTagsEqual(stack, itemstack1)) { - int l = itemstack1.stackSize + stack.stackSize; - - if (l <= stack.getMaxStackSize() && l <= slot.getSlotStackLimit()) { - stack.stackSize = 0; - itemstack1.stackSize = l; - getInventoryObject().markDirty(); - flag1 = true; - } else if (itemstack1.stackSize < stack.getMaxStackSize() && l < slot.getSlotStackLimit()) { - stack.stackSize -= stack.getMaxStackSize() - itemstack1.stackSize; - itemstack1.stackSize = stack.getMaxStackSize(); - getInventoryObject().markDirty(); - flag1 = true; - } - } - - k += (backwards ? -1 : 1); - } - } - if (stack.stackSize > 0) { - k = (backwards ? end - 1 : start); - while (!backwards && k < end || backwards && k >= start) { - slot = (Slot) inventorySlots.get(k); - itemstack1 = slot.getStack(); - - if (!slot.isItemValid(stack)) { - k += (backwards ? -1 : 1); - continue; - } - - if (itemstack1 == null) { - int l = stack.stackSize; - if (l <= slot.getSlotStackLimit()) { - slot.putStack(stack.copy()); - stack.stackSize = 0; - getInventoryObject().markDirty(); - flag1 = true; - break; - } else { - putStackInSlot( - k, - new ItemStack(stack.getItem(), slot.getSlotStackLimit(), stack.getItemDamage())); - stack.stackSize -= slot.getSlotStackLimit(); - getInventoryObject().markDirty(); - flag1 = true; - } - } - - k += (backwards ? -1 : 1); - } - } - - return flag1; - } - - public CustomBoxInventory getInventoryObject() { - return inventory; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java deleted file mode 100644 index e48bd64e53..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.aspect; - -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; - -public class GTPP_AspectStack { - - public final TC_Aspect_Wrapper mAspect; - public final int mAmount; - - public GTPP_AspectStack(TC_Aspect_Wrapper aAspect, int aAmount) { - mAspect = aAspect; - mAmount = aAmount; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java deleted file mode 100644 index 346d0d3c8b..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect; - -import net.minecraft.item.ItemStack; - -public class TC_AspectList_Wrapper { - - // thaumcraft.api.aspects.Aspect; - // thaumcraft.api.aspects.AspectList; - - public TC_AspectList_Wrapper() {} - - public TC_AspectList_Wrapper(ItemStack stack) {} - - public TC_AspectList_Wrapper(Object invoke) { - // TODO Auto-generated constructor stub - } - - public int size() { - // TODO Auto-generated method stub - return 0; - } - - public Object getVanillaAspectList() { - // TODO Auto-generated method stub - return null; - } - - public void add(TC_Aspect_Wrapper mAspect, int mAmount) { - // TODO Auto-generated method stub - - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java deleted file mode 100644 index 8a173e2b0a..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public interface Base_Recipe_Wrapper { - - public abstract ItemStack getRecipeOutput(); - - public abstract ItemStack getRecipeInput(); -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java deleted file mode 100644 index 004c18955c..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_CrucibleRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java deleted file mode 100644 index 8276af9f0e..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_IArcaneRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java deleted file mode 100644 index 9431978ca0..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_InfusionEnchantmentRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java deleted file mode 100644 index 0338644949..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_InfusionRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java deleted file mode 100644 index 3a06ac1b90..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -public class TC_PageType_Wrapper { - - public static final TC_PageType_Wrapper TEXT = null; - public static final TC_PageType_Wrapper TEXT_CONCEALED = null; - public static final TC_PageType_Wrapper NORMAL_CRAFTING = null; - public static final TC_PageType_Wrapper ARCANE_CRAFTING = null; - public static final TC_PageType_Wrapper CRUCIBLE_CRAFTING = null; - public static final TC_PageType_Wrapper INFUSION_CRAFTING = null; - public static final TC_PageType_Wrapper COMPOUND_CRAFTING = null; - public static final TC_PageType_Wrapper SMELTING = null; - public static final TC_PageType_Wrapper INFUSION_ENCHANTMENT = null; - public static final TC_PageType_Wrapper IMAGE = null; - public static final TC_PageType_Wrapper ASPECTS = null; -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java deleted file mode 100644 index 5ed57574d2..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java +++ /dev/null @@ -1,92 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; - -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.apache.logging.log4j.Level; - -import cpw.mods.fml.common.FMLLog; - -public class TC_ResearchCategories_Wrapper { - - public static LinkedHashMap researchCategories = new LinkedHashMap(); - - public static TC_ResearchCategoryList_Wrapper getResearchList(String key) { - return (TC_ResearchCategoryList_Wrapper) researchCategories.get(key); - } - - public static String getCategoryName(String key) { - return StatCollector.translateToLocal("tc.research_category." + key); - } - - public static TC_ResearchItem_Wrapper getResearch(String key) { - Collection rc = researchCategories.values(); - Iterator i$ = rc.iterator(); - - while (i$.hasNext()) { - Object cat = i$.next(); - Collection rl = ((TC_ResearchCategoryList_Wrapper) cat).research.values(); - Iterator i$1 = rl.iterator(); - - while (i$1.hasNext()) { - Object ri = i$1.next(); - if (((TC_ResearchItem_Wrapper) ri).key.equals(key)) { - return (TC_ResearchItem_Wrapper) ri; - } - } - } - - return null; - } - - public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) { - if (getResearchList(key) == null) { - TC_ResearchCategoryList_Wrapper rl = new TC_ResearchCategoryList_Wrapper(icon, background); - researchCategories.put(key, rl); - } - } - - public static void addResearch(TC_ResearchItem_Wrapper ri) { - TC_ResearchCategoryList_Wrapper rl = getResearchList(ri.category); - if (rl != null && !rl.research.containsKey(ri.key)) { - if (!ri.isVirtual()) { - Iterator i$ = rl.research.values().iterator(); - - while (i$.hasNext()) { - TC_ResearchItem_Wrapper rr = (TC_ResearchItem_Wrapper) i$.next(); - if (rr.displayColumn == ri.displayColumn && rr.displayRow == ri.displayRow) { - FMLLog.log( - Level.FATAL, - "[Thaumcraft] Research [" + ri.getName() - + "] not added as it overlaps with existing research [" - + rr.getName() - + "]", - new Object[0]); - return; - } - } - } - - rl.research.put(ri.key, ri); - if (ri.displayColumn < rl.minDisplayColumn) { - rl.minDisplayColumn = ri.displayColumn; - } - - if (ri.displayRow < rl.minDisplayRow) { - rl.minDisplayRow = ri.displayRow; - } - - if (ri.displayColumn > rl.maxDisplayColumn) { - rl.maxDisplayColumn = ri.displayColumn; - } - - if (ri.displayRow > rl.maxDisplayRow) { - rl.maxDisplayRow = ri.displayRow; - } - } - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java deleted file mode 100644 index f8066abe2d..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.util.ResourceLocation; - -public class TC_ResearchCategoryList_Wrapper { - - public int minDisplayColumn; - public int minDisplayRow; - public int maxDisplayColumn; - public int maxDisplayRow; - public ResourceLocation icon; - public ResourceLocation background; - public Map research = new HashMap(); - - public TC_ResearchCategoryList_Wrapper(ResourceLocation icon, ResourceLocation background) { - this.icon = icon; - this.background = background; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java deleted file mode 100644 index 1baefdc465..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; -import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils; - -public class TC_ResearchItem_Wrapper { - - public final String key; - public final String category; - public final TC_AspectList_Wrapper tags; - public String[] parents = null; - public String[] parentsHidden = null; - public String[] siblings = null; - public final int displayColumn; - public final int displayRow; - public final ItemStack icon_item; - public final ResourceLocation icon_resource; - private int complexity; - private boolean isSpecial; - private boolean isSecondary; - private boolean isRound; - private boolean isStub; - private boolean isVirtual; - private boolean isConcealed; - private boolean isHidden; - private boolean isLost; - private boolean isAutoUnlock; - private ItemStack[] itemTriggers; - private String[] entityTriggers; - private TC_Aspect_Wrapper[] aspectTriggers; - private Object[] pages = null; - - public TC_ResearchItem_Wrapper(String key, String category) { - this.key = key; - this.category = category; - this.tags = new TC_AspectList_Wrapper(); - this.icon_resource = null; - this.icon_item = null; - this.displayColumn = 0; - this.displayRow = 0; - this.setVirtual(); - } - - public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper tags, int col, int row, - int complex, ResourceLocation icon) { - this.key = key; - this.category = category; - this.tags = tags; - this.icon_resource = icon; - this.icon_item = null; - this.displayColumn = col; - this.displayRow = row; - this.complexity = complex; - if (this.complexity < 1) { - this.complexity = 1; - } - - if (this.complexity > 3) { - this.complexity = 3; - } - } - - public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper tags, int col, int row, - int complex, ItemStack icon) { - this.key = key; - this.category = category; - this.tags = tags; - this.icon_item = icon; - this.icon_resource = null; - this.displayColumn = col; - this.displayRow = row; - this.complexity = complex; - if (this.complexity < 1) { - this.complexity = 1; - } - - if (this.complexity > 3) { - this.complexity = 3; - } - } - - public TC_ResearchItem_Wrapper setSpecial() { - this.isSpecial = true; - return this; - } - - public TC_ResearchItem_Wrapper setStub() { - this.isStub = true; - return this; - } - - public TC_ResearchItem_Wrapper setLost() { - this.isLost = true; - return this; - } - - public TC_ResearchItem_Wrapper setConcealed() { - this.isConcealed = true; - return this; - } - - public TC_ResearchItem_Wrapper setHidden() { - this.isHidden = true; - return this; - } - - public TC_ResearchItem_Wrapper setVirtual() { - this.isVirtual = true; - return this; - } - - public TC_ResearchItem_Wrapper setParents(String... par) { - this.parents = par; - return this; - } - - public TC_ResearchItem_Wrapper setParentsHidden(String... par) { - this.parentsHidden = par; - return this; - } - - public TC_ResearchItem_Wrapper setSiblings(String... sib) { - this.siblings = sib; - return this; - } - - public TC_ResearchItem_Wrapper setPages(Object... par) { - this.pages = par; - return this; - } - - public Object[] getPages() { - return this.pages; - } - - public TC_ResearchItem_Wrapper setItemTriggers(ItemStack... par) { - this.itemTriggers = par; - return this; - } - - public TC_ResearchItem_Wrapper setEntityTriggers(String... par) { - this.entityTriggers = par; - return this; - } - - public TC_ResearchItem_Wrapper setAspectTriggers(TC_Aspect_Wrapper... par) { - this.aspectTriggers = par; - return this; - } - - public ItemStack[] getItemTriggers() { - return this.itemTriggers; - } - - public String[] getEntityTriggers() { - return this.entityTriggers; - } - - public TC_Aspect_Wrapper[] getAspectTriggers() { - return this.aspectTriggers; - } - - public TC_ResearchItem_Wrapper registerResearchItem() { - ThaumcraftUtils.addResearch(this); - return this; - } - - public String getName() { - return StatCollector.translateToLocal("tc.research_name." + this.key); - } - - public String getText() { - return StatCollector.translateToLocal("tc.research_text." + this.key); - } - - public boolean isSpecial() { - return this.isSpecial; - } - - public boolean isStub() { - return this.isStub; - } - - public boolean isLost() { - return this.isLost; - } - - public boolean isConcealed() { - return this.isConcealed; - } - - public boolean isHidden() { - return this.isHidden; - } - - public boolean isVirtual() { - return this.isVirtual; - } - - public boolean isAutoUnlock() { - return this.isAutoUnlock; - } - - public TC_ResearchItem_Wrapper setAutoUnlock() { - this.isAutoUnlock = true; - return this; - } - - public boolean isRound() { - return this.isRound; - } - - public TC_ResearchItem_Wrapper setRound() { - this.isRound = true; - return this; - } - - public boolean isSecondary() { - return this.isSecondary; - } - - public TC_ResearchItem_Wrapper setSecondary() { - this.isSecondary = true; - return this; - } - - public int getComplexity() { - return this.complexity; - } - - public TC_ResearchItem_Wrapper setComplexity(int complexity) { - this.complexity = complexity; - return this; - } - - public TC_Aspect_Wrapper getResearchPrimaryTag() { - // TODO - return null; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java deleted file mode 100644 index df8d21bbaa..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -public class TC_ResearchNoteData_Wrapper { - - public TC_ResearchNoteData_Wrapper(Object researchNoteData) { - // TODO Auto-generated constructor stub - } - - public Object getResearchNoteData() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java deleted file mode 100644 index 4632909620..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java +++ /dev/null @@ -1,229 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_CrucibleRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_IArcaneRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionEnchantmentRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionRecipe_Wrapper; - -public class TC_ResearchPage_Wrapper { - - public TC_PageType_Wrapper type; - public String text; - public String research; - public ResourceLocation image; - public TC_AspectList_Wrapper aspects; - public Object recipe; - public ItemStack recipeOutput; - - public TC_ResearchPage_Wrapper(String text) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.TEXT; - this.text = text; - } - - public TC_ResearchPage_Wrapper(String research, String text) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.TEXT_CONCEALED; - this.research = research; - this.text = text; - } - - public TC_ResearchPage_Wrapper(IRecipe recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.NORMAL_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - public TC_ResearchPage_Wrapper(IRecipe[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.NORMAL_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.ARCANE_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.INFUSION_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(List recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.COMPOUND_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.ARCANE_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - public TC_ResearchPage_Wrapper(ItemStack input) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.SMELTING; - this.recipe = input; - this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input); - } - - public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.INFUSION_CRAFTING; - this.recipe = recipe; - if (recipe.getRecipeOutput() instanceof ItemStack) { - this.recipeOutput = (ItemStack) recipe.getRecipeOutput(); - } else { - this.recipeOutput = recipe.getRecipeInput(); - } - } - - public TC_ResearchPage_Wrapper(TC_InfusionEnchantmentRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.INFUSION_ENCHANTMENT; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(ResourceLocation image, String caption) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.IMAGE; - this.image = image; - this.text = caption; - } - - public TC_ResearchPage_Wrapper(TC_AspectList_Wrapper as) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.ASPECTS; - this.aspects = as; - } - - public String getTranslatedText() { - String ret = ""; - if (this.text != null) { - ret = StatCollector.translateToLocal(this.text); - if (ret.isEmpty()) { - ret = this.text; - } - } - - return ret; - } -} From 47e9205f90664a978967733bd534b8df14022529 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:20:19 +0100 Subject: [PATCH 8/8] Conflicts --- .../xmod/thaumcraft/HANDLER_Thaumcraft.java | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java deleted file mode 100644 index 0bca8535fe..0000000000 --- a/src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft; - -import static gregtech.api.enums.Mods.Thaumcraft; - -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectCompat; -import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectStack; - -public class HANDLER_Thaumcraft { - - public static GTPP_AspectCompat sThaumcraftCompat; - public static Item mResearchNotes; - public static final AutoMap> sItemsToGetAspects = new AutoMap>(); - - public static void init() { - if (Thaumcraft.isModLoaded()) { - try { - mResearchNotes = (Item) ReflectionUtils - .getField(ReflectionUtils.getClass("thaumcraft.common.config.ConfigItems"), "itemResearchNotes") - .get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - mResearchNotes = Items.paper; - } - } - } -}