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


Java TileEntity.updateContainingBlockInfo方法代码示例

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


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

示例1: onNeighborBlockChange

import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
 * Called when a neighboring block changes.
 */
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
{
    super.onNeighborBlockChange(worldIn, pos, state, neighborBlock);
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityChest)
    {
        tileentity.updateContainingBlockInfo();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:BlockChest.java

示例2: onNeighborBlockChange

import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
 * Called when a neighboring block changes.
 */
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
	super.onNeighborBlockChange(worldIn, pos, state, neighborBlock);
	TileEntity tileentity = worldIn.getTileEntity(pos);

	if (tileentity instanceof TileEntityChest) {
		tileentity.updateContainingBlockInfo();
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:BlockChest.java

示例3: neighborChanged

import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
 * Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
 * change. Cases may include when redstone power is updated, cactus blocks popping off due to a neighboring solid
 * block, etc.
 */
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos p_189540_5_)
{
    super.neighborChanged(state, worldIn, pos, blockIn, p_189540_5_);
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityChest)
    {
        tileentity.updateContainingBlockInfo();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:BlockChest.java

示例4: neighborChanged

import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
 * Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
 * change. Cases may include when redstone power is updated, cactus blocks popping off due to a neighboring solid
 * block, etc.
 */
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn)
{
    super.neighborChanged(state, worldIn, pos, blockIn);
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityChest)
    {
        tileentity.updateContainingBlockInfo();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:16,代码来源:BlockChest.java

示例5: fillChunk

import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
 * Initialize this chunk with new binary data.
 */
public void fillChunk(byte[] p_177439_1_, int p_177439_2_, boolean p_177439_3_)
{
    int i = 0;
    boolean flag = !this.worldObj.provider.getHasNoSky();

    for (int j = 0; j < this.storageArrays.length; ++j)
    {
        if ((p_177439_2_ & 1 << j) != 0)
        {
            if (this.storageArrays[j] == null)
            {
                this.storageArrays[j] = new ExtendedBlockStorage(j << 4, flag);
            }

            char[] achar = this.storageArrays[j].getData();

            for (int k = 0; k < achar.length; ++k)
            {
                achar[k] = (char)((p_177439_1_[i + 1] & 255) << 8 | p_177439_1_[i] & 255);
                i += 2;
            }
        }
        else if (p_177439_3_ && this.storageArrays[j] != null)
        {
            this.storageArrays[j] = null;
        }
    }

    for (int l = 0; l < this.storageArrays.length; ++l)
    {
        if ((p_177439_2_ & 1 << l) != 0 && this.storageArrays[l] != null)
        {
            NibbleArray nibblearray = this.storageArrays[l].getBlocklightArray();
            System.arraycopy(p_177439_1_, i, nibblearray.getData(), 0, nibblearray.getData().length);
            i += nibblearray.getData().length;
        }
    }

    if (flag)
    {
        for (int i1 = 0; i1 < this.storageArrays.length; ++i1)
        {
            if ((p_177439_2_ & 1 << i1) != 0 && this.storageArrays[i1] != null)
            {
                NibbleArray nibblearray1 = this.storageArrays[i1].getSkylightArray();
                System.arraycopy(p_177439_1_, i, nibblearray1.getData(), 0, nibblearray1.getData().length);
                i += nibblearray1.getData().length;
            }
        }
    }

    if (p_177439_3_)
    {
        System.arraycopy(p_177439_1_, i, this.blockBiomeArray, 0, this.blockBiomeArray.length);
        int k1 = i + this.blockBiomeArray.length;
    }

    for (int j1 = 0; j1 < this.storageArrays.length; ++j1)
    {
        if (this.storageArrays[j1] != null && (p_177439_2_ & 1 << j1) != 0)
        {
            this.storageArrays[j1].removeInvalidBlocks();
        }
    }

    this.isLightPopulated = true;
    this.isTerrainPopulated = true;
    this.generateHeightMap();

    for (TileEntity tileentity : this.chunkTileEntityMap.values())
    {
        tileentity.updateContainingBlockInfo();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:78,代码来源:Chunk.java


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