Create a Door at Location !☢

Discussion in 'Plugin Development' started by Muod, Nov 13, 2013.

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

    Muod

    How would I create a door at a location?
    I need it to face south, also its a wooden door!
    I also need to know how to do this with a bed!

    I've tried to find this almost everywhere! I looked on the
    javadocs,
    http://www.minecraftforum.net/topic/1177934-worldsetblocki-2-j-k-4-355-bed-crashes-game/,
    and googled it in many different ways!
    I really need to know this! If you can figure this out please help! I need a way to set a door and a bed at a location!
    PLEASE HELP!!
     
  2. Offline

    Milkywayz

  3. Offline

    Muod

  4. Offline

    Milkywayz

    http://pastebin.com/A09P825q

    Again, just googling until I find a viable answer. Credit to whoever posted that code to paste bin.
     
  5. Offline

    Muod

    Didnt work.
     
  6. Offline

    NinjaWAffles

    What didn't work? I took the exact code from Milkywayz and it works perfectly. Can you post your code?
     
  7. Offline

    Milkywayz

    The EXACT code should not work, it's someone else's implementation of what you're trying to accomplish. You do not simply copy and paste and expect it to work, the paste bin code was meant to help you resolve the problem, not do the entire thing for you.
     
  8. Offline

    Muod

    Obviously it's not EXACT.
    Something like this, i used the door code and kind of implimented it in
    Block bottom = world.getBlockAt(x2,y1,z);
    Block top = bottom.getRelative(BlockFace.UP, 1);
    Byte data1 = (0x8); //not sure on this syntax...
    Byte data2 = (0x4); //not sure on this syntax...
    top.setTypeIdAndData(64, data1, true);
    bottom.setTypeIdAndData(64, data2, true);
    Except i chagned the data and the BlockFace to north and changed 64 to bed block.
    NinjaWAffles
     
Thread Status:
Not open for further replies.

Share This Page