public int getColorFromDamage(int par1, int par2) { EntityEggInfo var3 = (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(par1)); return var3 != null ? (par2 == 0 ? Colorizer.colorizeSpawnerEgg(var3.primaryColor, par1, par2) : Colorizer.colorizeSpawnerEgg(var3.secondaryColor, par1, par2)) : Colorizer.colorizeSpawnerEgg(16777215, par1, par2); // Spout HD }
public int func_48412_k() { double var1 = (double) this.getFloatTemperature(); double var3 = (double) this.getFloatRainfall(); return Colorizer.colorizeBiome( ((ColorizerFoliage.getFoliageColor(var1, var3) & 16711422) + 5115470) / 2, Colorizer.COLOR_MAP_SWAMP_FOLIAGE, var1, var3); }
public int func_48415_j() { double var1 = (double) this.getFloatTemperature(); double var3 = (double) this.getFloatRainfall(); return Colorizer.colorizeBiome( ((ColorizerGrass.getGrassColor(var1, var3) & 16711422) + 5115470) / 2, Colorizer.COLOR_MAP_SWAMP_GRASS, var1, var3); }
/** * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. * Note only called when first determining what to render. */ public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { if (this.blockMaterial != Material.water) { return 16777215; } else { int var5 = 0; int var6 = 0; int var7 = 0; for (int var8 = -1; var8 <= 1; ++var8) { for (int var9 = -1; var9 <= 1; ++var9) { // MCPatcher Start int var10 = Colorizer.colorizeWater(par1IBlockAccess, par2 + var9, par4 + var8); // MCPatcher End var5 += (var10 & 16711680) >> 16; var6 += (var10 & 65280) >> 8; var7 += var10 & 255; } } return (var5 / 9 & 255) << 16 | (var6 / 9 & 255) << 8 | var7 / 9 & 255; } }
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3) { GL11.glPushMatrix(); // Spout Start boolean custom = false; BlockDesign design = null; if (par2ItemStack.itemID == 318) { org.spoutcraft.spoutcraftapi.material.CustomItem item = MaterialData.getCustomItem(par2ItemStack.getItemDamage()); if (item != null) { String textureURI = item.getTexture(); if (textureURI == null) { org.spoutcraft.spoutcraftapi.material.CustomBlock block = MaterialData.getCustomBlock(par2ItemStack.getItemDamage()); design = block != null ? block.getBlockDesign() : null; textureURI = design != null ? design.getTexureURL() : null; } if (textureURI != null) { Texture texture = CustomTextureManager.getTextureFromUrl( item.getAddon().getDescription().getName(), textureURI); if (texture != null) { GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getTextureID()); custom = true; } } } } if (!custom) { if (par2ItemStack.itemID < 256) { GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png")); } else { GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/items.png")); } } if (design != null) { design.renderItemstack(null, -0.5F, -0.5F, -0.5F, 0, 1F, rand); } else if (par2ItemStack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType())) { this.renderBlocksInstance.renderBlockAsItem( Block.blocksList[par2ItemStack.itemID], par2ItemStack.getItemDamage(), 1.0F); } else { Tessellator var4 = Tessellator.instance; int var5 = par1EntityLiving.getItemIcon(par2ItemStack, par3); float var6 = ((float) (var5 % 16 * TileSize.int_size) + 0.0F) / TileSize.float_size16; float var7 = ((float) (var5 % 16 * TileSize.int_size) + TileSize.float_sizeMinus0_01) / TileSize.float_size16; float var8 = ((float) (var5 / 16 * TileSize.int_size) + 0.0F) / TileSize.float_size16; float var9 = ((float) (var5 / 16 * TileSize.int_size) + TileSize.float_sizeMinus0_01) / TileSize.float_size16; if (custom) { var6 = 0; var7 = 1; var8 = 1; var9 = 0; } // Spout end float var10 = 0.0F; float var11 = 0.3F; GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glTranslatef(-var10, -var11, 0.0F); float var12 = 1.5F; GL11.glScalef(var12, var12, var12); GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F); Colorizer.colorizeWaterBlockGL(par2ItemStack.itemID); // Spout HD this.renderItemIn2D(var4, var7, var8, var6, var9); if (par2ItemStack != null && par2ItemStack.hasEffect() && par3 == 0) { GL11.glDepthFunc(GL11.GL_EQUAL); GL11.glDisable(GL11.GL_LIGHTING); this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture("%blur%/misc/glint.png")); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE); float var13 = 0.76F; GL11.glColor4f(0.5F * var13, 0.25F * var13, 0.8F * var13, 1.0F); GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glPushMatrix(); float var14 = 0.125F; GL11.glScalef(var14, var14, var14); float var15 = (float) (System.currentTimeMillis() % 3000L) / 3000.0F * 8.0F; GL11.glTranslatef(var15, 0.0F, 0.0F); GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F); this.renderItemIn2D(var4, 0.0F, 0.0F, 1.0F, 1.0F); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(var14, var14, var14); var15 = (float) (System.currentTimeMillis() % 4873L) / 4873.0F * 8.0F; GL11.glTranslatef(-var15, 0.0F, 0.0F); GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F); this.renderItemIn2D(var4, 0.0F, 0.0F, 1.0F, 1.0F); GL11.glPopMatrix(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); GL11.glDepthFunc(GL11.GL_LEQUAL); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); } GL11.glPopMatrix(); }