From 0908735fc15396f8313d7643e952c1f9ce124d53 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Tue, 31 Mar 2020 12:33:16 +0100 Subject: + Added Carbon Disulfide. + Added Hydrogen Sulfide if it doesn't exist. + Added Sodium Ethoxide. + Added Potassium Hydroxide. + Added Sodium Ethyl Xanthate. + Added Potassium Ethyl Xanthate. + Added Base work for Froth Flotation Multi. --- .../commands/CommandEnableDebugWhileRunning.java | 58 ++++++++++++++++++---- 1 file changed, 48 insertions(+), 10 deletions(-) (limited to 'src/Java/gtPlusPlus/core/commands') diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index 903730f767..0111a5fa4d 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -19,6 +19,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; public class CommandEnableDebugWhileRunning implements ICommand @@ -33,14 +36,14 @@ public class CommandEnableDebugWhileRunning implements ICommand @Override public int compareTo(final Object o){ if (o instanceof Comparable) { - @SuppressWarnings("unchecked") - Comparable a = (Comparable) o; - if (a.equals(this)) { - return 0; - } - else { - return -1; - } + @SuppressWarnings("unchecked") + Comparable a = (Comparable) o; + if (a.equals(this)) { + return 0; + } + else { + return -1; + } } return -1; } @@ -106,7 +109,42 @@ public class CommandEnableDebugWhileRunning implements ICommand String aItemDisplayName = ItemUtils.getItemName(aHeldItem); String aItemUnlocalName = ItemUtils.getUnlocalizedItemName(aHeldItem); String aNbtString = tryIterateNBTData(aHeldItem); - PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "+aNbtString); + AutoMap aOreDictNames = new AutoMap(); + + int[] aOreIDs = OreDictionary.getOreIDs(aHeldItem); + for (int id : aOreIDs) { + String aOreNameFromID = OreDictionary.getOreName(id); + if (aOreNameFromID != null && aOreNameFromID.length() > 0 && !aOreNameFromID.equals("Unknown")) { + aOreDictNames.add(aOreNameFromID); + } + } + + String aOreDictData = ""; + if (!aOreDictNames.isEmpty()) { + for (String tag : aOreDictNames) { + aOreDictData += (tag+","); + } + if (aOreDictData.endsWith(",")) { + aOreDictData = aOreDictData.substring(0, aOreDictData.length()-2); + } + } + + String aFluidContainerData = ""; + FluidStack aHeldItemFluid = FluidContainerRegistry.getFluidForFilledItem(aHeldItem); + if (aHeldItemFluid != null) { + aFluidContainerData = "["+aHeldItemFluid.getUnlocalizedName()+"]["+aHeldItemFluid.getLocalizedName()+"]"; + } + + PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "); + if (aFluidContainerData.length() > 0) { + PlayerUtils.messagePlayer(P, ""+aFluidContainerData); + } + if (!aOreDictNames.isEmpty()) { + PlayerUtils.messagePlayer(P, ""+aOreDictData); + } + if (aNbtString.length() > 0) { + PlayerUtils.messagePlayer(P, ""+aNbtString); + } } else { PlayerUtils.messagePlayer(P, "No item held."); @@ -146,7 +184,7 @@ public class CommandEnableDebugWhileRunning implements ICommand public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ return true; } - + public static String tryIterateNBTData(ItemStack aStack) { try { AutoMap aItemDataTags = new AutoMap(); -- cgit From 09b08b073aea41bfbdf189c88cc722912952ea6d Mon Sep 17 00:00:00 2001 From: Alkalus Date: Tue, 31 Mar 2020 13:05:04 +0100 Subject: $ minor recipe fixes. --- .../commands/CommandEnableDebugWhileRunning.java | 20 ++++++++- .../core/item/chemistry/GenericChem.java | 52 ++++++++++++++++++---- 2 files changed, 62 insertions(+), 10 deletions(-) (limited to 'src/Java/gtPlusPlus/core/commands') diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index 0111a5fa4d..a9bd1568b6 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -7,6 +7,7 @@ import java.util.Map; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.NBTUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; @@ -20,6 +21,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; @@ -69,7 +71,7 @@ public class CommandEnableDebugWhileRunning implements ICommand @Override public void processCommand(final ICommandSender S, final String[] argString){ - int aMaxArgumentsAllowed = 1; + int aMaxArgumentsAllowed = 2; if ((argString == null || argString.length == 0 || argString.length > aMaxArgumentsAllowed) || argString[0].toLowerCase().equals("?")) { Logger.INFO("Listing commands and their uses."); @@ -78,6 +80,8 @@ public class CommandEnableDebugWhileRunning implements ICommand PlayerUtils.messagePlayer(P, "The following are valid args for the '/gtpp' command:"); PlayerUtils.messagePlayer(P, "? - This help command."); PlayerUtils.messagePlayer(P, "logging - Toggles ALL GT++ logging for current session."); + PlayerUtils.messagePlayer(P, "hand - Lists information about held item."); + PlayerUtils.messagePlayer(P, "fuid xxx - Tries to find the fluid in the FluidRegistry."); PlayerUtils.messagePlayer(P, "debug - Toggles GT++ Debug Mode. Only use when advised, may break everything. (OP)"); } else if (argString[0].toLowerCase().equals("debug")) { @@ -151,6 +155,18 @@ public class CommandEnableDebugWhileRunning implements ICommand } } } + else if (argString[0].toLowerCase().equals("fluid")) { + if (argString.length > 1 && argString[1] != null && argString[1].length() > 0) { + final EntityPlayer P = CommandUtils.getPlayer(S); + FluidStack aFluid = FluidUtils.getWildcardFluidStack(argString[1], 1); + if (P != null && aFluid != null) { + PlayerUtils.messagePlayer(P, "Found fluid stack: "+FluidRegistry.getFluidName(aFluid)); + } + else if (P != null && aFluid == null) { + PlayerUtils.messagePlayer(P, "Could not find any fluids."); + } + } + } else { final EntityPlayer P = CommandUtils.getPlayer(S); PlayerUtils.messagePlayer(P, "Invalid command, use '?' as an argument for help.'"); @@ -172,6 +188,8 @@ public class CommandEnableDebugWhileRunning implements ICommand aTabCompletes.add("?"); aTabCompletes.add("logging"); aTabCompletes.add("debug"); + aTabCompletes.add("hand"); + aTabCompletes.add("fluid"); return aTabCompletes; } diff --git a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java index bdcf4f09d9..488151a773 100644 --- a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java +++ b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java @@ -1,9 +1,7 @@ package gtPlusPlus.core.item.chemistry; -import static gtPlusPlus.core.lib.CORE.GTNH; - import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; +import gregtech.api.enums.ItemList; import gregtech.api.enums.TextureSet; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.minecraft.ItemPackage; @@ -28,6 +26,7 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -263,6 +262,21 @@ public class GenericChem extends ItemPackage { if (FluidRegistry.isFluidRegistered("fluid.liquid_hydricsulfur") || MaterialUtils.doesMaterialExist("HydricSulfide")) { usingGregtechHydricSulfur = true; + Fluid aFluid = null; + if (ItemUtils.doesItemListEntryExist("sHydricSulfur")) { + ItemStack aListItem = ItemUtils.getValueOfItemList("sHydricSulfur", 1, (ItemList) null); + if (aListItem != null) { + FluidStack aFluidStack = FluidContainerRegistry.getFluidForFilledItem(aListItem); + if (aFluidStack != null) { + aFluid = aFluidStack.getFluid(); + } + + } + } + if (aFluid == null) { + aFluid = FluidUtils.getWildcardFluidStack("liquid_hydricsulfur", 1000).getFluid(); + } + Hydrogen_Sulfide = aFluid; } else { Hydrogen_Sulfide = FluidUtils.generateFluidNoPrefix("HydrogenSulfide", "Hydrogen Sulfide", 446, new short[]{240, 130, 30, 100}); @@ -309,15 +323,13 @@ public class GenericChem extends ItemPackage { if (!usingGregtechHydricSulfur) { recipeHydricSulfur(); } - else { - Hydrogen_Sulfide = FluidRegistry.getFluid("fluid.liquid_hydricsulfur"); - } // Add recipes if we are not using GT's fluid. if (!FluidRegistry.isFluidRegistered("hydrochloricacid_gt5u")) { recipeHydrochloricAcid(); } + recipeSodiumEthoxide(); recipeCarbonDisulfide(); recipeEthylXanthates(); recipePotassiumHydroxide(); @@ -328,6 +340,29 @@ public class GenericChem extends ItemPackage { } + private void recipeSodiumEthoxide() { + //2 C2H5OH + 2 Na → 2 C2H5ONa + H2 + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(16), + ELEMENT.getInstance().SODIUM.getDust(2) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthanol, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(mSodiumEthoxide, 2) + + }, + new FluidStack[] { + ELEMENT.getInstance().HYDROGEN.getFluid(2000) + }, + 20 *20, + 120, + 2); + } + + private void recipePotassiumHydroxide() { //Ca(OH)2 + K2CO3 → CaCO3 + 2 KOH CORE.RA.addChemicalPlantRecipe( @@ -348,7 +383,7 @@ public class GenericChem extends ItemPackage { new FluidStack[] { }, - 20 *60 * 2, + 20 *30, 120, 2); @@ -387,7 +422,7 @@ public class GenericChem extends ItemPackage { FluidUtils.getFluidStack(Carbon_Disulfide, 1000), }, new ItemStack[] { - ItemUtils.getSimpleStack(mPotassiumEthylXanthate, 1) + ItemUtils.getSimpleStack(mSodiumEthylXanthate, 1) }, new FluidStack[] { @@ -412,7 +447,6 @@ public class GenericChem extends ItemPackage { CORE.RA.addBlastRecipe( new ItemStack[] { - CI.getNumberedCircuit(20), ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 8), ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 16) }, -- cgit From 2c4a94b808c61d66163d9969017c2819ddb2c5ae Mon Sep 17 00:00:00 2001 From: Alkalus Date: Tue, 31 Mar 2020 16:35:15 +0100 Subject: + Added a Pine Tree. + Oredict BoP Pinecone if it exists. $ Fixed Algae Farm controller recipe. $ Fixed bug where getOrePrefixStack(rod) would return null. $ Fixed a bug where getItemStackFromFQRN didn't work correctly. --- .../commands/CommandEnableDebugWhileRunning.java | 20 ++- .../core/item/chemistry/AgriculturalChem.java | 7 + .../core/item/chemistry/MilledOreProcessing.java | 184 +++++++++++++++++++-- .../gtPlusPlus/core/util/minecraft/ItemUtils.java | 18 +- .../agrichem/item/algae/ItemAgrichemBase.java | 4 +- .../gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java | 158 +++++++++++++++++- .../xmod/bop/blocks/BOP_Block_Registrator.java | 22 ++- .../xmod/bop/blocks/base/LeavesBase.java | 12 +- .../xmod/bop/blocks/pine/LeavesPineTree.java | 36 ++++ .../xmod/bop/blocks/pine/LogPineTree.java | 24 +++ .../xmod/bop/blocks/pine/SaplingPineTree.java | 55 ++++++ .../bop/world/features/trees/WorldGenPineTree.java | 171 +++++++++++++++++++ .../gregtech/loaders/RecipeGen_DustGeneration.java | 3 +- src/resources/assets/miscutils/lang/en_US.lang | 8 +- .../textures/blocks/trees/leaves/leaves_pine.png | Bin 0 -> 688 bytes .../blocks/trees/leaves/leaves_pine_opaque .png | Bin 0 -> 687 bytes .../blocks/trees/saplings/sapling_pine.png | Bin 0 -> 432 bytes .../textures/items/bioscience/MetaItem1/24.png | Bin 0 -> 357 bytes .../textures/items/bioscience/MetaItem1/25.png | Bin 0 -> 648 bytes 19 files changed, 688 insertions(+), 34 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java create mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java create mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java create mode 100644 src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java create mode 100644 src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png create mode 100644 src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque .png create mode 100644 src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png create mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png create mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png (limited to 'src/Java/gtPlusPlus/core/commands') diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index a9bd1568b6..c9cdc41424 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -126,9 +126,9 @@ public class CommandEnableDebugWhileRunning implements ICommand String aOreDictData = ""; if (!aOreDictNames.isEmpty()) { for (String tag : aOreDictNames) { - aOreDictData += (tag+","); + aOreDictData += (tag+", "); } - if (aOreDictData.endsWith(",")) { + if (aOreDictData.endsWith(", ")) { aOreDictData = aOreDictData.substring(0, aOreDictData.length()-2); } } @@ -167,6 +167,18 @@ public class CommandEnableDebugWhileRunning implements ICommand } } } + else if (argString[0].toLowerCase().equals("item")) { + if (argString.length > 1 && argString[1] != null && argString[1].length() > 0) { + final EntityPlayer P = CommandUtils.getPlayer(S); + ItemStack aTest = ItemUtils.getItemStackFromFQRN(argString[1], 1); + if (P != null && aTest != null) { + PlayerUtils.messagePlayer(P, "Found fluid stack: "+ItemUtils.getItemName(aTest)); + } + else if (P != null && aTest == null) { + PlayerUtils.messagePlayer(P, "Could not find valid item."); + } + } + } else { final EntityPlayer P = CommandUtils.getPlayer(S); PlayerUtils.messagePlayer(P, "Invalid command, use '?' as an argument for help.'"); @@ -217,9 +229,9 @@ public class CommandEnableDebugWhileRunning implements ICommand int a = 0; String data = ""; for (String tag : aItemDataTags) { - data += (tag+","); + data += (tag+", "); } - if (data.endsWith(",")) { + if (data.endsWith(", ")) { data = data.substring(0, data.length()-2); } return data; diff --git a/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java b/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java index 3f02ca898d..e11b163753 100644 --- a/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java +++ b/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java @@ -110,6 +110,7 @@ public class AgriculturalChem extends ItemPackage { * 21 - Lithium Chloride * 22 - Pellet Mold * 23 - Clean Aluminium Mix + * 24 - Pinecone */ public static ItemStack mAlgaeBiosmass; @@ -136,6 +137,8 @@ public class AgriculturalChem extends ItemPackage { public static ItemStack mLithiumChloride; public static ItemStack mPelletMold; public static ItemStack mCleanAluminiumMix; + public static ItemStack mPinecone; + public static ItemStack mCrushedPine; @Override @@ -205,6 +208,8 @@ public class AgriculturalChem extends ItemPackage { mLithiumChloride = ItemUtils.simpleMetaStack(mAgrichemItem1, 21, 1); mPelletMold = ItemUtils.simpleMetaStack(mAgrichemItem1, 22, 1); mCleanAluminiumMix = ItemUtils.simpleMetaStack(mAgrichemItem1, 23, 1); + mPinecone = ItemUtils.simpleMetaStack(mAgrichemItem1, 24, 1); + mCrushedPine = ItemUtils.simpleMetaStack(mAgrichemItem1, 25, 1); ItemUtils.addItemToOreDictionary(mGreenAlgaeBiosmass, "biomassGreenAlgae"); ItemUtils.addItemToOreDictionary(mBrownAlgaeBiosmass, "biomassBrownAlgae"); @@ -231,6 +236,8 @@ public class AgriculturalChem extends ItemPackage { ItemUtils.addItemToOreDictionary(mSodiumHydroxide, "dustSodiumHydroxide"); ItemUtils.addItemToOreDictionary(mSodiumCarbonate, "dustSodiumCarbonate"); ItemUtils.addItemToOreDictionary(mLithiumChloride, "dustLithiumChloride"); + ItemUtils.addItemToOreDictionary(mPinecone, "pinecone"); + ItemUtils.addItemToOreDictionary(mCrushedPine, "crushedPineMaterial"); //Handle GT NaOH dusts List NaOHSmall = OreDictionary.getOres("dustSmallSodiumHydroxide_GT5U", false); diff --git a/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java b/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java index 426f48ecf9..86ffe49eed 100644 --- a/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java +++ b/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java @@ -1,46 +1,61 @@ package gtPlusPlus.core.item.chemistry; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.minecraft.ItemPackage; import gtPlusPlus.core.item.base.ore.BaseItemMilledOre; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; public class MilledOreProcessing extends ItemPackage { /** * Fluids */ - + public static Fluid ZincFlotationFroth; public static Fluid CopperFlotationFroth; public static Fluid NickelFlotationFroth; public static Fluid PlatinumFlotationFroth; public static Fluid PentlanditeFlotationFroth; - - + + public static Fluid PineOil; + + /** * Items */ // Zinc, Iron, Indium, Germanium public static Item milledSphalerite; - + // Copper, Iron, Cadmium, Indium public static Item milledChalcopyrite; - + // Nickel, Cobalt, Rhodium, Ruthenium public static Item milledNickel; - + // Platinum, Rhodium, Selenium, Tellurium public static Item milledPlatinum; // Iron, Nickel, Promethium, Hafnium public static Item milledPentlandite; - + @Override public void items() { @@ -50,7 +65,7 @@ public class MilledOreProcessing extends ItemPackage { milledNickel = BaseItemMilledOre.generate(Materials.Nickel, MaterialUtils.getVoltageForTier(4)); milledPlatinum = BaseItemMilledOre.generate(Materials.Platinum, MaterialUtils.getVoltageForTier(5)); milledPentlandite = BaseItemMilledOre.generate(Materials.Pentlandite, MaterialUtils.getVoltageForTier(5)); - + } @Override @@ -60,7 +75,7 @@ public class MilledOreProcessing extends ItemPackage { @Override public void fluids() { - + short[] aZincFrothRGB = Materials.Sphalerite.mRGBa; ZincFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.zincflotation", "Zinc Froth", 32 + 175, new short[] { aZincFrothRGB[0], aZincFrothRGB[1], aZincFrothRGB[2], 100 }, true); short[] aCopperFrothRGB = Materials.Chalcopyrite.mRGBa; @@ -72,9 +87,11 @@ public class MilledOreProcessing extends ItemPackage { short[] aPentlanditeFrothRGB = Materials.Pentlandite.mRGBa; PentlanditeFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.pentlanditeflotation", "Pentlandite Froth", 32 + 175, new short[] { aPentlanditeFrothRGB[0], aPentlanditeFrothRGB[1], aPentlanditeFrothRGB[2], 100 }, true); + PineOil = FluidUtils.generateFluidNoPrefix("pineoil", "Pine Oil", 32 + 175, new short[] { 250, 200, 60, 100 }, true); + } - - + + public MilledOreProcessing() { super(); @@ -98,6 +115,7 @@ public class MilledOreProcessing extends ItemPackage { 30 * 20, 30);*/ + } @Override @@ -108,6 +126,150 @@ public class MilledOreProcessing extends ItemPackage { @Override public boolean generateRecipes() { addMiscRecipes(); + addPineOilExtraction(); return true; } + + private void addPineOilExtraction() { + AutoMap aLogs = new AutoMap(); + AutoMap aLeaves = new AutoMap(); + AutoMap aSaplings = new AutoMap(); + AutoMap aPinecones = new AutoMap(); + + ItemStack aCrushedPine = ItemUtils.getSimpleStack(AgriculturalChem.mCrushedPine, 1); + + aLogs.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.log_Pine)); + aLeaves.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.leaves_Pine)); + aSaplings.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine)); + aPinecones.add(ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, 1)); + + if (LoadedMods.BiomesOPlenty) { + aLogs.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.logs4, 0, 1)); + aLeaves.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.colorizedLeaves2, 1, 1)); + aSaplings.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.colorizedSaplings, 5, 1)); + aPinecones.add(ItemUtils.simpleMetaStack(HANDLER_BiomesOPlenty.mPineCone, 13, 1)); + } + if (LoadedMods.Forestry) { + ItemStack aForestryLog = ItemUtils.getItemStackFromFQRN("Forestry:logs", 1); + if (aForestryLog != null) { + aForestryLog.setItemDamage(20); // Set to Pine + aLogs.add(aForestryLog); + } + ItemStack aForestryLeaves = ItemUtils.getItemStackFromFQRN("Forestry:leaves", 1); + if (aForestryLeaves != null) { + NBTUtils.setString(aForestryLeaves, "species", "forestry.treePine"); // Set to Pine + aLeaves.add(aForestryLeaves); + } + } + + for (ItemStack aLog : aLogs) { + addRecipe(aLog, ItemUtils.getSimpleStack(aCrushedPine, 16), new int[] {10000, 7500, 5000, 2500}, 10, 120); + } + for (ItemStack aLeaf : aLeaves) { + addRecipe(aLeaf, ItemUtils.getSimpleStack(aCrushedPine, 2), new int[] {5000, 5000, 2500, 2500}, 10, 30); + } + for (ItemStack aSapling : aSaplings) { + addRecipe(aSapling, ItemUtils.getSimpleStack(aCrushedPine, 4), new int[] {7500, 7500, 2500, 2500}, 10, 60); + } + for (ItemStack aCone : aPinecones) { + addRecipe(aCone, ItemUtils.getSimpleStack(aCrushedPine, 1), new int[] {7500, 7500, 5000, 2500}, 10, 60); + } + + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(16), + ItemUtils.getSimpleStack(aCrushedPine, 64) + }, + new FluidStack[] { + FluidUtils.getSteam(5000), + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 1000) + }, + new int[] { + 2000, 2000, 2000, 2000 + }, + 20 *60, + 120, + 2); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(18), + ItemUtils.getSimpleStack(aCrushedPine, 64) + }, + new FluidStack[] { + FluidUtils.getSuperHeatedSteam(5000), + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 2000) + }, + new int[] { + 3000, 3000, 3000, 3000 + }, + 20 *60, + 120, + 3); + + } + + public boolean addRecipe(ItemStack aInput, ItemStack aOutput1, int[] aChances, int aTime, int aEU) { + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + ItemStack aOutputs[] = new ItemStack[4]; + for (int i=0;i aCleanedItems = new AutoMap(); + for (ItemStack checkStack : input) { + if (ItemUtils.checkForInvalidItems(checkStack)) { + aCleanedItems.put(checkStack); + } + } + ItemStack[] aOutput = new ItemStack[aCleanedItems.size()]; + for (int i=0;i= 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/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java index d4a25e03dd..da93fe212c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java @@ -46,9 +46,8 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { } private void generateRecipes(final Material material, final boolean disableOptional){ - final int tVoltageMultiplier = material.vVoltageMultiplier; - Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO + Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); final ItemStack normalDust = material.getDust(1); final ItemStack smallDust = material.getSmallDust(1); diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang index fd8e59662b..0dc4b4e170 100644 --- a/src/resources/assets/miscutils/lang/en_US.lang +++ b/src/resources/assets/miscutils/lang/en_US.lang @@ -3157,11 +3157,15 @@ item.FrothNickelflotation.name=Nickel Flotation Froth Cell item.FrothPlatinumflotation.name=Platinum Flotation Froth Cell item.FrothPentlanditeflotation.name=Pentlandite Flotation Froth Cell - +//Added 31/03/20 item.BasicGenericChemItem.9.name=Sodium Ethoxide Dust item.BasicGenericChemItem.10.name=Sodium Ethyl Xanthate Dust item.BasicGenericChemItem.11.name=Potassium Ethyl Xanthate Dust item.BasicGenericChemItem.12.name=Potassium Hydroxide Dust item.CarbonDisulfide.name=Carbon Disulfide Cell -item.HydrogenSulfide.name=Hydrogen Sulfide Cell \ No newline at end of file +item.HydrogenSulfide.name=Hydrogen Sulfide Cell + +item.BasicAgrichemItem.24.name=Pinecone +item.BasicAgrichemItem.25.name=Crushed Pine Materials +item.pineoil.name=Pine Oil Cell \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png new file mode 100644 index 0000000000..68949e5f47 Binary files /dev/null and b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque .png b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque .png new file mode 100644 index 0000000000..c7c0d6492f Binary files /dev/null and b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque .png differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png b/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png new file mode 100644 index 0000000000..f4c3ca84ac Binary files /dev/null and b/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png new file mode 100644 index 0000000000..0c065db4ce Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png new file mode 100644 index 0000000000..168b15adb3 Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png differ -- cgit