Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
46a7b76
Initial port to 26.2 compiles but not tested
TheDGOfficial Jun 24, 2026
a450e56
Update fabric-api version
TheDGOfficial Jul 1, 2026
975eefb
Merge branch 'main' into 26.2
TheDGOfficial Jul 1, 2026
a187da4
Update Fabric API version in README
TheDGOfficial Jul 7, 2026
302e70d
Update fabric-api dependency version
TheDGOfficial Jul 7, 2026
543c024
Update fabric-api version
TheDGOfficial Jul 7, 2026
54a9eeb
Bump Fabric API
TheDGOfficial Jul 7, 2026
712a957
Bump Fabric API
TheDGOfficial Jul 16, 2026
584a670
Bump Fabric API
TheDGOfficial Jul 17, 2026
b87a3f9
Merge branch 'main' into 26.2
TheDGOfficial Jul 17, 2026
cbc5e26
Merge branch 'main' into 26.2
TheDGOfficial Jul 17, 2026
d44b90e
Rename method from 'destroy' to 'exitWorldAndClose'
TheDGOfficial Jul 21, 2026
6fd197e
Implement Wayland game icon fix in WindowMixin
TheDGOfficial Jul 21, 2026
47f1841
Remove Wayland game icon fix method
TheDGOfficial Jul 21, 2026
305f3ae
Add GpuBackend import to WindowMixin
TheDGOfficial Jul 21, 2026
c2dfc22
Merge branch 'main' into 26.2
TheDGOfficial Jul 21, 2026
a85c7d7
Update method signature for createDevice modification
TheDGOfficial Jul 21, 2026
41038c5
Rename method for night vision scale override
TheDGOfficial Jul 21, 2026
f5c2ab2
Rename GuiMixin to HudMixin and update Mixin target
TheDGOfficial Jul 21, 2026
abb28ec
Replace GuiMixin with HudMixin in darkutils.mixins.json
TheDGOfficial Jul 21, 2026
d97fd31
Bump Fabric API
TheDGOfficial Jul 28, 2026
15d18cc
Update HeartTypeMixin to target Hud$HeartType
TheDGOfficial Aug 2, 2026
30b0892
Bump Fabric API
TheDGOfficial Aug 10, 2026
84aad85
Merge branch 'main' into 26.2
TheDGOfficial Aug 10, 2026
91be7f5
Bump Fabric API
TheDGOfficial Aug 18, 2026
2f0f789
Merge branch 'main' into 26.2
TheDGOfficial Aug 24, 2026
c80f5c0
Bump Fabric API
TheDGOfficial Sep 1, 2026
d5b904f
Merge branch 'main' into 26.2
TheDGOfficial Sep 4, 2026
8133fd8
Bump Fabric API
TheDGOfficial Sep 8, 2026
20b4c30
Merge branch 'main' into 26.2
TheDGOfficial Sep 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Required Dependencies:

Note: A release might target both these, and an older MC version. In addition, older releases can support older MC versions. For example, if you want to use 1.21.11; use the v1.4.0 release; as v1.5.0 is only for MC 26.1.2.

- Minecraft 26.1.2 or later.
- Minecraft 26.2 or later.
- Fabric Loader 0.19.5 or later.
- Fabric API 0.155.3 or later.
- Cloth Config API 26.1.154 or later.
- Fabric API 0.160.0 or later.
- Cloth Config API 26.2.155 or later.
- Hypixel Mod API 1.0.2 or later.

Optional Dependencies:

- Mod Menu 18.0.0 or later.
- Mod Menu 20.0.1 or later.

# Quality of Life

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ org.gradle.configureondemand=true
fabric.loom.dropNonIntermediateRootMethods=true

# Mod Properties
mod_version=1.6.0+26.1.2
mod_version=1.6.0+26.2
maven_group=gg.darkutils
archives_base_name=darkutils
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
loom = "1.17.20"
java = "25"
minecraft = "26.1.2"
minecraft = "26.2"
fabric-loader = "0.19.5"
fabric-api = "0.155.3+26.1.2"
cloth-config = "26.1.154"
mod-menu = "18.0.0"
fabric-api = "0.160.0+26.2"
cloth-config = "26.2.155"
mod-menu = "20.0.1"
hypixel-mod-api = "1.0.2"
hypixel-mod-api-mr = "1.0.2+build.1+mc26.1"
junit = "6.1.3"
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gg/darkutils/DarkUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static final void debug(@NotNull final Supplier<String> message) {

public static final void toast(@NotNull final Component title, @NotNull final Component message) {
final var mc = Minecraft.getInstance();
mc.getToastManager().addToast(SystemToast.multiline(mc, SystemToast.SystemToastId.PERIODIC_NOTIFICATION, title, message));
mc.gui.toastManager().addToast(new SystemToast(SystemToast.SystemToastId.PERIODIC_NOTIFICATION, title, message));
}

public static final void user(@NotNull final String message, @NotNull final DarkUtils.UserMessageLevel level) {
Expand Down Expand Up @@ -565,7 +565,7 @@ private static final void registerCommandWithAliases(@NotNull final String comma

private static final void openConfig() {
final var mc = Minecraft.getInstance();
mc.schedule(() -> mc.setScreen(DarkUtilsConfigScreen.create(null)));
mc.schedule(() -> mc.gui.setScreen(DarkUtilsConfigScreen.create(null)));
}

public static final @NotNull String getVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.Style;
import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.decoration.ItemFrame;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.phys.AABB;
import org.jetbrains.annotations.NotNull;
Expand All @@ -49,6 +51,9 @@ public final class AlignmentTaskSolver {

private static final @NotNull List<@NotNull Direction> directions = AlignmentTaskSolver.getDirections();

private static final @NotNull Item RED_WOOL = Items.WOOL.pick(DyeColor.RED);
private static final @NotNull Item LIME_WOOL = Items.WOOL.pick(DyeColor.LIME);

static {
box = AlignmentTaskSolver.generateSortedBox();
boxSet = Set.copyOf(AlignmentTaskSolver.box);
Expand Down Expand Up @@ -226,13 +231,13 @@ private static final ObjectArrayList<ItemFrame> collectRelevantItemFrames() {
return frames;
}

for (final var frame : world.getEntities(EntityType.ITEM_FRAME, AlignmentTaskSolver.boxAABB, ignored -> true)) {
for (final var frame : world.getEntities(EntityTypes.ITEM_FRAME, AlignmentTaskSolver.boxAABB, ignored -> true)) {
if (!AlignmentTaskSolver.boxSet.contains(frame.blockPosition())) {
continue;
}

final var held = frame.getItem();
if (held.is(Items.ARROW) || held.is(Items.RED_WOOL) || held.is(Items.LIME_WOOL)) {
if (held.is(Items.ARROW) || held.is(AlignmentTaskSolver.RED_WOOL) || held.is(AlignmentTaskSolver.LIME_WOOL)) {
frames.add(frame);
}
}
Expand Down Expand Up @@ -282,10 +287,10 @@ private static final void computeDirections() {
if (held.is(Items.ARROW)) {
return AlignmentTaskSolver.SpaceType.PATH;
}
if (held.is(Items.RED_WOOL)) {
if (held.is(AlignmentTaskSolver.RED_WOOL)) {
return AlignmentTaskSolver.SpaceType.END;
}
return held.is(Items.LIME_WOOL) ? AlignmentTaskSolver.SpaceType.STARTER : AlignmentTaskSolver.SpaceType.EMPTY;
return held.is(AlignmentTaskSolver.LIME_WOOL) ? AlignmentTaskSolver.SpaceType.STARTER : AlignmentTaskSolver.SpaceType.EMPTY;
}
return AlignmentTaskSolver.SpaceType.EMPTY;
}
Expand All @@ -302,7 +307,7 @@ private static final void computeTurns() {
continue;
}
ItemFrame frame = null;
for (final var frameEntity : world.getEntities(EntityType.ITEM_FRAME, frameBox, ignored -> true)) {
for (final var frameEntity : world.getEntities(EntityTypes.ITEM_FRAME, frameBox, ignored -> true)) {
if (framePos.equals(frameEntity.blockPosition())) {
frame = frameEntity;
break;
Expand Down Expand Up @@ -360,7 +365,7 @@ private static final void showNametagAtFrame(final @NotNull BlockPos pos, final
}

ItemFrame entity = null;
for (final var frame : world.getEntities(EntityType.ITEM_FRAME, box, ignored -> true)) {
for (final var frame : world.getEntities(EntityTypes.ITEM_FRAME, box, ignored -> true)) {
if (pos.equals(frame.blockPosition())) {
entity = frame;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.DyeColor;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -124,6 +125,8 @@ public final class DungeonTimer {
Map.entry("[BOSS] Wither King: Incredible. You did what I couldn't do myself.", DungeonTimer.PHASE_5_FINISH),
Map.entry("[BOSS] Wither King: Thank you for coming all the way here.", DungeonTimer.PHASE_5_FINISH)
);
@NotNull
private static final Item BROWN_TERRACOTTA = Items.DYED_TERRACOTTA.pick(DyeColor.BROWN);

private DungeonTimer() {
super();
Expand Down Expand Up @@ -467,7 +470,7 @@ private static final void updateLines() {

// Floor 6
if (6 == floor.floor) {
DungeonTimer.line(DungeonTimer.DungeonPhase.BOSS_ENTRY, DungeonTimer.DungeonPhase.TERRAS_CLEAR, "Terracottas", ChatFormatting.GOLD, Items.BROWN_TERRACOTTA);
DungeonTimer.line(DungeonTimer.DungeonPhase.BOSS_ENTRY, DungeonTimer.DungeonPhase.TERRAS_CLEAR, "Terracottas", ChatFormatting.GOLD, DungeonTimer.BROWN_TERRACOTTA);
DungeonTimer.line(DungeonTimer.DungeonPhase.TERRAS_CLEAR, DungeonTimer.DungeonPhase.GIANTS_CLEAR, "Giants", ChatFormatting.AQUA, Items.DIAMOND_SWORD);
}

Expand Down
21 changes: 1 addition & 20 deletions src/main/java/gg/darkutils/feat/dungeons/ReplaceDiorite.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,7 @@ private static final BlockState[] getGlassStates() {
final var glassStates = new BlockState[16];

for (final var color : DyeColor.values()) {
final var state = (switch (color) {
case WHITE -> Blocks.WHITE_STAINED_GLASS;
case ORANGE -> Blocks.ORANGE_STAINED_GLASS;
case MAGENTA -> Blocks.MAGENTA_STAINED_GLASS;
case LIGHT_BLUE -> Blocks.LIGHT_BLUE_STAINED_GLASS;
case YELLOW -> Blocks.YELLOW_STAINED_GLASS;
case LIME -> Blocks.LIME_STAINED_GLASS;
case PINK -> Blocks.PINK_STAINED_GLASS;
case GRAY -> Blocks.GRAY_STAINED_GLASS;
case LIGHT_GRAY -> Blocks.LIGHT_GRAY_STAINED_GLASS;
case CYAN -> Blocks.CYAN_STAINED_GLASS;
case PURPLE -> Blocks.PURPLE_STAINED_GLASS;
case BLUE -> Blocks.BLUE_STAINED_GLASS;
case BROWN -> Blocks.BROWN_STAINED_GLASS;
case GREEN -> Blocks.GREEN_STAINED_GLASS;
case RED -> Blocks.RED_STAINED_GLASS;
case BLACK -> Blocks.BLACK_STAINED_GLASS;
}).defaultBlockState();

glassStates[color.ordinal()] = state;
glassStates[color.ordinal()] = Blocks.STAINED_GLASS.pick(color).defaultBlockState();
}

return glassStates;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private static final void onTick() {
// No config check, still need to track Zorro's cape equip status in case user enables/disables the feature to not desync the state from the real state.
final AbstractContainerMenu screenHandler;

if (!(Minecraft.getInstance().screen instanceof final ContainerScreen container) || MenuType.GENERIC_9x6 != (screenHandler = container.getMenu()).menuType || !"Your Equipment and Stats".equals(ChatUtils.removeControlCodes(container.getTitle().getString()))) {
if (!(Minecraft.getInstance().gui.screen() instanceof final ContainerScreen container) || MenuType.GENERIC_9x6 != (screenHandler = container.getMenu()).menuType || !"Your Equipment and Stats".equals(ChatUtils.removeControlCodes(container.getTitle().getString()))) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static final void onTreeGift(@NotNull final ObtainTreeGiftEvent event) {
client.player.playSound(SoundEvents.NOTE_BLOCK_PLING.value(), 1.0F, 1.0F);

// Show title/subtitle
client.gui.setTitle(Component.nullToEmpty("§2Tree Gift!"));
client.gui.hud.setTitle(Component.nullToEmpty("§2Tree Gift!"));
var subtitle = "§7You received the rewards!";

final var mobSpawned = event.treeMobSpawned();
Expand All @@ -48,8 +48,8 @@ private static final void onTreeGift(@NotNull final ObtainTreeGiftEvent event) {
subtitle = "§7A §d" + prettyName + " §7has spawned!";
}

client.gui.setSubtitle(Component.nullToEmpty(subtitle));
client.gui.setTimes(10, 70, 20);
client.gui.hud.setSubtitle(Component.nullToEmpty(subtitle));
client.gui.hud.setTimes(10, 70, 20);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.decoration.ArmorStand;
import net.minecraft.world.item.Items;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -60,7 +60,7 @@ private static final void update() {
}
} else {
// 30 block range
for (final var stand : world.getEntities(EntityType.ARMOR_STAND, player.getBoundingBox().inflate(30.0D), ignored -> true)) {
for (final var stand : world.getEntities(EntityTypes.ARMOR_STAND, player.getBoundingBox().inflate(30.0D), ignored -> true)) {
WillOWispDisplay.processPossibleWillOWispTag(stand);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gg/darkutils/feat/qol/AutoFishingRod.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private static final void useRod(@NotNull final Runnable continuation, final boo
: min;

TickUtils.queueTickTask(() -> {
if (!mc.player.isUsingItem() && !mc.options.keyAttack.isDown() && !mc.options.keyUse.isDown() && (DarkUtilsConfig.INSTANCE.autoFishingWorkThroughMenus || null == mc.screen)) {
if (!mc.player.isUsingItem() && !mc.options.keyAttack.isDown() && !mc.options.keyUse.isDown() && (DarkUtilsConfig.INSTANCE.autoFishingWorkThroughMenus || null == mc.gui.screen())) {
mc.startUseItem();

continuation.run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ private static final void onTPSUpdate(final int tps) {
final var tpsStatus = LaggyServerDetector.getTpsStatus(tpsAverageOver30Seconds);
final var client = Minecraft.getInstance();

client.gui.setTitle(Component.nullToEmpty("§d30s TPS AVG: " + tpsStatus.color() + tpsAverageOver30SecondsFormatted + tpsStatus.comment()));
client.gui.setTimes(10, 70, 20);
client.gui.hud.setTitle(Component.nullToEmpty("§d30s TPS AVG: " + tpsStatus.color() + tpsAverageOver30SecondsFormatted + tpsStatus.comment()));
client.gui.hud.setTimes(10, 70, 20);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gg/darkutils/feat/qol/VanillaMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private static final void onConfigScreenOpen(@NotNull final ConfigScreenOpenEven
}

private static final boolean isNoScreenOpen() {
return null == Minecraft.getInstance().screen;
return null == Minecraft.getInstance().gui.screen();
}

private static final void onJoinSingleplayer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private final void openCommandSendConfirmationWindow(@NotNull final String comma
private final void darkutils$openConfirmCommandScreen$disableIfEnabled(@NotNull final ClientPacketListener handler, @NotNull final String command, @NotNull final String message, @NotNull final Screen afterActionScreen) {
if (DarkUtilsConfig.INSTANCE.disableCommandConfirmation && message.contains("parse_errors")) {
handler.send(new ServerboundChatCommandPacket(command));
Minecraft.getInstance().setScreen(afterActionScreen);
Minecraft.getInstance().gui.setScreen(afterActionScreen);
} else {
this.openCommandSendConfirmationWindow(command, message, afterActionScreen);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private GameRendererMixin() {
throw new UnsupportedOperationException("mixin class");
}

@Inject(method = "getNightVisionScale", at = @At("HEAD"), cancellable = true)
@Inject(method = "nightVisionScale", at = @At("HEAD"), cancellable = true)
private static final void darkutils$overrideNightVisionIfEnabled(@NotNull final LivingEntity entity, final float tickProgress, @NotNull final CallbackInfoReturnable<Float> cir) {
if (DarkUtilsConfig.INSTANCE.nightVision) {
cir.setReturnValue(0.9F);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gg/darkutils/mixin/misc/GlBackendMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ private GlBackendMixin() {
GLFW.glfwWindowHint(hint, GLFW.GLFW_CONTEXT_VERSION_MAJOR == hint ? OpenGLVersionOverride.getGLMajorVersion(value) : GLFW.GLFW_CONTEXT_VERSION_MINOR == hint ? OpenGLVersionOverride.getGLMinorVersion(value) : value);
}

@ModifyArgs(method = "createDevice(JLcom/mojang/blaze3d/shaders/ShaderSource;Lcom/mojang/blaze3d/shaders/GpuDebugOptions;)Lcom/mojang/blaze3d/systems/GpuDevice;", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/opengl/GlDevice;<init>(JLcom/mojang/blaze3d/shaders/ShaderSource;Lcom/mojang/blaze3d/shaders/GpuDebugOptions;)V"))
@ModifyArgs(method = "createDevice(JLcom/mojang/blaze3d/shaders/ShaderSource;Lcom/mojang/blaze3d/shaders/GpuDebugOptions;Ljava/lang/Runnable;)Lcom/mojang/blaze3d/systems/GpuDevice;", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/opengl/GlDevice;<init>(JLcom/mojang/blaze3d/shaders/ShaderSource;Lcom/mojang/blaze3d/shaders/GpuDebugOptions;)V"))
private static final void darkutils$disableGlDebugIfEnabled(@NotNull final Args args) {
if (DarkUtilsConfig.INSTANCE.disableGlDebug) {
args.set(2, new GpuDebugOptions(0, false, false));
args.set(2, new GpuDebugOptions(0, false, false, false));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private MinecraftMixin() {
}
}

@Inject(method = "destroy", at = @At("HEAD"))
@Inject(method = "exitWorldAndClose", at = @At("HEAD"))
private final void darkutils$onQuitGame(@NotNull final CallbackInfo ci) {
PersistentData.saveAtomicIfDirtyThreadSafeBlocking();
}
Expand Down
19 changes: 19 additions & 0 deletions src/main/java/gg/darkutils/mixin/misc/WindowMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import com.mojang.blaze3d.platform.IconSet;
import com.mojang.blaze3d.platform.Window;
import com.mojang.blaze3d.systems.GpuBackend;
import gg.darkutils.DarkUtils;
import gg.darkutils.config.DarkUtilsConfig;
import gg.darkutils.feat.bugfixes.WaylandGameIconFix;
import gg.darkutils.feat.performance.OpenGLVersionOverride;
import gg.darkutils.feat.bugfixes.WaylandGameIconFix;
import net.minecraft.client.Minecraft;
import net.minecraft.server.packs.PackResources;
import org.jetbrains.annotations.NotNull;
Expand All @@ -17,6 +19,7 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.io.IOException;

Expand Down Expand Up @@ -68,6 +71,22 @@ private WindowMixin() {
Minecraft.getInstance().resizeGui();
}

@Inject(method = "createGlfwWindow", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/GpuBackend;setWindowHints()V", shift = At.Shift.AFTER))
private static final void darkutils$afterDefaultWindowHints$fixGameIconOnWaylandIfEnabled(final int width, final int height, @NotNull final String title, final long monitor, @NotNull final GpuBackend backend, @NotNull final CallbackInfoReturnable<Long> cir) {
if (DarkUtilsConfig.INSTANCE.preferWayland && DarkUtilsConfig.INSTANCE.fixGameIconOnWayland && DarkUtils.shouldPreferWayland() && DarkUtils.isWindowPlatformWayland()) {
try {
WaylandGameIconFix.generateDesktopFile();
} catch (final IOException ioe) {
WaylandGameIconFix.desktopFileFailure = true;
DarkUtils.error("@fileName@", "Error generating desktop file to filesystem for use with wayland icon fix, fall backing to vanilla logic", ioe);

return;
}

GLFW.glfwWindowHintString(GLFW.GLFW_WAYLAND_APP_ID, WaylandGameIconFix.WAYLAND_APP_ID);
}
}

@Inject(method = "setIcon", at = @At("HEAD"), cancellable = true)
private final void darkutils$onSetGameIcon$fixGameIconOnWaylandIfEnabled(@NotNull final PackResources packResources, @NotNull final IconSet iconSet, @NotNull final CallbackInfo ci) {
if (DarkUtilsConfig.INSTANCE.preferWayland && DarkUtilsConfig.INSTANCE.fixGameIconOnWayland && DarkUtils.shouldPreferWayland() && DarkUtils.isWindowPlatformWayland() && !WaylandGameIconFix.desktopFileFailure) {
Expand Down
18 changes: 0 additions & 18 deletions src/main/java/gg/darkutils/mixin/performance/GLXMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import com.mojang.blaze3d.platform.GLX;
import gg.darkutils.DarkUtils;
import gg.darkutils.config.DarkUtilsConfig;
import gg.darkutils.feat.bugfixes.WaylandGameIconFix;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.glfw.GLFW;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.function.LongSupplier;

Expand All @@ -36,21 +34,5 @@ private GLXMixin() {

GLFW.glfwInitHint(hint, value);
}

@Inject(method = "_initGlfw", at = @At(value = "INVOKE", target = "Lorg/lwjgl/glfw/GLFW;glfwDefaultWindowHints()V", shift = At.Shift.AFTER))
private static final void darkutils$afterDefaultWindowHints$fixGameIconOnWaylandIfEnabled(@NotNull final CallbackInfoReturnable<LongSupplier> ci) {
if (DarkUtilsConfig.INSTANCE.preferWayland && DarkUtilsConfig.INSTANCE.fixGameIconOnWayland && DarkUtils.shouldPreferWayland() && DarkUtils.isWindowPlatformWayland()) {
try {
WaylandGameIconFix.generateDesktopFile();
} catch (final IOException ioe) {
WaylandGameIconFix.desktopFileFailure = true;
DarkUtils.error("@fileName@", "Error generating desktop file to filesystem for use with wayland icon fix, fall backing to vanilla logic", ioe);

return;
}

GLFW.glfwWindowHintString(GLFW.GLFW_WAYLAND_APP_ID, WaylandGameIconFix.WAYLAND_APP_ID);
}
}
}

Loading
Loading