本文整理了Java中net.minecraft.entity.Entity.fall()
方法的一些代码示例,展示了Entity.fall()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.fall()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:fall
暂无
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
@Override
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
//Player will take damage when falling through leaves if fall is over 9 blocks, fall damage is then set to 0.
entityIn.fall((entityIn.fallDistance - 6), 1.0F); // TODO: 17/4/18 Balance fall distance reduction.
entityIn.fallDistance = 0;
//Entity motion is reduced by leaves.
entityIn.motionX *= 0.1D;
entityIn.motionY *= 0.1D;
entityIn.motionZ *= 0.1D;
}
代码示例来源:origin: Vazkii/Quark
@Override
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) {
entityIn.fall(fallDistance, Thatch.fallDamageMultiplier);
}
代码示例来源:origin: Vazkii/Quark
@Override
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) {
entityIn.fall(fallDistance, Thatch.fallDamageMultiplier);
}
代码示例来源:origin: JurassiCraftTeam/JurassiCraft2
@Override
public void onFallenUpon(World world, BlockPos pos, Entity entity, float fallDistance) {
entity.fall(fallDistance, 0.2F);
}
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
@Override
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
// Player will take damage when hitting thatch if fall is over 13 blocks, fall damage is then set to 0.
entityIn.fall((entityIn.fallDistance - 10), 1.0F); // TODO: 17/4/18 balance fall damage reduction.
entityIn.fallDistance = 0;
entityIn.setInWeb();
}
}
内容来源于网络,如有侵权,请联系作者删除!