aboutsummaryrefslogtreecommitdiff
path: root/default-plugin/src/main/java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-02-18 11:44:06 +0800
committershedaniel <daniel@shedaniel.me>2022-02-18 12:00:33 +0800
commite2b09b8ded673e7d7c6059e35066629a17d8e51f (patch)
tree01204279b8af92f749e065c9f076c16bada578c1 /default-plugin/src/main/java
parent3c52535d4b234ef6e1e8a04cb076db223c912dc2 (diff)
downloadRoughlyEnoughItems-e2b09b8ded673e7d7c6059e35066629a17d8e51f.tar.gz
RoughlyEnoughItems-e2b09b8ded673e7d7c6059e35066629a17d8e51f.tar.bz2
RoughlyEnoughItems-e2b09b8ded673e7d7c6059e35066629a17d8e51f.zip
Fix merge conflicts
Diffstat (limited to 'default-plugin/src/main/java')
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/TimeFavoriteEntry.java15
1 files changed, 7 insertions, 8 deletions
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<TimeFavoriteEntry> {
INSTANCE;
@Override
- public DataResult<TimeFavoriteEntry> read(CompoundTag object) {
+ public DataResult<TimeFavoriteEntry> 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<TimeFavoriteEntry> fromArgs(Object... args) {
+ public DataResult<TimeFavoriteEntry> 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