Set facing direction of a head

Discussion in 'Plugin Development' started by Metal Julien, Nov 9, 2012.

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

    Metal Julien

    Hi, how do you set the facing direction of a head, with that i Don't mean the 4 east west north south, I mean the 12 possible directions :)

    Metal_Julien
     
  2. What do you have?
    If you use a Skull object it's just setFacingDirection(BlockFace) so you can just get one of the 12 BlockFaces...
     
  3. Offline

    break2471

    Are we talking about all the points on a compass rose? In that case just face opisite the direction you want the head in. Example: Face SW To get the head to point NE or Player faces East to get the head to face West.
     
  4. Offline

    Metal Julien

    Thx, but how can I set cast a block to a skull?

    Code:
    Skull h = (Skull) t.getBlock();
            h.setFacingDirection(BlockFace.NORTH_NORTH_EAST);
    doesn't work, cannot cast Craftblock to skull :S

    The error appears in the console, not in eclipse.

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

    ChrisixStudios


    You need to use (Skull) t.getBlock().getState().getData();
     
Thread Status:
Not open for further replies.

Share This Page