[SOLVED] TARDIS plugin - help needed with iron doors

Discussion in 'Plugin Development' started by eccentric_nz, Jul 9, 2012.

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

    eccentric_nz

    I have a TARDIS plugin currently in development, and yes, it's bigger on the inside.

    My problem is that I am programmatically creating a blue police box, firstly by listening for a BlockPlaceEvent (stack an iron block, a lapis block and a redstone torch on top of each other to create a TARDIS). This part works fine :).

    The player can then enter the TARDIS by right-clicking on the TARDIS door. Once inside they can dial up a random destination and time travel (teleport) to it. This is also working OKish.

    When the player exits the TARDIS to the new location the blue box needs to be re-created at the new location, which it does, BUT: the door is no longer attached to the police box.

    The same method is used to create and recreate the blue box, so why is this happening?

    Here's a video to show the plugin in action:


    The source code is here: https://github.com/eccentricdevotion/TARDIS
    And the plugin JAR is here: https://dl.dropbox.com/u/53758864/TARDIS-1.0.jar - use at your own risk!
     
  2. Offline

    Lolmewn

    You might want to set the byte data, if not doing that already. Byte data tells the door which way it's facing basically, maybe the default data tells it to pop off.
     
  3. Offline

    eccentric_nz

    Yep, already setting door data bit. The blue box always faces the same direction as it was created in so the byte data shouldn't change?

    At one stage I was also creating the TARDIS via a command, and the same thing was happening. It looked as though the door was placed first, before all the other blocks. It would pop off and then the other blocks would appear.

    Okay solved, changed the order of construction for the blue police box, building bottom to top, and all the corners are placed first, then the door is placed. In certain directions the door must have been placed before the wall was created.

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

Share This Page