Skip to content

Commit 347e78c

Browse files
chore: I'm sorry, I'm so so sorry
1 parent b060663 commit 347e78c

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id "dev.architectury.loom" version "0.12.0-SNAPSHOT"
33
id "maven-publish"
4-
id "com.matthewprenger.cursegradle" version "1.4.0"
4+
id "com.matthewprenger.cursegradle" version "1.4.0"
55
}
66

77
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
@@ -52,6 +52,7 @@ dependencies {
5252
modImplementation "dev.ftb.mods:ftb-chunks-forge:${chunks_version}"
5353

5454
modImplementation ("curse.maven:jade-324717:${jade_version}")
55+
modImplementation ("curse.maven:ctm-267602:3933537")
5556

5657
modRuntimeOnly "dev.ftb.mods:ftb-essentials:${essentials_version}"
5758
}

gradlew

100644100755
File mode changed.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package dev.ftb.ftbsbc.mixin.imsorrywellremoveitonceitsfixed;
2+
3+
import it.unimi.dsi.fastutil.objects.Object2BooleanMap;
4+
import it.unimi.dsi.fastutil.objects.Object2BooleanMaps;
5+
import net.minecraft.client.renderer.RenderType;
6+
import net.minecraft.world.level.block.state.BlockState;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.Mutable;
9+
import org.spongepowered.asm.mixin.Shadow;
10+
import org.spongepowered.asm.mixin.injection.At;
11+
import org.spongepowered.asm.mixin.injection.Inject;
12+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
13+
import team.chisel.ctm.client.model.AbstractCTMBakedModel;
14+
15+
import java.util.List;
16+
17+
/**
18+
* TODO: remove this as soon as possible
19+
* again, sorry, plz merge the PR
20+
*/
21+
@Mixin(targets = "team.chisel.ctm.client.util.CTMPackReloadListener$CachingLayerCheck")
22+
public class CTMCMEFixMixin {
23+
@Shadow @Mutable private Object2BooleanMap<RenderType> cache;
24+
25+
@Inject(method = "<init>(Lnet/minecraft/world/level/block/state/BlockState;Ljava/util/List;Z)V", at = @At("RETURN"), remap = false)
26+
public void useDifferentCache(BlockState state, List<AbstractCTMBakedModel> models, boolean useFallback, CallbackInfo info) {
27+
this.cache = Object2BooleanMaps.synchronize(this.cache);
28+
}
29+
}

src/main/resources/ftbsbc.mixins.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"compatibilityLevel": "JAVA_17",
55
"minVersion": "0.8",
66
"mixins": [
7-
"ServerPlayerMixin"
7+
"ServerPlayerMixin",
8+
"imsorrywellremoveitonceitsfixed.CTMCMEFixMixin"
89
],
910
"client": [],
1011
"injectors": {

0 commit comments

Comments
 (0)