Make sure only render thread can call onGameJoin ()

This commit is contained in:
apple502j 2022-06-08 03:43:41 +09:00 committed by GitHub
parent fd0cc9858a
commit 59c610c9f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ abstract class ClientPlayNetworkHandlerMixin {
@Final
private ClientCommandSource commandSource;
@Inject(method = "onGameJoin", at = @At("HEAD"))
@Inject(method = "onGameJoin", at = @At("RETURN"))
private void onGameJoin(GameJoinS2CPacket packet, CallbackInfo info) {
final CommandDispatcher<FabricClientCommandSource> dispatcher = new CommandDispatcher<>();
ClientCommandInternals.setActiveDispatcher(dispatcher);