Skip to content

Commit

Permalink
Update for minecraft 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
AlurienFlame committed Mar 22, 2022
1 parent 0951734 commit 903ed04
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ bin/
# fabric

run/
remappedSrc/
50 changes: 18 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'maven-publish'
}

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
Expand All @@ -19,13 +19,9 @@ repositories {
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
// maven {
// name = "ModMenu"
// url = "https://maven.terraformersmc.com/releases/"
// }
// maven { url "https://maven.shedaniel.me/" }

maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.shedaniel.me/" } // Cloth Config
maven {
name = "ModMenu"
url = "https://maven.terraformersmc.com/releases/"
Expand All @@ -42,13 +38,12 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// Cloth Config
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
}

// Modmenu
// modCompile ("io.github.prospector:modmenu:${project.mod_menu_version}") {
modCompileOnly modRuntime("com.terraformersmc:modmenu:${project.mod_menu_version}"),{
modApi("com.terraformersmc:modmenu:${project.mod_menu_version}"),{
exclude(group: "net.fabricmc.fabric-api")
}

Expand All @@ -65,11 +60,8 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

java {
Expand All @@ -89,21 +81,15 @@ jar {
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}
// 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.
}

// 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.
}
}
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.61
loader_version=0.11.7
# check these on https://fabricmc.net/develop
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3

# Mod Properties
mod_version = 1.1.1
mod_version = 1.1.2
maven_group = net.chatsounds
archives_base_name = chatsounds

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.40.0+1.17
fabric_version=0.48.0+1.18.2

mod_menu_version=2.0.5
cloth_config_version=5.0.38
mod_menu_version=3.1.0
cloth_config_version=6.2.57

5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Tue Mar 22 12:53:43 PDT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion src/main/resources/chatsounds.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "net.chatsounds.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"client": [
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "chatsounds",
"version": "1.1.1",
"version": "1.1.2",

"name": "Chat Sounds",
"description": "Plays a sound whenever a chat message is received.",
Expand All @@ -28,14 +28,14 @@
},
"mixins": [
"chatsounds.mixins.json"

],
"depends": {
"fabricloader": ">=0.8.2",
"fabric": ">=0.36",
"minecraft": "1.17.1",
"modmenu": ">=2.0.0",
"cloth-config2": ">=5.0.0"
"fabricloader": ">=0.13.3",
"fabric": "*",
"minecraft": "1.18.x",
"java": ">=17",
"modmenu": ">=3.1.0",
"cloth-config2": ">=6.2.57"
},
"conflicts": {
"replaymod": "*"
Expand Down

0 comments on commit 903ed04

Please sign in to comment.