Exemplo n.º 1
0
  public void onTickInGui(float data) throws Exception {
    Minecraft mc = MinecraftUtil.getClient();
    if (mc.currentScreen != null && mc.currentScreen.getClass() == GuiCreateWorld.class) {
      Field field = null;
      if (true) {
        field = mc.currentScreen.getClass().getDeclaredField("parentGuiScreen");
      }
      // else
      // {
      //    field = mc.currentScreen.getClass().getDeclaredField("field_73924_a");//field_73924_a -
      // b
      // }
      field.setAccessible(true);

      mc.displayGuiScreen(
          new MWGuiCreateWorld(
              (GuiScreen) field.get(mc.currentScreen), (GuiCreateWorld) mc.currentScreen));
    }
  }
Exemplo n.º 2
0
 @Override
 @SideOnly(Side.CLIENT)
 public void updateIcons(IconRegister par1IconRegister) {
   this.iconIndex = par1IconRegister.registerIcon(MinecraftUtil.getTextureFolder() + this.icon);
 }
Exemplo n.º 3
0
 public static Object[] getToolRecipe(Object object, int type) {
   return MinecraftUtil.getToolRecipe(object, Item.stick, type);
 }