--- a/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java
+++ b/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java
@@ -299,7 +299,7 @@
             public Entry(Holder<FlatLevelGeneratorPreset> p_232758_) {
                 this.preset = p_232758_.value();
                 this.name = p_232758_.unwrapKey()
-                    .map(p_232760_ -> Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset")))
+                    .map(p_232760_ -> (Component)Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset")))
                     .orElse(PresetFlatWorldScreen.UNKNOWN_PRESET);
             }
 
