static { try { a[BlockPlanks.EnumType.SPRUCE.ordinal()] = 1; } catch (NoSuchFieldError nosuchfielderror) {; } try { a[BlockPlanks.EnumType.BIRCH.ordinal()] = 2; } catch (NoSuchFieldError nosuchfielderror1) {; } try { a[BlockPlanks.EnumType.JUNGLE.ordinal()] = 3; } catch (NoSuchFieldError nosuchfielderror2) {; } try { a[BlockPlanks.EnumType.ACACIA.ordinal()] = 4; } catch (NoSuchFieldError nosuchfielderror3) {; } try { a[BlockPlanks.EnumType.DARK_OAK.ordinal()] = 5; } catch (NoSuchFieldError nosuchfielderror4) {; } try { a[BlockPlanks.EnumType.OAK.ordinal()] = 6; } catch (NoSuchFieldError nosuchfielderror5) {; } }
public void e(World world, BlockPos blockpos, IBlockState iblockstate, Random random) { Object object = random.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true); int i0 = 0; int i1 = 0; boolean flag0 = false; switch (BlockSapling.SwitchEnumType.a[((BlockPlanks.EnumType) iblockstate.b(a)).ordinal()]) { case 1: label78: for (i0 = 0; i0 >= -1; --i0) { for (i1 = 0; i1 >= -1; --i1) { if (this.a(world, blockpos.a(i0, 0, i1), BlockPlanks.EnumType.SPRUCE) && this.a(world, blockpos.a(i0 + 1, 0, i1), BlockPlanks.EnumType.SPRUCE) && this.a(world, blockpos.a(i0, 0, i1 + 1), BlockPlanks.EnumType.SPRUCE) && this.a(world, blockpos.a(i0 + 1, 0, i1 + 1), BlockPlanks.EnumType.SPRUCE)) { object = new WorldGenMegaPineTree(false, random.nextBoolean()); flag0 = true; break label78; } } } if (!flag0) { i1 = 0; i0 = 0; object = new WorldGenTaiga2(true); } break; case 2: object = new WorldGenForest(true, false); break; case 3: label93: for (i0 = 0; i0 >= -1; --i0) { for (i1 = 0; i1 >= -1; --i1) { if (this.a(world, blockpos.a(i0, 0, i1), BlockPlanks.EnumType.JUNGLE) && this.a(world, blockpos.a(i0 + 1, 0, i1), BlockPlanks.EnumType.JUNGLE) && this.a(world, blockpos.a(i0, 0, i1 + 1), BlockPlanks.EnumType.JUNGLE) && this.a(world, blockpos.a(i0 + 1, 0, i1 + 1), BlockPlanks.EnumType.JUNGLE)) { object = new WorldGenMegaJungle( true, 10, 20, BlockPlanks.EnumType.JUNGLE.a(), BlockPlanks.EnumType.JUNGLE.a()); flag0 = true; break label93; } } } if (!flag0) { i1 = 0; i0 = 0; object = new WorldGenTrees( true, 4 + random.nextInt(7), BlockPlanks.EnumType.JUNGLE.a(), BlockPlanks.EnumType.JUNGLE.a(), false); } break; case 4: object = new WorldGenSavannaTree(true); break; case 5: label108: for (i0 = 0; i0 >= -1; --i0) { for (i1 = 0; i1 >= -1; --i1) { if (this.a(world, blockpos.a(i0, 0, i1), BlockPlanks.EnumType.DARK_OAK) && this.a(world, blockpos.a(i0 + 1, 0, i1), BlockPlanks.EnumType.DARK_OAK) && this.a(world, blockpos.a(i0, 0, i1 + 1), BlockPlanks.EnumType.DARK_OAK) && this.a(world, blockpos.a(i0 + 1, 0, i1 + 1), BlockPlanks.EnumType.DARK_OAK)) { object = new WorldGenCanopyTree(true); flag0 = true; break label108; } } } if (!flag0) { return; } case 6: } IBlockState iblockstate1 = Blocks.a.P(); if (flag0) { world.a(blockpos.a(i0, 0, i1), iblockstate1, 4); world.a(blockpos.a(i0 + 1, 0, i1), iblockstate1, 4); world.a(blockpos.a(i0, 0, i1 + 1), iblockstate1, 4); world.a(blockpos.a(i0 + 1, 0, i1 + 1), iblockstate1, 4); } else { world.a(blockpos, iblockstate1, 4); } if (!((WorldGenerator) object).b(world, random, blockpos.a(i0, 0, i1))) { if (flag0) { world.a(blockpos.a(i0, 0, i1), iblockstate, 4); world.a(blockpos.a(i0 + 1, 0, i1), iblockstate, 4); world.a(blockpos.a(i0, 0, i1 + 1), iblockstate, 4); world.a(blockpos.a(i0 + 1, 0, i1 + 1), iblockstate, 4); } else { world.a(blockpos, iblockstate, 4); } } }