Solved How to set ShulkerBullet Velocity

Discussion in 'Spigot Plugin Development' started by TheGamerPlayz, Jun 2, 2016.

  1. I am trying to set a ShulkerBullet's velocity, but it appears ShulkerBullet's aren't changing their velocity. I am using this.
    Code (Text):
    I know that it getting the bullet because it is setting the target correctly. Does anyone know a good technique on setting ShulkerBullet's velocity?
  2. I don't know of an easy way to do this. You could extend a random non-shulker bullet entity, and make it look like a shulker bullet by giving the correct info in the EntityTypes class.

    this is a small tutorial about custom entities
  3. Tried disabling the AI?
  4. I do not think ShulkerBullet's AI can be removed and I think making a custom entity is beyond me and would not work for this situation as the target is always changing
  5. Ok I found the problem. When a target is set it nullifies the velocity of the ShulkerBullet. Now the only problem is that it is affected by gravity
  6. ^If you need to also disable gravity, either you'll need to tweak the entity velocity every tick or you can instead use a custom entity and just code it to not have gravity.
  7. Just did it and Its working very nicely. Thanks
  8. Please mark this thread as solved