From 195d37596445b0283a11e61b98c326ec5f63ac8e Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:25:13 +0900 Subject: [PATCH] TagUtilTest --- .../fabricmc/fabric/test/tag/convention/v2/TagUtilTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fabric-convention-tags-v2/src/testmod/java/net/fabricmc/fabric/test/tag/convention/v2/TagUtilTest.java b/fabric-convention-tags-v2/src/testmod/java/net/fabricmc/fabric/test/tag/convention/v2/TagUtilTest.java index 2fcbbe3389..fa50e87ddc 100644 --- a/fabric-convention-tags-v2/src/testmod/java/net/fabricmc/fabric/test/tag/convention/v2/TagUtilTest.java +++ b/fabric-convention-tags-v2/src/testmod/java/net/fabricmc/fabric/test/tag/convention/v2/TagUtilTest.java @@ -156,16 +156,16 @@ public void onInitialize() { } ServerLifecycleEvents.SERVER_STARTED.register(server -> { - if (!TagUtil.isIn(server.getRegistryManager(), ConventionalEnchantmentTags.INCREASE_BLOCK_DROPS, server.getRegistryManager().get(RegistryKeys.ENCHANTMENT).get(Enchantments.FORTUNE))) { + if (!TagUtil.isIn(server.getRegistryManager(), ConventionalEnchantmentTags.INCREASE_BLOCK_DROPS, server.getRegistryManager().getOrThrow(RegistryKeys.ENCHANTMENT).get(Enchantments.FORTUNE))) { throw new AssertionError("Failed to find fortune in c:increase_block_drops!"); } - if (TagUtil.isIn(ConventionalBiomeTags.IS_OVERWORLD, server.getRegistryManager().get(RegistryKeys.BIOME).get(BiomeKeys.BADLANDS))) { + if (TagUtil.isIn(ConventionalBiomeTags.IS_OVERWORLD, server.getRegistryManager().getOrThrow(RegistryKeys.BIOME).get(BiomeKeys.BADLANDS))) { throw new AssertionError("Found a dynamic entry in a static registry?!"); } // If this fails, the tag is missing a biome or the util is broken - if (!TagUtil.isIn(server.getRegistryManager(), ConventionalBiomeTags.IS_OVERWORLD, server.getRegistryManager().get(RegistryKeys.BIOME).get(BiomeKeys.BADLANDS))) { + if (!TagUtil.isIn(server.getRegistryManager(), ConventionalBiomeTags.IS_OVERWORLD, server.getRegistryManager().getOrThrow(RegistryKeys.BIOME).get(BiomeKeys.BADLANDS))) { throw new AssertionError("Failed to find an overworld biome (%s) in c:in_overworld!".formatted(BiomeKeys.BADLANDS)); }