diff options
author | draknyte1 <draknyte1@hotmail.com> | 2017-02-28 21:43:53 +1000 |
---|---|---|
committer | draknyte1 <draknyte1@hotmail.com> | 2017-02-28 21:43:53 +1000 |
commit | 70eaed84ca2fe532f0417d11923096abe0ccbb69 (patch) | |
tree | 26eb1d5bf01bea9b0398f11676037da425c3e9c0 /src | |
parent | ed6f2e50902a72e55b452e0e3fb9cd72b427d157 (diff) | |
download | GT5-Unofficial-70eaed84ca2fe532f0417d11923096abe0ccbb69.tar.gz GT5-Unofficial-70eaed84ca2fe532f0417d11923096abe0ccbb69.tar.bz2 GT5-Unofficial-70eaed84ca2fe532f0417d11923096abe0ccbb69.zip |
^ Version Bump.
$ Fixed GT:NH compatibility not working.
% Tweaked Fluorite drop function.
Diffstat (limited to 'src')
8 files changed, 46 insertions, 32 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 5d91ecc694..79e943d9bd 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -31,7 +31,7 @@ import cpw.mods.fml.common.event.*; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -@Mod(modid=CORE.MODID, name=CORE.name, version=CORE.VERSION, dependencies="required-after:Forge; after:PlayerAPI; after:IC2; after:ihl; after:psychedelicraft; after:gregtech; after:Forestry; after:MagicBees; after:CoFHCore; after:Growthcraft; after:Railcraft; after:CompactWindmills; after:ForbiddenMagic; after:MorePlanet; after:PneumaticCraft; after:ExtraUtilities; after:Thaumcraft; after:rftools; after:simplyjetpacks; after:BigReactors; after:EnderIO;") +@Mod(modid=CORE.MODID, name=CORE.name, version=CORE.VERSION, dependencies="required-after:Forge; after:PlayerAPI; after:dreamcraft; after:IC2; after:ihl; after:psychedelicraft; after:gregtech; after:Forestry; after:MagicBees; after:CoFHCore; after:Growthcraft; after:Railcraft; after:CompactWindmills; after:ForbiddenMagic; after:MorePlanet; after:PneumaticCraft; after:ExtraUtilities; after:Thaumcraft; after:rftools; after:simplyjetpacks; after:BigReactors; after:EnderIO;") public class GTplusplus implements ActionListener { diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java index 340af36ee4..ee334845cb 100644 --- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java @@ -59,14 +59,14 @@ public class BlockEventHandler { } }*/ } - - + + @SubscribeEvent public void onBlockBreak(BlockEvent.BreakEvent event) { - + } - + ArrayList<ItemStack> oreLimestone = OreDictionary.getOres("oreLimestone"); ArrayList<ItemStack> blockLimestone = OreDictionary.getOres("limestone"); @@ -106,33 +106,33 @@ public class BlockEventHandler { Utils.LOG_WARNING("invalid chance"); } } - + //Spawns Fluorite from Lime Stone if (chanceToDropFluoriteOre != 0){ - if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()){ - if (!oreLimestone.isEmpty()) - for (ItemStack temp : oreLimestone){ - if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) { - if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){ - event.drops.add(fluoriteOre.copy()); + if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()){ + if (!oreLimestone.isEmpty()) + for (ItemStack temp : oreLimestone){ + if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) { + if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){ + event.drops.add(fluoriteOre.copy()); + } + } } - } - } - if (!oreLimestone.isEmpty()) - for (ItemStack temp : blockLimestone){ - if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) { - if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){ - event.drops.add(fluoriteOre.copy()); + if (!blockLimestone.isEmpty()) + for (ItemStack temp : blockLimestone){ + if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) { + if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){ + event.drops.add(fluoriteOre.copy()); + } } } + } + if (event.block == Blocks.sandstone){ + if (MathUtils.randInt(1, chanceToDropFluoriteOre*20) == 1){ + event.drops.add(fluoriteOre.copy()); } - } - if (event.block == Blocks.sandstone){ - if (MathUtils.randInt(1, chanceToDropFluoriteOre*20) == 1){ - event.drops.add(fluoriteOre.copy()); } } - } } @SubscribeEvent diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java index 03fdbdb435..2f7352c257 100644 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ b/src/Java/gtPlusPlus/core/lib/CORE.java @@ -27,7 +27,7 @@ public class CORE { public static final String name = "GT++"; public static final String MODID = "miscutils"; - public static final String VERSION = "1.4.9.66-alpha"; + public static final String VERSION = "1.4.9.70-alpha"; public static final String MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase(); public static boolean isModUpToDate = Utils.isModUpToDate(); public static boolean DEBUG = false; @@ -47,9 +47,8 @@ public class CORE { public static final String GT_Tooltip_Radioactive = EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.GREEN+"Radioactive! "+EnumChatFormatting.GOLD+" Avoid direct handling without hazmat protection."; public static final String noItem = ""; - public static boolean isNewHorizonsLoaded = LoadedMods.DreamCraft; //Because I want to be lazy. - public static boolean GTNH = isNewHorizonsLoaded; + public static boolean GTNH = false; /** * A List containing all the Materials, which are somehow in use by GT and therefor receive a specific Set of Items. diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java index 158038d420..8d606f2c1a 100644 --- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java +++ b/src/Java/gtPlusPlus/core/lib/LoadedMods.java @@ -4,6 +4,9 @@ import gtPlusPlus.core.lib.CORE.configSwitches; import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechTextures; import gtPlusPlus.xmod.gregtech.recipes.GregtechRecipeAdder; + +import static gtPlusPlus.core.lib.CORE.GTNH; + import cpw.mods.fml.common.Loader; public class LoadedMods { @@ -67,6 +70,7 @@ public class LoadedMods { if (Loader.isModLoaded("dreamcraft") == true){ DreamCraft = true; + GTNH = true; Utils.LOG_INFO("Components enabled for: DreamCraft"); Utils.LOG_INFO("Components enabled for: GT: New Horizons"); totalMods++; diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index c788ad2ee8..296b3d4199 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -1,7 +1,5 @@ package gtPlusPlus.core.recipe; -import static gtPlusPlus.core.lib.CORE.GTNH; - import gregtech.api.enums.*; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; @@ -630,7 +628,8 @@ public class RECIPES_Machines { //Tiered Tanks - if (!GTNH){ + Utils.LOG_INFO("Is New Horizons Loaded? "+CORE.GTNH); + if (!CORE.GTNH){ RecipeUtils.addShapedGregtechRecipe( plateTier1, plateTier1, plateTier1, plateTier1, pipeTier1, plateTier1, @@ -697,6 +696,13 @@ public class RECIPES_Machines { plateTier6 = "plateAluminium"; pipeTier6 = "pipeMediumSteel"; + Utils.LOG_INFO("Loading New Horizon Tanks, with custom recipes."); + Utils.LOG_INFO("Using "+plateTier1+" with "+pipeTier1); + Utils.LOG_INFO("Using "+plateTier2+" with "+pipeTier2); + Utils.LOG_INFO("Using "+plateTier3+" with "+pipeTier3); + Utils.LOG_INFO("Using "+plateTier4+" with "+pipeTier4); + Utils.LOG_INFO("Using "+plateTier5+" with "+pipeTier5); + Utils.LOG_INFO("Using "+plateTier6+" with "+pipeTier6); RecipeUtils.addShapedGregtechRecipe( plateTier1, plateTier1, plateTier1, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java index defe3f680c..e26f630604 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.loaders; import gregtech.api.util.GT_ModHandler; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; @@ -60,7 +61,7 @@ public class RecipeGen_ShapedCrafting implements Runnable{ //Ring Recipe if (!material.isRadioactive){ - if (CORE.GTNH){ + if (LoadedMods.DreamCraft){ if (RecipeUtils.recipeBuilder( "craftingToolHardHammer", null, null, "craftingToolFile", material.getRod(1), null, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java index a9740c01f7..b71cf7e84a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java @@ -19,6 +19,10 @@ public class GregtechTieredFluidTanks private static void run1() { int ID = 817; + Utils.LOG_INFO("Is New Horizons Loaded? "+CORE.GTNH); + if (CORE.GTNH){ + Utils.LOG_INFO("Only loading ULV-IV tier tanks for New Horizons Modpack."); + } GregtechItemList.GT_FluidTank_ULV.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.00", "Ultra Low Voltage Fluid Tank", 0).getStackForm(1L)); GregtechItemList.GT_FluidTank_LV.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.01", "Low Voltage Fluid Tank", 1).getStackForm(1L)); GregtechItemList.GT_FluidTank_MV.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.02", "Medium Voltage Fluid Tank", 2).getStackForm(1L)); diff --git a/src/resources/mcmod.info b/src/resources/mcmod.info index 8b766c7287..dcd6a20395 100644 --- a/src/resources/mcmod.info +++ b/src/resources/mcmod.info @@ -5,7 +5,7 @@ "description": "Adds a few various Multiblocks, Machines, etc to Gregtech and a plethora of other mods (Nearly 30!)", "credits": "", "logoFile": "", - "version": "1.4.9.66-alpha", + "version": "1.4.9.70-alpha", "mcversion": "1.7.10", "url": "https://github.com/draknyte1/GTplusplus/wiki", "updateUrl": "https://github.com/draknyte1/GTplusplus/releases/latest", |