diff --git a/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch b/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch index c2a07be2e1..ff24a3eafd 100644 --- a/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch +++ b/patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch @@ -8,7 +8,7 @@ public ModelResourceLocation(ResourceLocation id, String variant) { variant = lowercaseVariant(variant); -@@ -21,6 +_,13 @@ +@@ -21,6 +_,14 @@ public static ModelResourceLocation inventory(ResourceLocation p_352141_) { return new ModelResourceLocation(p_352141_, "inventory"); @@ -16,6 +16,7 @@ + + /** + * Construct a {@code ModelResourceLocation} for use in the {@link net.neoforged.neoforge.client.event.ModelEvent.RegisterAdditional} ++ * to load a model at the given path directly instead of going through blockstates or item model auto-prefixing. + */ + public static ModelResourceLocation standalone(ResourceLocation id) { + return new ModelResourceLocation(id, STANDALONE_VARIANT); 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 0e7fed8561..650217ec9b 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#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}.
* @@ -146,6 +146,8 @@ public RegisterAdditional(Set+ * The {@link ModelResourceLocation} passed to this method must later be used to recover the loaded model. */ public void register(ModelResourceLocation model) { Preconditions.checkArgument(