Skip to content

Commit

Permalink
refactor: make hitbox-remove packets without player unsend to all in …
Browse files Browse the repository at this point in the history
…world not all online
  • Loading branch information
Boy0000 committed Jan 30, 2024
1 parent a4260e4 commit 2b55150
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ object FurniturePacketHelpers {
* @param furniture The furniture to remove the interaction hitbox of.
*/
fun removeInteractionHitboxPacket(furniture: ItemDisplay) {
blocky.plugin.server.onlinePlayers.forEach { player ->
furniture.world.players.forEach { player ->
removeInteractionHitboxPacket(furniture, player)
}
interactionHitboxIdMap.removeIf { it.furnitureUUID == furniture.uniqueId }
Expand Down Expand Up @@ -232,7 +232,7 @@ object FurniturePacketHelpers {
* @param baseEntity The furniture to remove the collision hitbox of.
*/
fun removeCollisionHitboxPacket(baseEntity: ItemDisplay) {
blocky.plugin.server.onlinePlayers.forEach {
baseEntity.world.players.forEach {
removeCollisionHitboxPacket(baseEntity, it)
}
collisionHitboxPosMap.remove(baseEntity.uniqueId)
Expand Down Expand Up @@ -271,7 +271,7 @@ object FurniturePacketHelpers {
* @param baseEntity The furniture to remove the light packets for
*/
fun removeLightPacket(baseEntity: ItemDisplay) {
blocky.plugin.server.onlinePlayers.forEach {
baseEntity.world.players.forEach {
removeLightPacket(baseEntity, it)
}
}
Expand Down

0 comments on commit 2b55150

Please sign in to comment.