Skip to content

Commit

Permalink
Use client.world instead of client.player.world, fixes #128 (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
qouteall authored Jun 30, 2022
1 parent 72d0a4f commit 88408c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void initClient() {
PacketByteBuf copy = new PacketByteBuf(buffer.copy());
client.execute(() -> {
try {
componentType.maybeGet(Objects.requireNonNull(client.player).world.getEntityById(entityId))
componentType.maybeGet(Objects.requireNonNull(client.world).getEntityById(entityId))
.filter(c -> c instanceof AutoSyncedComponent)
.ifPresent(c -> ((AutoSyncedComponent) c).applySyncPacket(copy));
} finally {
Expand Down

0 comments on commit 88408c2

Please sign in to comment.