Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 515c8ac

Browse files
authored
Fix Dedicated Server inject using CallbackInfo instead of CallbackInfoReturnable (#166)
1 parent 1a4e892 commit 515c8ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

patchwork-events-lifecycle/src/main/java/net/patchworkmc/mixin/event/lifecycle/MixinMinecraftDedicatedServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.spongepowered.asm.mixin.Mixin;
2323
import org.spongepowered.asm.mixin.injection.At;
2424
import org.spongepowered.asm.mixin.injection.Inject;
25-
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
25+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
2626

2727
import net.minecraft.server.MinecraftServer;
2828
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
@@ -32,7 +32,7 @@
3232
@Mixin(MinecraftDedicatedServer.class)
3333
public class MixinMinecraftDedicatedServer {
3434
@Inject(method = "setupServer", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/UserCache;setUseRemote(Z)V", shift = At.Shift.AFTER))
35-
private void onServerAboutToStart(CallbackInfo ci) {
35+
private void onServerAboutToStart(CallbackInfoReturnable<Boolean> cir) {
3636
LifecycleEvents.handleLoadComplete(); // This is a "multithreaded" event that would be called around this time.
3737
LifecycleEvents.handleServerAboutToStart((MinecraftServer) (Object) this);
3838
}

0 commit comments

Comments
 (0)