aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-02-14 00:22:40 +0800
committershedaniel <daniel@shedaniel.me>2020-02-14 00:33:34 +0800
commit97c8436558d8b13b70587703be50d0bd434b3e8d (patch)
tree1a002024a97c4e2bd8c713228a05cce3d43892c0 /src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java
parentd6b60154c0cfa6ad8bbfa8ede9798e64a668bfd7 (diff)
downloadRoughlyEnoughItems-97c8436558d8b13b70587703be50d0bd434b3e8d.tar.gz
RoughlyEnoughItems-97c8436558d8b13b70587703be50d0bd434b3e8d.tar.bz2
RoughlyEnoughItems-97c8436558d8b13b70587703be50d0bd434b3e8d.zip
3.4.1
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java b/src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java
index 4586ea272..f3e589ad9 100644
--- a/src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java
+++ b/src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java
@@ -43,6 +43,20 @@ public final class RecipeDisplayExporter extends Widget {
INSTANCE.exportRecipe(rectangle, widgets);
}
+ private static File getExportFilename(File directory) {
+ String string = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date());
+ int i = 1;
+
+ while (true) {
+ File file = new File(directory, "REI_" + string + (i == 1 ? "" : "_" + i) + ".png");
+ if (!file.exists()) {
+ return file;
+ }
+
+ ++i;
+ }
+ }
+
@SuppressWarnings("deprecation")
private void exportRecipe(Rectangle rectangle, List<Widget> widgets) {
Framebuffer framebuffer = new Framebuffer(rectangle.width * 8, rectangle.height * 8, true, MinecraftClient.IS_SYSTEM_MAC);
@@ -176,20 +190,6 @@ public final class RecipeDisplayExporter extends Widget {
});
}
- private static File getExportFilename(File directory) {
- String string = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date());
- int i = 1;
-
- while (true) {
- File file = new File(directory, "REI_" + string + (i == 1 ? "" : "_" + i) + ".png");
- if (!file.exists()) {
- return file;
- }
-
- ++i;
- }
- }
-
@Override
public void render(int mouseX, int mouseY, float delta) {