Start world gen refactoring
This commit is contained in:
+2
-2
@@ -13,7 +13,7 @@ public class MixinLevelTicks<T>
|
||||
|
||||
#else
|
||||
|
||||
import com.seibel.distanthorizons.common.wrappers.DependencySetupDoneCheck;
|
||||
import com.seibel.distanthorizons.common.wrappers.WorldGenThreadCheck;
|
||||
|
||||
import net.minecraft.world.ticks.LevelTicks;
|
||||
import net.minecraft.world.ticks.ScheduledTick;
|
||||
@@ -28,7 +28,7 @@ public class MixinLevelTicks<T>
|
||||
{
|
||||
// TODO put in a common location
|
||||
private static boolean isWorldGenThread()
|
||||
{ return DependencySetupDoneCheck.isDone && DependencySetupDoneCheck.getIsCurrentThreadDistantGeneratorThread.get(); }
|
||||
{ return WorldGenThreadCheck.isSetup && WorldGenThreadCheck.isCurrentThreadDhWorldGenThread.get(); }
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-3
@@ -35,10 +35,9 @@ public class MixinTracingExecutor
|
||||
}
|
||||
#else
|
||||
|
||||
import com.seibel.distanthorizons.common.wrappers.DependencySetupDoneCheck;
|
||||
import com.seibel.distanthorizons.common.wrappers.WorldGenThreadCheck;
|
||||
import com.seibel.distanthorizons.core.util.objects.RunOnThisThreadExecutorService;
|
||||
import net.minecraft.TracingExecutor;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
@@ -57,7 +56,7 @@ public class MixinTracingExecutor
|
||||
{
|
||||
// TODO put in a common location
|
||||
private static boolean isWorldGenThread()
|
||||
{ return DependencySetupDoneCheck.isDone && DependencySetupDoneCheck.getIsCurrentThreadDistantGeneratorThread.get(); }
|
||||
{ return WorldGenThreadCheck.isSetup && WorldGenThreadCheck.isCurrentThreadDhWorldGenThread.get(); }
|
||||
|
||||
|
||||
// replaced with TracingExecutor in MC 1.21.3+
|
||||
|
||||
+2
-7
@@ -19,17 +19,12 @@
|
||||
|
||||
package com.seibel.distanthorizons.fabric.mixins.server;
|
||||
|
||||
import com.seibel.distanthorizons.common.wrappers.DependencySetupDoneCheck;
|
||||
import com.seibel.distanthorizons.common.wrappers.WorldGenThreadCheck;
|
||||
import com.seibel.distanthorizons.core.util.objects.RunOnThisThreadExecutorService;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import net.minecraft.Util;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
#if MC_VER < MC_1_16_5
|
||||
#elif MC_VER < MC_1_21_3
|
||||
import java.util.function.Supplier;
|
||||
@@ -47,7 +42,7 @@ import java.util.function.Supplier;
|
||||
public class MixinUtilBackgroundThread
|
||||
{
|
||||
private static boolean isWorldGenThread()
|
||||
{ return DependencySetupDoneCheck.isDone && DependencySetupDoneCheck.getIsCurrentThreadDistantGeneratorThread.get(); }
|
||||
{ return WorldGenThreadCheck.isSetup && WorldGenThreadCheck.isCurrentThreadDhWorldGenThread.get(); }
|
||||
|
||||
|
||||
#if MC_VER < MC_1_21_3
|
||||
|
||||
Reference in New Issue
Block a user