Package vazkii.botania.common.entity

Examples of vazkii.botania.common.entity.EntitySignalFlare


        player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 6000, 0));
      break;
    }
    case 12 : { // Flare
      if(!player.worldObj.isRemote) {
        EntitySignalFlare flare = new EntitySignalFlare(player.worldObj);
        flare.setPosition(player.posX, player.posY, player.posZ);
        flare.setColor(player.worldObj.rand.nextInt(16));
        player.worldObj.playSoundAtEntity(player, "random.explode", 40F, (1.0F + (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);

        player.worldObj.spawnEntityInWorld(flare);

        int range = 5;
View Full Code Here


  public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
    if(par1ItemStack.getItemDamage() == 0) {
      if(par2World.isRemote)
        par3EntityPlayer.swingItem();
      else {
        EntitySignalFlare flare = new EntitySignalFlare(par2World);
        flare.setPosition(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ);
        flare.setColor(getColor(par1ItemStack));
        par2World.playSoundAtEntity(par3EntityPlayer, "random.explode", 40F, (1.0F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.2F) * 0.7F);

        par2World.spawnEntityInWorld(flare);

        int range = 5;
View Full Code Here

TOP

Related Classes of vazkii.botania.common.entity.EntitySignalFlare

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.