Пример #1
0
 @SideOnly(Side.CLIENT)
 public void drawTabIcon(RenderItem ri, int x, int y) {
   if (this == BALLLIGHTNING) {
     EntityBallLightning eb = new EntityBallLightning(Minecraft.getMinecraft().theWorld);
     eb.isDead = true;
     GL11.glPushMatrix();
     double d = 8;
     GL11.glTranslated(x + d, y + d, 0);
     double s = 18;
     GL11.glScaled(-s, s, 1);
     ReikaEntityHelper.getEntityRenderer(EntityBallLightning.class).doRender(eb, 0, 0, 0, 0, 0);
     GL11.glPopMatrix();
     return;
   } else if (this == PACKCHANGES) {
     ReikaTextureHelper.bindTerrainTexture();
     ReikaGuiAPI.instance.drawTexturedModelRectFromIcon(
         x, y + 1, ChromaIcons.QUESTION.getIcon(), 16, 14);
     return;
   } else if (this == NODENET) {
     ItemStack is = ThaumItemHelper.BlockEntry.NODEPLACER.getItem();
     GL11.glPushMatrix();
     double s = 2;
     GL11.glTranslated(x - 8, y - 6, 0);
     GL11.glScaled(s, s, 1);
     ReikaGuiAPI.instance.drawItemStack(ri, is, 0, 0);
     GL11.glPopMatrix();
     return;
   } else if (this == APIRECIPES) {
     ArrayList<ItemStack> ico = new ArrayList();
     /*
     if (ModList.THAUMCRAFT.isLoaded()) {
     	ico.add(ThaumItemHelper.BlockEntry.ANCIENTROCK.getItem());
     	ico.add(new ItemStack(ThaumItemHelper.BlockEntry.CRYSTAL.getBlock(), 1, 6));
     	ico.add(ThaumItemHelper.BlockEntry.ETHEREAL.getItem());
     	ico.add(ThaumItemHelper.ItemEntry.NITOR.getItem());
     	ico.add(ThaumItemHelper.ItemEntry.THAUMIUM.getItem());
     	ico.add(ThaumItemHelper.ItemEntry.FABRIC.getItem());
     }
     if (ModList.ROTARYCRAFT.isLoaded()) {
     	ico.add(MachineRegistry.BLASTFURNACE.getCraftedProduct());
     	ico.add(EngineType.AC.getCraftedProduct());
     	ico.add(ItemRegistry.GRAVELGUN.getStackOf());
     }
     if (ModList.REACTORCRAFT.isLoaded()) {
     	ico.add(ReactorTiles.INJECTOR.getCraftedProduct());
     }
     if (ModList.APPENG.isLoaded()) {
     	ico.add(AEApi.instance().blocks().blockController.stack(1));
     	ico.add(AEApi.instance().blocks().blockQuantumLink.stack(1));
     	ico.add(AEApi.instance().blocks().blockQuartzGrowthAccelerator.stack(1));
     }
     if (ModList.FORESTRY.isLoaded()) {
     	ico.add(new ItemStack(ForestryHandler.BlockEntry.HIVE.getBlock()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.COMB.getItem()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.HONEYDEW.getItem()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.QUEEN.getItem()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.POLLEN.getItem()));
     }
     if (ModList.FORESTRY.isLoaded()) {
     	ico.add(new ItemStack(ForestryHandler.BlockEntry.HIVE.getBlock()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.COMB.getItem()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.HONEYDEW.getItem()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.QUEEN.getItem()));
     	ico.add(new ItemStack(ForestryHandler.ItemEntry.POLLEN.getItem()));
     }
      */
     for (CastingRecipe cr : RecipesCastingTable.instance.getAllAPIRecipes()) {
       if (!ReikaItemHelper.collectionContainsItemStack(ico, cr.getOutput()))
         ico.add(cr.getOutput());
     }
     if (!ico.isEmpty()) {
       int idx = (int) ((System.currentTimeMillis() / 400) % ico.size());
       ReikaGuiAPI.instance.drawItemStack(ri, ico.get(idx), x, y);
     } else {
       ReikaGuiAPI.instance.drawTexturedModelRectFromIcon(
           x, y, ChromaIcons.NOENTER.getIcon(), 16, 16);
     }
     return;
   }
   ReikaGuiAPI.instance.drawItemStack(ri, this.getTabIcon(), x, y);
 }
 private static EntityRender createCrystalRender() {
   return new EntityRender(
       new EntityChromaEnderCrystal(Minecraft.getMinecraft().theWorld),
       ReikaEntityHelper.getEntityRenderer(EntityEnderCrystal.class));
 }