本文整理了Java中net.minecraft.block.Block.isLadder()
方法的一些代码示例,展示了Block.isLadder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.isLadder()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:isLadder
暂无
代码示例来源:origin: ldtteam/minecolonies
/**
* Is the block a ladder.
*
* @param block block to check.
* @param pos location of the block.
* @return true if the block is a ladder.
*/
protected boolean isLadder(@NotNull final Block block, final BlockPos pos)
{
return block.isLadder(this.world.getBlockState(pos), world, pos, entity);
}
代码示例来源:origin: RS485/LogisticsPipes
@Override
@ModDependentMethod(modId = LPConstants.mcmpModID)
public boolean isLadder(IBlockState state, IBlockAccess world, BlockPos pos, EntityLivingBase entity) {
Block block = mcmpBlockAccess.getBlock();
return block != null ? block.isLadder(state, world, pos, entity) : super.isLadder(state, world, pos, entity);
}
代码示例来源:origin: amadornes/MCMultiPart
public default boolean isLadder(IBlockAccess world, BlockPos pos, IPartInfo part, EntityLivingBase entity) {
return part.getState().getBlock().isLadder(part.getState(), world, pos, entity);
}
代码示例来源:origin: ldtteam/minecolonies
private int getFirstLadder(@NotNull final BlockPos pos)
{
if (world.getBlockState(pos).getBlock().isLadder(world.getBlockState(pos), world, pos, worker))
{
return getFirstLadder(pos.up());
}
else
{
return pos.getY() - 1;
}
}
代码示例来源:origin: ldtteam/minecolonies
private int getLastLadder(@NotNull final BlockPos pos)
{
if (world.getBlockState(pos).getBlock().isLadder(world.getBlockState(pos), world, pos, worker))
{
return getLastLadder(pos.down());
}
else
{
return pos.getY() + 1;
}
}
代码示例来源:origin: ldtteam/minecolonies
/**
* Entities treat being on ladders as not on ground; this breaks navigation
* logic.
*/
@Override
protected void updateFallState(final double y, final boolean onGroundIn, @NotNull final IBlockState state, @NotNull final BlockPos pos)
{
if (!onGround)
{
final int px = MathHelper.floor(posX);
final int py = (int) posY;
final int pz = MathHelper.floor(posZ);
this.onGround =
CompatibilityUtils.getWorld(this).getBlockState(new BlockPos(px, py, pz)).getBlock().isLadder(world.getBlockState(
new BlockPos(px, py, pz)), world, new BlockPos(px, py, pz), this);
}
super.updateFallState(y, onGroundIn, state, pos);
}
代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped
BlockPos pos = new BlockPos(x, y, z);
IBlockState checkState = this.world.getBlockState(pos);
if (checkState.getBlock().isLadder(checkState, this.world, pos, EntityLivingBase.class.cast(this))) {
return true;
内容来源于网络,如有侵权,请联系作者删除!