diff options
author | Maximusbarcz <maxim.baranek@gmail.com> | 2022-12-28 17:22:23 +0100 |
---|---|---|
committer | Maximusbarcz <maxim.baranek@gmail.com> | 2022-12-28 17:22:23 +0100 |
commit | 730ba6e636d952e9730e3b9bbc035c894dfff25b (patch) | |
tree | 68db43f65ab7de762eeb07c015932ccf6af49248 /src/main/java/dev/mayaqq/ygasi/util | |
parent | b1d919ad2ebf0b176953d57edef8e75835c633e3 (diff) | |
download | ygasi-730ba6e636d952e9730e3b9bbc035c894dfff25b.tar.gz ygasi-730ba6e636d952e9730e3b9bbc035c894dfff25b.tar.bz2 ygasi-730ba6e636d952e9730e3b9bbc035c894dfff25b.zip |
Added all the advancements! (other than extra)
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/util')
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java | 10 | ||||
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java (renamed from src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java) | 8 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java b/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java deleted file mode 100644 index 9b4d4a8..0000000 --- a/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java +++ /dev/null @@ -1,10 +0,0 @@ -package dev.mayaqq.ygasi.util; - -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; - -public class GetAdvancementProgress { - public static boolean get(ServerPlayerEntity player, String advancement) { - return player.getAdvancementTracker().getProgress(player.getServer().getAdvancementLoader().get(new Identifier("minecraft", "ygasi/" + advancement))).isDone(); - } -} diff --git a/src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java b/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java index c141c06..ba3cfc8 100644 --- a/src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java +++ b/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java @@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull; import static dev.mayaqq.ygasi.Ygasi.LOGGER; -public class GrantAdvancementCriterion { +public class YgasiUtils { public static void grantAdvancementCriterion(@NotNull ServerPlayerEntity serverPlayerEntity, Identifier advancementIdentifier, String criterion) { if (serverPlayerEntity.getServer() == null) { return; @@ -26,4 +26,8 @@ public class GrantAdvancementCriterion { } } } -} + + public static boolean getAdvancementProgress(ServerPlayerEntity player, String advancement) { + return player.getAdvancementTracker().getProgress(player.getServer().getAdvancementLoader().get(new Identifier("minecraft", "ygasi/" + advancement))).isDone(); + } +}
\ No newline at end of file |