File tree Expand file tree Collapse file tree
src/main/java/com/falsepattern/falsetweaks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ dependencies {
7575
7676 compileOnly(deobf(" optifine:optifine:1.7.10_hd_u_e7" ))
7777
78- compileOnly(" com.github.GTNewHorizons:GTNHLib:0.5.19:dev " )
78+ compileOnly(" com.github.GTNewHorizons:GTNHLib:0.5.20:api " )
7979
8080 implementation(" org.joml:joml:1.10.5" )
8181 implementation(" it.unimi.dsi:fastutil:8.5.13" )
Original file line number Diff line number Diff line change 4242 guiFactory = Tags .ROOT_PKG + ".config.FalseTweaksGuiFactory" ,
4343 acceptableRemoteVersions = "*" ,
4444 dependencies = "required-after:falsepatternlib@[1.4.2,);" +
45- "after:neodymium@[0.3.2,);"
45+ "after:neodymium@[0.3.2,);" +
46+ "after:gtnhlib@[0.5.20,);"
4647 )
4748public class FalseTweaks {
4849
Original file line number Diff line number Diff line change 3333import com .falsepattern .falsetweaks .modules .threadexec .ThreadedTask ;
3434import com .falsepattern .falsetweaks .modules .triangulator .ToggleableTessellatorManager ;
3535import com .google .common .base .Preconditions ;
36+ import com .gtnewhorizon .gtnhlib .api .CapturingTesselator ;
3637import com .llamalad7 .mixinextras .injector .wrapoperation .Operation ;
3738import cpw .mods .fml .client .event .ConfigChangedEvent ;
3839import cpw .mods .fml .common .FMLCommonHandler ;
@@ -516,6 +517,16 @@ public Tessellator getThreadTessellator() {
516517 }
517518 }
518519
520+ public static class GTNHLibCompat extends ThreadedChunkUpdateHelper {
521+ @ Override
522+ public Tessellator getThreadTessellator () {
523+ if (CapturingTesselator .isCapturing ()) {
524+ return CapturingTesselator .getThreadTesselator ();
525+ }
526+ return super .getThreadTessellator ();
527+ }
528+ }
529+
519530 @ RequiredArgsConstructor
520531 private static class PendingTaskUpdate {
521532 public final List <WorldRenderer > tasks ;
Original file line number Diff line number Diff line change 3939import com .falsepattern .falsetweaks .modules .triangulator .calibration .Calibration ;
4040import com .falsepattern .falsetweaks .modules .voxelizer .loading .LayerMetadataSection ;
4141import com .falsepattern .falsetweaks .modules .voxelizer .loading .LayerMetadataSerializer ;
42+ import cpw .mods .fml .common .Loader ;
4243import lombok .val ;
4344
4445import net .minecraft .client .Minecraft ;
@@ -104,7 +105,11 @@ public String call() {
104105 public void init (FMLInitializationEvent e ) {
105106 super .init (e );
106107 if (ModuleConfig .THREADED_CHUNK_UPDATES ()) {
107- ThreadedChunkUpdateHelper .instance = new ThreadedChunkUpdateHelper ();
108+ if (Loader .isModLoaded ("gtnhlib" )) {
109+ ThreadedChunkUpdateHelper .instance = new ThreadedChunkUpdateHelper .GTNHLibCompat ();
110+ } else {
111+ ThreadedChunkUpdateHelper .instance = new ThreadedChunkUpdateHelper ();
112+ }
108113 ThreadedChunkUpdateHelper .instance .init ();
109114 }
110115 }
You can’t perform that action at this time.
0 commit comments