We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24530a4 commit d54aedcCopy full SHA for d54aedc
1 file changed
src/main/java/dev/compactmods/machines/core/ServerEventHandler.java
@@ -55,6 +55,15 @@ public static void onWorldLoaded(final WorldEvent.Load evt) {
55
}
56
57
58
+ @SubscribeEvent
59
+ public static void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent evt) {
60
+ final var player = evt.getPlayer();
61
+ if(player.level.dimension().equals(Registration.COMPACT_DIMENSION) && player instanceof ServerPlayer sp) {
62
+ // Send a fake world border to the player instead of the "real" one in overworld
63
+ sp.connection.send(new ClientboundInitializeBorderPacket(new WorldBorder()));
64
+ }
65
66
+
67
@SubscribeEvent
68
public static void onPlayerDimChange(final PlayerEvent.PlayerChangedDimensionEvent evt) {
69
if(evt.getTo().equals(Registration.COMPACT_DIMENSION)) {
0 commit comments