Skip to content

Commit

Permalink
lose yourself to the payload
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsterner committed Dec 19, 2024
1 parent dd6cfa7 commit b188899
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,18 @@ public static void sendToPlayersTrackingEntityAndSelf(LivingEntity e, CustomPack
for (ServerPlayer player : PlayerLookup.tracking(e)) {
ServerPlayNetworking.send(player, payload);
}
if (e instanceof ServerPlayer self) {
ServerPlayNetworking.send(self, payload);
}
}

public static void sendToPlayersTrackingEntityAndSelf(Entity e, CustomPacketPayload payload) {
for (ServerPlayer player : PlayerLookup.tracking(e)) {
ServerPlayNetworking.send(player, payload);
}
if (e instanceof ServerPlayer self) {
ServerPlayNetworking.send(self, payload);
}
}

public static void sendToPlayersTrackingChunk(ServerLevel level, ChunkPos chunkPos, CustomPacketPayload payload) {
Expand Down

0 comments on commit b188899

Please sign in to comment.