From cea067c6133bdaff59d096d716b054a4abd81b93 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 24 Jun 2016 01:08:26 +0200 Subject: [PATCH] More superfuel fixes --- src/main/java/gregtech/common/GT_Proxy.java | 8 ++++---- .../postload/GT_MachineRecipeLoader.java | 20 +++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index aee7b3d5..cd803aa1 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1596,11 +1596,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { if ((aFuel == null) || (aFuel.getItem() == null)) { return 0; } - short rFuelValue = 0; + int rFuelValue = 0; if ((aFuel.getItem() instanceof GT_MetaGenerated_Item)) { Short tFuelValue = (Short) ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get(Short.valueOf((short) aFuel.getItemDamage())); if (tFuelValue != null) { - rFuelValue = (short) Math.max(rFuelValue, tFuelValue.shortValue()); + rFuelValue = Math.max(rFuelValue, tFuelValue.shortValue()); } } NBTTagCompound tNBT = aFuel.getTagCompound(); @@ -1747,10 +1747,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { rFuelValue = (short) Math.max(rFuelValue, 600); } if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) { - rFuelValue = (short) Math.max(rFuelValue, 100000); + rFuelValue = Math.max(rFuelValue, 100000); } if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) { - rFuelValue = (short) Math.max(rFuelValue, 150000); + rFuelValue = Math.max(rFuelValue, 150000); } return rFuelValue; } diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index f30a835a..8a014eff 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -136,14 +136,18 @@ public class GT_MachineRecipeLoader GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(2, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedFire, 1L), null, null, Materials.Mercury.getFluid(50), null, ItemList.MSFMixture.get(2, new Object[]{}), 100, 64); GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(2, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedOrder, 1L), null, null, Materials.Mercury.getFluid(50), null, ItemList.MSFMixture.get(2, new Object[]{}), 100, 64); GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(2, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedWater, 1L), null, null, Materials.Mercury.getFluid(50), null, ItemList.MSFMixture.get(2, new Object[]{}), 100, 64); - - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedAir, 1L), null, null, FluidRegistry.getFluidStack("fluiddeath", 10), null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedEarth, 1L), null, null, FluidRegistry.getFluidStack("fluiddeath", 10), null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedEntropy, 1L), null, null, FluidRegistry.getFluidStack("fluiddeath", 10), null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedFire, 1L), null, null, FluidRegistry.getFluidStack("fluiddeath", 10), null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedOrder, 1L), null, null, FluidRegistry.getFluidStack("fluiddeath", 10), null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedWater, 1L), null, null, FluidRegistry.getFluidStack("fluiddeath", 10), null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); - + + if(Loader.isModLoaded("Thaumcraft")){ + FluidStack tFD = FluidRegistry.getFluidStack("fluiddeath", 10); + if(tFD!=null&&tFD.getFluid()!=null&&tFD.amount>0){ + + GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedAir, 1L), null, null,tFD , null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); + GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedEarth, 1L), null, null, tFD, null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); + GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedEntropy, 1L), null, null, tFD, null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); + GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedFire, 1L), null, null, tFD, null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); + GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedOrder, 1L), null, null, tFD, null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); + GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(8, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.InfusedWater, 1L), null, null, tFD, null, ItemList.MSFMixture.get(8, new Object[]{}), 100, 64); + }} GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block,Materials.Lignite,1), ItemList.SFMixture.get(6, new Object[]{}), null, null, Materials.NitroFuel.getFluid(1000), null, ItemList.Block_SSFUEL.get(1, new Object[]{}), 120, 96); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block,Materials.Charcoal,1), ItemList.SFMixture.get(4, new Object[]{}), null, null, Materials.NitroFuel.getFluid(800), null, ItemList.Block_SSFUEL.get(1, new Object[]{}), 120, 96);