diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2020-03-16 19:25:42 +0100 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2020-03-16 19:25:42 +0100 |
commit | 6e400beec87761644a34cd2605f864510ec911c7 (patch) | |
tree | 06b75c3d072fa3bc8182b8f67fc0f33c4a8f6a0d /src/main/java | |
parent | 17ced5ad374980d9a09adfd430ad10dcba60fabf (diff) | |
download | GT5-Unofficial-6e400beec87761644a34cd2605f864510ec911c7.tar.gz GT5-Unofficial-6e400beec87761644a34cd2605f864510ec911c7.tar.bz2 GT5-Unofficial-6e400beec87761644a34cd2605f864510ec911c7.zip |
Refactored Element.java
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/gregtech/api/enums/Element.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/enums/Element.java b/src/main/java/gregtech/api/enums/Element.java index 144a61e7be..cfbbeaa528 100644 --- a/src/main/java/gregtech/api/enums/Element.java +++ b/src/main/java/gregtech/api/enums/Element.java @@ -283,7 +283,7 @@ public enum Element { /** * Links to every pure Material containing just this Element. */ - public ArrayList<Materials> mLinkedMaterials = new ArrayList<Materials>(); + public ArrayList<Materials> mLinkedMaterials = new ArrayList<>(); /** * @param aProtons Amount of Protons. Antiprotons if negative. @@ -292,7 +292,7 @@ public enum Element { * @param aDecayTo String representing the Elements it decays to. Separated by an '&' Character. * @param aName Name of the Element */ - private Element(long aProtons, long aNeutrons, long aAdditionalMass, long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) { + Element(long aProtons, long aNeutrons, long aAdditionalMass, long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) { mProtons = aProtons; mNeutrons = aNeutrons; mAdditionalMass = aAdditionalMass; @@ -304,7 +304,8 @@ public enum Element { public static Element get(String aMaterialName) { Object tObject = GT_Utility.getFieldContent(Element.class, aMaterialName, false, false); - if (tObject != null && tObject instanceof Element) return (Element) tObject; + if (tObject instanceof Element) + return (Element) tObject; return _NULL; } |