Начинающий
			
			
				
					
				
			
		- Статус
- Оффлайн
- Регистрация
- 8 Сен 2024
- Сообщения
- 316
- Реакции
- 0
добрый день, как убрать прицел в майне?
в функции Crosshair:
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
если надо drawCircleWithFill из DisplayUtils то вот:
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
имеется ввиду чтобы при включении убирался стандартный прицел из майна
				
			в функции Crosshair:
			
				Java:
			
		
		
		package ru.client.functions.impl.render;
import com.google.common.eventbus.Subscribe;
import ru.client.events.EventDisplay;
import ru.client.functions.api.FunctionRegister;
import ru.client.functions.api.Category;
import ru.client.functions.api.Function;
import ru.client.functions.settings.impl.BooleanSetting;
import ru.client.functions.settings.impl.ModeSetting;
import ru.client.utils.math.MathUtil;
import ru.client.utils.render.ColorUtils;
import ru.client.utils.render.DisplayUtils;
import lombok.Getter;
import net.minecraft.client.settings.PointOfView;
import net.minecraft.util.math.RayTraceResult.Type;
import java.awt.*;
@FunctionRegister(name = "Crosshair", type = Category.Render)
public class Crosshair extends Function {
    public final ModeSetting mode = new ModeSetting("Вид", "Орбиз", "Орбиз", "Класический", "Круг");
    public final BooleanSetting staticCrosshair = new BooleanSetting("Статический", false).setVisible(() -> mode.is("Орбиз"));
    private float lastYaw;
    private float lastPitch;
    @Getter
    public float animatedYaw, x;
    @Getter
    public float animatedPitch, y;
    private float animation;
    private float animationSize;
    private final int outlineColor = Color.BLACK.getRGB();
    private final int entityColor = Color.BLACK.getRGB();
    public Crosshair() {
        addSettings(mode, staticCrosshair);
    }
    @Subscribe
    public void onDisplay(EventDisplay e) {
        if (mc.player == null || mc.world == null || e.getType() != EventDisplay.Type.POST) {
            return;
        }
        x = mc.getMainWindow().getScaledWidth() / 2f;
        y = mc.getMainWindow().getScaledHeight() / 2f;
        switch (mode.getIndex()) {
            case 0 -> {
                float size = 5;
                animatedYaw = MathUtil.fast(animatedYaw, ((lastYaw - mc.player.rotationYaw) + mc.player.moveStrafing) * size, 5);
                animatedPitch = MathUtil.fast(animatedPitch, ((lastPitch - mc.player.rotationPitch) + mc.player.moveForward) * size, 5);
                animation = MathUtil.fast(animation, mc.objectMouseOver.getType() == Type.ENTITY ? 1 : 0, 5);
                int color = Color.BLACK.getRGB();
                if (!staticCrosshair.get()) {
                    x += animatedYaw;
                    y += animatedPitch;
                }
                animationSize = MathUtil.fast(animationSize, (1 - mc.player.getCooledAttackStrength(1)) * 3, 10);
                float radius = 3 + (staticCrosshair.get() ? 0 : animationSize);
                if (mc.gameSettings.getPointOfView() == PointOfView.FIRST_PERSON) {
                    DisplayUtils.drawShadowCircle(x, y, radius * 2, ColorUtils.setAlpha(color, 64));
                    DisplayUtils.drawCircle(x, y, radius, color);
                }
                lastYaw = mc.player.rotationYaw;
                lastPitch = mc.player.rotationPitch;
            }
            case 1 -> {
                if (mc.gameSettings.getPointOfView() != PointOfView.FIRST_PERSON) return;
                float cooldown = 1 - mc.player.getCooledAttackStrength(0);
                animationSize = MathUtil.fast(animationSize, (1 - mc.player.getCooledAttackStrength(0)), 10);
                float thickness = 1;
                float length = 3;
                float gap = 2 + 8 * animationSize;
                int color = Color.BLACK.getRGB();
                drawOutlined(x - thickness / 2, y - gap - length, thickness, length, color);
                drawOutlined(x - thickness / 2, y + gap, thickness, length, color);
                drawOutlined(x - gap - length, y - thickness / 2, length, thickness, color);
                drawOutlined(x + gap, y - thickness / 2, length, thickness, color);
            }
            case 2 -> {
                animationSize = MathUtil.fast(animationSize, (1 - mc.player.getCooledAttackStrength(1)) * 260, 10);
                if (mc.gameSettings.getPointOfView() == PointOfView.FIRST_PERSON) {
                    DisplayUtils.drawCircleWithFill(x, y, 0, 360, 3.8f, 3, false, ColorUtils.rgb(0, 0, 0));
                    DisplayUtils.drawCircleWithFill(x, y, animationSize, 360, 3.8f, 3, false, ColorUtils.rgb(0, 0, 0));
                }
            }
        }
    }
    private void drawOutlined(
            final float x,
            final float y,
            final float w,
            final float h,
            final int hex
    ) {
        DisplayUtils.drawRectW(x - 0.5, y - 0.5, w + 1, h + 1, outlineColor);
        DisplayUtils.drawRectW(x, y, w, h, hex);
    }
}
			
				Java:
			
		
		
		    public static void drawCircleWithFill(float x, float y, float start, float end, float radius, float width, boolean filled, int color) {
        float sin;
        float cos;
        float i;
        if (start > end) {
            float endOffset = end;
            end = start;
            start = endOffset;
        }
        GlStateManager.enableBlend();
        GL11.glDisable(3553);
        RenderSystem.blendFuncSeparate(770, 771, 1, 0);
        GL11.glEnable(2848);
        GL11.glLineWidth(width);
        GL11.glBegin(3);
        for (i = end; i >= start; i -= 1.0f) {
            ColorUtils.setColor(color);
            cos = MathHelper.cos((float) ((double) i * Math.PI / 180.0)) * radius;
            sin = MathHelper.sin((float) ((double) i * Math.PI / 180.0)) * radius;
            GL11.glVertex2f(x + cos, y + sin);
        }
        GL11.glEnd();
        GL11.glDisable(2848);
        if (filled) {
            GL11.glBegin(6);
            for (i = end; i >= start; i -= 1.0f) {
                ColorUtils.setColor(color);
                cos = MathHelper.cos((float) ((double) i * Math.PI / 180.0)) * radius;
                sin = MathHelper.sin((float) ((double) i * Math.PI / 180.0)) * radius;
                GL11.glVertex2f(x + cos, y + sin);
            }
            GL11.glEnd();
        }
        GL11.glEnable(3553);
        disableBlend();
    } 
				 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		