Skip to content

Commit 321f636

Browse files
committed
[config b1.7.3] do not call 'close world' event for multiplayer
1 parent efe27dd commit 321f636

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

libraries/config/config-client-mcb1.3-1750-mcb1.7.3/src/main/java/net/ornithemc/osl/config/impl/ConfigInitializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
public class ConfigInitializer implements ModInitializer {
1919

20+
// keep this here until Lifecycle Events has the saveName parameter in its event
2021
public static final Event<BiConsumer<Minecraft, String>> START_GAME = Event.biConsumer();
2122
// keep this here until Lifecycle Events has this...
2223
public static final Event<Consumer<Minecraft>> CLOSE_WORLD = Event.consumer();

libraries/config/config-client-mcb1.3-1750-mcb1.7.3/src/main/java/net/ornithemc/osl/config/impl/mixin/client/MinecraftMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class MinecraftMixin {
2525
)
2626
)
2727
private void osl$config$closeWorld(World world, String message, PlayerEntity player, CallbackInfo ci) {
28-
if (this.world != null && world == null && osl$config$startGameDepth == 0) {
28+
if (this.world != null && !this.world.isMultiplayer && world == null && osl$config$startGameDepth == 0) {
2929
ConfigInitializer.CLOSE_WORLD.invoker().accept((Minecraft)(Object)this);
3030
}
3131
}

0 commit comments

Comments
 (0)