diff --git a/commons/src/main/java/net/swofty/commons/ServerType.java b/commons/src/main/java/net/swofty/commons/ServerType.java index 98f83b61b9..2c935b7f68 100644 --- a/commons/src/main/java/net/swofty/commons/ServerType.java +++ b/commons/src/main/java/net/swofty/commons/ServerType.java @@ -18,6 +18,8 @@ public enum ServerType { SKYBLOCK_GALATEA(true), SKYBLOCK_BACKWATER_BAYOU(true), SKYBLOCK_JERRYS_WORKSHOP(true), + SKYBLOCK_LOTUS_ATOLL(true), + SKYBLOCK_SAFARI(true), PROTOTYPE_LOBBY(false), BEDWARS_LOBBY(false), BEDWARS_GAME(false), diff --git a/commons/src/main/java/net/swofty/commons/config/YamlConfigLoader.java b/commons/src/main/java/net/swofty/commons/config/YamlConfigLoader.java new file mode 100644 index 0000000000..26953832f6 --- /dev/null +++ b/commons/src/main/java/net/swofty/commons/config/YamlConfigLoader.java @@ -0,0 +1,70 @@ +package net.swofty.commons.config; + +import de.exlll.configlib.NameFormatters; +import de.exlll.configlib.YamlConfigurationProperties; +import de.exlll.configlib.YamlConfigurations; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.nio.file.AtomicMoveNotSupportedException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; + +public final class YamlConfigLoader { + private static final YamlConfigurationProperties PROPERTIES = YamlConfigurationProperties.newBuilder() + .setNameFormatter(NameFormatters.IDENTITY) + .charset(StandardCharsets.UTF_8) + .build(); + + private YamlConfigLoader() { + } + + public static T load(Path location, Class resourceOwner, String resource, Class configurationType) { + try (InputStream source = openSource(location, resourceOwner, resource)) { + return YamlConfigurations.read(source, configurationType, PROPERTIES); + } catch (IOException exception) { + throw new IllegalStateException("Unable to read YAML configuration " + location, exception); + } + } + + public static void save(Path location, Class configurationType, T configuration) { + Path target = location.toAbsolutePath(); + Path temporary = null; + try { + Path directory = target.getParent(); + Files.createDirectories(directory); + temporary = Files.createTempFile(directory, target.getFileName().toString(), ".tmp"); + YamlConfigurations.save(temporary, configurationType, configuration, PROPERTIES); + try { + Files.move(temporary, target, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); + } catch (AtomicMoveNotSupportedException exception) { + Files.move(temporary, target, StandardCopyOption.REPLACE_EXISTING); + } + temporary = null; + } catch (IOException exception) { + throw new IllegalStateException("Unable to write YAML configuration " + location, exception); + } finally { + if (temporary != null) { + try { + Files.deleteIfExists(temporary); + } catch (IOException ignored) { + } + } + } + } + + private static InputStream openSource(Path location, Class resourceOwner, String resource) throws IOException { + if (Files.isRegularFile(location)) { + return Files.newInputStream(location); + } + + InputStream source = resourceOwner.getResourceAsStream(resource); + if (source == null) { + throw new FileNotFoundException(location.toString()); + } + return source; + } +} diff --git a/configuration/mongo-init.sh b/configuration/mongo-init.sh deleted file mode 100644 index 201b66e744..0000000000 --- a/configuration/mongo-init.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo "Importing regions..." -mongoimport --db Minestom --collection regions --type csv --ignoreBlanks --headerline --file /csv/skyblock/Minestom.regions.csv || echo "Failed to import regions" - -echo "Importing fairysouls..." -mongoimport --db Minestom --collection fairysouls --type csv --ignoreBlanks --headerline --file /csv/skyblock/Minestom.fairysouls.csv || echo "Failed to import fairysouls" - -echo "Importing crystals..." -mongoimport --db Minestom --collection crystals --type csv --ignoreBlanks --headerline --file /csv/skyblock/Minestom.crystals.csv || echo "Failed to import crystals" \ No newline at end of file diff --git a/configuration/skyblock/Minestom.crystals.csv b/configuration/skyblock/Minestom.crystals.csv deleted file mode 100644 index d4c4655e5d..0000000000 --- a/configuration/skyblock/Minestom.crystals.csv +++ /dev/null @@ -1,13 +0,0 @@ -_id,url,x,y,z,serverType,itemType -1,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,43.13005921622691,75.1118727240194,-122.24967766591506,HUB,WHEAT_CRYSTAL -2,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,28.31150256073339,75.48551224990652,-140.6871747405607,HUB,WHEAT_CRYSTAL -3,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,63.414336674908704,76.97180664240655,-134.42058576459584,HUB,WHEAT_CRYSTAL -4,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,73.69529306049547,79.21654074104354,-160.75138423775255,HUB,WHEAT_CRYSTAL -5,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,59.50817153963336,79.21654074104354,-182.6970617412972,HUB,WHEAT_CRYSTAL -6,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,23.69214972882618,77.72147472159656,-178.00258311237133,HUB,WHEAT_CRYSTAL -7,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,-7.1,78.1,-27.1,HUB,FLOWER_CRYSTAL -8,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,134.8683294293372,78.83531391075113,-212.77871289031293,THE_FARMING_ISLANDS,WHEAT_CRYSTAL -9,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,118.09829197561052,78.0854154409095,-221.89615973940928,THE_FARMING_ISLANDS,WHEAT_CRYSTAL -10,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,179.6704613500174,82.90219669149552,-216.48506739711638,THE_FARMING_ISLANDS,PUMPKIN_AND_MELON_CRYSTAL -11,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,168.39194062684598,90.78562053479897,-269.59782005232177,THE_FARMING_ISLANDS,POTATO_CRYSTAL -12,9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135,132.578203624726,91.16748587959599,-284.62450974516634,THE_FARMING_ISLANDS,CARROT_CRYSTAL diff --git a/configuration/skyblock/Minestom.crystals.yml b/configuration/skyblock/Minestom.crystals.yml new file mode 100644 index 0000000000..604f383d16 --- /dev/null +++ b/configuration/skyblock/Minestom.crystals.yml @@ -0,0 +1,85 @@ +crystals: + - id: 1 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 43.13005921622691 + y: 75.1118727240194 + z: -122.24967766591506 + serverType: HUB + itemType: WHEAT_CRYSTAL + - id: 2 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 28.31150256073339 + y: 75.48551224990652 + z: -140.6871747405607 + serverType: HUB + itemType: WHEAT_CRYSTAL + - id: 3 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 63.414336674908704 + y: 76.97180664240655 + z: -134.42058576459584 + serverType: HUB + itemType: WHEAT_CRYSTAL + - id: 4 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 73.69529306049547 + y: 79.21654074104354 + z: -160.75138423775255 + serverType: HUB + itemType: WHEAT_CRYSTAL + - id: 5 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 59.50817153963336 + y: 79.21654074104354 + z: -182.6970617412972 + serverType: HUB + itemType: WHEAT_CRYSTAL + - id: 6 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 23.69214972882618 + y: 77.72147472159656 + z: -178.00258311237133 + serverType: HUB + itemType: WHEAT_CRYSTAL + - id: 7 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: -7.1 + y: 78.1 + z: -27.1 + serverType: HUB + itemType: FLOWER_CRYSTAL + - id: 8 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 134.8683294293372 + y: 78.83531391075113 + z: -212.77871289031293 + serverType: THE_FARMING_ISLANDS + itemType: WHEAT_CRYSTAL + - id: 9 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 118.09829197561052 + y: 78.0854154409095 + z: -221.89615973940928 + serverType: THE_FARMING_ISLANDS + itemType: WHEAT_CRYSTAL + - id: 10 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 179.6704613500174 + y: 82.90219669149552 + z: -216.48506739711638 + serverType: THE_FARMING_ISLANDS + itemType: PUMPKIN_AND_MELON_CRYSTAL + - id: 11 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 168.39194062684598 + y: 90.78562053479897 + z: -269.59782005232177 + serverType: THE_FARMING_ISLANDS + itemType: POTATO_CRYSTAL + - id: 12 + url: 9265f96f54b78885c46e7d2f86b1c1dbfe643c6060fc7fcc9834c3e3fd595135 + x: 132.578203624726 + y: 91.16748587959599 + z: -284.62450974516634 + serverType: THE_FARMING_ISLANDS + itemType: CARROT_CRYSTAL diff --git a/configuration/skyblock/Minestom.fairysouls.csv b/configuration/skyblock/Minestom.fairysouls.csv deleted file mode 100644 index 928337c8a4..0000000000 --- a/configuration/skyblock/Minestom.fairysouls.csv +++ /dev/null @@ -1,267 +0,0 @@ -_id,zone,x,y,z -1,HUB,-3,79,-147 -2,HUB,-15,101,-76 -3,HUB,-15,87,-52 -4,HUB,8,64,-137 -5,HUB,15,82,-127 -6,HUB,12,87,-66 -7,HUB,-11,73,-164 -8,HUB,61,80,-139 -9,HUB,82,97,-139 -10,HUB,87,68,-154 -11,HUB,70,73,-106 -12,HUB,77,102,-88 -13,HUB,66,98,-60 -14,HUB,106,64,-62 -15,HUB,136,74,-105 -16,HUB,145,84,-67 -17,HUB,98,76,-29 -18,HUB,158,92,8 -19,HUB,153,64,45 -20,HUB,162,46,69 -21,HUB,147,53,88 -22,HUB,80,66,26 -23,HUB,78,109,87 -24,HUB,103,67,110 -25,HUB,132,144,114 -26,HUB,119,119,124 -27,HUB,123,68,152 -28,HUB,145,69,173 -29,HUB,82,61,196 -30,HUB,-48,117,129 -31,HUB,-52,161,73 -32,HUB,-9,188,70 -33,HUB,12,134,72 -34,HUB,-50,132,62 -35,HUB,-38,194,65 -36,HUB,-21,156,69 -37,HUB,-22,167,66 -38,HUB,-3,193,62 -39,HUB,9,104,64 -40,HUB,-56,115,58 -41,HUB,10,178,52 -42,HUB,-60,107,33 -43,HUB,18,68,-3 -44,HUB,-39,56,-11 -45,HUB,-106,85,-22 -46,HUB,-116,73,-20 -47,HUB,-166,79,93 -48,HUB,-183,80,29 -49,HUB,-191,102,109 -50,HUB,-207,100,66 -51,HUB,-152,67,123 -52,HUB,-214,103,89 -53,HUB,-229,123,84 -54,HUB,-133,74,133 -55,HUB,-233,86,84 -56,HUB,-248,74,125 -57,HUB,-245,75,149 -58,HUB,-262,102,67 -59,HUB,-259,114,85 -60,HUB,-261,56,115 -61,HUB,-195,55,153 -62,HUB,-252,132,51 -63,HUB,-260,96,48 -64,HUB,-188,79,-56 -65,HUB,-117,73,-163 -66,HUB,-127,75,-185 -67,HUB,-92,59,-138 -68,HUB,-77,74,-152 -69,HUB,-64,77,-72 -70,HUB,-34,86,-35 -71,HUB,38,67,-36 -72,HUB,36,66,-35 -73,HUB,73,59,6 -74,HUB,169,60,129 -75,HUB,45,117,94 -76,HUB,45,148,98 -77,HUB,49,77,93 -78,HUB,44,121,88 -79,HUB,41,106,101 -80,HUB,27,84,83 -81,THE_FARMING_ISLANDS,96,96,-287 -82,THE_FARMING_ISLANDS,182,99,-235 -83,THE_FARMING_ISLANDS,183,99,-305 -84,THE_FARMING_ISLANDS,126,91,-304 -85,THE_FARMING_ISLANDS,99,112,-275 -86,THE_FARMING_ISLANDS,143,90,-243 -87,THE_FARMING_ISLANDS,155,23,-204 -88,THE_FARMING_ISLANDS,111,63,-447 -89,THE_FARMING_ISLANDS,263,177,-565 -90,THE_FARMING_ISLANDS,138,72,-587 -91,THE_FARMING_ISLANDS,273,141,-467 -92,THE_FARMING_ISLANDS,387,78,-365 -93,THE_FARMING_ISLANDS,261,133,-348 -94,THE_FARMING_ISLANDS,145,77,-374 -95,THE_FARMING_ISLANDS,254,70,-493 -96,THE_FARMING_ISLANDS,193,66,-468 -97,THE_FARMING_ISLANDS,279,112,-541 -98,THE_FARMING_ISLANDS,271,56,-361 -99,THE_FARMING_ISLANDS,152,67,-361 -100,THE_FARMING_ISLANDS,150,60,-448 -101,GOLD_MINE,-47,75,-298 -102,GOLD_MINE,-62,104,-289 -103,GOLD_MINE,-37,78,-308 -104,GOLD_MINE,17,86,-312 -105,GOLD_MINE,21,36,-320 -106,GOLD_MINE,-44,100,-344 -107,GOLD_MINE,-26,94,-340 -108,GOLD_MINE,-1,80,-337 -109,GOLD_MINE,19,57,-341 -110,GOLD_MINE,-19,142,-364 -111,GOLD_MINE,-23,113,-353 -112,GOLD_MINE,-11,76,-395 -113,DEEP_CAVERNS,3,152,85 -114,DEEP_CAVERNS,18,74,74 -115,DEEP_CAVERNS,-21,25,72 -116,DEEP_CAVERNS,3,182,50 -117,DEEP_CAVERNS,0,65,57 -118,DEEP_CAVERNS,3,14,51 -119,DEEP_CAVERNS,9,170,44 -120,DEEP_CAVERNS,-60,37,52 -121,DEEP_CAVERNS,-35,127,28 -122,DEEP_CAVERNS,-18,163,26 -123,DEEP_CAVERNS,44,98,23 -124,DEEP_CAVERNS,57,161,19 -125,DEEP_CAVERNS,29,149,14 -126,DEEP_CAVERNS,-2,255,-1 -127,DEEP_CAVERNS,-40,72,0 -128,DEEP_CAVERNS,-11,102,-16 -129,DEEP_CAVERNS,-71,13,5 -130,DEEP_CAVERNS,-76,13,24 -131,DEEP_CAVERNS,-8,74,-44 -132,DEEP_CAVERNS,71,167,-12 -133,DEEP_CAVERNS,22,156,-42 -134,DWARVEN_MINES,-21,208,-59 -135,DWARVEN_MINES,-139,220,-89 -136,DWARVEN_MINES,-9,230,-135 -137,DWARVEN_MINES,155,189,123 -138,DWARVEN_MINES,34,102,86 -139,DWARVEN_MINES,133,104,104 -140,DWARVEN_MINES,22,127,184 -141,DWARVEN_MINES,-110,142,143 -142,DWARVEN_MINES,-116,142,154 -143,DWARVEN_MINES,-204,131,199 -144,DWARVEN_MINES,-53,205,50 -145,DWARVEN_MINES,20,121,240 -146,DWARVEN_MINES,-18,121,397 -147,DWARVEN_MINES,111,160,412 -148,DWARVEN_MINES,-195,124,-15 -149,SPIDERS_DEN,-279,127,-177 -150,SPIDERS_DEN,-185,135,-290 -151,SPIDERS_DEN,-147,78,-299 -152,SPIDERS_DEN,-169,62,-289 -153,SPIDERS_DEN,-297,90,-169 -154,SPIDERS_DEN,-309,63,-185 -155,SPIDERS_DEN,-309,66,-245 -156,SPIDERS_DEN,-203,169,-320 -157,SPIDERS_DEN,-222,74,-361 -158,SPIDERS_DEN,-140,85,-335 -159,SPIDERS_DEN,-198,160,-331 -160,SPIDERS_DEN,-160,62,-275 -161,SPIDERS_DEN,-301,92,-171 -162,SPIDERS_DEN,-294,36,-274 -163,SPIDERS_DEN,-204,94,-241 -164,SPIDERS_DEN,-336,82,-153 -165,SPIDERS_DEN,-422,106,-206 -166,SPIDERS_DEN,-322,95,-281 -167,SPIDERS_DEN,-336,111,-253 -168,CRIMSON_ISLE,-644,125,-689 -169,CRIMSON_ISLE,-79,139,-779 -170,CRIMSON_ISLE,-352,191,-553 -171,CRIMSON_ISLE,-717,164,-981 -172,CRIMSON_ISLE,-726,144,-891 -173,CRIMSON_ISLE,-690,122,-752 -174,CRIMSON_ISLE,-31,178,-907 -175,CRIMSON_ISLE,-297,81,-835 -176,CRIMSON_ISLE,-462,78,-698 -177,CRIMSON_ISLE,-383,71,-883 -178,CRIMSON_ISLE,-721,125,-811 -179,CRIMSON_ISLE,-480,104,-593 -180,CRIMSON_ISLE,-606,154,-800 -181,CRIMSON_ISLE,-106,89,-883 -182,CRIMSON_ISLE,-343,235,-780 -183,CRIMSON_ISLE,-500,127,-795 -184,CRIMSON_ISLE,-346,75,-552 -185,CRIMSON_ISLE,-445,110,-1026 -186,CRIMSON_ISLE,-361,133,-469 -187,CRIMSON_ISLE,-247,44,-512 -188,CRIMSON_ISLE,-380,141,-1020 -189,CRIMSON_ISLE,-310,156,-1008 -190,CRIMSON_ISLE,-412,58,-935 -191,CRIMSON_ISLE,-396,108,-764 -192,CRIMSON_ISLE,-342,101,-484 -193,CRIMSON_ISLE,-35,116,-1055 -194,CRIMSON_ISLE,-361,69,-425 -195,CRIMSON_ISLE,14,108,-769 -196,CRIMSON_ISLE,-479,114,-972 -197,THE_END,-517,100,-295 -198,THE_END,-583,208,-272 -199,THE_END,-696,116,-256 -200,THE_END,-587,122,-276 -201,THE_END,-587,48,-293 -202,THE_END,-492,21,-175 -203,THE_END,-492,81,-275 -204,THE_END,-545,92,-257 -205,THE_END,-748,106,-284 -206,THE_END,-723,75,-222 -207,THE_END,-609,84,-230 -208,THE_END,-657,36,-201 -209,THE_PARK,-315,89,-72 -210,THE_PARK,-294,85,31 -211,THE_PARK,-390,61,-6 -212,THE_PARK,-357,99,79 -213,THE_PARK,-450,113,-87 -214,THE_PARK,-471,132,-125 -215,THE_PARK,-408,122,-92 -216,THE_PARK,-454,120,-58 -217,THE_PARK,-404,136,6 -218,THE_PARK,-386,108,-69 -219,THE_PARK,-370,112,-118 -220,JERRYS_WORKSHOP,-95,77,20 -221,JERRYS_WORKSHOP,-44,87,76 -222,JERRYS_WORKSHOP,-7,108,107 -223,JERRYS_WORKSHOP,56,108,64 -224,JERRYS_WORKSHOP,74,109,-18 -225,THE_RIFT,253,123,90 -226,DUNGEON_HUB,17,124,-58 -227,DUNGEON_HUB,1,134,75 -228,DUNGEON_HUB,10,164,-10 -229,DUNGEON_HUB,-139,46,-1 -230,DUNGEON_HUB,-55,82,-10 -231,DUNGEON_HUB,-4,21,-17 -232,DUNGEON_HUB,14,60,99 -233,MISC_DUNGEONS,0,0,0 -234,MISC_DUNGEONS,0,0,0 -235,MISC_DUNGEONS,0,0,0 -236,MISC_DUNGEONS,0,0,0 -237,MISC_DUNGEONS,0,0,0 -238,MISC_DUNGEONS,0,0,0 -239,MISC_DUNGEONS,0,0,0 -240,MISC_DUNGEONS,0,0,0 -241,MISC_DUNGEONS,0,0,0 -242,MISC_FISHING,0,0,0 -243,MISC_FISHING,0,0,0 -244,MISC_FISHING,0,0,0 -245,MISC_FISHING,0,0,0 -246,MISC_GARDEN,0,0,0 -247,MISC_GARDEN,0,0,0 -248,MISC_PLACEABLE,0,0,0 -249,MISC_GLACITE_MINESHAFTS,0,0,0 -250,BACKWATER_BAYOU,33,61,-41 -251,BACKWATER_BAYOU,62,76,5 -252,BACKWATER_BAYOU,16,59,-7 -253,BACKWATER_BAYOU,72,115,-12 -254,BACKWATER_BAYOU,2,67,10 -255,GALATEA,-601,128,-20 -256,GALATEA,-565,95,17 -257,GALATEA,-556,94,60 -258,GALATEA,-598,107,16 -259,GALATEA,-586,90,-26 -260,GALATEA,-620,66,32 -261,GALATEA,-663,64,62 -262,GALATEA,-621,108,-86 -263,GALATEA,-696,76,-44 -264,GALATEA,-737,101,-17 -265,GALATEA,-707,131,1 -266,GALATEA,-702,169,-2 diff --git a/configuration/skyblock/Minestom.fairysouls.yml b/configuration/skyblock/Minestom.fairysouls.yml new file mode 100644 index 0000000000..4b26dbafc2 --- /dev/null +++ b/configuration/skyblock/Minestom.fairysouls.yml @@ -0,0 +1,1448 @@ +# thanks to https://raw.githubusercontent.com/NotEnoughUpdates/NotEnoughUpdates-REPO/refs/heads/master/constants/fairy_souls.json +max_souls: 289 +souls: + - id: 1 + zone: HUB + x: -3 + y: 79 + z: -147 + - id: 2 + zone: HUB + x: -15 + y: 101 + z: -76 + - id: 3 + zone: HUB + x: -15 + y: 87 + z: -52 + - id: 4 + zone: HUB + x: 8 + y: 64 + z: -137 + - id: 5 + zone: HUB + x: 15 + y: 82 + z: -127 + - id: 6 + zone: HUB + x: 12 + y: 87 + z: -66 + - id: 7 + zone: HUB + x: -11 + y: 73 + z: -164 + - id: 8 + zone: HUB + x: 61 + y: 80 + z: -139 + - id: 9 + zone: HUB + x: 82 + y: 97 + z: -139 + - id: 10 + zone: HUB + x: 87 + y: 68 + z: -154 + - id: 11 + zone: HUB + x: 70 + y: 73 + z: -106 + - id: 12 + zone: HUB + x: 77 + y: 102 + z: -88 + - id: 13 + zone: HUB + x: 66 + y: 98 + z: -60 + - id: 14 + zone: HUB + x: 106 + y: 64 + z: -62 + - id: 15 + zone: HUB + x: 136 + y: 74 + z: -105 + - id: 16 + zone: HUB + x: 145 + y: 84 + z: -67 + - id: 17 + zone: HUB + x: 98 + y: 76 + z: -29 + - id: 18 + zone: HUB + x: 158 + y: 92 + z: 8 + - id: 19 + zone: HUB + x: 153 + y: 64 + z: 45 + - id: 20 + zone: HUB + x: 162 + y: 46 + z: 69 + - id: 21 + zone: HUB + x: 147 + y: 53 + z: 88 + - id: 22 + zone: HUB + x: 80 + y: 66 + z: 26 + - id: 23 + zone: HUB + x: 78 + y: 109 + z: 87 + - id: 24 + zone: HUB + x: 103 + y: 67 + z: 110 + - id: 25 + zone: HUB + x: 132 + y: 144 + z: 114 + - id: 26 + zone: HUB + x: 119 + y: 119 + z: 124 + - id: 27 + zone: HUB + x: 123 + y: 68 + z: 152 + - id: 28 + zone: HUB + x: 145 + y: 69 + z: 173 + - id: 29 + zone: HUB + x: 82 + y: 61 + z: 196 + - id: 30 + zone: HUB + x: -48 + y: 117 + z: 129 + - id: 31 + zone: HUB + x: -52 + y: 161 + z: 73 + - id: 32 + zone: HUB + x: -9 + y: 188 + z: 70 + - id: 33 + zone: HUB + x: 12 + y: 134 + z: 72 + - id: 34 + zone: HUB + x: -50 + y: 132 + z: 62 + - id: 35 + zone: HUB + x: -38 + y: 194 + z: 65 + - id: 36 + zone: HUB + x: -21 + y: 156 + z: 69 + - id: 37 + zone: HUB + x: -22 + y: 167 + z: 66 + - id: 38 + zone: HUB + x: -3 + y: 193 + z: 62 + - id: 39 + zone: HUB + x: 9 + y: 104 + z: 64 + - id: 40 + zone: HUB + x: -56 + y: 115 + z: 58 + - id: 41 + zone: HUB + x: 10 + y: 178 + z: 52 + - id: 42 + zone: HUB + x: -60 + y: 107 + z: 33 + - id: 43 + zone: HUB + x: 18 + y: 68 + z: -3 + - id: 44 + zone: HUB + x: -39 + y: 56 + z: -11 + - id: 45 + zone: HUB + x: -106 + y: 85 + z: -22 + - id: 46 + zone: HUB + x: -116 + y: 73 + z: -20 + - id: 47 + zone: HUB + x: -166 + y: 79 + z: 93 + - id: 48 + zone: HUB + x: -183 + y: 80 + z: 29 + - id: 49 + zone: HUB + x: -191 + y: 102 + z: 109 + - id: 50 + zone: HUB + x: -207 + y: 100 + z: 66 + - id: 51 + zone: HUB + x: -152 + y: 67 + z: 123 + - id: 52 + zone: HUB + x: -214 + y: 103 + z: 89 + - id: 53 + zone: HUB + x: -229 + y: 123 + z: 84 + - id: 54 + zone: HUB + x: -133 + y: 74 + z: 133 + - id: 55 + zone: HUB + x: -233 + y: 86 + z: 84 + - id: 56 + zone: HUB + x: -248 + y: 74 + z: 125 + - id: 57 + zone: HUB + x: -245 + y: 75 + z: 149 + - id: 58 + zone: HUB + x: -262 + y: 102 + z: 67 + - id: 59 + zone: HUB + x: -259 + y: 114 + z: 85 + - id: 60 + zone: HUB + x: -261 + y: 56 + z: 115 + - id: 61 + zone: HUB + x: -195 + y: 55 + z: 153 + - id: 62 + zone: HUB + x: -252 + y: 132 + z: 51 + - id: 63 + zone: HUB + x: -260 + y: 96 + z: 48 + - id: 64 + zone: HUB + x: -188 + y: 79 + z: -56 + - id: 65 + zone: HUB + x: -117 + y: 73 + z: -163 + - id: 66 + zone: HUB + x: -127 + y: 75 + z: -185 + - id: 67 + zone: HUB + x: -92 + y: 59 + z: -138 + - id: 68 + zone: HUB + x: -77 + y: 74 + z: -152 + - id: 69 + zone: HUB + x: -64 + y: 77 + z: -72 + - id: 70 + zone: HUB + x: -34 + y: 86 + z: -35 + - id: 71 + zone: HUB + x: 38 + y: 67 + z: -36 + - id: 72 + zone: HUB + x: 36 + y: 66 + z: -35 + - id: 73 + zone: HUB + x: 73 + y: 59 + z: 6 + - id: 74 + zone: HUB + x: 169 + y: 60 + z: 129 + - id: 75 + zone: HUB + x: 45 + y: 117 + z: 94 + - id: 76 + zone: HUB + x: 45 + y: 148 + z: 98 + - id: 77 + zone: HUB + x: 49 + y: 77 + z: 93 + - id: 78 + zone: HUB + x: 44 + y: 121 + z: 88 + - id: 79 + zone: HUB + x: 41 + y: 106 + z: 101 + - id: 80 + zone: HUB + x: 27 + y: 84 + z: 83 + - id: 81 + zone: THE_FARMING_ISLANDS + x: 96 + y: 96 + z: -287 + - id: 82 + zone: THE_FARMING_ISLANDS + x: 182 + y: 99 + z: -235 + - id: 83 + zone: THE_FARMING_ISLANDS + x: 183 + y: 99 + z: -305 + - id: 84 + zone: THE_FARMING_ISLANDS + x: 126 + y: 91 + z: -304 + - id: 85 + zone: THE_FARMING_ISLANDS + x: 99 + y: 112 + z: -275 + - id: 86 + zone: THE_FARMING_ISLANDS + x: 143 + y: 90 + z: -243 + - id: 87 + zone: THE_FARMING_ISLANDS + x: 155 + y: 23 + z: -204 + - id: 88 + zone: THE_FARMING_ISLANDS + x: 111 + y: 63 + z: -447 + - id: 89 + zone: THE_FARMING_ISLANDS + x: 263 + y: 177 + z: -565 + - id: 90 + zone: THE_FARMING_ISLANDS + x: 138 + y: 72 + z: -587 + - id: 91 + zone: THE_FARMING_ISLANDS + x: 273 + y: 141 + z: -467 + - id: 92 + zone: THE_FARMING_ISLANDS + x: 387 + y: 78 + z: -365 + - id: 93 + zone: THE_FARMING_ISLANDS + x: 261 + y: 133 + z: -348 + - id: 94 + zone: THE_FARMING_ISLANDS + x: 145 + y: 77 + z: -374 + - id: 95 + zone: THE_FARMING_ISLANDS + x: 254 + y: 70 + z: -493 + - id: 96 + zone: THE_FARMING_ISLANDS + x: 193 + y: 66 + z: -468 + - id: 97 + zone: THE_FARMING_ISLANDS + x: 279 + y: 112 + z: -541 + - id: 98 + zone: THE_FARMING_ISLANDS + x: 271 + y: 56 + z: -361 + - id: 99 + zone: THE_FARMING_ISLANDS + x: 152 + y: 67 + z: -361 + - id: 100 + zone: THE_FARMING_ISLANDS + x: 150 + y: 60 + z: -448 + - id: 101 + zone: GOLD_MINE + x: -47 + y: 75 + z: -298 + - id: 102 + zone: GOLD_MINE + x: -62 + y: 104 + z: -289 + - id: 103 + zone: GOLD_MINE + x: -37 + y: 78 + z: -308 + - id: 104 + zone: GOLD_MINE + x: 17 + y: 86 + z: -312 + - id: 105 + zone: GOLD_MINE + x: 21 + y: 36 + z: -320 + - id: 106 + zone: GOLD_MINE + x: -44 + y: 100 + z: -344 + - id: 107 + zone: GOLD_MINE + x: -26 + y: 94 + z: -340 + - id: 108 + zone: GOLD_MINE + x: -1 + y: 80 + z: -337 + - id: 109 + zone: GOLD_MINE + x: 19 + y: 57 + z: -341 + - id: 110 + zone: GOLD_MINE + x: -19 + y: 142 + z: -364 + - id: 111 + zone: GOLD_MINE + x: -23 + y: 113 + z: -353 + - id: 112 + zone: GOLD_MINE + x: -11 + y: 76 + z: -395 + - id: 113 + zone: DEEP_CAVERNS + x: 3 + y: 152 + z: 85 + - id: 114 + zone: DEEP_CAVERNS + x: 18 + y: 74 + z: 74 + - id: 115 + zone: DEEP_CAVERNS + x: -21 + y: 25 + z: 72 + - id: 116 + zone: DEEP_CAVERNS + x: 3 + y: 182 + z: 50 + - id: 117 + zone: DEEP_CAVERNS + x: 0 + y: 65 + z: 57 + - id: 118 + zone: DEEP_CAVERNS + x: 3 + y: 14 + z: 51 + - id: 119 + zone: DEEP_CAVERNS + x: 9 + y: 170 + z: 44 + - id: 120 + zone: DEEP_CAVERNS + x: -60 + y: 37 + z: 52 + - id: 121 + zone: DEEP_CAVERNS + x: -35 + y: 127 + z: 28 + - id: 122 + zone: DEEP_CAVERNS + x: -18 + y: 163 + z: 26 + - id: 123 + zone: DEEP_CAVERNS + x: 44 + y: 98 + z: 23 + - id: 124 + zone: DEEP_CAVERNS + x: 57 + y: 161 + z: 19 + - id: 125 + zone: DEEP_CAVERNS + x: 29 + y: 149 + z: 14 + - id: 126 + zone: DEEP_CAVERNS + x: -2 + y: 255 + z: -1 + - id: 127 + zone: DEEP_CAVERNS + x: -40 + y: 72 + z: 0 + - id: 128 + zone: DEEP_CAVERNS + x: -11 + y: 102 + z: -16 + - id: 129 + zone: DEEP_CAVERNS + x: -71 + y: 13 + z: 5 + - id: 130 + zone: DEEP_CAVERNS + x: -76 + y: 13 + z: 24 + - id: 131 + zone: DEEP_CAVERNS + x: -8 + y: 74 + z: -44 + - id: 132 + zone: DEEP_CAVERNS + x: 71 + y: 167 + z: -12 + - id: 133 + zone: DEEP_CAVERNS + x: 22 + y: 156 + z: -42 + - id: 134 + zone: DWARVEN_MINES + x: -21 + y: 208 + z: -59 + - id: 135 + zone: DWARVEN_MINES + x: -139 + y: 220 + z: -89 + - id: 136 + zone: DWARVEN_MINES + x: -9 + y: 230 + z: -135 + - id: 137 + zone: DWARVEN_MINES + x: 155 + y: 189 + z: 123 + - id: 138 + zone: DWARVEN_MINES + x: 34 + y: 102 + z: 86 + - id: 139 + zone: DWARVEN_MINES + x: 133 + y: 104 + z: 104 + - id: 140 + zone: DWARVEN_MINES + x: 22 + y: 127 + z: 184 + - id: 141 + zone: DWARVEN_MINES + x: -110 + y: 142 + z: 143 + - id: 142 + zone: DWARVEN_MINES + x: -116 + y: 142 + z: 154 + - id: 143 + zone: DWARVEN_MINES + x: -204 + y: 131 + z: 199 + - id: 144 + zone: DWARVEN_MINES + x: -53 + y: 205 + z: 50 + - id: 145 + zone: DWARVEN_MINES + x: 20 + y: 121 + z: 240 + - id: 146 + zone: DWARVEN_MINES + x: -19 + y: 121 + z: 397 + - id: 147 + zone: DWARVEN_MINES + x: 111 + y: 160 + z: 412 + - id: 148 + zone: DWARVEN_MINES + x: -195 + y: 124 + z: -15 + - id: 149 + zone: SPIDERS_DEN + x: -279 + y: 127 + z: -177 + - id: 150 + zone: SPIDERS_DEN + x: -185 + y: 135 + z: -290 + - id: 151 + zone: SPIDERS_DEN + x: -147 + y: 78 + z: -299 + - id: 152 + zone: SPIDERS_DEN + x: -180 + y: 68 + z: -306 + - id: 153 + zone: SPIDERS_DEN + x: -297 + y: 90 + z: -169 + - id: 154 + zone: SPIDERS_DEN + x: -309 + y: 63 + z: -185 + - id: 155 + zone: SPIDERS_DEN + x: -309 + y: 66 + z: -245 + - id: 156 + zone: SPIDERS_DEN + x: -203 + y: 169 + z: -320 + - id: 157 + zone: SPIDERS_DEN + x: -222 + y: 74 + z: -361 + - id: 158 + zone: SPIDERS_DEN + x: -140 + y: 85 + z: -335 + - id: 159 + zone: SPIDERS_DEN + x: -198 + y: 160 + z: -331 + - id: 160 + zone: SPIDERS_DEN + x: -194 + y: 67 + z: -323 + - id: 161 + zone: SPIDERS_DEN + x: -301 + y: 92 + z: -171 + - id: 162 + zone: SPIDERS_DEN + x: -294 + y: 36 + z: -274 + - id: 163 + zone: SPIDERS_DEN + x: -204 + y: 94 + z: -241 + - id: 164 + zone: SPIDERS_DEN + x: -336 + y: 82 + z: -153 + - id: 165 + zone: SPIDERS_DEN + x: -422 + y: 106 + z: -206 + - id: 166 + zone: SPIDERS_DEN + x: -322 + y: 95 + z: -281 + - id: 167 + zone: SPIDERS_DEN + x: -336 + y: 111 + z: -253 + - id: 168 + zone: CRIMSON_ISLE + x: -644 + y: 125 + z: -689 + - id: 169 + zone: CRIMSON_ISLE + x: -79 + y: 139 + z: -779 + - id: 170 + zone: CRIMSON_ISLE + x: -352 + y: 191 + z: -553 + - id: 171 + zone: CRIMSON_ISLE + x: -717 + y: 164 + z: -981 + - id: 172 + zone: CRIMSON_ISLE + x: -726 + y: 144 + z: -891 + - id: 173 + zone: CRIMSON_ISLE + x: -690 + y: 122 + z: -752 + - id: 174 + zone: CRIMSON_ISLE + x: -31 + y: 178 + z: -907 + - id: 175 + zone: CRIMSON_ISLE + x: -297 + y: 81 + z: -835 + - id: 176 + zone: CRIMSON_ISLE + x: -462 + y: 78 + z: -698 + - id: 177 + zone: CRIMSON_ISLE + x: -383 + y: 71 + z: -883 + - id: 178 + zone: CRIMSON_ISLE + x: -721 + y: 125 + z: -811 + - id: 179 + zone: CRIMSON_ISLE + x: -480 + y: 104 + z: -593 + - id: 180 + zone: CRIMSON_ISLE + x: -606 + y: 154 + z: -800 + - id: 181 + zone: CRIMSON_ISLE + x: -106 + y: 89 + z: -883 + - id: 182 + zone: CRIMSON_ISLE + x: -343 + y: 235 + z: -780 + - id: 183 + zone: CRIMSON_ISLE + x: -500 + y: 127 + z: -795 + - id: 184 + zone: CRIMSON_ISLE + x: -346 + y: 75 + z: -552 + - id: 185 + zone: CRIMSON_ISLE + x: -445 + y: 110 + z: -1026 + - id: 186 + zone: CRIMSON_ISLE + x: -361 + y: 133 + z: -469 + - id: 187 + zone: CRIMSON_ISLE + x: -247 + y: 44 + z: -512 + - id: 188 + zone: CRIMSON_ISLE + x: -380 + y: 141 + z: -1020 + - id: 189 + zone: CRIMSON_ISLE + x: -310 + y: 156 + z: -1008 + - id: 190 + zone: CRIMSON_ISLE + x: -412 + y: 58 + z: -935 + - id: 191 + zone: CRIMSON_ISLE + x: -396 + y: 108 + z: -764 + - id: 192 + zone: CRIMSON_ISLE + x: -342 + y: 101 + z: -484 + - id: 193 + zone: CRIMSON_ISLE + x: -35 + y: 116 + z: -1055 + - id: 194 + zone: CRIMSON_ISLE + x: -361 + y: 69 + z: -425 + - id: 195 + zone: CRIMSON_ISLE + x: 14 + y: 108 + z: -769 + - id: 196 + zone: CRIMSON_ISLE + x: -479 + y: 114 + z: -972 + - id: 197 + zone: THE_END + x: -517 + y: 100 + z: -295 + - id: 198 + zone: THE_END + x: -583 + y: 208 + z: -272 + - id: 199 + zone: THE_END + x: -696 + y: 116 + z: -256 + - id: 200 + zone: THE_END + x: -587 + y: 122 + z: -276 + - id: 201 + zone: THE_END + x: -587 + y: 48 + z: -293 + - id: 202 + zone: THE_END + x: -492 + y: 21 + z: -175 + - id: 203 + zone: THE_END + x: -492 + y: 81 + z: -275 + - id: 204 + zone: THE_END + x: -545 + y: 92 + z: -257 + - id: 205 + zone: THE_END + x: -748 + y: 106 + z: -284 + - id: 206 + zone: THE_END + x: -723 + y: 75 + z: -222 + - id: 207 + zone: THE_END + x: -609 + y: 84 + z: -230 + - id: 208 + zone: THE_END + x: -657 + y: 36 + z: -201 + - id: 209 + zone: THE_PARK + x: -305 + y: 71 + z: -33 + - id: 210 + zone: THE_PARK + x: -419 + y: 90 + z: 42 + - id: 211 + zone: THE_PARK + x: -479 + y: 107 + z: -60 + - id: 212 + zone: THE_PARK + x: -482 + y: 118 + z: -33 + - id: 213 + zone: THE_PARK + x: -292 + y: 69 + z: 13 + - id: 214 + zone: THE_PARK + x: -339 + y: 99 + z: 67 + - id: 215 + zone: THE_PARK + x: -412 + y: 123 + z: -118 + - id: 216 + zone: THE_PARK + x: -434 + y: 121 + z: 56 + - id: 217 + zone: THE_PARK + x: -465 + y: 108 + z: -105 + - id: 218 + zone: THE_PARK + x: -305 + y: 75 + z: -83 + - id: 219 + zone: THE_PARK + x: -370 + y: 89 + z: -44 + - id: 220 + zone: JERRYS_WORKSHOP + x: -95 + y: 77 + z: 20 + - id: 221 + zone: JERRYS_WORKSHOP + x: -44 + y: 87 + z: 76 + - id: 222 + zone: JERRYS_WORKSHOP + x: -7 + y: 108 + z: 107 + - id: 223 + zone: JERRYS_WORKSHOP + x: 56 + y: 108 + z: 64 + - id: 224 + zone: JERRYS_WORKSHOP + x: 74 + y: 109 + z: -18 + - id: 225 + zone: THE_RIFT + x: 253 + y: 123 + z: 90 + - id: 226 + zone: DUNGEON_HUB + x: 17 + y: 124 + z: -58 + - id: 227 + zone: DUNGEON_HUB + x: 1 + y: 134 + z: 75 + - id: 228 + zone: DUNGEON_HUB + x: 10 + y: 164 + z: -10 + - id: 229 + zone: DUNGEON_HUB + x: -139 + y: 46 + z: -1 + - id: 230 + zone: DUNGEON_HUB + x: -55 + y: 82 + z: -10 + - id: 231 + zone: DUNGEON_HUB + x: -4 + y: 21 + z: -17 + - id: 232 + zone: DUNGEON_HUB + x: 14 + y: 60 + z: 99 + - id: 233 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 234 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 235 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 236 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 237 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 238 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 239 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 240 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 241 + zone: MISC_DUNGEONS + x: 0 + y: 0 + z: 0 + - id: 242 + zone: MISC_FISHING + x: 0 + y: 0 + z: 0 + - id: 243 + zone: MISC_FISHING + x: 0 + y: 0 + z: 0 + - id: 244 + zone: MISC_FISHING + x: 0 + y: 0 + z: 0 + - id: 245 + zone: MISC_FISHING + x: 0 + y: 0 + z: 0 + - id: 246 + zone: MISC_GARDEN + x: 0 + y: 0 + z: 0 + - id: 247 + zone: MISC_GARDEN + x: 0 + y: 0 + z: 0 + - id: 248 + zone: MISC_PLACEABLE + x: 0 + y: 0 + z: 0 + - id: 249 + zone: MISC_GLACITE_MINESHAFTS + x: 0 + y: 0 + z: 0 + - id: 250 + zone: BACKWATER_BAYOU + x: 33 + y: 61 + z: -46 + - id: 251 + zone: BACKWATER_BAYOU + x: 62 + y: 76 + z: 5 + - id: 252 + zone: BACKWATER_BAYOU + x: 16 + y: 59 + z: -7 + - id: 253 + zone: BACKWATER_BAYOU + x: 72 + y: 115 + z: -12 + - id: 254 + zone: BACKWATER_BAYOU + x: 2 + y: 67 + z: 10 + - id: 255 + zone: GALATEA + x: -601 + y: 128 + z: -20 + - id: 256 + zone: GALATEA + x: -565 + y: 95 + z: 17 + - id: 257 + zone: GALATEA + x: -556 + y: 94 + z: 60 + - id: 258 + zone: GALATEA + x: -598 + y: 107 + z: 16 + - id: 259 + zone: GALATEA + x: -586 + y: 90 + z: -26 + - id: 260 + zone: GALATEA + x: -620 + y: 66 + z: 32 + - id: 261 + zone: GALATEA + x: -663 + y: 64 + z: 62 + - id: 262 + zone: GALATEA + x: -621 + y: 108 + z: -86 + - id: 263 + zone: GALATEA + x: -696 + y: 76 + z: -44 + - id: 264 + zone: GALATEA + x: -737 + y: 101 + z: -17 + - id: 265 + zone: GALATEA + x: -707 + y: 131 + z: 1 + - id: 266 + zone: GALATEA + x: -702 + y: 169 + z: -2 + - id: 267 + zone: THE_PARK + x: -458 + y: 118 + z: -85 + - id: 268 + zone: LOTUS_ATOLL + x: 1 + y: 70 + z: -15 + - id: 269 + zone: LOTUS_ATOLL + x: 12 + y: 66 + z: 28 + - id: 270 + zone: LOTUS_ATOLL + x: 24 + y: 142 + z: -68 + - id: 271 + zone: LOTUS_ATOLL + x: 70 + y: 118 + z: 8 + - id: 272 + zone: LOTUS_ATOLL + x: 86 + y: 65 + z: -12 + - id: 273 + zone: LOTUS_ATOLL + x: 89 + y: 78 + z: 27 + - id: 274 + zone: GALATEA + x: -554 + y: 94 + z: 256 + - id: 275 + zone: GALATEA + x: -565 + y: 136 + z: 243 + - id: 276 + zone: GALATEA + x: -567 + y: 81 + z: 272 + - id: 277 + zone: GALATEA + x: -603 + y: 167 + z: 234 + - id: 278 + zone: GALATEA + x: -618 + y: 125 + z: 179 + - id: 279 + zone: GALATEA + x: -627 + y: 122 + z: 285 + - id: 280 + zone: GALATEA + x: -640 + y: 90 + z: 158 + - id: 281 + zone: GALATEA + x: -677 + y: 102 + z: 262 + - id: 282 + zone: GALATEA + x: -678 + y: 62 + z: 258 + - id: 283 + zone: GALATEA + x: -706 + y: 98 + z: 142 + - id: 284 + zone: GALATEA + x: -711 + y: 59 + z: 290 + - id: 285 + zone: GALATEA + x: -727 + y: 125 + z: 152 + - id: 286 + zone: SAFARI + x: -76 + y: 40 + z: -32 + - id: 287 + zone: SAFARI + x: 40 + y: 63 + z: -14 + - id: 288 + zone: SAFARI + x: -162 + y: 60 + z: 63 + - id: 289 + zone: SAFARI + x: 5 + y: 106 + z: 18 diff --git a/configuration/skyblock/Minestom.regions.csv b/configuration/skyblock/Minestom.regions.csv deleted file mode 100644 index 76f7128738..0000000000 --- a/configuration/skyblock/Minestom.regions.csv +++ /dev/null @@ -1,87 +0,0 @@ -_id,type,x1,y1,z1,x2,y2,z2,serverType -village_1,VILLAGE,229,3,-194,-276,182,201,SKYBLOCK_HUB -ruins_1,RUINS,-189,148,28,-299,40,158,SKYBLOCK_HUB -library_1,LIBRARY,-75,75,-83,-71,70,-79,SKYBLOCK_HUB -library_2,LIBRARY,-71,76,-74,-63,69,-85,SKYBLOCK_HUB -thaumaturgist,THAUMATURGIST,-74,69,-57,-59,77,-72,SKYBLOCK_HUB -thaumaturgist_2,THAUMATURGIST,-48,74,-65,-57,70,-59,SKYBLOCK_HUB -mountain,MOUNTAIN,-51,98,16,-38,85,1,SKYBLOCK_HUB -trade_center,TRADE_CENTER,-29,73,-73,-38,68,-83,SKYBLOCK_HUB -combat_settlement,COMBAT_SETTLEMENT,-32,63,-61,-70,88,-98,SKYBLOCK_HUB -election_room,ELECTION_ROOM,-16,63,54,16,47,16,SKYBLOCK_HUB -goldmine_1,GOLD_MINE,52,136,-261,-106,14,-404,GOLD_MINE -deepcavern_1,DEEP_CAVERNS,-68,235,112,135,0,-72,DEEP_CAVERNS -gunpowder,GUNPOWDER_MINES,159,165,42,-38,143,-62,DEEP_CAVERNS -lapis_quarry,LAPIS_QUARRY,-38,143,-62,151,114,77,DEEP_CAVERNS -pigmens_den,PIGMENS_DEN,151,114,77,-26,85,-61,DEEP_CAVERNS -slimehill,SLIMEHILL,-26,85,-61,127,52,74,DEEP_CAVERNS -diamond_reserve,DIAMOND_RESERVE,127,52,74,-36,28,-74,DEEP_CAVERNS -obsidian_sanctuary,OBSIDIAN_SANCTUARY,-36,28,-74,121,0,48,DEEP_CAVERNS -the_end_nest_1,THE_END_NEST,78,117,-87,149,0,85,THE_END -the_end_1,THE_END,150,177,146,190,23,-115,THE_END -dragons_nest_2,DRAGONS_NEST,-34,1,68,-92,68,-52,THE_END -vs1,VOID_SEPULTURE,100,62,-17,56,7,-96,THE_END -vs2,VOID_SEPULTURE,68,70,-96,140,23,-21,THE_END -vs3,VOID_SEPULTURE,74,50,-51,49,8,-91,THE_END -#spiders_den_1,SPIDERS_DEN,-107,5,-238,-408,195,-368, -#spiders_den_2,SPIDERS_DEN,-408,195,-368,-178,13,-183, -#spiders_den_3,SPIDERS_DEN,-226,6,-130,-408,195,-368, -#spiders_den_hive_1,SPIDERS_DEN_HIVE,-236,102,-249,-149,195,-353, -dwarvenmines1,DWARVEN_MINES,-243,255,-205,308,3,291,DWARVEN_MINES -forge1,THE_FORGE,-34,168,-42,30,144,-125,DWARVEN_MINES -forge2,FORGE_BASIN,-16,189,-1,17,144,-38,DWARVEN_MINES -divb1,DIVANS_GATEWAY,7,127,51,-10,149,128,DWARVEN_MINES -icewall,GREAT_ICE_WALL,25,169,138,-25,126,174,DWARVEN_MINES -gb1,GOBLIN_BURROWS,-47,170,214,-96,154,99,DWARVEN_MINES -gb2,GOBLIN_BURROWS,-60,163,180,-192,131,110,DWARVEN_MINES -mist1,THE_MIST,-60,83,2,200,63,160,DWARVEN_MINES -cliffv,CLIFFSIDE_VEINS,6,154,23,92,114,56,DWARVEN_MINES -barn_1,THE_BARN,82,26,-177,250,120,-334,THE_FARMING_ISLANDS -birch_forest,BIRCH_PARK,-255,114,26,-336,41,-90,THE_PARK -spruce_forest,SPRUCE_WOODS,-387,151,-22,-309,59,107,THE_PARK -dark_thicket,DARK_THICKET,-333,148,-24,-415,59,-122,THE_PARK -trial_of_fire,TRIALS_OF_FIRE,-369,120,-100,-357,101,-88,THE_PARK -jungle,JUNGLE_ISLAND,-417,149,-130,-507,68,-18,THE_PARK -savanna,SAVANNA_WOODLAND,-467,155,-20,-383,56,102,THE_PARK -viking,VIKING_LONGHOUSE,-349,50,53,-315,131,94,THE_PARK -melody,MELODY_PLATEAU,-434,100,63,-399,132,101,THE_PARK -sherry,SHERRYS_SHOWROOM,21,98,86,7,76,108,JERRYS_WORKSHOP -jerry,JERRYS_WORKSHOP,139,183,200,-163,30,-167,JERRYS_WORKSHOP -terry,TERRYS_SHACK,-87,94,30,-95,76,21,JERRYS_WORKSHOP -pond,JERRY_POND,-82,110,-17,-35,68,63,JERRYS_WORKSHOP -sunken_pond,SUNKEN_JERRY_POND,-68,74,106,-118,56,32,JERRYS_WORKSHOP -mount,MOUNT_JERRY,-57,81,-40,51,158,-104,JERRYS_WORKSHOP -hotsprings,HOT_SPRINGS,-32,82,-32,60,46,-86,JERRYS_WORKSHOP -hotsprings2,HOT_SPRINGS,-1,74,-35,101,49,12,JERRYS_WORKSHOP -glacial,GLACIAL_CAVE,56,88,20,111,63,115,JERRYS_WORKSHOP -gary,GARYS_SHACK,56,102,52,49,118,63,JERRYS_WORKSHOP -einary,EINARYS_EMPORIUM,-12,75,60,-21,86,66,JERRYS_WORKSHOP -einary2,EINARYS_EMPORIUM,-21,75,66,-17,84,70,JERRYS_WORKSHOP -community_center,COMMUNITY_CENTER,12,88,6,-13,71,24,SKYBLOCK_HUB -community_center_2,COMMUNITY_CENTER,11,83,11,15,78,16,SKYBLOCK_HUB -auction,AUCTION_HOUSE,-26,71,-20,-44,82,-6,SKYBLOCK_HUB -shens_auction,SHENS_AUCTION,-37,63,-22,-2,52,-1,SKYBLOCK_HUB -bazaar,BAZAAR_ALLEY,-30,79,-21,-40,71,-35,SKYBLOCK_HUB -bank,BANK,-25,80,-45,-33,72,-35,SKYBLOCK_HUB -graveyard_1,GRAVEYARD,-73,70,-101,-195,121,-221,SKYBLOCK_HUB -crypts_1,CRYPTS,-176,71,-120,-157,60,-105,SKYBLOCK_HUB -crypts_2,CRYPTS,-155,66,-98,-138,57,-130,SKYBLOCK_HUB -crypts_3,CRYPTS,-164,70,-115,-155,58,-99,SKYBLOCK_HUB -crypts_4,CRYPTS,-138,63,-97,-119,40,-149,SKYBLOCK_HUB -crypts_5,CRYPTS,-119,41,-144,-80,57,-77,SKYBLOCK_HUB -crypts_6,CRYPTS,-43,63,-143,-51,53,-127,SKYBLOCK_HUB -crypts_7,CRYPTS,-51,62,-135,-90,46,-100,SKYBLOCK_HUB -wilderness,WILDERNESS,76,76,64,175,146,201,SKYBLOCK_HUB -unincorporated,UNINCORPORATED,17,79,171,-32,109,134,SKYBLOCK_HUB -forest,FOREST,-66,62,-6,-204,104,-72,SKYBLOCK_HUB -forest_camp,FORAGING_CAMP,-151,72,-50,-101,87,-15,SKYBLOCK_HUB -library_3,LIBRARY,-71,70,-74,-63,78,-85,SKYBLOCK_HUB -thaumaturgist_3,THAUMATURGIST,-56,69,-67,-62,74,-60,SKYBLOCK_HUB -coalmine_1,COAL_MINE,24,61,-146,-31,112,-199,SKYBLOCK_HUB -mining_district,MINING_DISTRICT,-25,55,-93,23,92,-142,SKYBLOCK_HUB -farm,FARM,28,66,-74,107,106,-153,SKYBLOCK_HUB -fishing_outpost,FISHING_OUTPOST,92,69,-21,166,95,-79,SKYBLOCK_HUB -museum_1,PLAYER_MUSEUM,25,78,-3,42,71,5,SKYBLOCK_HUB -museum_2,PLAYER_MUSEUM,21,80,4,38,70,19,SKYBLOCK_HUB -museum_3,PLAYER_MUSEUM,45,84,24,13,65,53,SKYBLOCK_HUB -tangleburgs_path,TANGLEBURGS_PATH,-533,107,-32,-560,122,20,SKYBLOCK_GALATEA diff --git a/configuration/skyblock/Minestom.regions.yml b/configuration/skyblock/Minestom.regions.yml new file mode 100644 index 0000000000..45d98130b2 --- /dev/null +++ b/configuration/skyblock/Minestom.regions.yml @@ -0,0 +1,739 @@ +regions: + - id: village_1 + type: VILLAGE + x1: 229 + y1: 3 + z1: -194 + x2: -276 + y2: 182 + z2: 201 + serverType: SKYBLOCK_HUB + - id: ruins_1 + type: RUINS + x1: -189 + y1: 148 + z1: 28 + x2: -299 + y2: 40 + z2: 158 + serverType: SKYBLOCK_HUB + - id: library_1 + type: LIBRARY + x1: -75 + y1: 75 + z1: -83 + x2: -71 + y2: 70 + z2: -79 + serverType: SKYBLOCK_HUB + - id: library_2 + type: LIBRARY + x1: -71 + y1: 76 + z1: -74 + x2: -63 + y2: 69 + z2: -85 + serverType: SKYBLOCK_HUB + - id: thaumaturgist + type: THAUMATURGIST + x1: -74 + y1: 69 + z1: -57 + x2: -59 + y2: 77 + z2: -72 + serverType: SKYBLOCK_HUB + - id: thaumaturgist_2 + type: THAUMATURGIST + x1: -48 + y1: 74 + z1: -65 + x2: -57 + y2: 70 + z2: -59 + serverType: SKYBLOCK_HUB + - id: mountain + type: MOUNTAIN + x1: -51 + y1: 98 + z1: 16 + x2: -38 + y2: 85 + z2: 1 + serverType: SKYBLOCK_HUB + - id: trade_center + type: TRADE_CENTER + x1: -29 + y1: 73 + z1: -73 + x2: -38 + y2: 68 + z2: -83 + serverType: SKYBLOCK_HUB + - id: combat_settlement + type: COMBAT_SETTLEMENT + x1: -32 + y1: 63 + z1: -61 + x2: -70 + y2: 88 + z2: -98 + serverType: SKYBLOCK_HUB + - id: election_room + type: ELECTION_ROOM + x1: -16 + y1: 63 + z1: 54 + x2: 16 + y2: 47 + z2: 16 + serverType: SKYBLOCK_HUB + - id: goldmine_1 + type: GOLD_MINE + x1: 52 + y1: 136 + z1: -261 + x2: -106 + y2: 14 + z2: -404 + serverType: GOLD_MINE + - id: deepcavern_1 + type: DEEP_CAVERNS + x1: -68 + y1: 235 + z1: 112 + x2: 135 + y2: 0 + z2: -72 + serverType: DEEP_CAVERNS + - id: gunpowder + type: GUNPOWDER_MINES + x1: 159 + y1: 165 + z1: 42 + x2: -38 + y2: 143 + z2: -62 + serverType: DEEP_CAVERNS + - id: lapis_quarry + type: LAPIS_QUARRY + x1: -38 + y1: 143 + z1: -62 + x2: 151 + y2: 114 + z2: 77 + serverType: DEEP_CAVERNS + - id: pigmens_den + type: PIGMENS_DEN + x1: 151 + y1: 114 + z1: 77 + x2: -26 + y2: 85 + z2: -61 + serverType: DEEP_CAVERNS + - id: slimehill + type: SLIMEHILL + x1: -26 + y1: 85 + z1: -61 + x2: 127 + y2: 52 + z2: 74 + serverType: DEEP_CAVERNS + - id: diamond_reserve + type: DIAMOND_RESERVE + x1: 127 + y1: 52 + z1: 74 + x2: -36 + y2: 28 + z2: -74 + serverType: DEEP_CAVERNS + - id: obsidian_sanctuary + type: OBSIDIAN_SANCTUARY + x1: -36 + y1: 28 + z1: -74 + x2: 121 + y2: 0 + z2: 48 + serverType: DEEP_CAVERNS + - id: the_end_nest_1 + type: THE_END_NEST + x1: 78 + y1: 117 + z1: -87 + x2: 149 + y2: 0 + z2: 85 + serverType: THE_END + - id: the_end_1 + type: THE_END + x1: 150 + y1: 177 + z1: 146 + x2: 190 + y2: 23 + z2: -115 + serverType: THE_END + - id: dragons_nest_2 + type: DRAGONS_NEST + x1: -34 + y1: 1 + z1: 68 + x2: -92 + y2: 68 + z2: -52 + serverType: THE_END + - id: vs1 + type: VOID_SEPULTURE + x1: 100 + y1: 62 + z1: -17 + x2: 56 + y2: 7 + z2: -96 + serverType: THE_END + - id: vs2 + type: VOID_SEPULTURE + x1: 68 + y1: 70 + z1: -96 + x2: 140 + y2: 23 + z2: -21 + serverType: THE_END + - id: vs3 + type: VOID_SEPULTURE + x1: 74 + y1: 50 + z1: -51 + x2: 49 + y2: 8 + z2: -91 + serverType: THE_END + - id: dwarvenmines1 + type: DWARVEN_MINES + x1: -243 + y1: 255 + z1: -205 + x2: 308 + y2: 3 + z2: 291 + serverType: DWARVEN_MINES + - id: forge1 + type: THE_FORGE + x1: -34 + y1: 168 + z1: -42 + x2: 30 + y2: 144 + z2: -125 + serverType: DWARVEN_MINES + - id: forge2 + type: FORGE_BASIN + x1: -16 + y1: 189 + z1: -1 + x2: 17 + y2: 144 + z2: -38 + serverType: DWARVEN_MINES + - id: divb1 + type: DIVANS_GATEWAY + x1: 7 + y1: 127 + z1: 51 + x2: -10 + y2: 149 + z2: 128 + serverType: DWARVEN_MINES + - id: icewall + type: GREAT_ICE_WALL + x1: 25 + y1: 169 + z1: 138 + x2: -25 + y2: 126 + z2: 174 + serverType: DWARVEN_MINES + - id: gb1 + type: GOBLIN_BURROWS + x1: -47 + y1: 170 + z1: 214 + x2: -96 + y2: 154 + z2: 99 + serverType: DWARVEN_MINES + - id: gb2 + type: GOBLIN_BURROWS + x1: -60 + y1: 163 + z1: 180 + x2: -192 + y2: 131 + z2: 110 + serverType: DWARVEN_MINES + - id: mist1 + type: THE_MIST + x1: -60 + y1: 83 + z1: 2 + x2: 200 + y2: 63 + z2: 160 + serverType: DWARVEN_MINES + - id: cliffv + type: CLIFFSIDE_VEINS + x1: 6 + y1: 154 + z1: 23 + x2: 92 + y2: 114 + z2: 56 + serverType: DWARVEN_MINES + - id: barn_1 + type: THE_BARN + x1: 82 + y1: 26 + z1: -177 + x2: 250 + y2: 120 + z2: -334 + serverType: THE_FARMING_ISLANDS + - id: birch_forest + type: BIRCH_PARK + x1: -255 + y1: 114 + z1: 26 + x2: -336 + y2: 41 + z2: -90 + serverType: THE_PARK + - id: spruce_forest + type: SPRUCE_WOODS + x1: -387 + y1: 151 + z1: -22 + x2: -309 + y2: 59 + z2: 107 + serverType: THE_PARK + - id: dark_thicket + type: DARK_THICKET + x1: -333 + y1: 148 + z1: -24 + x2: -415 + y2: 59 + z2: -122 + serverType: THE_PARK + - id: trial_of_fire + type: TRIALS_OF_FIRE + x1: -369 + y1: 120 + z1: -100 + x2: -357 + y2: 101 + z2: -88 + serverType: THE_PARK + - id: jungle + type: JUNGLE_ISLAND + x1: -417 + y1: 149 + z1: -130 + x2: -507 + y2: 68 + z2: -18 + serverType: THE_PARK + - id: savanna + type: SAVANNA_WOODLAND + x1: -467 + y1: 155 + z1: -20 + x2: -383 + y2: 56 + z2: 102 + serverType: THE_PARK + - id: viking + type: VIKING_LONGHOUSE + x1: -349 + y1: 50 + z1: 53 + x2: -315 + y2: 131 + z2: 94 + serverType: THE_PARK + - id: melody + type: MELODY_PLATEAU + x1: -434 + y1: 100 + z1: 63 + x2: -399 + y2: 132 + z2: 101 + serverType: THE_PARK + - id: sherry + type: SHERRYS_SHOWROOM + x1: 21 + y1: 98 + z1: 86 + x2: 7 + y2: 76 + z2: 108 + serverType: JERRYS_WORKSHOP + - id: jerry + type: JERRYS_WORKSHOP + x1: 139 + y1: 183 + z1: 200 + x2: -163 + y2: 30 + z2: -167 + serverType: JERRYS_WORKSHOP + - id: terry + type: TERRYS_SHACK + x1: -87 + y1: 94 + z1: 30 + x2: -95 + y2: 76 + z2: 21 + serverType: JERRYS_WORKSHOP + - id: pond + type: JERRY_POND + x1: -82 + y1: 110 + z1: -17 + x2: -35 + y2: 68 + z2: 63 + serverType: JERRYS_WORKSHOP + - id: sunken_pond + type: SUNKEN_JERRY_POND + x1: -68 + y1: 74 + z1: 106 + x2: -118 + y2: 56 + z2: 32 + serverType: JERRYS_WORKSHOP + - id: mount + type: MOUNT_JERRY + x1: -57 + y1: 81 + z1: -40 + x2: 51 + y2: 158 + z2: -104 + serverType: JERRYS_WORKSHOP + - id: hotsprings + type: HOT_SPRINGS + x1: -32 + y1: 82 + z1: -32 + x2: 60 + y2: 46 + z2: -86 + serverType: JERRYS_WORKSHOP + - id: hotsprings2 + type: HOT_SPRINGS + x1: -1 + y1: 74 + z1: -35 + x2: 101 + y2: 49 + z2: 12 + serverType: JERRYS_WORKSHOP + - id: glacial + type: GLACIAL_CAVE + x1: 56 + y1: 88 + z1: 20 + x2: 111 + y2: 63 + z2: 115 + serverType: JERRYS_WORKSHOP + - id: gary + type: GARYS_SHACK + x1: 56 + y1: 102 + z1: 52 + x2: 49 + y2: 118 + z2: 63 + serverType: JERRYS_WORKSHOP + - id: einary + type: EINARYS_EMPORIUM + x1: -12 + y1: 75 + z1: 60 + x2: -21 + y2: 86 + z2: 66 + serverType: JERRYS_WORKSHOP + - id: einary2 + type: EINARYS_EMPORIUM + x1: -21 + y1: 75 + z1: 66 + x2: -17 + y2: 84 + z2: 70 + serverType: JERRYS_WORKSHOP + - id: community_center + type: COMMUNITY_CENTER + x1: 12 + y1: 88 + z1: 6 + x2: -13 + y2: 71 + z2: 24 + serverType: SKYBLOCK_HUB + - id: community_center_2 + type: COMMUNITY_CENTER + x1: 11 + y1: 83 + z1: 11 + x2: 15 + y2: 78 + z2: 16 + serverType: SKYBLOCK_HUB + - id: auction + type: AUCTION_HOUSE + x1: -26 + y1: 71 + z1: -20 + x2: -44 + y2: 82 + z2: -6 + serverType: SKYBLOCK_HUB + - id: shens_auction + type: SHENS_AUCTION + x1: -37 + y1: 63 + z1: -22 + x2: -2 + y2: 52 + z2: -1 + serverType: SKYBLOCK_HUB + - id: bazaar + type: BAZAAR_ALLEY + x1: -30 + y1: 79 + z1: -21 + x2: -40 + y2: 71 + z2: -35 + serverType: SKYBLOCK_HUB + - id: bank + type: BANK + x1: -25 + y1: 80 + z1: -45 + x2: -33 + y2: 72 + z2: -35 + serverType: SKYBLOCK_HUB + - id: graveyard_1 + type: GRAVEYARD + x1: -73 + y1: 70 + z1: -101 + x2: -195 + y2: 121 + z2: -221 + serverType: SKYBLOCK_HUB + - id: crypts_1 + type: CRYPTS + x1: -176 + y1: 71 + z1: -120 + x2: -157 + y2: 60 + z2: -105 + serverType: SKYBLOCK_HUB + - id: crypts_2 + type: CRYPTS + x1: -155 + y1: 66 + z1: -98 + x2: -138 + y2: 57 + z2: -130 + serverType: SKYBLOCK_HUB + - id: crypts_3 + type: CRYPTS + x1: -164 + y1: 70 + z1: -115 + x2: -155 + y2: 58 + z2: -99 + serverType: SKYBLOCK_HUB + - id: crypts_4 + type: CRYPTS + x1: -138 + y1: 63 + z1: -97 + x2: -119 + y2: 40 + z2: -149 + serverType: SKYBLOCK_HUB + - id: crypts_5 + type: CRYPTS + x1: -119 + y1: 41 + z1: -144 + x2: -80 + y2: 57 + z2: -77 + serverType: SKYBLOCK_HUB + - id: crypts_6 + type: CRYPTS + x1: -43 + y1: 63 + z1: -143 + x2: -51 + y2: 53 + z2: -127 + serverType: SKYBLOCK_HUB + - id: crypts_7 + type: CRYPTS + x1: -51 + y1: 62 + z1: -135 + x2: -90 + y2: 46 + z2: -100 + serverType: SKYBLOCK_HUB + - id: wilderness + type: WILDERNESS + x1: 76 + y1: 76 + z1: 64 + x2: 175 + y2: 146 + z2: 201 + serverType: SKYBLOCK_HUB + - id: unincorporated + type: UNINCORPORATED + x1: 17 + y1: 79 + z1: 171 + x2: -32 + y2: 109 + z2: 134 + serverType: SKYBLOCK_HUB + - id: forest + type: FOREST + x1: -66 + y1: 62 + z1: -6 + x2: -204 + y2: 104 + z2: -72 + serverType: SKYBLOCK_HUB + - id: forest_camp + type: FORAGING_CAMP + x1: -151 + y1: 72 + z1: -50 + x2: -101 + y2: 87 + z2: -15 + serverType: SKYBLOCK_HUB + - id: library_3 + type: LIBRARY + x1: -71 + y1: 70 + z1: -74 + x2: -63 + y2: 78 + z2: -85 + serverType: SKYBLOCK_HUB + - id: thaumaturgist_3 + type: THAUMATURGIST + x1: -56 + y1: 69 + z1: -67 + x2: -62 + y2: 74 + z2: -60 + serverType: SKYBLOCK_HUB + - id: coalmine_1 + type: COAL_MINE + x1: 24 + y1: 61 + z1: -146 + x2: -31 + y2: 112 + z2: -199 + serverType: SKYBLOCK_HUB + - id: mining_district + type: MINING_DISTRICT + x1: -25 + y1: 55 + z1: -93 + x2: 23 + y2: 92 + z2: -142 + serverType: SKYBLOCK_HUB + - id: farm + type: FARM + x1: 28 + y1: 66 + z1: -74 + x2: 107 + y2: 106 + z2: -153 + serverType: SKYBLOCK_HUB + - id: fishing_outpost + type: FISHING_OUTPOST + x1: 92 + y1: 69 + z1: -21 + x2: 166 + y2: 95 + z2: -79 + serverType: SKYBLOCK_HUB + - id: museum_1 + type: PLAYER_MUSEUM + x1: 25 + y1: 78 + z1: -3 + x2: 42 + y2: 71 + z2: 5 + serverType: SKYBLOCK_HUB + - id: museum_2 + type: PLAYER_MUSEUM + x1: 21 + y1: 80 + z1: 4 + x2: 38 + y2: 70 + z2: 19 + serverType: SKYBLOCK_HUB + - id: museum_3 + type: PLAYER_MUSEUM + x1: 45 + y1: 84 + z1: 24 + x2: 13 + y2: 65 + z2: 53 + serverType: SKYBLOCK_HUB + - id: tangleburgs_path + type: TANGLEBURGS_PATH + x1: -533 + y1: 107 + z1: -32 + x2: -560 + y2: 122 + z2: 20 + serverType: SKYBLOCK_GALATEA diff --git a/docker-compose.yml b/docker-compose.yml index 1354845e86..aecbaa46ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,9 +9,7 @@ services: MONGO_INITDB_DATABASE: Minestom # Default database name MONGO_URL: hypixel_mongo volumes: - - ./configuration/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro - mongodb-data:/data/db - - ./configuration/:/csv ports: - "27017:27017" networks: diff --git a/setup/internal/installer/compose.go b/setup/internal/installer/compose.go index a474ba5540..62c45db930 100644 --- a/setup/internal/installer/compose.go +++ b/setup/internal/installer/compose.go @@ -28,9 +28,7 @@ services: MONGO_INITDB_DATABASE: Minestom MONGO_URL: hypixel_mongo volumes: - - ./configuration/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro - mongodb-data:/data/db - - ./configuration/:/csv %s networks: - hypixel_network healthcheck: diff --git a/type.skyblockgeneric/build.gradle.kts b/type.skyblockgeneric/build.gradle.kts index 84ac9197aa..149e9dceda 100644 --- a/type.skyblockgeneric/build.gradle.kts +++ b/type.skyblockgeneric/build.gradle.kts @@ -36,3 +36,9 @@ dependencies { implementation(libs.snakeyaml) implementation(libs.kotlin.stdlib) } + +tasks.processResources { + from(rootProject.file("configuration/skyblock/Minestom.fairysouls.yml")) + from(rootProject.file("configuration/skyblock/Minestom.regions.yml")) + from(rootProject.file("configuration/skyblock/Minestom.crystals.yml")) +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java index 49cc494f5e..03bddc81ac 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java @@ -51,6 +51,7 @@ import net.swofty.type.skyblockgeneric.collection.CollectionCategory; import net.swofty.type.skyblockgeneric.collection.CustomCollectionAward; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; +import net.swofty.type.skyblockgeneric.data.crystals.CrystalCatalog; import net.swofty.type.skyblockgeneric.data.monogdb.*; import net.swofty.type.skyblockgeneric.elections.ElectionManager; import net.swofty.type.skyblockgeneric.entity.ServerCrystalImpl; @@ -89,7 +90,6 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockScoreboard; import net.swofty.type.skyblockgeneric.user.StashReminder; import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoul; -import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoulZone; import net.swofty.type.skyblockgeneric.user.flow.SkyBlockPlayerDataFlow; import net.swofty.type.skyblockgeneric.user.island.SkyBlockIsland; import net.swofty.type.skyblockgeneric.user.statistics.PlayerStatistics; @@ -137,11 +137,8 @@ public void initialize(MinecraftServer server) { MongoClientSettings settings = MongoClientSettings.builder().applyConnectionString(cs).build(); MongoClient mongoClient = MongoClients.create(settings); - RegionDatabase.connect(mongoClient); IslandDatabase.connect(mongoClient); - FairySoulDatabase.connect(mongoClient); CoopDatabase.connect(mongoClient); - CrystalDatabase.connect(mongoClient); /** * Register items @@ -379,8 +376,7 @@ public void initialize(MinecraftServer server) { */ if (mainInstance != null) { ServerHolograms.spawnAll(HypixelConst.getInstanceContainer()); - String zone = typeLoader.getType().skyblockName(); - FairySoul.spawnEntities(HypixelConst.getInstanceContainer(), FairySoulZone.valueOf(zone.toUpperCase())); + FairySoul.spawnEntities(HypixelConst.getInstanceContainer(), typeLoader.getType()); } /** @@ -388,7 +384,7 @@ public void initialize(MinecraftServer server) { */ if (HypixelConst.getInstanceContainer() != null) { Thread.startVirtualThread(() -> { - CrystalDatabase.getAllCrystals().forEach(crystal -> { + CrystalCatalog.getAllCrystals().forEach(crystal -> { if (crystal.serverType != HypixelConst.getTypeLoader().getType()) return; ItemType type = crystal.itemType; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/AddCrystalCommand.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/AddCrystalCommand.java index ea2b04d3e7..0c362d2bb1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/AddCrystalCommand.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/AddCrystalCommand.java @@ -5,7 +5,7 @@ import net.swofty.type.generic.command.CommandParameters; import net.swofty.type.generic.command.HypixelCommand; import net.swofty.type.generic.user.categories.Rank; -import net.swofty.type.skyblockgeneric.data.monogdb.CrystalDatabase; +import net.swofty.type.skyblockgeneric.data.crystals.CrystalCatalog; import net.swofty.type.skyblockgeneric.entity.ServerCrystalImpl; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.components.ServerOrbComponent; @@ -37,7 +37,7 @@ public void registerUsage(MinestomCommand command) { ); crystal.setInstance(((SkyBlockPlayer) sender).getInstance(), ((SkyBlockPlayer) sender).getPosition()); - CrystalDatabase.addCrystal(item.getComponent(SkullHeadComponent.class).getSkullTexture(item), + CrystalCatalog.addCrystal(item.getComponent(SkullHeadComponent.class).getSkullTexture(item), ((SkyBlockPlayer) sender).getPosition(), type); }, itemType); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/RemoveOrbCommand.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/RemoveOrbCommand.java index 53a73dfda9..3592d27f9d 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/RemoveOrbCommand.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/commands/RemoveOrbCommand.java @@ -2,7 +2,7 @@ import net.swofty.type.generic.command.CommandParameters; import net.swofty.type.generic.command.HypixelCommand; -import net.swofty.type.skyblockgeneric.data.monogdb.CrystalDatabase; +import net.swofty.type.skyblockgeneric.data.crystals.CrystalCatalog; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import net.swofty.type.generic.user.categories.Rank; @@ -17,7 +17,7 @@ public void registerUsage(MinestomCommand command) { command.addSyntax((sender, context) -> { if (!permissionCheck(sender)) return; - new CrystalDatabase().removeCrystals(((SkyBlockPlayer) sender).getPosition(), 1.5); + CrystalCatalog.removeCrystals(((SkyBlockPlayer) sender).getPosition(), 1.5); }); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/crystals/CrystalCatalog.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/crystals/CrystalCatalog.java new file mode 100644 index 0000000000..18c6e29907 --- /dev/null +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/crystals/CrystalCatalog.java @@ -0,0 +1,153 @@ +package net.swofty.type.skyblockgeneric.data.crystals; + +import net.minestom.server.coordinate.Pos; +import net.swofty.commons.ServerType; +import net.swofty.commons.config.YamlConfigLoader; +import net.swofty.commons.skyblock.item.ItemType; +import net.swofty.type.generic.HypixelConst; +import org.tinylog.Logger; + +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +public final class CrystalCatalog { + private static final String RESOURCE = "/Minestom.crystals.yml"; + private static final Path LOCATION_FILE = Path.of("configuration/skyblock/Minestom.crystals.yml"); + private static final List CRYSTALS = new ArrayList<>(); + + private static CrystalConfiguration configuration; + private static boolean loaded; + + private CrystalCatalog() { + } + + public static synchronized List getFromAround(ServerType type, Pos position, double distance) { + load(); + List crystals = new ArrayList<>(); + for (CrystalEntry crystal : CRYSTALS) { + if (crystal.serverType != type || crystal.position.distance(position) > distance) { + continue; + } + crystals.add(crystal.toData()); + } + return crystals; + } + + public static synchronized List getAllCrystals() { + load(); + return CRYSTALS.stream().map(CrystalEntry::toData).toList(); + } + + public static synchronized void addCrystal(String url, Pos position, ItemType itemType) { + load(); + int id = CRYSTALS.stream().mapToInt(crystal -> crystal.id).max().orElse(0) + 1; + CRYSTALS.add(new CrystalEntry( + id, + url, + position, + itemType, + HypixelConst.getTypeLoader().getType())); + write(); + } + + public static synchronized void removeCrystals(Pos position, double distance) { + load(); + boolean removed = CRYSTALS.removeIf(crystal -> crystal.position.distance(position) <= distance); + if (removed) { + write(); + } + } + + private static void load() { + if (loaded) { + return; + } + + configuration = YamlConfigLoader.load( + LOCATION_FILE, + CrystalCatalog.class, + RESOURCE, + CrystalConfiguration.class + ); + if (configuration.crystals() == null) { + throw new IllegalStateException("Crystal catalog has no crystals list in " + LOCATION_FILE); + } + + for (int index = 0; index < configuration.crystals().size(); index++) { + CrystalDefinition definition = configuration.crystals().get(index); + try { + CRYSTALS.add(parseCrystal(definition)); + } catch (RuntimeException exception) { + Logger.error(exception, "Error parsing crystal catalog entry {} - skipping.", index + 1); + } + } + loaded = true; + } + + private static CrystalEntry parseCrystal(CrystalDefinition definition) { + String url = requireText(definition.url(), "url"); + Pos position = new Pos(definition.x(), definition.y(), definition.z()); + ServerType serverType = ServerType.getSkyblockServer( + requireText(definition.serverType(), "serverType").toUpperCase(Locale.ROOT)); + ItemType itemType = ItemType.valueOf( + requireText(definition.itemType(), "itemType").toUpperCase(Locale.ROOT)); + return new CrystalEntry(definition.id(), url, position, itemType, serverType); + } + + private static void write() { + configuration = new CrystalConfiguration(CRYSTALS.stream() + .map(crystal -> new CrystalDefinition( + crystal.id, + crystal.url, + crystal.position.x(), + crystal.position.y(), + crystal.position.z(), + crystal.serverType.name(), + crystal.itemType.name())) + .toList()); + YamlConfigLoader.save(LOCATION_FILE, CrystalConfiguration.class, configuration); + } + + private static String requireText(String value, String name) { + if (value == null) { + throw new IllegalArgumentException("Missing text field " + name); + } + return value; + } + + private record CrystalConfiguration(List crystals) { + } + + private record CrystalDefinition( + int id, + String url, + double x, + double y, + double z, + String serverType, + String itemType + ) { + } + + private record CrystalEntry(int id, String url, Pos position, ItemType itemType, ServerType serverType) { + private CrystalData toData() { + return new CrystalData(url, position.add(0.5, 0, 0.5), itemType, serverType); + } + } + + public static class CrystalData { + public final String url; + public final Pos position; + public final ItemType itemType; + public final ServerType serverType; + + private CrystalData(String url, Pos position, ItemType itemType, ServerType serverType) { + this.url = url; + this.position = position; + this.itemType = itemType; + this.serverType = serverType; + } + } +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/fairysouls/FairySoulCatalog.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/fairysouls/FairySoulCatalog.java new file mode 100644 index 0000000000..45d7538caf --- /dev/null +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/fairysouls/FairySoulCatalog.java @@ -0,0 +1,61 @@ +package net.swofty.type.skyblockgeneric.data.fairysouls; + +import net.minestom.server.coordinate.Pos; +import net.swofty.commons.config.YamlConfigLoader; +import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoul; +import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoulZone; + +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +public final class FairySoulCatalog { + private static final String CATALOG_RESOURCE = "/Minestom.fairysouls.yml"; + private static final Path LOCATION_FILE = Path.of("configuration/skyblock/Minestom.fairysouls.yml"); + private static final FairySoulConfiguration CONFIGURATION = YamlConfigLoader.load( + LOCATION_FILE, + FairySoulCatalog.class, + CATALOG_RESOURCE, + FairySoulConfiguration.class + ); + private static final List SOULS = load(CONFIGURATION); + + private FairySoulCatalog() { + } + + public static List getAllSouls() { + return SOULS; + } + + private static List load(FairySoulConfiguration configuration) { + if (configuration.souls() == null) { + throw new IllegalStateException("Fairy soul catalog has no souls list in " + LOCATION_FILE); + } + + List souls = new ArrayList<>(configuration.souls().size()); + for (int index = 0; index < configuration.souls().size(); index++) { + FairySoulDefinition definition = configuration.souls().get(index); + try { + FairySoulZone zone = FairySoulZone.valueOf(definition.zone()); + Pos location = zone.getServerType() == null + ? null + : new Pos(definition.x() + 0.5, definition.y(), definition.z() + 0.5); + souls.add(new FairySoul(definition.id(), location, zone)); + } catch (RuntimeException exception) { + throw invalidEntry(index, definition, exception); + } + } + + return List.copyOf(souls); + } + + private static IllegalStateException invalidEntry(int index, Object entry, RuntimeException cause) { + return new IllegalStateException("Invalid fairy soul catalog entry " + (index + 1) + ": " + entry, cause); + } + + private record FairySoulConfiguration(int max_souls, List souls) { + } + + private record FairySoulDefinition(int id, String zone, int x, int y, int z) { + } +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/CrystalDatabase.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/CrystalDatabase.java deleted file mode 100644 index 78e0beeec2..0000000000 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/CrystalDatabase.java +++ /dev/null @@ -1,119 +0,0 @@ -package net.swofty.type.skyblockgeneric.data.monogdb; - -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.Filters; -import net.minestom.server.coordinate.Pos; -import net.swofty.commons.ServerType; -import net.swofty.commons.skyblock.item.ItemType; -import net.swofty.type.generic.HypixelConst; -import org.bson.Document; -import org.tinylog.Logger; - -import java.util.ArrayList; -import java.util.List; - -public class CrystalDatabase { - public static MongoDatabase database; - public static MongoCollection collection; - - public static void connect(MongoClient client) { - database = client.getDatabase("Minestom"); - collection = database.getCollection("crystals"); - } - - public static Document getDocument(String key) { - return collection.find(Filters.eq("_id", key)).first(); - } - - public static List getFromAround(ServerType type, Pos pos, double distance) { - List crystals = new ArrayList<>(); - for (Document doc : collection.find()) { - if (ServerType.getSkyblockServer(doc.getString("serverType")) != type) { - continue; - } - double x = doc.getDouble("x"); - double y = doc.getDouble("y"); - double z = doc.getDouble("z"); - if (pos.distance(new Pos(x, y, z)) <= distance) { - Integer id = doc.getInteger("_id"); - String url = doc.getString("url"); - Double x1 = doc.getDouble("x"); - Double y1 = doc.getDouble("y"); - Double z1 = doc.getDouble("z"); - ItemType itemTypeLinker = ItemType.valueOf(doc.getString("itemType")); - ServerType serverType = ServerType.getSkyblockServer(doc.getString("serverType")); - - CrystalData crystal = new CrystalData(); - - crystal.url = url; - crystal.position = new Pos(x1 + 0.5, y1, z1 + 0.5); - crystal.itemType = itemTypeLinker; - crystal.serverType = serverType; - - crystals.add(crystal); - } - } - return crystals; - } - - public static void addCrystal(String url, Pos position, ItemType itemType) { - Document doc = new Document(); - doc.append("_id", Math.toIntExact((collection.countDocuments() + 1))); - doc.append("url", url); - doc.append("x", position.x()); - doc.append("y", position.y()); - doc.append("z", position.z()); - doc.append("itemType", itemType.name()); - doc.append("serverType", HypixelConst.getTypeLoader().getType().name()); - collection.insertOne(doc); - } - - public void removeCrystals(Pos position, double distance) { - for (Document doc : collection.find()) { - int x = doc.getInteger("x"); - int y = doc.getInteger("y"); - int z = doc.getInteger("z"); - if (position.distance(new Pos(x, y, z)) <= distance) { - collection.deleteOne(Filters.eq("_id", doc.getInteger("_id"))); - } - } - } - - public static List getAllCrystals() { - List crystals = new ArrayList<>(); - for (Document doc : collection.find()) { - Integer id = doc.getInteger("_id"); - String url = doc.getString("url"); - Double x = doc.getDouble("x"); - Double y = doc.getDouble("y"); - Double z = doc.getDouble("z"); - // Manually handle DB migrations - ItemType itemTypeLinker; - try { - itemTypeLinker = ItemType.valueOf(doc.getString("itemType")); - } catch (Exception e) { - Logger.error("Error parsing crystal data for crystal with ID " + id + " - skipping."); - continue; - } - - CrystalData crystal = new CrystalData(); - - crystal.url = url; - crystal.position = new Pos(x + 0.5, y, z + 0.5); - crystal.itemType = itemTypeLinker; - crystal.serverType = ServerType.getSkyblockServer(doc.getString("serverType")); - - crystals.add(crystal); - } - return crystals; - } - - public static class CrystalData { - public String url; - public Pos position; - public ItemType itemType; - public ServerType serverType; - } -} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/FairySoulDatabase.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/FairySoulDatabase.java deleted file mode 100644 index 17dc9a71d0..0000000000 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/FairySoulDatabase.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.swofty.type.skyblockgeneric.data.monogdb; - -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.Filters; -import net.minestom.server.coordinate.Pos; -import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoul; -import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoulZone; -import org.bson.Document; - -import java.util.ArrayList; -import java.util.List; - -public class FairySoulDatabase { - - public static MongoDatabase database; - public static MongoCollection collection; - - public static void connect(MongoClient client) { - database = client.getDatabase("Minestom"); - collection = database.getCollection("fairysouls"); - } - - public static Document getDocument(String key) { - return collection.find(Filters.eq("_id", key)).first(); - } - - public static List getAllSouls() { - List souls = new ArrayList<>(); - for (Document doc : collection.find()) { - int id = doc.getInteger("_id"); - FairySoulZone zone = FairySoulZone.valueOf(doc.getString("zone")); - int x = doc.getInteger("x"); - int y = doc.getInteger("y"); - int z = doc.getInteger("z"); - FairySoul soul = new FairySoul( - id, - new Pos(x + 0.5, y, z + 0.5), - zone - ); - souls.add(soul); - } - return souls; - } -} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/RegionDatabase.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/RegionDatabase.java deleted file mode 100644 index c34c08a691..0000000000 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/monogdb/RegionDatabase.java +++ /dev/null @@ -1,117 +0,0 @@ -package net.swofty.type.skyblockgeneric.data.monogdb; - -import com.mongodb.client.FindIterable; -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.Filters; -import com.mongodb.client.model.Updates; -import net.minestom.server.coordinate.Pos; -import net.swofty.commons.ServerType; -import net.swofty.type.generic.data.mongodb.MongoDB; -import net.swofty.type.skyblockgeneric.region.RegionType; -import net.swofty.type.skyblockgeneric.region.SkyBlockRegion; -import org.bson.Document; - -import java.util.ArrayList; -import java.util.List; - -public record RegionDatabase(String id) implements MongoDB { - public static MongoDatabase database; - public static MongoCollection collection; - - public static void connect(MongoClient client) { - database = client.getDatabase("Minestom"); - collection = database.getCollection("regions"); - } - - public static List getAllRegions() { - List regions = new ArrayList<>(); - for (Document doc : collection.find()) { - String name = doc.getString("_id"); - RegionType type; - try { - type = RegionType.valueOf(doc.getString("type")); - } catch (IllegalArgumentException e) { - continue; - //throw new IllegalArgumentException("Region " + name + " has an invalid type: " + doc.getString("type")); - } - int x1 = doc.getInteger("x1"); - int y1 = doc.getInteger("y1"); - int z1 = doc.getInteger("z1"); - int x2 = doc.getInteger("x2"); - int y2 = doc.getInteger("y2"); - int z2 = doc.getInteger("z2"); - ServerType serverType = ServerType.getSkyblockServer(doc.getOrDefault("serverType", ServerType.SKYBLOCK_HUB.name()).toString()); - SkyBlockRegion region = new SkyBlockRegion( - name, - new Pos(x1, y1, z1), - new Pos(x2, y2, z2), - type, - serverType); - regions.add(region); - } - return regions; - } - - @Override - public void set(String key, Object value) { - insertOrUpdate(key, value); - } - - @Override - public Object get(String key, Object def) { - Document doc = collection.find(Filters.eq("_id", id)).first(); - if (doc == null) { - return def; - } - return doc.get(key); - } - - public List getAll() { - FindIterable results = collection.find(); - List list = new ArrayList<>(); - for (Document doc : results) { - list.add(doc); - } - return list; - } - - public Document getDocument() { - Document query = new Document("_id", id); - return collection.find(query).first(); - } - - @Override - public boolean remove(String id) { - Document query = new Document("_id", id); - Document found = collection.find(query).first(); - - if (found == null) { - return false; - } - - collection.deleteOne(query); - return true; - } - - public void insertOrUpdate(String key, Object value) { - if (exists()) { - Document query = new Document("_id", id); - Document found = collection.find(query).first(); - - assert found != null; - collection.updateOne(found, Updates.set(key, value)); - return; - } - Document New = new Document("_id", id); - New.append(key, value); - collection.insertOne(New); - } - - public boolean exists() { - Document query = new Document("_id", id); - Document found = collection.find(query).first(); - return found != null; - } -} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/regions/RegionCatalog.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/regions/RegionCatalog.java new file mode 100644 index 0000000000..274e0def6a --- /dev/null +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/regions/RegionCatalog.java @@ -0,0 +1,126 @@ +package net.swofty.type.skyblockgeneric.data.regions; + +import net.minestom.server.coordinate.Pos; +import net.swofty.commons.ServerType; +import net.swofty.commons.config.YamlConfigLoader; +import net.swofty.type.skyblockgeneric.region.RegionType; +import net.swofty.type.skyblockgeneric.region.SkyBlockRegion; + +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +public final class RegionCatalog { + private static final String RESOURCE = "/Minestom.regions.yml"; + private static final Path LOCATION_FILE = Path.of("configuration/skyblock/Minestom.regions.yml"); + private static final List REGIONS = new ArrayList<>(); + + private static RegionConfiguration configuration; + private static boolean loaded; + + private RegionCatalog() { + } + + public static synchronized List getAllRegions() { + load(); + return List.copyOf(REGIONS); + } + + public static synchronized void save(SkyBlockRegion region) { + load(); + REGIONS.removeIf(existing -> existing.getName().equalsIgnoreCase(region.getName())); + REGIONS.add(region); + write(); + } + + public static synchronized void delete(String id) { + load(); + REGIONS.removeIf(existing -> existing.getName().equalsIgnoreCase(id)); + write(); + } + + private static void load() { + if (loaded) { + return; + } + + configuration = YamlConfigLoader.load( + LOCATION_FILE, + RegionCatalog.class, + RESOURCE, + RegionConfiguration.class + ); + if (configuration.regions() == null) { + throw new IllegalStateException("Region catalog has no regions list in " + LOCATION_FILE); + } + + for (int index = 0; index < configuration.regions().size(); index++) { + REGIONS.add(parseRegion(index, configuration.regions().get(index))); + } + loaded = true; + } + + private static SkyBlockRegion parseRegion(int index, RegionDefinition definition) { + try { + String name = requireText(definition.id(), "id"); + RegionType type = RegionType.valueOf(requireText(definition.type(), "type").toUpperCase(Locale.ROOT)); + ServerType serverType = ServerType.getSkyblockServer( + definition.serverType() == null + ? ServerType.SKYBLOCK_HUB.name() + : definition.serverType().toUpperCase(Locale.ROOT)); + + return new SkyBlockRegion( + name, + new Pos(definition.x1(), definition.y1(), definition.z1()), + new Pos(definition.x2(), definition.y2(), definition.z2()), + type, + serverType); + } catch (RuntimeException exception) { + throw invalidEntry(index, definition, exception); + } + } + + private static void write() { + configuration = new RegionConfiguration(REGIONS.stream() + .map(region -> new RegionDefinition( + region.getName(), + region.getType().name(), + region.getFirstLocation().blockX(), + region.getFirstLocation().blockY(), + region.getFirstLocation().blockZ(), + region.getSecondLocation().blockX(), + region.getSecondLocation().blockY(), + region.getSecondLocation().blockZ(), + region.getServerType().name())) + .toList()); + YamlConfigLoader.save(LOCATION_FILE, RegionConfiguration.class, configuration); + } + + private static String requireText(String value, String name) { + if (value == null) { + throw new IllegalArgumentException("Missing text field " + name); + } + return value; + } + + private static IllegalStateException invalidEntry(int index, Object entry, RuntimeException cause) { + return new IllegalStateException("Invalid region catalog entry " + (index + 1) + ": " + entry, cause); + } + + private record RegionConfiguration(List regions) { + } + + private record RegionDefinition( + String id, + String type, + int x1, + int y1, + int z1, + int x2, + int y2, + int z2, + String serverType + ) { + } +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java index e03100b5ec..f2a3031a07 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java @@ -19,19 +19,19 @@ public class GUIFairySoulsGuide extends StatelessView { private static final int[] LOCATION_SLOTS = { 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, - 28 + 28, 29, 30 }; @Override public ViewConfiguration configuration() { - return ViewConfiguration.translatable("gui_sbmenu.questlog.fairy_souls_guide.title", InventoryType.CHEST_5_ROW); + return ViewConfiguration.translatable("gui_sbmenu.questlog.fairy_souls_guide.title", InventoryType.CHEST_6_ROW); } @Override public void layout(ViewLayout layout, DefaultState state, ViewContext ctx) { Components.fill(layout); - Components.close(layout, 40); - Components.back(layout, 39, ctx); + Components.close(layout, 53); + Components.back(layout, 52, ctx); // Miscellaneous fairy souls layout.slot(10, (s, c) -> { @@ -85,7 +85,9 @@ private enum FairySouls { GOLD_MINE("Gold Mine", "73bc965d579c3c6039f0a17eb7c2e6faf538c7a5de8e60ec7a719360d0a857a9", FairySoulZone.GOLD_MINE), THE_PARK("The Park", "a221f813dacee0fef8c59f76894dbb26415478d9ddfc44c2e708a6d3b7549b", FairySoulZone.THE_PARK), GALATEA("Galatea", "a211ac81698c229d8ef2fae89f62a6a961b30d8b82b97161863090e90bff02a5", FairySoulZone.GALATEA), - BACKWATER_BAYOU("Backwater Bayou", "1c0cd33590f64d346d98cdd01606938742e715dda6737353306a44f81c8ba426", FairySoulZone.BACKWATER_BAYOU); + BACKWATER_BAYOU("Backwater Bayou", "1c0cd33590f64d346d98cdd01606938742e715dda6737353306a44f81c8ba426", FairySoulZone.BACKWATER_BAYOU), + LOTUS_ATOLL("Lotus Atoll", "1c0cd33590f64d346d98cdd01606938742e715dda6737353306a44f81c8ba426", FairySoulZone.LOTUS_ATOLL), + SAFARI("Safari", "686718d85e25b006f2c8f160f619b23c8fd6ae75ddf1c06308ec0f539d931703", FairySoulZone.SAFARI); private final String regionName; private final String texture; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java index f049870cfd..ca2fb667cf 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java @@ -15,12 +15,12 @@ import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.calendar.SkyBlockCalendar; -import net.swofty.type.skyblockgeneric.data.monogdb.FairySoulDatabase; import net.swofty.type.skyblockgeneric.mission.MissionData; import net.swofty.type.skyblockgeneric.mission.MissionSet; import net.swofty.type.skyblockgeneric.mission.SkyBlockMission; import net.swofty.type.skyblockgeneric.mission.SkyBlockProgressMission; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; +import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoul; import java.util.ArrayList; import java.util.Arrays; @@ -70,7 +70,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockPlayer player = (SkyBlockPlayer) c.player(); return TranslatableItemStackCreator.getStackHead("gui_sbmenu.questlog.fairy_souls", "b96923ad247310007f6ae5d326d847ad53864cf16c3565a181dc8e6b20be2387", 1, - "gui_sbmenu.questlog.fairy_souls.lore", Component.text(String.valueOf(player.getFairySoulHandler().getTotalFoundFairySouls())), Component.text(String.valueOf(FairySoulDatabase.getAllSouls().size()))); + "gui_sbmenu.questlog.fairy_souls.lore", Component.text(String.valueOf(player.getFairySoulHandler().getTotalFoundFairySouls())), Component.text(String.valueOf(FairySoul.getFairySouls().size()))); }, (_, c) -> { c.push(new GUIFairySoulsGuide()); }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/SkyBlockRegion.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/SkyBlockRegion.java index 01c310d6a5..e5a40d1688 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/SkyBlockRegion.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/SkyBlockRegion.java @@ -8,7 +8,7 @@ import net.minestom.server.instance.Instance; import net.swofty.commons.ServerType; import net.swofty.type.generic.HypixelConst; -import net.swofty.type.skyblockgeneric.data.monogdb.RegionDatabase; +import net.swofty.type.skyblockgeneric.data.regions.RegionCatalog; import net.swofty.type.skyblockgeneric.entity.mob.SkyBlockMob; import org.jetbrains.annotations.Nullable; @@ -25,8 +25,6 @@ public class SkyBlockRegion { private static final Map REGION_CACHE = new HashMap<>(); private final String name; - private final RegionDatabase regionDatabase; - private Pos firstLocation; private Pos secondLocation; private RegionType type; @@ -37,22 +35,11 @@ public SkyBlockRegion(String name, Pos firstLocation, Pos secondLocation, Region this.firstLocation = firstLocation; this.secondLocation = secondLocation; this.type = type; - this.regionDatabase = new RegionDatabase(name); this.serverType = serverType; } public void save() { - regionDatabase.insertOrUpdate("x1", firstLocation.blockX()); - regionDatabase.insertOrUpdate("y1", firstLocation.blockY()); - regionDatabase.insertOrUpdate("z1", firstLocation.blockZ()); - - regionDatabase.insertOrUpdate("x2", secondLocation.blockX()); - regionDatabase.insertOrUpdate("y2", secondLocation.blockY()); - regionDatabase.insertOrUpdate("z2", secondLocation.blockZ()); - - regionDatabase.insertOrUpdate("type", type.name()); - regionDatabase.insertOrUpdate("serverType", serverType.name()); - + RegionCatalog.save(this); REGION_CACHE.put(name, this); } @@ -104,7 +91,7 @@ public Pos getRandomPosition() { public void delete() { REGION_CACHE.remove(name); - regionDatabase.remove(name); + RegionCatalog.delete(name); } public static List getRegions() { @@ -206,16 +193,16 @@ public List getBounds() { } public static void cacheRegions() { - for (SkyBlockRegion region : RegionDatabase.getAllRegions()) { + REGION_CACHE.clear(); + for (SkyBlockRegion region : RegionCatalog.getAllRegions()) { if (region.getType() == null || region.getType() == RegionType.PRIVATE_ISLAND) { - region.delete(); - } else { - ServerType typeOfRegion = region.getServerType(); - if (typeOfRegion != HypixelConst.getTypeLoader().getType()) - continue; - - REGION_CACHE.put(region.getName(), region); + continue; } + ServerType typeOfRegion = region.getServerType(); + if (typeOfRegion != HypixelConst.getTypeLoader().getType()) + continue; + + REGION_CACHE.put(region.getName(), region); } REGION_CACHE.put("island", new SkyBlockRegion("island", new Pos(0, 0, 0), diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/mining/configurations/WheatAndFlowersConfiguration.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/mining/configurations/WheatAndFlowersConfiguration.java index 8cf8d5bf69..e269c946d2 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/mining/configurations/WheatAndFlowersConfiguration.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/region/mining/configurations/WheatAndFlowersConfiguration.java @@ -7,7 +7,7 @@ import net.minestom.server.item.Material; import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.HypixelConst; -import net.swofty.type.skyblockgeneric.data.monogdb.CrystalDatabase; +import net.swofty.type.skyblockgeneric.data.crystals.CrystalCatalog; import net.swofty.type.skyblockgeneric.region.SkyBlockRegenConfiguration; import net.swofty.type.skyblockgeneric.utility.groups.Groups; @@ -37,7 +37,7 @@ public MiningTask handleStageTwo(MiningTask task, Pos brokenBlock) { public List getMineableBlocks(Instance instance, Point point) { ArrayList materials = new ArrayList<>(Collections.singletonList(Material.WHEAT)); - if (CrystalDatabase.getFromAround(HypixelConst.getTypeLoader().getType(), point.asPos(), 15) + if (CrystalCatalog.getFromAround(HypixelConst.getTypeLoader().getType(), point.asPos(), 15) .stream().anyMatch(crystal -> crystal.itemType == ItemType.FLOWER_CRYSTAL)) { materials.addAll(new ArrayList<>(Groups.FLOWERS)); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/FairySoulHandler.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/FairySoulHandler.java index 274fb22678..16b6d21823 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/FairySoulHandler.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/FairySoulHandler.java @@ -1,6 +1,5 @@ package net.swofty.type.skyblockgeneric.user; -import net.swofty.type.skyblockgeneric.data.monogdb.FairySoulDatabase; import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoul; import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoulZone; @@ -9,7 +8,8 @@ public record FairySoulHandler(SkyBlockPlayer player) { public int getFound(FairySoulZone zone) { int amount = 0; for (Integer id : player.getFairySouls().getAllFairySouls()) { - if (FairySoulDatabase.getAllSouls().get(id).getZone() == zone) { + FairySoul soul = FairySoul.getFairySoul(id); + if (soul != null && soul.getZone() == zone) { amount++; } } @@ -18,7 +18,7 @@ public int getFound(FairySoulZone zone) { public int getMax(FairySoulZone zone) { int amount = 0; - for (FairySoul soul : FairySoulDatabase.getAllSouls()) { + for (FairySoul soul : FairySoul.getFairySouls()) { if (soul.getZone() == zone) { amount++; } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoul.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoul.java index ddd9a9d0a4..0047f7d5f2 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoul.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoul.java @@ -4,20 +4,21 @@ import lombok.Setter; import net.minestom.server.coordinate.Pos; import net.minestom.server.instance.Instance; +import net.swofty.commons.ServerType; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointFairySouls; -import net.swofty.type.skyblockgeneric.data.monogdb.FairySoulDatabase; +import net.swofty.type.skyblockgeneric.data.fairysouls.FairySoulCatalog; import net.swofty.type.skyblockgeneric.entity.EntityFairySoul; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @Getter public class FairySoul { - private static final Map SOULS_CACHE = new HashMap<>(); + private static final Map SOULS_CACHE = new LinkedHashMap<>(); @Getter private int id; @@ -38,9 +39,14 @@ public void delete() { } public void spawnEntity(Instance instance) { + if (location == null || getServerType() == null) return; new EntityFairySoul(this).spawn(instance); } + public ServerType getServerType() { + return zone.getServerType(); + } + public void collect(SkyBlockPlayer player) { DatapointFairySouls.PlayerFairySouls fairySouls = player.getFairySouls(); if (!fairySouls.getAllFairySouls().contains(id)) { @@ -67,12 +73,9 @@ public static FairySoul getFairySoul(int id) { } public static void cacheFairySouls() { - for (FairySoul soul : FairySoulDatabase.getAllSouls()) { - if (soul.getZone() == null) { - soul.delete(); - } else { - SOULS_CACHE.put(soul.getId(), soul); - } + SOULS_CACHE.clear(); + for (FairySoul soul : FairySoulCatalog.getAllSouls()) { + SOULS_CACHE.put(soul.getId(), soul); } } @@ -87,4 +90,11 @@ public static void spawnEntities(Instance instance, FairySoulZone zone) { }); } + public static void spawnEntities(Instance instance, ServerType serverType) { + getFairySouls().forEach(soul -> { + if (soul.getServerType() == serverType) + soul.spawnEntity(instance); + }); + } + } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoulZone.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoulZone.java index ad31a5ced8..997e987b60 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoulZone.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/fairysouls/FairySoulZone.java @@ -1,23 +1,37 @@ package net.swofty.type.skyblockgeneric.user.fairysouls; +import lombok.Getter; +import net.swofty.commons.ServerType; + +@Getter public enum FairySoulZone { - HUB, - DUNGEON_HUB, - GOLD_MINE, - DEEP_CAVERNS, - DWARVEN_MINES, - THE_FARMING_ISLANDS, - THE_PARK, - GALATEA, - BACKWATER_BAYOU, - SPIDERS_DEN, - THE_END, - CRIMSON_ISLE, - JERRYS_WORKSHOP, - THE_RIFT, - MISC_DUNGEONS, - MISC_FISHING, - MISC_GARDEN, - MISC_PLACEABLE, - MISC_GLACITE_MINESHAFTS, + HUB(ServerType.SKYBLOCK_HUB), + DUNGEON_HUB(ServerType.SKYBLOCK_DUNGEON_HUB), + GOLD_MINE(ServerType.SKYBLOCK_GOLD_MINE), + DEEP_CAVERNS(ServerType.SKYBLOCK_DEEP_CAVERNS), + DWARVEN_MINES(ServerType.SKYBLOCK_DWARVEN_MINES), + THE_FARMING_ISLANDS(ServerType.SKYBLOCK_THE_FARMING_ISLANDS), + THE_PARK(ServerType.SKYBLOCK_THE_PARK), + GALATEA(ServerType.SKYBLOCK_GALATEA), + BACKWATER_BAYOU(ServerType.SKYBLOCK_BACKWATER_BAYOU), + SPIDERS_DEN(ServerType.SKYBLOCK_SPIDERS_DEN), + THE_END(ServerType.SKYBLOCK_THE_END), + CRIMSON_ISLE(ServerType.SKYBLOCK_CRIMSON_ISLE), + JERRYS_WORKSHOP(ServerType.SKYBLOCK_JERRYS_WORKSHOP), + LOTUS_ATOLL(ServerType.SKYBLOCK_LOTUS_ATOLL), + SAFARI(ServerType.SKYBLOCK_SAFARI), + THE_RIFT(null), + MISC_DUNGEONS(null), + MISC_FISHING(null), + MISC_GARDEN(null), + MISC_PLACEABLE(null), + MISC_GLACITE_MINESHAFTS(null), + + ; + + private final ServerType serverType; + + FairySoulZone(ServerType serverType) { + this.serverType = serverType; + } } diff --git a/type.skyblockgeneric/src/test/java/net/swofty/type/skyblockgeneric/data/StaticCatalogTest.java b/type.skyblockgeneric/src/test/java/net/swofty/type/skyblockgeneric/data/StaticCatalogTest.java new file mode 100644 index 0000000000..a7a39e8d19 --- /dev/null +++ b/type.skyblockgeneric/src/test/java/net/swofty/type/skyblockgeneric/data/StaticCatalogTest.java @@ -0,0 +1,26 @@ +package net.swofty.type.skyblockgeneric.data; + +import net.swofty.commons.ServerType; +import net.swofty.type.skyblockgeneric.data.crystals.CrystalCatalog; +import net.swofty.type.skyblockgeneric.data.regions.RegionCatalog; +import net.swofty.type.skyblockgeneric.region.RegionType; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class StaticCatalogTest { + @Test + void loadsRegionsFromYaml() { + assertEquals(82, RegionCatalog.getAllRegions().size()); + assertEquals(RegionType.VILLAGE, RegionCatalog.getAllRegions().getFirst().getType()); + assertEquals(ServerType.SKYBLOCK_HUB, RegionCatalog.getAllRegions().getFirst().getServerType()); + } + + @Test + void loadsCrystalsFromYaml() { + assertEquals(12, CrystalCatalog.getAllCrystals().size()); + assertTrue(CrystalCatalog.getAllCrystals().stream() + .anyMatch(crystal -> crystal.itemType.name().equals("FLOWER_CRYSTAL"))); + } +} diff --git a/type.skyblockgeneric/src/test/java/net/swofty/type/skyblockgeneric/data/fairysouls/FairySoulCatalogTest.java b/type.skyblockgeneric/src/test/java/net/swofty/type/skyblockgeneric/data/fairysouls/FairySoulCatalogTest.java new file mode 100644 index 0000000000..10821c4c48 --- /dev/null +++ b/type.skyblockgeneric/src/test/java/net/swofty/type/skyblockgeneric/data/fairysouls/FairySoulCatalogTest.java @@ -0,0 +1,20 @@ +package net.swofty.type.skyblockgeneric.data.fairysouls; + +import net.swofty.commons.ServerType; +import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoul; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class FairySoulCatalogTest { + @Test + void loadsTheCompleteCatalog() { + FairySoul.cacheFairySouls(); + assertEquals(289, FairySoulCatalog.getAllSouls().size()); + assertEquals(271, FairySoulCatalog.getAllSouls().stream().filter(soul -> soul.getLocation() != null).count()); + assertEquals(ServerType.SKYBLOCK_LOTUS_ATOLL, FairySoul.getFairySoul(268).getServerType()); + assertEquals(ServerType.SKYBLOCK_SAFARI, FairySoul.getFairySoul(286).getServerType()); + assertNotNull(FairySoul.getFairySoul(225)); + } +} diff --git a/website/docs/reference/configuration.md b/website/docs/reference/configuration.md index bf1b3dbc32..7429a71a9c 100644 --- a/website/docs/reference/configuration.md +++ b/website/docs/reference/configuration.md @@ -159,6 +159,3 @@ MongoDB collections created automatically: | `auction_inactive` | Completed auctions | | `orders` | Bazaar orders | | `tracked_items` | Item tracking | -| `regions` | World regions | -| `fairysouls` | Fairy soul locations | -| `crystals` | Hub crystal locations | diff --git a/website/docs/reference/server-types.md b/website/docs/reference/server-types.md index d029e6ea2d..72eed6fd49 100644 --- a/website/docs/reference/server-types.md +++ b/website/docs/reference/server-types.md @@ -22,6 +22,8 @@ These server types are part of the SkyBlock gamemode and share SkyBlock-specific | `SKYBLOCK_GALATEA` | Galatea | `hypixel_skyblock_galatea.polar` | | `SKYBLOCK_BACKWATER_BAYOU` | Backwater Bayou | `hypixel_skyblock_backwater_bayou.polar` | | `SKYBLOCK_JERRYS_WORKSHOP` | Jerry's Workshop | `hypixel_skyblock_jerrys_workshop.polar` | +| `SKYBLOCK_LOTUS_ATOLL` | Lotus Atoll | Not bundled | +| `SKYBLOCK_SAFARI` | Safari | Not bundled | ### Starting a SkyBlock Server ```bash diff --git a/website/docs/setup/game-servers.md b/website/docs/setup/game-servers.md index 282e4a2114..d4d9ca5414 100644 --- a/website/docs/setup/game-servers.md +++ b/website/docs/setup/game-servers.md @@ -22,6 +22,9 @@ gameserver/ │ │ ├── levels/ │ │ ├── reforges/ │ │ ├── skills/ +│ │ ├── Minestom.fairysouls.yml +│ │ ├── Minestom.regions.yml +│ │ ├── Minestom.crystals.yml │ │ ├── pack_textures/ # Optional │ │ └── songs/ # Optional │ ├── bedwars/ # BedWars maps (.polar) @@ -73,6 +76,7 @@ Download from [configuration/skyblock](https://github.com/Swofty-Developments/Hy - `reforges/` folder → `configuration/skyblock/reforges/` - `items/` folder → `configuration/skyblock/items/` - `collections/` folder → `configuration/skyblock/collections/` +- `Minestom.fairysouls.yml`, `Minestom.regions.yml`, `Minestom.crystals.yml` → `configuration/skyblock/` - `songs/` folder → `configuration/skyblock/songs/` (optional) ### 5. Setup PicoLimbo @@ -109,28 +113,6 @@ java -jar HypixelCore.jar SKYBLOCK_HUB java -jar HypixelCore.jar SKYBLOCK_HUB ``` -## Database Setup - -After starting your first server, import the required data into MongoDB: - -### Regions (Required) - -1. Download [`Minestom.regions.csv`](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration/skyblock) -2. Import to the `regions` collection in MongoDB -3. Restart the server - -### Fairy Souls (Optional) - -1. Download [`Minestom.fairysouls.csv`](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration/skyblock) -2. Import to the `fairysouls` collection - -### Hub Crystals (Optional) - -1. Download [`Minestom.crystals.csv`](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration/skyblock) -2. Import to the `crystals` collection - -Or use the `/addcrystal` command in-game. - ## Admin Setup To give yourself admin permissions: diff --git a/website/docs/troubleshooting.md b/website/docs/troubleshooting.md index 1aab958d44..cac6df974b 100644 --- a/website/docs/troubleshooting.md +++ b/website/docs/troubleshooting.md @@ -44,13 +44,12 @@ Common issues and their solutions. ### "You have strayed too far from spawn!" -**Cause**: Regions not imported correctly +**Cause**: The static region catalog is missing or invalid **Solution**: -1. Download `Minestom.regions.csv` from the configuration folder -2. Import it to the `regions` collection in MongoDB -3. Restart the game server +1. Ensure `configuration/skyblock/Minestom.regions.yml` exists +2. Restart the game server ### Data saving issues between changing servers @@ -103,13 +102,13 @@ Common issues and their solutions. ### Missing Hub Features -**Cause**: Data not imported +**Cause**: Required world data or static catalogs are missing -**Solution**: Import these CSV files to MongoDB: +**Solution**: -- `Minestom.regions.csv` → `regions` -- `Minestom.fairysouls.csv` → `fairysouls` -- `Minestom.crystals.csv` → `crystals` +- Ensure `configuration/skyblock/Minestom.fairysouls.yml` exists +- Ensure `configuration/skyblock/Minestom.regions.yml` exists +- Ensure `configuration/skyblock/Minestom.crystals.yml` exists ## Docker Issues