diff --git a/.gitignore b/.gitignore index f4c0f58de..e380e6cec 100644 --- a/.gitignore +++ b/.gitignore @@ -41,5 +41,8 @@ build/ ### Mac OS ### .DS_Store + +### Islands ### /configuration/hypixel_island_template/ /configuration/hypixel_hub/ +/configuration/hypixel_prototype_lobby/ diff --git a/README.md b/README.md index d24dea06d..dc3b186df 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ A video of me going through the guide [can be found here](https://www.youtube.co 3. Download `resources.json` from [here](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration) 4. Move this file into the `configuration` folder you just made. 5. Download the [world files for the SkyBlock Hub, Prototype Lobby, and Island worlds.](https://www.mediafire.com/file/xxnxgkqejlh17fn/HypixelRecreationWorlds.zip/file) -6. Get the Hypixel SkyBlock hub from the above download and put it in the configuration folder you made under the name `hypixel_hub`, and the Prototype Lobby under `hypixel_prototype_lobby`. +6. Get the Hypixel SkyBlock hub from the above download and put it in the configuration folder you made under the name `hypixel_skyblock_hub`, and the Prototype Lobby under `hypixel_prototype_lobby`. 7. Get the Hypixel Island default template from the above download and put it in the configuration folder you made under the name `hypixel_island_template`. 8. Get the item and collection folders from [here](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration) and put them into your configuration folder. 9. There should be a `forwarding.secret` file where your Velocity JAR is, take this and put it into your `resources.json` under `velocity-secret`. diff --git a/commons/src/main/java/net/swofty/commons/ServerType.java b/commons/src/main/java/net/swofty/commons/ServerType.java index f6181467c..6a7e44bdd 100644 --- a/commons/src/main/java/net/swofty/commons/ServerType.java +++ b/commons/src/main/java/net/swofty/commons/ServerType.java @@ -6,8 +6,8 @@ public enum ServerType { SKYBLOCK_ISLAND(true), SKYBLOCK_HUB(true), - DUNGEON_HUB(true), - THE_FARMING_ISLANDS(true), + SKYBLOCK_DUNGEON_HUB(true), + SKYBLOCK_THE_FARMING_ISLANDS(true), PROTOTYPE_LOBBY(false), BEDWARS_LOBBY(false), BEDWARS_GAME(false), @@ -29,4 +29,16 @@ public static boolean isServerType(String type) { public String formatName() { return StringUtility.toNormalCase(name()); } + + public static ServerType getSkyblockServer(String name) { + if (!name.startsWith("SKYBLOCK_")) { + return valueOf("SKYBLOCK_" + name.toUpperCase()); + } else { + return valueOf(name); + } + } + + public String skyblockName() { + return name().replace("SKYBLOCK_", ""); + } } diff --git a/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/TypeDungeonHubLoader.java b/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/TypeDungeonHubLoader.java index 6ebe3cf80..060c6b2f9 100644 --- a/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/TypeDungeonHubLoader.java +++ b/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/TypeDungeonHubLoader.java @@ -30,7 +30,7 @@ public class TypeDungeonHubLoader implements SkyBlockTypeLoader { @Override public ServerType getType() { - return ServerType.DUNGEON_HUB; + return ServerType.SKYBLOCK_DUNGEON_HUB; } @Override diff --git a/type.hub/src/main/java/net/swofty/type/hub/TypeHubLoader.java b/type.hub/src/main/java/net/swofty/type/hub/TypeHubLoader.java index 0dff45b39..d4de67d1f 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/TypeHubLoader.java +++ b/type.hub/src/main/java/net/swofty/type/hub/TypeHubLoader.java @@ -48,12 +48,12 @@ public void onInitialize(MinecraftServer server) { @Override public void afterInitialize(MinecraftServer server) { - RuneEntityImpl firstStone = new RuneEntityImpl(new Pos(-37.2, 68.40, -129.15, 0, 0f), false); - RuneEntityImpl secondStone = new RuneEntityImpl(new Pos( -37.82, 68.40, -129.15, 0, 0f), false); - RuneEntityImpl thirdStone = new RuneEntityImpl(new Pos(-37.2, 68.40, -129.775, 0, 0f), false); - RuneEntityImpl fourthStone = new RuneEntityImpl(new Pos(-37.82, 68.40, -129.775, 0, 0f), false); - RuneEntityImpl head = new RuneEntityImpl(new Pos(-37.5, 69.20, -129.4, -70, 0f), true); - Pos runePos = new Pos(-37.5, 70, -129.5, 0, 0f); + RuneEntityImpl firstStone = new RuneEntityImpl(new Pos(-37.84375, 68.3125, -129.8125, 0, 0f), false); + RuneEntityImpl secondStone = new RuneEntityImpl(new Pos( -37.21875, 68.3125, -129.8125, 0, 0f), false); + RuneEntityImpl thirdStone = new RuneEntityImpl(new Pos(-37.21875, 68.3125, -129.1875, 0, 0f), false); + RuneEntityImpl fourthStone = new RuneEntityImpl(new Pos(-37.84375, 68.3125, -129.1875, 0, 0f), false); + RuneEntityImpl head = new RuneEntityImpl(new Pos(-37.65625, 69.09375, -129.34375, 45, 0f), true); + Pos runePos = new Pos(-37.84375, 68.3125, -129.8125, 0, 0f); AtomicReference i = new AtomicReference<>(0D); MinecraftServer.getSchedulerManager().scheduleTask(() -> { @@ -102,8 +102,8 @@ public void afterInitialize(MinecraftServer server) { public LoaderValues getLoaderValues() { return new LoaderValues( (type) -> switch (type) { - case THE_FARMING_ISLANDS -> new Pos(74, 72, -180, 35, 0); - case DUNGEON_HUB -> new Pos(-44, 88, 11.5, 0, 0); + case SKYBLOCK_THE_FARMING_ISLANDS -> new Pos(74, 72, -180, 35, 0); + case SKYBLOCK_DUNGEON_HUB -> new Pos(-44, 88, 11.5, 0, 0); default -> new Pos(-2.5, 72.5, -69.5, 180, 0); }, // Spawn position true // Announce death messages diff --git a/type.hub/src/main/java/net/swofty/type/hub/runes/RuneEntityImpl.java b/type.hub/src/main/java/net/swofty/type/hub/runes/RuneEntityImpl.java index 63dc539ea..70596d2f5 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/runes/RuneEntityImpl.java +++ b/type.hub/src/main/java/net/swofty/type/hub/runes/RuneEntityImpl.java @@ -29,7 +29,7 @@ public RuneEntityImpl(Pos position, boolean isHead) { ((ArmorStandMeta) this.entityMeta).setHeadRotation(new Vec( -90, 0.4, 0)); setHelmet(ItemStackCreator.getStackHead("5c540298a017b25f9cfae9281fe5b585d770db1852b73804d1bb7c7ee53733a4").build()); } else { - setHelmet(ItemStack.builder(Material.STONE_SLAB).build()); + setHelmet(ItemStack.builder(Material.SMOOTH_STONE_SLAB).build()); } setInstance(HypixelConst.getInstanceContainer(), position); diff --git a/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/npcs/NPCSkyBlock.java b/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/npcs/NPCSkyBlock.java index ed9cb1506..3588453f5 100644 --- a/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/npcs/NPCSkyBlock.java +++ b/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/npcs/NPCSkyBlock.java @@ -33,9 +33,9 @@ public String[] holograms(HypixelPlayer player) { return server.players().size(); }).reduce(0, Integer::sum); - String commmaified = StringUtility.commaify(amountOnline); + String commaified = StringUtility.commaify(amountOnline); return new String[]{ - "§e" + commmaified + " Playing", + "§e" + commaified + " Playing", "§bSkyBlock §7[v0.23.3]", "§e§lCLICK" }; 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 d6866c436..98aaefb92 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 @@ -329,7 +329,7 @@ public void initialize(MinecraftServer server) { */ if (mainInstance != null) { ServerHolograms.spawnAll(HypixelConst.getInstanceContainer()); - String zone = typeLoader.getType().toString(); + String zone = typeLoader.getType().skyblockName(); FairySoul.spawnEntities(HypixelConst.getInstanceContainer(), FairySoulZone.valueOf(zone.toUpperCase())); } 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 index 9b49ee12d..1a4aac13d 100644 --- 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 @@ -103,7 +103,7 @@ public static List getAllCrystals() { crystal.url = url; crystal.position = new Pos(x + 0.5, y, z + 0.5); crystal.itemType = itemTypeLinker; - crystal.serverType = ServerType.valueOf(doc.getString("serverType")); + crystal.serverType = ServerType.getSkyblockServer(doc.getString("serverType")); crystals.add(crystal); } 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 index 44aa5d09d..ee652bb28 100644 --- 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 @@ -97,7 +97,7 @@ public static List getAllRegions() { int x2 = doc.getInteger("x2"); int y2 = doc.getInteger("y2"); int z2 = doc.getInteger("z2"); - ServerType serverType = ServerType.valueOf(doc.getOrDefault("serverType", ServerType.SKYBLOCK_HUB.name()).toString()); + ServerType serverType = ServerType.getSkyblockServer(doc.getOrDefault("serverType", ServerType.SKYBLOCK_HUB.name()).toString()); SkyBlockRegion region = new SkyBlockRegion( name, new Pos(x1, y1, z1), diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/ActionPlayerTravel.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/ActionPlayerTravel.java index f659be193..bf160633e 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/ActionPlayerTravel.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/ActionPlayerTravel.java @@ -46,7 +46,7 @@ public void run(PlayerMoveEvent event) { return; } - player.sendTo(HypixelConst.getTypeLoader().getType() == ServerType.SKYBLOCK_HUB ? ServerType.DUNGEON_HUB : ServerType.SKYBLOCK_HUB); + player.sendTo(HypixelConst.getTypeLoader().getType() == ServerType.SKYBLOCK_HUB ? ServerType.SKYBLOCK_DUNGEON_HUB : ServerType.SKYBLOCK_HUB); } if (block == Block.END_PORTAL.key()) { diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/utility/LaunchPads.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/utility/LaunchPads.java index 2005ef812..1daee7e34 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/utility/LaunchPads.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/utility/LaunchPads.java @@ -26,7 +26,7 @@ public enum LaunchPads { VILLAGE_TO_FARMING(getSlimeBlocksNear(new Pos(79, 71, -185)), ServerType.SKYBLOCK_HUB, new Pos(116.5, 74, -210.5), (player) -> { - player.sendTo(ServerType.THE_FARMING_ISLANDS); + player.sendTo(ServerType.SKYBLOCK_THE_FARMING_ISLANDS); }, (player) -> player.getSkills().getCurrentLevel(SkillCategories.FARMING) >= 5, "§cYou must be at least Farming Level V to join this island!", (player) -> { @@ -45,7 +45,7 @@ public enum LaunchPads { .build(); } }), - FARMING_TO_VILLAGE(getSlimeBlocksNear(new Pos(111, 71, -202)), ServerType.THE_FARMING_ISLANDS, + FARMING_TO_VILLAGE(getSlimeBlocksNear(new Pos(111, 71, -202)), ServerType.SKYBLOCK_THE_FARMING_ISLANDS, new Pos(74, 72, -180), (player) -> { player.sendTo(ServerType.SKYBLOCK_HUB); }, (player) -> true, diff --git a/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/TypeTheFarmingIslandsLoader.java b/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/TypeTheFarmingIslandsLoader.java index 825ef1642..62428088f 100644 --- a/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/TypeTheFarmingIslandsLoader.java +++ b/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/TypeTheFarmingIslandsLoader.java @@ -28,7 +28,7 @@ public class TypeTheFarmingIslandsLoader implements SkyBlockTypeLoader { @Override public ServerType getType() { - return ServerType.THE_FARMING_ISLANDS; + return ServerType.SKYBLOCK_THE_FARMING_ISLANDS; } @Override diff --git a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java index b1c1cd465..028a74d8b 100644 --- a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java @@ -19,10 +19,10 @@ public class BalanceConfigurations { ServerType.PROTOTYPE_LOBBY, List.of( new LowestPlayerCount() ), - ServerType.DUNGEON_HUB, List.of( + ServerType.SKYBLOCK_DUNGEON_HUB, List.of( new LowestPlayerCount() ), - ServerType.THE_FARMING_ISLANDS, List.of( + ServerType.SKYBLOCK_THE_FARMING_ISLANDS, List.of( new LowestPlayerCount() ), ServerType.SKYBLOCK_ISLAND, List.of(