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


Java Chunk.resetRelightChecks方法代码示例

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


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

示例1: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int x, int z)
{
    this.hellRNG.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.func_180515_a(x, z, chunkprimer);
    this.func_180516_b(x, z, chunkprimer);
    this.netherCaveGenerator.generate(this, this.worldObj, x, z, chunkprimer);

    if (this.field_177466_i)
    {
        this.genNetherBridge.generate(this, this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    BiomeGenBase[] abiomegenbase = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)abiomegenbase[i].biomeID;
    }

    chunk.resetRelightChecks();
    return chunk;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:30,代码来源:ChunkProviderHell.java

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public Chunk provideChunk(int x, int z)
{
    this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.prepareHeights(x, z, chunkprimer);
    this.buildSurfaces(x, z, chunkprimer);
    this.genNetherCaves.generate(this.world, x, z, chunkprimer);

    if (this.generateStructures)
    {
        this.genNetherBridge.generate(this.world, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.world, chunkprimer, x, z);
    Biome[] abiome = this.world.getBiomeProvider().getBiomes((Biome[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)Biome.getIdForBiome(abiome[i]);
    }

    chunk.resetRelightChecks();
    return chunk;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:26,代码来源:ChunkProviderHell.java

示例7: 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

示例8: 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.resetRelightChecks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。