ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/util/Util.java

25 lines
863 B
Java
Raw Normal View History

2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.util;
import cpw.mods.fml.common.FMLCommonHandler;
2015-07-01 21:32:48 +02:00
import net.minecraft.block.BlockDispenser;
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
@SuppressWarnings("unused")
2014-12-20 21:34:07 +01:00
public class Util{
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
public static void registerEvent(Object o){
MinecraftForge.EVENT_BUS.register(o);
2015-03-31 20:37:55 +02:00
FMLCommonHandler.instance().bus().register(o);
}
2015-07-01 21:32:48 +02:00
public static void registerDispenserHandler(Item item, BehaviorDefaultDispenseItem handler){
if(BlockDispenser.dispenseBehaviorRegistry.getObject(item) == null){
BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler);
}
}
}