forked from Clones/Controlify
fix list components not scrolling from controller navigation
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
package dev.isxander.controlify.mixins.compat.screen.vanilla;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import dev.isxander.controlify.Controlify;
|
||||
import dev.isxander.controlify.InputMode;
|
||||
import net.minecraft.client.gui.components.AbstractSelectionList;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
||||
@Mixin(AbstractSelectionList.class)
|
||||
public class AbstractSelectionListMixin {
|
||||
@ModifyExpressionValue(method = "setFocused", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/InputType;isKeyboard()Z"))
|
||||
private boolean shouldEnsureEntryVisible(boolean keyboard) {
|
||||
return keyboard || Controlify.getInstance().getCurrentInputMode() == InputMode.CONTROLLER;
|
||||
}
|
||||
}
|
@ -7,14 +7,15 @@
|
||||
],
|
||||
"client": [
|
||||
"compat.screen.vanilla.AbstractContainerEventHandlerMixin",
|
||||
"compat.screen.vanilla.AbstractSelectionListMixin",
|
||||
"compat.screen.vanilla.AbstractSliderButtonMixin",
|
||||
"core.ClientPacketListenerMixin",
|
||||
"compat.screen.vanilla.ContainerObjectSelectionListEntryMixin",
|
||||
"compat.screen.vanilla.ScreenAccessor",
|
||||
"compat.screen.vanilla.ScreenMixin",
|
||||
"core.ClientPacketListenerMixin",
|
||||
"core.KeyboardHandlerMixin",
|
||||
"feature.bind.KeyMappingAccessor",
|
||||
"core.MinecraftMixin",
|
||||
"core.MouseHandlerMixin",
|
||||
"compat.screen.vanilla.ScreenAccessor",
|
||||
"compat.screen.vanilla.ScreenMixin"
|
||||
"feature.bind.KeyMappingAccessor"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user