Skip to content

Commit 9cc6322

Browse files
committed
update to 1.18
1 parent 542e36a commit 9cc6322

File tree

9 files changed

+35
-30
lines changed

9 files changed

+35
-30
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
# Use these Java versions
1414
java: [
15-
16 # Minimum supported by Minecraft
15+
17
1616
]
1717
# and run on both Linux and Windows
1818
os: [ubuntu-20.04, windows-latest]

build.gradle

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
plugins {
2-
id 'fabric-loom' version '0.9-SNAPSHOT'
2+
id 'fabric-loom' version '0.10-SNAPSHOT'
33
id 'maven-publish'
4+
id "io.github.juuxel.loom-quiltflower-mini" version "1.1.0"
45
}
56

6-
sourceCompatibility = JavaVersion.VERSION_16
7-
targetCompatibility = JavaVersion.VERSION_16
7+
sourceCompatibility = JavaVersion.VERSION_17
8+
targetCompatibility = JavaVersion.VERSION_17
89

910
archivesBaseName = project.archives_base_name
1011
version = project.mod_version
@@ -46,8 +47,7 @@ tasks.withType(JavaCompile).configureEach {
4647
// If Javadoc is generated, this must be specified in that task too.
4748
it.options.encoding = "UTF-8"
4849

49-
// Minecraft 1.17 (21w19a) upwards uses Java 16.
50-
it.options.release = 16
50+
it.options.release = 17
5151
}
5252
java {
5353
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
@@ -64,17 +64,15 @@ jar {
6464
}
6565
}
6666

67+
quiltflower {
68+
addToRuntimeClasspath.set(true)
69+
}
70+
6771
// configure the maven publication
6872
publishing {
6973
publications {
7074
mavenJava(MavenPublication) {
71-
// add all the jars that should be included when publishing to maven
72-
artifact(remapJar) {
73-
builtBy remapJar
74-
}
75-
artifact(sourcesJar) {
76-
builtBy remapSourcesJar
77-
}
75+
from components.java
7876
}
7977
}
8078

gradle.properties

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/versions.html
6-
minecraft_version=1.17.1
7-
yarn_mappings=1.17.1+build.39
8-
loader_version=0.11.6
6+
minecraft_version=1.18
7+
yarn_mappings=1.18+build.1
8+
loader_version=0.12.8
99

1010
# Mod Properties
1111
mod_version = 1.1.0
1212
maven_group = xyz.tuxinal
1313
archives_base_name = girlbossed
1414

1515
# Dependencies
16-
fabric_version=0.39.2+1.17
16+
fabric_version=0.43.1+1.18
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

settings.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ pluginManagement {
44
name = 'Fabric'
55
url = 'https://maven.fabricmc.net/'
66
}
7+
8+
maven {
9+
name = "Cotton"
10+
url = uri("https://server.bbkr.space/artifactory/libs-release/")
11+
}
12+
713
gradlePluginPortal()
814
}
915
}

src/main/java/xyz/tuxinal/girlbossed/utils/DeathMessageHandler.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
import net.minecraft.text.Text;
1111

1212
public class DeathMessageHandler {
13-
private static HashMap<String, String> entityDeathConfig = ConfigParser.getEntityDeathConfig();
14-
private static HashMap<String, String> otherDeathConfig = ConfigParser.getOtherDeathConfig();
15-
1613
public static Text getDeathMessage(DamageTracker damageTracker) {
14+
HashMap<String, String> otherDeathConfig = ConfigParser.getOtherDeathConfig();
15+
HashMap<String, String> entityDeathConfig = ConfigParser.getEntityDeathConfig();
1716
DamageSource damageSource = damageTracker.getMostRecentDamage().getDamageSource();
1817
ServerPlayerEntity player = (ServerPlayerEntity) damageTracker.getEntity();
1918
if (damageSource instanceof EntityDamageSource) {

src/main/java/xyz/tuxinal/girlbossed/utils/ReplacableText.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package xyz.tuxinal.girlbossed.utils;
22

3+
import com.google.common.collect.ImmutableList;
4+
import com.google.common.collect.ImmutableList.Builder;
5+
36
import net.minecraft.text.StringVisitable;
47
import net.minecraft.text.TranslatableText;
58
import net.minecraft.text.TranslationException;
@@ -16,14 +19,13 @@ public ReplacableText(String string) {
1619

1720
@Override
1821
protected void updateTranslations() {
19-
this.translations.clear();
22+
String string = this.getKey();
2023
try {
21-
// we are using the key as our string
22-
// so getKey doesn't make much sense
23-
this.setTranslation(this.getKey());
24+
Builder<StringVisitable> builder = ImmutableList.builder();
25+
this.forEachPart(string, builder::add);
26+
this.translations = builder.build();
2427
} catch (TranslationException var4) {
25-
this.translations.clear();
26-
this.translations.add(StringVisitable.plain(this.getKey()));
28+
this.translations = ImmutableList.of(StringVisitable.plain(string));
2729
}
2830
}
2931
}

src/main/resources/fabric.mod.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"depends": {
2323
"fabricloader": ">=0.11.3",
2424
"fabric": "*",
25-
"minecraft": "1.17.x",
26-
"java": ">=16"
25+
"minecraft": "1.18.x",
26+
"java": ">=17"
2727
}
2828
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
accessWidener v1 named
22
extendable method net/minecraft/text/TranslatableText updateTranslations ()V
3-
extendable method net/minecraft/text/TranslatableText setTranslation (Ljava/lang/String;)V
3+
accessible method net/minecraft/text/TranslatableText forEachPart (Ljava/lang/String;Ljava/util/function/Consumer;)V
44
accessible field net/minecraft/text/TranslatableText translations Ljava/util/List;

0 commit comments

Comments
 (0)