本文整理了Java中net.minecraft.world.World.isUpdateScheduled()
方法的一些代码示例,展示了World.isUpdateScheduled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.isUpdateScheduled()
方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:isUpdateScheduled
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public boolean isUpdateScheduled(@Nonnull BlockPos pos, @Nonnull Block blk) {
return wrapped.isUpdateScheduled(pos, blk);
}
代码示例来源:origin: amadornes/MCMultiPart
@Override
public boolean isUpdateScheduled(BlockPos pos, Block blk) {
return getActualWorld().isUpdateScheduled(pos, blk);
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public void updateTick(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Random rand) {
if (!world.isRemote && rand.nextFloat() < 0.05f) {
final BlockPos neighborPos = getNeighbor(pos, rand);
final IBlockState neighborState = world.getBlockState(neighborPos);
if (canMakeSnow(world, neighborPos, neighborState)) {
world.setBlockState(neighborPos, Blocks.SNOW_LAYER.getDefaultState());
} else if (canMakeIce(world, neighborPos, neighborState)) {
world.setBlockState(neighborPos, Blocks.ICE.getDefaultState());
}
}
super.updateTick(world, pos, state, rand);
if (canMakeMoreSnowOrIceAround(world, pos) && !world.isUpdateScheduled(pos, this)) {
world.scheduleUpdate(pos, this, tickRate * 10);
}
}
内容来源于网络,如有侵权,请联系作者删除!