diff options
author | Yasin <a.piri@hotmail.de> | 2023-08-07 21:04:48 +0200 |
---|---|---|
committer | Yasin <a.piri@hotmail.de> | 2023-08-07 21:04:48 +0200 |
commit | eeee6cc6aa9db5d2c9711bbfa10c67eccb5300df (patch) | |
tree | 64e2cd02b908f6c2287a1b4707a03fa4c7cd96b1 /src/main/java/me | |
parent | 84ea4626690c30177d7f13b7789eb375dea9c705 (diff) | |
download | Skyblocker-eeee6cc6aa9db5d2c9711bbfa10c67eccb5300df.tar.gz Skyblocker-eeee6cc6aa9db5d2c9711bbfa10c67eccb5300df.tar.bz2 Skyblocker-eeee6cc6aa9db5d2c9711bbfa10c67eccb5300df.zip |
update mod to 1.11.1
Diffstat (limited to 'src/main/java/me')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java index 2bdfa401..b7c4ff2f 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java @@ -33,6 +33,7 @@ import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.lit public class FairySouls { private static final Logger LOGGER = LoggerFactory.getLogger(FairySouls.class); private static CompletableFuture<Void> fairySoulsLoaded; + private static int maxSouls = 0; private static final Map<String, Set<BlockPos>> fairySouls = new HashMap<>(); private static final Map<String, Map<String, Set<BlockPos>>> foundFairies = new HashMap<>(); @@ -45,7 +46,7 @@ public class FairySouls { } public static int getFairySoulsSize(@Nullable String location) { - return location == null ? fairySouls.values().stream().mapToInt(Set::size).sum() : fairySouls.get(location).size(); + return location == null ? maxSouls : fairySouls.get(location).size(); } public static void init() { @@ -54,6 +55,9 @@ public class FairySouls { BufferedReader reader = new BufferedReader(new FileReader(NEURepo.LOCAL_REPO_DIR.resolve("constants").resolve("fairy_souls.json").toFile())); for (Map.Entry<String, JsonElement> fairySoulJson : JsonParser.parseReader(reader).getAsJsonObject().asMap().entrySet()) { if (fairySoulJson.getKey().equals("//") || fairySoulJson.getKey().equals("Max Souls")) { + if (fairySoulJson.getKey().equals("Max Souls")) { + maxSouls = fairySoulJson.getValue().getAsInt(); + } continue; } ImmutableSet.Builder<BlockPos> fairySoulsForLocation = ImmutableSet.builder(); |