/** * Renders anvil block with metadata */ public boolean renderBlockAnvilMetadata(BlockAnvil p_147780_1_, int p_147780_2_, int p_147780_3_, int p_147780_4_, int p_147780_5_) { Tessellator var6 = Tessellator.instance; var6.setBrightness(p_147780_1_.getBlockBrightness(this.blockAccess, p_147780_2_, p_147780_3_, p_147780_4_)); int var7 = p_147780_1_.colorMultiplier(this.blockAccess, p_147780_2_, p_147780_3_, p_147780_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.anaglyphEnable) { 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; } var6.setColorOpaque_F(var8, var9, var10); return this.renderBlockAnvilOrient(p_147780_1_, p_147780_2_, p_147780_3_, p_147780_4_, p_147780_5_, false); }
public boolean renderBlockAnvilMetadata(BlockAnvil p_147780_1_, int p_147780_2_, int p_147780_3_, int p_147780_4_, int p_147780_5_) { Tessellator tessellator = Tessellator.instance; tessellator.setBrightness(p_147780_1_.getMixedBrightnessForBlock(this.blockAccess, p_147780_2_, p_147780_3_, p_147780_4_)); int i1 = p_147780_1_.colorMultiplier(this.blockAccess, p_147780_2_, p_147780_3_, p_147780_4_); float f = (float)(i1 >> 16 & 255) / 255.0F; float f1 = (float)(i1 >> 8 & 255) / 255.0F; float f2 = (float)(i1 & 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); return this.renderBlockAnvilOrient(p_147780_1_, p_147780_2_, p_147780_3_, p_147780_4_, p_147780_5_, false); }
public boolean func_85096_a(BlockAnvil p_85096_1_, int p_85096_2_, int p_85096_3_, int p_85096_4_, int p_85096_5_) { Tessellator var6 = Tessellator.field_78398_a; var6.func_78380_c(p_85096_1_.func_71874_e(this.field_78669_a, p_85096_2_, p_85096_3_, p_85096_4_)); float var7 = 1.0F; int var8 = p_85096_1_.func_71920_b(this.field_78669_a, p_85096_2_, p_85096_3_, p_85096_4_); float var9 = (float)(var8 >> 16 & 255) / 255.0F; float var10 = (float)(var8 >> 8 & 255) / 255.0F; float var11 = (float)(var8 & 255) / 255.0F; if(EntityRenderer.field_78517_a) { float var12 = (var9 * 30.0F + var10 * 59.0F + var11 * 11.0F) / 100.0F; float var13 = (var9 * 30.0F + var10 * 70.0F) / 100.0F; float var14 = (var9 * 30.0F + var11 * 70.0F) / 100.0F; var9 = var12; var10 = var13; var11 = var14; } var6.func_78386_a(var7 * var9, var7 * var10, var7 * var11); return this.func_82776_a(p_85096_1_, p_85096_2_, p_85096_3_, p_85096_4_, p_85096_5_, false); }
/** * Renders anvil block with metadata */ public boolean renderBlockAnvilMetadata(BlockAnvil par1BlockAnvil, int par2, int par3, int par4, int par5) { Tessellator tessellator = Tessellator.instance; tessellator.setBrightness(par1BlockAnvil.getMixedBrightnessForBlock(this.blockAccess, par2, par3, par4)); float f = 1.0F; int i1 = par1BlockAnvil.colorMultiplier(this.blockAccess, par2, par3, par4); float f1 = (float)(i1 >> 16 & 255) / 255.0F; float f2 = (float)(i1 >> 8 & 255) / 255.0F; float f3 = (float)(i1 & 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); return this.renderBlockAnvilOrient(par1BlockAnvil, par2, par3, par4, par5, false); }
public void fall(float distance, float damageMultiplier) { Block block = this.fallTile.getBlock(); if (this.hurtEntities) { int i = MathHelper.ceiling_float_int(distance - 1.0F); if (i > 0) { List<Entity> list = Lists.newArrayList(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox())); boolean flag = block == Blocks.anvil; DamageSource damagesource = flag ? DamageSource.anvil : DamageSource.fallingBlock; for (Entity entity : list) { entity.attackEntityFrom(damagesource, (float)Math.min(MathHelper.floor_float((float)i * this.fallHurtAmount), this.fallHurtMax)); } if (flag && (double)this.rand.nextFloat() < 0.05000000074505806D + (double)i * 0.05D) { int j = ((Integer)this.fallTile.getValue(BlockAnvil.DAMAGE)).intValue(); ++j; if (j > 2) { this.canSetAsBlock = true; } else { this.fallTile = this.fallTile.withProperty(BlockAnvil.DAMAGE, Integer.valueOf(j)); } } } } }
public static void setup() { { BlockArray arr = new BlockArray(); BlockArrayEntry rope = new BlockArrayEntry(BlockRegistry.rope_coil.getDefaultState().withProperty(AxisController.AXIS, EnumFacing.Axis.Z), new ItemStack(ItemRegistry.rope_coil)); BlockArrayEntry rope_cog = new BlockArrayEntry(BlockRegistry.rope_coil.getDefaultState().withProperty(AxisController.AXIS, EnumFacing.Axis.Z).withProperty(BlockRopeCoil.TYPE, BlockRopeCoil.Type.COG), new ItemStack(ItemRegistry.rope_coil, 1, 1)); arr.getCheckers().add((BlockArrayEntry entr, IBlockState state, IBlockState worldState, World w, BlockPos pos, Rotation rot) -> { for(IProperty<?> prop : state.getPropertyKeys()) { if(prop == BlockAnvil.DAMAGE || prop == BlockRopeCoil.TYPE) return state.getValue(prop).equals(worldState.getValue(prop)); } return true; }); arr.getMap().putAll(CollectionUtils.createMap(BlockPos.class, BlockArrayEntry.class, new BlockPos(0, 0, 0), new BlockArrayEntry(Blocks.ANVIL, new ItemStack(Blocks.ANVIL)), new BlockPos(0, 2, 0), rope, new BlockPos(1, 2, 0), rope, new BlockPos(1, 0, 0), rope_cog, new BlockPos(2, 0, 0), new BlockArrayEntry(Blocks.LEVER.getDefaultState().withProperty(BlockLever.FACING, BlockLever.EnumOrientation.UP_X).withProperty(BlockLever.POWERED, true), new ItemStack(Blocks.LEVER)), new BlockPos(1, 0, 1), new BlockArrayEntry(Blocks.LEVER.getDefaultState().withProperty(BlockLever.FACING, BlockLever.EnumOrientation.SOUTH), new ItemStack(Blocks.LEVER)) )); Multiblock.REGISTRY.register(STONE_CRUSHER = new PMMultiblock(0, arr, new BlockPos(1, 0, 0), BlockRegistry.stone_crusher.getDefaultState(), new ModelResourceLocation(Utils.gRL("stone_crusher"), "normal"), Utils.gRL("stone_crusher"))); } }
public void fall(float distance, float damageMultiplier) { Block block = this.fallTile.getBlock(); if (this.hurtEntities) { int i = MathHelper.ceil(distance - 1.0F); if (i > 0) { List<Entity> list = Lists.newArrayList(this.world.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox())); boolean flag = block == Blocks.ANVIL; DamageSource damagesource = flag ? DamageSource.anvil : DamageSource.fallingBlock; for (Entity entity : list) { entity.attackEntityFrom(damagesource, (float)Math.min(MathHelper.floor((float)i * this.fallHurtAmount), this.fallHurtMax)); } if (flag && (double)this.rand.nextFloat() < 0.05000000074505806D + (double)i * 0.05D) { int j = ((Integer)this.fallTile.getValue(BlockAnvil.DAMAGE)).intValue(); ++j; if (j > 2) { this.canSetAsBlock = true; } else { this.fallTile = this.fallTile.withProperty(BlockAnvil.DAMAGE, Integer.valueOf(j)); } } } } }
public void fall(float distance, float damageMultiplier) { Block block = this.fallTile.getBlock(); if (this.hurtEntities) { int i = MathHelper.ceiling_float_int(distance - 1.0F); if (i > 0) { List<Entity> list = Lists.newArrayList(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox())); boolean flag = block == Blocks.ANVIL; DamageSource damagesource = flag ? DamageSource.anvil : DamageSource.fallingBlock; for (Entity entity : list) { entity.attackEntityFrom(damagesource, (float)Math.min(MathHelper.floor_float((float)i * this.fallHurtAmount), this.fallHurtMax)); } if (flag && (double)this.rand.nextFloat() < 0.05000000074505806D + (double)i * 0.05D) { int j = ((Integer)this.fallTile.getValue(BlockAnvil.DAMAGE)).intValue(); ++j; if (j > 2) { this.canSetAsBlock = true; } else { this.fallTile = this.fallTile.withProperty(BlockAnvil.DAMAGE, Integer.valueOf(j)); } } } } }
public static ForgeDirection[] getValidVanillaBlockRotations(Block block) { return (block instanceof BlockBed || block instanceof BlockPumpkin || block instanceof BlockFenceGate || block instanceof BlockEndPortalFrame || block instanceof BlockTripWireHook || block instanceof BlockCocoa || block instanceof BlockRailPowered || block instanceof BlockRailDetector || block instanceof BlockStairs || block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockFurnace || block instanceof BlockLadder || block == Blocks.field_150444_as || block == Blocks.field_150472_an || block instanceof BlockDoor || block instanceof BlockRail || block instanceof BlockButton || block instanceof BlockRedstoneRepeater || block instanceof BlockRedstoneComparator || block instanceof BlockTrapDoor || block instanceof BlockHugeMushroom || block instanceof BlockVine || block instanceof BlockSkull || block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS; }
public static void addBush() { ShiftedSnowApi.addSimpleClassMapping(BlockBush.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockSign.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockAnvil.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockBush.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockPressurePlate.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockLever.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockRailBase.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockTripWire.class, EnumSnowType.MINUS_FULL); ShiftedSnowApi.addSimpleClassMapping(BlockTripWireHook.class, EnumSnowType.MINUS_FULL); }
public static ForgeDirection[] getValidVanillaBlockRotations(Block block) { return (block instanceof BlockBed || block instanceof BlockPumpkin || block instanceof BlockFenceGate || block instanceof BlockEndPortalFrame || block instanceof BlockTripWireHook || block instanceof BlockCocoa || block instanceof BlockRailPowered || block instanceof BlockRailDetector || block instanceof BlockStairs || block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockFurnace || block instanceof BlockLadder || block == Blocks.wall_sign || block == Blocks.standing_sign || block instanceof BlockDoor || block instanceof BlockRail || block instanceof BlockButton || block instanceof BlockRedstoneRepeater || block instanceof BlockRedstoneComparator || block instanceof BlockTrapDoor || block instanceof BlockHugeMushroom || block instanceof BlockVine || block instanceof BlockSkull || block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS; }
private boolean isDefered(StructureBlock sb) { Block block = GameRegistry.findBlock(sb.getModId(), sb.getBlockName()); if(block == null) { return false; } return block instanceof BlockTorch || block instanceof BlockSand || block instanceof BlockGravel || block instanceof BlockAnvil || block instanceof BlockTripWireHook || block instanceof BlockTripWire|| block instanceof BlockRedstoneWire; }
private static void registerVanillaVariantProps() { // TODO: omit similar blocks registerVariantProperty(BlockStone.VARIANT); registerVariantProperty(BlockPlanks.VARIANT); registerVariantProperty(BlockSapling.TYPE); registerVariantProperty(BlockDirt.VARIANT); registerVariantProperty(BlockSand.VARIANT); registerVariantProperty(BlockOldLog.VARIANT); registerVariantProperty(BlockNewLog.VARIANT); registerVariantProperty(BlockOldLeaf.VARIANT); registerVariantProperty(BlockNewLeaf.VARIANT); registerVariantProperty(BlockSandStone.TYPE); registerVariantProperty(BlockTallGrass.TYPE); registerVariantProperty(BlockPistonExtension.TYPE); registerVariantProperty(BlockColored.COLOR); registerVariantProperty(BlockPistonMoving.TYPE); registerVariantProperty(Blocks.YELLOW_FLOWER.getTypeProperty()); registerVariantProperty(Blocks.RED_FLOWER.getTypeProperty()); registerVariantProperty(BlockStoneSlab.VARIANT); registerVariantProperty(BlockWoodSlab.VARIANT); registerVariantProperty(BlockAnvil.DAMAGE); registerVariantProperty(BlockQuartz.VARIANT); registerVariantProperty(BlockCarpet.COLOR); registerVariantProperty(BlockDoublePlant.VARIANT); registerVariantProperty(BlockStainedGlass.COLOR); registerVariantProperty(BlockStainedGlassPane.COLOR); registerVariantProperty(BlockPrismarine.VARIANT); registerVariantProperty(BlockRedSandstone.TYPE); registerVariantProperty(BlockStoneSlabNew.VARIANT); }
public void fall(float distance, float damageMultiplier) { Block block = this.blockState.getBlock(); if (this.hurtEntities) { int i = MathHelper.ceil(distance - 1.0F); if (i > 0) { boolean isAnvil = block == Blocks.ANVIL; List<Entity> list = Lists.newArrayList(this.getEntityWorld().getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox())); DamageSource damageSource = isAnvil ? DamageSource.ANVIL : DamageSource.FALLING_BLOCK; for (Entity entity : list) { entity.attackEntityFrom(damageSource, Math.min(MathHelper.floor(i * this.fallHurtAmount), this.fallHurtMax)); } if (isAnvil && this.rand.nextFloat() < 0.05D + i * 0.05D) { int j = this.blockState.getValue(BlockAnvil.DAMAGE).intValue() + 1; if (j > 2) { this.canSetAsBlock = false; } else { this.blockState = this.blockState.withProperty(BlockAnvil.DAMAGE, Integer.valueOf(j)); } } } } }
public void func_77003_a(EntityFallingSand p_77003_1_, double p_77003_2_, double p_77003_4_, double p_77003_6_, float p_77003_8_, float p_77003_9_) { World var10 = p_77003_1_.func_70283_d(); Block var11 = Block.field_71973_m[p_77003_1_.field_70287_a]; if(var10.func_72798_a(MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v)) != p_77003_1_.field_70287_a) { GL11.glPushMatrix(); GL11.glTranslatef((float)p_77003_2_, (float)p_77003_4_, (float)p_77003_6_); this.func_110777_b(p_77003_1_); GL11.glDisable(2896); Tessellator var12; if(var11 instanceof BlockAnvil && var11.func_71857_b() == 35) { this.field_77004_a.field_78669_a = var10; var12 = Tessellator.field_78398_a; var12.func_78382_b(); var12.func_78373_b((double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70165_t)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70163_u)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70161_v)) - 0.5F)); this.field_77004_a.func_85096_a((BlockAnvil)var11, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v), p_77003_1_.field_70285_b); var12.func_78373_b(0.0D, 0.0D, 0.0D); var12.func_78381_a(); } else if(var11.func_71857_b() == 27) { this.field_77004_a.field_78669_a = var10; var12 = Tessellator.field_78398_a; var12.func_78382_b(); var12.func_78373_b((double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70165_t)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70163_u)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70161_v)) - 0.5F)); this.field_77004_a.func_78618_a((BlockDragonEgg)var11, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v)); var12.func_78373_b(0.0D, 0.0D, 0.0D); var12.func_78381_a(); } else if(var11 != null) { this.field_77004_a.func_83018_a(var11); this.field_77004_a.func_78588_a(var11, var10, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v), p_77003_1_.field_70285_b); } GL11.glEnable(2896); GL11.glPopMatrix(); } }
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)))))))))))))))))))))))))))))))))))))); } }
private static BlockType getBlockType(Block block) { if(block instanceof BlockBed || block instanceof BlockPumpkin || block instanceof BlockFenceGate || block instanceof BlockEndPortalFrame || block instanceof BlockCocoa) { return BlockType.BED; } if(block instanceof BlockRail) { return BlockType.RAIL; } if(block instanceof BlockRailPowered || block instanceof BlockRailDetector) { return BlockType.RAIL_POWERED; } if(block instanceof BlockStairs) { return BlockType.STAIR; } if(block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockFurnace || block instanceof BlockLadder || block == Blocks.wall_sign) { return BlockType.CHEST; } if(block == Blocks.standing_sign) { return BlockType.SIGNPOST; } if(block instanceof BlockDoor) { return BlockType.DOOR; } if(block instanceof BlockButton) { return BlockType.BUTTON; } if(block instanceof BlockRedstoneRepeater || block instanceof BlockRedstoneComparator) { return BlockType.REDSTONE_REPEATER; } if(block instanceof BlockTrapDoor) { return BlockType.TRAPDOOR; } if(block instanceof BlockHugeMushroom) { return BlockType.MUSHROOM_CAP; } if(block instanceof BlockVine) { return BlockType.VINE; } if(block instanceof BlockSkull) { return BlockType.SKULL; } if(block instanceof BlockAnvil) { return BlockType.ANVIL; } if(block instanceof BlockLog) { return BlockType.LOG; } if(block instanceof BlockDispenser || block instanceof BlockPistonBase || block instanceof BlockPistonExtension || block instanceof BlockHopper) { return BlockType.DISPENSER; } if(block instanceof BlockTorch) { return BlockType.TORCH; } if(block instanceof BlockLever) { return BlockType.LEVER; } if(block instanceof BlockTripWireHook) { return BlockType.TRIP_WIRE_HOOK; } return null; }
@Override public String execute(CommandSender sender, String[] params) throws CommandException { EntityPlayerMP player = getSenderAsEntity(sender.getMinecraftISender(), EntityPlayerMP.class); Entity entity = EntityUtils.traceEntity(player, 128D); if (params.length == 0 && entity instanceof AbstractChestHorse) { ((AbstractChestHorse) entity).openGUI(player); } else if (params.length == 0 && entity instanceof EntityVillager) { player.displayVillagerTradeGui((EntityVillager) entity); } else if (params.length == 0 && entity instanceof EntityMinecartContainer) { player.displayGui((EntityMinecartContainer) entity); } else { if (params.length == 0 || params.length > 2) { BlockPos trace; try {trace = params.length > 2 ? getCoordFromParams(sender.getMinecraftISender(), params, 0) : EntityUtils.traceBlock(player, 128D);} catch (NumberFormatException nfe) {throw new CommandException("command.open.NAN", sender);} if (trace == null) throw new CommandException("command.open.noBlock", sender); TileEntity te = sender.getWorld().getTileEntity(trace); Block block = WorldUtils.getBlock(sender.getWorld(), trace); if (te instanceof IInteractionObject) player.displayGui((IInteractionObject) te); else if (te instanceof IInventory) player.displayGUIChest((IInventory) te); else if (block == Blocks.ANVIL) player.displayGui(new BlockAnvil.Anvil(sender.getWorld(), trace)); else if (block == Blocks.CRAFTING_TABLE) player.displayGui(new BlockWorkbench.InterfaceCraftingTable(sender.getWorld(), trace)); else throw new CommandException("command.open.invalidBlock", sender); } else if (params.length > 0) { if (params[0].equalsIgnoreCase("enderchest")) player.displayGUIChest(player.getInventoryEnderChest()); else if (params[0].equalsIgnoreCase("enchantment_table") || (params.length > 1 && params[0].equalsIgnoreCase("enchantment") && params[1].equalsIgnoreCase("table"))) { final World w = sender.getWorld(); player.displayGui(new IInteractionObject() { @Override public boolean hasCustomName() {return false;} @Override public String getName() {return "container.enchant";} @Override public ITextComponent getDisplayName() {return new TextComponentTranslation(this.getName());} @Override public String getGuiID() {return "minecraft:enchanting_table";} @Override public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) { return new ContainerEnchantment(playerInventory, w, BlockPos.ORIGIN); } }); this.allowedInteractions.put(player, player.openContainer); } else if (params[0].equalsIgnoreCase("anvil")) { player.displayGui(new BlockAnvil.Anvil(sender.getWorld(), BlockPos.ORIGIN)); this.allowedInteractions.put(player, player.openContainer); } else if (params[0].equalsIgnoreCase("workbench") || params[0].equalsIgnoreCase("crafting_table") || (params.length > 1 && params[0].equalsIgnoreCase("crafting") && params[1].equalsIgnoreCase("table")) ) { player.displayGui(new BlockWorkbench.InterfaceCraftingTable(sender.getWorld(), BlockPos.ORIGIN)); this.allowedInteractions.put(player, player.openContainer); } else if (params[0].equalsIgnoreCase("furnace") || params[0].equalsIgnoreCase("brewing_stand") || (params.length > 1 && params[0].equalsIgnoreCase("brewing") && params[1].equalsIgnoreCase("stand"))) throw new CommandException("command.open.cantOpenTEs", sender); else throw new CommandException("command.open.invalidContainer", sender, params[0]); } else throw new CommandException("command.generic.invalidUsage", sender, this.getCommandName()); } return null; }
public ItemAnvilBlock(Block par1Block) { super(par1Block, par1Block, BlockAnvil.field_149834_a); }
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityFallingBlock p_147918_1_, double p_147918_2_, double p_147918_4_, double p_147918_6_, float p_147918_8_, float p_147918_9_) { World var10 = p_147918_1_.func_145807_e(); Block var11 = p_147918_1_.func_145805_f(); int var12 = MathHelper.floor_double(p_147918_1_.posX); int var13 = MathHelper.floor_double(p_147918_1_.posY); int var14 = MathHelper.floor_double(p_147918_1_.posZ); if (var11 != null && var11 != var10.getBlock(var12, var13, var14)) { GL11.glPushMatrix(); GL11.glTranslatef((float)p_147918_2_, (float)p_147918_4_, (float)p_147918_6_); this.bindEntityTexture(p_147918_1_); GL11.glDisable(GL11.GL_LIGHTING); Tessellator var15; if (var11 instanceof BlockAnvil) { this.field_147920_a.blockAccess = var10; var15 = Tessellator.instance; var15.startDrawingQuads(); var15.setTranslation((double)((float)(-var12) - 0.5F), (double)((float)(-var13) - 0.5F), (double)((float)(-var14) - 0.5F)); this.field_147920_a.renderBlockAnvilMetadata((BlockAnvil)var11, var12, var13, var14, p_147918_1_.field_145814_a); var15.setTranslation(0.0D, 0.0D, 0.0D); var15.draw(); } else if (var11 instanceof BlockDragonEgg) { this.field_147920_a.blockAccess = var10; var15 = Tessellator.instance; var15.startDrawingQuads(); var15.setTranslation((double)((float)(-var12) - 0.5F), (double)((float)(-var13) - 0.5F), (double)((float)(-var14) - 0.5F)); this.field_147920_a.renderBlockDragonEgg((BlockDragonEgg)var11, var12, var13, var14); var15.setTranslation(0.0D, 0.0D, 0.0D); var15.draw(); } else { this.field_147920_a.setRenderBoundsFromBlock(var11); this.field_147920_a.renderBlockSandFalling(var11, var10, var12, var13, var14, p_147918_1_.field_145814_a); } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } }
/** * Renders anvil */ public boolean renderBlockAnvil(BlockAnvil p_147725_1_, int p_147725_2_, int p_147725_3_, int p_147725_4_) { return this.renderBlockAnvilMetadata(p_147725_1_, p_147725_2_, p_147725_3_, p_147725_4_, this.blockAccess.getBlockMetadata(p_147725_2_, p_147725_3_, p_147725_4_)); }
/** * Renders anvil block with orientation */ public boolean renderBlockAnvilOrient(BlockAnvil p_147728_1_, int p_147728_2_, int p_147728_3_, int p_147728_4_, int p_147728_5_, boolean p_147728_6_) { int var7 = p_147728_6_ ? 0 : p_147728_5_ & 3; boolean var8 = false; float var9 = 0.0F; switch (var7) { case 0: this.uvRotateSouth = 2; this.uvRotateNorth = 1; this.uvRotateTop = 3; this.uvRotateBottom = 3; break; case 1: this.uvRotateEast = 1; this.uvRotateWest = 2; this.uvRotateTop = 2; this.uvRotateBottom = 1; var8 = true; break; case 2: this.uvRotateSouth = 1; this.uvRotateNorth = 2; break; case 3: this.uvRotateEast = 2; this.uvRotateWest = 1; this.uvRotateTop = 1; this.uvRotateBottom = 2; var8 = true; } var9 = this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 0, var9, 0.75F, 0.25F, 0.75F, var8, p_147728_6_, p_147728_5_); var9 = this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 1, var9, 0.5F, 0.0625F, 0.625F, var8, p_147728_6_, p_147728_5_); var9 = this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 2, var9, 0.25F, 0.3125F, 0.5F, var8, p_147728_6_, p_147728_5_); this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 3, var9, 0.625F, 0.375F, 1.0F, var8, p_147728_6_, p_147728_5_); this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); this.uvRotateEast = 0; this.uvRotateWest = 0; this.uvRotateSouth = 0; this.uvRotateNorth = 0; this.uvRotateTop = 0; this.uvRotateBottom = 0; return true; }
/** * Renders anvil block with rotation */ public float renderBlockAnvilRotate(BlockAnvil p_147737_1_, int p_147737_2_, int p_147737_3_, int p_147737_4_, int p_147737_5_, float p_147737_6_, float p_147737_7_, float p_147737_8_, float p_147737_9_, boolean p_147737_10_, boolean p_147737_11_, int p_147737_12_) { if (p_147737_10_) { float var14 = p_147737_7_; p_147737_7_ = p_147737_9_; p_147737_9_ = var14; } p_147737_7_ /= 2.0F; p_147737_9_ /= 2.0F; p_147737_1_.field_149833_b = p_147737_5_; this.setRenderBounds((double)(0.5F - p_147737_7_), (double)p_147737_6_, (double)(0.5F - p_147737_9_), (double)(0.5F + p_147737_7_), (double)(p_147737_6_ + p_147737_8_), (double)(0.5F + p_147737_9_)); if (p_147737_11_) { Tessellator var141 = Tessellator.instance; var141.startDrawingQuads(); var141.setNormal(0.0F, -1.0F, 0.0F); this.renderFaceYNeg(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 0, p_147737_12_)); var141.draw(); var141.startDrawingQuads(); var141.setNormal(0.0F, 1.0F, 0.0F); this.renderFaceYPos(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 1, p_147737_12_)); var141.draw(); var141.startDrawingQuads(); var141.setNormal(0.0F, 0.0F, -1.0F); this.renderFaceZNeg(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 2, p_147737_12_)); var141.draw(); var141.startDrawingQuads(); var141.setNormal(0.0F, 0.0F, 1.0F); this.renderFaceZPos(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 3, p_147737_12_)); var141.draw(); var141.startDrawingQuads(); var141.setNormal(-1.0F, 0.0F, 0.0F); this.renderFaceXNeg(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 4, p_147737_12_)); var141.draw(); var141.startDrawingQuads(); var141.setNormal(1.0F, 0.0F, 0.0F); this.renderFaceXPos(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 5, p_147737_12_)); var141.draw(); } else { this.renderStandardBlock(p_147737_1_, p_147737_2_, p_147737_3_, p_147737_4_); } return p_147737_6_ + p_147737_8_; }
public void doRender(EntityBlock entBlock, double posX, double posY, double posZ, float par8, float renderTick) { int i = MathHelper.floor_double(entBlock.posX); int j = MathHelper.floor_double(entBlock.posY); int k = MathHelper.floor_double(entBlock.posZ); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glPushMatrix(); GL11.glTranslatef((float)posX, (float)posY, (float)posZ); this.bindEntityTexture(entBlock); GL11.glRotatef(-90F, 0F, 1F, 0F); GL11.glRotatef(interpolateRotation(entBlock.prevRotYaw, entBlock.rotYaw, renderTick), 0F, 1F, 0F); GL11.glRotatef(interpolateRotation(entBlock.prevRotPitch, entBlock.rotPitch, renderTick), 0F, 0F, 1F); // GL11.glDisable(GL11.GL_LIGHTING); int ii = entBlock.getBrightnessForRender(renderTick); int jj = ii % 0x10000; int kk = ii / 0x10000; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)jj / 1.0F, (float)kk / 1.0F); Tessellator tessellator = Tessellator.instance; renderBlock.blockAccess = entBlock.worldObj; renderBlock.useInventoryTint = true; if (entBlock.getBlock() instanceof BlockAnvil) { tessellator.startDrawingQuads(); tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F)); renderBlock.renderBlockAnvilMetadata((BlockAnvil)entBlock.getBlock(), i, j, k, entBlock.getMeta()); tessellator.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); } else if (entBlock.getBlock() instanceof BlockDragonEgg) { tessellator.startDrawingQuads(); tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F)); renderBlock.renderBlockDragonEgg((BlockDragonEgg)entBlock.getBlock(), i, j, k); tessellator.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); } else { renderBlock.setRenderBoundsFromBlock(entBlock.getBlock()); renderBlock.renderBlockAsItem(entBlock.getBlock(), entBlock.getMeta(), 1.0F); } // GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_BLEND); }
public ItemAnvilBlock(Block p_i1826_1_) { super(p_i1826_1_, p_i1826_1_, BlockAnvil.anvilDamageNames); }
public void doRender(EntityFallingBlock p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { World world = p_76986_1_.func_145807_e(); Block block = p_76986_1_.func_145805_f(); int i = MathHelper.floor_double(p_76986_1_.posX); int j = MathHelper.floor_double(p_76986_1_.posY); int k = MathHelper.floor_double(p_76986_1_.posZ); if (block != null && block != world.getBlock(i, j, k)) { GL11.glPushMatrix(); GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); this.bindEntityTexture(p_76986_1_); GL11.glDisable(GL11.GL_LIGHTING); Tessellator tessellator; if (block instanceof BlockAnvil) { this.field_147920_a.blockAccess = world; tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F)); this.field_147920_a.renderBlockAnvilMetadata((BlockAnvil)block, i, j, k, p_76986_1_.field_145814_a); tessellator.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); } else if (block instanceof BlockDragonEgg) { this.field_147920_a.blockAccess = world; tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F)); this.field_147920_a.renderBlockDragonEgg((BlockDragonEgg)block, i, j, k); tessellator.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); } else { this.field_147920_a.setRenderBoundsFromBlock(block); this.field_147920_a.renderBlockSandFalling(block, world, i, j, k, p_76986_1_.field_145814_a); } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } }
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 renderBlockAnvil(BlockAnvil p_147725_1_, int p_147725_2_, int p_147725_3_, int p_147725_4_) { return this.renderBlockAnvilMetadata(p_147725_1_, p_147725_2_, p_147725_3_, p_147725_4_, this.blockAccess.getBlockMetadata(p_147725_2_, p_147725_3_, p_147725_4_)); }
public boolean renderBlockAnvilOrient(BlockAnvil p_147728_1_, int p_147728_2_, int p_147728_3_, int p_147728_4_, int p_147728_5_, boolean p_147728_6_) { int i1 = p_147728_6_ ? 0 : p_147728_5_ & 3; boolean flag1 = false; float f = 0.0F; switch (i1) { case 0: this.uvRotateSouth = 2; this.uvRotateNorth = 1; this.uvRotateTop = 3; this.uvRotateBottom = 3; break; case 1: this.uvRotateEast = 1; this.uvRotateWest = 2; this.uvRotateTop = 2; this.uvRotateBottom = 1; flag1 = true; break; case 2: this.uvRotateSouth = 1; this.uvRotateNorth = 2; break; case 3: this.uvRotateEast = 2; this.uvRotateWest = 1; this.uvRotateTop = 1; this.uvRotateBottom = 2; flag1 = true; } f = this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 0, f, 0.75F, 0.25F, 0.75F, flag1, p_147728_6_, p_147728_5_); f = this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 1, f, 0.5F, 0.0625F, 0.625F, flag1, p_147728_6_, p_147728_5_); f = this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 2, f, 0.25F, 0.3125F, 0.5F, flag1, p_147728_6_, p_147728_5_); this.renderBlockAnvilRotate(p_147728_1_, p_147728_2_, p_147728_3_, p_147728_4_, 3, f, 0.625F, 0.375F, 1.0F, flag1, p_147728_6_, p_147728_5_); this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); this.uvRotateEast = 0; this.uvRotateWest = 0; this.uvRotateSouth = 0; this.uvRotateNorth = 0; this.uvRotateTop = 0; this.uvRotateBottom = 0; return true; }
public float renderBlockAnvilRotate(BlockAnvil p_147737_1_, int p_147737_2_, int p_147737_3_, int p_147737_4_, int p_147737_5_, float p_147737_6_, float p_147737_7_, float p_147737_8_, float p_147737_9_, boolean p_147737_10_, boolean p_147737_11_, int p_147737_12_) { if (p_147737_10_) { float f4 = p_147737_7_; p_147737_7_ = p_147737_9_; p_147737_9_ = f4; } p_147737_7_ /= 2.0F; p_147737_9_ /= 2.0F; p_147737_1_.anvilRenderSide = p_147737_5_; this.setRenderBounds((double)(0.5F - p_147737_7_), (double)p_147737_6_, (double)(0.5F - p_147737_9_), (double)(0.5F + p_147737_7_), (double)(p_147737_6_ + p_147737_8_), (double)(0.5F + p_147737_9_)); if (p_147737_11_) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); this.renderFaceYNeg(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 0, p_147737_12_)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); this.renderFaceYPos(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 1, p_147737_12_)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, -1.0F); this.renderFaceZNeg(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 2, p_147737_12_)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, 1.0F); this.renderFaceZPos(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 3, p_147737_12_)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(-1.0F, 0.0F, 0.0F); this.renderFaceXNeg(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 4, p_147737_12_)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(1.0F, 0.0F, 0.0F); this.renderFaceXPos(p_147737_1_, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSideAndMetadata(p_147737_1_, 5, p_147737_12_)); tessellator.draw(); } else { this.renderStandardBlock(p_147737_1_, p_147737_2_, p_147737_3_, p_147737_4_); } return p_147737_6_ + p_147737_8_; }