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;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -26,7 +26,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
-2
@@ -35,7 +35,7 @@ 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;
|
||||
@@ -57,7 +57,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(); }
|
||||
|
||||
|
||||
// Util.backgroundExecutor().forName("init_biomes")
|
||||
|
||||
+2
-8
@@ -19,16 +19,10 @@
|
||||
|
||||
package com.seibel.distanthorizons.neoforge.mixins.server;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
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 com.seibel.distanthorizons.common.wrappers.DependencySetupDoneCheck;
|
||||
import com.seibel.distanthorizons.common.wrappers.WorldGenThreadCheck;
|
||||
|
||||
import net.minecraft.Util;
|
||||
|
||||
@@ -43,7 +37,7 @@ import net.minecraft.Util;
|
||||
public class MixinUtilBackgroundThread
|
||||
{
|
||||
private static boolean isWorldGenThread()
|
||||
{ return DependencySetupDoneCheck.isDone && DependencySetupDoneCheck.getIsCurrentThreadDistantGeneratorThread.get(); }
|
||||
{ return WorldGenThreadCheck.isSetup && WorldGenThreadCheck.isCurrentThreadDhWorldGenThread.get(); }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user