mirror of
https://github.com/chylex/Better-Controls.git
synced 2024-11-25 10:42:45 +01:00
Compare commits
No commits in common. "7895b0dc0fb438534574e575ba582fdf68ce24b2" and "8d5536cc69e8d108968ca3475bd42b865639c24d" have entirely different histories.
7895b0dc0f
...
8d5536cc69
@ -3,21 +3,21 @@ modId=bettercontrols
|
||||
modName=Better Controls
|
||||
modDescription=Adds many powerful key bindings and options to control your movement.\\n\\nThe features complement vanilla mechanics without giving unfair advantages, so server use should be fine.
|
||||
modAuthor=chylex
|
||||
modVersion=1.3.0b
|
||||
modVersion=1.3.0a
|
||||
modLicense=MPL-2.0
|
||||
modSourcesURL=https://github.com/chylex/Better-Controls
|
||||
modIssuesURL=https://github.com/chylex/Better-Controls/issues
|
||||
|
||||
# Dependencies
|
||||
minecraftVersion=1.20.3
|
||||
neoForgeVersion=20.3.8-beta
|
||||
minecraftVersion=1.20.2
|
||||
neoForgeVersion=20.2.86
|
||||
fabricVersion=0.14.21
|
||||
loomVersion=1.3
|
||||
mixinVersion=0.8.5
|
||||
|
||||
# Constraints
|
||||
minimumMinecraftVersion=1.20.3
|
||||
minimumNeoForgeVersion=20.3.7
|
||||
minimumMinecraftVersion=1.20.2
|
||||
minimumNeoForgeVersion=20.2.86
|
||||
minimumFabricVersion=0.12.3
|
||||
|
||||
# Gradle
|
||||
|
@ -10,9 +10,9 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
if (settings.extra.has("neoForgeVersion")) {
|
||||
id("net.neoforged.gradle.vanilla") version "7.0.61"
|
||||
id("net.neoforged.gradle.userdev") version "7.0.61"
|
||||
id("net.neoforged.gradle.mixin") version "7.0.61"
|
||||
id("net.neoforged.gradle.vanilla") version "7.0.41"
|
||||
id("net.neoforged.gradle.userdev") version "7.0.41"
|
||||
id("net.neoforged.gradle.mixin") version "7.0.41"
|
||||
}
|
||||
|
||||
if (settings.extra.has("loomVersion")) {
|
||||
|
@ -234,9 +234,9 @@ public class BetterControlsScreen extends OptionsSubScreen {
|
||||
y = generateMiscellaneousOptions(y + ROW_HEIGHT, elements) + TITLE_MARGIN_TOP;
|
||||
|
||||
//noinspection DataFlowIssue
|
||||
addRenderableWidget(Button.builder(CommonComponents.GUI_DONE, btn -> minecraft.setScreen(lastScreen)).pos(width / 2 - 99, height - 25).size(200, 20).build());
|
||||
addRenderableWidget(Button.builder(CommonComponents.GUI_DONE, btn -> minecraft.setScreen(lastScreen)).pos(width / 2 - 99, height - 29).size(200, 20).build());
|
||||
|
||||
addRenderableWidget(optionsWidget = new OptionListWidget(width, height - 50, 21, y - TITLE_MARGIN_TOP + BOTTOM_PADDING, elements));
|
||||
addRenderableWidget(optionsWidget = new OptionListWidget(21, height - 32, width, height, elements, y - TITLE_MARGIN_TOP + BOTTOM_PADDING));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -244,15 +244,12 @@ public class BetterControlsScreen extends OptionsSubScreen {
|
||||
BetterControlsCommon.getConfig().save();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackground(final @NotNull GuiGraphics graphics, final int mouseX, final int mouseY, final float delta) {
|
||||
renderDirtBackground(graphics);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(final @NotNull GuiGraphics graphics, final int mouseX, final int mouseY, final float delta) {
|
||||
super.render(graphics, mouseX, mouseY, delta);
|
||||
renderBackground(graphics, mouseX, mouseY, delta);
|
||||
optionsWidget.render(graphics, mouseX, mouseY, delta);
|
||||
graphics.drawCenteredString(font, title, width / 2, 8, TextWidget.WHITE);
|
||||
super.render(graphics, mouseX, mouseY, delta);
|
||||
}
|
||||
|
||||
private void startEditingKeyBinding(final KeyBindingWidget widget) {
|
||||
|
@ -54,8 +54,8 @@ public final class OptionListWidget extends ContainerObjectSelectionList<Entry>
|
||||
|
||||
private record Offset(int x, int y) {}
|
||||
|
||||
public OptionListWidget(final int width, final int height, final int top, final int innerHeight, final List<GuiEventListener> widgets) {
|
||||
super(Minecraft.getInstance(), width, height, top, innerHeight);
|
||||
public OptionListWidget(final int top, final int bottom, final int width, final int height, final List<GuiEventListener> widgets, final int innerHeight) {
|
||||
super(Minecraft.getInstance(), width, height, top, bottom, innerHeight);
|
||||
addEntry(new Entry(widgets));
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(KeyBindsList.class)
|
||||
public abstract class HookControlsListWidget extends ContainerObjectSelectionList<Entry> {
|
||||
public HookControlsListWidget(final Minecraft client, final int width, final int height, final int top, final int itemHeight) {
|
||||
super(client, width, height, top, itemHeight);
|
||||
public HookControlsListWidget(final Minecraft client, final int width, final int height, final int top, final int bottom, final int itemHeight) {
|
||||
super(client, width, height, top, bottom, itemHeight);
|
||||
}
|
||||
|
||||
@Redirect(method = "<init>", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Options;keyMappings:[Lnet/minecraft/client/KeyMapping;"))
|
||||
|
Loading…
Reference in New Issue
Block a user