2015-08-29 14:33:25 +02:00
|
|
|
/*
|
|
|
|
* This file ("CompatUtil.java") is part of the Actually Additions Mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-01-03 16:05:51 +01:00
|
|
|
* http://ellpeck.de/actaddlicense/
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-01-02 02:16:11 +01:00
|
|
|
* © 2016 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.util;
|
2015-06-28 03:12:32 +02:00
|
|
|
|
2016-01-10 01:17:17 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.items.base.ItemSeed;
|
2015-06-28 03:12:32 +02:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
2016-01-07 18:20:59 +01:00
|
|
|
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
2015-06-28 03:12:32 +02:00
|
|
|
|
|
|
|
public class CompatUtil{
|
|
|
|
|
|
|
|
public static void registerMFRPlant(Block block){
|
|
|
|
FMLInterModComms.sendMessage("MineFactoryReloaded", "registerHarvestable_Crop", new ItemStack(block, 1, 7));
|
|
|
|
|
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
2016-01-08 08:10:55 +01:00
|
|
|
compound.setString("plant", block.getRegistryName());
|
2015-06-28 03:12:32 +02:00
|
|
|
FMLInterModComms.sendMessage("MineFactoryReloaded", "registerFertilizable_Crop", compound);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void registerMFRSeed(Item item){
|
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
2016-01-08 08:10:55 +01:00
|
|
|
compound.setString("seed", item.getRegistryName());
|
|
|
|
compound.setString("crop", ((ItemSeed)item).plant.getRegistryName());
|
2015-06-28 03:12:32 +02:00
|
|
|
FMLInterModComms.sendMessage("MineFactoryReloaded", "registerPlantable_Crop", compound);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|