diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2017-05-27 17:04:07 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-05-27 17:04:07 +1000 |
| commit | 6f33213c0ed4561ed2892036bd15c55524841754 (patch) | |
| tree | e8e900c19e6c59f3a947e3cea9f73038bc837143 /src/Java/gtPlusPlus/xmod/bop/blocks/rainforest | |
| parent | b20fad29ca4e6ad5de25080e212ab5257692afa5 (diff) | |
| download | GT5-Unofficial-6f33213c0ed4561ed2892036bd15c55524841754.tar.gz GT5-Unofficial-6f33213c0ed4561ed2892036bd15c55524841754.tar.bz2 GT5-Unofficial-6f33213c0ed4561ed2892036bd15c55524841754.zip | |
$ More work improving the Rainforest Tree generation.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/bop/blocks/rainforest')
| -rw-r--r-- | src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java index 76c10d1bb5..390285bdc3 100644 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java +++ b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java @@ -1,6 +1,15 @@ package gtPlusPlus.xmod.bop.blocks.rainforest; +import java.util.Random; + +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; import gtPlusPlus.xmod.bop.blocks.base.SaplingBase; +import gtPlusPlus.xmod.bop.world.features.trees.WorldGenRainForestTree_Ex; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.*; public class SaplingRainforestTree extends SaplingBase { @@ -8,4 +17,47 @@ public class SaplingRainforestTree extends SaplingBase { super("Rainforest Oak Sapling", "rainforestoak", new String[]{"rainforest"}); } + @Override + public void func_149878_d(World world, int x, int y, int z, Random rand){ + Utils.LOG_INFO("func_149878_d - 1"); + if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; + int l = world.getBlockMetadata(x, y, z) & 7; + Object object = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true); + int i1 = 0; + int j1 = 0; + boolean flag = false; + + Block block = Blocks.air; + + if (flag) + { + world.setBlock(x + i1, y, z + j1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); + world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); + } + else + { + world.setBlock(x, y, z, block, 0, 4); + } +//public WorldGenRainForestTree_Ex(Block wood, Block leaves, int woodMeta, int leavesMeta, boolean doBlockNotify, int minTreeHeight, int randomTreeHeight) { + Class C = BOP_Block_Registrator.class; + Object o = new WorldGenRainForestTree_Ex(BOP_Block_Registrator.log_Rainforest, BOP_Block_Registrator.leaves_Rainforest, 0, 0, true, 50, 75); + + if (!((WorldGenerator)o).generate(world, rand, x + i1, y, z + j1)) + { + if (flag) + { + world.setBlock(x + i1, y, z + j1, this, l, 4); + world.setBlock(x + i1 + 1, y, z + j1, this, l, 4); + world.setBlock(x + i1, y, z + j1 + 1, this, l, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, this, l, 4); + } + else + { + world.setBlock(x, y, z, this, l, 4); + } + } + } + }
\ No newline at end of file |
