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