本文整理汇总了Java中cpw.mods.fml.common.event.FMLInterModComms.sendMessage方法的典型用法代码示例。如果您正苦于以下问题:Java FMLInterModComms.sendMessage方法的具体用法?Java FMLInterModComms.sendMessage怎么用?Java FMLInterModComms.sendMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cpw.mods.fml.common.event.FMLInterModComms
的用法示例。
在下文中一共展示了FMLInterModComms.sendMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addSmelter
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addSmelter(int energy, final ItemStack a, final ItemStack b, final ItemStack output, final ItemStack altOutput, final int prob) {
if (a == null || b == null || output == null) {
return;
}
if (energy <= 0) {
energy = 4000;
}
final NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("energy", energy);
tag.setTag("primaryInput", (NBTBase)getItemStackNBT(a));
tag.setTag("secondaryInput", (NBTBase)getItemStackNBT(b));
tag.setTag("primaryOutput", (NBTBase)getItemStackNBT(output));
if (altOutput != null) {
tag.setTag("secondaryOutput", (NBTBase)getItemStackNBT(altOutput));
tag.setInteger("secondaryChance", prob);
}
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", tag);
}
示例2: addSmelterRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
NBTTagCompound data = new NBTTagCompound();
data.setInteger("energy", energy);
NBTTagCompound input1Compound = new NBTTagCompound();
primaryInput.writeToNBT(input1Compound);
data.setTag("primaryInput", input1Compound);
NBTTagCompound input2Compound = new NBTTagCompound();
secondaryInput.writeToNBT(input2Compound);
data.setTag("secondaryInput", input2Compound);
NBTTagCompound output1Compound = new NBTTagCompound();
primaryOutput.writeToNBT(output1Compound);
data.setTag("primaryOutput", output1Compound);
if (secondaryOutput != null) {
NBTTagCompound output2Compound = new NBTTagCompound();
secondaryOutput.writeToNBT(output2Compound);
data.setTag("secondaryOutput", output2Compound);
data.setInteger("secondaryChance", secondaryChance);
}
boolean bool = FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", data);
if (bool) recipies++;
}
示例3: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@Mod.EventHandler
public static void init(FMLInitializationEvent event)
{
if (Loader.isModLoaded("NotEnoughItems"))
{
try
{
System.out.println("Registering NEI comp.");
codechicken.nei.NEIModContainer.plugins.add(new NEIToggleConfig());
} catch (Exception ignored)
{
}
}
MinecraftForge.EVENT_BUS.register(new EventHandler());
proxy.registerRenderer();
FMLInterModComms.sendRuntimeMessage(ModInfo.MOD_ID, "VersionChecker", "addVersionCheck", "http://mrspring.dk/mods/tb/versions.json");
FMLInterModComms.sendMessage("tb", "register", "dk.mrspring.toggle.comp.vanilla.ToggleRegistryCallback.register");
FMLInterModComms.sendMessage("Waila", "register", "dk.mrspring.toggle.comp.waila.WailaCompatibility.callbackRegister");
Recipes.register();
}
示例4: addPulverizerRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
if (input == null || primaryOutput == null) {
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("primaryOutput", new NBTTagCompound());
if (secondaryOutput != null) {
toSend.setTag("secondaryOutput", new NBTTagCompound());
}
input.writeToNBT(toSend.getCompoundTag("input"));
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
if (secondaryOutput != null) {
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
toSend.setInteger("secondaryChance", secondaryChance);
}
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
}
示例5: addPulverizerRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
if (input == null || primaryOutput == null) {
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("primaryOutput", new NBTTagCompound());
if (secondaryOutput != null) {
toSend.setTag("secondaryOutput", new NBTTagCompound());
}
input.writeToNBT(toSend.getCompoundTag("input"));
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
if (secondaryOutput != null) {
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
toSend.setInteger("secondaryChance", secondaryChance);
}
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
}
示例6: addTransposerExtract
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {
if (input == null || output == null || fluid == null) {
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("output", new NBTTagCompound());
toSend.setTag("fluid", new NBTTagCompound());
input.writeToNBT(toSend.getCompoundTag("input"));
output.writeToNBT(toSend.getCompoundTag("output"));
toSend.setBoolean("reversible", reversible);
toSend.setInteger("chance", chance);
fluid.writeToNBT(toSend.getCompoundTag("fluid"));
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
}
示例7: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public void init() {
WIIEMC.config.initEvent();
Logger.logInfo("Beware the flower pots...they will confuse you and ambush you...");
if (Loader.isModLoaded("EE3")) {
FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.ee3.BlockEMCDataProvider.callbackRegister");
FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.ee3.EntityEMCDataProvider.callbackRegister");
FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.ee3.TileEMCDataProvider.callbackRegister");
MinecraftForge.EVENT_BUS.register(new EventHandler());
}
if (Loader.isModLoaded("ProjectE")) {
FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.projecte.BlockEMCDataProvider.callbackRegister");
FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.projecte.EntityEMCDataProvider.callbackRegister");
FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.projecte.TileEMCDataProvider.callbackRegister");
}
if (Loader.isModLoaded("simplecondenser"))
Logger.logInfo("Aww...I feel all special now...");
if (Loader.isModLoaded("EE3") && Loader.isModLoaded("ProjectE"))
Logger.logError("Greedy little fella, aren't ya?");
}
示例8: addTransposerFill
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {
if (input == null || output == null || fluid == null) {
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("output", new NBTTagCompound());
toSend.setTag("fluid", new NBTTagCompound());
input.writeToNBT(toSend.getCompoundTag("input"));
output.writeToNBT(toSend.getCompoundTag("output"));
toSend.setBoolean("reversible", reversible);
fluid.writeToNBT(toSend.getCompoundTag("fluid"));
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
}
示例9: addFurnaceRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
/**
* MACHINES
*/
/* Furnace */
public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {
if (input == null || output == null) {
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("output", new NBTTagCompound());
input.writeToNBT(toSend.getCompoundTag("input"));
output.writeToNBT(toSend.getCompoundTag("output"));
FMLInterModComms.sendMessage("ThermalExpansion", "FurnaceRecipe", toSend);
}
示例10: registerMicroMaterials
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public void registerMicroMaterials()
{
for(int i = 0; i < 16; i++)
{
MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.PlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.PlasticBlock, i));
MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.GlowPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.GlowPlasticBlock, i));
MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.SlickPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.SlickPlasticBlock, i));
MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.ReinforcedPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.ReinforcedPlasticBlock, i));
MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.RoadPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.RoadPlasticBlock, i));
FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.BasicBlock, 1, i));
if(!MachineType.get(MACHINE_BLOCK_1, i).hasModel)
{
FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.MachineBlock, 1, i));
}
if(!MachineType.get(MACHINE_BLOCK_2, i).hasModel)
{
FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.MachineBlock2, 1, i));
}
}
FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.BasicBlock2, 1, 0));
FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.CardboardBox));
}
示例11: addSmelterRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addSmelterRecipe (int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance)
{
if (primaryInput == null || secondaryInput == null || primaryOutput == null || secondaryOutput == null)
{
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("primaryInput", new NBTTagCompound());
toSend.setTag("secondaryInput", new NBTTagCompound());
toSend.setTag("primaryOutput", new NBTTagCompound());
toSend.setTag("secondaryOutput", new NBTTagCompound());
primaryInput.writeToNBT(toSend.getCompoundTag("primaryInput"));
secondaryInput.writeToNBT(toSend.getCompoundTag("secondaryInput"));
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
toSend.setInteger("secondaryChance", secondaryChance);
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", toSend);
}
示例12: sendSimpleImcRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
private void sendSimpleImcRecipe(String recipeKey, ItemStack input, Gas gasType, ItemStack output) {
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound nbtInput = new NBTTagCompound();
input.writeToNBT(nbtInput);
msg.setTag("input", nbtInput);
if (gasType != null) {
NBTTagCompound nbtGasType = new NBTTagCompound();
gasType.write(nbtGasType);
msg.setTag("gasType", nbtGasType);
}
NBTTagCompound nbtOutput = new NBTTagCompound();
output.writeToNBT(nbtOutput);
msg.setTag("output", nbtOutput);
FMLInterModComms.sendMessage(this._modID, recipeKey, msg);
}
示例13: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@Override
public void init() {
if (!this.isLoaded())
return;
ArrayList<String> axeList = OreAxe.getAxeList();
if (!axeList.isEmpty())
{
String axes = "";
for (String axeName : axeList) {
axes += ";" + References.MOD_ID + ":" + axeName;
}
NBTTagCompound msg = new NBTTagCompound();
msg.setString("modID", References.MOD_ID);
msg.setString("axeIDList", axes);
FMLInterModComms.sendMessage(this._modID, "ThirdPartyModConfig", msg);
OresPlus.log.debug("Sent axe registration for " + axes);
}
}
示例14: addSawmillRecipe
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addSawmillRecipe (int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance)
{
if (input == null || primaryOutput == null || secondaryOutput == null)
{
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("primaryOutput", new NBTTagCompound());
toSend.setTag("secondaryOutput", new NBTTagCompound());
input.writeToNBT(toSend.getCompoundTag("input"));
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
toSend.setInteger("secondaryChance", secondaryChance);
FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
}
示例15: addTransposerFill
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setCompoundTag("input", new NBTTagCompound());
toSend.setCompoundTag("output", new NBTTagCompound());
toSend.setCompoundTag("fluid", new NBTTagCompound());
input.writeToNBT(toSend.getCompoundTag("input"));
output.writeToNBT(toSend.getCompoundTag("output"));
toSend.setBoolean("reversible", reversible);
fluid.writeToNBT(toSend.getCompoundTag("fluid"));
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
}