-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
64 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...org/yatopiamc/c2me/mixin/threading/chunkio/MixinServerChunkManagerMainThreadExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.yatopiamc.c2me.mixin.threading.chunkio; | ||
|
||
import net.minecraft.server.world.ServerChunkManager; | ||
import net.minecraft.util.thread.ThreadExecutor; | ||
import org.spongepowered.asm.mixin.Dynamic; | ||
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.Redirect; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(ServerChunkManager.MainThreadExecutor.class) | ||
public abstract class MixinServerChunkManagerMainThreadExecutor extends ThreadExecutor<Runnable> { | ||
|
||
protected MixinServerChunkManagerMainThreadExecutor(String name) { | ||
super(name); | ||
} | ||
|
||
@Inject(method = "runTask", at = @At("RETURN")) | ||
private void onPostRunTask(CallbackInfoReturnable<Boolean> cir) { | ||
super.runTask(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# Global settings | ||
[global] | ||
|
||
# Configuration for async io system | ||
[asyncIO] | ||
# Serializer executor parallelism | ||
serializerParallelism = -1 | ||
# IO worker executor parallelism | ||
ioWorkerParallelism = -1 | ||
# Serializer executor parallelism | ||
serializerParallelism = -1 | ||
|
||
# Configuration for threaded world generation | ||
[threadedWorldGen] | ||
# Whether to enable this feature | ||
enabled = true | ||
# World generation worker executor parallelism | ||
parallelism = -1 | ||
# Whether to allow feature generation (world decorations like trees, ores and etc.) run in parallel | ||
allowThreadedFeatures = false | ||
|