Skip to content

Commit

Permalink
fixing #147
Browse files Browse the repository at this point in the history
  • Loading branch information
Szum123321 committed Dec 22, 2023
1 parent d40109e commit 34ee3f1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
org.gradle.jvmargs=-Xmx1G

minecraft_version=1.20.4
yarn_mappings=1.20.4+build.1
loader_version=0.15.1
yarn_mappings=1.20.4+build.3
loader_version=0.15.3

#Fabric api
fabric_version=0.91.2+1.20.4
fabric_version=0.91.3+1.20.4

#Cloth Config
cloth_version=13.0.114
cloth_version=13.0.121

#ModMenu
modmenu_version=9.0.0-pre.1
modmenu_version=9.0.0

lazydfu_version=0.1.3
#Hash of commit form which parallel gzip will be build
pgzip_commit_hash=af5f5c297e735f3f2df7aa4eb0e19a5810b8aff6

# Mod Properties
mod_version = 3.1.2
mod_version = 3.1.3
maven_group = net.szum123321
archives_base_name = textile_backup
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public Void call() throws Exception {
AtomicReference<Optional<WorldSavingState>> state = new AtomicReference<>(Optional.empty());

try {
//Globals.INSTANCE.disableWatchdog = true;
Globals.INSTANCE.disableWatchdog = true;
//I think I should synchronise these two next calls...

//Execute following call on the server executor
Expand Down Expand Up @@ -149,8 +149,7 @@ public Void call() throws Exception {
if (state.get().isPresent()) {
state.get().get().enable(server);
}
//Utilities.enableWorldSaving(server);
//Globals.INSTANCE.disableWatchdog = false;
Globals.INSTANCE.disableWatchdog = false;
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
@Mixin(DedicatedServerWatchdog.class)
public class DedicatedServerWatchdogMixin {

@ModifyVariable(method = "run()V", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"), ordinal = 0, name = "l")
@ModifyVariable(method = "run()V", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/util/Util;getMeasuringTimeNano()J"), ordinal = 0, name = "l")
private long redirectedCall(long original) {
return Globals.INSTANCE.disableWatchdog ? Util.getMeasuringTimeMs() : original;
return Globals.INSTANCE.disableWatchdog ? Util.getMeasuringTimeNano() : original;
}
}

0 comments on commit 34ee3f1

Please sign in to comment.