本文整理汇总了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;
}
示例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();
}
}
示例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();
}
}
}
示例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();
}
}
示例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();
}
}
}
示例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;
}
示例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);
}
}
}
示例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);
}
}
}