Skip to content

Commit

Permalink
Sync 213.6.10 to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuilder1961 committed Nov 21, 2024
1 parent 9d3af20 commit 7934efe
Show file tree
Hide file tree
Showing 30 changed files with 919 additions and 485 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

15 changes: 7 additions & 8 deletions .github/ISSUE_TEMPLATE/bug-report--latest-mod-versions-only-.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report (latest versions ONLY)
about: Create a bug report to get the bug fixed as soon as possible.
title: Bug summary goes here - Affected mod version(s)
title: Bug summary - Mod version - MC version
labels: bug
assignees: ''

Expand All @@ -11,25 +11,24 @@ assignees: ''
As detailed and descriptive as you can make it. If possible, attach photos and/or videos.

### How to reproduce
An ordered list of steps of how and where you experienced the bug.
An ordered list of steps of how and where you experienced the bug; include what you were doing before, side effects, etc.

### Expected result
Exactly what you expected to happen, in detail.

### Log file link
Don't paste the whole log here!! Just copy and paste it into a site like `mclo.gs` or `pastebin.com`. Logs are located in the Minecraft directory folder, under `/logs` and sometimes `/crash-reports`.
Don't paste the whole log here!! Just copy and paste it into https://mclo.gs, or if your launcher supports it just upload and paste the copied link. Logs are located in your Minecraft directory under `/logs` and `/crash-reports`.

### Specs and Details
Required information:
- Computer OS
- Mod version
- Fabric and API versions
- YetAnotherConfigLib and Mod Menu versions (if installed)
- List of all installed mods (can be a list *copied* from a log file **OR** a screenshot of the mods folder)
- Fabric, Fabric API, and YetAnotherConfigLib versions
- Mod Menu / Catalogue and Menulogue versions (if installed)

Optional but suggested information:
- `chatpatches.json` file (if pasted use the format: \`\`\`json\n\<config data>\n\`\`\`)
- `chatlog.json` file (DO NOT PASTE)
- `chatlog.json` file (DO NOT PASTE, put a link using a site like https://pastebin.com)

### Additional context
Anything else that could possibly be relevant to this issue. For example, what happened leading up to the incident.
Anything else that could possibly be relevant to this issue.
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@ jobs:
strategy:
matrix:
java: [
17 # Current Java LTS & minimum supported by Minecraft
#,21 # Latest Java LTS
21 # Latest Java LTS & minimum supported by Minecraft
]
# and run on the latest dists of Linux, MacOs, and Windows
# and run on the latest dists of Linux, MacOS, and Windows
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2

- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin

- name: setup gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper

- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
Expand All @@ -48,11 +49,11 @@ jobs:
run: ./gradlew build --info --stacktrace

- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v4
with:
name: jars
path: |
build/libs/
build/devlibs/
!build/devlibs/*-sources.jar
!build/devlibs/*-sources.jar
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Once you contribute, [join the Discord server](https://discord.gg/3MqBvNEyMz) so
| Save interval (minutes) | `0` | How long should the Chat Log wait before saving to disk? This is in minutes, the minimum is 1. Set to 0 to only save when paused (warning: setting to <5 will lag a lot). All values try to save on exit. | `text.chatpatches.chatlogSaveInterval` |
| Ignore hide message packet | `true` | Should hide message packets that delete chat messages be ignored? | `text.chatpatches.chatHidePacket` |
| Override chat width | `0` | The width of the chat box. This overrides vanilla's default and allows for a much larger width. Set to 0 to use the vanilla setting and not override it. | `text.chatpatches.chatWidth` |
| Override chat height | `0` | The width of the chat box. This overrides vanilla's default and allows for a much larger height. Set to 0 to use the vanilla setting and not override it. | `text.chatpatches.chatHeight` |
| Maximum chat messages | `16384` | The max amount of chat messages allowed to save. Vanilla caps it at 100, this mod can increase it up to 32,767. Keep in mind a higher max equals higher memory usage. | `text.chatpatches.chatMaxMessages` |
| Playername text | `"<$>"` | The text that replaces the playername in chat messages. Vanilla is '<$>', name only is '$'; where '$' is a placeholder for the playername. Only applies to player-sent messages. | `text.chatpatches.chatNameFormat` |
| Playername color | `0xffffff` | The color that's filled in where it would otherwise be blank white in the resulting formatted playername. To use this with other formatting modifiers, use '&r' in the decoration text option. | `text.chatpatches.chatNameColor` |
Expand Down Expand Up @@ -188,7 +189,24 @@ https://github.com/mrbuilder1961/ChatPatches/actions/runs/8310511511/artifacts/1
7. Now you should be good to go! Launching the game should now load the beta version. If you experience any issues, make sure to report them as soon as
possible wherever you were given the link (here on GitHub or [the Discord](https://discord.gg/3MqBvNEyMz)).

### How to find mod(s) causing compatibility issues (binary search)
*(taken from the Fabric Discord bot, not claiming ownership, just sharing knowledge!)*

> A binary search can be used to quickly find a specific mod causing trouble, which can be especially useful when logs don't give a conclusive answer to your issue.
> Start by removing or disabling half of your mods, then test if the problem still occurs. If it does, remove half of the remaining mods and test again. If it doesn't, add back half of the mods you just removed.
> Keep in mind you don't have to stick strictly to halves each time, and may have to enable some library mods like Fabric API out of order.
> By repeating this on an increasingly smaller set of mods, you'll find the problematic mod within a few iterations.
Make sure you leave Chat Patches and it's dependencies installed when you're looking for the problematic mod, otherwise it won't do anything to help diagnose the issue.

## Sponsor me!
- Ko-Fi: https://ko-fi.com/obro1961

[![15% off your first month with code OBRO15!](https://i.imgur.com/9mjs77B.png)](https://billing.kinetichosting.net/aff.php?aff=234)
[![15% off your first month with code OBRO15!](https://i.imgur.com/9mjs77B.png)](https://billing.kinetichosting.net/aff.php?aff=234)

### (not sponsored; highly encouraged)
[![Use your voice, help the families of Gaza](https://github.com/user-attachments/assets/111407d3-0018-4ac9-b9db-2e515e2e54a0)
](https://linktr.ee/opolivebranch)
42 changes: 25 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import groovy.json.JsonSlurper
import me.modmuss50.mpp.ReleaseType

import java.util.function.BiFunction
import java.util.function.Function
import java.util.stream.Stream

plugins {
id "fabric-loom" version "1.6-SNAPSHOT"
id "fabric-loom" version "1.7-SNAPSHOT"
id "maven-publish"
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
id "me.modmuss50.mod-publish-plugin" version "0.7.4"
}

group = project.group
Expand All @@ -19,8 +18,8 @@ base {
}

// global publishing variables - shouldPublish defaults to true, but can be set to false by using `-PshouldPublish=false`
boolean shouldPublish = Boolean.parseBoolean( providers.gradleProperty("shouldPublish").getOrElse("true") )
String changelogText = "Changelog could not be found... 😬"
def shouldPublish = Boolean.parseBoolean( providers.gradleProperty("shouldPublish").getOrElse("true") )
def changelogText = "Changelog could not be found... 😬"

repositories {
mavenCentral()
Expand Down Expand Up @@ -50,14 +49,14 @@ processResources {
} */
}

File changelog = file("changelog.md")
def changelog = file("changelog.md")
if( changelog.exists() ) {
// replaces github issue numbers with links
file("changelog.md").text = changelog.text.replaceAll("##(\\d+)", "[#\$1](https://www.github.com/mrbuilder1961/ChatPatches/issues/\$1)")

// hackily gets the first changelog entry
String newEntryTitle = "## Chat Patches `" + version + "`"
int prevEntryIndex = file("changelog.md").text.replaceFirst(newEntryTitle, "").indexOf("## Chat Patches `") + newEntryTitle.length() - 2
def newEntryTitle = "## Chat Patches `" + version + "`"
def prevEntryIndex = file("changelog.md").text.replaceFirst(newEntryTitle, "").indexOf("## Chat Patches `") + newEntryTitle.length() - 2

changelogText = file("changelog.md").text.substring(0, prevEntryIndex).replaceFirst("# Changelog\\s+", "")

Expand All @@ -70,22 +69,28 @@ processResources {
}
println()
}
}

if(changelogText.length() > 2000) {
def more = "..\n***.. and more! Check out the full release notes on GitHub!***"
changelogText = changelogText.substring(0, 2000 - more.length()).stripTrailing() + more

println "Trimmed changelog, was over 2000 characters"
}

if(!shouldPublish)
println "Using changelog text:\n>${changelogText}<"
println "Using changelog text:\n>$changelogText<"
}

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

java {
withSourcesJar()

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

jar {
Expand All @@ -96,7 +101,8 @@ jar {

publishing {
publications {
mavenJava(MavenPublication) {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
Expand All @@ -112,16 +118,17 @@ publishMods {
Function<String, List<String>> propListGetter = (String propertyName) ->
rootProject[propertyName] != null ? Stream.of( rootProject[propertyName].toString().split(",") ).filter{!it.isBlank()}.toList() : new ArrayList<>()
BiFunction<String, Boolean, String> tokenGetter = (String tokenName, boolean valid) ->
valid && secrets.exists() ? Objects.requireNonNullElse(new JsonSlurper().parse (secrets)[tokenName], "-") : "-"
valid && secrets.exists() ? Objects.requireNonNullElse(new JsonSlurper().parse(secrets)[tokenName], "-") : "-"

// gradle.properties vars
ReleaseType phase = ReleaseType.valueOf( rootProject.phase.toString().toUpperCase() )
String phase = rootProject.phase.toString().toLowerCase()
List<String> loaders = propListGetter.apply("loaders") // Arrays.asList( rootProject.loaders.toString().split(",") )
List<String> targets = propListGetter.apply("targets") // Arrays.asList( rootProject.targets.toString().split(",") )
String[] required = propListGetter.apply("required").toArray()
String[] optionals = propListGetter.apply("optionals").toArray()
String[] incompatibles = propListGetter.apply("incompatibles").toArray()
String[] embedded = propListGetter.apply("embedded").toArray()
String branch = targets.get(targets.size() - 1) // last target is the branch
String branch = rootProject.branch.toString()
// tokens - token name and if it should return the token or "-"
String cfToken = tokenGetter.apply("curseforge", shouldPublish)
String mrToken = tokenGetter.apply("modrinth", shouldPublish)
Expand All @@ -133,7 +140,7 @@ publishMods {
displayName = v.toString()
file = remapJar.archiveFile // Forge would use jar (NeoForge? i think so..)
changelog = changelogText
type = phase
type = (phase.matches("release|stable") ? STABLE : phase.matches("beta") ? BETA : ALPHA)
modLoaders = loaders
dryRun = !shouldPublish

Expand All @@ -151,6 +158,7 @@ publishMods {
projectSlug = archives_base_name

minecraftVersions.addAll(targets)
clientRequired = true

requires(required)
optional(optionals)
Expand Down
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## Chat Patches `204.6.10` for Minecraft 1.20.4 on Fabric, Quilt
- Synced `213.6.0` to 1.20.4

## Chat Patches `204.6.5` for Minecraft 1.20.4 on Fabric, Quilt
- Fixed certain messages from showing up blank and logging `ArrayIndexOutOfBoundsException`s ([#156](https://www.github.com/mrbuilder1961/ChatPatches/issues/146))
- Fixed normal duplicate messages not having a counter (1.20.4 only, [#157](https://www.github.com/mrbuilder1961/ChatPatches/issues/157))
Expand Down Expand Up @@ -248,4 +251,4 @@ This update officially fixes [#4](https://www.github.com/mrbuilder1961/ChatPatch
## (TEMPLATE) Chat Patches `{version}` for Minecraft {targets} on {loaders}
- Changes go here

Typically as a list but not required!
Typically as a list but not required!
13 changes: 8 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@ org.gradle.parallel=true
# Mod properties
archives_base_name=chatpatches
group=obro1961.chatpatches
version=204.6.5
version=204.6.10
cfId=560042
mrId=MOqt4Z5n

# Required dependencies - https://fabricmc.net/develop
minecraft=1.20.4
yarn=+build.3
loader=0.15.11
api=0.97.0+1.20.4
loader=0.16.9
api=0.97.2+1.20.4

# Dependencies - modmenu: https://modrinth.com/mod/modmenu/versions?l=fabric and yacl: https://modrinth.com/mod/yacl/versions?l=fabric
modmenu=9.0.0
yacl=3.4.2+1.20.4
yacl=3.5.0+1.20.4

# Publishing metadata - phase can be ALPHA, BETA, or STABLE
# Publishing metadata
# /- Typically the latest version, but can be 1.18.x for example
branch=1.20.4
targets=1.20.4
loaders=Fabric,Quilt
# /- ALPHA, BETA, or STABLE
phase=STABLE
# relations
required=fabric-api,yacl
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,7 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +148,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +205,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Loading

0 comments on commit 7934efe

Please sign in to comment.