Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch(1.20.2): merge "Fix Race Condition Crash Exploit" (#1849) #1893

Open
wants to merge 1 commit into
base: 1.20.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/carpet/patches/EntityPlayerMPFake.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void createFake(String username, MinecraftServer server, Vec3 pos,
}
}
GameProfile finalGP = gameprofile;
fetchGameProfile(gameprofile.getName()).thenAccept(p -> {
fetchGameProfile(gameprofile.getName()).thenAcceptAsync(p -> {
GameProfile current = finalGP;
if (p.isPresent())
{
Expand All @@ -84,7 +84,8 @@ public static void createFake(String username, MinecraftServer server, Vec3 pos,
//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;
}

private static CompletableFuture<Optional<GameProfile>> fetchGameProfile(final String name) {
Expand Down