mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
Compare commits
32 Commits
v2.0.1+1.2
...
v2.0.2+1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
cfdfee11b3
|
|||
|
5c31b5f881
|
|||
|
b72d0c1e85
|
|||
|
067cd5c731
|
|||
|
1eed415053
|
|||
|
42cef73318
|
|||
|
266d56ed93
|
|||
|
423ee4e694
|
|||
|
7cf5b8e1d6
|
|||
|
e9bdfaefca
|
|||
|
e1773d4d79
|
|||
|
84da16fae6
|
|||
|
ac9189ecdc
|
|||
|
7131cb76d0
|
|||
|
4943c7d8f6
|
|||
|
82baf0b63e
|
|||
|
c755417ebf
|
|||
|
6cf7d0c465
|
|||
|
20feec931f
|
|||
|
73ffc37f2d
|
|||
|
726f4ed7a8
|
|||
|
fbbc37e4b1
|
|||
|
19114de347
|
|||
|
455d0deddc
|
|||
|
0eaaf6a950
|
|||
|
7c8aba6f71
|
|||
|
99675bb5ee
|
|||
|
6ad656c388
|
|||
|
fece751f0f
|
|||
|
ab75eddc90
|
|||
|
f9aa3f664a
|
|||
|
9edbb21128
|
56
.github/workflows/build.yml
vendored
56
.github/workflows/build.yml
vendored
@@ -1,31 +1,41 @@
|
||||
name: build
|
||||
on: [ pull_request, push ]
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '*.md'
|
||||
tags-ignore:
|
||||
- '*'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '*.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
cache-read-only: false
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
cache-read-only: false
|
||||
- name: Change wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Change wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
- name: Run build with Gradle Wrapper
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Run build with Gradle Wrapper
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Upload built JAR
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: skin-restorer-artifacts
|
||||
path: build/libs/merged
|
||||
- name: Upload built JARs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: skin-restorer-artifacts
|
||||
path: ./*/build/libs/*.jar
|
||||
|
||||
39
.github/workflows/release.yml
vendored
Normal file
39
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
environment: release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
cache-read-only: false
|
||||
|
||||
- name: Change wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Publish to CurseForge, Modrinth
|
||||
run: ./gradlew build publishMods
|
||||
env:
|
||||
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
|
||||
- name: Upload built JARs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: skin-restorer-artifacts
|
||||
path: ./*/build/libs/*.jar
|
||||
70
CHANGELOG.md
Normal file
70
CHANGELOG.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.0.2] - 2024-08-04
|
||||
### Added
|
||||
- Backported to minecraft 1.20-1.20.2
|
||||
- [Forge] Added support for Forge
|
||||
### Changed
|
||||
- Changed minimum java version to 17 for minecraft 1.20-1.20.4
|
||||
|
||||
## [2.0.1] - 2024-07-16
|
||||
### Added
|
||||
- Added Traditional Chinese translation ([#24](https://github.com/Suiranoil/SkinRestorer/pull/24)) - *yichifauzi*, *notlin4*
|
||||
### Fixed
|
||||
- Fixed concurrent modification exception
|
||||
|
||||
## [2.0.0] - 2024-07-03
|
||||
### Added
|
||||
- Added support for NeoForge
|
||||
- Added support for singleplayer
|
||||
- Added ely.by skin provider
|
||||
- Added `/skin refresh` command to get up-to-date skin
|
||||
- Added `/skin reset` command to remove skin data
|
||||
- Added proper support for secure servers
|
||||
- Added support for permissions api
|
||||
- Added translations
|
||||
### Changed
|
||||
- Changed to save skin data per world
|
||||
### Fixed
|
||||
- Fixed entity flickering on skin reload
|
||||
- Fixed player being left in invalid state on skin reload if on death screen
|
||||
|
||||
## [1.2.6] - 2024-06-25
|
||||
### Added
|
||||
- Added support for command blocks
|
||||
### Changed
|
||||
- Changed to better skin refresh logic
|
||||
### Fixed
|
||||
- Fixed no permission level for /skin clear targets
|
||||
- Fixed loading world screen on skin change
|
||||
|
||||
## [1.2.4] - 2023-09-30
|
||||
### Fixed
|
||||
- Fixed player stops riding entity with skin change
|
||||
- Fixed armor and hand items not displaying with skin change
|
||||
|
||||
## [1.2.3] - 2023-06-10
|
||||
### Changed
|
||||
- Updated to 1.20-1.20.1
|
||||
|
||||
## [1.2.2] - 2022-12-21
|
||||
### Changed
|
||||
- Updated to 1.19.3
|
||||
|
||||
## [1.2.1] - 2022-11-24
|
||||
### Fixed
|
||||
- Fixed incorrect filepath resolvement on linux systems
|
||||
|
||||
## [1.2.0] - 2022-11-18
|
||||
### Added
|
||||
- Added support for fake players ([#4](https://github.com/Suiranoil/SkinRestorer/pull/4)) - *CaveNightingale*
|
||||
### Changed
|
||||
- Allow player to apply their skin changes immediately ([#4](https://github.com/Suiranoil/SkinRestorer/pull/4)) - _CaveNightingale_
|
||||
|
||||
## [1.0.4] - 2021-08-28
|
||||
### Fixed
|
||||
- Fixed "invalid player data" exception
|
||||
5
CHANGELOG_LATEST.md
Normal file
5
CHANGELOG_LATEST.md
Normal file
@@ -0,0 +1,5 @@
|
||||
### Added
|
||||
- Backported to minecraft 1.20-1.20.2
|
||||
- [Forge] Added support for Forge
|
||||
### Changed
|
||||
- Changed minimum java version to 17 for minecraft 1.20-1.20.4
|
||||
158
build.gradle
158
build.gradle
@@ -1,149 +1,13 @@
|
||||
plugins {
|
||||
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "com.github.johnrengelman.shadow" version "8.1.1" apply false
|
||||
id "io.github.pacifistmc.forgix" version "1.2.9"
|
||||
id "me.shedaniel.unified-publishing" version "0.1.+"
|
||||
}
|
||||
|
||||
version = "${project.mod_version}+${project.minecraft_version}"
|
||||
ext.version_name = "${project.capitalized_name} ${project.mod_version}"
|
||||
ext.headTag = "git describe --tags --abbrev=0 HEAD".execute([], rootProject.projectDir).text.trim()
|
||||
ext.previousTag = "git describe --tags --abbrev=0 HEAD^".execute([], rootProject.projectDir).text.trim()
|
||||
|
||||
architectury {
|
||||
minecraft = project.minecraft_version
|
||||
}
|
||||
|
||||
forgix {
|
||||
group = "$project.maven_group.$project.mod_id"
|
||||
// forgix does not append .jar extension for some reason
|
||||
mergedJarName = "${project.archives_name}-${project.version}.jar"
|
||||
outputDir = "build/libs/merged"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply plugin: "java"
|
||||
|
||||
version = rootProject.version
|
||||
group = project.maven_group
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: "dev.architectury.loom"
|
||||
apply plugin: "architectury-plugin"
|
||||
|
||||
loom {
|
||||
silentMojangMappingsLicense()
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "$rootProject.archives_name-$project.name"
|
||||
}
|
||||
|
||||
build.finalizedBy(mergeJars)
|
||||
assemble.finalizedBy(mergeJars)
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "ParchmentMC"
|
||||
url = "https://maven.parchmentmc.org"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
|
||||
mappings loom.layered {
|
||||
officialMojangMappings()
|
||||
parchment("org.parchmentmc.data:parchment-$rootProject.parchment_minecraft_version:$rootProject.parchment_mappings@zip")
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
jar {
|
||||
from "$rootProject.projectDir/LICENSE"
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
|
||||
it.options.release.set(21)
|
||||
}
|
||||
}
|
||||
|
||||
// Adapted from https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.7/ferry.gradle
|
||||
tasks.register("generateChangelog") {
|
||||
ext.changelog = ""
|
||||
|
||||
def lastTag = previousTag
|
||||
def currentTag = headTag
|
||||
|
||||
def changes = new StringBuilder()
|
||||
def commits = "git log --max-count=${project.changelog_max_commit_search} --pretty=format:\"%b\" $lastTag..$currentTag".execute()
|
||||
commits.in.eachLine { line -> // Loops over the lines the git log command returns
|
||||
def processedLine = line.toString()
|
||||
if (processedLine.startsWith("\"")) {
|
||||
processedLine = processedLine.substring(1)
|
||||
}
|
||||
if (processedLine.endsWith("\"")) {
|
||||
processedLine = processedLine.substring(0, processedLine.length() - 1)
|
||||
}
|
||||
if (processedLine.startsWith("- ")) {
|
||||
if (changes.length() == 0) {
|
||||
changes << processedLine
|
||||
} else {
|
||||
changes << "\n$processedLine"
|
||||
}
|
||||
}
|
||||
}
|
||||
commits.err.eachLine { line -> println line }
|
||||
commits.waitFor()
|
||||
|
||||
ext.changelog = changes.toString()
|
||||
if (ext.changelog.isEmpty()) {
|
||||
ext.changelog = "No Changelog Available"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("assertNewVersion") {
|
||||
if (headTag == previousTag) {
|
||||
throw new GradleException("Current version $headTag is the same as previous. Please create a new version tag if you want to proceed.")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.publishUnified.dependsOn("assertNewVersion", "build")
|
||||
|
||||
unifiedPublishing {
|
||||
project {
|
||||
displayName = version_name.toString()
|
||||
version = project.version
|
||||
changelog = generateChangelog.changelog
|
||||
releaseType = "release"
|
||||
gameVersions = List.of(project.game_versions.split(","))
|
||||
gameLoaders = List.of(project.mod_loaders.split(","))
|
||||
|
||||
mainPublication.set(file("build/libs/merged/${project.archives_name}-${project.version}.jar"))
|
||||
|
||||
var cfToken = System.getenv("CF_TOKEN")
|
||||
if (cfToken != null) {
|
||||
curseforge {
|
||||
token = cfToken
|
||||
id = project.curseforge_id
|
||||
}
|
||||
}
|
||||
|
||||
var mrToken = System.getenv("MODRINTH_TOKEN")
|
||||
if (mrToken != null) {
|
||||
modrinth {
|
||||
token = mrToken
|
||||
id = project.modrinth_id
|
||||
}
|
||||
}
|
||||
}
|
||||
// see https://fabricmc.net/develop/ for new versions
|
||||
id 'fabric-loom' version '1.7-SNAPSHOT' apply false
|
||||
// see https://projects.neoforged.net/neoforged/neogradle for new versions
|
||||
id 'net.neoforged.gradle.userdev' version '7.0.153' apply false
|
||||
// see https://files.minecraftforge.net/net/minecraftforge/gradle/ForgeGradle/ for new versions
|
||||
id 'net.minecraftforge.gradle' version '6.0.26' apply false
|
||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+' apply false
|
||||
|
||||
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply false
|
||||
|
||||
id 'me.modmuss50.mod-publish-plugin' version '0.6.3' apply false
|
||||
}
|
||||
|
||||
3
buildSrc/build.gradle
Normal file
3
buildSrc/build.gradle
Normal file
@@ -0,0 +1,3 @@
|
||||
plugins {
|
||||
id 'groovy-gradle-plugin'
|
||||
}
|
||||
107
buildSrc/src/main/groovy/multiloader-common.gradle
Normal file
107
buildSrc/src/main/groovy/multiloader-common.gradle
Normal file
@@ -0,0 +1,107 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "${mod_id}-${project.name}"
|
||||
version = "${mod_version}+${minecraft_version}"
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(java_version)
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net'
|
||||
}
|
||||
maven {
|
||||
name = 'Forge'
|
||||
url = 'https://maven.minecraftforge.net'
|
||||
}
|
||||
maven {
|
||||
name = 'NeoForge'
|
||||
url = 'https://maven.neoforged.net/releases'
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Sponge'
|
||||
url = 'https://repo.spongepowered.org/repository/maven-public'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('org.spongepowered')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Declare capabilities on the outgoing configurations.
|
||||
// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component
|
||||
['apiElements', 'runtimeElements', 'sourcesElements'].each { variant ->
|
||||
configurations."$variant".outgoing {
|
||||
capability("$group:${base.archivesName.get()}:$version")
|
||||
capability("$group:$mod_id-${project.name}:$version")
|
||||
capability("$group:$mod_id:$version")
|
||||
}
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
from(rootProject.file('LICENSE')) {
|
||||
rename { "${it}_${mod_name}" }
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
from(rootProject.file('LICENSE')) {
|
||||
rename { "${it}_${mod_name}" }
|
||||
}
|
||||
|
||||
manifest {
|
||||
attributes([
|
||||
'Specification-Title' : mod_name,
|
||||
'Specification-Vendor' : mod_author,
|
||||
'Specification-Version' : project.jar.archiveVersion,
|
||||
'Implementation-Title' : project.name,
|
||||
'Implementation-Version': project.jar.archiveVersion,
|
||||
'Implementation-Vendor' : mod_author,
|
||||
'Built-On-Minecraft' : minecraft_version
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
def expandProps = [
|
||||
'version' : version,
|
||||
'group' : project.group, //Else we target the task's group.
|
||||
'minecraft_version' : minecraft_version,
|
||||
'minecraft_version_range' : minecraft_version_range,
|
||||
'fabric_loader_version' : fabric_loader_version,
|
||||
'mod_name' : mod_name,
|
||||
'mod_author' : mod_author,
|
||||
'mod_id' : mod_id,
|
||||
'mod_homepage' : mod_homepage,
|
||||
'mod_sources' : mod_sources,
|
||||
'mod_issues' : mod_issues,
|
||||
'license' : license,
|
||||
'description' : project.description,
|
||||
'forge_version' : forge_version,
|
||||
'forge_loader_version_range' : forge_loader_version_range,
|
||||
'neoforge_version' : neoforge_version,
|
||||
'neoforge_loader_version_range': neoforge_loader_version_range,
|
||||
'credits' : credits,
|
||||
'java_version' : java_version
|
||||
]
|
||||
|
||||
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) {
|
||||
expand expandProps
|
||||
}
|
||||
inputs.properties(expandProps)
|
||||
}
|
||||
39
buildSrc/src/main/groovy/multiloader-loader.gradle
Normal file
39
buildSrc/src/main/groovy/multiloader-loader.gradle
Normal file
@@ -0,0 +1,39 @@
|
||||
plugins {
|
||||
id 'multiloader-common'
|
||||
}
|
||||
|
||||
configurations {
|
||||
commonJava{
|
||||
canBeResolved = true
|
||||
}
|
||||
commonResources{
|
||||
canBeResolved = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(':common')) {
|
||||
capabilities {
|
||||
requireCapability "$group:$mod_id"
|
||||
}
|
||||
}
|
||||
commonJava project(path: ':common', configuration: 'commonJava')
|
||||
commonResources project(path: ':common', configuration: 'commonResources')
|
||||
}
|
||||
|
||||
tasks.named('compileJava', JavaCompile) {
|
||||
dependsOn(configurations.commonJava)
|
||||
source(configurations.commonJava)
|
||||
}
|
||||
|
||||
processResources {
|
||||
dependsOn(configurations.commonResources)
|
||||
from(configurations.commonResources)
|
||||
}
|
||||
|
||||
tasks.named('sourcesJar', Jar) {
|
||||
dependsOn(configurations.commonJava)
|
||||
from(configurations.commonJava)
|
||||
dependsOn(configurations.commonResources)
|
||||
from(configurations.commonResources)
|
||||
}
|
||||
35
buildSrc/src/main/groovy/multiloader-publish.gradle
Normal file
35
buildSrc/src/main/groovy/multiloader-publish.gradle
Normal file
@@ -0,0 +1,35 @@
|
||||
plugins {
|
||||
id "me.modmuss50.mod-publish-plugin"
|
||||
}
|
||||
|
||||
publishMods {
|
||||
if (project.name == 'fabric')
|
||||
file = remapJar.archiveFile
|
||||
else
|
||||
file = jar.archiveFile
|
||||
|
||||
modLoaders.add(project.name)
|
||||
type = STABLE
|
||||
version = project.version
|
||||
displayName = "[${project.name.capitalize()}] ${mod_name} ${mod_version}"
|
||||
changelog = rootProject.file('CHANGELOG_LATEST.md').text
|
||||
|
||||
curseforge {
|
||||
projectId = curseforge_id
|
||||
|
||||
dryRun = providers.environmentVariable("CURSEFORGE_API_KEY").getOrNull() == null
|
||||
accessToken = providers.environmentVariable("CURSEFORGE_API_KEY")
|
||||
|
||||
minecraftVersions.addAll(minecraft_version_list.split(','))
|
||||
serverRequired = true
|
||||
}
|
||||
|
||||
modrinth {
|
||||
projectId = modrinth_id
|
||||
|
||||
dryRun = providers.environmentVariable("MODRINTH_TOKEN").getOrNull() == null
|
||||
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
|
||||
|
||||
minecraftVersions.addAll(minecraft_version_list.split(','))
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,41 @@
|
||||
architectury {
|
||||
common rootProject.enabled_platforms.split(",")
|
||||
plugins {
|
||||
id 'multiloader-common'
|
||||
|
||||
id 'fabric-loom'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// We depend on Fabric Loader here to use the Fabric @Environment annotations,
|
||||
// which get remapped to the correct annotations on each platform.
|
||||
// Do NOT use other classes from Fabric Loader.
|
||||
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.layered {
|
||||
officialMojangMappings()
|
||||
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
|
||||
}
|
||||
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
|
||||
}
|
||||
|
||||
loom {
|
||||
def aw = project.file("src/main/resources/${mod_id}.accesswidener")
|
||||
if (aw.exists()) {
|
||||
accessWidenerPath.set(aw)
|
||||
}
|
||||
|
||||
mixin {
|
||||
useLegacyMixinAp = false
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
commonJava {
|
||||
canBeResolved = false
|
||||
canBeConsumed = true
|
||||
}
|
||||
commonResources {
|
||||
canBeResolved = false
|
||||
canBeConsumed = true
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
commonJava sourceSets.main.java.sourceDirectories.singleFile
|
||||
commonResources sourceSets.main.resources.sourceDirectories.singleFile
|
||||
}
|
||||
|
||||
1
common/gradle.properties
Normal file
1
common/gradle.properties
Normal file
@@ -0,0 +1 @@
|
||||
fabric.loom.dontRemap = true
|
||||
@@ -21,7 +21,6 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public final class SkinRestorer {
|
||||
public static final String MOD_ID = "skinrestorer";
|
||||
|
||||
@@ -13,8 +13,8 @@ import net.lionarius.skinrestorer.skin.SkinVariant;
|
||||
import net.lionarius.skinrestorer.skin.provider.MojangSkinProvider;
|
||||
import net.lionarius.skinrestorer.skin.provider.SkinProvider;
|
||||
import net.lionarius.skinrestorer.skin.provider.SkinProviderContext;
|
||||
import net.lionarius.skinrestorer.util.PlayerUtils;
|
||||
import net.lionarius.skinrestorer.translation.Translation;
|
||||
import net.lionarius.skinrestorer.util.PlayerUtils;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.arguments.GameProfileArgument;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
|
||||
@@ -7,10 +7,8 @@ import net.lionarius.skinrestorer.skin.provider.MojangSkinProvider;
|
||||
import net.lionarius.skinrestorer.skin.provider.SkinProviderContext;
|
||||
import net.lionarius.skinrestorer.util.PlayerUtils;
|
||||
import net.lionarius.skinrestorer.util.Result;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.network.ServerLoginPacketListenerImpl;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
@@ -25,8 +23,6 @@ public abstract class ServerLoginPacketListenerImplMixin {
|
||||
|
||||
@Shadow @Nullable
|
||||
private GameProfile authenticatedProfile;
|
||||
@Shadow @Final
|
||||
MinecraftServer server;
|
||||
|
||||
@Unique
|
||||
private CompletableFuture<Void> skinrestorer_pendingSkin;
|
||||
|
||||
@@ -66,12 +66,7 @@ public final class PlayerUtils {
|
||||
}
|
||||
|
||||
if (!player.isDeadOrDying()) {
|
||||
player.connection.send(new ClientboundBundlePacket(
|
||||
List.of(
|
||||
new ClientboundRespawnPacket(player.createCommonSpawnInfo(serverLevel), ClientboundRespawnPacket.KEEP_ALL_DATA),
|
||||
new ClientboundGameEventPacket(ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START, 0)
|
||||
)
|
||||
));
|
||||
player.connection.send(new ClientboundRespawnPacket(player.createCommonSpawnInfo(serverLevel), ClientboundRespawnPacket.KEEP_ALL_DATA));
|
||||
player.connection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
|
||||
player.connection.send(new ClientboundSetEntityMotionPacket(player));
|
||||
var vehicle = player.getVehicle();
|
||||
@@ -85,13 +80,13 @@ public final class PlayerUtils {
|
||||
playerList.sendPlayerPermissionLevel(player);
|
||||
playerList.sendLevelInfo(player, serverLevel);
|
||||
playerList.sendAllPlayerInfo(player);
|
||||
playerList.sendActivePlayerEffects(player);
|
||||
PlayerUtils.sendActivePlayerEffects(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendActivePlayerEffects(ServerPlayer player) {
|
||||
for (var effect : player.getActiveEffects()) {
|
||||
player.connection.send(new ClientboundUpdateMobEffectPacket(player.getId(), effect, false));
|
||||
player.connection.send(new ClientboundUpdateMobEffectPacket(player.getId(), effect));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@ public final class WebUtils {
|
||||
public static final String USER_AGENT;
|
||||
|
||||
static {
|
||||
var date = new Date();
|
||||
USER_AGENT = String.format("SkinRestorer/%d", date.getTime() % 65535);
|
||||
USER_AGENT = String.format("SkinRestorer/%d", System.currentTimeMillis() % 65535);
|
||||
|
||||
var builder = HttpClient.newBuilder();
|
||||
var proxy = SkinRestorer.getConfig().getProxy();
|
||||
|
||||
6
common/src/main/resources/pack.mcmeta
Normal file
6
common/src/main/resources/pack.mcmeta
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "${mod_id}",
|
||||
"pack_format": 8
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
"minVersion": "0.8",
|
||||
"package": "net.lionarius.skinrestorer.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"refmap": "${mod_id}.refmap.json",
|
||||
"mixins": [
|
||||
"PlayerListMixin",
|
||||
"ServerLoginPacketListenerImplMixin",
|
||||
@@ -1,49 +1,42 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow"
|
||||
id 'multiloader-loader'
|
||||
|
||||
id 'fabric-loom'
|
||||
|
||||
id 'multiloader-publish'
|
||||
}
|
||||
|
||||
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")
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.layered {
|
||||
officialMojangMappings()
|
||||
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
|
||||
}
|
||||
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
loom {
|
||||
def aw = project(':common').file("src/main/resources/${mod_id}.accesswidener")
|
||||
if (aw.exists()) {
|
||||
accessWidenerPath.set(aw)
|
||||
}
|
||||
|
||||
mixin {
|
||||
defaultRefmapName.set("${mod_id}.refmap.json")
|
||||
}
|
||||
|
||||
runs {
|
||||
client {
|
||||
client()
|
||||
setConfigName('Fabric Client')
|
||||
ideConfigGenerated(true)
|
||||
runDir('../run/client')
|
||||
}
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand version: project.version
|
||||
server {
|
||||
server()
|
||||
setConfigName('Fabric Server')
|
||||
ideConfigGenerated(true)
|
||||
runDir('../run/server')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowBundle]
|
||||
archiveClassifier = "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public abstract class MinecraftServerMixin {
|
||||
|
||||
@Inject(method = "runServer",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/Util;getNanos()J", ordinal = 0))
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/Util;getMillis()J", ordinal = 0))
|
||||
private void onServerStarted(CallbackInfo ci) {
|
||||
SkinRestorer.onServerStarted((MinecraftServer) (Object) this);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "skinrestorer",
|
||||
"id": "${mod_id}",
|
||||
"version": "${version}",
|
||||
"name": "SkinRestorer",
|
||||
"description": "A server-side mod for restoring skins on offline servers.",
|
||||
"name": "${mod_name}",
|
||||
"description": "${description}",
|
||||
"authors": [
|
||||
"Lionarius"
|
||||
"${mod_author}"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://modrinth.com/mod/skinrestorer",
|
||||
"sources": "https://github.com/Suiranoil/SkinRestorer",
|
||||
"issues": "https://github.com/Suiranoil/SkinRestorer/issues"
|
||||
"homepage": "${mod_homepage}",
|
||||
"sources": "${mod_sources}",
|
||||
"issues": "${mod_issues}"
|
||||
},
|
||||
"icon": "assets/skinrestorer/icon.png",
|
||||
"license": "MIT",
|
||||
"icon": "assets/${mod_id}/icon.png",
|
||||
"license": "${license}",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
@@ -21,11 +21,12 @@
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"skinrestorer-common.mixins.json",
|
||||
"skinrestorer-fabric.mixins.json"
|
||||
"${mod_id}.mixins.json",
|
||||
"${mod_id}.fabric.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.15.10",
|
||||
"minecraft": ">=1.21"
|
||||
"fabricloader": ">=${fabric_loader_version}",
|
||||
"minecraft": ">=${minecraft_version}",
|
||||
"java": ">=${java_version}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"minVersion": "0.8",
|
||||
"package": "net.lionarius.skinrestorer.fabric.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"refmap": "${mod_id}.refmap.json",
|
||||
"mixins": [
|
||||
"CommandsMixin",
|
||||
"MinecraftServerMixin"
|
||||
76
forge/build.gradle
Normal file
76
forge/build.gradle
Normal file
@@ -0,0 +1,76 @@
|
||||
plugins {
|
||||
id 'multiloader-loader'
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
|
||||
id 'net.minecraftforge.gradle'
|
||||
id 'org.parchmentmc.librarian.forgegradle'
|
||||
id 'org.spongepowered.mixin'
|
||||
|
||||
id 'multiloader-publish'
|
||||
}
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "${mod_id}.refmap.json"
|
||||
config "${mod_id}.mixins.json"
|
||||
}
|
||||
|
||||
minecraft {
|
||||
mappings channel: 'parchment', version: "${parchment_version}-${parchment_minecraft}"
|
||||
|
||||
copyIdeResources = true //Calls processResources when in dev
|
||||
|
||||
// Automatically enable forge AccessTransformers if the file exists
|
||||
// This location is hardcoded in Forge and can not be changed.
|
||||
// https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123
|
||||
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
if (at.exists()) {
|
||||
accessTransformer = at
|
||||
}
|
||||
|
||||
runs {
|
||||
client {
|
||||
workingDirectory file('../run/client')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Client'
|
||||
mods {
|
||||
modClientRun {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory file('../run/server')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Server'
|
||||
mods {
|
||||
modServerRun {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:${forge_minecraft_version}-${forge_version}"
|
||||
|
||||
annotationProcessor('org.spongepowered:mixin:0.8.5-SNAPSHOT:processor')
|
||||
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
|
||||
}
|
||||
|
||||
// for some reason mixin plugin does not add 'MixinConfigs' to MANIFEST.MF so we do it manually
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
'MixinConfigs': "${mod_id}.mixins.json"
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.each {
|
||||
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
|
||||
it.output.resourcesDir = dir
|
||||
it.java.destinationDirectory = dir
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package net.lionarius.skinrestorer.forge;
|
||||
|
||||
import net.lionarius.skinrestorer.SkinRestorer;
|
||||
import net.lionarius.skinrestorer.command.SkinCommand;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||
import net.minecraftforge.event.server.ServerStartedEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.loading.FMLPaths;
|
||||
|
||||
@Mod(SkinRestorer.MOD_ID)
|
||||
@Mod.EventBusSubscriber(modid = SkinRestorer.MOD_ID)
|
||||
public final class SkinRestorerForge {
|
||||
|
||||
public SkinRestorerForge() {
|
||||
MinecraftForge.EVENT_BUS.register(SkinRestorerForge.class);
|
||||
|
||||
SkinRestorer.onInitialize(FMLPaths.CONFIGDIR.get());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onCommandRegister(RegisterCommandsEvent event) {
|
||||
SkinCommand.register(event.getDispatcher());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onServerStarted(ServerStartedEvent event) {
|
||||
SkinRestorer.onServerStarted(event.getServer());
|
||||
}
|
||||
}
|
||||
27
forge/src/main/resources/META-INF/mods.toml
Normal file
27
forge/src/main/resources/META-INF/mods.toml
Normal file
@@ -0,0 +1,27 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "${forge_loader_version_range}"
|
||||
license = "${license}"
|
||||
issueTrackerURL = "${mod_issues}"
|
||||
|
||||
[[mods]]
|
||||
modId = "${mod_id}"
|
||||
version = "${version}"
|
||||
displayName = "${mod_name}"
|
||||
authors = "${mod_author}"
|
||||
logoFile = "assets/${mod_id}/icon.png"
|
||||
displayURL = "${mod_homepage}"
|
||||
description = '''${description}'''
|
||||
|
||||
[[dependencies.${mod_id}]]
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "[${forge_version},)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.${mod_id}]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "${minecraft_version_range}"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
@@ -1,33 +1,46 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.parallel=true
|
||||
# Important Notes:
|
||||
# Every field you add must be added to the root build.gradle expandProps map.
|
||||
|
||||
# Mod Properties
|
||||
mod_version=2.0.1
|
||||
# Project
|
||||
group=net.lionarius.skinrestorer
|
||||
java_version=17
|
||||
|
||||
# Common
|
||||
minecraft_version=1.20.2
|
||||
minecraft_version_list=1.20.2
|
||||
minecraft_version_range=1.20.2
|
||||
mod_id=skinrestorer
|
||||
minecraft_version=1.21
|
||||
enabled_platforms=fabric,neoforge
|
||||
maven_group=net.lionarius
|
||||
archives_name=skin-restorer
|
||||
capitalized_name=SkinRestorer
|
||||
mod_name=SkinRestorer
|
||||
mod_version=2.0.2
|
||||
mod_author=Lionarius
|
||||
mod_homepage=https://www.curseforge.com/minecraft/mc-mods/skinrestorer
|
||||
mod_sources=https://github.com/Suiranoil/SkinRestorer
|
||||
mod_issues=https://github.com/Suiranoil/SkinRestorer/issues
|
||||
license=MIT
|
||||
credits=
|
||||
description=A server-side mod for managing skins.
|
||||
|
||||
# Mappings
|
||||
#yarn_mappings=1.21+build.4
|
||||
#yarn_mappings_patch_neoforge_version=1.21+build.4
|
||||
parchment_minecraft_version=1.21
|
||||
parchment_mappings=2024.06.23
|
||||
# ParchmentMC mappings, see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions
|
||||
parchment_minecraft=1.20.2
|
||||
parchment_version=2023.12.10
|
||||
|
||||
# Fabric
|
||||
fabric_loader_version=0.15.11
|
||||
# Fabric, see https://fabricmc.net/develop/ for new versions
|
||||
fabric_loader_version=0.15.0
|
||||
|
||||
# NeoForge
|
||||
neoforge_loader_version=21.0.0-beta
|
||||
# Forge, see https://files.minecraftforge.net/net/minecraftforge/forge/ for new versions
|
||||
forge_version=48.0.0
|
||||
forge_loader_version_range=[48,)
|
||||
# Forge sometimes skips minor minecraft versions (like 1.20.5)
|
||||
forge_minecraft_version=1.20.2
|
||||
|
||||
# Publish
|
||||
modrinth_id=ghrZDhGW
|
||||
# NeoForge, see https://projects.neoforged.net/neoforged/neoforge for new versions
|
||||
neoforge_version=20.2.3-beta
|
||||
neoforge_loader_version_range=[1,)
|
||||
|
||||
# Publishing
|
||||
curseforge_id=443823
|
||||
game_versions=1.21
|
||||
mod_loaders=fabric,neoforge
|
||||
modrinth_id=ghrZDhGW
|
||||
|
||||
# Changelog Options
|
||||
changelog_max_commit_search=200
|
||||
# Gradle
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
@@ -1,56 +1,42 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow"
|
||||
id 'multiloader-loader'
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
|
||||
id 'net.neoforged.gradle.userdev'
|
||||
|
||||
id 'multiloader-publish'
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
neoForge()
|
||||
// Automatically enable neoforge AccessTransformers if the file exists
|
||||
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
if (at.exists()) {
|
||||
minecraft.accessTransformers.file(at)
|
||||
}
|
||||
|
||||
configurations {
|
||||
common {
|
||||
canBeResolved = true
|
||||
canBeConsumed = false
|
||||
}
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentNeoForge.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
|
||||
subsystems {
|
||||
parchment {
|
||||
minecraftVersion = parchment_minecraft
|
||||
mappingsVersion = parchment_version
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "NeoForged"
|
||||
url = "https://maven.neoforged.net/releases"
|
||||
runs {
|
||||
configureEach {
|
||||
modSource project.sourceSets.main
|
||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
||||
}
|
||||
|
||||
client {
|
||||
workingDirectory = file('../run/client')
|
||||
}
|
||||
|
||||
server {
|
||||
programArgument '--nogui'
|
||||
workingDirectory = file('../run/server')
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
neoForge "net.neoforged:neoforge:$rootProject.neoforge_loader_version"
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowBundle project(path: ":common", configuration: "transformProductionNeoForge")
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("META-INF/neoforge.mods.toml") {
|
||||
expand version: project.version
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowBundle]
|
||||
archiveClassifier = "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
implementation "net.neoforged:neoforge:${neoforge_version}"
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
loom.platform = neoforge
|
||||
@@ -3,7 +3,6 @@ package net.lionarius.skinrestorer.neoforge;
|
||||
import net.lionarius.skinrestorer.SkinRestorer;
|
||||
import net.lionarius.skinrestorer.command.SkinCommand;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.loading.FMLPaths;
|
||||
import net.neoforged.neoforge.common.NeoForge;
|
||||
@@ -11,7 +10,7 @@ import net.neoforged.neoforge.event.RegisterCommandsEvent;
|
||||
import net.neoforged.neoforge.event.server.ServerStartedEvent;
|
||||
|
||||
@Mod(SkinRestorer.MOD_ID)
|
||||
@EventBusSubscriber(modid = SkinRestorer.MOD_ID)
|
||||
@Mod.EventBusSubscriber(modid = SkinRestorer.MOD_ID)
|
||||
public final class SkinRestorerNeoForge {
|
||||
|
||||
public SkinRestorerNeoForge() {
|
||||
|
||||
30
neoforge/src/main/resources/META-INF/mods.toml
Normal file
30
neoforge/src/main/resources/META-INF/mods.toml
Normal file
@@ -0,0 +1,30 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "${neoforge_loader_version_range}"
|
||||
license = "${license}"
|
||||
issueTrackerURL = "${mod_issues}"
|
||||
|
||||
[[mods]]
|
||||
modId = "${mod_id}"
|
||||
version = "${version}"
|
||||
displayName = "${mod_name}"
|
||||
authors = "${mod_author}"
|
||||
logoFile = "assets/${mod_id}/icon.png"
|
||||
displayURL = "${mod_homepage}"
|
||||
description = "${description}"
|
||||
|
||||
[[mixins]]
|
||||
config = "${mod_id}.mixins.json"
|
||||
|
||||
[[dependencies.${mod_id}]]
|
||||
modId = "neoforge"
|
||||
mandatory = true
|
||||
versionRange = "[${neoforge_version},)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.${mod_id}]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "${minecraft_version_range}"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
@@ -1,32 +0,0 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "[2,)"
|
||||
issueTrackerURL = "https://github.com/Suiranoil/SkinRestorer/issues"
|
||||
license = "MIT"
|
||||
|
||||
[[mods]]
|
||||
modId = "skinrestorer"
|
||||
version = "${version}"
|
||||
displayName = "SkinRestorer"
|
||||
authors = "Lionarius"
|
||||
logoFile = "assets/skinrestorer/icon.png"
|
||||
displayURL = "https://modrinth.com/mod/skinrestorer"
|
||||
description = '''
|
||||
A server-side mod for restoring skins on offline servers.
|
||||
'''
|
||||
|
||||
[[dependencies.skinrestorer]]
|
||||
modId = "neoforge"
|
||||
type = "required"
|
||||
versionRange = "[21.0.0-beta,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.skinrestorer]]
|
||||
modId = "minecraft"
|
||||
type = "required"
|
||||
versionRange = "[1.21,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[mixins]]
|
||||
config = "skinrestorer-common.mixins.json"
|
||||
@@ -1,24 +1,74 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
name = "Architectury"
|
||||
url = "https://maven.architectury.dev/"
|
||||
}
|
||||
maven {
|
||||
name = "Fabric"
|
||||
url = "https://maven.fabricmc.net/"
|
||||
}
|
||||
maven {
|
||||
name = "Forge"
|
||||
url = "https://files.minecraftforge.net/maven/"
|
||||
}
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('net.fabricmc')
|
||||
includeGroupAndSubgroups('fabric-loom')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Forge'
|
||||
url = 'https://maven.minecraftforge.net'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('net.minecraftforge')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'NeoForge'
|
||||
url = 'https://maven.neoforged.net/releases'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('net.neoforged')
|
||||
includeGroupAndSubgroups('codechicken')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Sponge'
|
||||
url = 'https://repo.spongepowered.org/repository/maven-public'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('org.spongepowered')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('org.parchmentmc')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "skin-restorer"
|
||||
plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
|
||||
}
|
||||
|
||||
include "common"
|
||||
include "fabric"
|
||||
include "neoforge"
|
||||
// This should match the folder name of the project, or else IDEA may complain (see https://youtrack.jetbrains.com/issue/IDEA-317606)
|
||||
rootProject.name = 'skin-restorer'
|
||||
include('common')
|
||||
include('fabric')
|
||||
include('forge')
|
||||
include('neoforge')
|
||||
|
||||
Reference in New Issue
Block a user