(BlockPos p_181015_1_)
| 2113 | } |
| 2114 | |
| 2115 | public void func_181015_d(BlockPos p_181015_1_) |
| 2116 | { |
| 2117 | if (this.timeUntilPortal > 0) |
| 2118 | { |
| 2119 | this.timeUntilPortal = this.getPortalCooldown(); |
| 2120 | } |
| 2121 | else |
| 2122 | { |
| 2123 | if (!this.worldObj.isRemote && !p_181015_1_.equals(this.field_181016_an)) |
| 2124 | { |
| 2125 | this.field_181016_an = p_181015_1_; |
| 2126 | BlockPattern.PatternHelper blockpattern$patternhelper = Blocks.portal.func_181089_f(this.worldObj, p_181015_1_); |
| 2127 | double d0 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? (double)blockpattern$patternhelper.func_181117_a().getZ() : (double)blockpattern$patternhelper.func_181117_a().getX(); |
| 2128 | double d1 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? this.posZ : this.posX; |
| 2129 | 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())); |
| 2130 | double d2 = MathHelper.func_181160_c(this.posY - 1.0D, blockpattern$patternhelper.func_181117_a().getY(), blockpattern$patternhelper.func_181117_a().getY() - blockpattern$patternhelper.func_181119_e()); |
| 2131 | this.field_181017_ao = new Vec3(d1, d2, 0.0D); |
| 2132 | this.field_181018_ap = blockpattern$patternhelper.getFinger(); |
| 2133 | } |
| 2134 | |
| 2135 | this.inPortal = true; |
| 2136 | } |
| 2137 | } |
| 2138 | |
| 2139 | /** |
| 2140 | * Return the amount of cooldown before this entity can use a portal again. |
no test coverage detected