Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Fixing crash on tab complete
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkKronicle committed Sep 5, 2022
1 parent 12b4f24 commit bf70425
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 35 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Upload to Discord
run: ./gradlew discord --stacktrace
if: |
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
env:
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
workflow_dispatch:
inputs:
previousVersion:
description: 'Previous Version (Do not include v prefix, must be same as the last version tag! Example: 1.4.1)'
required: true
version:
description: 'Version (Do not include v prefix! Example: 1.4.2)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Fetch tags
run: git fetch --tags
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Upload to websites
run: ./gradlew publishThirdParty --stacktrace -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}"
if: |
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
env:
modrinth_token: ${{ secrets.MODRINTH_TOKEN }}
curseforge_token: ${{ secrets.CURSEFORGE_TOKEN }}
github_token: ${{ secrets.GH_API_KEY }}
discord_release_webhook: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }}
- name: Capture build artifacts
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
29 changes: 3 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id "io.freefair.lombok" version "6.0.0-m2"
id "com.diffplug.spotless" version "5.17.1"
}

apply from: 'https://raw.githubusercontent.com/DarkKronicle/GradleScripts/main/gradle/publish.gradle'

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

Expand Down Expand Up @@ -63,34 +64,13 @@ tasks.withType(JavaCompile).configureEach {
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from "LICENSE.txt"
}

spotless {
ratchetFrom 'origin/main'
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
java {
target 'src/*/java/**/*.java'
removeUnusedImports()
licenseHeaderFile "HEADER.txt"
}
}

// configure the maven publication
publishing {
publications {
Expand All @@ -107,9 +87,6 @@ publishing {

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.

}
}
31 changes: 24 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.8
fabric_api_version=0.57.0+1.19
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.1
loader_version=0.14.9
fabric_api_version=0.59.0+1.19.2


mod_version=1.1.5
mod_version=1.1.6
maven_group=io.github.darkkronicle
archives_base_name=AdvancedChatBox
malilib_version = 0.13.0
advancedchat_version=1.5.3-build1
advancedchat_version=1.5.7
mxparser_version=4.4.2
org.gradle.jvmargs=-Xmx1G
org.gradle.jvmargs=-Xmx1G

# Uploading data
curseforge_slug=advancedchatbox
curseforge_id=541714

modrinth_slug=advancedchatbox
modrinth_id=8WeCY8Xd

# default_release_type can be stable, beta, or alpha
default_release_type=stable
project_name=AdvancedChatBox
project_url=https://modrinth.com/mod/advancedchatbox
project_logo=https://raw.githubusercontent.com/DarkKronicle/AdvancedChatBox/main/src/main/resources/assets/advancedchatbox/icon.png
project_color=0x4480ad
changelog_hide_unimportant_commits=true
changelog_max_commit_search=200
discord_webhook_changelog_line_limit=10
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ public void select(int index) {
Suggestion suggestion = this.suggestions.get(this.selection);
ChatSuggestorGui.this.textField.setSuggestion(ChatSuggestorGui
.getSuggestionSuffix(ChatSuggestorGui.this.textField.getText(), suggestion.apply(this.typedText)));
if (NarratorManager.INSTANCE.isActive() && this.lastNarrationIndex != this.selection) {
NarratorManager.INSTANCE.narrate(this.getNarration());
if (client.getNarratorManager().isActive() && this.lastNarrationIndex != this.selection) {
client.getNarratorManager().narrate(this.getNarration());
}
}

Expand Down

0 comments on commit bf70425

Please sign in to comment.