Chunk.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:DecompiledMinecraft 作者:
public void setLightFor(EnumSkyBlock p_177431_1_, BlockPos pos, int value)
{
    int i = pos.getX() & 15;
    int j = pos.getY();
    int k = pos.getZ() & 15;
    ExtendedBlockStorage extendedblockstorage = this.storageArrays[j >> 4];

    if (extendedblockstorage == null)
    {
        extendedblockstorage = this.storageArrays[j >> 4] = new ExtendedBlockStorage(j >> 4 << 4, !this.worldObj.provider.getHasNoSky());
        this.generateSkylightMap();
    }

    this.isModified = true;

    if (p_177431_1_ == EnumSkyBlock.SKY)
    {
        if (!this.worldObj.provider.getHasNoSky())
        {
            extendedblockstorage.setExtSkylightValue(i, j & 15, k, value);
        }
    }
    else if (p_177431_1_ == EnumSkyBlock.BLOCK)
    {
        extendedblockstorage.setExtBlocklightValue(i, j & 15, k, value);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号