From e2b09b8ded673e7d7c6059e35066629a17d8e51f Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 18 Feb 2022 11:44:06 +0800 Subject: Fix merge conflicts --- .../rei/plugin/client/favorites/TimeFavoriteEntry.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'default-plugin/src/main/java') diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/TimeFavoriteEntry.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/TimeFavoriteEntry.java index 69d8abfc1..fc7b09141 100644 --- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/TimeFavoriteEntry.java +++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/TimeFavoriteEntry.java @@ -23,7 +23,6 @@ package me.shedaniel.rei.plugin.client.favorites; -import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.serialization.DataResult; import com.mojang.serialization.Lifecycle; @@ -149,7 +148,7 @@ public class TimeFavoriteEntry extends FavoriteEntry { } private void renderTimeIcon(PoseStack matrices, Time time, int centerX, int centerY, int color) { - RenderSystem.setShaderTexture(0, CHEST_GUI_TEXTURE); + Minecraft.getInstance().getTextureManager().bind(CHEST_GUI_TEXTURE); blit(matrices, centerX - 7, centerY - 7, time.ordinal() * 14 + 42, 14, 14, 14, 256, 256); } @@ -215,26 +214,26 @@ public class TimeFavoriteEntry extends FavoriteEntry { @Override public boolean isSame(FavoriteEntry other) { - if (!(other instanceof TimeFavoriteEntry that)) return false; - return Objects.equals(time, that.time); + if (!(other instanceof TimeFavoriteEntry)) return false; + return Objects.equals(time, ((TimeFavoriteEntry) other).time); } public enum Type implements FavoriteEntryType { INSTANCE; @Override - public DataResult read(CompoundTag object) { + public DataResult readResult(CompoundTag object) { String stringValue = object.getString(KEY); Time type = stringValue.equals("NOT_SET") ? null : Time.valueOf(stringValue); return DataResult.success(new TimeFavoriteEntry(type), Lifecycle.stable()); } @Override - public DataResult fromArgs(Object... args) { + public DataResult fromArgsResult(Object... args) { if (args.length == 0) return DataResult.error("Cannot create GameModeFavoriteEntry from empty args!"); - if (!(args[0] instanceof Time type)) + if (!(args[0] instanceof Time)) return DataResult.error("Creation of GameModeFavoriteEntry from args expected Time as the first argument!"); - return DataResult.success(new TimeFavoriteEntry(type), Lifecycle.stable()); + return DataResult.success(new TimeFavoriteEntry((Time) args[0]), Lifecycle.stable()); } @Override -- cgit