-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve highlight cache world switching handler
now handles the different possible cases in which the event is fired correctly
- Loading branch information
Showing
8 changed files
with
129 additions
and
62 deletions.
There are no files selected for viewing
14 changes: 13 additions & 1 deletion
14
common/src/main/java/xaeroplus/event/XaeroWorldChangeEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
package xaeroplus.event; | ||
|
||
public record XaeroWorldChangeEvent(String worldId, String dimId, String mwId) { } | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.world.level.Level; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public record XaeroWorldChangeEvent(WorldChangeType worldChangeType, @Nullable ResourceKey<Level> from, @Nullable ResourceKey<Level> to) { | ||
public enum WorldChangeType { | ||
ENTER_WORLD, | ||
EXIT_WORLD, | ||
SWITCH_TO_ALT_DIMENSION, | ||
SWITCH_BACK_TO_ACTUAL_DIMENSION, | ||
MULTIWORLD_SWITCH | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters