From a59d2fbaed3057b8f5ad4961ee65b4ef7a5e0693 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 18 Jun 2018 02:35:47 +0200 Subject: fix for #2152 fix for reused DataSticks keep parts of old NBTTagCompound fixed blockores and removed one hashmap --- .../java/gregtech/api/util/GT_Assemblyline_Server.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Assemblyline_Server.java') diff --git a/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java b/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java index d5a47621ac..13bac88f91 100644 --- a/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java +++ b/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java @@ -19,7 +19,7 @@ public class GT_Assemblyline_Server { public static LinkedHashMap lServerNames = new LinkedHashMap(); - private static LinkedHashMap internal2= new LinkedHashMap(),internal3 = new LinkedHashMap(),internal4= new LinkedHashMap(),internal5= new LinkedHashMap(); + private static LinkedHashMap internal2= new LinkedHashMap(),internal3 = new LinkedHashMap(),internal4= new LinkedHashMap(); private static HashMap internal = new HashMap(); public static void fillMap(FMLPreInitializationEvent aEvent) { @@ -36,14 +36,12 @@ public class GT_Assemblyline_Server { for (Map.Entry entry : internal.entrySet()) { s=entry.getValue().getString().replaceAll("%", ""); - if (entry.getKey().contains("metaitem")&&s.contains("material")) + if (entry.getKey().contains("metaitem") && s.contains("material")) internal2.put(entry.getKey(), s); - else if (entry.getKey().contains("blockmachines")&&s.contains("material")) + else if (entry.getKey().contains("blockmachines") && s.contains("material")) internal3.put(entry.getKey(), s); - else if (entry.getKey().contains("blockores")&&s.contains("material")) + else if ((entry.getKey().contains("blockores")||(entry.getKey().contains("blockmetal")||entry.getKey().contains("blockgem"))) && s.contains("material")) internal4.put(entry.getKey(), s); - else if ((entry.getKey().contains("blockmetal")||entry.getKey().contains("blockgem"))&&s.contains("material")) - internal5.put(entry.getKey(), s); else lServerNames.put(entry.getKey(), s); } @@ -84,15 +82,13 @@ public class GT_Assemblyline_Server { lServerNames.put(entry.getKey(), entry.getValue()); } for (Map.Entry entry : internal4.entrySet()) { - if (entry.getValue().contains("blockores")) { + if (entry.getKey().contains("blockores")) { int i = Integer.parseInt(entry.getKey().substring("gt.blockores.".length(), entry.getKey().length()-".name".length())); i=i%1000; lServerNames.put(entry.getKey(), entry.getValue().replace("material",GregTech_API.sGeneratedMaterials[i].toString())); } - } - - for (Map.Entry entry : internal5.entrySet()) { - if(entry.getKey().contains("blockmetal")) { + + else if(entry.getKey().contains("blockmetal")) { Materials[] mMats = null; String t = entry.getKey().substring("gt.blockmetal".length()); t=t.substring(0,1); -- cgit