From 2fabf39f509b6f65086fb8ce07709bb9d6dd0c71 Mon Sep 17 00:00:00 2001 From: senseiwells <66843746+senseiwells@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:52:11 +0000 Subject: [PATCH] Fix Race Condition Crash Exploit (#1849) --- src/main/java/carpet/patches/EntityPlayerMPFake.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/carpet/patches/EntityPlayerMPFake.java b/src/main/java/carpet/patches/EntityPlayerMPFake.java index 51bf1ee3a..b4519bea4 100644 --- a/src/main/java/carpet/patches/EntityPlayerMPFake.java +++ b/src/main/java/carpet/patches/EntityPlayerMPFake.java @@ -66,7 +66,7 @@ public static boolean createFake(String username, MinecraftServer server, Vec3 p } } GameProfile finalGP = gameprofile; - fetchGameProfile(gameprofile.getName()).thenAccept(p -> { + fetchGameProfile(gameprofile.getName()).thenAcceptAsync(p -> { GameProfile current = finalGP; if (p.isPresent()) { @@ -85,7 +85,7 @@ public static boolean createFake(String username, MinecraftServer server, Vec3 p //instance.world.getChunkManager(). updatePosition(instance); instance.entityData.set(DATA_PLAYER_MODE_CUSTOMISATION, (byte) 0x7f); // show all model layers (incl. capes) instance.getAbilities().flying = flying; - }); + }, server); return true; }