Skip to content

Commit

Permalink
update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Boxadactle committed Aug 20, 2024
1 parent 94b7705 commit f37fef7
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Set up gradlew
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Set up gradlew
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Set up gradlew
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ subprojects {
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
it.options.release = 21
}

// Configure Maven publishing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@

import dev.boxadactle.debugkeybind.gui.DebugKeybindsScreen;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.OptionsList;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.controls.ControlsScreen;
import net.minecraft.network.chat.Component;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.List;

@Mixin(ControlsScreen.class)
public abstract class ControlsScreenMixin extends Screen {

@Shadow @Nullable private OptionsList list;

protected ControlsScreenMixin(Component component) {
super(component);
}
Expand All @@ -29,19 +35,11 @@ private void addButton(CallbackInfo ci) {
(b) -> minecraft.setScreen(new DebugKeybindsScreen(this))
).bounds(j, k, 150, 20).build()
);
}

@ModifyArg(
method = "init",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/components/Button$Builder;bounds(IIII)Lnet/minecraft/client/gui/components/Button$Builder;",
ordinal = 2
),
index = 1
)
private int modifyButtonY(int y) {
return y + 24;
list.addSmall(List.of(Button.builder(
Component.translatable("controls.keybinds.debug"),
(b) -> minecraft.setScreen(new DebugKeybindsScreen(this))
).build()));
}

}
2 changes: 1 addition & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ side="BOTH"
[[dependencies.debugkeybind]]
modId="boxlib"
mandatory=true
versionRange="[11.0.0,12.0.0)"
versionRange="[13.0.0,14.0.0)"
ordering="NONE"
side="CLIENT"
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@ org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true

# Mod properties
mod_version = 10.0.0
mod_version = 11.0.0
maven_group = dev.boxadactle
archives_name = DebugKeybind
enabled_platforms = fabric,forge

# Minecraft properties
minecraft_version = 1.20.4
minecraft_version = 1.20.6

# Dependencies
fabric_loader_version = 0.15.11
fabric_api_version = 0.97.1+1.20.4
forge_version = 49.1.4
fabric_api_version = 0.100.4+1.20.6
neoforge_version = 20.6.119
forge_version = 50.1.12

modmenu_version = 9.2.0
boxlib_version = 12.1.3
modmenu_version = 10.0.0
boxlib_version = 13.3.2

#publishing
game_versions = 1.20.4,1.20.3
game_versions = 1.20.6,1.20.5
project_id_curseforge = 901782
project_id_modrinth = DX9ioka8
release_type = release
Expand Down

0 comments on commit f37fef7

Please sign in to comment.