Civcraft / PrisonPearl

Minecraft plugin for civcraft which allows players to imprison other players inside ender pearls
BSD 3-Clause "New" or "Revised" License
4 stars 16 forks source link

World Border Chest Enforcement #49

Closed Cathonic closed 8 years ago

Cathonic commented 9 years ago

Some chests/locations are incorrectly identified as being beyond world border and are unable to store pearls after the 1.8 update. Prior to 1.8 they could and did successfully hold pearls.

An example is this chest: http://imgur.com/fd2uGXh,lN8Bk1a,TgtInvU#2 . It can be stood on fully or to the side of it and prior to 1.8 it held pearls without problem. Now it gives the warning message and frees pearls held in it.

rourke750 commented 9 years ago

We check through world border whether a chest is past world border or not. Before we just did our own range calculation which wasnt as accurate as it didn't reflect the actual border.

erocs commented 9 years ago

@ttk2 Currently we only check the chest's location to see if it is in WB. Maybe this should be a little more extensive. Shall we switch to checking the four north / south / east / west adjacent blocks (not the chest itself) and if two of those are within the border the chest is considered to be within the border?

 X
XCX
 X
ttk2 commented 9 years ago

we could do that, so this is now asking WB if the block is inside the border? how does it define that?

On Thu, May 28, 2015 at 10:53 AM erocs notifications@github.com wrote:

@ttk2 https://github.com/ttk2 Currently we only check the chest's location to see if it is in WB. Maybe this should be a little more extensive. Shall we switch to checking the four north / south / east / west adjacent blocks (not the chest itself) and if two of those are within the border the chest is considered to be within the border?

X XcX X

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106437845 .

erocs commented 9 years ago

Checks the center of the block against the calculated circle at radius from the center of the map. that means if a chest's center position is just outside WB the chest can't contain pearls. Doing this check would be closer to the stated rules and would give a little leeway in this scenario.

On Thu, May 28, 2015 at 4:52 PM, ttk2 notifications@github.com wrote:

we could do that, so this is now asking WB if the block is inside the border? how does it define that?

On Thu, May 28, 2015 at 10:53 AM erocs notifications@github.com wrote:

@ttk2 https://github.com/ttk2 Currently we only check the chest's location to see if it is in WB. Maybe this should be a little more extensive. Shall we switch to checking the four north / south / east / west adjacent blocks (not the chest itself) and if two of those are within the border the chest is considered to be within the border?

X XcX X

— Reply to this email directly or view it on GitHub < https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106437845> .

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106631185 .

ttk2 commented 9 years ago

So then it sounds like we can leave it.

On Thu, May 28, 2015, 7:07 PM erocs notifications@github.com wrote:

Checks the center of the block against the calculated circle at radius from the center of the map. that means if a chest's center position is just outside WB the chest can't contain pearls. Doing this check would be closer to the stated rules and would give a little leeway in this scenario.

On Thu, May 28, 2015 at 4:52 PM, ttk2 notifications@github.com wrote:

we could do that, so this is now asking WB if the block is inside the border? how does it define that?

On Thu, May 28, 2015 at 10:53 AM erocs notifications@github.com wrote:

@ttk2 https://github.com/ttk2 Currently we only check the chest's location to see if it is in WB. Maybe this should be a little more extensive. Shall we switch to checking the four north / south / east / west adjacent blocks (not the chest itself) and if two of those are within the border the chest is considered to be within the border?

X XcX X

— Reply to this email directly or view it on GitHub < https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106437845

.

— Reply to this email directly or view it on GitHub < https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106631185> .

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106635373 .

erocs commented 9 years ago

So keep the current behavior and not change to the two adjacent block check?

ttk2 commented 9 years ago

I would say yes, its good enough and easy enough to explain.

On Thu, May 28, 2015 at 7:31 PM erocs notifications@github.com wrote:

So keep the current behavior and not change to the two adjacent block check?

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-106640397 .

Cathonic commented 9 years ago

Well leaving it as is isn't a very good solution. There's clearly some disagreement between the world border plugin and your calculation as people can walk down a tunnel on that line without being teleported. If a chest is beyond world border then people should not be able to stand on it. If people can stand on the chest it should not be beyond world border. The two plugins should agree.

Obviously I'm upset because this change renders a 2500 diamond layer of our vault useless - we have to keep it there to stop people tunnelling, as it isn't beyond world border, but it no longer adds any layers to the vault as it's now behind the chest.

ttk2 commented 9 years ago

if its being calculated the way described here you should not be able to stand behind the chest correct?

On Sat, May 30, 2015 at 4:40 AM Cathonic notifications@github.com wrote:

Well leaving it as is isn't a very good solution. There's clearly some disagreement between the world border plugin and your calculation as people can walk down a tunnel on that line without being teleported. If a chest is beyond world border then people should not be able to stand on it. If people can stand on the chest it should not be beyond world border. The two plugins should agree.

Obviously I'm upset because this change renders a 2500 diamond layer of our vault useless - we have to keep it there to stop people tunnelling, as it isn't beyond world border, but it no longer adds any layers to the vault as it's now behind the chest.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-107017004 .

erocs commented 9 years ago

The problem is people don't understand where to stand on it. If they stood directly in the center of the block they would have an accurate measurement. Nobody can do that though.

Cathonic commented 9 years ago

if its being calculated the way described here you should not be able to stand behind the chest correct?

If I move the chest away from world border one block (east, the only direction it can be moved and allow pearl storage) then I can stand behind the chest - in fact I can stand on every side. If the chest is in it's original spot (as pictured) I cannot stand behind it - but I can stand to the south and east of it, and on top.

ttk2 commented 9 years ago

hmm, that's the official rule, I wonder then why so few chests had trouble during the upgrade.

On Sat, May 30, 2015 at 11:33 AM Cathonic notifications@github.com wrote:

if its being calculated the way described here you should not be able to stand behind the chest correct?

If I move the chest away from world border one block (east, the only direction it can be moved and allow pearl storage) then I can stand behind the chest - in fact I can stand on every side. If the chest is in it's original spot (as pictured) I cannot stand behind it - but I can stand to the south and east of it, and on top.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-107059940 .

Cathonic commented 9 years ago

So are you keeping the plugin as it is?

ttk2 commented 9 years ago

Still not sure, if it does not match previously described behavior then we should change it, but if its hard to get it to match that behavior well we should change the rule rather than do somthing hacky that could screw up later .

On Mon, Jun 1, 2015 at 6:56 AM Cathonic notifications@github.com wrote:

So are you keeping the plugin as it is?

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/49#issuecomment-107415350 .