From 55b29cc0349bcfde0352bfa215dccd6b27f7b9bd Mon Sep 17 00:00:00 2001 From: dicedpixels <121529979+dicedpixels@users.noreply.github.com> Date: Thu, 25 Jul 2024 23:31:07 +0530 Subject: [PATCH] fix crashes by getting the actual registry entry from the respective registry (#154) --- .../com/example/docs/potion/FabricDocsReferencePotions.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java b/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java index 3c8ea1530..dd6264317 100644 --- a/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java +++ b/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java @@ -6,7 +6,6 @@ import net.minecraft.potion.Potions; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; -import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.Identifier; import net.fabricmc.api.ModInitializer; @@ -22,7 +21,7 @@ public class FabricDocsReferencePotions implements ModInitializer { Identifier.of("fabric-docs-reference", "tater"), new Potion( new StatusEffectInstance( - RegistryEntry.of(FabricDocsReferenceEffects.TATER_EFFECT), + Registries.STATUS_EFFECT.getEntry(FabricDocsReferenceEffects.TATER_EFFECT), 3600, 0))); @@ -35,7 +34,7 @@ public void onInitialize() { // Ingredient Items.POTATO, // Output potion. - RegistryEntry.of(TATER_POTION) + Registries.POTION.getEntry(TATER_POTION) ); }); }