|
@@ -24,8 +24,8 @@ import net.minecraft.client.render.BufferBuilder;
|
|
|
import net.minecraft.client.render.Tessellator;
|
|
|
import net.minecraft.client.render.VertexFormats;
|
|
|
import net.minecraft.client.resource.language.I18n;
|
|
|
-import net.minecraft.network.chat.TextComponent;
|
|
|
-import net.minecraft.network.chat.TranslatableComponent;
|
|
|
+import net.minecraft.text.LiteralText;
|
|
|
+import net.minecraft.text.TranslatableText;
|
|
|
import net.minecraft.util.Identifier;
|
|
|
import net.minecraft.util.Pair;
|
|
|
import net.minecraft.util.Tickable;
|
|
@@ -81,7 +81,7 @@ public abstract class ClothConfigScreen extends Screen {
|
|
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
public ClothConfigScreen(Screen parent, String title, Map<String, List<Pair<String, Object>>> o, boolean confirmSave, boolean displayErrors, boolean smoothScrollingList, Identifier defaultBackgroundLocation, Map<String, Identifier> categoryBackgroundLocation) {
|
|
|
- super(new TextComponent(""));
|
|
|
+ super(new LiteralText(""));
|
|
|
this.parent = parent;
|
|
|
this.title = title;
|
|
|
this.tabbedEntries = Maps.newLinkedHashMap();
|
|
@@ -174,7 +174,7 @@ public abstract class ClothConfigScreen extends Screen {
|
|
|
Lists.newArrayList(tabbedEntries.values()).get(selectedTabIndex).forEach(entry -> listWidget.children().add(entry));
|
|
|
addButton(buttonQuit = new ButtonWidget(width / 2 - 154, height - 26, 150, 20, edited ? I18n.translate("text.cloth-config.cancel_discard") : I18n.translate("gui.cancel"), widget -> {
|
|
|
if (confirmSave && edited)
|
|
|
- minecraft.openScreen(new ConfirmScreen(new QuitSaveConsumer(), new TranslatableComponent("text.cloth-config.quit_config"), new TranslatableComponent("text.cloth-config.quit_config_sure"), I18n.translate("text.cloth-config.quit_discard"), I18n.translate("gui.cancel")));
|
|
|
+ minecraft.openScreen(new ConfirmScreen(new QuitSaveConsumer(), new TranslatableText("text.cloth-config.quit_config"), new TranslatableText("text.cloth-config.quit_config_sure"), I18n.translate("text.cloth-config.quit_discard"), I18n.translate("gui.cancel")));
|
|
|
else
|
|
|
minecraft.openScreen(parent);
|
|
|
}));
|
|
@@ -413,7 +413,7 @@ public abstract class ClothConfigScreen extends Screen {
|
|
|
public boolean keyPressed(int int_1, int int_2, int int_3) {
|
|
|
if (int_1 == 256 && this.shouldCloseOnEsc()) {
|
|
|
if (confirmSave && edited)
|
|
|
- minecraft.openScreen(new ConfirmScreen(new QuitSaveConsumer(), new TranslatableComponent("text.cloth-config.quit_config"), new TranslatableComponent("text.cloth-config.quit_config_sure"), I18n.translate("text.cloth-config.quit_discard"), I18n.translate("gui.cancel")));
|
|
|
+ minecraft.openScreen(new ConfirmScreen(new QuitSaveConsumer(), new TranslatableText("text.cloth-config.quit_config"), new TranslatableText("text.cloth-config.quit_config_sure"), I18n.translate("text.cloth-config.quit_discard"), I18n.translate("gui.cancel")));
|
|
|
else
|
|
|
minecraft.openScreen(parent);
|
|
|
return true;
|