Unwanted delayed reappliance of velocity

Discussion in 'Plugin Development' started by needspeed10, Dec 30, 2012.

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

    needspeed10

    When I use,
    Code:
    item.setVelocity(VECTOR);//VECTOR is any vector; item is an Itementity (org.bukkit.entity.Item) 
    the item gets accelerated till it stops finally. So far so good.
    After a few seconds (with a chance of ~70%) the item gets accelerated again in a direction, which is pretty similar to the old one, but not exactly the same length (random).
    I do not repeat this line anywhere else. I even tried to to test it with this:
    Code:
    org.bukkit.entity.Item item = ((org.bukkit.entity.Player) sender).getWorld().dropItem(((org.bukkit.entity.Player) sender).getLocation(), new ItemStack(Material.SLIME_BALL));
            item.setVelocity(new Vector(1,0,1)); 
    This is called, when I use a command, so it should be pretty good isolated and ensured not to execute anything else.
    I would like to know, why this is keeping happening. (Maybe this new effects of items?)
    It's at the moment annoying, because if you are using an Itementity as ball, it gets uncontrolled due to this effect.

    Edit: It seems, it is not a new applied velocity, but an interrupt. This means: The enitity interrupts while being accelerated and then reaches its location, where it was originally ment to be. However i am still not able to fix this and slowly start doubting it's my fault.
     
  2. Offline

    needspeed10

    CB version: git-Bukkit-1.4.6-R0.3-1-gd92dbbe-b2587jnks (MC: 1.4.6)
     
Thread Status:
Not open for further replies.

Share This Page