001 002 import java.io.PrintStream; 003 import java.util.HashMap; 004 import java.util.Map; 005 006 public class bm { 007 008 private static Map e = new HashMap(); 009 private static Map f = new HashMap(); 010 public fv a; 011 public int b; 012 public int c; 013 public int d; 014 015 private static void a(Class paramClass, String paramString) { 016 if (f.containsKey(paramString)) { 017 throw new IllegalArgumentException("Duplicate id: " + paramString); 018 } 019 e.put(paramString, paramClass); 020 f.put(paramClass, paramString); 021 } 022 023 public void a(ah paramah) { 024 b = paramah.d("x"); 025 c = paramah.d("y"); 026 d = paramah.d("z"); 027 } 028 029 public void b(ah paramah) { 030 String str = (String) f.get(getClass()); 031 if (str == null) { 032 throw new RuntimeException(getClass() + " is missing a mapping! This is a bug!"); 033 } 034 paramah.a("id", str); 035 paramah.a("x", b); 036 paramah.a("y", c); 037 paramah.a("z", d); 038 } 039 040 public void f() { 041 } 042 043 public static bm c(ah paramah) { 044 bm localbm = null; 045 try { 046 Class localClass = (Class) e.get(paramah.h("id")); 047 if (localClass != null) { 048 localbm = (bm) localClass.newInstance(); 049 } 050 } catch (Exception localException) { 051 localException.printStackTrace(); 052 } 053 if (localbm != null) { 054 localbm.a(paramah); 055 } else { 056 System.out.println("Skipping TileEntity with id " + paramah.h("id")); 057 } 058 return localbm; 059 } 060 061 public void d() { 062 if (a != null) { 063 a.b(b, c, d, this); 064 } 065 } 066 067 public kx g() { 068 return null; 069 } 070 071 static { 072 a(ez.class, "Furnace"); 073 a(kc.class, "Chest"); 074 a(bf.class, "Trap"); 075 a(lv.class, "Sign"); 076 a(db.class, "MobSpawner"); 077 a(gl.class, "Music"); 078 } 079 }