parent
e75aca9236
commit
40be7c9fc1
|
|
@ -2,6 +2,7 @@ package org.embeddedt.modernfix.common.mixin.perf.dedicated_reload_executor;
|
|||
|
||||
import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen;
|
||||
import org.embeddedt.modernfix.ModernFix;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
|
|
@ -9,6 +10,7 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
|
|||
import java.util.concurrent.Executor;
|
||||
|
||||
@Mixin(CreateWorldScreen.class)
|
||||
@ClientOnlyMixin
|
||||
public class CreateWorldScreenMixin {
|
||||
@ModifyArg(method = "tryApplyNewDataPacks", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/WorldLoader;load(Lnet/minecraft/server/WorldLoader$InitConfig;Lnet/minecraft/server/WorldLoader$WorldDataSupplier;Lnet/minecraft/server/WorldLoader$ResultFactory;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;"), index = 3)
|
||||
private Executor getReloadExecutorService(Executor e) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package org.embeddedt.modernfix.common.mixin.perf.dedicated_reload_executor;
|
|||
|
||||
import net.minecraft.client.gui.screens.worldselection.WorldOpenFlows;
|
||||
import org.embeddedt.modernfix.ModernFix;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
|
|
@ -9,6 +10,7 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
|
|||
import java.util.concurrent.Executor;
|
||||
|
||||
@Mixin(WorldOpenFlows.class)
|
||||
@ClientOnlyMixin
|
||||
public class WorldOpenFlowsMixin {
|
||||
@ModifyArg(method = "loadWorldStem(Lnet/minecraft/server/WorldLoader$PackConfig;Lnet/minecraft/server/WorldLoader$WorldDataSupplier;)Lnet/minecraft/server/WorldStem;", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/WorldStem;load(Lnet/minecraft/server/WorldLoader$InitConfig;Lnet/minecraft/server/WorldLoader$WorldDataSupplier;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;"), index = 2)
|
||||
private Executor getResourceReloadExecutor(Executor service) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import net.minecraft.world.level.DataPackConfig;
|
|||
import net.minecraft.world.level.levelgen.WorldGenSettings;
|
||||
import net.minecraft.world.level.levelgen.presets.WorldPresets;
|
||||
import org.embeddedt.modernfix.ModernFix;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
|
@ -30,6 +31,7 @@ import java.util.concurrent.CompletableFuture;
|
|||
import java.util.concurrent.Executor;
|
||||
|
||||
@Mixin(CreateWorldScreen.class)
|
||||
@ClientOnlyMixin
|
||||
public abstract class CreateWorldScreenMixin extends Screen {
|
||||
@Shadow protected static WorldLoader.InitConfig createDefaultLoadConfig(PackRepository arg, DataPackConfig arg2) {
|
||||
throw new AssertionError();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user