-
Notifications
You must be signed in to change notification settings - Fork 49
Implement FMLServerAboutToStartEvent and hooks related to it. #90
Implement FMLServerAboutToStartEvent and hooks related to it. #90
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two tiny nitpicks to fix and this is good to go
...cycle/src/main/java/net/patchworkmc/mixin/event/lifecycle/MixinMinecraftDedicatedServer.java
Show resolved
Hide resolved
@Mixin(MinecraftDedicatedServer.class) | ||
public class MixinMinecraftDedicatedServer { | ||
@Inject(method = "setupServer", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/UserCache;setUseRemote(Z)V", shift = At.Shift.AFTER)) | ||
private void onServerAboutToStart(CallbackInfoReturnable<Boolean> cir) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a normal CallbackInfo for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -11,6 +11,9 @@ | |||
"MixinClientWorld", | |||
"MixinMinecraftClient" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed the boat on this PR. Shouldn't MixinIntegratedServer be included here? I can't see it in any of the Mixin JSON files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I will fix right now.
This PR implements FMLServerAboutToStartEvent, and some other calls that happen in forge at the same time (mostly related to passing the MinecraftServer object around). It also creates a stub version of ServerLifecycleHooks that only implements getCurrentServer, which completes part of #84