aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-16 16:10:19 +0800
committershedaniel <daniel@shedaniel.me>2020-01-16 16:10:19 +0800
commitb4be45e414504afb49910d766bebcd00f55b052b (patch)
tree05c36b311681a120c0e3c85131531a159fbc59c2 /src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
parent01e8ede4fc41f6f113ae623044c3a4e98ed81eb4 (diff)
downloadRoughlyEnoughItems-b4be45e414504afb49910d766bebcd00f55b052b.tar.gz
RoughlyEnoughItems-b4be45e414504afb49910d766bebcd00f55b052b.tar.bz2
RoughlyEnoughItems-b4be45e414504afb49910d766bebcd00f55b052b.zip
3.3.11
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java b/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
index 18cf9f54e..7169e13d6 100644
--- a/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
+++ b/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
@@ -14,21 +14,21 @@ import net.minecraft.util.Identifier;
import javax.annotation.Nullable;
public class CopyRecipeIdentifierToast implements Toast {
-
+
protected static final Identifier TOASTS_TEX = new Identifier("roughlyenoughitems", "textures/gui/toasts.png");
private String title;
private String subtitle;
private long startTime;
-
+
public CopyRecipeIdentifierToast(String title, @Nullable String subtitleNullable) {
this.title = title;
this.subtitle = subtitleNullable;
}
-
+
public static void addToast(String title, @Nullable String subtitleNullable) {
MinecraftClient.getInstance().getToastManager().add(new CopyRecipeIdentifierToast(title, subtitleNullable));
}
-
+
@Override
public Visibility draw(ToastManager toastManager, long var2) {
toastManager.getGame().getTextureManager().bindTexture(TOASTS_TEX);
@@ -40,17 +40,17 @@ public class CopyRecipeIdentifierToast implements Toast {
toastManager.getGame().textRenderer.draw(this.title, 18.0F, 7.0F, 11141120);
toastManager.getGame().textRenderer.draw(this.subtitle, 18.0F, 18.0F, -16777216);
}
-
+
return var2 - this.startTime < 5000L ? Visibility.SHOW : Visibility.HIDE;
}
-
+
@Override
public Object getType() {
return Type.THIS_IS_SURE_A_TYPE;
}
-
+
public enum Type {
THIS_IS_SURE_A_TYPE
}
-
+
}