aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/bop
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/bop')
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java70
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java60
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java29
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java27
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java30
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java20
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java23
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java23
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java20
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java6
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java98
14 files changed, 254 insertions, 186 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
index f66677838f..39aee4681f 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
@@ -1,14 +1,16 @@
package gtPlusPlus.xmod.bop;
-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 java.lang.reflect.Field;
+
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+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;
+
public class HANDLER_BiomesOPlenty {
public static Item mPineCone;
@@ -63,36 +65,36 @@ public class HANDLER_BiomesOPlenty {
// 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");
+ 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 = ReflectionUtils.getFieldValue(aBopMiscItem);
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
index add656087d..316e826e37 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
@@ -1,5 +1,11 @@
package gtPlusPlus.xmod.bop.blocks;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
@@ -22,11 +28,6 @@ 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;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
public class BOP_Block_Registrator {
@@ -74,9 +75,10 @@ public class BOP_Block_Registrator {
public static final void addLogRecipes(final ItemStack aStack) {
RecipeUtils.addShapelessGregtechRecipe(
- new ItemStack[] {aStack},
+ new ItemStack[] { aStack },
ItemUtils.getSimpleStack(
- Item.getItemFromBlock(Blocks.planks), GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 4));
+ Item.getItemFromBlock(Blocks.planks),
+ GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 4));
RecipeUtils.recipeBuilder(
CI.craftingToolSaw,
null,
@@ -97,7 +99,7 @@ public class BOP_Block_Registrator {
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {"sLf", 'L', GT_Utility.copyAmount(1L, aStack)});
+ new Object[] { "sLf", 'L', GT_Utility.copyAmount(1L, aStack) });
GT_Values.RA.addLatheRecipe(
GT_Utility.copyAmount(1L, aStack),
GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L),
@@ -137,8 +139,8 @@ public class BOP_Block_Registrator {
GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null),
new ItemStack(Items.coal, 1, 1))) {
addPyrolyeOvenRecipes(aStack);
- if (GregTech_API.sRecipeFile.get(
- ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
+ if (GregTech_API.sRecipeFile
+ .get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
}
}
@@ -147,8 +149,8 @@ public class BOP_Block_Registrator {
GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null),
new ItemStack(Items.coal, 1, 1))) {
addPyrolyeOvenRecipes(aStack);
- if (GregTech_API.sRecipeFile.get(
- ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
+ if (GregTech_API.sRecipeFile
+ .get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i));
}
}
@@ -170,8 +172,7 @@ public class BOP_Block_Registrator {
GT_Values.RA.addCutterRecipe(
new ItemStack(aStack.getItem(), 1, i),
GT_Utility.copyAmount(
- GT_Mod.gregtechproxy.mNerfedWoodPlank
- ? ((long) tStack.stackSize)
+ GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack.stackSize)
: ((long) (tStack.stackSize * 5 / 4)),
tStack),
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L),
@@ -184,15 +185,15 @@ public class BOP_Block_Registrator {
GT_ModHandler.removeRecipe(new ItemStack(aStack.getItem(), 1, i));
GT_ModHandler.addCraftingRecipe(
GT_Utility.copyAmount(
- GT_Mod.gregtechproxy.mNerfedWoodPlank
- ? ((long) tStack.stackSize)
+ GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack.stackSize)
: ((long) (tStack.stackSize * 5 / 4)),
tStack),
- new Object[] {"s", "L", 'L', new ItemStack(aStack.getItem(), 1, i)});
+ new Object[] { "s", "L", 'L', new ItemStack(aStack.getItem(), 1, i) });
GT_ModHandler.addShapelessCraftingRecipe(
GT_Utility.copyAmount(
- tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack),
- new Object[] {new ItemStack(aStack.getItem(), 1, i)});
+ tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1),
+ tStack),
+ new Object[] { new ItemStack(aStack.getItem(), 1, i) });
}
}
} else {
@@ -200,8 +201,8 @@ public class BOP_Block_Registrator {
GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null),
new ItemStack(Items.coal, 1, 1))) {
addPyrolyeOvenRecipes(aStack);
- if (GregTech_API.sRecipeFile.get(
- ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
+ if (GregTech_API.sRecipeFile
+ .get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
}
}
@@ -219,8 +220,7 @@ public class BOP_Block_Registrator {
GT_Values.RA.addCutterRecipe(
GT_Utility.copyAmount(1L, aStack),
GT_Utility.copyAmount(
- GT_Mod.gregtechproxy.mNerfedWoodPlank
- ? ((long) tStack2.stackSize)
+ GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack2.stackSize)
: ((long) (tStack2.stackSize * 5 / 4)),
tStack2),
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L),
@@ -233,15 +233,15 @@ public class BOP_Block_Registrator {
GT_ModHandler.removeRecipe(GT_Utility.copyAmount(1L, aStack));
GT_ModHandler.addCraftingRecipe(
GT_Utility.copyAmount(
- GT_Mod.gregtechproxy.mNerfedWoodPlank
- ? ((long) tStack2.stackSize)
+ GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack2.stackSize)
: ((long) (tStack2.stackSize * 5 / 4)),
tStack2),
- new Object[] {"s", "L", 'L', GT_Utility.copyAmount(1L, aStack)});
+ new Object[] { "s", "L", 'L', GT_Utility.copyAmount(1L, aStack) });
GT_ModHandler.addShapelessCraftingRecipe(
GT_Utility.copyAmount(
- tStack2.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack2),
- new Object[] {GT_Utility.copyAmount(1L, aStack)});
+ tStack2.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1),
+ tStack2),
+ new Object[] { GT_Utility.copyAmount(1L, aStack) });
}
}
if (GT_Utility.areStacksEqual(
@@ -261,8 +261,8 @@ public class BOP_Block_Registrator {
null,
0,
false);
- GT_ModHandler.addCompressionRecipe(
- GT_Utility.copyAmount(8L, aStack), ItemList.IC2_Plantball.get(1L, new Object[0]));
+ GT_ModHandler
+ .addCompressionRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.IC2_Plantball.get(1L, new Object[0]));
GT_Values.RA.addLatheRecipe(
GT_Utility.copyAmount(1L, aStack),
GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L),
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
index c2d534dfb6..f33b4de9c4 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
@@ -1,16 +1,8 @@
package gtPlusPlus.xmod.bop.blocks.base;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.common.registry.LanguageRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.BlockLeaves;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -21,10 +13,20 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+
public class LeavesBase extends BlockLeaves {
protected IIcon[][] leafTextures = new IIcon[2][];
- protected String[][] leafType = new String[][] {{}, {}};
+ protected String[][] leafType = new String[][] { {}, {} };
protected String[] treeType = new String[] {};
protected ItemStack[] bonusDrops;
@@ -77,8 +79,7 @@ public class LeavesBase extends BlockLeaves {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int p_149691_1_, int metaID) {
- return (metaID & 3) == 1
- ? this.leafTextures[this.field_150127_b][1]
+ return (metaID & 3) == 1 ? this.leafTextures[this.field_150127_b][1]
: this.leafTextures[this.field_150127_b][0];
}
@@ -93,8 +94,8 @@ public class LeavesBase extends BlockLeaves {
for (int i = 0; i < leafType.length; ++i) {
this.leafTextures[i] = new IIcon[leafType[i].length];
for (int j = 0; j < leafType[i].length; ++j) {
- this.leafTextures[i][j] =
- iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "leaves/" + "leaves_" + leafType[i][j]);
+ this.leafTextures[i][j] = iIcon
+ .registerIcon(CORE.MODID + ":" + "trees/" + "leaves/" + "leaves_" + leafType[i][j]);
}
}
setVanillaVariable(this.field_150129_M, this.leafTextures);
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java
index 4c8a905834..4723403ea0 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java
@@ -1,14 +1,7 @@
package gtPlusPlus.xmod.bop.blocks.base;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.common.registry.LanguageRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
import java.util.List;
+
import net.minecraft.block.BlockLog;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -18,7 +11,17 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+
public abstract class LogBase extends BlockLog {
+
public String[] treeType = new String[] {};
protected IIcon[] textureSide;
protected IIcon[] textureTop;
@@ -30,7 +33,9 @@ public abstract class LogBase extends BlockLog {
GameRegistry.registerBlock(this, ItemBlock.class, blockName);
this.setBlockName(blockName);
ItemUtils.addItemToOreDictionary(
- ItemUtils.getSimpleStack(this), "log" + Utils.sanitizeString(blockNameLocalized), true);
+ ItemUtils.getSimpleStack(this),
+ "log" + Utils.sanitizeString(blockNameLocalized),
+ true);
ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "logWood", true);
this.setCreativeTab(AddToCreativeTab.tabBOP);
LanguageRegistry.addName(this, blockNameLocalized);
@@ -72,8 +77,8 @@ public abstract class LogBase extends BlockLog {
for (int i = 0; i < this.textureSide.length; ++i) {
this.textureSide[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i]);
- this.textureTop[i] =
- iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i] + "_top");
+ this.textureTop[i] = iIcon
+ .registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i] + "_top");
}
setVanillaVariable(this.field_150167_a, this.textureSide);
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
index f606a3c173..42ca117573 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
@@ -1,16 +1,8 @@
package gtPlusPlus.xmod.bop.blocks.base;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.common.registry.LanguageRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -26,7 +18,18 @@ import net.minecraft.world.gen.feature.WorldGenBigTree;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+
public class SaplingBase extends BlockSapling {
+
protected String[] saplingTypes = new String[] {};
protected IIcon[] saplingTextures = new IIcon[] {};
@@ -56,8 +59,9 @@ public class SaplingBase extends BlockSapling {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int someInt, int meta) {
- /* p_149691_2_ &= 7;
- return saplingTextures[MathHelper.clamp_int(p_149691_2_, 0, 5)];*/
+ /*
+ * p_149691_2_ &= 7; return saplingTextures[MathHelper.clamp_int(p_149691_2_, 0, 5)];
+ */
// return this.saplingTextures[meta % this.saplingTextures.length];
try {
return this.saplingTextures[meta];
@@ -177,8 +181,8 @@ public class SaplingBase extends BlockSapling {
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iIcon) {
for (int i = 0; i < saplingTextures.length; ++i) {
- saplingTextures[i] =
- iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "saplings/" + "sapling_" + saplingTypes[i]);
+ saplingTextures[i] = iIcon
+ .registerIcon(CORE.MODID + ":" + "trees/" + "saplings/" + "sapling_" + saplingTypes[i]);
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java
index b901766583..d03473d0f7 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java
@@ -1,22 +1,24 @@
package gtPlusPlus.xmod.bop.blocks.pine;
+import java.util.Random;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
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 java.util.Random;
-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"}};
+ this.treeType = new String[] { "pine" };
+ this.leafType = new String[][] { { "pine" }, { "pine_opaque" } };
}
@Override
@@ -29,7 +31,11 @@ public class LeavesPineTree extends LeavesBase {
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)));
+ world,
+ x,
+ y,
+ z,
+ ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, MathUtils.randInt(1, 4)));
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java
index e8de630960..98e384cd3f 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java
@@ -5,20 +5,17 @@ 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"};
+ 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];
- }*/
+ /*
+ * @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]; }
+ */
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
index a5c9012f76..2c2bb38af6 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java
@@ -1,10 +1,7 @@
package gtPlusPlus.xmod.bop.blocks.pine;
-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 java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
@@ -12,10 +9,15 @@ import net.minecraft.world.gen.feature.WorldGenBigTree;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator;
+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;
+
public class SaplingPineTree extends SaplingBase {
public SaplingPineTree() {
- super("Pine Sapling", "pine", new String[] {"pine"});
+ super("Pine Sapling", "pine", new String[] { "pine" });
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java
index fe6eb4446d..816b666a40 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java
@@ -1,19 +1,21 @@
package gtPlusPlus.xmod.bop.blocks.rainforest;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
-import gtPlusPlus.xmod.bop.blocks.base.LeavesBase;
import java.util.Random;
+
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+import gtPlusPlus.xmod.bop.blocks.base.LeavesBase;
+
public class LeavesRainforestTree extends LeavesBase {
public LeavesRainforestTree() {
- super("Rainforest Oak", "rainforestoak", new ItemStack[] {ItemUtils.getSimpleStack(Items.apple)});
- this.treeType = new String[] {"rainforest"};
- this.leafType = new String[][] {{"rainforest"}, {"rainforest_opaque"}};
+ super("Rainforest Oak", "rainforestoak", new ItemStack[] { ItemUtils.getSimpleStack(Items.apple) });
+ this.treeType = new String[] { "rainforest" };
+ this.leafType = new String[][] { { "rainforest" }, { "rainforest_opaque" } };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java
index b3f42fcd93..94d936d477 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java
@@ -5,20 +5,17 @@ import gtPlusPlus.xmod.bop.blocks.base.LogBase;
public class LogRainforestTree extends LogBase {
public LogRainforestTree() {
- super("Rainforest Oak", "rainforestoak", new String[] {"rainforest"});
- this.treeType = new String[] {"rainforest"};
+ super("Rainforest Oak", "rainforestoak", new String[] { "rainforest" });
+ this.treeType = new String[] { "rainforest" };
}
- /*@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];
- }*/
+ /*
+ * @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]; }
+ */
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java
index 72de197adf..bc5cadc4bb 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java
@@ -1,10 +1,7 @@
package gtPlusPlus.xmod.bop.blocks.rainforest;
-import gtPlusPlus.api.objects.Logger;
-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 java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
@@ -12,10 +9,15 @@ import net.minecraft.world.gen.feature.WorldGenBigTree;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+import gtPlusPlus.xmod.bop.blocks.base.SaplingBase;
+import gtPlusPlus.xmod.bop.world.features.trees.WorldGenRainForestTree_Ex;
+
public class SaplingRainforestTree extends SaplingBase {
public SaplingRainforestTree() {
- super("Rainforest Oak Sapling", "rainforestoak", new String[] {"rainforest"});
+ super("Rainforest Oak Sapling", "rainforestoak", new String[] { "rainforest" });
}
@Override
@@ -41,7 +43,13 @@ public class SaplingRainforestTree extends SaplingBase {
world.setBlock(x, y, z, block, 0, 4);
}
Object o = new WorldGenRainForestTree_Ex(
- BOP_Block_Registrator.log_Rainforest, BOP_Block_Registrator.leaves_Rainforest, 0, 0, true, 50, 75);
+ 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) {
diff --git a/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java b/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java
index a4795efa51..55bc7fb4cd 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java
@@ -1,10 +1,11 @@
package gtPlusPlus.xmod.bop.creative;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+
public class MiscUtilsBOPTab extends CreativeTabs {
public MiscUtilsBOPTab(final String lable) {
@@ -13,7 +14,6 @@ public class MiscUtilsBOPTab extends CreativeTabs {
@Override
public Item getTabIconItem() {
- return ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest)
- .getItem();
+ return ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest).getItem();
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java
index a3f805c710..4d8e61c2ac 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java
@@ -1,8 +1,7 @@
package gtPlusPlus.xmod.bop.world.features.trees;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.init.Blocks;
@@ -10,6 +9,9 @@ import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraftforge.common.util.ForgeDirection;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
+
public class WorldGenPineTree extends WorldGenAbstractTree {
public WorldGenPineTree() {
diff --git a/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java
index cdd14b9c71..225e639ede 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.bop.world.features.trees;
-import gtPlusPlus.api.objects.Logger;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.init.Blocks;
@@ -9,6 +9,8 @@ import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraftforge.common.util.ForgeDirection;
+import gtPlusPlus.api.objects.Logger;
+
public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
private final int minTreeHeight;
@@ -18,17 +20,11 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
private final int woodMeta;
private final int leavesMeta;
- // return random.nextInt(5) == 0 ? new WorldGenTrees(false, 4 + random.nextInt(7), 3, 3, true) : new
+ // return random.nextInt(5) == 0 ? new WorldGenTrees(false, 4 + random.nextInt(7), 3, 3, true) : new
// WorldGenRainforestTree1(BOPCBlocks.logs4, BOPCBlocks.colorizedLeaves2, 3, 2, false, 8, 8);
- public WorldGenRainForestTree_Ex(
- Block wood,
- Block leaves,
- int woodMeta,
- int leavesMeta,
- boolean doBlockNotify,
- int minTreeHeight,
- int randomTreeHeight) {
+ public WorldGenRainForestTree_Ex(Block wood, Block leaves, int woodMeta, int leavesMeta, boolean doBlockNotify,
+ int minTreeHeight, int randomTreeHeight) {
super(doBlockNotify);
this.wood = wood;
this.leaves = leaves;
@@ -69,8 +65,8 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
}
Block block2 = world.getBlock(x, y - 1, z);
- boolean isSoil =
- block2.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, (BlockSapling) Blocks.sapling);
+ boolean isSoil = block2
+ .canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, (BlockSapling) Blocks.sapling);
if ((isSoil) && (y < 256 - treeHeight - 1)) {
block2.onPlantGrow(world, x, y - 1, z, x, y, z);
byte b0 = 3;
@@ -88,8 +84,7 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
int l2 = k2 - z;
Logger.WARNING(
"[3]| k2 = " + k2 + " | z = " + z + " | l1 = " + l1 + " | l2 = " + l2 + " | ");
- if ((Math.abs(j2) != l1)
- || (Math.abs(l2) != l1)
+ if ((Math.abs(j2) != l1) || (Math.abs(l2) != l1)
|| ((random.nextInt(2) != 0) && (i3 != 0))) {
Block block1 = world.getBlock(i2, k1, k2);
if ((block1.isAir(world, i2, k1, k2)) || (block1.isLeaves(world, i2, k1, k2))) {
@@ -122,8 +117,13 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
Logger.WARNING(
"Doing Nothing at " + "x=" + xDir + " | y=" + y + " z=" + zDir);
} else {
- Logger.WARNING("Trying to place leaves at " + "x=" + xDir + " | y=" + y
- + " z=" + zDir);
+ Logger.WARNING(
+ "Trying to place leaves at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + " z="
+ + zDir);
block5 = world.getBlock(x + xDir, y + k1, z + zDir);
if (block5.isAir(world, x + xDir, y + k1, x + zDir)) {
setBlockAndNotifyAdequately(
@@ -141,11 +141,25 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
for (int xDir = -4; xDir <= 4; xDir++) {
for (int zDir = -4; zDir <= 4; zDir++) {
if (canRemoveLeafBlockLayer2(-4, 4, xDir, -4, 4, zDir)) {
- Logger.WARNING("Doing Nothing at " + "x=" + xDir + " | y=" + y + k1 + 1
- + " z=" + zDir);
+ Logger.WARNING(
+ "Doing Nothing at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + k1
+ + 1
+ + " z="
+ + zDir);
} else {
- Logger.WARNING("Trying to place leaves at " + "x=" + xDir + " | y=" + y + k1
- + 1 + " z=" + zDir);
+ Logger.WARNING(
+ "Trying to place leaves at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + k1
+ + 1
+ + " z="
+ + zDir);
block5 = world.getBlock(x + xDir, y + k1 + 1, z + zDir);
if (block5.isAir(world, x + xDir, y + k1 + 1, x + zDir)) {
setBlockAndNotifyAdequately(
@@ -164,11 +178,25 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
for (int xDir = -3; xDir <= 3; xDir++) {
for (int zDir = -3; zDir <= 3; zDir++) {
if (canRemoveLeafBlockLayer2(-3, 3, xDir, -3, 3, zDir)) {
- Logger.WARNING("Doing Nothing at " + "x=" + xDir + " | y=" + y + k1 + 2
- + " z=" + zDir);
+ Logger.WARNING(
+ "Doing Nothing at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + k1
+ + 2
+ + " z="
+ + zDir);
} else {
- Logger.WARNING("Trying to place leaves at " + "x=" + xDir + " | y=" + y + k1
- + 2 + " z=" + zDir);
+ Logger.WARNING(
+ "Trying to place leaves at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + k1
+ + 2
+ + " z="
+ + zDir);
block5 = world.getBlock(x + xDir, y + k1 + 2, z + zDir);
if (block5.isAir(world, x + xDir, y + k1 + 2, x + zDir)) {
setBlockAndNotifyAdequately(
@@ -187,11 +215,25 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree {
for (int xDir = -2; xDir <= 2; xDir++) {
for (int zDir = -2; zDir <= 2; zDir++) {
if (canRemoveLeafBlockLayer2(-2, 2, xDir, -2, 2, zDir)) {
- Logger.WARNING("Doing Nothing at " + "x=" + xDir + " | y=" + y + k1 + 3
- + " z=" + zDir);
+ Logger.WARNING(
+ "Doing Nothing at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + k1
+ + 3
+ + " z="
+ + zDir);
} else {
- Logger.WARNING("Trying to place leaves at " + "x=" + xDir + " | y=" + y + k1
- + 3 + " z=" + zDir);
+ Logger.WARNING(
+ "Trying to place leaves at " + "x="
+ + xDir
+ + " | y="
+ + y
+ + k1
+ + 3
+ + " z="
+ + zDir);
block5 = world.getBlock(x + xDir, y + k1 + 3, z + zDir);
if (block5.isAir(world, x + xDir, y + k1 + 3, x + zDir)) {
setBlockAndNotifyAdequately(