Disabling Velocity

Discussion in 'Plugin Development' started by ibWill, Oct 23, 2013.

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

    ibWill

    How would i make it so when i do world.dropItem(location, ItemStack), the item stays in the location, and doesn't fall?
     
  2. Offline

    Briggybros

    Try scheduling a synchronous event for every tick, setting the objects velocity to 0
     
  3. Offline

    maxben34

    Could you further explain what you are using this for? I may have another way for you to do this depending on the scenario.
     
  4. Offline

    ibWill

    maxben34

    Well i need to make a row of floating wool, but when i drop the item with dropItem(), i need to be able to stop it from falling to the ground

    Briggybros
    What method would i use? because when i set velocity to 0 nothing changes

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

    maxben34

    ibWill How about you just make invisible blocks (with worldedit and do .//set 54 ) and put the entities on top of them. Then make them respawn every 5 minutes (so they are back everytime they go away)
     
  6. Offline

    ibWill

    maxben34
    Well there is one thing i forgot, I have to stack 2 rows, the second the next block above, but i can't do that with invisible blocks
     
  7. Offline

    Chinwe

    You might have to teleport the item to the same location instead of setting its velocity to 0, like item.teleport(locationWhereYouWantItToStay);
     
  8. Offline

    ibWill

    Chinwe
    I know there is some way to play with the velocity to do this, but i can't figure it out
     
  9. Offline

    maxben34

    ibWill You'll have to do a teleport on the item entity. Use an event that can recognize when an entity is despawned(or create a custom one) and then when the event gets triggered it will count replace the entity and teleport it to the correct location. I don't think you can make it float by changing it's velocity, since floating item entities are impossible unless you teleport them every .5 seconds or something like that.
     
Thread Status:
Not open for further replies.

Share This Page