From 12dab5d109ac81034fd0a8fe18317024a996af61 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Mon, 24 Dec 2018 03:59:59 +0000 Subject: + Added a config option to adjust the Turbine Rotor removal cut-off point. + Added some new Bags/Packs for various things. An Automatic Lunchbox, a Tool Box and a Magicians Satchel. + Added full compound of Eglin Steel to ABS. Closes #392. - Removed all Multi-Tools. $ Rewrote and Fixed the recipe system. All recipes are queued regardless of when called, then created during the end of the POST_INIT load phase. Fixes too many bugs to list. (Few more to do before tomorrow) $ Fixed COFH Hard requirement. Closes #398. % Adjusted the internal map type of the AutoMap. Should improve performance, if only in single digit cpu cycles. > To-Do) Fix Recipes pertaining to compound materials made from using fluids. State may be detected wrong after recipe system changes. --- .../gtPlusPlus/api/objects/GregtechException.java | 28 ++++++++++++++++++++++ src/Java/gtPlusPlus/api/objects/data/AutoMap.java | 5 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/Java/gtPlusPlus/api/objects/GregtechException.java (limited to 'src/Java/gtPlusPlus/api') diff --git a/src/Java/gtPlusPlus/api/objects/GregtechException.java b/src/Java/gtPlusPlus/api/objects/GregtechException.java new file mode 100644 index 0000000000..916dbc4aaf --- /dev/null +++ b/src/Java/gtPlusPlus/api/objects/GregtechException.java @@ -0,0 +1,28 @@ +package gtPlusPlus.api.objects; + +public class GregtechException extends Throwable { + + private static final long serialVersionUID = 3601884582161841486L; + + public GregtechException(String aError) { + this(aError, true); + } + + public GregtechException(String aError, boolean aIsVerbose) { + Logger.ERROR("Throwing GT++ Exception!"); + Logger.ERROR("[EXCEPTION] "+aError); + if (aIsVerbose) { + Logger.INFO("Throwing GT++ Exception!"); + Logger.INFO("[EXCEPTION] "+aError); + printStackTrace(); + } + } + + @Override + public void printStackTrace() { + super.printStackTrace(); + } + + + +} diff --git a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java index 45cce2eee5..ca231dbd63 100644 --- a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java +++ b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java @@ -19,12 +19,12 @@ public class AutoMap implements Iterable, Cloneable, Serializable { public AutoMap() { - this(new HashMap()); + this(new LinkedHashMap()); } public AutoMap(Map defaultMapType) { mInternalMap = defaultMapType; - mInternalNameMap = new HashMap(); + mInternalNameMap = new LinkedHashMap(); } @Override @@ -86,6 +86,7 @@ public class AutoMap implements Iterable, Cloneable, Serializable { public synchronized boolean clear(){ this.mInternalID = 0; this.mInternalMap.clear(); + this.mInternalNameMap.clear(); return true; } -- cgit