aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/bop
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-03-31 16:35:15 +0100
committerAlkalus <Draknyte1@hotmail.com>2020-03-31 16:35:15 +0100
commit2c4a94b808c61d66163d9969017c2819ddb2c5ae (patch)
tree3af0f3ca11bb52b3183ef100e4dc6892a76f83e7 /src/Java/gtPlusPlus/xmod/bop
parent09b08b073aea41bfbdf189c88cc722912952ea6d (diff)
downloadGT5-Unofficial-2c4a94b808c61d66163d9969017c2819ddb2c5ae.tar.gz
GT5-Unofficial-2c4a94b808c61d66163d9969017c2819ddb2c5ae.tar.bz2
GT5-Unofficial-2c4a94b808c61d66163d9969017c2819ddb2c5ae.zip
+ Added a Pine Tree.
+ Oredict BoP Pinecone if it exists. $ Fixed Algae Farm controller recipe. $ Fixed bug where getOrePrefixStack(rod) would return null. $ Fixed a bug where getItemStackFromFQRN didn't work correctly.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/bop')
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java158
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java22
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java36
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java55
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java171
7 files changed, 465 insertions, 13 deletions
diff --git a/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java b/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
index 9d646e3eb5..95067300c8 100644
--- a/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
+++ b/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
@@ -1,16 +1,42 @@
package gtPlusPlus.xmod.bop;
+import java.lang.reflect.Field;
+
import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
public class HANDLER_BiomesOPlenty {
+
+ public static Item mPineCone;
+
+ public static Block logs1;
+ public static Block logs2;
+ public static Block logs3;
+ public static Block logs4;
+
+ public static Block leaves1;
+ public static Block leaves2;
+ public static Block leaves3;
+ public static Block leaves4;
+ public static Block colorizedLeaves1;
+ public static Block colorizedLeaves2;
+ public static Block saplings;
+ public static Block colorizedSaplings;
+
public static void preInit(){
- //if (LoadedMods.BiomesOPlenty){
- BOP_Block_Registrator.run();
- //}
+ BOP_Block_Registrator.run();
+ if (LoadedMods.BiomesOPlenty){
+ setFields();
+ registerPineconeToOreDict();
+ }
}
@@ -21,11 +47,135 @@ public class HANDLER_BiomesOPlenty {
}
public static void postInit(){
+ BOP_Block_Registrator.recipes();
if (LoadedMods.BiomesOPlenty){
- BOP_Block_Registrator.recipes();
+
}
+ }
+ private static void registerPineconeToOreDict() {
+ if (mPineCone != null) {
+ ItemStack aPinecone = ItemUtils.simpleMetaStack(mPineCone, 13, 1);
+ if (aPinecone != null) {
+ ItemUtils.addItemToOreDictionary(aPinecone, "pinecone");
+ }
+ }
+ }
+
+ public static ItemStack getStack(Block aBlock, int aMeta, int aSize) {
+ return ItemUtils.simpleMetaStack(aBlock, aMeta, aSize);
}
+
+ //BOPCBlocks.logs4 - 0
+ //BOPCBlocks.colorizedLeaves2 - 1
+
+ private static void setFields() {
+ Field aBopMiscItem = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCItems"), "misc");
+
+ Field aBopBlock1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs1");
+ Field aBopBlock2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs2");
+ Field aBopBlock3 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs3");
+ Field aBopBlock4 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs4");
+
+ Field aBopLeaves1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves1");
+ Field aBopLeaves2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves2");
+ Field aBopLeaves3 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves3");
+ Field aBopLeaves4 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves4");
+
+ Field aBopColouredLeaves1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedLeaves1");
+ Field aBopColouredLeaves2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedLeaves2");
+
+ Field aBopSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "saplings");
+ Field aBopColouredSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedSaplings");
+
+ if (aBopMiscItem != null) {
+ Item aMiscItem = (Item) ReflectionUtils.getFieldValue(aBopMiscItem);
+ if (aMiscItem != null) {
+ mPineCone = aMiscItem;
+ }
+ }
+
+
+ if (aBopBlock1 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock1);
+ if (aBlock != null) {
+ logs1 = aBlock;
+ }
+ }
+ if (aBopBlock2 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock2);
+ if (aBlock != null) {
+ logs2 = aBlock;
+ }
+ }
+ if (aBopBlock3 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock3);
+ if (aBlock != null) {
+ logs3 = aBlock;
+ }
+ }
+ if (aBopBlock4 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock4);
+ if (aBlock != null) {
+ logs4 = aBlock;
+ }
+ }
+
+
+ if (aBopLeaves1 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves1);
+ if (aBlock != null) {
+ leaves1 = aBlock;
+ }
+ }
+ if (aBopLeaves2 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves2);
+ if (aBlock != null) {
+ leaves2 = aBlock;
+ }
+ }
+ if (aBopLeaves3 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves3);
+ if (aBlock != null) {
+ leaves3 = aBlock;
+ }
+ }
+ if (aBopLeaves4 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves4);
+ if (aBlock != null) {
+ leaves4 = aBlock;
+ }
+ }
+
+
+ if (aBopColouredLeaves1 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves1);
+ if (aBlock != null) {
+ colorizedLeaves1 = aBlock;
+ }
+ }
+ if (aBopColouredLeaves2 != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves2);
+ if (aBlock != null) {
+ colorizedLeaves2 = aBlock;
+ }
+ }
+
+
+ if (aBopSapling != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopSapling);
+ if (aBlock != null) {
+ saplings = aBlock;
+ }
+ }
+ if (aBopColouredSapling != null) {
+ Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredSapling);
+ if (aBlock != null) {
+ colorizedSaplings = aBlock;
+ }
+ }
+ }
+
}
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java b/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
index 2ee1587809..3716359d7a 100644
--- a/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
@@ -16,6 +16,9 @@ import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
+import gtPlusPlus.xmod.bop.blocks.pine.LeavesPineTree;
+import gtPlusPlus.xmod.bop.blocks.pine.LogPineTree;
+import gtPlusPlus.xmod.bop.blocks.pine.SaplingPineTree;
import gtPlusPlus.xmod.bop.blocks.rainforest.LeavesRainforestTree;
import gtPlusPlus.xmod.bop.blocks.rainforest.LogRainforestTree;
import gtPlusPlus.xmod.bop.blocks.rainforest.SaplingRainforestTree;
@@ -30,10 +33,14 @@ public class BOP_Block_Registrator {
public static Block log_Rainforest;
public static Block leaves_Rainforest;
public static Block sapling_Rainforest;
+ public static Block log_Pine;
+ public static Block leaves_Pine;
+ public static Block sapling_Pine;
//Runs Each tree Type separately
public static final void run(){
registerTree_Rainforest();
+ registerTree_Pine();
}
@@ -47,10 +54,23 @@ public class BOP_Block_Registrator {
return true;
}
+ private static final boolean registerTree_Pine(){
+ log_Pine = new LogPineTree();
+ leaves_Pine = new LeavesPineTree();
+ sapling_Pine = new SaplingPineTree();
+ ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Pine), "logWood", true);
+ ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Pine), "treeLeaves", true);
+ ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Pine), "treeSapling", true);
+ return true;
+ }
+
public static final void recipes() {
- //Rainforest Oak
+ // Rainforest Oak
addLogRecipes(ItemUtils.getSimpleStack(log_Rainforest));
addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Rainforest));
+ // Pine
+ addLogRecipes(ItemUtils.getSimpleStack(log_Pine));
+ addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Pine));
}
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
index 264aaa2a20..5c86c45591 100644
--- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
@@ -55,16 +55,12 @@ public class LeavesBase extends BlockLeaves {
@Override//Drops when Leaf is broken
protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){
- if (this.treeType.length == this.bonusDrops.length){
- for (int i = 0; i < this.treeType.length; ++i){
- if (this.bonusDrops[i] != null && world.rand.nextInt(randomChance) == 0){
- this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(this.bonusDrops[i], 1));
- }
+ Logger.INFO("Dropping Bonus Drops");
+ for (int i = 0; i < this.bonusDrops.length; ++i){
+ if (this.bonusDrops[i] != null && world.rand.nextInt(randomChance) == 0){
+ this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(this.bonusDrops[i], 1));
}
}
- else {
- Logger.WARNING("Unable to drop anything, Leaf Type array and Loot array are different sizes.");
- }
}
/**
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java
new file mode 100644
index 0000000000..c942db14cf
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java
@@ -0,0 +1,36 @@
+package gtPlusPlus.xmod.bop.blocks.pine;
+
+import java.util.Random;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.item.chemistry.AgriculturalChem;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+import gtPlusPlus.xmod.bop.blocks.base.LeavesBase;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class LeavesPineTree extends LeavesBase {
+
+ public LeavesPineTree(){
+ super("Pine", "pine", new ItemStack[]{});
+ this.treeType = new String[] {"pine"};
+ this.leafType = new String[][] {{"pine"},{"pine_opaque"}};
+ }
+
+ @Override
+ public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_){
+ return Item.getItemFromBlock(BOP_Block_Registrator.sapling_Pine);
+ }
+
+ @Override//Drops when Leaf is broken
+ protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){
+ Logger.INFO("Dropping Bonus Drops");
+ if (MathUtils.randInt(0, 10) >= 9) {
+ this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, MathUtils.randInt(1, 4)));
+ }
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java
new file mode 100644
index 0000000000..dee5bf02fd
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java
@@ -0,0 +1,24 @@
+package gtPlusPlus.xmod.bop.blocks.pine;
+
+import gtPlusPlus.xmod.bop.blocks.base.LogBase;
+
+public class LogPineTree extends LogBase {
+
+ public LogPineTree(){
+ super("Pine Log", "pine", new String[]{"pine"});
+ this.treeType = new String[] {"pine"};
+ }
+
+ /*@Override
+ @SideOnly(Side.CLIENT)
+ protected IIcon getSideIcon(int metaID){
+ return this.textureSide[metaID % this.textureSide.length];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ protected IIcon getTopIcon(int metaID){
+ return this.textureTop[metaID % this.textureTop.length];
+ }*/
+
+} \ No newline at end of file
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
diff --git a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java
new file mode 100644
index 0000000000..831108ec99
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java
@@ -0,0 +1,171 @@
+package gtPlusPlus.xmod.bop.world.features.trees;
+
+import java.util.Random;
+
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockSapling;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenAbstractTree;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class WorldGenPineTree extends WorldGenAbstractTree{
+
+ public WorldGenPineTree() {
+ super(true);
+ }
+
+ @Override
+ public boolean generate(World world, Random random, int x, int y, int z) {
+ while (world.isAirBlock(x, y, z) && y > 2) {
+ --y;
+ }
+
+ Block aSoilBlock = world.getBlock(x, y, z);
+
+ if (!canBlockSustainSapling(world, aSoilBlock, x, y, z)) {
+ return false;
+ } else {
+ int height;
+ int branches;
+ for (height = -2; height <= 2; ++height) {
+ for (branches = -2; branches <= 2; ++branches) {
+ if (world.isAirBlock(x + height, y - 1, z + branches)
+ && world.isAirBlock(x + height, y - 2, z + branches)
+ && !world.isAirBlock(x + height, y, z + branches)) {
+ return false;
+ }
+ }
+ }
+
+ height = 2 + MathUtils.randInt(8, 16);
+ branches = 2 + MathUtils.randInt(6, 18);
+ int h = 1;
+ aSoilBlock.onPlantGrow(world, x, y - 1, z, x, y, z);
+
+ int c;
+ int r = MathUtils.randInt(1, 3);
+ for (c = 0; c < height; ++c) {
+ this.buildBlock(world, x, y + h, z, BOP_Block_Registrator.log_Pine, 0);
+ h++;
+ if (c >= r && c % 2 == 0) {
+ this.generateBranch(world, random, x, y + h, z, c);
+ }
+ }
+
+ this.generateTop(world, x, y + h, z);
+ return true;
+ }
+ }
+
+ public void generateTop(World world, int x, int y, int z) {
+ for (int i = -1; i < 2; ++i) {
+ for (int j = -1; j < 2; ++j) {
+ this.buildBlock(world, x + i, y, z + j, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ }
+
+ this.buildBlock(world, x, y, z, BOP_Block_Registrator.log_Pine, 0);
+ this.buildBlock(world, x + 1, y + 1, z, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x, y + 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x, y + 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x - 1, y + 1, z, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x, y + 2, z, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+
+ public void generateBranch(World world, Random rand, int x, int y, int z, int n) {
+ int var99999;
+ int var99998;
+ for (var99999 = -1; var99999 < 2; ++var99999) {
+ for (var99998 = -1; var99998 < 2; ++var99998) {
+ this.buildBlock(world, x + var99999, y, z + var99998, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ }
+
+ var99999 = rand.nextInt(2);
+ var99998 = rand.nextInt(2);
+ int var99997 = rand.nextInt(2);
+ int var99996 = rand.nextInt(2);
+ if (n % 2 == 0) {
+ if (var99998 == 0) {
+ this.buildBlock(world, x + 1, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x + 2, y - 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0);
+ if (var99999 == 0) {
+ this.buildBlock(world, x + 2, y - 2, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ } else {
+ this.buildBlock(world, x + 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ } else {
+ this.buildBlock(world, x + 1, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x + 2, y, z - 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x + 2, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+
+ if (var99997 == 0) {
+ this.buildBlock(world, x - 2, y - 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x - 1, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ if (var99996 == 0) {
+ this.buildBlock(world, x - 2, y - 2, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ } else {
+ this.buildBlock(world, x - 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ } else {
+ this.buildBlock(world, x - 2, y, z + 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x - 1, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x - 2, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ } else {
+ if (var99998 == 0) {
+ this.buildBlock(world, x + 2, y - 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x + 1, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ if (var99999 == 0) {
+ this.buildBlock(world, x + 2, y - 2, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ } else {
+ this.buildBlock(world, x + 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ } else {
+ this.buildBlock(world, x + 2, y, z + 1, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x + 1, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ if (var99999 == 0) {
+ this.buildBlock(world, x + 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ } else {
+ this.buildBlock(world, x + 2, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ }
+
+ if (var99997 == 0) {
+ this.buildBlock(world, x - 1, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x - 2, y - 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0);
+ if (var99996 == 0) {
+ this.buildBlock(world, x - 2, y - 2, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ } else {
+ this.buildBlock(world, x - 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ } else {
+ this.buildBlock(world, x - 1, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ this.buildBlock(world, x - 2, y, z - 1, BOP_Block_Registrator.leaves_Pine, 0);
+ if (var99996 == 0) {
+ this.buildBlock(world, x - 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ } else {
+ this.buildBlock(world, x - 2, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0);
+ }
+ }
+ }
+
+ this.buildBlock(world, x, y, z, BOP_Block_Registrator.log_Pine, 0);
+ this.buildBlock(world, x, y + 1, z, BOP_Block_Registrator.log_Pine, 0);
+ }
+
+ public void buildBlock(World world, int x, int y, int z, Block block, int meta) {
+ if (world.isAirBlock(x, y, z) || world.getBlock(x, y, z).isLeaves(world, x, y, z)) {
+ world.setBlock(x, y, z, block, meta, 2);
+ }
+ }
+
+ public boolean canBlockSustainSapling(World world, Block block, int x, int y, int z) {
+ return block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (BlockSapling)Blocks.sapling);
+ }
+
+}