Skip to content

Commit

Permalink
addition of blacklisting alloy and nether molten fluids in mystcraft …
Browse files Browse the repository at this point in the history
…ages via IMC NBT formatted messages
  • Loading branch information
progwml6 committed Sep 12, 2013
1 parent 511f96d commit 8f4856c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tconstruct/common/TContent.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions 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);
}

}

0 comments on commit 8f4856c

Please sign in to comment.