aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
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
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')
-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
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java21
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java282
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java59
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java63
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java63
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java273
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java79
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java480
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java289
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java93
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java492
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java138
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java51
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java2407
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/CustomInternalName.java27
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/item/IC2_Items.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java87
33 files changed, 4071 insertions, 1400 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);
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
index 1cb499479f..7c1b854770 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
@@ -53,6 +53,7 @@ import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricButcherKnife;
import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricLighter;
import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricSnips;
import gtPlusPlus.xmod.gregtech.loaders.ProcessingToolHeadChoocher;
+import gtPlusPlus.xmod.gregtech.loaders.misc.AddCustomMachineToPA;
import gtPlusPlus.xmod.gregtech.loaders.misc.WoodCentrifuging;
import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_AlgaeFarm;
import gtPlusPlus.xmod.gregtech.recipes.RecipesToRemove;
@@ -129,6 +130,9 @@ public class HANDLER_GT {
if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){
OldCircuitHandler.postInit();
}
+
+ // Register custom singles to the PA
+ AddCustomMachineToPA.register();
// Register the No-Bonus Special Behaviour.
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 504533c406..b7662ca25e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -19,6 +19,12 @@ public enum GregtechItemList implements GregtechItemContainer {
/**
* Items
*/
+
+ // Advanced Hazmat Suit
+ Armour_Hazmat_Advanced_Helmet,
+ Armour_Hazmat_Advanced_Chest,
+ Armour_Hazmat_Advanced_Legs,
+ Armour_Hazmat_Advanced_Boots,
//Gregtech Machine Parts
Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV, Electric_Motor_MAX,
@@ -49,6 +55,7 @@ public enum GregtechItemList implements GregtechItemContainer {
//Recipe Circuit
Circuit_BioRecipeSelector,
+ Circuit_T3RecipeSelector,
//Circuits
Old_Circuit_Primitive, Old_Circuit_Basic, Old_Circuit_Good,
@@ -363,6 +370,9 @@ public enum GregtechItemList implements GregtechItemContainer {
Casing_Turbine_LP, Casing_Turbine_HP,
Casing_Turbine_Gas, Casing_Turbine_Plasma,
+ // Large Engine
+ Casing_Reinforced_Engine_Casing,
+
//Large Vacuum Furnace
Casing_Vacuum_Furnace,
Controller_Vacuum_Furnace,
@@ -375,10 +385,13 @@ public enum GregtechItemList implements GregtechItemContainer {
Controller_LargeSemifluidGenerator,
// IsaMill
- Controller_IsaMill_Controller,
+ Controller_IsaMill,
Casing_IsaMill_Casing,
Casing_IsaMill_Gearbox,
Casing_IsaMill_Pipe,
+
+ // Flotation Cell
+ Controller_Flotation_Cell,
//----------------------------------------------------------------------------
@@ -402,6 +415,12 @@ public enum GregtechItemList implements GregtechItemContainer {
//Control Core
Hatch_Control_Core,
+
+ // Milling Ball Bus
+ Bus_Milling_Balls,
+
+ // Catalyst Bus
+ Bus_Catalysts,
//Custom Fluid Hatches
Hatch_Input_Cryotheum,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java
new file mode 1006