forked from neoforged/NeoForge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce special variant for "side-loaded" models
- Loading branch information
Showing
4 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
patches/net/minecraft/client/resources/model/ModelResourceLocation.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- a/net/minecraft/client/resources/model/ModelResourceLocation.java | ||
+++ b/net/minecraft/client/resources/model/ModelResourceLocation.java | ||
@@ -8,6 +_,7 @@ | ||
@OnlyIn(Dist.CLIENT) | ||
public record ModelResourceLocation(ResourceLocation id, String variant) { | ||
public static final String INVENTORY_VARIANT = "inventory"; | ||
+ public static final String NEOFORGE_SPECIAL_VARIANT = "neoforge_special"; | ||
|
||
public ModelResourceLocation(ResourceLocation id, String variant) { | ||
variant = lowercaseVariant(variant); | ||
@@ -21,6 +_,10 @@ | ||
|
||
public static ModelResourceLocation inventory(ResourceLocation p_352141_) { | ||
return new ModelResourceLocation(p_352141_, "inventory"); | ||
+ } | ||
+ | ||
+ public static ModelResourceLocation neoforgeSpecial(ResourceLocation id) { | ||
+ return new ModelResourceLocation(id, NEOFORGE_SPECIAL_VARIANT); | ||
} | ||
|
||
private static String lowercaseVariant(String p_248567_) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters