File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/dev/compactmods/machines/core Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ public static void onWorldLoaded(final WorldEvent.Load evt) {
5555 }
5656 }
5757
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+
5867 @ SubscribeEvent
5968 public static void onPlayerDimChange (final PlayerEvent .PlayerChangedDimensionEvent evt ) {
6069 if (evt .getTo ().equals (Registration .COMPACT_DIMENSION )) {
You can’t perform that action at this time.
0 commit comments