本文整理了Java中net.minecraft.block.Block.beginLeavesDecay()
方法的一些代码示例,展示了Block.beginLeavesDecay()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.beginLeavesDecay()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:beginLeavesDecay
暂无
代码示例来源:origin: progwml6/Natura
iblockstate.getBlock().beginLeavesDecay(iblockstate, worldIn, blockpos);
代码示例来源:origin: progwml6/Natura
iblockstate.getBlock().beginLeavesDecay(iblockstate, worldIn, blockpos);
代码示例来源:origin: PenguinSquad/Harvest-Festival
@Override
public void breakBlock(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state) {
int k = pos.getX();
int l = pos.getY();
int i1 = pos.getZ();
if (worldIn.isAreaLoaded(new BlockPos(k - 2, l - 2, i1 - 2), new BlockPos(k + 2, l + 2, i1 + 2))) {
for (int j1 = -1; j1 <= 1; ++j1) {
for (int k1 = -1; k1 <= 1; ++k1) {
for (int l1 = -1; l1 <= 1; ++l1) {
BlockPos blockpos = pos.add(j1, k1, l1);
IBlockState iblockstate = worldIn.getBlockState(blockpos);
if (iblockstate.getBlock().isLeaves(iblockstate, worldIn, blockpos)) {
iblockstate.getBlock().beginLeavesDecay(iblockstate, worldIn, blockpos);
}
}
}
}
}
}
代码示例来源:origin: SlimeKnights/TinkersConstruct
iblockstate1.getBlock().beginLeavesDecay(iblockstate1, worldIn, blockpos1);
代码示例来源:origin: ForestryMC/Binnie
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
if (worldIn.isAreaLoaded(pos.add(-5, -5, -5), pos.add(5, 5, 5))) {
for (BlockPos blockpos : BlockPos.getAllInBox(pos.add(-4, -4, -4), pos.add(4, 4, 4))) {
IBlockState iblockstate = worldIn.getBlockState(blockpos);
if (iblockstate.getBlock().isLeaves(iblockstate, worldIn, blockpos)) {
iblockstate.getBlock().beginLeavesDecay(iblockstate, worldIn, blockpos);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!