CubicChunks

CubicChunks

840k Downloads

CubeWatchEvent not always fired

Johni0702 opened this issue ยท 1 comments

commented

Looking at CubeWatcher internals, I came across these lines which appear to send the cube to the player while never firing the CubeWatchEvent (haven't actually tested it, just a suspicion):

if (this.sentToPlayers) {
this.sendToPlayer(player);
((CubicEntityTracker) playerCubeMap.getWorldServer().getEntityTracker())
.sendLeashedEntitiesInCube(player, this.getCube());
}

In contrast (when the cube is first loaded):
for (EntityPlayerMP playerEntry : this.players) {
MinecraftForge.EVENT_BUS.post(new CubeWatchEvent(cube, cubePos, this, playerEntry));
sendToPlayer(playerEntry);
}

commented

That should be easy to fix.