From c5c2c489a0429d5a878c52d07c36ee342ba9e7ef Mon Sep 17 00:00:00 2001 From: Red <73609416+MrRedstone54@users.noreply.github.com> Date: Thu, 19 Mar 2026 15:19:06 -0400 Subject: [PATCH] Add new YAML option: Immediate Respawn --- worlds/minecraft/Options.py | 5 +++++ worlds/minecraft/__init__.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/worlds/minecraft/Options.py b/worlds/minecraft/Options.py index 6963c5de7811..5c8d6560a894 100644 --- a/worlds/minecraft/Options.py +++ b/worlds/minecraft/Options.py @@ -93,6 +93,10 @@ class SendDefeatedMobs(Toggle): """Send killed mobs to other Minecraft worlds which have this option enabled.""" display_name = "Send Defeated Mobs" +class ImmediateRespawn(DefaultOnToggle): + """Choose whether to respawn immediately on death, or to be put into the game over screen.""" + display_name = "Immediate Respawn" + class StartingItems(OptionList): """Start with these items. Each entry should be of this format: {item: "item_name", amount: #} @@ -139,5 +143,6 @@ class MinecraftOptions(PerGameCommonOptions): include_postgame_advancements: PostgameAdvancements bee_traps: BeeTraps send_defeated_mobs: SendDefeatedMobs + immediate_respawn: ImmediateRespawn death_link: DeathLink starting_items: StartingItems diff --git a/worlds/minecraft/__init__.py b/worlds/minecraft/__init__.py index e7dd4be4f0ad..374da15858bd 100644 --- a/worlds/minecraft/__init__.py +++ b/worlds/minecraft/__init__.py @@ -152,6 +152,7 @@ def _get_mc_data(self) -> Dict[str, Any]: 'death_link': bool(self.options.death_link.value), 'starting_items': json.dumps(self.options.starting_items.value), 'race': self.multiworld.is_race, + 'immediate_respawn': bool(self.options.immediate_respawn.value), # Universal Tracker data 'bosses_to_defeat': self.options.required_bosses.value, @@ -179,6 +180,7 @@ def generate_early(self: "MinecraftWorld") -> None: self.options.include_unreasonable_advancements.value = self.passthrough["include_unreasonable_advancements"] self.options.include_postgame_advancements.value = self.passthrough["include_postgame_advancements"] self.options.death_link.value = self.passthrough["death_link"] + self.options.immediate_respawn.value = self.passthrough["immediate_respawn"] else: self.using_ut = False