Cannot instantiate the type EntityArrow

Discussion in 'Plugin Development' started by chunkaymonkay, Jan 4, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    chunkaymonkay

    cannot instantiate the type EntityArrow

    The method b(NBTTagCompound) in the type EntityArrow is not applicable for the arguments (double)

    Code:
        @Override
        public void a(EntityLiving entityliving, float f)
        {
            EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.getDifficulty().a() * 4));
    
            entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.getDifficulty().a() * 0.11F));
           
            // CraftBukkit start
            org.bukkit.event.entity.EntityShootBowEvent event = CraftEventFactory.callEntityShootBowEvent(this, this.getEquipment(EnumItemSlot.MAINHAND), entityarrow, 0.8F);
            if (event.isCancelled())
            {
                event.getProjectile().remove();
                return;
            }
           
            if (event.getProjectile() == entityarrow.getBukkitEntity())
            {
                world.addEntity(entityarrow);
            }
           
            this.makeSound("random.bow", 1.0F, 1.0F / (new Random().nextFloat() * 0.4F + 0.8F));
        }
    and..

    I also need help with this

    Code:
    int skelly_type = ((CraftSkeleton) e).getHandle().getSkeletonType();
    The method getSkeletonType() is undefined for the type EntitySkeletonAbstract
     
    Last edited: Jan 4, 2017
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    chunkaymonkay

  4. Offline

    timtower Administrator Administrator Moderator

  5. Offline

    chunkaymonkay

    @timtower

    I'm sorry I don't understand what you mean but I need it for a plugin
     
  6. Offline

    Zombie_Striker

    Instead of providing a double for b, provide an NBTTag that contains the double.

    Are you sure the getSkeletonType method exists? What update are you building this for (1.11 changed the way skeleton types work)
     
  7. Offline

    timtower Administrator Administrator Moderator

    @chunkaymonkay What is the end goal that you are trying to achieve?
     
  8. Offline

    chunkaymonkay

Thread Status:
Not open for further replies.

Share This Page