Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
1.18 migration
Browse files Browse the repository at this point in the history
- Updated mappings
- Added quiltflower gradle plugin
  • Loading branch information
Giggitybyte committed Dec 12, 2021
1 parent 49fda82 commit 5d95f9f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
23 changes: 10 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.10.25'
id 'io.github.juuxel.loom-quiltflower' version '1.5.0'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

repositories {
// ...
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
Expand All @@ -28,15 +25,15 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
it.options.release = 17
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
java {
withSourcesJar()
}

jar {
from "LICENSE"
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx1G

minecraft_version=1.17.1
yarn_mappings=1.17.1+build.61
loader_version=0.11.7
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.1
loader_version=0.12.11

mod_version=1.2.0
maven_group=me.thegiggitybyte
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 7 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
pluginManagement {
repositories {
jcenter()
gradlePluginPortal()

maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()

maven {
name = 'Cotton'
url = 'https://server.bbkr.space/artifactory/libs-release/'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
@Mixin(PlayerManager.class)
public class PlayerManagerMixin {

@Inject(method = "broadcast", at = @At("HEAD"))
@Inject(method = "broadcast(Lnet/minecraft/text/Text;Ljava/util/function/Function;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V", at = @At("HEAD"))
public void cacheMessage(Text content, Function<ServerPlayerEntity, Text> messageFactory, MessageType type, UUID sender, CallbackInfo ci) {
ChatHistory.MESSAGE_CACHE.add(new ChatMessage(content, type, sender));
}

@Inject(method = "broadcastChatMessage", at = @At("HEAD"))
@Inject(method = "broadcast(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V", at = @At("HEAD"))
public void cacheMessage(Text content, MessageType type, UUID sender, CallbackInfo ci) {
ChatHistory.MESSAGE_CACHE.add(new ChatMessage(content, type, sender));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
],
"depends": {
"fabricloader": ">=0.9.3+build.207",
"minecraft": "1.17.x"
"minecraft": "1.18.x"
}
}

0 comments on commit 5d95f9f

Please sign in to comment.