aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-12-24 11:31:40 +0800
committershedaniel <daniel@shedaniel.me>2019-12-24 11:31:40 +0800
commit08d80d588a36598114087a79917e36e9d2cc97c3 (patch)
tree95cde698bbf1eca2f83143d39fd206cf2dc803f2 /src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java
parent7d438f554c4173880a407a6bb8fc80b8a4723845 (diff)
downloadRoughlyEnoughItems-08d80d588a36598114087a79917e36e9d2cc97c3.tar.gz
RoughlyEnoughItems-08d80d588a36598114087a79917e36e9d2cc97c3.tar.bz2
RoughlyEnoughItems-08d80d588a36598114087a79917e36e9d2cc97c3.zip
Finishing workstation usage and close #220
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 7169e13d6..18cf9f54e 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
}
-
+
}