Skip to content

Commit 4229894

Browse files
committed
Backport model loading API change to 1.19.4
1 parent 427a92f commit 4229894

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fabric/src/main/java/org/embeddedt/modernfix/fabric/mixin/perf/dynamic_resources/ModelBakeryMixin.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,13 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
7676

7777
private boolean ignoreModelLoad;
7878

79+
// disable fabric recursion
80+
@SuppressWarnings("unused")
81+
private boolean fabric_enableGetOrLoadModelGuard;
7982

8083
@Redirect(method = "<init>", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/resources/model/ModelBakery;blockColors:Lnet/minecraft/client/color/block/BlockColors;"))
8184
private void replaceTopLevelBakedModels(ModelBakery bakery, BlockColors val) {
85+
fabric_enableGetOrLoadModelGuard = false;
8286
this.blockColors = val;
8387
this.ignoreModelLoad = true;
8488
this.loadedBakedModels = CacheBuilder.newBuilder()

0 commit comments

Comments
 (0)