mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancynpcs: Fix npc update method in 1.20.1
This commit is contained in:
@@ -238,7 +238,9 @@ public class Npc_1_20_1 extends Npc {
|
|||||||
actions.add(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED);
|
actions.add(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientboundPlayerInfoUpdatePacket playerInfoPacket = new ClientboundPlayerInfoUpdatePacket(actions, getEntry(npcPlayer, serverPlayer));
|
ClientboundPlayerInfoUpdatePacket playerInfoPacket = new ClientboundPlayerInfoUpdatePacket(actions, List.of(npcPlayer)); // KEEP
|
||||||
|
List<ClientboundPlayerInfoUpdatePacket.Entry> entries = List.of(getEntry(npcPlayer, serverPlayer)); // KEEP
|
||||||
|
ReflectionUtils.setValue(playerInfoPacket, MappingKeys1_20_1.CLIENTBOUND_PLAYER_INFO_UPDATE_PACKET__ENTRIES.getMapping(), entries); // KEEP
|
||||||
serverPlayer.connection.send(playerInfoPacket);
|
serverPlayer.connection.send(playerInfoPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user