mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 05:54:41 +00:00
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
--- a/net/minecraft/client/renderer/Sheets.java
|
|
+++ b/net/minecraft/client/renderer/Sheets.java
|
|
@@ -145,11 +_,13 @@
|
|
}
|
|
|
|
private static Material m_173385_(WoodType p_173386_) {
|
|
- return new Material(f_110739_, new ResourceLocation("entity/signs/" + p_173386_.f_61839_()));
|
|
+ ResourceLocation location = new ResourceLocation(p_173386_.f_61839_());
|
|
+ return new Material(f_110739_, new ResourceLocation(location.m_135827_(), "entity/signs/" + location.m_135815_()));
|
|
}
|
|
|
|
private static Material m_245275_(WoodType p_251735_) {
|
|
- return new Material(f_110739_, new ResourceLocation("entity/signs/hanging/" + p_251735_.f_61839_()));
|
|
+ ResourceLocation location = new ResourceLocation(p_251735_.f_61839_());
|
|
+ return new Material(f_110739_, new ResourceLocation(location.m_135827_(), "entity/signs/hanging/" + location.m_135815_()));
|
|
}
|
|
|
|
public static Material m_173381_(WoodType p_173382_) {
|
|
@@ -208,6 +_,23 @@
|
|
case SINGLE:
|
|
default:
|
|
return p_110773_;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Not threadsafe. Enqueue it in client setup.
|
|
+ */
|
|
+ public static void addWoodType(WoodType woodType) {
|
|
+ f_110743_.put(woodType, m_173385_(woodType));
|
|
+ f_244291_.put(woodType, m_245275_(woodType));
|
|
+ }
|
|
+
|
|
+ static {
|
|
+ if (net.minecraftforge.fml.ModLoader.isLoadingStateValid() && !net.minecraftforge.fml.ModLoader.get().hasCompletedState("LOAD_REGISTRIES")) {
|
|
+ com.mojang.logging.LogUtils.getLogger().error(
|
|
+ "net.minecraft.client.renderer.Sheets loaded too early, modded registry-based materials may not work correctly",
|
|
+ new IllegalStateException("net.minecraft.client.renderer.Sheets loaded too early")
|
|
+ );
|
|
}
|
|
}
|
|
}
|