From 92dec60858dd9b51a4531bba67da2c676835b1f8 Mon Sep 17 00:00:00 2001 From: Fabian Maurer Date: Sun, 20 Sep 2026 22:53:45 +0200 Subject: [PATCH] Handle subworld player proxies properly --- .../codechicken/multipart/handler/packethandlers.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/scala/codechicken/multipart/handler/packethandlers.scala b/src/main/scala/codechicken/multipart/handler/packethandlers.scala index 16c27b6..2b2590e 100644 --- a/src/main/scala/codechicken/multipart/handler/packethandlers.scala +++ b/src/main/scala/codechicken/multipart/handler/packethandlers.scala @@ -286,12 +286,16 @@ object MultipartSPH } def onChunkWatch(p: EntityPlayerMP, c: ChunkCoordIntPair) { - newWatchers.getOrElseUpdate(p.worldObj, newWatchMap).addBinding(p, c) + val hostPlayer = WorldContextRegistry.getHostPlayer(p.worldObj, p) + newWatchers + .getOrElseUpdate(p.worldObj, newWatchMap) + .addBinding(hostPlayer, c) } def onChunkUnWatch(p: EntityPlayerMP, c: ChunkCoordIntPair) { - removeBinding(newWatchers, p.worldObj, p, c) - removeBinding(chunkWatchers, p.worldObj, p, c) + val hostPlayer = WorldContextRegistry.getHostPlayer(p.worldObj, p) + removeBinding(newWatchers, p.worldObj, hostPlayer, c) + removeBinding(chunkWatchers, p.worldObj, hostPlayer, c) } private def removeBinding(