File tree 9 files changed +35
-30
lines changed
java/xyz/tuxinal/girlbossed/utils
9 files changed +35
-30
lines changed Original file line number Diff line number Diff line change 12
12
matrix :
13
13
# Use these Java versions
14
14
java : [
15
- 16 # Minimum supported by Minecraft
15
+ 17
16
16
]
17
17
# and run on both Linux and Windows
18
18
os : [ubuntu-20.04, windows-latest]
Original file line number Diff line number Diff line change 1
1
plugins {
2
- id ' fabric-loom' version ' 0.9 -SNAPSHOT'
2
+ id ' fabric-loom' version ' 0.10 -SNAPSHOT'
3
3
id ' maven-publish'
4
+ id " io.github.juuxel.loom-quiltflower-mini" version " 1.1.0"
4
5
}
5
6
6
- sourceCompatibility = JavaVersion . VERSION_16
7
- targetCompatibility = JavaVersion . VERSION_16
7
+ sourceCompatibility = JavaVersion . VERSION_17
8
+ targetCompatibility = JavaVersion . VERSION_17
8
9
9
10
archivesBaseName = project. archives_base_name
10
11
version = project. mod_version
@@ -46,8 +47,7 @@ tasks.withType(JavaCompile).configureEach {
46
47
// If Javadoc is generated, this must be specified in that task too.
47
48
it. options. encoding = " UTF-8"
48
49
49
- // Minecraft 1.17 (21w19a) upwards uses Java 16.
50
- it. options. release = 16
50
+ it. options. release = 17
51
51
}
52
52
java {
53
53
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
@@ -64,17 +64,15 @@ jar {
64
64
}
65
65
}
66
66
67
+ quiltflower {
68
+ addToRuntimeClasspath. set(true )
69
+ }
70
+
67
71
// configure the maven publication
68
72
publishing {
69
73
publications {
70
74
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
78
76
}
79
77
}
80
78
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G
3
3
4
4
# Fabric Properties
5
5
# 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
9
9
10
10
# Mod Properties
11
11
mod_version = 1.1.0
12
12
maven_group = xyz.tuxinal
13
13
archives_base_name = girlbossed
14
14
15
15
# Dependencies
16
- fabric_version =0.39.2 +1.17
16
+ fabric_version =0.43.1 +1.18
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
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
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ pluginManagement {
4
4
name = ' Fabric'
5
5
url = ' https://maven.fabricmc.net/'
6
6
}
7
+
8
+ maven {
9
+ name = " Cotton"
10
+ url = uri(" https://server.bbkr.space/artifactory/libs-release/" )
11
+ }
12
+
7
13
gradlePluginPortal()
8
14
}
9
15
}
Original file line number Diff line number Diff line change 10
10
import net .minecraft .text .Text ;
11
11
12
12
public class DeathMessageHandler {
13
- private static HashMap <String , String > entityDeathConfig = ConfigParser .getEntityDeathConfig ();
14
- private static HashMap <String , String > otherDeathConfig = ConfigParser .getOtherDeathConfig ();
15
-
16
13
public static Text getDeathMessage (DamageTracker damageTracker ) {
14
+ HashMap <String , String > otherDeathConfig = ConfigParser .getOtherDeathConfig ();
15
+ HashMap <String , String > entityDeathConfig = ConfigParser .getEntityDeathConfig ();
17
16
DamageSource damageSource = damageTracker .getMostRecentDamage ().getDamageSource ();
18
17
ServerPlayerEntity player = (ServerPlayerEntity ) damageTracker .getEntity ();
19
18
if (damageSource instanceof EntityDamageSource ) {
Original file line number Diff line number Diff line change 1
1
package xyz .tuxinal .girlbossed .utils ;
2
2
3
+ import com .google .common .collect .ImmutableList ;
4
+ import com .google .common .collect .ImmutableList .Builder ;
5
+
3
6
import net .minecraft .text .StringVisitable ;
4
7
import net .minecraft .text .TranslatableText ;
5
8
import net .minecraft .text .TranslationException ;
@@ -16,14 +19,13 @@ public ReplacableText(String string) {
16
19
17
20
@ Override
18
21
protected void updateTranslations () {
19
- this .translations . clear ();
22
+ String string = this .getKey ();
20
23
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 ( );
24
27
} catch (TranslationException var4 ) {
25
- this .translations .clear ();
26
- this .translations .add (StringVisitable .plain (this .getKey ()));
28
+ this .translations = ImmutableList .of (StringVisitable .plain (string ));
27
29
}
28
30
}
29
31
}
Original file line number Diff line number Diff line change 22
22
"depends" : {
23
23
"fabricloader" : " >=0.11.3" ,
24
24
"fabric" : " *" ,
25
- "minecraft" : " 1.17 .x" ,
26
- "java" : " >=16 "
25
+ "minecraft" : " 1.18 .x" ,
26
+ "java" : " >=17 "
27
27
}
28
28
}
Original file line number Diff line number Diff line change 1
1
accessWidener v1 named
2
2
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
4
4
accessible field net/minecraft/text/TranslatableText translations Ljava/util/List;
You can’t perform that action at this time.
0 commit comments