diff options
Diffstat (limited to 'src')
3 files changed, 15 insertions, 17 deletions
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index f7df02e7b3..4911801025 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -185,7 +185,7 @@ public class GT_Values { EnumChatFormatting.DARK_GREEN.toString(), // UV, 8 EnumChatFormatting.DARK_RED.toString(), // UHV, 9 EnumChatFormatting.DARK_PURPLE.toString(), // UEV, 10 - EnumChatFormatting.DARK_BLUE + EnumChatFormatting.BOLD.toString(), // UIV, 11 + EnumChatFormatting.DARK_BLUE.toString() + EnumChatFormatting.BOLD.toString(), // UIV, 11 EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD.toString() + EnumChatFormatting.UNDERLINE.toString(), // UMV, 12 @@ -403,7 +403,7 @@ public class GT_Values { */ public static boolean debugDriller = false; /** - * Debug parameter for world generation. Track chunks added/removed from run queue. + * Debug parameter for world generation. Tracks chunks added/removed from run queue. */ public static boolean debugWorldGen = false; /** @@ -487,7 +487,7 @@ public class GT_Values { /** * Pretty formatting for author names. */ - public static final String AuthorColen = "Author: " + EnumChatFormatting.DARK_RED + public static final String Colen = "" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "C" + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "o" @@ -498,6 +498,7 @@ public class GT_Values { + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "n"; + public static final String AuthorColen = "Author: " + Colen; public static final String AuthorKuba = "Author: " + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + "k" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "u" + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + "b" + EnumChatFormatting.YELLOW diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 3a8f511122..2a93e541b5 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -644,8 +644,6 @@ public class GT_Client extends GT_Proxy implements Runnable { } catch (Throwable e) { e.printStackTrace(GT_Log.err); } - - // Calculate highest plasma turbine efficiency. } @Override @@ -653,6 +651,7 @@ public class GT_Client extends GT_Proxy implements Runnable { public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) { mFirstTick = true; mReloadCount++; + // For utility methods elsewhere. calculateMaxPlasmaTurbineEfficiency(); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index c909fd2af7..fb06c383fd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -1,7 +1,6 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_Utility.getPlasmaFuelValueInEUPerLiterFromFluid; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -24,7 +23,6 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -@SuppressWarnings("SpellCheckingInspection") public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_LargeTurbine { public GT_MetaTileEntity_LargeTurbine_Plasma(int aID, String aName, String aNameRegional) { @@ -80,7 +78,6 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar return tt; } - @Deprecated // See GT_Utility#getPlasmaFuelValuePerLiterFromFluid public int getFuelValue(FluidStack aLiquid) { if (aLiquid == null) return 0; GT_Recipe tFuel = GT_Recipe_Map.sPlasmaFuels.findFuel(aLiquid); @@ -117,14 +114,14 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar float[] flowMultipliers) { if (aFluids.size() >= 1) { aOptFlow *= 800; // CHANGED THINGS HERE, check recipe runs once per 20 ticks - int tEU; + int tEU = 0; - int actualOptimalFlow; + int actualOptimalFlow = 0; FluidStack firstFuelType = new FluidStack( aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! - int fuelValue = getPlasmaFuelValueInEUPerLiterFromFluid(firstFuelType); + int fuelValue = getFuelValue(firstFuelType); actualOptimalFlow = GT_Utility.safeInt((long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue)); this.realOptFlow = actualOptimalFlow; // For scanner info @@ -139,7 +136,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar // - 550% if it is 3 // Variable required outside of loop for multi-hatch scenarios. int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * (1.5f * overflowMultiplier + 1))); - int flow; + int flow = 0; int totalFlow = 0; storedFluid = 0; @@ -169,12 +166,13 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar // GT_FML_LOGGER.info(totalFlow+" : "+fuelValue+" : "+aOptFlow+" : "+actualOptimalFlow+" : "+tEU); - if (totalFlow != actualOptimalFlow) { + if (totalFlow == actualOptimalFlow) { + tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU)); + } else { float efficiency = getOverflowEfficiency(totalFlow, actualOptimalFlow, overflowMultiplier); tEU = (int) (tEU * efficiency); + tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU)); } - // Round to the nearest EU. - tEU = Math.round(aBaseEff * tEU); // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the // turbine @@ -196,7 +194,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar // fuel used // The bigger this number is, the slower efficiency loss happens as flow moves beyond the optimal value // Plasmas are the most efficient out of all turbine fuels in this regard - float efficiency; + float efficiency = 0; if (totalFlow > actualOptimalFlow) { efficiency = 1.0f @@ -345,7 +343,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar + ")", /* 5 */ StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + EnumChatFormatting.GOLD + GT_Utility.formatNumbers(storedFluid) + EnumChatFormatting.RESET + "L", /* 6 */ - StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + EnumChatFormatting.RED + tDura + StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + EnumChatFormatting.RED + Integer.toString(tDura) + EnumChatFormatting.RESET + "%", /* 7 */ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" /* 8 */ |