Store 2D region

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

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


    Storing 3D regions is easy but are there any simple ways to store a region that can only be 2D?
  2. Offline


    What's the problem? If you can store 3D you probably can do it with 2D...
  3. Offline


    Store the 3D region, then only look at the x & z coordinates since I assume you want to look from the top down :)
  4. Offline


    I want to store locations for item frames actually, for top down it would be easy by just storing x and z coordinates but when you are storing "walls" it gets a little complex.

    I guess there is just no obvious way to do this? I could just use a 3D region and throw an exception if a region that isn't 2D is used.

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


    Umm.. would think the opposite..
  6. Offline


    I don't really understand the connection between storing a region and storing the location of an item frame.
  7. Offline


    Basically I'm making an API to make "displays" and they need a region to create one and it would be a lot nicer to only have a 2D region instead of assuming that devs have only allowed a 2D region.
  8. Offline


    Are you trying to store the coordinates of an item frame block? Nogtail
  9. Offline


    I'm trying to store the coordinates of the blocks the item frame hangs on, currently I'm storing a 3D region which works fine and throws an exception if a region that is not 2D is used but it would be nicer if you could only have a 2D region.
  10. Offline


    Just use a 3D region and save the BlockFace for the item frames along side with it. :)

    Also if you are going to spawn item frames, currently spawning them is really dodgy. I figured out a way to get it to work some time ago, you can take a look at it here. :)
  11. Offline


    That's what I'm currently doing, what I was wanting to do with a 2D region was minimise the code a developer has to use to get the display created (not have to check for a 2D region).
Thread Status:
Not open for further replies.

Share This Page