MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / func_181015_d

Method func_181015_d

src/main/java/net/minecraft/entity/Entity.java:2115–2137  ·  view source on GitHub ↗
(BlockPos p_181015_1_)

Source from the content-addressed store, hash-verified

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.

Callers 2

onUpdateMethod · 0.80

Calls 15

getPortalCooldownMethod · 0.95
func_181160_cMethod · 0.95
func_181089_fMethod · 0.80
getAxisMethod · 0.80
getFingerMethod · 0.80
func_181117_aMethod · 0.80
absMethod · 0.80
getAxisDirectionMethod · 0.80
rotateYMethod · 0.80
func_181118_dMethod · 0.80
func_181119_eMethod · 0.80
getZMethod · 0.65

Tested by

no test coverage detected