本文整理汇总了Java中net.minecraft.util.MathHelper.func_181160_c方法的典型用法代码示例。如果您正苦于以下问题:Java MathHelper.func_181160_c方法的具体用法?Java MathHelper.func_181160_c怎么用?Java MathHelper.func_181160_c使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.MathHelper
的用法示例。
在下文中一共展示了MathHelper.func_181160_c方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_181015_d
import net.minecraft.util.MathHelper; //导入方法依赖的package包/类
public void func_181015_d(BlockPos p_181015_1_)
{
if (this.timeUntilPortal > 0)
{
this.timeUntilPortal = this.getPortalCooldown();
}
else
{
if (!this.worldObj.isRemote && !p_181015_1_.equals(this.field_181016_an))
{
this.field_181016_an = p_181015_1_;
BlockPattern.PatternHelper blockpattern$patternhelper = Blocks.portal.func_181089_f(this.worldObj, p_181015_1_);
double d0 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? (double)blockpattern$patternhelper.func_181117_a().getZ() : (double)blockpattern$patternhelper.func_181117_a().getX();
double d1 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? this.posZ : this.posX;
d1 = Math.abs(MathHelper.func_181160_c(d1 - (double)(blockpattern$patternhelper.getFinger().rotateY().getAxisDirection() == EnumFacing.AxisDirection.NEGATIVE ? 1 : 0), d0, d0 - (double)blockpattern$patternhelper.func_181118_d()));
double d2 = MathHelper.func_181160_c(this.posY - 1.0D, (double)blockpattern$patternhelper.func_181117_a().getY(), (double)(blockpattern$patternhelper.func_181117_a().getY() - blockpattern$patternhelper.func_181119_e()));
this.field_181017_ao = new Vec3(d1, d2, 0.0D);
this.field_181018_ap = blockpattern$patternhelper.getFinger();
}
this.inPortal = true;
}
}