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

项目:Backmemed    文件:PlayerChunkMapEntry.java   
public void removePlayer(EntityPlayerMP player)
{
    if (this.players.contains(player))
    {
        if (this.sentToPlayers)
        {
            player.connection.sendPacket(new SPacketUnloadChunk(this.pos.chunkXPos, this.pos.chunkZPos));
        }

        this.players.remove(player);

        if (this.players.isEmpty())
        {
            this.playerChunkMap.removeEntry(this);
        }
    }
}
项目:CustomWorldGen    文件:PlayerChunkMapEntry.java   
public void removePlayer(EntityPlayerMP player)
{
    if (this.players.contains(player))
    {
        // If we haven't loaded yet don't load the chunk just so we can clean it up
        if (this.chunk == null)
        {
            this.players.remove(player);

            if (this.players.isEmpty())
            {
                if (this.loading) net.minecraftforge.common.chunkio.ChunkIOExecutor.dropQueuedChunkLoad(this.playerChunkMap.getWorldServer(), this.pos.chunkXPos, this.pos.chunkZPos, this.loadedRunnable);
                this.playerChunkMap.removeEntry(this);
            }

            return;
        }

        if (this.sentToPlayers)
        {
            player.connection.sendPacket(new SPacketUnloadChunk(this.pos.chunkXPos, this.pos.chunkZPos));
        }

        this.players.remove(player);

        net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkWatchEvent.UnWatch(this.pos, player));

        if (this.players.isEmpty())
        {
            this.playerChunkMap.removeEntry(this);
        }
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
public void processChunkUnload(SPacketUnloadChunk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.clientWorldController.doPreChunk(packetIn.getX(), packetIn.getZ(), false);
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
public void processChunkUnload(SPacketUnloadChunk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.clientWorldController.doPreChunk(packetIn.getX(), packetIn.getZ(), false);
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
public void processChunkUnload(SPacketUnloadChunk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.clientWorldController.doPreChunk(packetIn.getX(), packetIn.getZ(), false);
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
public void processChunkUnload(SPacketUnloadChunk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.clientWorldController.doPreChunk(packetIn.getX(), packetIn.getZ(), false);
}
项目:Backmemed    文件:INetHandlerPlayClient.java   
void processChunkUnload(SPacketUnloadChunk packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayClient.java   
void processChunkUnload(SPacketUnloadChunk packetIn);