コード例 #1
0
  public static Map func_27177_a(String s) {
    HashMap hashmap = new HashMap();
    try {
      String s1 = "local";
      StringBuilder stringbuilder = new StringBuilder();
      J_JsonRootNode j_jsonrootnode = (new J_JdomParser()).func_27367_a(s);
      List list = j_jsonrootnode.func_27217_b(new Object[] {"stats-change"});
      for (Iterator iterator = list.iterator(); iterator.hasNext(); ) {
        J_JsonNode j_jsonnode = (J_JsonNode) iterator.next();
        Map map = j_jsonnode.func_27214_c();
        java.util.Map.Entry entry = (java.util.Map.Entry) map.entrySet().iterator().next();
        int i = Integer.parseInt(((J_JsonStringNode) entry.getKey()).func_27216_b());
        int j = Integer.parseInt(((J_JsonNode) entry.getValue()).func_27216_b());
        StatBase statbase = StatList.func_27361_a(i);
        if (statbase == null) {
          System.out.println(
              (new StringBuilder()).append(i).append(" is not a valid stat").toString());
        } else {
          stringbuilder.append(StatList.func_27361_a(i).statGuid).append(",");
          stringbuilder.append(j).append(",");
          hashmap.put(statbase, Integer.valueOf(j));
        }
      }

      MD5String md5string = new MD5String(s1);
      String s2 = md5string.func_27369_a(stringbuilder.toString());
      if (!s2.equals(j_jsonrootnode.func_27213_a(new Object[] {"checksum"}))) {
        System.out.println("CHECKSUM MISMATCH");
        return null;
      }
    } catch (J_InvalidSyntaxException j_invalidsyntaxexception) {
      j_invalidsyntaxexception.printStackTrace();
    }
    return hashmap;
  }
コード例 #2
0
ファイル: Minecraft.java プロジェクト: Tartine08/Aelyth-1
 public Minecraft(
     Component component,
     Canvas canvas,
     MinecraftApplet minecraftapplet,
     int i,
     int j,
     boolean flag) {
   fullscreen = false;
   hasCrashed = false;
   timer = new Timer(20F);
   session = null;
   hideQuitButton = true;
   isGamePaused = false;
   currentScreen = null;
   loadingScreen = new LoadingScreenRenderer(this);
   ticksRan = 0;
   leftClickCounter = 0;
   guiAchievement = new GuiAchievement(this);
   skipRenderWorld = false;
   field_9242_w = new ModelBiped(0.0F);
   objectMouseOver = null;
   sndManager = new SoundManager();
   textureWaterFX = new TextureWaterFX();
   textureLavaFX = new TextureLavaFX();
   running = true;
   debug = "";
   isTakingScreenshot = false;
   prevFrameTime = -1L;
   inGameHasFocus = false;
   mouseTicksRan = 0;
   isRaining = false;
   systemTime = System.currentTimeMillis();
   joinPlayerCounter = 0;
   StatList.func_27360_a();
   tempDisplayHeight = j;
   fullscreen = flag;
   mcApplet = minecraftapplet;
   new ThreadSleepForever(this, "Timer hack thread");
   mcCanvas = canvas;
   displayWidth = i;
   displayHeight = j;
   fullscreen = flag;
   if (minecraftapplet == null || "true".equals(minecraftapplet.getParameter("stand-alone"))) {
     hideQuitButton = false;
   }
   theMinecraft = this;
 }
コード例 #3
0
 public void handleStatistic(Packet200Statistic var1) {
   ((EntityClientPlayerMP) this.mc.thePlayer)
       .func_27027_b(StatList.func_27361_a(var1.statisticId), var1.amount);
 }
コード例 #4
0
ファイル: Item.java プロジェクト: operacraft/Minecraft
 static {
   StatList.initStats();
 }