Skip to content

Commit 1890c23

Browse files
committed
Bump ornithe version
1 parent 94341af commit 1890c23

File tree

7 files changed

+106
-69
lines changed

7 files changed

+106
-69
lines changed

build.gradle

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,81 @@
11
plugins {
22
id 'maven-publish'
3-
id 'ornithe-loom' version "1.0+"
3+
alias libs.plugins.quilt.loom
4+
alias libs.plugins.ploceus
45
}
56

6-
sourceCompatibility = JavaVersion.VERSION_1_8
7-
targetCompatibility = JavaVersion.VERSION_1_8
8-
97
archivesBaseName = project.archives_base_name
10-
version = project.mod_version
8+
version = "${project.version}+${libs.versions.minecraft.get()}"
119
group = project.maven_group
1210

1311
repositories {
12+
// Add repositories to retrieve artifacts from in here.
13+
// You should only use this when depending on other mods because
14+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
15+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
16+
// for more information about repositories.
1417
}
1518

19+
// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
20+
// See https://docs.gradle.org/current/userguide/platforms.html for information on how version catalogs work.
1621
dependencies {
17-
minecraft "com.mojang:minecraft:${project.minecraft_version}"
18-
mappings "net.ornithemc:feather:${project.feather_mappings}:v2"
19-
modImplementation "net.ornithemc:ornithe-loader:${project.loader_version}"
20-
21-
implementation 'org.lwjgl.lwjgl:lwjgl_util:2.9.0'
22-
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.0'
23-
}
24-
25-
configurations.all {
26-
resolutionStrategy {
27-
dependencySubstitution {
28-
substitute module('org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20131017') with module('org.lwjgl.lwjgl:lwjgl_util:2.9.0')
29-
substitute module('org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20131017') with module('org.lwjgl.lwjgl:lwjgl:2.9.0')
30-
}
22+
minecraft libs.minecraft
23+
mappings loom.layered {
24+
mappings variantOf(libs.feather.mappings) { classifier 'v2' }
25+
ploceus.nestedMappings(it) // remove this line if not using nests
3126
}
27+
nests libs.nests // remove this line if not using nests
28+
29+
modImplementation libs.quilt.loader
3230
}
3331

3432
processResources {
35-
inputs.property "version", project.version
33+
inputs.property 'version', version
3634

37-
filesMatching("ornithe.mod.json") {
38-
expand "version": project.version
35+
filesMatching('quilt.mod.json') {
36+
expand "version": version
3937
}
4038
}
4139

42-
// ensure that the encoding is set to UTF-8, no matter what the system default is
43-
// this fixes some edge cases with special characters not displaying correctly
44-
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
4540
tasks.withType(JavaCompile).configureEach {
46-
it.options.encoding = "UTF-8"
47-
if (JavaVersion.current().isJava9Compatible()) it.options.release = 8
41+
it.options.encoding = 'UTF-8'
42+
it.options.release = 8
4843
}
4944

5045
java {
51-
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
52-
// if it is present.
46+
// Still required by IDEs such as Eclipse and Visual Studio Code
47+
sourceCompatibility = JavaVersion.VERSION_1_8
48+
targetCompatibility = JavaVersion.VERSION_1_8
49+
50+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task if it is present.
5351
// If you remove this line, sources will not be generated.
5452
withSourcesJar()
53+
54+
// If this mod is going to be a library, then it should also generate Javadocs in order to aid with development.
55+
// Uncomment this line to generate them.
56+
// withJavadocJar()
5557
}
5658

59+
// If you plan to use a different file for the license, don't forget to change the file name here!
5760
jar {
58-
from("LICENSE") {
59-
rename { "${it}_${project.archivesBaseName}" }
61+
from('LICENSE') {
62+
rename { "${it}_${archivesBaseName}" }
6063
}
6164
}
6265

63-
// configure the maven publication
66+
// Configure the maven publication
6467
publishing {
6568
publications {
6669
mavenJava(MavenPublication) {
6770
from components.java
6871
}
6972
}
7073

71-
// select the repositories you want to publish to
74+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
7275
repositories {
73-
// uncomment to publish to the local maven
74-
// mavenLocal()
76+
// Add repositories to publish to here.
77+
// Notice: This block does NOT have the same function as the block in the top level.
78+
// The repositories here will be used for publishing your artifact, not for
79+
// retrieving dependencies.
7580
}
7681
}

gradle.properties

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
# Done to increase the memory available to gradle.
2-
org.gradle.jvmargs=-Xmx2G
3-
4-
# Ornithe Properties
5-
minecraft_version = 1.7.2
6-
# check for the latest mappings here https://maven.ornithemc.net/releases/net/ornithemc/feather/maven-metadata.xml
7-
feather_mappings = 1.7.2+build.1
8-
loader_version = 0.1.2
1+
# Gradle Properties
2+
org.gradle.jvmargs = -Xmx1G
3+
org.gradle.parallel = true
94

105
# Mod Properties
11-
mod_version = 0.0.0
12-
maven_group = org.example
13-
archives_base_name = example-mod
6+
version = 1.0.0
7+
maven_group = net.nullapce_mc
8+
archives_base_name = skinpatch
9+
10+
# Dependencies are managed at gradle/libs.versions.toml

gradle/libs.versions.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[versions]
2+
# The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html
3+
minecraft = "1.7.2"
4+
quilt_loader = "0.18.10"
5+
feather_mappings = "1.7.2+build.6"
6+
nests = "1.7.2+build.1"
7+
8+
[libraries]
9+
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
10+
quilt_loader = { module = "org.quiltmc:quilt-loader", version.ref = "quilt_loader" }
11+
feather_mappings = { module = "net.ornithemc:feather", version.ref = "feather_mappings" }
12+
nests = { module = "net.ornithemc:nests", version.ref = "nests" }
13+
14+
[plugins]
15+
quilt_loom = { id = "org.quiltmc.loom", version = "1.2.+" }
16+
ploceus = { id = "ploceus", version = "1.2.+" }

settings.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
pluginManagement {
22
repositories {
3+
maven {
4+
name = 'Quilt'
5+
url = 'https://maven.quiltmc.org/repository/release'
6+
}
37
maven {
48
name = 'Ornithe'
59
url = 'https://maven.ornithemc.net/releases'
610
}
11+
// Currently needed for Intermediary and other temporary dependencies
712
maven {
813
name = 'Fabric'
914
url = 'https://maven.fabricmc.net/'
1015
}
1116
gradlePluginPortal()
1217
}
1318
}
14-
15-
rootProject.name = "example-mod"

src/main/java/net/nullspace_mc/skinpatch/mixin/ClientPlayerEntityMixin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.google.gson.JsonArray;
44
import com.google.gson.JsonObject;
55
import com.google.gson.JsonParser;
6-
import net.minecraft.client.MinecraftClient;
6+
import net.minecraft.client.Minecraft;
77
import net.minecraft.client.entity.living.player.ClientPlayerEntity;
88
import net.nullspace_mc.skinpatch.SkinPatch;
99
import net.nullspace_mc.skinpatch.exceptions.TextureNotFoundException;
@@ -36,7 +36,7 @@ private static String getPlayerApiUuid(String playerName) {
3636
try {
3737
connection = (HttpURLConnection) new URL(
3838
mojangEndpointUsernameToUUID + playerName
39-
).openConnection(MinecraftClient.getInstance().getNetworkProxy());
39+
).openConnection(Minecraft.getInstance().getNetworkProxy());
4040
connection.setDoInput(true);
4141
connection.setDoOutput(false);
4242
connection.connect();
@@ -69,7 +69,7 @@ private static JsonObject getProfileTextures(String playerName) throws UnknownPl
6969
try {
7070
connection = (HttpURLConnection) new URL(
7171
mojangEndpointUUIDToSkinCape + uuid
72-
).openConnection(MinecraftClient.getInstance().getNetworkProxy());
72+
).openConnection(Minecraft.getInstance().getNetworkProxy());
7373
connection.setDoInput(true);
7474
connection.setDoOutput(false);
7575
connection.connect();

src/main/resources/ornithe.mod.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/main/resources/quilt.mod.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"schema_version": 1,
3+
"quilt_loader": {
4+
"group": "net.nullspace_mc",
5+
"id": "skinpatch",
6+
"version": "${version}",
7+
"metadata": {
8+
"name": "SkinPatch",
9+
"description": "Mod meant to fix player's skins not showing up in version 1.7",
10+
"contributors": {
11+
"SRAZKVT": "Owner"
12+
},
13+
"contact": {
14+
"homepage": " https://modrinth.com/mod/skinpatch-ornithe",
15+
"issues": "https://github.com/Nullspace-MC/SkinPatch/issues",
16+
"sources": "https://github.com/Nullspace-MC/SkinPatch"
17+
},
18+
"icon": "assets/example_mod/icon.png"
19+
},
20+
"intermediate_mappings": "net.fabricmc:intermediary",
21+
"depends": [
22+
{
23+
"id": "quilt_loader",
24+
"versions": ">=0.18.3-"
25+
},
26+
{
27+
"id": "minecraft",
28+
"versions": "1.7.x"
29+
}
30+
]
31+
},
32+
"mixin": "skinfix.mixins.json"
33+
}
34+

0 commit comments

Comments
 (0)