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

Implement FMLServerAboutToStartEvent and hooks related to it. #90

Merged
merged 3 commits into from
Jun 20, 2020

Conversation

cittyinthecloud
Copy link
Contributor

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

@cittyinthecloud cittyinthecloud changed the title ServerAboutToStartEvent Implement FMLServerAboutToStartEvent and hooks related to it. Jun 19, 2020
@ZNixian ZNixian mentioned this pull request Jun 20, 2020
15 tasks
Copy link
Member

@TheGlitch76 TheGlitch76 left a 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

@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) {
Copy link
Member

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

Copy link
Member

@TheGlitch76 TheGlitch76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheGlitch76 TheGlitch76 merged commit d260c05 into PatchworkMC:master Jun 20, 2020
@@ -11,6 +11,9 @@
"MixinClientWorld",
"MixinMinecraftClient"
Copy link
Member

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.

Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants