File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
forge/src/main/java/org/embeddedt/modernfix/forge/mixin/core Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .embeddedt .modernfix .forge .mixin .core ;
2+
3+ import net .minecraft .client .renderer .RenderType ;
4+ import net .minecraft .server .Bootstrap ;
5+ import org .embeddedt .modernfix .annotation .ClientOnlyMixin ;
6+ import org .spongepowered .asm .mixin .Mixin ;
7+ import org .spongepowered .asm .mixin .injection .At ;
8+ import org .spongepowered .asm .mixin .injection .Inject ;
9+ import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
10+
11+ @ Mixin (Bootstrap .class )
12+ @ ClientOnlyMixin
13+ public class BootstrapClientMixin {
14+ /**
15+ * Hack to workaround RenderStateShard deadlock (by loading it early on a single thread). We use validate
16+ * here to ensure Forge registries are initialized.
17+ */
18+ @ Inject (method = "validate" , at = @ At ("HEAD" ))
19+ private static void loadClientClasses (CallbackInfo ci ) {
20+ RenderType .solid ();
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments