diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-13 12:43:44 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-13 12:43:44 +0000 |
commit | 05efaa691d2ebe9fd4811444dbf6f0de1ca142b6 (patch) | |
tree | f73e13eacabcd4f6d2ea851ea7bf078d70ce3c1a /src/Java/gtPlusPlus | |
parent | f2638119215ec2c6a507087f0399d8c8cd193647 (diff) | |
download | GT5-Unofficial-05efaa691d2ebe9fd4811444dbf6f0de1ca142b6.tar.gz GT5-Unofficial-05efaa691d2ebe9fd4811444dbf6f0de1ca142b6.tar.bz2 GT5-Unofficial-05efaa691d2ebe9fd4811444dbf6f0de1ca142b6.zip |
+ Added Xp conversion brewing recipes.
- Made Xp Convertor redundant.
$ Hopefully fixed ExtraUtils complaining about rendering.
$ Additional 5.08 support.
$ Possibly fixed recipes for some items which don't display in NEI correctly.
Diffstat (limited to 'src/Java/gtPlusPlus')
14 files changed, 301 insertions, 139 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index c92d38f46a..8ae48f3b3f 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -448,6 +448,7 @@ public class GTplusplus implements ActionListener { //Misc mMiscCapes.put(new Pair<String, String>("doomsquirter", "3aee80ab-d982-4e6d-b8d0-7912bbd75f5d")); mMiscCapes.put(new Pair<String, String>("ukdunc", "17d57521-3a1e-4eb9-91e6-901a65c15e07")); + mMiscCapes.put(new Pair<String, String>("q009", "520aebe6-4cd9-46cd-bc7a-d47e5e648e38")); mMiscCapes.put(new Pair<String, String>("JaidenC", "00b157e5-cd97-43a2-a080-460f550e93cd")); mMiscCapes.put(new Pair<String, String>("TheGiggitygoo", "9f996c78-bddc-4dec-a522-0df7267f11f3")); diff --git a/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java b/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java index 215c79ed10..f7f0b446ce 100644 --- a/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java +++ b/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java @@ -1,37 +1,24 @@ package gtPlusPlus.core.block.general; -import java.util.HashMap; -import java.util.Map; import java.util.Random; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockEntityBase; +import gtPlusPlus.core.lib.CORE; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import gregtech.common.items.GT_MetaGenerated_Tool_01; - -import gtPlusPlus.api.objects.data.Triplet; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockEntityBase; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityXpConverter; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.EnchantingUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - public class BlockTankXpConverter extends BlockContainer { @SideOnly(Side.CLIENT) @@ -41,10 +28,6 @@ public class BlockTankXpConverter extends BlockContainer { @SideOnly(Side.CLIENT) private IIcon textureFront; - private int mRainbowTick = 0; - private int mRainbowTickMax = 0; - private final Map<Integer, Triplet<Integer, Integer, Integer>> mRainbowMap = new HashMap<Integer, Triplet<Integer, Integer, Integer>>(); - @SuppressWarnings("deprecation") public BlockTankXpConverter() { super(Material.iron); @@ -84,6 +67,10 @@ public class BlockTankXpConverter extends BlockContainer { @Override public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) { + + return true; + + /* if (world.isRemote) { return true; } @@ -136,7 +123,7 @@ public class BlockTankXpConverter extends BlockContainer { } } return true; - } + */} @Override public int getRenderBlockPass() { @@ -150,7 +137,8 @@ public class BlockTankXpConverter extends BlockContainer { @Override public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityXpConverter(); + //return new TileEntityXpConverter(); + return null; } @Override @@ -198,7 +186,7 @@ public class BlockTankXpConverter extends BlockContainer { @Override public int getLightValue() { - return 6; - } + return 6; + } } diff --git a/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java b/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java index 90b005afbd..efd6f88885 100644 --- a/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java +++ b/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java @@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.client.renderer.RenderDecayChest; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.handler.GuiHandler; import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; @@ -38,7 +39,7 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip * Determines which tooltip is displayed within the itemblock. */ private final int mTooltipID = 5; - public final int field_149956_a = 0; + public final int field_149956_a = 0; @Override public int getTooltipID() { @@ -53,62 +54,70 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip this.setCreativeTab(AddToCreativeTab.tabMachines); GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockDecayablesChest"); LanguageRegistry.addName(this, "Lead Lined Box"); - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - - } - - /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. - */ - public boolean isOpaqueCube() - { - return false; - } - - /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) - */ - public boolean renderAsNormalBlock() - { - return false; - } - - /** - * The type of render function that is called for this block - */ - public int getRenderType() - { - return gtPlusPlus.core.client.renderer.RenderDecayChest.INSTANCE.mRenderID; - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, y, z - */ - public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) - { - if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this) - { - this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F); - } - else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this) - { - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F); - } - else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this) - { - this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - } - else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this) - { - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F); - } - else - { - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - } - } - + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); + + } + + /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two + * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + */ + public boolean isOpaqueCube() + { + return false; + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() + { + return false; + } + + /** + * The type of render function that is called for this block + */ + @SideOnly(Side.CLIENT) + public int getRenderType(){ + try { + if (RenderDecayChest.INSTANCE != null){ + return RenderDecayChest.INSTANCE.mRenderID; + } + return super.getRenderType(); + } + catch (NullPointerException n) { + return 0; + } + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, y, z + */ + public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) + { + if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this) + { + this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F); + } + else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this) + { + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F); + } + else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this) + { + this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); + } + else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this) + { + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F); + } + else + { + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); + } + } + /** * Gets the block's texture. Args: side, meta @@ -204,9 +213,9 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip * @param zPos */ @Deprecated - public void func_149954_e(World aWorld, int xPos, int yPos, int zPos) - { - - } - + public void func_149954_e(World aWorld, int xPos, int yPos, int zPos) + { + + } + }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderDecayChest.java b/src/Java/gtPlusPlus/core/client/renderer/RenderDecayChest.java index 7b120c5de1..73ab4093eb 100644 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderDecayChest.java +++ b/src/Java/gtPlusPlus/core/client/renderer/RenderDecayChest.java @@ -26,7 +26,8 @@ public class RenderDecayChest extends TileEntitySpecialRenderer { public RenderDecayChest() { INSTANCE = this; this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); - Logger.INFO("Registered Lead Lined Chest Renderer."); + Logger.INFO("Registered Lead Lined Chest Renderer."); + } public void renderTileEntityAt(TileEntityDecayablesChest p_147500_1_, double p_147500_2_, double p_147500_4_, diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java index 58c1982af0..ac6740f268 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java @@ -29,9 +29,10 @@ public class ItemBlockEntityBase extends ItemBlock { @Override public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { if (Block.getBlockFromItem(stack.getItem()) instanceof BlockTankXpConverter){ - list.add(EnumChatFormatting.GRAY+"Can convert Liquid Xp to Mob Essence and back."); + /*list.add(EnumChatFormatting.GRAY+"Can convert Liquid Xp to Mob Essence and back."); list.add(EnumChatFormatting.GRAY+"Right click with a Screwdriver to change mode."); - list.add(EnumChatFormatting.GRAY+"Shift+Right click to view tank information."); + list.add(EnumChatFormatting.GRAY+"Shift+Right click to view tank information.");*/ + list.add(EnumChatFormatting.GRAY+"Currently disabled, Use a GT Brewery instead. (New Recipes Added!)"); } super.addInformation(stack, aPlayer, list, bool); } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 97cef1ce0b..13c80297e4 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -4,11 +4,14 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.*; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; @@ -18,10 +21,13 @@ import gtPlusPlus.core.material.nuclear.FLUORIDES; import gtPlusPlus.core.material.nuclear.NUCLIDE; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.EnchantingUtils; import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.core.util.reflect.AddGregtechRecipe; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import net.minecraftforge.fluids.FluidStack; @@ -63,9 +69,15 @@ public class RECIPES_GREGTECH { electroMagneticSeperatorRecipes(); extruderRecipes(); cuttingSawRecipes(); + breweryRecipes(); addFuels(); } + private static void breweryRecipes() { + CORE.RA.addBrewingRecipe(14, EnchantingUtils.getMobEssence(100), EnchantingUtils.getLiquidXP(1332), 100, 120, false); + CORE.RA.addBrewingRecipe(14, EnchantingUtils.getLiquidXP(1332), EnchantingUtils.getMobEssence(100), 100, 120, false); + } + private static void cuttingSawRecipes() { GT_Values.RA.addCutterRecipe( ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), //Input @@ -829,6 +841,71 @@ public class RECIPES_GREGTECH { /*addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateIncoloy020", 16), ItemUtils.getItemStackOfAmountFromOreDict("frameGtIncoloyMA956", 4), null, GregtechItemList.Casing_Power_SubStation.get(4), 80, 120);*/ + + + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + GregtechItemList.Casing_Multi_Use.get(1), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8), + CI.sensor_HV, + CI.emitter_HV, + CI.fieldGenerator_HV, + }, + null, + ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame), + 20*20, + 2048); + + + + + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(ModItems.itemRope, 6)}, null, ItemUtils.getSimpleStack(ModBlocks.blockNet, 2), 1*20, 8); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(CI.explosiveITNT, 2), ItemUtils.getSimpleStack(CI.explosiveTNT, 4), ELEMENT.getInstance().SULFUR.getDust(2), ELEMENT.getInstance().IRON.getFrameBox(1)}, null, ItemUtils.getSimpleStack(ModBlocks.blockMiningExplosive, 3), 5*20, 60); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(Items.nether_star), ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 8), ItemUtils.getItemStackOfAmountFromOreDict("stickBlackSteel", 8)}, null, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard, 32), 30*20, 500); + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.electricPump_LV, + CI.electricMotor_LV, + ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 2), + ItemUtils.getItemStackOfAmountFromOreDict("ringBrass", 1), + ItemUtils.getItemStackOfAmountFromOreDict("rodBrass", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateSteel", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1), 10*20, 30); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.electricPump_MV, + CI.electricMotor_MV, + ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 2), + ItemUtils.getItemStackOfAmountFromOreDict("ringMagnalium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("rodMagnalium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateAluminium", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1), 10*20*2, 120); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.electricPump_HV, + CI.electricMotor_HV, + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 2), + ItemUtils.getItemStackOfAmountFromOreDict("ringChrome", 1), + ItemUtils.getItemStackOfAmountFromOreDict("rodChrome", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateStainlessSteel", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), 10*20*3, 480); + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.electricPump_EV, + CI.electricMotor_EV, + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 2), + ItemUtils.getItemStackOfAmountFromOreDict("ringTitanium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("rodTitanium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), 10*20*4, 1960); + + } private static boolean addAR(final ItemStack inputA, final ItemStack inputB, final ItemStack outputA, diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java index 1a1dfe64d9..58f9d64066 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java @@ -41,20 +41,17 @@ public class RECIPES_General { static ItemStack OUTPUT_Workbench_Bronze; static ItemStack RECIPE_HydrogenDust; - public static void loadRecipes(){ - - RECIPE_Paper = ItemUtils.getSimpleStack(Items.paper); - RECIPE_Dirt = ItemUtils.getSimpleStack(Blocks.dirt); - RECIPE_Snow = ItemUtils.getSimpleStack(Blocks.snow); - RECIPE_Obsidian = ItemUtils.getSimpleStack(Blocks.obsidian); - RECIPE_CraftingTable = ItemUtils.getSimpleStack(Blocks.crafting_table); - RECIPE_HydrogenDust = ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob); - - OUTPUT_Workbench_Bronze = ItemUtils.getSimpleStack(ModBlocks.blockWorkbench); - OUTPUT_Blueprint = ItemUtils.getSimpleStack(ModItems.itemBlueprintBase); - - if (LoadedMods.Gregtech){ - RECIPE_BasicCasingIC2 = ItemUtils.getItemStack("IC2:blockMachine", 1); + public static void loadRecipes(){ + if (LoadedMods.Gregtech){ + RECIPE_Paper = ItemUtils.getSimpleStack(Items.paper); + RECIPE_Dirt = ItemUtils.getSimpleStack(Blocks.dirt); + RECIPE_Snow = ItemUtils.getSimpleStack(Blocks.snow); + RECIPE_Obsidian = ItemUtils.getSimpleStack(Blocks.obsidian); + RECIPE_CraftingTable = ItemUtils.getSimpleStack(Blocks.crafting_table); + RECIPE_HydrogenDust = ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob); + RECIPE_BasicCasingIC2 = ItemUtils.getItemStack("IC2:blockMachine", 1); + OUTPUT_Workbench_Bronze = ItemUtils.getSimpleStack(ModBlocks.blockWorkbench); + OUTPUT_Blueprint = ItemUtils.getSimpleStack(ModItems.itemBlueprintBase); run(); addCompressedObsidian(); addHandPumpRecipes(); @@ -64,11 +61,11 @@ public class RECIPES_General { private static void run() { //Workbench Blueprint - RecipeUtils.recipeBuilder( + /*RecipeUtils.recipeBuilder( RECIPE_Paper, RECIPE_LapisDust, NULL, RECIPE_Paper, RECIPE_LapisDust, NULL, RECIPE_LapisDust, RECIPE_LapisDust, NULL, - OUTPUT_Blueprint); + OUTPUT_Blueprint);*/ //Bronze Workbench /*RecipeUtils.recipeBuilder( @@ -381,7 +378,7 @@ public class RECIPES_General { generatePipeRecipes(e.mDefaultLocalName, e.getMass(), tVoltageMultiplier); } - + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) RecipeUtils.addShapedGregtechRecipe( CI.component_Plate[4], "rotorGtStainlessSteel", CI.component_Plate[4], CI.getTieredCircuitOreDictName(3), CI.machineHull_HV, CI.getTieredCircuitOreDictName(3), @@ -403,6 +400,8 @@ public class RECIPES_General { CI.getTieredCircuitOreDictName(7), CI.component_Plate[9], ItemList.Hatch_Input_ZPM.get(1), CI.component_Plate[8], GregtechItemList.Hatch_Input_Naquadah.get(1L, new Object[0])); + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LV.get(1L, new Object[0]), bitsd, new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LV.get(1), Character.valueOf('P'), GregtechItemList.Pollution_Cleaner_LV.get(1) }); @@ -430,7 +429,7 @@ public class RECIPES_General { GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MAX.get(1L, new Object[0]), bitsd, new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MAX.get(1), Character.valueOf('P'), GregtechItemList.Pollution_Cleaner_MAX.get(1) }); - + } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 5cca67402b..10c5c09f8c 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -1329,6 +1329,7 @@ public class RECIPES_Machines { o_Fermenter, o_Distillery, o_Extractor, GregtechItemList.Industrial_MultiMachine.get(1)); } + //Wireless Chargers RecipeUtils.addShapedGregtechRecipe( CI.emitter_LV, CI.circuitTier1, CI.emitter_LV, diff --git a/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java index 8e25b4e485..ed1cbe0c64 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java @@ -588,7 +588,7 @@ public class FluidUtils { FluidStack aFStack4 = (FluidUtils.getFluidStack(aFluidName, 1)); FluidStack aFStack5 = (FluidUtils.getFluidStack("liquid_"+aFluidName.toLowerCase(), 1)); FluidStack aFStack6 = (FluidUtils.getFluidStack("liquid"+"."+aFluidName.toLowerCase(), 1)); - return aFStack1 == null && aFStack2 == null && aFStack3 == null && aFStack4 == null && aFStack5 == null && aFStack6 == null; + return aFStack1 != null || aFStack2 != null || aFStack3 != null || aFStack4 != null || aFStack5 != null || aFStack6 != null; } public static FluidStack getWildcardFluidStack(String aFluidName, int amount) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java index 6060554db7..4c7ea6d05d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java @@ -174,5 +174,9 @@ public interface IGregtech_RecipeAdder { public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu); - + public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); + + public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); + + public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 81f6e9281b..bb822ec816 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -185,7 +185,7 @@ GT_MetaTileEntity_MultiBlockBase { int mPollutionReduction=0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + mPollutionReduction=Math.max(calculatePollutionReductionForHatch(tHatch, 100),mPollutionReduction); } } @@ -1252,6 +1252,22 @@ GT_MetaTileEntity_MultiBlockBase { return ""; } } + + private static Method calculatePollutionReduction; + public int calculatePollutionReductionForHatch(GT_MetaTileEntity_Hatch_Muffler i , int g) { + if (calculatePollutionReduction == null) { + try { + calculatePollutionReduction = i.getClass().getDeclaredMethod("calculatePollutionReduction", int.class); + } catch (NoSuchMethodException | SecurityException e) { + calculatePollutionReduction = null; + } + } + try { + return (int) calculatePollutionReduction.invoke(i, g); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return 0; + } + } @Override public void saveNBTData(NBTTagCompound aNBT) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java index 9ffe1258f8..88b4c7bc99 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java @@ -4,7 +4,6 @@ import java.util.HashMap; import gregtech.api.GregTech_API; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; @@ -17,8 +16,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.data.ArrayUtils; -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer.LayerBlockData; +import gtPlusPlus.core.lib.CORE; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.init.Blocks; @@ -112,18 +110,48 @@ public class MultiblockLayer { } if (canBeHatch && (aHatchTypeClass == null || aHatchTypeClass.length <= 0)){ - aHatchTypeClass = new Class[] { - GT_MetaTileEntity_Hatch_DataAccess.class, - GT_MetaTileEntity_Hatch_Dynamo.class, - GT_MetaTileEntity_Hatch_Energy.class, - GT_MetaTileEntity_Hatch_Input.class, - GT_MetaTileEntity_Hatch_InputBus.class, - GT_MetaTileEntity_Hatch_Maintenance.class, - GT_MetaTileEntity_Hatch_Muffler.class, - GT_MetaTileEntity_Hatch_Output.class, - GT_MetaTileEntity_Hatch_OutputBus.class, - GT_MetaTileEntity_Hatch.class - }; + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + aHatchTypeClass = new Class[] { + GT_MetaTileEntity_Hatch_Dynamo.class, + GT_MetaTileEntity_Hatch_Energy.class, + GT_MetaTileEntity_Hatch_Input.class, + GT_MetaTileEntity_Hatch_InputBus.class, + GT_MetaTileEntity_Hatch_Maintenance.class, + GT_MetaTileEntity_Hatch_Muffler.class, + GT_MetaTileEntity_Hatch_Output.class, + GT_MetaTileEntity_Hatch_OutputBus.class, + GT_MetaTileEntity_Hatch.class + }; + } + else { + try { + aHatchTypeClass = new Class[] { + Class.forName("gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess"), + GT_MetaTileEntity_Hatch_Dynamo.class, + GT_MetaTileEntity_Hatch_Energy.class, + GT_MetaTileEntity_Hatch_Input.class, + GT_MetaTileEntity_Hatch_InputBus.class, + GT_MetaTileEntity_Hatch_Maintenance.class, + GT_MetaTileEntity_Hatch_Muffler.class, + GT_MetaTileEntity_Hatch_Output.class, + GT_MetaTileEntity_Hatch_OutputBus.class, + GT_MetaTileEntity_Hatch.class + }; + } catch (ClassNotFoundException e) { + aHatchTypeClass = new Class[] { + GT_MetaTileEntity_Hatch_Dynamo.class, + GT_MetaTileEntity_Hatch_Energy.class, + GT_MetaTileEntity_Hatch_Input.class, + GT_MetaTileEntity_Hatch_InputBus.class, + GT_MetaTileEntity_Hatch_Maintenance.class, + GT_MetaTileEntity_Hatch_Muffler.class, + GT_MetaTileEntity_Hatch_Output.class, + GT_MetaTileEntity_Hatch_OutputBus.class, + GT_MetaTileEntity_Hatch.class + }; + } + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index e2e322f9ee..120f1aab9e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -265,34 +265,34 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32); } } - - - + + + GregtechItemList.Cover_Overflow_ULV.set(this.addItem(71, "Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_LV.set(this.addItem(72, "Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_MV.set(this.addItem(73, "Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_HV.set(this.addItem(74, "Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_EV.set(this.addItem(75, "Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_IV.set(this.addItem(76, "Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_ULV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(8)); GregTech_API.registerCover(GregtechItemList.Cover_Overflow_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(64)); GregTech_API.registerCover(GregtechItemList.Cover_Overflow_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(512)); GregTech_API.registerCover(GregtechItemList.Cover_Overflow_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(4096)); GregTech_API.registerCover(GregtechItemList.Cover_Overflow_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(32768)); GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(262144)); - - + + //Fusion Reactor MK4 Singularity GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)", new Object[0])); - GT_Values.RA.addCompressorRecipe(ItemList.FusionComputer_UV.get(9), GregtechItemList.Compressed_Fusion_Reactor.get(1), (int) GT_Values.V[7], (int) GT_Values.V[8]); + CORE.RA.addCompressorRecipe(ItemList.FusionComputer_UV.get(9), GregtechItemList.Compressed_Fusion_Reactor.get(1), (int) GT_Values.V[7], (int) GT_Values.V[8]); //NanoTubes GregtechItemList.NanoTube_Base_Substrate.set(this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes", new Object[0])); GregtechItemList.NanoTube_Finished.set(this.addItem(102, "Carbon Nanotubes", "Multi-walled Zigzag nanotubes, possibly Carbon's final form", new Object[0])); GregtechItemList.Carbyne_Tube_Finished.set(this.addItem(103, "Linear Acetylenic Carbon (LAC/Carbyne)", "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable", new Object[0])); GregtechItemList.Carbyne_Sheet_Finished.set(this.addItem(104, "Carbyne Composite Panel", "Nanotubes which contain LAC, arranged side by side and compressed further", new Object[0])); - + } private boolean registerComponents_ULV(){ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index 32c99a7bba..1d99b1c2d7 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -13,12 +13,14 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.internal.IGT_RecipeAdder; import gregtech.api.util.CustomRecipeMap; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.Recipe_GT; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.data.ArrayUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -664,7 +666,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { private static final Method mScannerTT; private static final Method[] mChemicalRecipe = new Method[3]; private static final Method mLargeChemReactor; - + static { //Get GT's RA class; @@ -678,7 +680,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { mSixSlotAssembly = ReflectionUtils.getMethod(clazz, "addAssemblerRecipe", ItemStack[].class, FluidStack.class, ItemStack.class, int.class, int.class); //Assembly Line mAssemblyLine = ReflectionUtils.getMethod(clazz, "addAssemblylineRecipe", ItemStack.class, int.class, ItemStack[].class, FluidStack[].class, ItemStack.class, int.class, int.class); - + Method T = null; if (LoadedMods.TecTech) { @@ -699,7 +701,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { T = null; } mScannerTT = T; - + mChemicalRecipe[1] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class, int.class); mChemicalRecipe[2] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class); @@ -779,7 +781,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } } } - + private boolean tryAddTecTechScannerRecipe(ItemStack aResearchItem, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int assDuration, int assEUt) { if (!LoadedMods.TecTech) { return true; @@ -788,7 +790,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { int compSec = (GT_Utility.getTier(assEUt)+1) * 16; int compMax = (GT_Utility.getTier(assEUt)+1) * 10000; - + if (mScannerTT != null) { try { return (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec, @@ -806,7 +808,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu){ return addChemicalRecipe(input1, input2, inputFluid, outputFluid, output, null, time, eu); } - + @Override public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu) { try { @@ -878,6 +880,41 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { return itemsNull && fluidsNull; } + @Override + public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { + if ((aInput1 == null) || (aOutput1 == null)) { + return false; + } + if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0)) { + return false; + } + GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); + return true; + } + + @Override + public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) { + return addBrewingRecipe(CI.getNumberedCircuit(aCircuit), aInput, aOutput, aTime, aEu, aHidden); + } + + @Override + public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) { + if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { + return false; + } + if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { + return false; + } + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aTime, aEu, 0); + if ((aHidden) && (tRecipe != null)) { + tRecipe.mHidden = true; + } + return true; + } + + + + |