aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/bop
diff options
context:
space:
mode:
authorJakub <53441451+kuba6000@users.noreply.github.com>2022-08-29 16:04:28 +0200
committerGitHub <noreply@github.com>2022-08-29 16:04:28 +0200
commit7d1f51a8937e0a86486267437d444696e81e8aa0 (patch)
treea5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/bop
parent5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff)
downloadGT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip
Buildscript + Spotless (#318)
* Convert AES.java to readable class * Buildscript * Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/bop')
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java335
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java490
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java180
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java122
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java338
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java39
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java32
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java75
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java29
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java32
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java99
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java21
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java316
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java468
14 files changed, 1370 insertions, 1206 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
index 52f498988c..f66677838f 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
@@ -1,181 +1,180 @@
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 java.lang.reflect.Field;
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(){
- BOP_Block_Registrator.run();
- if (LoadedMods.BiomesOPlenty){
- setFields();
- registerPineconeToOreDict();
- }
-
- }
-
- public static void init(){
- if (LoadedMods.BiomesOPlenty){
-
- }
- }
-
- public static void postInit(){
- BOP_Block_Registrator.recipes();
- if (LoadedMods.BiomesOPlenty){
-
- }
- }
-
- 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 = ReflectionUtils.getFieldValue(aBopMiscItem);
- if (aMiscItem != null) {
- mPineCone = aMiscItem;
- }
- }
-
-
- if (aBopBlock1 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopBlock1);
- if (aBlock != null) {
- logs1 = aBlock;
- }
- }
- if (aBopBlock2 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopBlock2);
- if (aBlock != null) {
- logs2 = aBlock;
- }
- }
- if (aBopBlock3 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopBlock3);
- if (aBlock != null) {
- logs3 = aBlock;
- }
- }
- if (aBopBlock4 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopBlock4);
- if (aBlock != null) {
- logs4 = aBlock;
- }
- }
-
-
- if (aBopLeaves1 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves1);
- if (aBlock != null) {
- leaves1 = aBlock;
- }
- }
- if (aBopLeaves2 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves2);
- if (aBlock != null) {
- leaves2 = aBlock;
- }
- }
- if (aBopLeaves3 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves3);
- if (aBlock != null) {
- leaves3 = aBlock;
- }
- }
- if (aBopLeaves4 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves4);
- if (aBlock != null) {
- leaves4 = aBlock;
- }
- }
-
-
- if (aBopColouredLeaves1 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopColouredLeaves1);
- if (aBlock != null) {
- colorizedLeaves1 = aBlock;
- }
- }
- if (aBopColouredLeaves2 != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopColouredLeaves2);
- if (aBlock != null) {
- colorizedLeaves2 = aBlock;
- }
- }
-
-
- if (aBopSapling != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopSapling);
- if (aBlock != null) {
- saplings = aBlock;
- }
- }
- if (aBopColouredSapling != null) {
- Block aBlock = ReflectionUtils.getFieldValue(aBopColouredSapling);
- if (aBlock != null) {
- colorizedSaplings = aBlock;
- }
- }
- }
-
+ 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() {
+ BOP_Block_Registrator.run();
+ if (LoadedMods.BiomesOPlenty) {
+ setFields();
+ registerPineconeToOreDict();
+ }
+ }
+
+ public static void init() {
+ if (LoadedMods.BiomesOPlenty) {}
+ }
+
+ public static void postInit() {
+ BOP_Block_Registrator.recipes();
+ if (LoadedMods.BiomesOPlenty) {}
+ }
+
+ 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 = ReflectionUtils.getFieldValue(aBopMiscItem);
+ if (aMiscItem != null) {
+ mPineCone = aMiscItem;
+ }
+ }
+
+ if (aBopBlock1 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock1);
+ if (aBlock != null) {
+ logs1 = aBlock;
+ }
+ }
+ if (aBopBlock2 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock2);
+ if (aBlock != null) {
+ logs2 = aBlock;
+ }
+ }
+ if (aBopBlock3 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock3);
+ if (aBlock != null) {
+ logs3 = aBlock;
+ }
+ }
+ if (aBopBlock4 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock4);
+ if (aBlock != null) {
+ logs4 = aBlock;
+ }
+ }
+
+ if (aBopLeaves1 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves1);
+ if (aBlock != null) {
+ leaves1 = aBlock;
+ }
+ }
+ if (aBopLeaves2 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves2);
+ if (aBlock != null) {
+ leaves2 = aBlock;
+ }
+ }
+ if (aBopLeaves3 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves3);
+ if (aBlock != null) {
+ leaves3 = aBlock;
+ }
+ }
+ if (aBopLeaves4 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves4);
+ if (aBlock != null) {
+ leaves4 = aBlock;
+ }
+ }
+
+ if (aBopColouredLeaves1 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopColouredLeaves1);
+ if (aBlock != null) {
+ colorizedLeaves1 = aBlock;
+ }
+ }
+ if (aBopColouredLeaves2 != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopColouredLeaves2);
+ if (aBlock != null) {
+ colorizedLeaves2 = aBlock;
+ }
+ }
+
+ if (aBopSapling != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopSapling);
+ if (aBlock != null) {
+ saplings = aBlock;
+ }
+ }
+ if (aBopColouredSapling != null) {
+ Block aBlock = ReflectionUtils.getFieldValue(aBopColouredSapling);
+ if (aBlock != null) {
+ colorizedSaplings = aBlock;
+ }
+ }
+ }
}
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 3716359d7a..add656087d 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
@@ -30,169 +30,353 @@ import net.minecraft.item.ItemStack;
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;
+ 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();
- }
+ // Runs Each tree Type separately
+ public static final void run() {
+ registerTree_Rainforest();
+ registerTree_Pine();
+ }
+ private static final boolean registerTree_Rainforest() {
+ log_Rainforest = new LogRainforestTree();
+ leaves_Rainforest = new LeavesRainforestTree();
+ sapling_Rainforest = new SaplingRainforestTree();
+ ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Rainforest), "logWood", true);
+ ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Rainforest), "treeLeaves", true);
+ ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Rainforest), "treeSapling", true);
+ return true;
+ }
- private static final boolean registerTree_Rainforest(){
- log_Rainforest = new LogRainforestTree();
- leaves_Rainforest = new LeavesRainforestTree();
- sapling_Rainforest = new SaplingRainforestTree();
- ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Rainforest), "logWood", true);
- ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Rainforest), "treeLeaves", true);
- ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Rainforest), "treeSapling", true);
- 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;
+ }
- 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
+ addLogRecipes(ItemUtils.getSimpleStack(log_Rainforest));
+ addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Rainforest));
+ // Pine
+ addLogRecipes(ItemUtils.getSimpleStack(log_Pine));
+ addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Pine));
+ }
- public static final void recipes() {
- // Rainforest Oak
- addLogRecipes(ItemUtils.getSimpleStack(log_Rainforest));
- addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Rainforest));
- // Pine
- addLogRecipes(ItemUtils.getSimpleStack(log_Pine));
- addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Pine));
+ public static final void addLogRecipes(final ItemStack aStack) {
+ RecipeUtils.addShapelessGregtechRecipe(
+ new ItemStack[] {aStack},
+ ItemUtils.getSimpleStack(
+ Item.getItemFromBlock(Blocks.planks), GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 4));
+ RecipeUtils.recipeBuilder(
+ CI.craftingToolSaw,
+ null,
+ null,
+ aStack,
+ null,
+ null,
+ null,
+ null,
+ null,
+ ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), 4));
+ GT_ModHandler.addPulverisationRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L),
+ 80,
+ false);
+ 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)});
+ GT_Values.RA.addLatheRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L),
+ 160,
+ 8);
- }
+ if (!CORE.GTNH) {
+ GT_Values.RA.addAssemblerRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]),
+ Materials.SeedOil.getFluid(50L),
+ ItemList.FR_Stick.get(1L, new Object[0]),
+ 16,
+ 8);
+ GT_Values.RA.addAssemblerRecipe(
+ GT_Utility.copyAmount(8L, aStack),
+ ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]),
+ Materials.SeedOil.getFluid(250L),
+ ItemList.FR_Casing_Impregnated.get(1L, new Object[0]),
+ 64,
+ 16);
+ GT_Values.RA.addChemicalBathRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ Materials.Creosote.getFluid(1000L),
+ GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8),
+ null,
+ null,
+ null,
+ 16,
+ 16);
+ }
- public static final void addLogRecipes(final ItemStack aStack) {
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {aStack}, ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 4));
- RecipeUtils.recipeBuilder(
- CI.craftingToolSaw, null, null,
- aStack, null, null,
- null, null, null,
- ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), 4));
- GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false);
- 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) });
- GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 160, 8);
+ final short aMeta = (short) aStack.getItemDamage();
+ if (aMeta == 32767) {
+ if (GT_Utility.areStacksEqual(
+ 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)) {
+ GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
+ }
+ }
+ for (int i = 0; i < 32767; ++i) {
+ if (GT_Utility.areStacksEqual(
+ 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)) {
+ GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i));
+ }
+ }
+ final ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i));
+ if (tStack == null) {
+ if (i >= 16) {
+ break;
+ }
+ } else {
+ final ItemStack tPlanks = GT_Utility.copy(tStack);
+ tPlanks.stackSize = tPlanks.stackSize * 3 / 2;
+ GT_Values.RA.addCutterRecipe(
+ new ItemStack(aStack.getItem(), 1, i),
+ Materials.Lubricant.getFluid(1L),
+ GT_Utility.copy(tPlanks),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L),
+ 200,
+ 8);
+ GT_Values.RA.addCutterRecipe(
+ new ItemStack(aStack.getItem(), 1, i),
+ GT_Utility.copyAmount(
+ GT_Mod.gregtechproxy.mNerfedWoodPlank
+ ? ((long) tStack.stackSize)
+ : ((long) (tStack.stackSize * 5 / 4)),
+ tStack),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L),
+ 200,
+ 8);
+ GT_ModHandler.addSawmillRecipe(
+ new ItemStack(aStack.getItem(), 1, i),
+ tPlanks,
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
+ GT_ModHandler.removeRecipe(new ItemStack(aStack.getItem(), 1, i));
+ GT_ModHandler.addCraftingRecipe(
+ GT_Utility.copyAmount(
+ GT_Mod.gregtechproxy.mNerfedWoodPlank
+ ? ((long) tStack.stackSize)
+ : ((long) (tStack.stackSize * 5 / 4)),
+ tStack),
+ 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)});
+ }
+ }
+ } else {
+ if (GT_Utility.areStacksEqual(
+ 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)) {
+ GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
+ }
+ }
+ final ItemStack tStack2 = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1L, aStack));
+ if (tStack2 != null) {
+ final ItemStack tPlanks2 = GT_Utility.copy(tStack2);
+ tPlanks2.stackSize = tPlanks2.stackSize * 3 / 2;
+ GT_Values.RA.addCutterRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ Materials.Lubricant.getFluid(1L),
+ GT_Utility.copy(tPlanks2),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L),
+ 200,
+ 8);
+ GT_Values.RA.addCutterRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_Utility.copyAmount(
+ GT_Mod.gregtechproxy.mNerfedWoodPlank
+ ? ((long) tStack2.stackSize)
+ : ((long) (tStack2.stackSize * 5 / 4)),
+ tStack2),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L),
+ 200,
+ 8);
+ GT_ModHandler.addSawmillRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ tPlanks2,
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
+ GT_ModHandler.removeRecipe(GT_Utility.copyAmount(1L, aStack));
+ GT_ModHandler.addCraftingRecipe(
+ GT_Utility.copyAmount(
+ GT_Mod.gregtechproxy.mNerfedWoodPlank
+ ? ((long) tStack2.stackSize)
+ : ((long) (tStack2.stackSize * 5 / 4)),
+ tStack2),
+ 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)});
+ }
+ }
+ if (GT_Utility.areStacksEqual(
+ 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)) {
+ GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
+ }
+ }
+ }
- if (!CORE.GTNH) {
- GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L, new Object[0]), 16, 8);
- GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L, new Object[0]), 64, 16);
- GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16);
- }
+ public static void addSaplingRecipes(final ItemStack aStack) {
+ GT_ModHandler.addPulverisationRecipe(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L),
+ null,
+ 0,
+ false);
+ 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),
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L),
+ 16,
+ 8);
+ }
- final short aMeta = (short)aStack.getItemDamage();
- if (aMeta == 32767) {
- if (GT_Utility.areStacksEqual(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)) {
- GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
- }
- }
- for (int i = 0; i < 32767; ++i) {
- if (GT_Utility.areStacksEqual(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)) {
- GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i));
- }
- }
- final ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i));
- if (tStack == null) {
- if (i >= 16) {
- break;
- }
- }
- else {
- final ItemStack tPlanks = GT_Utility.copy(tStack);
- tPlanks.stackSize = tPlanks.stackSize * 3 / 2;
- GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8);
- GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack.stackSize) : ((long)(tStack.stackSize * 5 / 4)), tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8);
- GT_ModHandler.addSawmillRecipe(new ItemStack(aStack.getItem(), 1, i), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
- GT_ModHandler.removeRecipe(new ItemStack(aStack.getItem(), 1, i));
- GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack.stackSize) : ((long)(tStack.stackSize * 5 / 4)), tStack), 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) });
- }
- }
- }
- else {
- if (GT_Utility.areStacksEqual(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)) {
- GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
- }
- }
- final ItemStack tStack2 = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1L, aStack));
- if (tStack2 != null) {
- final ItemStack tPlanks2 = GT_Utility.copy(tStack2);
- tPlanks2.stackSize = tPlanks2.stackSize * 3 / 2;
- GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8);
- GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack2.stackSize) : ((long)(tStack2.stackSize * 5 / 4)), tStack2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8);
- GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), tPlanks2, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
- GT_ModHandler.removeRecipe(GT_Utility.copyAmount(1L, aStack));
- GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack2.stackSize) : ((long)(tStack2.stackSize * 5 / 4)), tStack2), 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) });
- }
- }
- if (GT_Utility.areStacksEqual(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)) {
- GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
- }
- }
- }
+ public static void addPyrolyeOvenRecipes(final ItemStack logStack) {
- public static void addSaplingRecipes(final ItemStack aStack) {
- GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), null, 0, false);
- 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), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), 16, 8);
- }
+ Materials aOilHeavy = MaterialUtils.getMaterial("OilHeavy");
+ Materials aCharcoalByproducts = MaterialUtils.getMaterial("CharcoalByproducts");
+ Materials aWoodGas = MaterialUtils.getMaterial("WoodGas");
+ Materials aWoodVinegar = MaterialUtils.getMaterial("WoodVinegar");
+ Materials aWoodTar = MaterialUtils.getMaterial("WoodTar");
- public static void addPyrolyeOvenRecipes(final ItemStack logStack) {
-
- Materials aOilHeavy = MaterialU