question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Island coordinates load/save offset

See original GitHub issue

Island coordinates load/save offset

Island coordinates switching on each server restart

Steps to reproduce the behavior

Our test island will be 50x50 of size, in range from [0|0] to [50|50], without a single block space inbetween isles. Anyway to reproduce, it could be any island in this grid. The config options (i assume as relevant) look like (i assume as correct for this grid):

distance-between-islands: 25
protection-range: 25
start-x: 2500
start-z: 2500
offset-x: 25
offset-z: 25
island-height: 64
use-own-generator: true
sea-height: 0
max-islands: 1000

Since this is only about loading / saving existing isles, i assume any new island generation relation is off topic here. So out test island looks like this:

{
  "deleted": false,
  "uniqueId": "BSkyBlock828f2bed-4075-453a-a799-3bf66848dab9",
  "center": [
    "skyBlockMap",
    0.0,
    66.0,
    0.0,
    0.0,
    0.0
  ],
  "range": 25,
  "protectionRange": 25,
  "maxEverProtectionRange": 25,
  "world": "skyBlockMap",
  "gameMode": "BSkyBlock",
  "createdDate": 1431695107401,
  "updatedDate": 1578083770841,
  "owner": "a7ea593e-8d19-3f32-88f5-b5be926049fc",
  "members": {
    "a7ea593e-8d19-3f32-88f5-b5be926049fc": 1
  },
  "spawn": false,
  "purgeProtected": false,
  "flags": {
    "HURT_ANIMALS": 500,
    "DRAGON_EGG": 500,
    "REDSTONE": 500,
    "BUCKET": 500,
    "LOCK": 0,
    "ENDER_PEARL": 500,
    "DOOR": 500,
    "FURNACE": 500,
    "ANVIL": 500,
    "MINECART": 500,
    "FIRE_IGNITE": 500,
    "FISH_SCOOPING": 500,
    "END_PORTAL": 500,
    "BREEDING": 500,
    "HURT_VILLAGERS": 500,
    "CHALLENGES_ISLAND_PROTECTION": 0,
    "TURTLE_EGGS": 500,
    "FROST_WALKER": 500,
    "COLLECT_LAVA": 500,
    "LEAF_DECAY": 500,
    "LEVER": 500,
    "ELYTRA": 0,
    "CAKE": 500,
    "HURT_MONSTERS": 0,
    "RIDING": 500,
    "ARMOR_STAND": 500,
    "NAME_TAG": 500,
    "FIRE_SPREAD": 0,
    "TRADING": 0,
    "EGGS": 500,
    "ITEM_DROP": 0,
    "PVP_OVERWORLD": -1,
    "NOTE_BLOCK": 0,
    "TNT_DAMAGE": 500,
    "FLINT_AND_STEEL": 500,
    "NETHER_PORTAL": 500,
    "LECTERN": 500,
    "CROP_TRAMPLE": 500,
    "ITEM_PICKUP": 0,
    "DROPPER": 500,
    "BREWING": 500,
    "TNT_PRIMING": 500,
    "PVP_END": -1,
    "COLLECT_WATER": 500,
    "BUTTON": 500,
    "FIRE_EXTINGUISH": 500,
    "COMMAND_RANKS": 500,
    "BEACON": 500,
    "TRAPDOOR": 500,
    "EXPERIENCE_BOTTLE_THROWING": 500,
    "PRESSURE_PLATE": 0,
    "DYE": 500,
    "ITEM_FRAME": 500,
    "PLACE_BLOCKS": 500,
    "CRAFTING": 0,
    "ENCHANTING": 0,
    "SHEARING": 500,
    "BOAT": 500,
    "SPAWN_EGGS": 500,
    "BED": 500,
    "PVP_NETHER": -1,
    "MILKING": 0,
    "MONSTER_SPAWN": 0,
    "DISPENSER": 500,
    "GATE": 0,
    "FIRE_BURNING": 500,
    "EXPERIENCE_PICKUP": 500,
    "HOPPER": 500,
    "ANIMAL_SPAWN": 0,
    "LEASH": 500,
    "MOUNT_INVENTORY": 500,
    "BREAK_BLOCKS": 500,
    "CHORUS_FRUIT": 500,
    "CONTAINER": 500,
    "JUKEBOX": 500,
    "POTION_THROWING": 500
  },
  "history": [],
  "levelHandicap": 0,
  "spawnPoint": {
    "NORMAL": [
      "skyBlockMap",
      25.0,
      66.0,
      25.0,
      0.0,
      0.0
    ]
  },
  "doNotLoad": false,
  "cooldowns": {}
}

Expected behavior

After first server startup, we check the protection area of the isle for this player. If you use the JSON above, it’s the offline UUID for name Michel_0. If your testserver is in online mode, you’ll need to change the UUID above to yours or my online UUID… i guess you understand. It simply can be checked by the console command bsbadmin info Michel_0. Output will be (at least for me):

[15:22:58] [Server thread/INFO]: ========== Island Info ============
[15:22:58] [Server thread/INFO]: UUID: BSkyBlock828f2bed-4075-453a-a799-3bf66848dab9
[15:22:58] [Server thread/INFO]: Owner: Michel_0 (a7ea593e-8d19-3f32-88f5-b5be926049fc)
[15:22:58] [Server thread/INFO]: Last login: Sun Jan 05 00:39:52 CET 2020
[15:22:58] [Server thread/INFO]: Deaths: 0
[15:22:58] [Server thread/INFO]: Resets: 0 (Max: 2)
[15:22:58] [Server thread/INFO]: Team members:
[15:22:58] [Server thread/INFO]: Michel_0 MemorySection[path='bskyblock', root='YamlConfiguration']
[15:22:58] [Server thread/INFO]: Island location: 25,66,25
[15:22:58] [Server thread/INFO]: Island coordinates: 0,0,0 to 49,256,49
[15:22:58] [Server thread/INFO]: Protection range: 25
[15:22:58] [Server thread/INFO]: Largest historical protection range: 25
[15:22:58] [Server thread/INFO]: Protection coordinates: 0,0,0 to 49,256,49

As it is correct and i “expect to be always like that”. But it isn’t. Stop the server and you’ll see the JSON has been changed. It contains now [25|25] as center coordinate. So start the server again and run bsbadmin info Michel_0 again. It’s now (at least for me):

[15:23:58] [Server thread/INFO]: ========== Island Info ============
[15:23:58] [Server thread/INFO]: UUID: BSkyBlock828f2bed-4075-453a-a799-3bf66848dab9
[15:23:58] [Server thread/INFO]: Owner: Michel_0 (a7ea593e-8d19-3f32-88f5-b5be926049fc)
[15:23:58] [Server thread/INFO]: Last login: Sun Jan 05 00:39:52 CET 2020
[15:23:58] [Server thread/INFO]: Deaths: 0
[15:23:58] [Server thread/INFO]: Resets: 0 (Max: 2)
[15:23:58] [Server thread/INFO]: Team members:
[15:23:58] [Server thread/INFO]: Michel_0 MemorySection[path='bskyblock', root='YamlConfiguration']
[15:23:58] [Server thread/INFO]: Island location: 0,66,0
[15:23:58] [Server thread/INFO]: Island coordinates: -25,0,-25 to 24,256,24
[15:23:58] [Server thread/INFO]: Protection range: 25
[15:23:58] [Server thread/INFO]: Largest historical protection range: 25
[15:23:58] [Server thread/INFO]: Protection coordinates: -25,0,-25 to 24,256,24

Which is wrong. Now stop the server and you’ll see the center coordinates has been changed back to [0|0]. So start the server again and run bsbadmin info Michel_0 and you’ll see it’s correct again. Stop it, JSON changes, start it, it’s wrong, stop it, JSON changes, start it, it’s correct… infinite. Each second start will be with incorrect coordinates. If i didn’t miss something obvious, i would say it’s a major bug, since it’s about island protection and you can’t expect server owners to restart a server twice on each restart, can you?

Screenshots and videos (Optional)

No screenshots necessary i guess. Console output has been posted as text above (i don’t like screenshots from console, prefer text directly).

Environment

BentoBox Version (Mandatory)
[16:09:35] [Server thread/INFO]: Running SPIGOT 1.15.1.
[16:09:35] [Server thread/INFO]: BentoBox version: 1.10.0
[16:09:35] [Server thread/INFO]: Database: JSON
[16:09:35] [Server thread/INFO]: Loaded Game Worlds:
[16:09:35] [Server thread/INFO]: skyBlockMap (BSkyBlock): Overworld, Nether, End
[16:09:35] [Server thread/INFO]: Loaded Addons:
[16:09:35] [Server thread/INFO]: BSkyBlock 1.9.0 (ENABLED)
[16:09:35] [Server thread/INFO]: Challenges 0.8.0 (ENABLED)
[16:09:35] [Server thread/INFO]: Level 1.9.0 (ENABLED)

Plugins (Optional)

[16:10:08] [Server thread/INFO]: Plugins (12): CoreProtect, PermissionsEx, WorldEdit, OldMcstats, Vault, BlockLocker, WorldGuard, ChestShop, BentoBox, Essentials, EssentialsSpawn, EssentialsChat

Additional context (Optional)

Nope.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Michel-0commented, Jan 11, 2020

Can confirm commit#90ad75baa94c7b1dcfc68c1316bb9bd60def82f8 seems to have it fixed, tested with 1.11b1567. Our SkyBlock 1.15.1 is now closer than ever… getting into challenges now.

1reaction
Michel-0commented, Jan 7, 2020

Thanks for your effort so far, i really hope you will find out why. Otherwise i won’t be able to switch over to BSkyBlock, because i already got many player isles with this grid in my world and didn’t find an other way to declare such a 50x50 grid starting at [0|0]. Setting start-x & start-z to 2525 instead of 2000 (apply the offset to start directly) doesn’t work either since the grid seems to get validated independent to the start. Really would like to use BSkyBlock, because it seems as best for me compared with others. Keep up the good work guys…

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to add an offset value to a geographical coordinate
I have a geographical coordinate points such as latitude : 12.920257 longitude : 77.620677. How can i add 4 meters to the east...
Read more >
Lost Island map. Latitude off by 5 degrees? : r/playark - Reddit
It's possible. When you bake a map things can get offset. Prob be easier to adjust the gps rather than the entire map...
Read more >
Intentionally offset GPS coordinates using heading [closed]
Is there a known way of intentionally offsetting a latitude/longitude position by using a combination of the latitude/longitude and heading?
Read more >
Eos Tools Pro: How to Compute Datum Offset Values
Select the “type of coordinates” to be Latitude, Longitude, Height and enter the values as specified (space between the numbers and no “-“...
Read more >
3 Methods for Offset Mapping with Laser Rangefinders
More mapping/data collection solutions continue to integrate Laser Tech's TruPulse® rangefinders as tools for gathering offset coordinates ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found