Search in sources :

Example 1 with BaublesCompatHandler

use of ladysnake.gaspunk.compat.BaublesCompatHandler in project Gaspunk by Ladysnake.

the class CommonProxy method init.

public void init() {
    PacketHandler.initPackets();
    if (GasPunkConfig.alternativeAshRecipe)
        GameRegistry.addSmelting(Items.NETHER_WART, new ItemStack(ModItems.ASH), 0.8f);
    else
        GameRegistry.addSmelting(Items.ROTTEN_FLESH, new ItemStack(ModItems.ASH), 0.35f);
    if (Loader.isModLoaded("baubles"))
        MinecraftForge.EVENT_BUS.register(new BaublesCompatHandler());
    new Thread(SpecialRewardChecker::retrieveSpecialRewards).start();
    BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(ModItems.GRENADE, new BehaviorProjectileDispense() {

        @Nonnull
        @Override
        protected IProjectile getProjectileEntity(@Nonnull World worldIn, @Nonnull IPosition position, @Nonnull ItemStack stackIn) {
            EntityGrenade grenade = new EntityGrenade(worldIn);
            grenade.setItem(stackIn);
            return grenade;
        }
    });
}
Also used : IPosition(net.minecraft.dispenser.IPosition) BehaviorProjectileDispense(net.minecraft.dispenser.BehaviorProjectileDispense) Nonnull(javax.annotation.Nonnull) EntityGrenade(ladysnake.gaspunk.entity.EntityGrenade) ItemStack(net.minecraft.item.ItemStack) World(net.minecraft.world.World) BaublesCompatHandler(ladysnake.gaspunk.compat.BaublesCompatHandler) IProjectile(net.minecraft.entity.IProjectile)

Aggregations

Nonnull (javax.annotation.Nonnull)1 BaublesCompatHandler (ladysnake.gaspunk.compat.BaublesCompatHandler)1 EntityGrenade (ladysnake.gaspunk.entity.EntityGrenade)1 BehaviorProjectileDispense (net.minecraft.dispenser.BehaviorProjectileDispense)1 IPosition (net.minecraft.dispenser.IPosition)1 IProjectile (net.minecraft.entity.IProjectile)1 ItemStack (net.minecraft.item.ItemStack)1 World (net.minecraft.world.World)1