Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ build/

### Mac OS ###
.DS_Store

### Islands ###
/configuration/hypixel_island_template/
/configuration/hypixel_hub/
/configuration/hypixel_prototype_lobby/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
16 changes: 14 additions & 2 deletions commons/src/main/java/net/swofty/commons/ServerType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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_", "");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class TypeDungeonHubLoader implements SkyBlockTypeLoader {

@Override
public ServerType getType() {
return ServerType.DUNGEON_HUB;
return ServerType.SKYBLOCK_DUNGEON_HUB;
}

@Override
Expand Down
16 changes: 8 additions & 8 deletions type.hub/src/main/java/net/swofty/type/hub/TypeHubLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Double> i = new AtomicReference<>(0D);
MinecraftServer.getSchedulerManager().scheduleTask(() -> {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static List<CrystalData> 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static List<SkyBlockRegion> 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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) -> {
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading