replace server tick/world gen tick with a timer
This commit is contained in:
@@ -93,10 +93,6 @@ public class FabricServerProxy implements AbstractModInitializer.IEventProxy
|
||||
|
||||
/* Register the mod needed event callbacks */
|
||||
|
||||
// ServerTickEvent
|
||||
ServerTickEvents.END_SERVER_TICK.register((server) -> SERVER_API.serverTickEvent());
|
||||
|
||||
|
||||
// can be enabled to test overrides/events without having to build a separate API project
|
||||
if (false)
|
||||
{
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
package com.seibel.distanthorizons.fabric.mixins.server;
|
||||
|
||||
import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftServerWrapper;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
@Mixin(MinecraftServer.class)
|
||||
public class MixinMinecraftServer
|
||||
{
|
||||
@Shadow
|
||||
private int emptyTicks;
|
||||
|
||||
@Inject(method = "tickServer", at = @At("HEAD"))
|
||||
private void onTickServer(BooleanSupplier hasTimeLeft, CallbackInfo ci)
|
||||
{
|
||||
if (MinecraftServerWrapper.INSTANCE.preventAutoPause)
|
||||
{
|
||||
this.emptyTicks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,8 +9,7 @@
|
||||
"server.MixinServerPlayer",
|
||||
"server.MixinTracingExecutor",
|
||||
"server.MixinUtilBackgroundThread",
|
||||
"server.MixinLevelTicks",
|
||||
"server.MixinMinecraftServer"
|
||||
"server.MixinLevelTicks"
|
||||
],
|
||||
"client": [
|
||||
"client.MixinClientLevel",
|
||||
|
||||
Reference in New Issue
Block a user