Positioning a dispenser and making a sign stick onto it.

Discussion in 'Plugin Development' started by olimoli123, May 1, 2012.

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

    olimoli123

    Hey guys, this is what i have so far.. but
    http://pastebin.com/q8SfTZLt
    Basically it generates the dispenser somewhere random at the moment.. but, something is not right.
    It does not position behind the sign as i want it to.
    Any ideas how i can fix this?
    I also want to add something to make the sign stick to the dispenser.
    Any help would be appreciated, thanks.
     
  2. Offline

    olimoli123

    So would i just use an if statement for these to check if they are valid? Is that the easiest way?
     
  3. olimoli123 No. Instead of
    b.setType(Material.DISPENSER)
    use
    b.setTypeIdAndData(Material.DISPENSER.getId(), dataValue, true);
    where dataValue is the data value as a byte matching the direction the dispenser should face to.
    If you want to rotate the sign so it sticks to the dispenser change it's data value, too.
     
  4. Offline

    -_Husky_-

    Making a RP plugin i see ;3 seems much like my "Roleplay" plugin
     
  5. Offline

    olimoli123

    Nice, didnt really answer my question though.

    Thanks :)

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

Share This Page