Check if same level before trying to decode the data.

This commit is contained in:
Acuadragon100
2026-04-26 12:41:28 +02:00
parent 949124f8dc
commit 25ac1de59b
@@ -167,15 +167,15 @@ public class DhClientLevel extends AbstractDhLevel implements IDhClientLevel
}
// Check this before decoding data to prevent errors if multiple client levels are receiving data at once (Immersive Portals compatibility).
boolean isSameLevel = message.isSameLevelAs(this.levelWrapper);
NETWORK_LOGGER.debug("Buffer ["+message.payload.dtoBufferId+"] isSameLevel: ["+isSameLevel+"]");
if (!isSameLevel)
{
return;
}
try (FullDataSourceV2DTO dataSourceDto = this.networkState.fullDataPayloadReceiver.decodeDataSource(message.payload))
{
boolean isSameLevel = message.isSameLevelAs(this.levelWrapper);
NETWORK_LOGGER.debug("Buffer ["+message.payload.dtoBufferId+"] isSameLevel: ["+isSameLevel+"]");
if (!isSameLevel)
{
return;
}
Executor executor = ThreadPoolUtil.getFileHandlerExecutor();
if (executor != null)