Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (this.action == MovementController.Action.MOVE_TO && !this.seal.getNavigator().noPath()) {
- double d0 = this.posX - this.seal.func_226277_ct_();
- double d1 = this.posY - this.seal.func_226278_cu_();
- double d2 = this.posZ - this.seal.func_226281_cx_();
- double d3 = (double)MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
- d1 = d1 / d3;
- float f = (float)(MathHelper.atan2(d2, d0) * (double)(180F / (float)Math.PI)) - 90.0F;
- this.seal.rotationYaw = this.limitAngle(this.seal.rotationYaw, f, 90.0F);
- this.seal.renderYawOffset = this.seal.rotationYaw;
- float f1 = (float)(this.speed * this.seal.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getValue());
- this.seal.setAIMoveSpeed(MathHelper.lerp(0.125F, this.seal.getAIMoveSpeed(), f1));
- this.seal.setMotion(this.seal.getMotion().add(0.0D, (double)this.seal.getAIMoveSpeed() * d1 * 0.1D, 0.0D));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement