aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2020-04-13 23:50:26 +0000
committerAlkalus <draknyte1@hotmail.com>2020-04-13 23:50:26 +0000
commite724a728061ec4a78cff73a4a2dd46eea4af4521 (patch)
treefee3354917be32870ec349b605990a091ace9e62 /src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
parent24b1356471191a10fde6e4f1baf58ae74e87cfba (diff)
parent87ab3c0ab5f1b682295e2a010cc88cf4ae7db51c (diff)
downloadGT5-Unofficial-e724a728061ec4a78cff73a4a2dd46eea4af4521.tar.gz
GT5-Unofficial-e724a728061ec4a78cff73a4a2dd46eea4af4521.tar.bz2
GT5-Unofficial-e724a728061ec4a78cff73a4a2dd46eea4af4521.zip
Merged in MillingRecipes (pull request #7)
Milling Recipes & many other misc fixes
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java')
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
new file mode 100644
index 0000000000..0ee04de899
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
@@ -0,0 +1,55 @@
+package gtPlusPlus.xmod.bop.blocks.pine;
+
+import java.util.Random;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.bop.blocks.base.SaplingBase;
+import gtPlusPlus.xmod.bop.world.features.trees.WorldGenPineTree;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenBigTree;
+import net.minecraft.world.gen.feature.WorldGenTrees;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class SaplingPineTree extends SaplingBase {
+
+ public SaplingPineTree(){
+ super("Pine Sapling", "pine", new String[]{"pine"});
+ }
+
+ @Override
+ public void func_149878_d(World world, int x, int y, int z, Random rand){
+ Logger.WARNING("func_149878_d - 1");
+ if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return;
+ rand.nextInt(10);
+ 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);
+ }
+ Object obj = new WorldGenPineTree();
+ if (obj != null) {
+ world.setBlockToAir(x, y, z);
+ if (!((WorldGenerator) obj).generate(world, CORE.RANDOM, x, y, z)) {
+ world.setBlock(x, y, z, this, 0, 2);
+ }
+ }
+ }
+
+} \ No newline at end of file