ладно
сейчас дам mcp 1.16.5: ( не обходит вроде фт сделал чисто для визуала )
package ru.ware.modules.functions.util;
import net.minecraft.util.math.MathHelper;
import ru.ware.IMinecraft;
import ru.ware.event.Event;
import ru.ware.event.events.EventRender;
import ru.ware.modules.Category;
import ru.ware.modules.Function;
import ru.ware.modules.settings.in.ValueElement;
public class Spinner extends Function implements IMinecraft {
private ValueElement rotationSpeed = new ValueElement("Скорость", 30.0F, 1.0F, 100.0F, 1.0F);
public Spinner() {
super("Spinner", Category.UTIL, "Крутилка", 0, 0);
add(rotationSpeed);
}
@Override
public void onEvent(Event e) {
if (e instanceof EventRender) {
if (mc.player != null) {
float speed = rotationSpeed.getValue();
float currentYawHead = mc.player.rotationYawHead;
float newYawHead = currentYawHead + speed;
newYawHead = MathHelper.wrapDegrees(newYawHead);
mc.player.rotationYawHead = newYawHead;
mc.player.prevRotationYawHead = newYawHead;
mc.player.renderYawOffset = mc.player.rotationYaw;
mc.player.rotationYaw = mc.player.rotationYaw;
mc.player.prevRotationYaw = mc.player.rotationYaw;
}
}
}
}