Skip to content

Commit

Permalink
Update to 1.20
Browse files Browse the repository at this point in the history
Builds off of #39.

Co-authored-by: thefirethirteen <[email protected]>
  • Loading branch information
NebelNidas and thefirethirteen committed May 22, 2024
1 parent a045555 commit 1037249
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@ jobs:

files: build/libs/!(*-@(dev|sources)).jar

name: 0.3.3 for MC 1.19.4
version: 0.3.3+1.19.4
name: 0.3.3 for MC 1.20
version: 0.3.3+1.20
version-type: release

loaders: |
fabric
game-versions: |
1.19.4
1.20
1.20.1
dependencies: |
fabric-api | depends
Expand Down
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {
modImplementation fabricApi.module('fabric-key-binding-api-v1', project.fabric_api_version)

// Other mods
modCompileOnly "de.siphalor:amecsapi-1.19:${project.amecs_api_version}"
modCompileOnly "de.siphalor:amecsapi-1.20:${project.amecs_api_version}"
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"

modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
Expand All @@ -88,17 +88,16 @@ dependencies {
}

// Comment out the following line to check vanilla compatibility
modRuntimeOnly "de.siphalor:amecsapi-1.19:${project.amecs_api_version}"
modRuntimeOnly "de.siphalor:amecsapi-1.20:${project.amecs_api_version}"

// Use full Fabric API bundle while debugging, since transitive deps aren't always declared correctly
modRuntimeOnly "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"

modRuntimeOnly "maven.modrinth:sodium:${project.sodium_version}"
modRuntimeOnly "maven.modrinth:lithium:${project.lithium_version}"
modRuntimeOnly "maven.modrinth:starlight:${project.starlight_version}"
modRuntimeOnly "maven.modrinth:ferrite-core:${project.ferritecore_version}"
modRuntimeOnly "curse.maven:smooth-boot-415758:${project.smoothboot_version}"
modRuntimeOnly "curse.maven:no-fade-452768:${project.no_fade_version}"
modRuntimeOnly "maven.modrinth:threadtweak:${project.threadtweak_version}"
modRuntimeOnly "maven.modrinth:fadeless:${project.fadeless_version}"
}
}

Expand Down
23 changes: 11 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ maven_group = com.github.reviversmc
archives_base_name = toomanybinds

# Mod Dependencies
minecraft_version = 1.19.4
minecraft_version = 1.20.1
fabric_loader_version = 0.15.11
fabric_api_version = 0.87.2+1.19.4
yarn_mappings = 1.19.4+build.2
amecs_api_version= 1.5.3+mc1.19.4
modmenu_version = 6.3.1
cloth_config_version = 10.1.117
fabric_api_version = 0.92.1+1.20.1
yarn_mappings = 1.20.1+build.10
amecs_api_version= 1.5.3+mc1.20-pre1
modmenu_version = 7.2.2
cloth_config_version = 11.1.118

# Dev-Env Mods
use_third_party_mods = true
sodium_version = mc1.19.4-0.4.10
lithium_version = mc1.19.4-0.11.1
starlight_version = 1.1.1+1.19
ferritecore_version = 5.2.0-fabric
smoothboot_version = 4441240
no_fade_version = 3550935
sodium_version = mc1.20.1-0.5.8
lithium_version = mc1.20.1-0.11.2
ferritecore_version = 6.0.1-fabric
threadtweak_version = 0.1.1+mc1.20.2
fadeless_version = 1.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import org.lwjgl.glfw.GLFW;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.NarratorManager;
import net.minecraft.client.util.math.MatrixStack;

import com.github.reviversmc.toomanybinds.autocompletion.BindSuggestion;
import com.github.reviversmc.toomanybinds.autocompletion.LauncherCompletion;
Expand Down Expand Up @@ -57,13 +57,13 @@ private int getY() {
}

@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
List<BindSuggestion> suggestions = completion.getSuggestions();
int lineAmt = Math.min(suggestions.size(), TooManyBinds.config.maxSuggestions);
int bgColor = (int) Math.round(TooManyBinds.config.bgOpacity * 255) * 0x1000000;
fill(matrices, getX()-1, getY()-1, getX()+w-1, getY()+lineHeight-2 + lineAmt * lineHeight, bgColor);
context.fill(getX()-1, getY()-1, getX()+w-1, getY()+lineHeight-2 + lineAmt * lineHeight, bgColor);
textField.setFocused(true);
textField.render(matrices, mouseX, mouseY, delta);
textField.render(context, mouseX, mouseY, delta);

int y = getY();

Expand All @@ -74,18 +74,18 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
y += lineHeight;

if (sg.favorite) {
fill(matrices, getX()-3, y-2, getX()-1, y+lineHeight-2, HIGHLIGHT_COLOR | bgColor);
context.fill(getX()-3, y-2, getX()-1, y+lineHeight-2, HIGHLIGHT_COLOR | bgColor);
}

// draw the bind name
drawTextWithShadow(matrices, textRenderer, sg.name, getX(), y, i == selected ? HIGHLIGHT_COLOR : SUGGESTION_COLOR);
context.drawTextWithShadow(textRenderer, sg.name, getX(), y, i == selected ? HIGHLIGHT_COLOR : SUGGESTION_COLOR);

// draw the bind category
int textWidth = textRenderer.getWidth(sg.category)+2;
drawTextWithShadow(matrices, textRenderer, sg.category, getX()+w-textWidth, y, SUGGESTION_COLOR);
context.drawTextWithShadow(textRenderer, sg.category, getX()+w-textWidth, y, SUGGESTION_COLOR);
}

super.render(matrices, mouseX, mouseY, delta);
super.render(context, mouseX, mouseY, delta);
}

public void switchSelection(int by) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"dzwdz"
],
"contributors": [
"TacoMonkey"
"TacoMonkey",
"thefirethirteen"
],
"contact": {
"sources": "https://github.com/ReviversMC/too-many-binds",
Expand All @@ -31,6 +32,6 @@
"toomanybinds.mixins.json"
],
"depends": {
"minecraft": "1.19.4"
"minecraft": ">=1.20- <1.22-"
}
}

0 comments on commit 1037249

Please sign in to comment.