Skip to content

Fix weather in dimensions + portal remove/desync handling#178

Merged
pisaiah merged 4 commits into
IsaiahMC:masterfrom
typlosion14:master
Jun 5, 2026
Merged

Fix weather in dimensions + portal remove/desync handling#178
pisaiah merged 4 commits into
IsaiahMC:masterfrom
typlosion14:master

Conversation

@typlosion14

Copy link
Copy Markdown
Contributor

Weather:

  • FabricWorldCreator: set RuntimeWorldConfig.setSunny(0) so clearWeatherTime starts at 0 and the vanilla weather cycle (rain/thunder) works in Multiworld dimensions. Retroactive on next server restart (issue Weather isn't working in multiworld dimensions #168).

Portals:

  • Add /mw portal remove (perm multiworld.portal.remove): clears portal blocks, in-memory entry, and the portals.yml section.
  • Handle desynced portals: when the destination world is not loaded, skip the teleport (no more NPE), warn the player via action bar, and log an ERROR per broken portal on server start. list/info now show sync status. + When /mw tp: "java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long" #67
  • createPortalArea: no longer builds an obsidian frame; only fills air in the selection with portal blocks, leaving the player-built frame untouched.

 Weather:
 - FabricWorldCreator: set RuntimeWorldConfig.setSunny(0) so clearWeatherTime
   starts at 0 and the vanilla weather cycle (rain/thunder) works in Multiworld
   dimensions. Retroactive on next server restart (issue IsaiahMC#168).

 Portals:
 - Add /mw portal remove <name> (perm multiworld.portal.remove): clears portal
   blocks, in-memory entry, and the portals.yml section.
 - Handle desynced portals: when the destination world is not loaded, skip the
   teleport (no more NPE), warn the player via action bar, and log an ERROR per
   broken portal on server start. list/info now show sync status.
 - createPortalArea: no longer builds an obsidian frame; only fills air in the
   selection with portal blocks, leaving the player-built frame untouched.
@typlosion14

Copy link
Copy Markdown
Contributor Author

"createPortalArea: no longer builds an obsidian frame; only fills air in the selection with portal blocks, leaving the player-built frame untouched."
is a feature I wanted because the obsidian frame is actually not needed to keep the portal.

"Handle desynced portals: when the destination world is not loaded, skip the teleport (no more NPE), warn the player via action bar, and log an ERROR per broken portal on server start. list/info now show sync status."
Watch portal desync and avoid teleportation to nether if one desync

@typlosion14 typlosion14 marked this pull request as draft June 2, 2026 17:19
@typlosion14

Copy link
Copy Markdown
Contributor Author
  • Add /mw time <set|add|query> [world id]: per-dimension time of
    day control, unlike vanilla /time which sets every world at once.
    Accepts tick values and named times (day/noon/night/midnight/...) (like vanilla /time).

  • Fix gamerules & difficulty leaking across dimensions: upstream Fantasy
    mirrors the overworld's GameRules/difficulty by default, so /mw gamerule
    and /mw difficulty affected every world. Disable mirroring in
    FabricWorldCreator (setMirrorOverworldGameRules/Difficulty(false)) so each
    runtime world keeps its own.

Retroactive on next server restart.

 - Add /mw time <set|add|query> <time> [world id]: per-dimension time of
   day control, unlike vanilla /time which sets every world at once.
   Accepts tick values and named times (day/noon/night/midnight/...).
 - Fix gamerules & difficulty leaking across dimensions: upstream Fantasy
   mirrors the overworld's GameRules/difficulty by default, so /mw gamerule
   and /mw difficulty affected every world. Disable mirroring in
   FabricWorldCreator (setMirrorOverworldGameRules/Difficulty(false)) so each
   runtime world keeps its own. Retroactive on next server restart.
…1.1)

 - /mw info [world id]: read-only diagnostics for a dimension (present
   players, time of day, weather + clear/rain/thunder timers, gamerules
   differing from the overworld, and spawn position from /mw spawn's
   source). Targets the current dimension by default, or a named world.
 - Fix StringIndexOutOfBoundsException in FileConfiguration.loadFile when a
   world config has nested/colon keys (e.g. a modded gamerule like
   accessories:keepAccessoryInventory): guard the de-indentation substring
   calls so the saved world loads instead of being skipped.
@typlosion14

Copy link
Copy Markdown
Contributor Author

Add /mw info command + fix world-load config parse crash (Fabric 1.21.1)

  • /mw info [world id]: read-only diagnostics for a dimension (present
    players, time of day, weather + clear/rain/thunder timers, gamerules
    differing from the overworld, and spawn position from /mw spawn's
    source). Targets the current dimension by default, or a named world.
  • Fix StringIndexOutOfBoundsException in FileConfiguration.loadFile when a
    world config has nested/colon keys (e.g. a modded gamerule like
    accessories.keepAccessoryInventory): guard the de-indentation substring
    calls so the saved world loads instead of being skipped. #

…21.1)

 reinit_world_from_config threw a NullPointerException when a legacy
 config/multiworld/worlds/*.yml had no "seed": getLong("seed") NPEs on the
 missing key, and the getInt("seed") fallback in the catch NPEs again and
 escapes. It was only logged but spammed STDERR on every startup.

 Now skip legacy configs missing "environment" (stale/blank files) and
 read "seed" defensively (is_set guard with a 0 fallback).
@typlosion14 typlosion14 marked this pull request as ready for review June 2, 2026 20:21
@pisaiah

pisaiah commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Big thanks!

@pisaiah pisaiah merged commit 568e155 into IsaiahMC:master Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants