feat: 1.20 port

This commit is contained in:
2025-09-01 01:43:22 +08:00
commit 62eee93fea
27 changed files with 1137 additions and 0 deletions

50
fabric/build.gradle Normal file
View File

@@ -0,0 +1,50 @@
plugins {
id 'com.github.johnrengelman.shadow'
}
architectury {
platformSetupLoomIde()
fabric()
}
configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
// Files in this configuration will be bundled into your mod using the Shadow plugin.
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
dependencies {
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':common', configuration: 'transformProductionFabric')
}
processResources {
inputs.property 'version', project.version
filesMatching('fabric.mod.json') {
expand version: project.version
}
}
shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}
remapJar {
input.set shadowJar.archiveFile
}

View File

@@ -0,0 +1,16 @@
package net.magicterra.skinfix.fabric;
import net.magicterra.skinfix.SkinFixMod;
import net.fabricmc.api.ModInitializer;
public final class SkinFixModFabric implements ModInitializer {
@Override
public void onInitialize() {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
// Run our common setup.
SkinFixMod.init();
}
}

View File

@@ -0,0 +1,10 @@
package net.magicterra.skinfix.fabric.client;
import net.fabricmc.api.ClientModInitializer;
public final class SkinFixModFabricClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
// This entrypoint is suitable for setting up client-specific logic, such as rendering.
}
}

View File

@@ -0,0 +1,35 @@
{
"schemaVersion": 1,
"id": "skinfix",
"version": "${version}",
"name": "SkinFix",
"description": "Fix Minecraft does not load skin png not prefix with minecraft.net",
"authors": [
"Gardel"
],
"contact": {
"homepage": "magicterra.net"
},
"license": "MIT",
"icon": "assets/skinfix/icon.png",
"environment": "*",
"entrypoints": {
"main": [
"net.magicterra.skinfix.fabric.SkinFixModFabric"
],
"client": [
"net.magicterra.skinfix.fabric.client.SkinFixModFabricClient"
]
},
"mixins": [
"skinfix.mixins.json"
],
"depends": {
"fabricloader": ">=0.17.2",
"minecraft": "~1.20.1",
"java": ">=17"
},
"suggests": {
"another-mod": "*"
}
}