Update to MC 1.14.1

The ReplayStudio update also fixes an issue with reading the
PlayerListEntryPacket leading to NPEs during Quick Mode.
This commit is contained in:
Jonas Herzig
2019-05-20 13:38:38 +02:00
parent 0e086d91a6
commit e5ee6a3d94
49 changed files with 198 additions and 208 deletions

View File

@@ -39,7 +39,7 @@ import de.johni0702.minecraft.gui.utils.Consumer;
import de.johni0702.minecraft.gui.utils.lwjgl.Dimension;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
import org.apache.commons.lang3.StringUtils;
import net.minecraft.text.TextFormat;
import net.minecraft.ChatFormat;
import java.awt.image.BufferedImage;
import java.io.IOException;
@@ -417,9 +417,9 @@ public class GuiReplayCenter extends GuiScreen {
this.downloaded = downloaded;
ReplayMetaData metaData = fileInfo.getMetadata();
name.setText(TextFormat.UNDERLINE + Utils.fileNameToReplayName(fileInfo.getName()));
name.setText(ChatFormat.UNDERLINE + Utils.fileNameToReplayName(fileInfo.getName()));
author.setI18nText("replaymod.gui.center.author",
"" + TextFormat.GRAY + TextFormat.ITALIC, fileInfo.getOwner());
"" + ChatFormat.GRAY + ChatFormat.ITALIC, fileInfo.getOwner());
if (StringUtils.isEmpty(metaData.getServerName())) {
server.setI18nText("replaymod.gui.iphidden").setColor(Colors.DARK_RED);
} else {
@@ -443,7 +443,7 @@ public class GuiReplayCenter extends GuiScreen {
favorites.setText("" + fileInfo.getFavorites());
likes.setText("" + fileInfo.getRatings().getPositive());
dislikes.setText("" + fileInfo.getRatings().getNegative());
category.setText(TextFormat.ITALIC + Optional.fromNullable(Category.fromId(fileInfo.getCategory()))
category.setText(ChatFormat.ITALIC + Optional.fromNullable(Category.fromId(fileInfo.getCategory()))
.or(Category.MISCELLANEOUS).toNiceString());
addElements(null, durationPanel, downloadsPanel);

View File

@@ -10,7 +10,7 @@ import de.johni0702.minecraft.gui.element.GuiButton;
import de.johni0702.minecraft.gui.element.GuiLabel;
import de.johni0702.minecraft.gui.element.advanced.GuiProgressBar;
import de.johni0702.minecraft.gui.layout.CustomLayout;
import net.minecraft.text.TextFormat;
import net.minecraft.ChatFormat;
import java.io.File;
import java.io.IOException;
@@ -34,7 +34,7 @@ public class GuiReplayDownloading extends AbstractGuiScreen<GuiReplayDownloading
this.apiClient = mod.getApiClient();
setTitle(new GuiLabel().setI18nText("replaymod.gui.viewer.download.title"));
final GuiLabel subTitle = new GuiLabel(this).setI18nText("replaymod.gui.viewer.download.message",
TextFormat.UNDERLINE + name + TextFormat.RESET);
ChatFormat.UNDERLINE + name + ChatFormat.RESET);
setLayout(new CustomLayout<GuiReplayDownloading>() {
@Override
protected void layout(GuiReplayDownloading container, int width, int height) {