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
1 change: 1 addition & 0 deletions commons/src/main/java/net/swofty/commons/CustomWorlds.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public enum CustomWorlds {
SKYBLOCK_THE_PARK("hypixel_skyblock_the_park"),
SKYBLOCK_GALATEA("hypixel_skyblock_galatea"),
SKYBLOCK_BACKWATER_BAYOU("hypixel_skyblock_backwater_bayou"),
SKYBLOCK_JERRYS_WORKSHOP("hypixel_skyblock_jerrys_workshop"),
SKYBLOCK_DUNGEON_HUB("hypixel_skyblock_dungeon_hub"),
PROTOTYPE_LOBBY("hypixel_prototype_lobby"),
BEDWARS_LOBBY("hypixel_bedwars_lobby"),
Expand Down
1 change: 1 addition & 0 deletions commons/src/main/java/net/swofty/commons/ServerType.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public enum ServerType {
SKYBLOCK_THE_PARK(true),
SKYBLOCK_GALATEA(true),
SKYBLOCK_BACKWATER_BAYOU(true),
SKYBLOCK_JERRYS_WORKSHOP(true),
PROTOTYPE_LOBBY(false),
BEDWARS_LOBBY(false),
BEDWARS_GAME(false),
Expand Down
16 changes: 14 additions & 2 deletions configuration/skyblock/Minestom.regions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,22 @@ 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
wilderness_1,WILDERNESS,58,71,118,123,76,123,HUB
barn_1,THE_BARN,82,26,-177,250,120,-334,THE_FARMING_ISLANDS,
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
savanna,SAVANNA_WOODLAND,-467,155,-20,-383,56,102,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
1 change: 1 addition & 0 deletions loader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
implementation(project(":type.thepark"))
implementation(project(":type.galatea"))
implementation(project(":type.backwaterbayou"))
implementation(project(":type.jerrysworkshop"))
implementation(project(":type.dungeonhub"))
implementation(project(":type.skyblockgeneric"))
implementation(project(":type.prototypelobby"))
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ include(":type.dwarvenmines")
include(":type.thepark")
include(":type.galatea")
include(":type.backwaterbayou")
include(":type.jerrysworkshop")
include(":type.island")
include(":type.hub")
include(":type.dungeonhub")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import net.swofty.commons.Configuration;
import net.swofty.commons.CustomWorlds;
import net.swofty.commons.ServerType;
import net.swofty.type.generic.block.PlayerHeadBlockHandler;
import net.swofty.type.generic.block.SignBlockHandler;
import net.swofty.type.generic.command.HypixelCommand;
import net.swofty.type.generic.data.GameDataHandlerRegistry;
import net.swofty.type.generic.data.HypixelDataHandler;
Expand Down Expand Up @@ -193,6 +195,10 @@ public void initialize(MinecraftServer server) {
GameDataHandlerRegistry.register(new BedWarsDataHandler());
GameDataHandlerRegistry.register(new PrototypeLobbyDataHandler());

// Register Block Handlers
MinecraftServer.getBlockManager().registerHandler(PlayerHeadBlockHandler.KEY, PlayerHeadBlockHandler::new);
MinecraftServer.getBlockManager().registerHandler(SignBlockHandler.KEY, SignBlockHandler::new);

// Register NPCs
if (mainInstance != null) {
loader.getNPCs().forEach(HypixelNPC::register);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package net.swofty.type.generic.block;

import net.kyori.adventure.key.Key;
import net.minestom.server.instance.block.BlockHandler;
import net.minestom.server.tag.Tag;
import org.jspecify.annotations.NonNull;

import java.util.Collection;
import java.util.Set;

public class PlayerHeadBlockHandler implements BlockHandler {
public static final Key KEY = Key.key("minecraft:skull");

@Override
public @NonNull Key getKey() {
return KEY;
}

@Override
public @NonNull Collection<Tag<?>> getBlockEntityTags() {
return Set.of(Tag.NBT("profile"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package net.swofty.type.generic.block;

import net.kyori.adventure.key.Key;
import net.minestom.server.instance.block.BlockHandler;
import net.minestom.server.tag.Tag;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.Set;

public final class SignBlockHandler implements BlockHandler {
public static final Key KEY = Key.key("minecraft:sign");

@Override
public @NotNull Key getKey() {
return KEY;
}

@Override
public @NotNull Collection<Tag<?>> getBlockEntityTags() {
return Set.of(
Tag.Byte("is_waxed"),
Tag.NBT("front_text"),
Tag.NBT("back_text"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.swofty.type.generic.data.datapoints;

import net.swofty.commons.protocol.JacksonSerializer;
import net.swofty.type.generic.data.Datapoint;

import java.util.HashMap;
import java.util.Map;

public class DatapointMapLongInteger extends Datapoint<Map<Long, Integer>> {
private static final JacksonSerializer<Map<Long, Integer>> serializer =
new JacksonSerializer<>((Class) Map.class);

public DatapointMapLongInteger(String key, Map<Long, Integer> value) {
super(key, value, serializer);
}

// Required for deepClone() reflection which passes HashMap.class
public DatapointMapLongInteger(String key, HashMap<Long, Integer> value) {
super(key, value, serializer);
}

public DatapointMapLongInteger(String key) {
super(key, new HashMap<>(), serializer);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package net.swofty.type.generic.data.datapoints;

import net.swofty.commons.protocol.JacksonSerializer;
import net.swofty.type.generic.data.Datapoint;

import java.time.Year;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DatapointPresentYear extends Datapoint<DatapointPresentYear.YearData> {
private static final JacksonSerializer<DatapointPresentYear.YearData> serializer =
new JacksonSerializer<>((Class) DatapointPresentYear.YearData.class);

public DatapointPresentYear(String key, YearData value) {
super(key, value, serializer);
}

public DatapointPresentYear(String key) {
super(key, new YearData(0, List.of()), serializer);
}

public record YearData(int year, List<Integer> value) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.swofty.type.generic.entity;

import net.minestom.server.coordinate.Pos;
import net.minestom.server.entity.EntityType;
import net.minestom.server.entity.LivingEntity;
import net.minestom.server.entity.metadata.display.BlockDisplayMeta;
import net.minestom.server.entity.metadata.other.InteractionMeta;
import net.minestom.server.event.player.PlayerEntityInteractEvent;
import net.minestom.server.instance.block.Block;
import net.swofty.commons.bedwars.map.BedWarsMapsConfig;
import net.swofty.type.generic.user.HypixelPlayer;

import java.util.function.BiConsumer;

public class BlockDisplayEntity extends LivingEntity {

public BlockDisplayEntity(Block block) {
super(EntityType.BLOCK_DISPLAY);

editEntityMeta(BlockDisplayMeta.class, meta -> {
meta.setBlockState(block);
meta.setHasNoGravity(true);
});
}
}
27 changes: 27 additions & 0 deletions type.jerrysworkshop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
plugins {
java
}

group = "net.swofty"
version = "3.0"

java {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
toolchain {
languageVersion.set(JavaLanguageVersion.of(25))
}
}

dependencies {
implementation(project(":type.skyblockgeneric"))
implementation(project(":type.generic"))
implementation(project(":commons"))
implementation(project(":proxy.api"))
compileOnly("net.minestom:minestom:2025.12.20c-1.21.11") {
exclude(group = "org.jboss.shrinkwrap.resolver", module = "shrinkwrap-resolver-depchain")
}
implementation("org.tinylog:tinylog-api:2.7.0")
implementation("org.tinylog:tinylog-impl:2.7.0")
implementation("org.joml:joml:1.10.8")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
package net.swofty.type.jerrysworkshop;

import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import net.minestom.server.MinecraftServer;
import net.minestom.server.coordinate.Pos;
import net.swofty.commons.CustomWorlds;
import net.swofty.commons.ServerType;
import net.swofty.commons.ServiceType;
import net.swofty.commons.skyblock.item.ItemType;
import net.swofty.proxyapi.redis.ProxyToClient;
import net.swofty.proxyapi.redis.ServiceToClient;
import net.swofty.type.generic.HypixelConst;
import net.swofty.type.generic.SkyBlockTypeLoader;
import net.swofty.type.generic.entity.npc.HypixelNPC;
import net.swofty.type.generic.event.HypixelEventClass;
import net.swofty.type.generic.tab.TablistManager;
import net.swofty.type.generic.tab.TablistModule;
import net.swofty.type.jerrysworkshop.present.Present;
import net.swofty.type.skyblockgeneric.SkyBlockGenericLoader;
import net.swofty.type.skyblockgeneric.entity.GlassDisplay;
import net.swofty.type.skyblockgeneric.item.SkyBlockItem;
import net.swofty.type.skyblockgeneric.tabmodules.AccountInformationModule;
import net.swofty.type.skyblockgeneric.tabmodules.SkyBlockPlayersOnlineModule;
import net.swofty.type.jerrysworkshop.tab.JerrysWorkshopServerModule;
import org.jetbrains.annotations.Nullable;
import org.tinylog.Logger;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class TypeJerrysWorkshopLoader implements SkyBlockTypeLoader {
@Override
public ServerType getType() {
return ServerType.SKYBLOCK_JERRYS_WORKSHOP;
}

@Override
public void onInitialize(MinecraftServer server) {
Logger.info("TypeJerrysWorkshopLoader initialized!");
}

@Override
public void afterInitialize(MinecraftServer server) {
GlassDisplay.create(new SkyBlockItem(ItemType.DIRT), HypixelConst.getInstanceContainer(), new Pos(14, 77, 91), (player, event) -> {
player.sendMessage(Component.text("§cThis Feature is not there yet. §aOpen a Pull request HERE to get it added quickly!")
.clickEvent(ClickEvent.openUrl("https://github.com/Swofty-Developments/HypixelSkyBlock")));
});

GlassDisplay.create(new SkyBlockItem(ItemType.DIRT), HypixelConst.getInstanceContainer(), new Pos(16, 77, 91), (player, event) -> {
player.sendMessage(Component.text("§cThis Feature is not there yet. §aOpen a Pull request HERE to get it added quickly!")
.clickEvent(ClickEvent.openUrl("https://github.com/Swofty-Developments/HypixelSkyBlock")));
});

GlassDisplay.create(new SkyBlockItem(ItemType.DIRT), HypixelConst.getInstanceContainer(), new Pos(13, 77, 97), (player, event) -> {
player.sendMessage(Component.text("§cThis Feature is not there yet. §aOpen a Pull request HERE to get it added quickly!")
.clickEvent(ClickEvent.openUrl("https://github.com/Swofty-Developments/HypixelSkyBlock")));
});

GlassDisplay.create(new SkyBlockItem(ItemType.DIRT), HypixelConst.getInstanceContainer(), new Pos(13, 77, 99), (player, event) -> {
player.sendMessage(Component.text("§cThis Feature is not there yet. §aOpen a Pull request HERE to get it added quickly!")
.clickEvent(ClickEvent.openUrl("https://github.com/Swofty-Developments/HypixelSkyBlock")));
});

GlassDisplay.create(new SkyBlockItem(ItemType.DIRT), HypixelConst.getInstanceContainer(), new Pos(13, 77, 101), (player, event) -> {
player.sendMessage(Component.text("§cThis Feature is not there yet. §aOpen a Pull request HERE to get it added quickly!")
.clickEvent(ClickEvent.openUrl("https://github.com/Swofty-Developments/HypixelSkyBlock")));
});

Present.spawnAll();
}

@Override
public LoaderValues getLoaderValues() {
return new LoaderValues(
(type) -> switch (type) {
default -> new Pos(-4.5, 76, 100.5, -180, 0);
}, // Spawn position
true // Announce death messages
);
}

public TablistManager getTablistManager() {
return new TablistManager() {
@Override
public List<TablistModule> getModules() {
return new ArrayList<>(List.of(
new SkyBlockPlayersOnlineModule(1),
new SkyBlockPlayersOnlineModule(2),
new JerrysWorkshopServerModule(),
new AccountInformationModule()
));
}
};
}

@Override
public List<HypixelEventClass> getTraditionalEvents() {
return SkyBlockGenericLoader.loopThroughPackage(
"net.swofty.type.jerrysworkshop.events",
HypixelEventClass.class
).collect(Collectors.toList());
}

@Override
public List<HypixelEventClass> getCustomEvents() {
return new ArrayList<>();
}

@Override
public List<HypixelNPC> getNPCs() {
return new ArrayList<>(SkyBlockGenericLoader.loopThroughPackage(
"net.swofty.type.jerrysworkshop.npcs",
HypixelNPC.class
).toList());
}

@Override
public List<ServiceToClient> getServiceRedisListeners() {
return List.of();
}

@Override
public List<ProxyToClient> getProxyRedisListeners() {
return List.of();
}

@Override
public List<ServiceType> getRequiredServices() {
return new ArrayList<>(List.of(ServiceType.DATA_MUTEX));
}

@Override
public @Nullable CustomWorlds getMainInstance() {
return CustomWorlds.SKYBLOCK_JERRYS_WORKSHOP;
}
}
Loading