What is the most efficient method of protecting an area?

Discussion in 'Plugin Development' started by Captain Dory, Jan 19, 2015.

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

    Captain Dory

    Hi there,

    I am currently working on protecting parts of my world, and was wondering if anyone had any experience with this? This is my current plan (making a traditional prison):
    Have no breaking in the main world except for specific areas
    Allow breaking in the 'free' world except for specific areas.

    So what I need is an efficient way to get a region and allow or disable breaking in that selection. I know how to get 2 points and make a list of locations, but what I was looking for is how to efficiently store a medium sized area.

    TL;DR: efficiently store a list<location> pls
  2. Offline


    @Captain Dory I believe the best way is to use the Vector#isInAABB method.
    Konato_K likes this.
  3. Offline


    @Captain Dory If you ask me, @Skionz is right.

    And I would store a region by 2 "locations" (I put locations in quotes, as it would be easier to store a Vector or an Integer array)

    But you could group your regions into trees. (Just google for collision grouping or similiar)
Thread Status:
Not open for further replies.

Share This Page