Skip to content

Commit

Permalink
remove desperate measures
Browse files Browse the repository at this point in the history
i'm assuming we don't need a 1s-gc loop thread anymore
  • Loading branch information
sisby-folk committed Jul 28, 2024
1 parent a1c4d07 commit 6f18c03
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/main/java/net/modfest/fireblanket/Fireblanket.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.google.common.base.Stopwatch;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.entity.event.v1.ServerEntityWorldChangeEvents;
Expand Down Expand Up @@ -187,24 +186,6 @@ public void onInitialize() {
ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD.register((player, origin, destination) -> {
fullRegionSync(player.getServerWorld(), player.networkHandler::sendPacket);
});

if (FabricLoader.getInstance().getEnvironmentType() == EnvType.SERVER) {
Runnable desperateMeasures = () -> {
while (true) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {

}

System.gc();
}
};

Thread desperateTimes = new Thread(desperateMeasures);

desperateTimes.start();
}
}

public static void fullRegionSync(ServerWorld world, Consumer<Packet<?>> sender) {
Expand Down

0 comments on commit 6f18c03

Please sign in to comment.