From d7e08686e44732c447468b06fa5e635c2c2e71c1 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Fri, 30 Aug 2024 00:42:06 +0900 Subject: [PATCH] Fix inspectable pigs --- .../test/lookup/entity/FabricEntityApiLookupTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fabric-api-lookup-api-v1/src/testmod/java/net/fabricmc/fabric/test/lookup/entity/FabricEntityApiLookupTest.java b/fabric-api-lookup-api-v1/src/testmod/java/net/fabricmc/fabric/test/lookup/entity/FabricEntityApiLookupTest.java index 09bb9ace6c..ce9fb98958 100644 --- a/fabric-api-lookup-api-v1/src/testmod/java/net/fabricmc/fabric/test/lookup/entity/FabricEntityApiLookupTest.java +++ b/fabric-api-lookup-api-v1/src/testmod/java/net/fabricmc/fabric/test/lookup/entity/FabricEntityApiLookupTest.java @@ -23,6 +23,8 @@ import net.minecraft.entity.passive.PigEntity; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -33,6 +35,7 @@ import net.fabricmc.fabric.test.lookup.api.Inspectable; public class FabricEntityApiLookupTest { + public static final RegistryKey> INSPECTABLE_PIG_KEY = RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(FabricApiLookupTest.MOD_ID, "inspectable_pig")); public static final EntityApiLookup INSPECTABLE = EntityApiLookup.get(Identifier.of(FabricApiLookupTest.MOD_ID, "inspectable"), Inspectable.class, Void.class); @@ -41,10 +44,10 @@ public class FabricEntityApiLookupTest { .entityFactory(InspectablePigEntity::new) .dimensions(EntityDimensions.changing(0.9F, 0.9F)) .trackRangeChunks(10) - .build(); + .build(INSPECTABLE_PIG_KEY); public static void onInitialize() { - Registry.register(Registries.ENTITY_TYPE, Identifier.of(FabricApiLookupTest.MOD_ID, "inspectable_pig"), INSPECTABLE_PIG); + Registry.register(Registries.ENTITY_TYPE, INSPECTABLE_PIG_KEY, INSPECTABLE_PIG); FabricDefaultAttributeRegistry.register(INSPECTABLE_PIG, PigEntity.createPigAttributes()); INSPECTABLE.registerSelf(INSPECTABLE_PIG);