Solved Create smoothly spinning head

Discussion in 'Spigot Plugin Development' started by NyanGuyMF, Mar 31, 2020.

  1. I saw how some plugins are creating smoothly spinning blocks and recently found DeathChest plugin with the spinning head above the chest.
    I've spent nearly an hour googling some stuff like spawning material effect or particle, but found nothing. Now I think that it may be a custom Entity, but I really have no idea how to spawn it.

    So how can I program some spinning materials like block or player's head?
     
  2. It's likely an invisible armor stand (w/ a visible block on the head) that is rotating it's angle at a constant rate.
    Hopefully this helps!
     
  3. When you teleport a player, you can also add pitch and yaw. You can change this at a constant rate to make it look like it is spinning.

    Pseudocode:
    List<ArmourStand> ArmourStands
    for(ArmourStand aS in ArmourStands)
    atNextTick
    aS.setYaw(aS.getYa()+1)
     
  4. Thanks, I thought about an armored stand. I'll try it and post my results here.

    UPD: yep, that was armor stand. Now I'm using Holograms plugin in order to create both holographic messages and spinning items.
     
    #4 NyanGuyMF, Mar 31, 2020
    Last edited: Apr 5, 2020