Floating Item Entity?

Discussion in 'Plugin Development' started by ibWill, Nov 14, 2014.

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

    ibWill

    Hello, I was wondering if anyone had any idea on how to make a dropped item entity float 2 blocks in the air and just bob there?

    I have tried making the location of the entity update on loop, on the player moving, etc. Does anyone have any idea? I want to make the block move with a player also.
     
  2. Offline

    Skionz

    Use invisible wither skulls. Wither skulls turn invisible when their velocity is set to 0.
     
  3. Offline

    ibWill

    I want it to be colored wool blocks
     
  4. Offline

    Skionz

    Then create an Item and set the passenger of the wither skull to the Item.
     
  5. Offline

    ibWill

    Oh ok, ill try that

    I spawn a wither skull but it blows up as soon as it spawns

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
  6. Offline

    Skionz

    ibWill Did you set its velocity to 0?
     
  7. Offline

    ibWill


    Code:java
    1. skull = (WitherSkull) p.getWorld().spawnEntity(p.getLocation(), EntityType.WITHER_SKULL);
    2. skull.setVelocity(new Vector(0,0,0));


    Skionz It Still creates an explosion

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
  8. Offline

    Skionz

  9. Offline

    ibWill

    Skionz Thanks, but when i add a witherskull, i can see it for a split second
     
Thread Status:
Not open for further replies.

Share This Page