ItemFrame direction

Discussion in 'Plugin Development' started by Nogtail, Dec 14, 2013.

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

    Nogtail

    I have not had internet for the past few days and have been trying to set the facing direction of an item frame but with no luck ( I have been using setFacingDirection). It has been returning no errors but just doesn't appear to be doing anything. I have written countless debug messages to be sure it's not another bit of the plugin but still can't find what I'm doing wrong.

    Just tried a few things and it appears if you relog sometimes they will appear to be facing the right way but are hanging in the air then will break.

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

    Blingdaddy1

    Yeah, the hanging in the air then breaking happens, I think I've even seen it in Vanilla Minecraft, I think it's something you can't fix.
     
  3. Offline

    Nogtail

    Is there any way of spawning an item frame with a direction as setting the direction once it is spawned seems to be massively buggy for me and I'm still not sure what I'm doing wrong.

    bump

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

    Nogtail

  5. Offline

    LucasEmanuel

    Spawning ItemFrame's and other hanging entities is very buggy. The way to do it is to spawn them inside the block you want to hang them on, then teleport them to the correct location, then rotate them according to the BlockFace you want them to and make sure you set "force" to true when rotating. :)

    EDIT:
    Here is an example where I do it:
    https://github.com/Chilinot/Surviva...valgamesmultiverse/misc/LoggedEntity.java#L79
     
  6. Offline

    Nogtail

    I tried that and it seems to work to some extent, the slight problem is that you can't see any changes until a relog and the frame appears to be clipping inside a block until it breaks.

    LucasEmanuel Managed to get it creating frames in the right places but still need to relog or leave the chunks to see any changes, is this a Minecraft limitation or is there a way to refresh entities or something.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
Thread Status:
Not open for further replies.

Share This Page