Skip to content

Commit

Permalink
Fix ExoticGarden schematics folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ARVIN3108 committed Mar 30, 2024
1 parent 3e9c839 commit de6fbfd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions patches/ExoticGarden.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 5a33ee5bbeb959122918ef4f118404645335f87d Mon Sep 17 00:00:00 2001
From f4a50c7bda4775f0fcc0e4b9e25cfaecb9a64ee4 Mon Sep 17 00:00:00 2001
From: ARVIN3108 <[email protected]>
Date: Fri, 8 Mar 2024 21:31:06 +0700
Date: Sat, 30 Mar 2024 14:47:42 +0700
Subject: [PATCH] ExoticGarden

---
Expand Down Expand Up @@ -369,7 +369,7 @@ diff --git a/src/main/java/io/github/thebusybiscuit/exoticgarden/ExoticGarden.ja
similarity index 77%
rename from src/main/java/io/github/thebusybiscuit/exoticgarden/ExoticGarden.java
rename to src/main/java/id/universenetwork/sfa_loader/addons/exoticgarden/ExoticGarden.java
index cb9fd4a..4a19ad0 100644
index cb9fd4a..158bfed 100644
--- a/src/main/java/io/github/thebusybiscuit/exoticgarden/ExoticGarden.java
+++ b/src/main/java/id/universenetwork/sfa_loader/addons/exoticgarden/ExoticGarden.java
@@ -1,17 +1,16 @@
Expand Down Expand Up @@ -457,7 +457,7 @@ index cb9fd4a..4a19ad0 100644
- private final File schematicsFolder = new File(getDataFolder(), "schematics");
+ private final String schematicsPath = "schematics/";
+ @Getter
+ private final File schematicsFolder = new File(AbstractAddon.getInstance().getDataFolder(), schematicsPath);
+ private final File schematicsFolder = new File(getAddonFolder(), schematicsPath);

private final List<Berry> berries = new ArrayList<>();
private final List<Tree> trees = new ArrayList<>();
Expand Down Expand Up @@ -622,7 +622,7 @@ index cb9fd4a..4a19ad0 100644

private void saveSchematic(@Nonnull String id) {
- try (InputStream input = getClass().getResourceAsStream("/schematics/" + id + ".schematic")) {
+ try (InputStream input = AbstractAddon.getInstance().getResource(schematicsPath + id + ".schematic")) {
+ try (InputStream input = getResource(schematicsPath + id + ".schematic")) {
try (FileOutputStream output = new FileOutputStream(new File(schematicsFolder, id + ".schematic"))) {
byte[] buffer = new byte[1024];
int len;
Expand Down

0 comments on commit de6fbfd

Please sign in to comment.