当前位置: 首页>>代码示例>>Java>>正文


Java Chunk.fillChunk方法代码示例

本文整理汇总了Java中net.minecraft.world.chunk.Chunk.fillChunk方法的典型用法代码示例。如果您正苦于以下问题:Java Chunk.fillChunk方法的具体用法?Java Chunk.fillChunk怎么用?Java Chunk.fillChunk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.chunk.Chunk的用法示例。


在下文中一共展示了Chunk.fillChunk方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleChunkData

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(S21PacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.func_149274_i())
    {
        if (packetIn.getExtractedSize() == 0)
        {
            this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), false);
            return;
        }

        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.func_149272_d(), packetIn.getExtractedSize(), packetIn.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:29,代码来源:NetHandlerPlayClient.java

示例2: handleMapChunkBulk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
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();
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:NetHandlerPlayClient.java

示例3: handleChunkData

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering
 * and lighting recalculation
 */
public void handleChunkData(S21PacketChunkData packetIn) {
	PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

	if (packetIn.func_149274_i()) {
		if (packetIn.getExtractedSize() == 0) {
			this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), false);
			return;
		}

		this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
	}

	this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4,
			(packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
	Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
	chunk.fillChunk(packetIn.func_149272_d(), packetIn.getExtractedSize(), packetIn.func_149274_i());
	this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0,
			packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

	if (!packetIn.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface)) {
		chunk.resetRelightChecks();
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:28,代码来源:NetHandlerPlayClient.java

示例4: handleMapChunkBulk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
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();
		}
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:NetHandlerPlayClient.java

示例5: handleChunkData

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(SPacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.doChunkLoad())
    {
        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.getReadBuffer(), packetIn.getExtractedSize(), packetIn.doChunkLoad());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.doChunkLoad() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }

    for (NBTTagCompound nbttagcompound : packetIn.getTileEntityTags())
    {
        BlockPos blockpos = new BlockPos(nbttagcompound.getInteger("x"), nbttagcompound.getInteger("y"), nbttagcompound.getInteger("z"));
        TileEntity tileentity = this.clientWorldController.getTileEntity(blockpos);

        if (tileentity != null)
        {
            tileentity.readFromNBT(nbttagcompound);
        }
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:34,代码来源:NetHandlerPlayClient.java

示例6: handleChunkData

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(SPacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.doChunkLoad())
    {
        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.getReadBuffer(), packetIn.getExtractedSize(), packetIn.doChunkLoad());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.doChunkLoad() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }

    for (NBTTagCompound nbttagcompound : packetIn.getTileEntityTags())
    {
        BlockPos blockpos = new BlockPos(nbttagcompound.getInteger("x"), nbttagcompound.getInteger("y"), nbttagcompound.getInteger("z"));
        TileEntity tileentity = this.clientWorldController.getTileEntity(blockpos);

        if (tileentity != null)
        {
            tileentity.handleUpdateTag(nbttagcompound);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:34,代码来源:NetHandlerPlayClient.java


注:本文中的net.minecraft.world.chunk.Chunk.fillChunk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。