Начинающий
- Статус
- Оффлайн
- Регистрация
- 4 Окт 2024
- Сообщения
- 3
- Реакции
- 0
Кароче попытался с помощью лгбт чата сделать килку под фантайм но все ранво урон начинает резать со временм и потом еще и банит по итогу, подскажите что не так, я лютый новичок и ваще ен разбираюсь в этой теме. Пытался ходить по форумам смотреть как сделать килку под фт но ничего не помогло
Паста рокстара
Код:
Паста рокстара
Код:
if (this.rotationMode.is(this.funTimeRotation)) {
if (mc.player == null) {
return;
}
Rotation currentRot = handler.getCurrentRotation();
float currentYaw = currentRot.getYaw();
float currentPitch = currentRot.getPitch();
if (targetedEntity != null) {
this.smoothbackShakeStartMs = -1L;
boolean canAttackWindow = this.isCooledDown();
Box box = targetedEntity.getBoundingBox();
Vec3d nearestPoint = RotationMath.getNearestPoint(targetedEntity);
long time = System.currentTimeMillis();
float attackPulse = 1.0F - MathHelper.clamp((float) this.attackTimer.getElapsedTime() / 180.0F, 0.0F, 1.0F);
float sidePhase = (this.attacks & 1) == 0 ? 1.0F : -1.0F;
double horizontalRangeX = Math.max(0.03D, (box.maxX - box.minX) * 0.5D - 0.045D);
double horizontalRangeZ = Math.max(0.03D, (box.maxZ - box.minZ) * 0.5D - 0.045D);
double verticalRange = Math.max(0.05D, (box.maxY - box.minY) * 0.5D - 0.08D);
double smoothOffsetX = Math.sin((double) time / 88.0D + this.attacks * 0.37D) * horizontalRangeX * 0.44D
+ Math.cos((double) time / 63.0D + this.attacks * 0.19D) * horizontalRangeX * 0.11D;
double smoothOffsetZ = Math.cos((double) time / 101.0D + this.attacks * 0.43D) * horizontalRangeZ * 0.40D
+ Math.sin((double) time / 67.0D + this.attacks * 0.23D) * horizontalRangeZ * 0.10D;
double smoothOffsetY = Math.sin((double) time / 118.0D + this.attacks * 0.21D) * verticalRange * 0.24D;
double attackOffsetX = sidePhase * horizontalRangeX * 0.31D * attackPulse;
double attackOffsetZ = -sidePhase * horizontalRangeZ * 0.18D * attackPulse;
double attackOffsetY = verticalRange * 0.18D * Math.sin(this.attacks * 0.58D) * attackPulse;
double targetX = MathHelper.clamp(nearestPoint.x + smoothOffsetX + attackOffsetX, box.minX + 0.025D, box.maxX - 0.025D);
double targetY = MathHelper.clamp(
MathUtility.interpolate(mc.player.getEyeY(), targetedEntity.getEyeY(), 0.5) + smoothOffsetY + attackOffsetY,
box.minY + 0.06D, box.maxY - 0.04D);
double targetZ = MathHelper.clamp(nearestPoint.z + smoothOffsetZ + attackOffsetZ, box.minZ + 0.025D, box.maxZ - 0.025D);
Rotation targetRotation = RotationMath.getRotationTo(new Vec3d(targetX, targetY, targetZ));
Rotation focusRotation = RotationMath.getRotationTo(nearestPoint);
float yawBlend = 0.08F + (float) Math.random() * 0.04F;
float pitchBlend = 0.05F + (float) Math.random() * 0.03F;
float targetYaw = targetRotation.getYaw() + RotationMath.getAngleDifference(targetRotation.getYaw(), focusRotation.getYaw()) * yawBlend;
float targetPitch = targetRotation.getPitch() + RotationMath.getAngleDifference(targetRotation.getPitch(), focusRotation.getPitch()) * pitchBlend;
currentYaw = currentRot.getYaw();
currentPitch = currentRot.getPitch();
float yawDelta = RotationMath.getAngleDifference(currentYaw, targetYaw);
float pitchDelta = RotationMath.getAngleDifference(currentPitch, targetPitch);
float totalDelta = (float) Math.hypot(yawDelta, pitchDelta);
if (totalDelta < 0.0001F) totalDelta = 0.0001F;
float limitMultiplier = canAttackWindow ? 24.0F + (float) Math.random() * 8.0F // 24-32
: 18.0F + (float) Math.random() * 6.0F; // 18-24
float yawLimit = Math.abs(yawDelta / totalDelta) * limitMultiplier;
float pitchLimit = Math.abs(pitchDelta / totalDelta) * limitMultiplier;
float lerpFactor = 0.55F + (float) Math.random() * 0.15F; // 0.55-0.70
float resultYaw = MathHelper.lerp(
lerpFactor,
currentYaw,
currentYaw + MathHelper.clamp(yawDelta, -yawLimit, yawLimit)
);
float resultPitch = MathHelper.lerp(
lerpFactor,
currentPitch,
currentPitch + MathHelper.clamp(pitchDelta, -pitchLimit, pitchLimit)
);
resultYaw += (float) (Math.random() - 0.5) * 0.08F;
resultPitch += (float) (Math.random() - 0.5) * 0.05F;
resultPitch = MathHelper.clamp(resultPitch, -90.0F, 90.0F);
handler.rotate(
new Rotation(resultYaw, resultPitch),
moveCorrection,
100.0F,
100.0F,
55.0F,
RotationPriority.TO_TARGET
);
} else {
float playerYaw = mc.player.getYaw();
float playerPitch = mc.player.getPitch();
float retYaw = RotationMath.getAngleDifference(currentYaw, playerYaw);
float retPitch = RotationMath.getAngleDifference(currentPitch, playerPitch);
float retTotal = (float) Math.hypot(retYaw, retPitch);
if (retTotal < 0.0001F) {
retTotal = 0.0001F;
}
if (this.smoothbackShakeStartMs < 0L) {
this.smoothbackShakeStartMs = System.currentTimeMillis();
}
float fadeRatio = 1.0F - MathHelper.clamp(
(float)(System.currentTimeMillis() - this.smoothbackShakeStartMs) / 620.0F,
0.0F,
1.0F
);
float shakeYaw = (float)(randomBetween(2.8F, 5.8F) * Math.sin(System.currentTimeMillis() / 126.0D)) * fadeRatio;
float shakePitch = (float)(randomBetween(1.1F, 2.7F) * Math.cos(System.currentTimeMillis() / 152.0D)) * fadeRatio;
float yawLimit = Math.abs(retYaw / retTotal) * 44.0F;
float pitchLimit = Math.abs(retPitch / retTotal) * 32.0F;
if (this.attacks % 86 == 0 && this.attacks > 0 && !this.attackTimer.finished(250L)) {
shakePitch += randomBetween(-1.0F, 1.0F);
}
float resultYaw = MathHelper.lerp(
0.72F,
currentYaw,
currentYaw + MathHelper.clamp(retYaw, -yawLimit, yawLimit) + shakeYaw
);
float resultPitch = MathHelper.lerp(
0.72F,
currentPitch,
currentPitch + MathHelper.clamp(retPitch, -pitchLimit, pitchLimit) + shakePitch
);
resultPitch = MathHelper.clamp(resultPitch, -90.0F, 90.0F);
handler.rotate(
new Rotation(resultYaw, resultPitch),
moveCorrection,
112.0F,
112.0F,
52.0F,
RotationPriority.TO_TARGET
);
}
return;
}