Pathfinders for Falling Blocks

Discussion in 'Spigot Plugin Development' started by ProSl3nderMan, May 26, 2016.

  1. Hey, is it possible to do a custom entity for falling blocks and then make a pathfinder? Or is it only possible to move them with vectors?
     
  2. What is your goal? Obviously you can set the velocity of a falling block (its an entity), but making it a living entity would probably be somewhat hard.
     
  3. My goal is to make a falling block replace sheep in a remade game of snake in mineplex.
     
  4. Well you can't use minecraft's pathfinders (You're not using a EntityInsentient), but you could easily create your own and run them on the base tick.

    Also i'm not sure if a moving falling block will play nice with the client. I'd imagine the client also does some calculations such as physics and such. You could mount it on top of an armorstand though.
     
  5. I played around with trying to disable gravity for falling blocks long ago (when I was still new to Bukkit development).
    I didn't find a way to disable gravity as the "animation" for falling blocks seems to be done client-side(?), so even if you disable the gravity code for falling blocks in the server code, the client will still try to display the falling block animation, resulting in strange behavior. (client thinks a physical block is somewhere but the server hasn't told it about it, yadda yadda)
     
  6. Hm, I was quite sure this was how Mineplex did their Magma tail thing:
    [​IMG]
    Anyone know how they did this?
     
  7. Probably blocks in invisible minecarts or something.
     
  8. I'm guessing you put blocks in minecarts with something like minecart.setPassenger(block)?
     
  9. Most likely. I haven't experimented much with it myself.
     
  10. Armor stands could work if you put the block on their head.
     
  11. This blocks is not armorstand also it is not falling block. I am not sure what is it but my calculations say it is minnecart. Falling block do not have block rotation (it looks terrible do not use it). Armorstand with block on head is so smaller. Also that can be some kind of custom entity attached to another entity.