本文整理匯總了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;
}
}