Java 类net.minecraft.network.play.server.S26PacketMapChunkBulk 实例源码

项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    for (int i = 0; i < packetIn.getChunkCount(); ++i)
    {
        int j = packetIn.getChunkX(i);
        int k = packetIn.getChunkZ(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(packetIn.getChunkBytes(i), packetIn.getChunkSize(i), true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    for (int i = 0; i < packetIn.getChunkCount(); ++i)
    {
        int j = packetIn.getChunkX(i);
        int k = packetIn.getChunkZ(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(packetIn.getChunkBytes(i), packetIn.getChunkSize(i), true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    for (int i = 0; i < packetIn.getChunkCount(); ++i) {
        int j = packetIn.getChunkX(i);
        int k = packetIn.getChunkZ(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256,
                (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(packetIn.getChunkBytes(i), packetIn.getChunkSize(i), true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256,
                (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface)) {
            chunk.resetRelightChecks();
        }
    }
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_)
{
    for (int var2 = 0; var2 < p_147269_1_.func_149254_d(); ++var2)
    {
        int var3 = p_147269_1_.func_149255_a(var2);
        int var4 = p_147269_1_.func_149253_b(var2);
        this.clientWorldController.doPreChunk(var3, var4, true);
        this.clientWorldController.invalidateBlockReceiveRegion(var3 << 4, 0, var4 << 4, (var3 << 4) + 15, 256, (var4 << 4) + 15);
        Chunk var5 = this.clientWorldController.getChunkFromChunkCoords(var3, var4);
        var5.fillChunk(p_147269_1_.func_149256_c(var2), p_147269_1_.func_149252_e()[var2], p_147269_1_.func_149257_f()[var2], true);
        this.clientWorldController.markBlockRangeForRenderUpdate(var3 << 4, 0, var4 << 4, (var3 << 4) + 15, 256, (var4 << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            var5.resetRelightChecks();
        }
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_)
{
    for (int i = 0; i < p_147269_1_.func_149254_d(); ++i)
    {
        int j = p_147269_1_.func_149255_a(i);
        int k = p_147269_1_.func_149253_b(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(p_147269_1_.func_149256_c(i), p_147269_1_.func_149252_e()[i], p_147269_1_.func_149257_f()[i], true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_)
{
    for (int i = 0; i < p_147269_1_.func_149254_d(); ++i)
    {
        int j = p_147269_1_.func_149255_a(i);
        int k = p_147269_1_.func_149253_b(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(p_147269_1_.func_149256_c(i), p_147269_1_.func_149252_e()[i], p_147269_1_.func_149257_f()[i], true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:Factorization    文件:PacketProxyingPlayer.java   
void sendChunkMapDataToPlayer(EntityPlayerMP target) {
    DimensionSliceEntity dse = dimensionSlice.get();
    if (dse == null) return;
    // Inspired by EntityPlayerMP.onUpdate. Shame we can't just add chunks directly to target's chunkwatcher... but there'd be no wrapper for the packets.
    final ArrayList<Chunk> chunks = new ArrayList<Chunk>();
    final ArrayList<TileEntity> tileEntities = new ArrayList<TileEntity>();
    World world = DeltaChunk.getServerShadowWorld();

    Coord low = dse.getMinCorner().add(-16, 0, -16);
    Coord far = dse.getMaxCorner().add(+16, 0, +16);
    Coord.iterateChunks(low, far, new ICoordFunction() {
        @Override
        public void handle(Coord here) {
            if (!here.blockExists()) return;
            Chunk chunk = here.getChunk();
            chunks.add(chunk);
            tileEntities.addAll(chunk.getTileEntityMap().values());
        }
    });

    // NOTE: This has the potential to go badly if there's a large amount of data in the chunks.
    if (!chunks.isEmpty()) {
        Packet toSend = new S26PacketMapChunkBulk(chunks);
        addNettyMessageForPlayer(target, toSend);
    }
    if (!tileEntities.isEmpty()) {
        for (TileEntity te : tileEntities) {
            Packet description = te.getDescriptionPacket();
            if (description == null) {
                continue;
            }
            addNettyMessageForPlayer(target, description);
        }
    }
}
项目:Resilience-Client-Source    文件:PlayerManager.java   
/**
 * Adds an EntityPlayerMP to the PlayerManager.
 */
public void addPlayer(EntityPlayerMP par1EntityPlayerMP)
{
    int var2 = (int)par1EntityPlayerMP.posX >> 4;
    int var3 = (int)par1EntityPlayerMP.posZ >> 4;
    par1EntityPlayerMP.managedPosX = par1EntityPlayerMP.posX;
    par1EntityPlayerMP.managedPosZ = par1EntityPlayerMP.posZ;
    ArrayList spawnList = new ArrayList(1);

    for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)
    {
        for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)
        {
            this.getOrCreateChunkWatcher(var4, var5, true).addPlayer(par1EntityPlayerMP);

            if (var4 >= var2 - 1 && var4 <= var2 + 1 && var5 >= var3 - 1 && var5 <= var3 + 1)
            {
                Chunk spawnChunk = this.getWorldServer().theChunkProviderServer.loadChunk(var4, var5);
                spawnList.add(spawnChunk);
            }
        }
    }

    par1EntityPlayerMP.playerNetServerHandler.sendPacket(new S26PacketMapChunkBulk(spawnList));
    this.players.add(par1EntityPlayerMP);
    this.filterChunkLoadQueue(par1EntityPlayerMP);
}
项目:Resilience-Client-Source    文件:PlayerManager.java   
public void sendThisChunkToAllPlayers()
{
    for (int i = 0; i < this.playersWatchingChunk.size(); ++i)
    {
        EntityPlayerMP player = (EntityPlayerMP)this.playersWatchingChunk.get(i);
        Chunk chunk = PlayerManager.this.getWorldServer().getChunkFromChunkCoords(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos);
        ArrayList list = new ArrayList(1);
        list.add(chunk);
        player.playerNetServerHandler.sendPacket(new S26PacketMapChunkBulk(list));
    }
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk var1);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_);