public boolean func_78612_b(Block p_78612_1_, int p_78612_2_, int p_78612_3_, int p_78612_4_) { int var5 = p_78612_1_.func_71857_b(); if(var5 == -1) { return false; } else { p_78612_1_.func_71902_a(this.field_78669_a, p_78612_2_, p_78612_3_, p_78612_4_); this.func_83018_a(p_78612_1_); return var5 == 0?this.func_78570_q(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 4?this.func_78621_p(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 31?this.func_78581_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 1?this.func_78620_l(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 2?this.func_78572_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 20?this.func_78598_k(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 11?this.func_78582_a((BlockFence)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 39?this.func_96445_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 5?this.func_78589_i(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 13?this.func_78584_s(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 9?this.func_78586_a((BlockRailBase)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 19?this.func_78603_m(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 23?this.func_78566_o(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 6?this.func_78614_n(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 3?this.func_78590_h((BlockFire)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 8?this.func_78576_j(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 7?this.func_78601_u(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 10?this.func_78565_t((BlockStairs)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 27?this.func_78618_a((BlockDragonEgg)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 32?this.func_82779_a((BlockWall)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 12?this.func_78594_e(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 29?this.func_78577_f(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 30?this.func_78619_g(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 14?this.func_78574_w(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 15?this.func_78610_x((BlockRedstoneRepeater)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 36?this.func_94176_a((BlockRedstoneLogic)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 37?this.func_94171_a((BlockComparator)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 16?this.func_78593_b(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, false):(var5 == 17?this.func_78608_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, true):(var5 == 18?this.func_78592_a((BlockPane)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 21?this.func_78580_a((BlockFenceGate)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 24?this.func_78615_a((BlockCauldron)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 33?this.func_82780_a((BlockFlowerPot)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 35?this.func_82775_a((BlockAnvil)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 25?this.func_78585_a((BlockBrewingStand)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 26?this.func_78567_v((BlockEndPortalFrame)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 28?this.func_78616_a((BlockCocoa)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 34?this.func_82778_a((BlockBeacon)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 38?this.func_94172_a((BlockHopper)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):false)))))))))))))))))))))))))))))))))))))); } }
/** * Like the old updateEntity(), except more generic. */ public void update() { if (this.brewTime > 0) { --this.brewTime; if (this.brewTime == 0) { this.brewPotions(); this.markDirty(); } else if (!this.canBrew()) { this.brewTime = 0; this.markDirty(); } else if (this.ingredientID != this.brewingItemStacks[3].getItem()) { this.brewTime = 0; this.markDirty(); } } else if (this.canBrew()) { this.brewTime = 400; this.ingredientID = this.brewingItemStacks[3].getItem(); } if (!this.worldObj.isRemote) { boolean[] aboolean = this.func_174902_m(); if (!Arrays.equals(aboolean, this.filledSlots)) { this.filledSlots = aboolean; IBlockState iblockstate = this.worldObj.getBlockState(this.getPos()); if (!(iblockstate.getBlock() instanceof BlockBrewingStand)) { return; } for (int i = 0; i < BlockBrewingStand.HAS_BOTTLE.length; ++i) { iblockstate = iblockstate.withProperty(BlockBrewingStand.HAS_BOTTLE[i], Boolean.valueOf(aboolean[i])); } this.worldObj.setBlockState(this.pos, iblockstate, 2); } } }
/** * Like the old updateEntity(), except more generic. */ public void update() { ItemStack itemstack = (ItemStack)this.brewingItemStacks.get(4); if (this.fuel <= 0 && itemstack.getItem() == Items.BLAZE_POWDER) { this.fuel = 20; itemstack.func_190918_g(1); this.markDirty(); } boolean flag = this.canBrew(); boolean flag1 = this.brewTime > 0; ItemStack itemstack1 = (ItemStack)this.brewingItemStacks.get(3); if (flag1) { --this.brewTime; boolean flag2 = this.brewTime == 0; if (flag2 && flag) { this.brewPotions(); this.markDirty(); } else if (!flag) { this.brewTime = 0; this.markDirty(); } else if (this.ingredientID != itemstack1.getItem()) { this.brewTime = 0; this.markDirty(); } } else if (flag && this.fuel > 0) { --this.fuel; this.brewTime = 400; this.ingredientID = itemstack1.getItem(); this.markDirty(); } if (!this.world.isRemote) { boolean[] aboolean = this.createFilledSlotsArray(); if (!Arrays.equals(aboolean, this.filledSlots)) { this.filledSlots = aboolean; IBlockState iblockstate = this.world.getBlockState(this.getPos()); if (!(iblockstate.getBlock() instanceof BlockBrewingStand)) { return; } for (int i = 0; i < BlockBrewingStand.HAS_BOTTLE.length; ++i) { iblockstate = iblockstate.withProperty(BlockBrewingStand.HAS_BOTTLE[i], Boolean.valueOf(aboolean[i])); } this.world.setBlockState(this.pos, iblockstate, 2); } } }
/** * Like the old updateEntity(), except more generic. */ public void update() { if (this.fuel <= 0 && this.brewingItemStacks[4] != null && this.brewingItemStacks[4].getItem() == Items.BLAZE_POWDER) { this.fuel = 20; --this.brewingItemStacks[4].stackSize; if (this.brewingItemStacks[4].stackSize <= 0) { this.brewingItemStacks[4] = null; } this.markDirty(); } boolean flag = this.canBrew(); boolean flag1 = this.brewTime > 0; if (flag1) { --this.brewTime; boolean flag2 = this.brewTime == 0; if (flag2 && flag) { this.brewPotions(); this.markDirty(); } else if (!flag) { this.brewTime = 0; this.markDirty(); } else if (this.ingredientID != this.brewingItemStacks[3].getItem()) { this.brewTime = 0; this.markDirty(); } } else if (flag && this.fuel > 0) { --this.fuel; this.brewTime = 400; this.ingredientID = this.brewingItemStacks[3].getItem(); this.markDirty(); } if (!this.worldObj.isRemote) { boolean[] aboolean = this.createFilledSlotsArray(); if (!Arrays.equals(aboolean, this.filledSlots)) { this.filledSlots = aboolean; IBlockState iblockstate = this.worldObj.getBlockState(this.getPos()); if (!(iblockstate.getBlock() instanceof BlockBrewingStand)) { return; } for (int i = 0; i < BlockBrewingStand.HAS_BOTTLE.length; ++i) { iblockstate = iblockstate.withProperty(BlockBrewingStand.HAS_BOTTLE[i], Boolean.valueOf(aboolean[i])); } this.worldObj.setBlockState(this.pos, iblockstate, 2); } } }
/** * Render BlockBrewingStand */ public boolean renderBlockBrewingStand(BlockBrewingStand p_147741_1_, int p_147741_2_, int p_147741_3_, int p_147741_4_) { this.setRenderBounds(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.875D, 0.5625D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.setOverrideBlockTexture(p_147741_1_.func_149959_e()); this.renderAllFaces = true; this.setRenderBounds(0.5625D, 0.0D, 0.3125D, 0.9375D, 0.125D, 0.6875D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.setRenderBounds(0.125D, 0.0D, 0.0625D, 0.5D, 0.125D, 0.4375D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.setRenderBounds(0.125D, 0.0D, 0.5625D, 0.5D, 0.125D, 0.9375D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.renderAllFaces = false; this.clearOverrideBlockTexture(); Tessellator var5 = Tessellator.instance; var5.setBrightness(p_147741_1_.getBlockBrightness(this.blockAccess, p_147741_2_, p_147741_3_, p_147741_4_)); int var6 = p_147741_1_.colorMultiplier(this.blockAccess, p_147741_2_, p_147741_3_, p_147741_4_); float var7 = (float)(var6 >> 16 & 255) / 255.0F; float var8 = (float)(var6 >> 8 & 255) / 255.0F; float var9 = (float)(var6 & 255) / 255.0F; if (EntityRenderer.anaglyphEnable) { float var32 = (var7 * 30.0F + var8 * 59.0F + var9 * 11.0F) / 100.0F; float var31 = (var7 * 30.0F + var8 * 70.0F) / 100.0F; float var12 = (var7 * 30.0F + var9 * 70.0F) / 100.0F; var7 = var32; var8 = var31; var9 = var12; } var5.setColorOpaque_F(var7, var8, var9); IIcon var321 = this.getBlockIconFromSideAndMetadata(p_147741_1_, 0, 0); if (this.hasOverrideBlockTexture()) { var321 = this.overrideBlockTexture; } if (Config.isConnectedTextures() && this.overrideBlockTexture == null) { var321 = ConnectedTextures.getConnectedTexture(this.blockAccess, p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_, -1, var321); } double var311 = (double)var321.getMinV(); double var13 = (double)var321.getMaxV(); int var15 = this.blockAccess.getBlockMetadata(p_147741_2_, p_147741_3_, p_147741_4_); for (int var16 = 0; var16 < 3; ++var16) { double var17 = (double)var16 * Math.PI * 2.0D / 3.0D + (Math.PI / 2D); double var19 = (double)var321.getInterpolatedU(8.0D); double var21 = (double)var321.getMaxU(); if ((var15 & 1 << var16) != 0) { var21 = (double)var321.getMinU(); } double var23 = (double)p_147741_2_ + 0.5D; double var25 = (double)p_147741_2_ + 0.5D + Math.sin(var17) * 8.0D / 16.0D; double var27 = (double)p_147741_4_ + 0.5D; double var29 = (double)p_147741_4_ + 0.5D + Math.cos(var17) * 8.0D / 16.0D; var5.addVertexWithUV(var23, (double)(p_147741_3_ + 1), var27, var19, var311); var5.addVertexWithUV(var23, (double)(p_147741_3_ + 0), var27, var19, var13); var5.addVertexWithUV(var25, (double)(p_147741_3_ + 0), var29, var21, var13); var5.addVertexWithUV(var25, (double)(p_147741_3_ + 1), var29, var21, var311); var5.addVertexWithUV(var25, (double)(p_147741_3_ + 1), var29, var21, var311); var5.addVertexWithUV(var25, (double)(p_147741_3_ + 0), var29, var21, var13); var5.addVertexWithUV(var23, (double)(p_147741_3_ + 0), var27, var19, var13); var5.addVertexWithUV(var23, (double)(p_147741_3_ + 1), var27, var19, var311); } p_147741_1_.setBlockBoundsForItemRender(); return true; }
public boolean renderBlockByRenderType(Block p_147805_1_, int p_147805_2_, int p_147805_3_, int p_147805_4_) { int l = p_147805_1_.getRenderType(); if (l == -1) { return false; } else { p_147805_1_.setBlockBoundsBasedOnState(this.blockAccess, p_147805_2_, p_147805_3_, p_147805_4_); this.setRenderBoundsFromBlock(p_147805_1_); switch (l) { //regex: ' : \(l == ([\d]+) \?' replace: ';\ncase \1: return' ::: IMPORTANT: REMEMBER THIS ON FIRST line! case 0 : return this.renderStandardBlock(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 4: return this.renderBlockLiquid(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 31: return this.renderBlockLog(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 1: return this.renderCrossedSquares(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 40: return this.renderBlockDoublePlant((BlockDoublePlant)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 2: return this.renderBlockTorch(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 20: return this.renderBlockVine(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 11: return this.renderBlockFence((BlockFence)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 39: return this.renderBlockQuartz(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 5: return this.renderBlockRedstoneWire(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 13: return this.renderBlockCactus(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 9: return this.renderBlockMinecartTrack((BlockRailBase)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 19: return this.renderBlockStem(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 23: return this.renderBlockLilyPad(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 6: return this.renderBlockCrops(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 3: return this.renderBlockFire((BlockFire)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 8: return this.renderBlockLadder(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 7: return this.renderBlockDoor(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 10: return this.renderBlockStairs((BlockStairs)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 27: return this.renderBlockDragonEgg((BlockDragonEgg)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 32: return this.renderBlockWall((BlockWall)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 12: return this.renderBlockLever(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 29: return this.renderBlockTripWireSource(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 30: return this.renderBlockTripWire(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 14: return this.renderBlockBed(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 15: return this.renderBlockRepeater((BlockRedstoneRepeater)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 36: return this.renderBlockRedstoneDiode((BlockRedstoneDiode)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 37: return this.renderBlockRedstoneComparator((BlockRedstoneComparator)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 16: return this.renderPistonBase(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_, false) ; case 17: return this.renderPistonExtension(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_, true) ; case 18: return this.renderBlockPane((BlockPane)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 41: return this.renderBlockStainedGlassPane(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 21: return this.renderBlockFenceGate((BlockFenceGate)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 24: return this.renderBlockCauldron((BlockCauldron)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 33: return this.renderBlockFlowerpot((BlockFlowerPot)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 35: return this.renderBlockAnvil((BlockAnvil)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 25: return this.renderBlockBrewingStand((BlockBrewingStand)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 26: return this.renderBlockEndPortalFrame((BlockEndPortalFrame)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 28: return this.renderBlockCocoa((BlockCocoa)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 34: return this.renderBlockBeacon((BlockBeacon)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ; case 38: return this.renderBlockHopper((BlockHopper)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_); default: return FMLRenderAccessLibrary.renderWorldBlock(this, blockAccess, p_147805_2_, p_147805_3_, p_147805_4_, p_147805_1_, l); } } }
public boolean renderBlockBrewingStand(BlockBrewingStand p_147741_1_, int p_147741_2_, int p_147741_3_, int p_147741_4_) { this.setRenderBounds(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.875D, 0.5625D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.setOverrideBlockTexture(p_147741_1_.getIconBrewingStandBase()); this.renderAllFaces = true; this.setRenderBounds(0.5625D, 0.0D, 0.3125D, 0.9375D, 0.125D, 0.6875D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.setRenderBounds(0.125D, 0.0D, 0.0625D, 0.5D, 0.125D, 0.4375D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.setRenderBounds(0.125D, 0.0D, 0.5625D, 0.5D, 0.125D, 0.9375D); this.renderStandardBlock(p_147741_1_, p_147741_2_, p_147741_3_, p_147741_4_); this.renderAllFaces = false; this.clearOverrideBlockTexture(); Tessellator tessellator = Tessellator.instance; tessellator.setBrightness(p_147741_1_.getMixedBrightnessForBlock(this.blockAccess, p_147741_2_, p_147741_3_, p_147741_4_)); int l = p_147741_1_.colorMultiplier(this.blockAccess, p_147741_2_, p_147741_3_, p_147741_4_); float f = (float)(l >> 16 & 255) / 255.0F; float f1 = (float)(l >> 8 & 255) / 255.0F; float f2 = (float)(l & 255) / 255.0F; if (EntityRenderer.anaglyphEnable) { float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; f = f3; f1 = f4; f2 = f5; } tessellator.setColorOpaque_F(f, f1, f2); IIcon iicon = this.getBlockIconFromSideAndMetadata(p_147741_1_, 0, 0); if (this.hasOverrideBlockTexture()) { iicon = this.overrideBlockTexture; } double d8 = (double)iicon.getMinV(); double d0 = (double)iicon.getMaxV(); int i1 = this.blockAccess.getBlockMetadata(p_147741_2_, p_147741_3_, p_147741_4_); for (int j1 = 0; j1 < 3; ++j1) { double d1 = (double)j1 * Math.PI * 2.0D / 3.0D + (Math.PI / 2D); double d2 = (double)iicon.getInterpolatedU(8.0D); double d3 = (double)iicon.getMaxU(); if ((i1 & 1 << j1) != 0) { d3 = (double)iicon.getMinU(); } double d4 = (double)p_147741_2_ + 0.5D; double d5 = (double)p_147741_2_ + 0.5D + Math.sin(d1) * 8.0D / 16.0D; double d6 = (double)p_147741_4_ + 0.5D; double d7 = (double)p_147741_4_ + 0.5D + Math.cos(d1) * 8.0D / 16.0D; tessellator.addVertexWithUV(d4, (double)(p_147741_3_ + 1), d6, d2, d8); tessellator.addVertexWithUV(d4, (double)(p_147741_3_ + 0), d6, d2, d0); tessellator.addVertexWithUV(d5, (double)(p_147741_3_ + 0), d7, d3, d0); tessellator.addVertexWithUV(d5, (double)(p_147741_3_ + 1), d7, d3, d8); tessellator.addVertexWithUV(d5, (double)(p_147741_3_ + 1), d7, d3, d8); tessellator.addVertexWithUV(d5, (double)(p_147741_3_ + 0), d7, d3, d0); tessellator.addVertexWithUV(d4, (double)(p_147741_3_ + 0), d6, d2, d0); tessellator.addVertexWithUV(d4, (double)(p_147741_3_ + 1), d6, d2, d8); } p_147741_1_.setBlockBoundsForItemRender(); return true; }
public boolean func_78585_a(BlockBrewingStand p_78585_1_, int p_78585_2_, int p_78585_3_, int p_78585_4_) { this.func_83020_a(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.875D, 0.5625D); this.func_78570_q(p_78585_1_, p_78585_2_, p_78585_3_, p_78585_4_); this.func_82774_a(p_78585_1_.func_94448_e()); this.field_78661_f = true; this.func_83020_a(0.5625D, 0.0D, 0.3125D, 0.9375D, 0.125D, 0.6875D); this.func_78570_q(p_78585_1_, p_78585_2_, p_78585_3_, p_78585_4_); this.func_83020_a(0.125D, 0.0D, 0.0625D, 0.5D, 0.125D, 0.4375D); this.func_78570_q(p_78585_1_, p_78585_2_, p_78585_3_, p_78585_4_); this.func_83020_a(0.125D, 0.0D, 0.5625D, 0.5D, 0.125D, 0.9375D); this.func_78570_q(p_78585_1_, p_78585_2_, p_78585_3_, p_78585_4_); this.field_78661_f = false; this.func_78595_a(); Tessellator var5 = Tessellator.field_78398_a; var5.func_78380_c(p_78585_1_.func_71874_e(this.field_78669_a, p_78585_2_, p_78585_3_, p_78585_4_)); float var6 = 1.0F; int var7 = p_78585_1_.func_71920_b(this.field_78669_a, p_78585_2_, p_78585_3_, p_78585_4_); float var8 = (float)(var7 >> 16 & 255) / 255.0F; float var9 = (float)(var7 >> 8 & 255) / 255.0F; float var10 = (float)(var7 & 255) / 255.0F; if(EntityRenderer.field_78517_a) { float var11 = (var8 * 30.0F + var9 * 59.0F + var10 * 11.0F) / 100.0F; float var12 = (var8 * 30.0F + var9 * 70.0F) / 100.0F; float var13 = (var8 * 30.0F + var10 * 70.0F) / 100.0F; var8 = var11; var9 = var12; var10 = var13; } var5.func_78386_a(var6 * var8, var6 * var9, var6 * var10); Icon var32 = this.func_94165_a(p_78585_1_, 0, 0); if(this.func_94167_b()) { var32 = this.field_78664_d; } double var33 = (double)var32.func_94206_g(); double var14 = (double)var32.func_94210_h(); int var16 = this.field_78669_a.func_72805_g(p_78585_2_, p_78585_3_, p_78585_4_); for(int var17 = 0; var17 < 3; ++var17) { double var18 = (double)var17 * 3.141592653589793D * 2.0D / 3.0D + 1.5707963267948966D; double var20 = (double)var32.func_94214_a(8.0D); double var22 = (double)var32.func_94212_f(); if((var16 & 1 << var17) != 0) { var22 = (double)var32.func_94209_e(); } double var24 = (double)p_78585_2_ + 0.5D; double var26 = (double)p_78585_2_ + 0.5D + Math.sin(var18) * 8.0D / 16.0D; double var28 = (double)p_78585_4_ + 0.5D; double var30 = (double)p_78585_4_ + 0.5D + Math.cos(var18) * 8.0D / 16.0D; var5.func_78374_a(var24, (double)(p_78585_3_ + 1), var28, var20, var33); var5.func_78374_a(var24, (double)(p_78585_3_ + 0), var28, var20, var14); var5.func_78374_a(var26, (double)(p_78585_3_ + 0), var30, var22, var14); var5.func_78374_a(var26, (double)(p_78585_3_ + 1), var30, var22, var33); var5.func_78374_a(var26, (double)(p_78585_3_ + 1), var30, var22, var33); var5.func_78374_a(var26, (double)(p_78585_3_ + 0), var30, var22, var14); var5.func_78374_a(var24, (double)(p_78585_3_ + 0), var28, var20, var14); var5.func_78374_a(var24, (double)(p_78585_3_ + 1), var28, var20, var33); } p_78585_1_.func_71919_f(); return true; }
/** * Renders the block at the given coordinates using the block's rendering type */ public boolean renderBlockByRenderType(Block par1Block, int par2, int par3, int par4) { int l = par1Block.getRenderType(); if (l == -1) { return false; } else { par1Block.setBlockBoundsBasedOnState(this.blockAccess, par2, par3, par4); this.setRenderBoundsFromBlock(par1Block); switch (l) { //regex: ' : \(l == ([\d]+) \?' replace: ';\ncase \1: return' ::: IMPORTANT: REMEMBER THIS ON FIRST line! case 0: return this.renderStandardBlock(par1Block, par2, par3, par4); case 4: return this.renderBlockFluids(par1Block, par2, par3, par4); case 31: return this.renderBlockLog(par1Block, par2, par3, par4); case 1: return this.renderCrossedSquares(par1Block, par2, par3, par4); case 2: return this.renderBlockTorch(par1Block, par2, par3, par4); case 20: return this.renderBlockVine(par1Block, par2, par3, par4); case 11: return this.renderBlockFence((BlockFence)par1Block, par2, par3, par4); case 39: return this.renderBlockQuartz(par1Block, par2, par3, par4); case 5: return this.renderBlockRedstoneWire(par1Block, par2, par3, par4); case 13: return this.renderBlockCactus(par1Block, par2, par3, par4); case 9: return this.renderBlockMinecartTrack((BlockRailBase)par1Block, par2, par3, par4); case 19: return this.renderBlockStem(par1Block, par2, par3, par4); case 23: return this.renderBlockLilyPad(par1Block, par2, par3, par4); case 6: return this.renderBlockCrops(par1Block, par2, par3, par4); case 3: return this.renderBlockFire((BlockFire)par1Block, par2, par3, par4); case 8: return this.renderBlockLadder(par1Block, par2, par3, par4); case 7: return this.renderBlockDoor(par1Block, par2, par3, par4); case 10: return this.renderBlockStairs((BlockStairs)par1Block, par2, par3, par4); case 27: return this.renderBlockDragonEgg((BlockDragonEgg)par1Block, par2, par3, par4); case 32: return this.renderBlockWall((BlockWall)par1Block, par2, par3, par4); case 12: return this.renderBlockLever(par1Block, par2, par3, par4); case 29: return this.renderBlockTripWireSource(par1Block, par2, par3, par4); case 30: return this.renderBlockTripWire(par1Block, par2, par3, par4); case 14: return this.renderBlockBed(par1Block, par2, par3, par4); case 15: return this.renderBlockRepeater((BlockRedstoneRepeater)par1Block, par2, par3, par4); case 36: return this.renderBlockRedstoneLogic((BlockRedstoneLogic)par1Block, par2, par3, par4); case 37: return this.renderBlockComparator((BlockComparator)par1Block, par2, par3, par4); case 16: return this.renderPistonBase(par1Block, par2, par3, par4, false); case 17: return this.renderPistonExtension(par1Block, par2, par3, par4, true); case 18: return this.renderBlockPane((BlockPane)par1Block, par2, par3, par4); case 21: return this.renderBlockFenceGate((BlockFenceGate)par1Block, par2, par3, par4); case 24: return this.renderBlockCauldron((BlockCauldron)par1Block, par2, par3, par4); case 33: return this.renderBlockFlowerpot((BlockFlowerPot)par1Block, par2, par3, par4); case 35: return this.renderBlockAnvil((BlockAnvil)par1Block, par2, par3, par4); case 25: return this.renderBlockBrewingStand((BlockBrewingStand)par1Block, par2, par3, par4); case 26: return this.renderBlockEndPortalFrame((BlockEndPortalFrame)par1Block, par2, par3, par4); case 28: return this.renderBlockCocoa((BlockCocoa)par1Block, par2, par3, par4); case 34: return this.renderBlockBeacon((BlockBeacon)par1Block, par2, par3, par4); case 38: return this.renderBlockHopper((BlockHopper)par1Block, par2, par3, par4); default: return FMLRenderAccessLibrary.renderWorldBlock(this, blockAccess, par2, par3, par4, par1Block, l); } } }
/** * Render BlockBrewingStand */ public boolean renderBlockBrewingStand(BlockBrewingStand par1BlockBrewingStand, int par2, int par3, int par4) { this.setRenderBounds(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.875D, 0.5625D); this.renderStandardBlock(par1BlockBrewingStand, par2, par3, par4); this.setOverrideBlockTexture(par1BlockBrewingStand.getBrewingStandIcon()); this.renderAllFaces = true; this.setRenderBounds(0.5625D, 0.0D, 0.3125D, 0.9375D, 0.125D, 0.6875D); this.renderStandardBlock(par1BlockBrewingStand, par2, par3, par4); this.setRenderBounds(0.125D, 0.0D, 0.0625D, 0.5D, 0.125D, 0.4375D); this.renderStandardBlock(par1BlockBrewingStand, par2, par3, par4); this.setRenderBounds(0.125D, 0.0D, 0.5625D, 0.5D, 0.125D, 0.9375D); this.renderStandardBlock(par1BlockBrewingStand, par2, par3, par4); this.renderAllFaces = false; this.clearOverrideBlockTexture(); Tessellator tessellator = Tessellator.instance; tessellator.setBrightness(par1BlockBrewingStand.getMixedBrightnessForBlock(this.blockAccess, par2, par3, par4)); float f = 1.0F; int l = par1BlockBrewingStand.colorMultiplier(this.blockAccess, par2, par3, par4); float f1 = (float)(l >> 16 & 255) / 255.0F; float f2 = (float)(l >> 8 & 255) / 255.0F; float f3 = (float)(l & 255) / 255.0F; if (EntityRenderer.anaglyphEnable) { float f4 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F; float f5 = (f1 * 30.0F + f2 * 70.0F) / 100.0F; float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F; f1 = f4; f2 = f5; f3 = f6; } tessellator.setColorOpaque_F(f * f1, f * f2, f * f3); Icon icon = this.getBlockIconFromSideAndMetadata(par1BlockBrewingStand, 0, 0); if (this.hasOverrideBlockTexture()) { icon = this.overrideBlockTexture; } double d0 = (double)icon.getMinV(); double d1 = (double)icon.getMaxV(); int i1 = this.blockAccess.getBlockMetadata(par2, par3, par4); for (int j1 = 0; j1 < 3; ++j1) { double d2 = (double)j1 * Math.PI * 2.0D / 3.0D + (Math.PI / 2D); double d3 = (double)icon.getInterpolatedU(8.0D); double d4 = (double)icon.getMaxU(); if ((i1 & 1 << j1) != 0) { d4 = (double)icon.getMinU(); } double d5 = (double)par2 + 0.5D; double d6 = (double)par2 + 0.5D + Math.sin(d2) * 8.0D / 16.0D; double d7 = (double)par4 + 0.5D; double d8 = (double)par4 + 0.5D + Math.cos(d2) * 8.0D / 16.0D; tessellator.addVertexWithUV(d5, (double)(par3 + 1), d7, d3, d0); tessellator.addVertexWithUV(d5, (double)(par3 + 0), d7, d3, d1); tessellator.addVertexWithUV(d6, (double)(par3 + 0), d8, d4, d1); tessellator.addVertexWithUV(d6, (double)(par3 + 1), d8, d4, d0); tessellator.addVertexWithUV(d6, (double)(par3 + 1), d8, d4, d0); tessellator.addVertexWithUV(d6, (double)(par3 + 0), d8, d4, d1); tessellator.addVertexWithUV(d5, (double)(par3 + 0), d7, d3, d1); tessellator.addVertexWithUV(d5, (double)(par3 + 1), d7, d3, d0); } par1BlockBrewingStand.setBlockBoundsForItemRender(); return true; }