From 84cce1bba9a1091f2428ebee464cbfdf57491def Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 13 Sep 2018 13:27:29 +1000 Subject: + Added some Average functions to MathUtils.java. + Added a Proxy Grabber function to Meta_GT_Proxy.java. % Tweaked fuel values for Coal Gas & Coal Tar. $ Fixed issue with Semifluid Fuel generation where none were excluded. - Removed Logging from material Generation. --- src/Java/gtPlusPlus/core/util/math/MathUtils.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/Java/gtPlusPlus/core/util/math') diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java index cda463ff10..7ec898ce3a 100644 --- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java +++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java @@ -6,6 +6,7 @@ import java.util.Random; import gregtech.api.enums.GT_Values; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; @@ -374,5 +375,23 @@ public class MathUtils { return mLargeChanceArray[randInt(0, mLargeChanceArray.length-1)]; } + + public static long getAverage(AutoMap aDataSet) { + long[] aNewSet = new long[aDataSet.size()]; + for (int u=0;u