- feat: Фаза 1 ребрендинг combatant → lovisual + восстановление config - refactor: Фаза 2 — выкинуть Runtime/JarReplacement, заменить на Lifecycle - refactor: Фаза 3.5 — удалить читерские модули, ESP под легит - refactor: Фаза 3 — разбить Renderer2D (3379→2150 фасад + 14 хелперов ≤200) - refactor: Фаза 3 — разбить BetterChatRenderer (2870→210 фасад + 21 хелпер ≤200) - refactor: Фаза 3 — разбить UnifiedSettingRenderer (2798→208 фасад + 24 хелпера ≤200) - refactor: Фаза 3 — разбить ClickGuiRenderer (1887→542 фасад + 15 хелперов ≤200) - refactor: Фаза 3 — разбить NameTags (1791→438 фасад + 11 хелперов ≤200) - refactor: Фаза 3 — разбить TargetHud (1655→340 фасад + 11 хелперов ≤200) - refactor: Фаза 3 — разбить ESP (1538→269 фасад + 11 хелперов ≤200)
44 lines
1.9 KiB
Java
44 lines
1.9 KiB
Java
/*
|
|
* This file is part of the LoVisual Client distribution.
|
|
* Copyright (c) 2026 pivosos2007.
|
|
*
|
|
* Licensed under the GNU General Public License v3.0.
|
|
*/
|
|
|
|
package dev.loki.lovisual.mixins;
|
|
|
|
import com.mojang.blaze3d.GpuFormat;
|
|
import com.mojang.blaze3d.vulkan.VulkanDevice;
|
|
import com.mojang.blaze3d.vulkan.VulkanGpuTexture;
|
|
import com.mojang.blaze3d.vulkan.VulkanGpuTextureView;
|
|
import org.lwjgl.vulkan.VkImageSubresourceRange;
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
|
|
|
import static org.lwjgl.vulkan.VK12.VK_IMAGE_ASPECT_STENCIL_BIT;
|
|
|
|
@Mixin(VulkanGpuTextureView.class)
|
|
public abstract class VulkanGpuTextureViewMixin {
|
|
/**
|
|
* Mojang 26.2 treats every non-color view as depth. A pure S8_UINT attachment must use
|
|
* STENCIL_BIT or vkCreateImageView is invalid and dynamic rendering cannot bind it as
|
|
* pStencilAttachment.
|
|
*/
|
|
@Redirect(
|
|
method = "<init>",
|
|
at = @At(value = "INVOKE", target = "Lorg/lwjgl/vulkan/VkImageSubresourceRange;aspectMask(I)Lorg/lwjgl/vulkan/VkImageSubresourceRange;")
|
|
)
|
|
private VkImageSubresourceRange lovisual$stencilViewAspect(VkImageSubresourceRange range,
|
|
int original,
|
|
VulkanDevice device,
|
|
VulkanGpuTexture texture,
|
|
int baseMipLevel,
|
|
int mipLevels) {
|
|
GpuFormat format = texture == null ? null : texture.getFormat();
|
|
if (format != null && format.hasStencilAspect() && !format.hasDepthAspect()) {
|
|
return range.aspectMask(VK_IMAGE_ASPECT_STENCIL_BIT);
|
|
}
|
|
return range.aspectMask(original);
|
|
}
|
|
}
|