From 654af0026f090d892beea567c41f7e925052fbac Mon Sep 17 00:00:00 2001 From: imreallybadatnames Date: Fri, 14 Jun 2024 20:12:13 +1100 Subject: [PATCH] one dot twenty one --- examples/revelationary_demo_datapack.zip | Bin 1610 -> 1610 bytes gradle.properties | 14 +++++++------- .../revelationary/ClientAdvancements.java | 5 +++-- .../revelationary/RevelationDataLoader.java | 2 +- .../revelationary/RevelationRegistry.java | 2 -- .../RevelationaryNetworking.java | 3 +-- src/main/resources/fabric.mod.json | 2 +- 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/examples/revelationary_demo_datapack.zip b/examples/revelationary_demo_datapack.zip index 63fa33a1bf684d6df7b8bf77183e9a30cff8c9a4..0a90579b3d06c3d938996aefbe3be3a89749f476 100644 GIT binary patch delta 40 ocmX@bbBbpHGe_XUa}mD-@)IU=FdH*%ys+7pc^MNz@HJ~Z087^pl>h($ delta 40 ocmX@bbBbpHGlxUxyokoHtS*x|n2nhXuWYtuUdDtFe9amU04Gfju>b%7 diff --git a/gradle.properties b/gradle.properties index 091bea3..0c1910c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,17 +2,17 @@ org.gradle.jvmargs = -Xmx2G # Fabric Properties -minecraft_version=1.20.5 -yarn_mappings=1.20.5+build.1 -loader_version=0.15.10 +minecraft_version=1.21 +yarn_mappings=1.21+build.1 +loader_version=0.15.11 # Mod Properties -mod_version = 1.3.7+1.20.5 +mod_version = 1.3.7+1.21 maven_group = de.dafuqs.revelationary archives_base_name = revelationary # https://fabricmc.net/develop/ -fabric_version=0.97.8+1.20.5 +fabric_version=0.100.1+1.21 -jade_version=lwgbRGaY -wthit_version=11.1.2 \ No newline at end of file +jade_version=pc7Loi6P +wthit_version=12.0.0 \ No newline at end of file diff --git a/src/main/java/de/dafuqs/revelationary/ClientAdvancements.java b/src/main/java/de/dafuqs/revelationary/ClientAdvancements.java index af2bb94..a101ffb 100644 --- a/src/main/java/de/dafuqs/revelationary/ClientAdvancements.java +++ b/src/main/java/de/dafuqs/revelationary/ClientAdvancements.java @@ -6,6 +6,7 @@ import net.fabricmc.api.Environment; import net.minecraft.advancement.AdvancementEntry; import net.minecraft.advancement.AdvancementProgress; +import net.minecraft.advancement.PlacedAdvancement; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientAdvancementManager; import net.minecraft.client.network.ClientPlayNetworkHandler; @@ -47,10 +48,10 @@ public static boolean hasDone(Identifier identifier) { ClientPlayNetworkHandler conn = MinecraftClient.getInstance().getNetworkHandler(); if (conn != null) { ClientAdvancementManager cm = conn.getAdvancementHandler(); - AdvancementEntry adv = cm.getManager().get(identifier).getAdvancementEntry(); + PlacedAdvancement adv = cm.getManager().get(identifier); if (adv != null) { Map progressMap = ((AccessorClientAdvancementManager) cm).getAdvancementProgresses(); - AdvancementProgress progress = progressMap.get(adv); + AdvancementProgress progress = progressMap.get(adv.getAdvancementEntry()); return progress != null && progress.isDone(); } } diff --git a/src/main/java/de/dafuqs/revelationary/RevelationDataLoader.java b/src/main/java/de/dafuqs/revelationary/RevelationDataLoader.java index cfbd985..38821f7 100644 --- a/src/main/java/de/dafuqs/revelationary/RevelationDataLoader.java +++ b/src/main/java/de/dafuqs/revelationary/RevelationDataLoader.java @@ -25,6 +25,6 @@ protected void apply(Map prepared, ResourceManager mana @Override public Identifier getFabricId() { - return new Identifier(Revelationary.MOD_ID, "revelations"); + return Identifier.of(Revelationary.MOD_ID, "revelations"); } } \ No newline at end of file diff --git a/src/main/java/de/dafuqs/revelationary/RevelationRegistry.java b/src/main/java/de/dafuqs/revelationary/RevelationRegistry.java index 5724ab9..eec0b51 100644 --- a/src/main/java/de/dafuqs/revelationary/RevelationRegistry.java +++ b/src/main/java/de/dafuqs/revelationary/RevelationRegistry.java @@ -256,7 +256,6 @@ public static boolean isVisibleTo(BlockState state, PlayerEntity player) { public static Map> getBlockStateEntries() { // fighting invariance of java generic types - //noinspection unchecked return (Map>) (Map) advToBlockStates; } @@ -364,7 +363,6 @@ public static BlockState getCloak(BlockState blockState) { public static Map> getItemEntries() { // fighting invariance of java generic types - //noinspection unchecked return (Map>) (Map) advToItems; } diff --git a/src/main/java/de/dafuqs/revelationary/RevelationaryNetworking.java b/src/main/java/de/dafuqs/revelationary/RevelationaryNetworking.java index dc0da86..a16959f 100644 --- a/src/main/java/de/dafuqs/revelationary/RevelationaryNetworking.java +++ b/src/main/java/de/dafuqs/revelationary/RevelationaryNetworking.java @@ -8,7 +8,6 @@ import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; -import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.command.argument.BlockArgumentParser; @@ -57,7 +56,7 @@ public record RevelationSync(Object2ObjectOpenHashMap cloakedBlockNameTranslations, Object2ObjectOpenHashMap cloakedItemNameTranslations) implements CustomPayload { public static final PacketCodec CODEC = CustomPayload.codecOf(RevelationSync::write, RevelationSync::read); - public static final CustomPayload.Id ID = new Id<>(new Identifier(Revelationary.MOD_ID, "revelation_sync")); + public static final CustomPayload.Id ID = new Id<>(Identifier.of(Revelationary.MOD_ID, "revelation_sync")); private static void writeText(RegistryByteBuf buf, Text text) { TextCodecs.REGISTRY_PACKET_CODEC.encode(buf, text); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index f0aaa38..518015e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -32,7 +32,7 @@ "depends": { "fabricloader": "*", "fabric": "*", - "minecraft": ">=1.20.5", + "minecraft": ">=1.21", "java": ">=21" }, "suggests": {