From 1dfc470de2b404bfb7e319861db24aaa28f252bd Mon Sep 17 00:00:00 2001 From: Exidex Date: Sat, 6 May 2017 02:39:14 +0200 Subject: [PATCH] Revert deletion of deprecated methods --- .../java/gregtech/api/enums/Materials.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index b84a5489..613c1167 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -1571,6 +1571,25 @@ public class Materials implements ISubTagContainer, Comparable { else mAspects.addAll(aAspects); } + /** + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc) that looped over the old materials enum + */ + @Deprecated + public String name() { + return mName; + } + + /** + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc) that looped over the old materials enum + */ + @Deprecated + public static Materials valueOf(String aMaterialName) { + return getMaterialsMap().get(aMaterialName); + } + + /** + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc) that looped over the old materials enum + */ public static Materials[] values() { return MATERIALS_ARRAY; }