mojira.dev
MC-3984

A re-created Hardcore game isn't Hardcore unless you cycle through game modes and reset it to Hardcore

The bug

A re-created Hardcore game isn't Hardcore (despite the 'Game Mode' button displaying 'Hardcore') unless you cycle through game modes and reset it to Hardcore.

How to reproduce

  1. Select a hardcore game and then 'Re-Create'

  2. Don't change the game mode settings

  3. Select 'Create New World' button
    → ❌ Notice that a survival world has been created even though the 'Game Mode' button said 'Hardcore'

Code analysis

Code analysis by @unknown can be found in this comment.

Related issues

Comments

migrated

Confirmed in 1.4.7.

migrated

I didn't check if this same thing would happen with any of the other game modes.

migrated

Confirmed in 13w04a

migrated

13w19a. The level.dat of re-created hardcore world has TAG_Byte(hardcore) set to 0, while the original is 1.

migrated

Confirmed in 14w03b

migrated

Does this default any other settings (such as if structures were turned off, the chest was turned on, etc.)?

marcono1234

Confirmed for

  • 14w29b

  • 14w30c

  • 14w31a

  • Minecraft 1.8-pre 1

Interesting question ggxl, but it seems like it only affects hardcore mode (tried with creative mode and re-create and worked fine) also with chests, it just seems like it sets it to false when pressing re-create, but when you check the settings before re-creating it also says that you have bonus chest set to false

marcono1234

Confirmed for

  • 15w37a

migrated

I think that "recreate" doesn't make the same world, it automatically fills in the seed. You can still change the options surrounding the world

SunCat

It shoud set the same set up options as in the original world (such as world type, gamemode, bonus chest and so on)

migrated

Confirming for 1.9

marcono1234

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

This is happening because the method net.minecraft.client.gui.GuiCreateWorld.recreateFromExistingWorld(WorldInfo) is not setting the boolean field net.minecraft.client.gui.GuiCreateWorld.hardCoreMode to true. This should be fixed by removing this field completely and determining if a gamemode is hardcore by the net.minecraft.client.gui.GuiCreateWorld.gameMode field only. In case there will be game modes other than "hardcore", which have the same hardcore mechanism however, the gamemodes could be enum values that overrite the method toString() to return the String version and have a method that returns whether or not a mode is hardcore.

bemoty

Still happens in 16w32b.

bemoty

Confirmed for 1.11.2

bemoty

Can confirm for MC 1.12.1.

migrated

Confirmed for 1.13.1. Please, if you don't mind, I'd like to be the reporter of this issue, I'll update it accordingly.

migrated

It would be nice if Mojang fixed (ancient) bugs like this instead of adding new content to the game. Mods can already add more content to the game than Mojang can dream of, but they can't fix bugs, so Mojang is ultimately just wasting time. ¬_¬

migrated

boq

Confirmed

UI

hardcore, re-create

Minecraft 1.4.5, Minecraft 1.4.7, Snapshot 13w04a, Minecraft 1.5, Snapshot 13w11a, ..., Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, Minecraft 1.14.3

19w35a

Retrieved