use of net.minecraft.network.play.server.SPacketChunkData in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class PhysicsObject method preloadNewPlayers.
/**
* TODO: Add the methods that send the tileEntities in each given chunk
*/
public void preloadNewPlayers() {
Set<EntityPlayerMP> newWatchers = getPlayersThatJustWatched();
// }
for (Chunk[] chunkArray : claimedChunks) {
for (Chunk chunk : chunkArray) {
SPacketChunkData data = new SPacketChunkData(chunk, 65535);
for (EntityPlayerMP player : newWatchers) {
player.connection.sendPacket(data);
((WorldServer) worldObj).getEntityTracker().sendLeashedEntitiesInChunk(player, chunk);
}
}
}
}
Aggregations