From 8f4856c9af0e6218275161607ecf0b34b443060d Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Thu, 12 Sep 2013 03:44:15 -0400 Subject: [PATCH] addition of blacklisting alloy and nether molten fluids in mystcraft ages via IMC NBT formatted messages --- src/tconstruct/common/TContent.java | 3 ++- .../compat/mystcraft/MystImcHandler.java | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/tconstruct/compat/mystcraft/MystImcHandler.java diff --git a/src/tconstruct/common/TContent.java b/src/tconstruct/common/TContent.java index c26e468c840..dbc8da7a692 100644 --- a/src/tconstruct/common/TContent.java +++ b/src/tconstruct/common/TContent.java @@ -93,6 +93,7 @@ import tconstruct.blocks.traps.BarricadeBlock; import tconstruct.blocks.traps.Punji; import tconstruct.client.StepSoundSlime; +import tconstruct.compat.mystcraft.MystImcHandler; import tconstruct.entity.Automaton; import tconstruct.entity.BlueSlime; import tconstruct.entity.Crystal; @@ -2030,7 +2031,7 @@ public void intermodCommunication() FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerry, 1, 15)); FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerrySecond, 1, 12)); FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerrySecond, 1, 13)); - + MystImcHandler.blacklistFluids(); /* FORESTRY * Edit these strings to change what items are added to the backpacks * Format info: "[backpack ID]@[item ID].[metadata or *]:[next item]" and so on diff --git a/src/tconstruct/compat/mystcraft/MystImcHandler.java b/src/tconstruct/compat/mystcraft/MystImcHandler.java new file mode 100644 index 00000000000..452ce481030 --- /dev/null +++ b/src/tconstruct/compat/mystcraft/MystImcHandler.java @@ -0,0 +1,26 @@ +package tconstruct.compat.mystcraft; + +import net.minecraftforge.fluids.FluidStack; +import cpw.mods.fml.common.event.FMLInterModComms; +import net.minecraft.nbt.NBTTagCompound; +import tconstruct.common.TContent; +public class MystImcHandler { +public static String[] FluidBlackList = new String[]{"moltenInvar", "moltenElectrum", "moltenBronze","moltenAluminumBrass","moltenManyullyn","MoltenAlumite", "moltenCobalt","moltenArdite"};// = new String[](); + + public static void blacklistFluids(){ + for(String nm: FluidBlackList){ + // check if exists?? + SendFluidIMCBLMsg(nm); + } + } + public static void SendFluidIMCBLMsg(String FluidName){ + NBTTagCompound NBTMsg = new NBTTagCompound(); + NBTMsg.setCompoundTag("fluidsymbol",new NBTTagCompound()); + NBTMsg.getCompoundTag("fluidsymbol").setFloat("rarity", 0.0F); + NBTMsg.getCompoundTag("fluidsymbol").setFloat("grammarweight", 0.0F); + NBTMsg.getCompoundTag("fluidsymbol").setFloat("instabilityPerBlock ", 10000F);// renders creative symbol useless + NBTMsg.getCompoundTag("fluidsymbol").setString("fluidname", FluidName); + FMLInterModComms.sendMessage("Mystcraft", "fluidsymbol", NBTMsg); + } + +} \ No newline at end of file