Начинающий
- Статус
- Оффлайн
- Регистрация
- 26 Июл 2025
- Сообщения
- 40
- Реакции
- 0
- Выберите загрузчик игры
- Fabric
- Прочие моды
Я посчитал что югейм не обойдется без данного божества, поэтому как настоящий король, повелитель, всемогущий, милейший, император сливаю вам смуз камера
SS:
Поскольку я царь батюшка попрошу чтобы мою тему быстрее ободрили
SS:
java programist code ultimate ultra king golden edition smooth camera:
package ru.destruct.features.impl.render;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import ru.destruct.events.render.CameraEvent;
import ru.destruct.events.render.CameraPositionEvent;
import ru.destruct.features.module.Module;
import ru.destruct.features.module.ModuleCategory;
import ru.destruct.features.module.setting.implement.SliderSettings;
import ru.destruct.utils.client.Instance;
import ru.destruct.utils.client.managers.event.EventHandler;
import ru.destruct.utils.features.aura.warp.Turns;
public class SmoothCamera extends Module {
public static SmoothCamera getInstance() {
return Instance.get(SmoothCamera.class);
}
public final SliderSettings speed = new SliderSettings("Smooth", "Скорость следования камеры")
.range(0.01f, 0.3f).setValue(0.08f);
private float smoothYaw = 0;
private float smoothPitch = 0;
private Vec3d smoothPos = null;
private boolean initialized = false;
public SmoothCamera() {
super("SmoothCamera", ModuleCategory.RENDER);
setup(speed);
}
@Override
public void activate() {
initialized = false;
smoothPos = null;
}
@Override
public void deactivate() {
initialized = false;
smoothPos = null;
}
@EventHandler
public void onCamera(CameraEvent e) {
Turns target = e.getAngle();
if (!initialized) {
smoothYaw = target.getYaw();
smoothPitch = target.getPitch();
initialized = true;
return;
}
float dyaw = MathHelper.wrapDegrees(target.getYaw() - smoothYaw);
smoothYaw += dyaw * speed.getValue();
smoothPitch += (target.getPitch() - smoothPitch) * speed.getValue();
e.setAngle(new Turns(smoothYaw, smoothPitch));
e.setCancelled(true);
}
@EventHandler
public void onCameraPos(CameraPositionEvent e) {
Vec3d target = e.getPos();
if (smoothPos == null) {
smoothPos = target;
return;
}
smoothPos = new Vec3d(
smoothPos.x + (target.x - smoothPos.x) * speed.getValue(),
smoothPos.y + (target.y - smoothPos.y) * speed.getValue(),
smoothPos.z + (target.z - smoothPos.z) * speed.getValue()
);
e.setPos(smoothPos);
} //я посас. постарался с мужчиной
}
