mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-19 19:59:40 +00:00
Handle subworld player proxies properly
This commit is contained in:
1 parent
471da2192b
commit
92dec60858
1 file changed
+7
-3
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user