diff --git a/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch b/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch index de31fc2069..c2a07be2e1 100644 --- a/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch +++ b/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch @@ -4,7 +4,7 @@ @OnlyIn(Dist.CLIENT) public record ModelResourceLocation(ResourceLocation id, String variant) { public static final String INVENTORY_VARIANT = "inventory"; -+ public static final String NEOFORGE_STANDALONE_VARIANT = "neoforge_standalone"; ++ public static final String STANDALONE_VARIANT = "standalone"; public ModelResourceLocation(ResourceLocation id, String variant) { variant = lowercaseVariant(variant); @@ -17,8 +17,8 @@ + /** + * Construct a {@code ModelResourceLocation} for use in the {@link net.neoforged.neoforge.client.event.ModelEvent.RegisterAdditional} + */ -+ public static ModelResourceLocation neoForgeStandalone(ResourceLocation id) { -+ return new ModelResourceLocation(id, NEOFORGE_STANDALONE_VARIANT); ++ public static ModelResourceLocation standalone(ResourceLocation id) { ++ return new ModelResourceLocation(id, STANDALONE_VARIANT); } private static String lowercaseVariant(String p_248567_) { diff --git a/src/main/java/net/neoforged/neoforge/client/event/ModelEvent.java b/src/main/java/net/neoforged/neoforge/client/event/ModelEvent.java index 0a9ecec29d..0e7fed8561 100644 --- a/src/main/java/net/neoforged/neoforge/client/event/ModelEvent.java +++ b/src/main/java/net/neoforged/neoforge/client/event/ModelEvent.java @@ -130,7 +130,7 @@ public ModelBakery getModelBakery() { /** * Fired when the {@link net.minecraft.client.resources.model.ModelBakery} is notified of the resource manager reloading. * Allows developers to register models to be loaded, along with their dependencies. Models registered through this - * event must use the {@link ModelResourceLocation#NEOFORGE_STANDALONE_VARIANT} variant + * event must use the {@link ModelResourceLocation#STANDALONE_VARIANT} variant * *

This event is not {@linkplain ICancellableEvent cancellable}, and does not {@linkplain HasResult have a result}.

* @@ -149,8 +149,8 @@ public RegisterAdditional(Set models) { */ public void register(ModelResourceLocation model) { Preconditions.checkArgument( - model.getVariant().equals(ModelResourceLocation.NEOFORGE_STANDALONE_VARIANT), - "Side-loaded models must use the '" + ModelResourceLocation.NEOFORGE_STANDALONE_VARIANT + "' variant"); + model.getVariant().equals(ModelResourceLocation.STANDALONE_VARIANT), + "Side-loaded models must use the '" + ModelResourceLocation.STANDALONE_VARIANT + "' variant"); models.add(model); } } diff --git a/tests/src/main/java/net/neoforged/neoforge/oldtest/client/rendering/RenderableTest.java b/tests/src/main/java/net/neoforged/neoforge/oldtest/client/rendering/RenderableTest.java index e748a515ac..bcb1ae5cc5 100644 --- a/tests/src/main/java/net/neoforged/neoforge/oldtest/client/rendering/RenderableTest.java +++ b/tests/src/main/java/net/neoforged/neoforge/oldtest/client/rendering/RenderableTest.java @@ -67,7 +67,7 @@ public RenderableTest(IEventBus modEventBus) { } private static class Client { - private static ModelResourceLocation MODEL_LOC = ModelResourceLocation.neoForgeStandalone( + private static ModelResourceLocation MODEL_LOC = ModelResourceLocation.standalone( ResourceLocation.fromNamespaceAndPath("minecraft", "block/blue_stained_glass")); private static IRenderable renderable;