mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e392f6012 | ||
|
|
867159643c | ||
|
|
0e6e6ef2d8 | ||
|
|
404ea1e016 | ||
|
|
f8877789b5 | ||
|
|
a3d50ff545 | ||
|
|
5c3f80bbcf | ||
|
|
181b9bd927 | ||
|
|
c63db5758d | ||
|
|
38a9fe304c | ||
|
|
6807c294c4 | ||
|
|
026b6d6519 | ||
|
|
90ced4b3f7 | ||
|
|
52dd0eceb2 | ||
|
|
2d6de8ea7b | ||
|
|
60eb1c25e9 | ||
|
|
90c50085c0 | ||
|
|
9ea3f8f6f1 | ||
|
|
10d72c3cf0 | ||
|
|
214cff1aae | ||
|
|
b5802b150a | ||
|
|
043765257d | ||
|
|
210e931c31 | ||
|
|
45e125b0ec | ||
|
|
46eb109a7e | ||
|
|
a753a3eddc | ||
|
|
5224533d45 | ||
|
|
46804f6a0c | ||
|
|
934e0cad6f | ||
|
|
29c0512de9 | ||
|
|
043cb331ee | ||
|
|
614e65c6a3 | ||
|
|
f321e58a41 | ||
|
|
7288c2106d | ||
|
|
4ebb390a1e | ||
|
|
eceaf7ecc8 | ||
|
|
0c25531761 | ||
|
|
ea0b61ad5e | ||
|
|
6f18c61070 | ||
|
|
feae488fa8 | ||
|
|
034e75f5a5 |
No files matched your search
@@ -0,0 +1,28 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '1.15.x' ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main
|
||||
with:
|
||||
java: 8
|
||||
gradle_tasks: 'setup build publish'
|
||||
artifact_name: 'forge'
|
||||
secrets:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }}
|
||||
PROMOTE_ARTIFACT_USERNAME: ${{ secrets.PROMOTE_ARTIFACT_USERNAME }}
|
||||
PROMOTE_ARTIFACT_PASSWORD: ${{ secrets.PROMOTE_ARTIFACT_PASSWORD }}
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
# Unused for now until we upgrade gradle
|
||||
# SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }}
|
||||
# SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
|
||||
# SIGN_KEYSTORE_PASSWORD: ${{ secrets.SIGN_KEYSTORE_PASSWORD }}
|
||||
# SIGN_KEYSTORE_DATA: ${{ secrets.SIGN_KEYSTORE_DATA }}
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
#gradle
|
||||
/build
|
||||
/.gradle
|
||||
/mdk/.gradle
|
||||
/mdk/build
|
||||
/**/.gradle
|
||||
/**/build
|
||||
|
||||
#occupational hazards
|
||||
/projects/mcp/
|
||||
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
language: java
|
||||
jdk: oraclejdk8
|
||||
|
||||
env:
|
||||
- BUILD_NUMBER=9999
|
||||
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar
|
||||
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $TRAVIS_BUILD_DIR/build/localCache/Forge/
|
||||
|
||||
before_install: chmod +x gradlew
|
||||
install:
|
||||
- ./gradlew --refresh-dependencies
|
||||
- ./gradlew ciWriteBuildNumber
|
||||
script:
|
||||
- travis_wait ./gradlew build -x createExe -S
|
||||
- ./gradlew -p projects/Forge test -S -i
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
# skip building travis on 1.13+ - it doesn't work there
|
||||
branches:
|
||||
except:
|
||||
- 1.13-pre
|
||||
- 1.13.x
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
- /^noci-.*$/
|
||||
Vendored
-103
@@ -1,103 +0,0 @@
|
||||
@Library('forge-shared-library')_
|
||||
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'gradle:jdk8'
|
||||
args '-v forgegc:/home/gradle/.gradle/'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
GRADLE_ARGS = '--no-daemon --console=plain' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
||||
DISCORD_WEBHOOK = credentials('forge-discord-jenkins-webhook')
|
||||
DISCORD_PREFIX = "Job: Forge Branch: ${BRANCH_NAME} Build: #${BUILD_NUMBER}"
|
||||
JENKINS_HEAD = 'https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('notify_start') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Started",
|
||||
successful: true,
|
||||
result: 'ABORTED', //White border
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('changelog') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, 'build/changelog.txt')
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
environment {
|
||||
FORGE_MAVEN = credentials('forge-maven-forge-user')
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
KEYSTORE = credentials('forge-jenkins-keystore-old')
|
||||
KEYSTORE_KEYPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.forge/${MYVERSION}'
|
||||
}
|
||||
}
|
||||
stage('test_publish_pr') { //Publish to local repo to test full process, but don't include credentials so it can't sign/publish to maven
|
||||
when {
|
||||
changeRequest()
|
||||
}
|
||||
environment {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true, onlyIfSuccessful: true, allowEmptyArchive: true
|
||||
|
||||
if (env.CHANGE_ID == null) { // This is unset for non-PRs
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Finished ${currentBuild.currentResult}",
|
||||
description: '```\n' + getChanges(currentBuild) + '\n```',
|
||||
successful: currentBuild.resultIsBetterOrEqualTo("SUCCESS"),
|
||||
result: currentBuild.currentResult,
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-16
@@ -1,16 +1,2 @@
|
||||
Minecraft Forge
|
||||
Copyright (c) 2016-2019.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation version 2.1
|
||||
of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (c) Forge Development LLC and contributors
|
||||
SPDX-License-Identifier: LGPL-2.1-only
|
||||
+47
-81
@@ -1,8 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = 'https://maven.minecraftforge.net/' }
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
@@ -10,7 +9,7 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.197'
|
||||
classpath 'org.ow2.asm:asm:7.2'
|
||||
classpath 'org.ow2.asm:asm-tree:7.2'
|
||||
}
|
||||
@@ -46,23 +45,17 @@ import org.objectweb.asm.ClassReader
|
||||
|
||||
plugins {
|
||||
id 'net.minecrell.licenser' version '0.4'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id 'org.ajoberstar.grgit' version '4.1.1'
|
||||
id 'de.undercouch.download' version '3.3.0'
|
||||
id 'com.github.ben-manes.versions' version '0.22.0'
|
||||
// Does not support this old of gradle
|
||||
//id 'net.minecraftforge.gradlejarsigner' version '1.0.5'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version'))
|
||||
|
||||
ext {
|
||||
JAR_SIGNER = null
|
||||
if (project.hasProperty('keystore')) {
|
||||
JAR_SIGNER = [
|
||||
storepass: project.properties.keystoreStorePass,
|
||||
keypass: project.properties.keystoreKeyPass,
|
||||
keystore: project.properties.keystore
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'snapshot'
|
||||
MAPPING_VERSION = '20200514-1.15.1'
|
||||
MC_VERSION = '1.15.2'
|
||||
@@ -77,6 +70,7 @@ project(':mcp') {
|
||||
}
|
||||
}
|
||||
|
||||
if (findProject(':clean') != null) {
|
||||
project(':clean') {
|
||||
evaluationDependsOn(':mcp')
|
||||
apply plugin: 'eclipse'
|
||||
@@ -124,9 +118,10 @@ project(':clean') {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project(':forge') {
|
||||
evaluationDependsOn(':clean')
|
||||
project(':forge') {
|
||||
evaluationDependsOn(findProject(':clean') != null ? ':clean' : ':mcp')
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'eclipse'
|
||||
@@ -236,7 +231,9 @@ project(':forge') {
|
||||
|
||||
patcher {
|
||||
exc = file("$rootDir/src/main/resources/forge.exc")
|
||||
parent = project(':clean')
|
||||
parent = project(':mcp')
|
||||
mcVersion = MC_VERSION
|
||||
mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION
|
||||
patches = file("$rootDir/patches/minecraft")
|
||||
patchedSrc = file('src/main/java')
|
||||
srgPatches = true
|
||||
@@ -435,20 +432,24 @@ project(':forge') {
|
||||
installer 'org.ow2.asm:asm:7.2'
|
||||
installer 'org.ow2.asm:asm-commons:7.2'
|
||||
installer 'org.ow2.asm:asm-tree:7.2'
|
||||
installer 'org.ow2.asm:asm-util:7.2'
|
||||
installer 'org.ow2.asm:asm-analysis:7.2'
|
||||
installer 'cpw.mods:modlauncher:5.1.+'
|
||||
installer 'cpw.mods:grossjava9hacks:1.3.+'
|
||||
installer 'net.minecraftforge:accesstransformers:2.1.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:2.2.+:service'
|
||||
installer 'net.minecraftforge:forgespi:2.1.+'
|
||||
installer 'net.minecraftforge:forgespi:3.0.+'
|
||||
installer 'net.minecraftforge:coremods:2.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'org.spongepowered:mixin:0.8.2'
|
||||
installer 'com.electronwill.night-config:core:3.6.2'
|
||||
installer 'com.electronwill.night-config:toml:3.6.2'
|
||||
installer 'org.jline:jline:3.12.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.0'
|
||||
installer 'net.jodah:typetools:0.8.+'
|
||||
installer 'org.apache.logging.log4j:log4j-api:2.11.2'
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
installer 'net.jodah:typetools:0.8.3'
|
||||
installer 'org.apache.logging.log4j:log4j-api:2.15.0' //TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.15.0' //TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version
|
||||
installer 'org.apache.logging.log4j:log4j-slf4j18-impl:2.15.0' //TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
fmllauncherImplementation 'com.google.guava:guava:21.0'
|
||||
@@ -472,48 +473,21 @@ project(':forge') {
|
||||
if (changelog.exists())
|
||||
extraTxts += changelog
|
||||
|
||||
task downloadCrowdin() {
|
||||
ext {
|
||||
output = file('build/crowdin_raw.zip')
|
||||
update = file('build/crowdin.json')
|
||||
id = 'minecraft-forge'
|
||||
}
|
||||
onlyIf {
|
||||
project.hasProperty('crowdinKey') && !project.gradle.startParameter.isOffline()
|
||||
}
|
||||
doLast {
|
||||
download {
|
||||
src "https://api.crowdin.com/api/project/${id}/export?key=${project.crowdinKey}&json"
|
||||
dest update
|
||||
overwrite true
|
||||
}
|
||||
if (!update.text.contains('success')) {
|
||||
throw new RuntimeException("Crowdin export failed, see ${update} for more info")
|
||||
}
|
||||
download {
|
||||
src "https://api.crowdin.com/api/project/${id}/download/all.zip?key=${project.crowdinKey}"
|
||||
dest output
|
||||
overwrite true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('downloadCrowdin', Download) {
|
||||
src 'https://files.minecraftforge.net/crowdin.zip'
|
||||
dest file('build/crowdin.zip')
|
||||
onlyIfModified true
|
||||
quiet true
|
||||
}
|
||||
|
||||
task crowdin(type: Zip) {
|
||||
dependsOn downloadCrowdin
|
||||
onlyIf {
|
||||
!downloadCrowdin.state.skipped
|
||||
}
|
||||
baseName = project.name
|
||||
version = project.version
|
||||
classifier = 'crowdin'
|
||||
destinationDir = file('build/distributions')
|
||||
from(zipTree(downloadCrowdin.output)){
|
||||
eachFile { //Tired of waiting for crowdin API, rename things myself. Remove once crowdin stops being dumb
|
||||
if (it.name.equals('en_us.json') && !it.path.startsWith('assets/')) {
|
||||
it.name = it.path.split('/')[0] + '.json'
|
||||
it.path = 'assets/forge/lang/' + it.name
|
||||
}
|
||||
}
|
||||
from(zipTree(downloadCrowdin.dest)){
|
||||
exclude { it.isDirectory() }
|
||||
rename { it.toLowerCase() }//Minecraft needs it lowercase.
|
||||
exclude '**/*.lang' //Pre-1.13 format
|
||||
@@ -716,7 +690,7 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
|
||||
task launcherJson(dependsOn: ['universalJar', 'launcherJar']) {
|
||||
inputs.file universalJar.archivePath
|
||||
inputs.file { launcherJar.archivePath }
|
||||
ext {
|
||||
@@ -952,7 +926,7 @@ project(':forge') {
|
||||
*/
|
||||
|
||||
// add crowdin locales
|
||||
from { !crowdin.state.skipped ? zipTree(crowdin.archivePath) : null}
|
||||
from zipTree(crowdin.archivePath)
|
||||
dependsOn crowdin
|
||||
|
||||
doFirst {
|
||||
@@ -999,11 +973,11 @@ project(':forge') {
|
||||
}
|
||||
|
||||
task downloadInstaller(type: DownloadMavenArtifact) {
|
||||
artifact = 'net.minecraftforge:installer:2.0.+:shrunk'
|
||||
artifact = 'net.minecraftforge:installer:2.2.9:fatjar'
|
||||
changing = true
|
||||
}
|
||||
|
||||
task installerJar(type: Zip, dependsOn: [downloadInstaller, installerJson, launcherJson, genClientBinPatches, genServerBinPatches, 'signUniversalJar', 'signLauncherJar']) {
|
||||
task installerJar(type: Zip, dependsOn: [downloadInstaller, installerJson, launcherJson, genClientBinPatches, genServerBinPatches, universalJar, launcherJar]) {
|
||||
classifier = 'installer'
|
||||
extension = 'jar' //Needs to be Zip task to not override Manifest, so set extension
|
||||
destinationDir = file('build/libs')
|
||||
@@ -1032,24 +1006,12 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
[universalJar, launcherJar, installerJar].each { t ->
|
||||
task "sign${t.name.capitalize()}"(type: SignJar, dependsOn: t) {
|
||||
onlyIf {
|
||||
JAR_SIGNER != null && t.state.failure == null
|
||||
}
|
||||
def jarsigner = JAR_SIGNER == null ? [:] : JAR_SIGNER
|
||||
alias = 'forge'
|
||||
storePass = jarsigner.storepass
|
||||
keyPass = jarsigner.keypass
|
||||
keyStore = jarsigner.keystore
|
||||
inputFile = t.archivePath
|
||||
outputFile = t.archivePath
|
||||
doFirst {
|
||||
project.logger.lifecycle('Signing: ' + inputFile)
|
||||
}
|
||||
}
|
||||
t.finalizedBy(tasks.getByName("sign${t.name.capitalize()}"))
|
||||
}
|
||||
/*
|
||||
jarSigner.autoDetect()
|
||||
jarSigner.sign(universalJar)
|
||||
jarSigner.sign(launcherJar)
|
||||
jarSigner.sign(installerJar)
|
||||
*/
|
||||
|
||||
task makeMdk(type: Zip) {
|
||||
baseName = project.name
|
||||
@@ -1240,12 +1202,15 @@ project(':forge') {
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
if (project.hasProperty('forgeMavenPassword')) {
|
||||
credentials {
|
||||
username project.properties.forgeMavenUser
|
||||
password project.properties.forgeMavenPassword
|
||||
if (System.env.MAVEN_USER) {
|
||||
url "https://maven.minecraftforge.net/releases/"
|
||||
authentication {
|
||||
basic(BasicAuthentication)
|
||||
}
|
||||
credentials {
|
||||
username = System.env.MAVEN_USER ?: 'not'
|
||||
password = System.env.MAVEN_PASSWORD ?: 'set'
|
||||
}
|
||||
url 'https://files.minecraftforge.net/maven/manage/upload'
|
||||
} else {
|
||||
url 'file://' + rootProject.file('repo').getAbsolutePath()
|
||||
}
|
||||
@@ -1298,7 +1263,7 @@ def getArtifacts(project, config, classifiers) {
|
||||
def path = "${folder}${filename}"
|
||||
def url = "https://libraries.minecraft.net/${path}"
|
||||
if (!checkExists(url)) {
|
||||
url = "https://files.minecraftforge.net/maven/${path}"
|
||||
url = "https://maven.minecraftforge.net/${path}"
|
||||
}
|
||||
//TODO remove when Mojang launcher is updated
|
||||
if (!classifiers && art.classifier != null) { //Mojang launcher doesn't currently support classifiers, so... move it to part of the version, and force the extension to 'jar'
|
||||
@@ -1349,6 +1314,7 @@ def getClasspath(project, libs, artifact) {
|
||||
|
||||
//evaluationDependsOnChildren()
|
||||
task setup() {
|
||||
if (findProject(':clean') != null)
|
||||
dependsOn ':clean:extractMapped'
|
||||
dependsOn ':forge:extractMapped' //These must be strings so that we can do lazy resolution. Else we need evaluationDependsOnChildren above
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos) [](https://forgedev.flocker.tv/)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
+4
-3
@@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = 'https://maven.minecraftforge.net/' }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
@@ -18,6 +17,8 @@ group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming
|
||||
archivesBaseName = 'modid'
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
//Print out JVM information so that we know what version is running. Extreamly useful for people to know when helping you.
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
|
||||
minecraft {
|
||||
// The mappings can be changed at any time, and must be in the following format.
|
||||
@@ -143,4 +144,4 @@ publishing {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@
|
||||
@@ -87,9 +87,10 @@
|
||||
p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_));
|
||||
}
|
||||
|
||||
@@ -17,12 +17,13 @@
|
||||
- Block block = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a()).func_177230_c();
|
||||
- return block instanceof CropsBlock || block instanceof StemBlock || block instanceof AttachedStemBlock;
|
||||
+ private boolean func_176529_d(IBlockReader p_176529_0_, BlockPos p_176529_1_) {
|
||||
+ BlockState state = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a());
|
||||
+ return state.func_177230_c() instanceof net.minecraftforge.common.IPlantable && canSustainPlant(state, p_176529_0_, p_176529_1_, Direction.UP, (net.minecraftforge.common.IPlantable)state.func_177230_c());
|
||||
+ BlockState plant = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a());
|
||||
+ BlockState state = p_176529_0_.func_180495_p(p_176529_1_);
|
||||
+ return plant.func_177230_c() instanceof net.minecraftforge.common.IPlantable && state.canSustainPlant(p_176529_0_, p_176529_1_, Direction.UP, (net.minecraftforge.common.IPlantable)plant.func_177230_c());
|
||||
}
|
||||
|
||||
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
|
||||
@@ -99,7 +99,7 @@
|
||||
@@ -99,7 +100,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,18 @@
|
||||
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
|
||||
} else {
|
||||
return false;
|
||||
@@ -255,4 +261,8 @@
|
||||
@@ -156,6 +162,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176568_b, RailShape.SOUTH_EAST);
|
||||
case NORTH_EAST:
|
||||
return p_185499_1_.func_206870_a(field_176568_b, RailShape.SOUTH_WEST);
|
||||
+ //Forge fix: MC-196102
|
||||
+ case NORTH_SOUTH:
|
||||
+ case EAST_WEST:
|
||||
+ return p_185499_1_;
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176568_b)) {
|
||||
@@ -255,4 +265,8 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176568_b, field_176569_M);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/block/RailBlock.java
|
||||
+++ b/net/minecraft/block/RailBlock.java
|
||||
@@ -49,6 +49,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176565_b, RailShape.SOUTH_EAST);
|
||||
case NORTH_EAST:
|
||||
return p_185499_1_.func_206870_a(field_176565_b, RailShape.SOUTH_WEST);
|
||||
+ //Forge fix: MC-196102
|
||||
+ case NORTH_SOUTH:
|
||||
+ case EAST_WEST:
|
||||
+ return p_185499_1_;
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176565_b)) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/StemBlock.java
|
||||
+++ b/net/minecraft/block/StemBlock.java
|
||||
@@ -40,22 +40,24 @@
|
||||
@@ -38,22 +38,24 @@
|
||||
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,4 +103,10 @@
|
||||
@@ -98,4 +100,10 @@
|
||||
public StemGrownBlock func_208486_d() {
|
||||
return this.field_149877_a;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,15 @@
|
||||
}
|
||||
|
||||
boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c;
|
||||
@@ -667,7 +675,7 @@
|
||||
|
||||
if (this.field_71158_b.field_78901_c && !flag7 && !flag && !this.field_71075_bZ.field_75100_b && !this.func_184218_aH() && !this.func_70617_f_()) {
|
||||
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
||||
- if (itemstack.func_77973_b() == Items.field_185160_cR && ElytraItem.func_185069_d(itemstack) && this.func_226566_ei_()) {
|
||||
+ if (itemstack.canElytraFly(this) && this.func_226566_ei_()) {
|
||||
this.field_71174_a.func_147297_a(new CEntityActionPacket(this, CEntityActionPacket.Action.START_FALL_FLYING));
|
||||
}
|
||||
}
|
||||
@@ -961,4 +969,16 @@
|
||||
return this.field_204230_bP;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,15 @@
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
|
||||
RenderSystem.disableCull();
|
||||
RenderSystem.enableBlend();
|
||||
@@ -1689,7 +1717,7 @@
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkRenderDispatcher.ChunkRender chunkrenderdispatcher$chunkrender = iterator.next();
|
||||
- if (chunkrenderdispatcher$chunkrender.func_188281_o()) {
|
||||
+ if (!net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() && chunkrenderdispatcher$chunkrender.func_188281_o()) {
|
||||
this.field_174995_M.func_228902_a_(chunkrenderdispatcher$chunkrender);
|
||||
} else {
|
||||
chunkrenderdispatcher$chunkrender.func_228929_a_(this.field_174995_M);
|
||||
@@ -1977,7 +2005,12 @@
|
||||
this.field_175008_n.func_217628_a(p_215319_1_, p_215319_2_, p_215319_3_, p_215319_4_);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
public void func_225628_a_(MatrixStack p_225628_1_, IRenderTypeBuffer p_225628_2_, int p_225628_3_, T p_225628_4_, float p_225628_5_, float p_225628_6_, float p_225628_7_, float p_225628_8_, float p_225628_9_, float p_225628_10_) {
|
||||
ItemStack itemstack = p_225628_4_.func_184582_a(EquipmentSlotType.CHEST);
|
||||
- if (itemstack.func_77973_b() == Items.field_185160_cR) {
|
||||
+ if (shouldRender(itemstack, p_225628_4_)) {
|
||||
ResourceLocation resourcelocation;
|
||||
if (p_225628_4_ instanceof AbstractClientPlayerEntity) {
|
||||
AbstractClientPlayerEntity abstractclientplayerentity = (AbstractClientPlayerEntity)p_225628_4_;
|
||||
@@ -38,10 +38,10 @@
|
||||
} else if (abstractclientplayerentity.func_152122_n() && abstractclientplayerentity.func_110303_q() != null && abstractclientplayerentity.func_175148_a(PlayerModelPart.CAPE)) {
|
||||
resourcelocation = abstractclientplayerentity.func_110303_q();
|
||||
} else {
|
||||
- resourcelocation = field_188355_a;
|
||||
+ resourcelocation = getElytraTexture(itemstack, p_225628_4_);
|
||||
}
|
||||
} else {
|
||||
- resourcelocation = field_188355_a;
|
||||
+ resourcelocation = getElytraTexture(itemstack, p_225628_4_);
|
||||
}
|
||||
|
||||
p_225628_1_.func_227860_a_();
|
||||
@@ -53,4 +53,29 @@
|
||||
p_225628_1_.func_227865_b_();
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Determines if the ElytraLayer should render.
|
||||
+ * ItemStack and Entity are provided for modder convenience,
|
||||
+ * For example, using the same ElytraLayer for multiple custom Elytra.
|
||||
+ *
|
||||
+ * @param stack The Elytra ItemStack
|
||||
+ * @param entity The entity being rendered.
|
||||
+ * @return If the ElytraLayer should render.
|
||||
+ */
|
||||
+ public boolean shouldRender(ItemStack stack, T entity) {
|
||||
+ return stack.func_77973_b() == Items.field_185160_cR;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the texture to use with this ElytraLayer.
|
||||
+ * This assumes the vanilla Elytra model.
|
||||
+ *
|
||||
+ * @param stack The Elytra ItemStack.
|
||||
+ * @param entity The entity being rendered.
|
||||
+ * @return The texture.
|
||||
+ */
|
||||
+ public ResourceLocation getElytraTexture(ItemStack stack, T entity) {
|
||||
+ return field_188355_a;
|
||||
+ }
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
this.field_135037_b = p_i1303_2_;
|
||||
this.field_135038_c = p_i1303_3_;
|
||||
this.field_135036_d = p_i1303_4_;
|
||||
+ String[] splitLangCode = field_135038_c.split("_", 2);
|
||||
+ String[] splitLangCode = field_135039_a.split("_", 2);
|
||||
+ if (splitLangCode.length == 1) { // Vanilla has some languages without underscores
|
||||
+ this.javaLocale = new java.util.Locale(field_135039_a);
|
||||
+ } else {
|
||||
|
||||
@@ -69,3 +69,12 @@
|
||||
if (p_217384_1_ == this.field_73037_M.field_71439_g) {
|
||||
this.field_73037_M.func_147118_V().func_147682_a(new EntityTickableSound(p_217384_3_, p_217384_4_, p_217384_2_));
|
||||
}
|
||||
@@ -689,7 +706,7 @@
|
||||
}
|
||||
|
||||
public double func_228331_m_() {
|
||||
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
|
||||
+ return this.field_73011_w.getHorizonHeight();
|
||||
}
|
||||
|
||||
public int func_228332_n_() {
|
||||
@@ -1,20 +1,13 @@
|
||||
--- a/net/minecraft/data/DirectoryCache.java
|
||||
+++ b/net/minecraft/data/DirectoryCache.java
|
||||
@@ -23,7 +23,7 @@
|
||||
private final Path field_208326_c;
|
||||
private int field_208327_d;
|
||||
private final Map<Path, String> field_208328_e = Maps.newHashMap();
|
||||
- private final Map<Path, String> field_208329_f = Maps.newHashMap();
|
||||
+ private final Map<Path, String> field_208329_f = Maps.newTreeMap(); //Forge: TreeMap, makes the file output predictable/sorted.
|
||||
private final Set<Path> field_218457_g = Sets.newHashSet();
|
||||
|
||||
public DirectoryCache(Path p_i49352_1_, String p_i49352_2_) throws IOException {
|
||||
@@ -55,7 +55,7 @@
|
||||
@@ -55,8 +55,8 @@
|
||||
}
|
||||
|
||||
IOUtils.writeLines(this.field_208329_f.entrySet().stream().map((p_208319_1_) -> {
|
||||
- return (String)p_208319_1_.getValue() + ' ' + this.field_208325_b.relativize(p_208319_1_.getKey());
|
||||
- }).collect(Collectors.toList()), System.lineSeparator(), writer);
|
||||
+ return (String)p_208319_1_.getValue() + ' ' + this.field_208325_b.relativize(p_208319_1_.getKey()).toString().replace('\\', '/'); //Forge: Standardize file paths.
|
||||
}).collect(Collectors.toList()), System.lineSeparator(), writer);
|
||||
+ }).sorted(java.util.Comparator.comparing(a -> a.split(" ")[1])).collect(Collectors.toList()), System.lineSeparator(), writer);
|
||||
writer.close();
|
||||
field_208324_a.debug("Caching: cache hits: {}, created: {} removed: {}", this.field_208327_d, this.field_208329_f.size() - this.field_208327_d, this.field_208328_e.size());
|
||||
}
|
||||
@@ -1,6 +1,28 @@
|
||||
--- a/net/minecraft/dispenser/IDispenseItemBehavior.java
|
||||
+++ b/net/minecraft/dispenser/IDispenseItemBehavior.java
|
||||
@@ -295,8 +295,9 @@
|
||||
@@ -62,6 +62,7 @@
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IDispenseItemBehavior {
|
||||
+ org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
|
||||
IDispenseItemBehavior field_223216_a_ = (p_210297_0_, p_210297_1_) -> {
|
||||
return p_210297_1_;
|
||||
};
|
||||
@@ -162,7 +163,12 @@
|
||||
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
|
||||
Direction direction = p_82487_1_.func_189992_e().func_177229_b(DispenserBlock.field_176441_a);
|
||||
EntityType<?> entitytype = ((SpawnEggItem)p_82487_2_.func_77973_b()).func_208076_b(p_82487_2_.func_77978_p());
|
||||
- entitytype.func_220331_a(p_82487_1_.func_197524_h(), p_82487_2_, (PlayerEntity)null, p_82487_1_.func_180699_d().func_177972_a(direction), SpawnReason.DISPENSER, direction != Direction.UP, false);
|
||||
+ try { // FORGE: fix potential crash
|
||||
+ entitytype.func_220331_a(p_82487_1_.func_197524_h(), p_82487_2_, (PlayerEntity) null, p_82487_1_.func_180699_d().func_177972_a(direction), SpawnReason.DISPENSER, direction != Direction.UP, false);
|
||||
+ } catch (Exception e) {
|
||||
+ LOGGER.error("Error while dispensing spawn egg from dispenser at {}", p_82487_1_.func_180699_d(), e);
|
||||
+ return ItemStack.field_190927_a;
|
||||
+ }
|
||||
p_82487_2_.func_190918_g(1);
|
||||
return p_82487_2_;
|
||||
}
|
||||
@@ -295,8 +301,9 @@
|
||||
world.func_175656_a(blockpos, Blocks.field_150480_ab.func_176223_P());
|
||||
} else if (FlintAndSteelItem.func_219997_a(blockstate)) {
|
||||
world.func_175656_a(blockpos, blockstate.func_206870_a(BlockStateProperties.field_208190_q, Boolean.valueOf(true)));
|
||||
@@ -12,7 +34,7 @@
|
||||
world.func_217377_a(blockpos, false);
|
||||
} else {
|
||||
this.field_218407_b = false;
|
||||
@@ -426,15 +427,23 @@
|
||||
@@ -426,15 +433,23 @@
|
||||
}
|
||||
});
|
||||
DispenserBlock.func_199774_a(Items.field_151097_aZ.func_199767_j(), new OptionalDispenseBehavior() {
|
||||
|
||||
@@ -367,7 +367,16 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
this.func_110140_aT().func_111148_a(itemstack.func_111283_C(equipmentslottype));
|
||||
}
|
||||
@@ -2474,13 +2518,22 @@
|
||||
@@ -2258,6 +2302,8 @@
|
||||
boolean flag = this.func_70083_f(7);
|
||||
if (flag && !this.field_70122_E && !this.func_184218_aH()) {
|
||||
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
||||
+ flag = itemstack.canElytraFly(this) && itemstack.elytraFlightTick(this, this.field_184629_bo);
|
||||
+ if (false) //Forge: Moved to ElytraItem
|
||||
if (itemstack.func_77973_b() == Items.field_185160_cR && ElytraItem.func_185069_d(itemstack)) {
|
||||
flag = true;
|
||||
if (!this.field_70170_p.field_72995_K && (this.field_184629_bo + 1) % 20 == 0) {
|
||||
@@ -2474,13 +2520,22 @@
|
||||
|
||||
private void func_184608_ct() {
|
||||
if (this.func_184587_cr()) {
|
||||
@@ -392,7 +401,7 @@
|
||||
this.func_71036_o();
|
||||
}
|
||||
} else {
|
||||
@@ -2522,8 +2575,10 @@
|
||||
@@ -2522,8 +2577,10 @@
|
||||
public void func_184598_c(Hand p_184598_1_) {
|
||||
ItemStack itemstack = this.func_184586_b(p_184598_1_);
|
||||
if (!itemstack.func_190926_b() && !this.func_184587_cr()) {
|
||||
@@ -404,7 +413,7 @@
|
||||
if (!this.field_70170_p.field_72995_K) {
|
||||
this.func_204802_c(1, true);
|
||||
this.func_204802_c(2, p_184598_1_ == Hand.OFF_HAND);
|
||||
@@ -2583,6 +2638,9 @@
|
||||
@@ -2583,6 +2640,9 @@
|
||||
vec3d1 = vec3d1.func_178789_a(-this.field_70125_A * ((float)Math.PI / 180F));
|
||||
vec3d1 = vec3d1.func_178785_b(-this.field_70177_z * ((float)Math.PI / 180F));
|
||||
vec3d1 = vec3d1.func_72441_c(this.func_226277_ct_(), this.func_226280_cw_(), this.func_226281_cx_());
|
||||
@@ -414,7 +423,7 @@
|
||||
this.field_70170_p.func_195594_a(new ItemParticleData(ParticleTypes.field_197591_B, p_195062_1_), vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c);
|
||||
}
|
||||
|
||||
@@ -2594,7 +2652,9 @@
|
||||
@@ -2594,7 +2654,9 @@
|
||||
} else {
|
||||
if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) {
|
||||
this.func_226293_b_(this.field_184627_bm, 16);
|
||||
@@ -425,7 +434,7 @@
|
||||
this.func_184602_cy();
|
||||
}
|
||||
|
||||
@@ -2615,7 +2675,11 @@
|
||||
@@ -2615,7 +2677,11 @@
|
||||
|
||||
public void func_184597_cx() {
|
||||
if (!this.field_184627_bm.func_190926_b()) {
|
||||
@@ -437,7 +446,7 @@
|
||||
if (this.field_184627_bm.func_222122_m()) {
|
||||
this.func_184608_ct();
|
||||
}
|
||||
@@ -2772,16 +2836,16 @@
|
||||
@@ -2772,16 +2838,16 @@
|
||||
|
||||
private boolean func_213359_p() {
|
||||
return this.func_213374_dv().map((p_213347_1_) -> {
|
||||
@@ -458,7 +467,7 @@
|
||||
BlockPos blockpos = p_213368_1_.func_177984_a();
|
||||
return new Vec3d((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.1D, (double)blockpos.func_177952_p() + 0.5D);
|
||||
});
|
||||
@@ -2797,7 +2861,9 @@
|
||||
@@ -2797,7 +2863,9 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public Direction func_213376_dz() {
|
||||
BlockPos blockpos = this.func_213374_dv().orElse((BlockPos)null);
|
||||
@@ -469,7 +478,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70094_T() {
|
||||
@@ -2866,4 +2932,58 @@
|
||||
@@ -2866,4 +2934,58 @@
|
||||
public void func_213334_d(Hand p_213334_1_) {
|
||||
this.func_213361_c(p_213334_1_ == Hand.MAIN_HAND ? EquipmentSlotType.MAINHAND : EquipmentSlotType.OFFHAND);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
--- a/net/minecraft/entity/effect/LightningBoltEntity.java
|
||||
+++ b/net/minecraft/entity/effect/LightningBoltEntity.java
|
||||
@@ -80,6 +80,7 @@
|
||||
@@ -38,11 +38,6 @@
|
||||
this.field_70264_a = this.field_70146_Z.nextLong();
|
||||
this.field_70263_c = this.field_70146_Z.nextInt(3) + 1;
|
||||
this.field_184529_d = p_i46780_8_;
|
||||
- Difficulty difficulty = p_i46780_1_.func_175659_aa();
|
||||
- if (difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD) {
|
||||
- this.func_195053_a(4);
|
||||
- }
|
||||
-
|
||||
}
|
||||
|
||||
public SoundCategory func_184176_by() {
|
||||
@@ -58,6 +53,10 @@
|
||||
if (this.field_70262_b == 2) {
|
||||
this.field_70170_p.func_184148_a((PlayerEntity)null, this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), SoundEvents.field_187754_de, SoundCategory.WEATHER, 10000.0F, 0.8F + this.field_70146_Z.nextFloat() * 0.2F);
|
||||
this.field_70170_p.func_184148_a((PlayerEntity)null, this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), SoundEvents.field_187752_dd, SoundCategory.WEATHER, 2.0F, 0.5F + this.field_70146_Z.nextFloat() * 0.2F);
|
||||
+ Difficulty difficulty = this.field_70170_p.func_175659_aa();
|
||||
+ if (difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD) {
|
||||
+ this.func_195053_a(4);
|
||||
+ }
|
||||
}
|
||||
|
||||
--this.field_70262_b;
|
||||
@@ -80,6 +79,7 @@
|
||||
List<Entity> list = this.field_70170_p.func_175674_a(this, new AxisAlignedBB(this.func_226277_ct_() - 3.0D, this.func_226278_cu_() - 3.0D, this.func_226281_cx_() - 3.0D, this.func_226277_ct_() + 3.0D, this.func_226278_cu_() + 6.0D + 3.0D, this.func_226281_cx_() + 3.0D), Entity::func_70089_S);
|
||||
|
||||
for(Entity entity : list) {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/entity/passive/CatEntity.java
|
||||
+++ b/net/minecraft/entity/passive/CatEntity.java
|
||||
@@ -402,7 +402,7 @@
|
||||
}
|
||||
} else if (this.func_70877_b(itemstack)) {
|
||||
this.func_175505_a(p_184645_1_, itemstack);
|
||||
- if (this.field_70146_Z.nextInt(3) == 0) {
|
||||
+ if (this.field_70146_Z.nextInt(3) == 0 && !net.minecraftforge.event.ForgeEventFactory.onAnimalTame(this, p_184645_1_)) {
|
||||
this.func_193101_c(p_184645_1_);
|
||||
this.field_70911_d.func_75270_a(true);
|
||||
this.field_70170_p.func_72960_a(this, (byte)7);
|
||||
@@ -20,7 +20,15 @@
|
||||
}
|
||||
|
||||
if (this.func_184207_aI() && this.field_190688_bE) {
|
||||
@@ -947,4 +948,22 @@
|
||||
@@ -672,6 +673,7 @@
|
||||
this.func_213293_j(vec3d.field_72450_a, d1, vec3d.field_72449_c);
|
||||
this.func_110255_k(true);
|
||||
this.field_70160_al = true;
|
||||
+ net.minecraftforge.common.ForgeHooks.onLivingJump(this);
|
||||
if (f1 > 0.0F) {
|
||||
float f2 = MathHelper.func_76126_a(this.field_70177_z * ((float)Math.PI / 180F));
|
||||
float f3 = MathHelper.func_76134_b(this.field_70177_z * ((float)Math.PI / 180F));
|
||||
@@ -947,4 +949,22 @@
|
||||
|
||||
return super.func_213386_a(p_213386_1_, p_213386_2_, p_213386_3_, p_213386_4_, p_213386_5_);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
@Nullable
|
||||
public ItemEntity func_71019_a(ItemStack p_71019_1_, boolean p_71019_2_) {
|
||||
- return this.func_146097_a(p_71019_1_, false, p_71019_2_);
|
||||
+ return net.minecraftforge.common.ForgeHooks.onPlayerTossEvent(this, p_71019_1_, false);
|
||||
+ return net.minecraftforge.common.ForgeHooks.onPlayerTossEvent(this, p_71019_1_, p_71019_2_);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -415,6 +415,15 @@
|
||||
return false;
|
||||
} else {
|
||||
if (p_225503_1_ >= 2.0F) {
|
||||
@@ -1519,7 +1636,7 @@
|
||||
public boolean func_226566_ei_() {
|
||||
if (!this.field_70122_E && !this.func_184613_cA() && !this.func_70090_H()) {
|
||||
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
||||
- if (itemstack.func_77973_b() == Items.field_185160_cR && ElytraItem.func_185069_d(itemstack)) {
|
||||
+ if (itemstack.canElytraFly(this)) {
|
||||
this.func_226567_ej_();
|
||||
return true;
|
||||
}
|
||||
@@ -1560,6 +1677,10 @@
|
||||
}
|
||||
|
||||
@@ -446,19 +455,20 @@
|
||||
this.field_71068_ca += p_82242_1_;
|
||||
if (this.field_71068_ca < 0) {
|
||||
this.field_71068_ca = 0;
|
||||
@@ -1789,7 +1914,10 @@
|
||||
@@ -1789,7 +1914,11 @@
|
||||
}
|
||||
|
||||
public ITextComponent func_145748_c_() {
|
||||
- ITextComponent itextcomponent = ScorePlayerTeam.func_200541_a(this.func_96124_cp(), this.func_200200_C_());
|
||||
+ if (this.displayname == null) this.displayname = net.minecraftforge.event.ForgeEventFactory.getPlayerDisplayName(this, this.func_200200_C_());
|
||||
+ ITextComponent itextcomponent = new StringTextComponent("");
|
||||
+ prefixes.forEach(e -> itextcomponent.func_150257_a(e));
|
||||
+ itextcomponent.func_150257_a(ScorePlayerTeam.func_200541_a(this.func_96124_cp(), this.func_200200_C_()));
|
||||
+ itextcomponent.func_150257_a(ScorePlayerTeam.func_200541_a(this.func_96124_cp(), this.displayname));
|
||||
+ suffixes.forEach(e -> itextcomponent.func_150257_a(e));
|
||||
return this.func_208016_c(itextcomponent);
|
||||
}
|
||||
|
||||
@@ -2029,4 +2157,45 @@
|
||||
@@ -2029,4 +2158,53 @@
|
||||
return this.field_221260_g;
|
||||
}
|
||||
}
|
||||
@@ -479,7 +489,15 @@
|
||||
+ public Collection<ITextComponent> getSuffixes() {
|
||||
+ return this.suffixes;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ private ITextComponent displayname = null;
|
||||
+ /**
|
||||
+ * Force the displayed name to refresh, by firing {@link net.minecraftforge.event.entity.player.PlayerEvent.NameFormat}, using the real player name as event parameter.
|
||||
+ */
|
||||
+ public void refreshDisplayName() {
|
||||
+ this.displayname = net.minecraftforge.event.ForgeEventFactory.getPlayerDisplayName(this, this.func_200200_C_());
|
||||
+ }
|
||||
+
|
||||
+ private final net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler>
|
||||
+ playerMainHandler = net.minecraftforge.common.util.LazyOptional.of(
|
||||
+ () -> new net.minecraftforge.items.wrapper.PlayerMainInvWrapper(field_71071_by));
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
p_77659_2_.func_71029_a(Stats.field_75929_E.func_199076_b(this));
|
||||
- p_77659_2_.func_184185_a(fluid.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187633_N : SoundEvents.field_187630_M, 1.0F, 1.0F);
|
||||
+
|
||||
+ SoundEvent soundevent = this.field_77876_a.getAttributes().getEmptySound();
|
||||
+ SoundEvent soundevent = this.field_77876_a.getAttributes().getFillSound();
|
||||
+ if (soundevent == null) soundevent = fluid.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187633_N : SoundEvents.field_187630_M;
|
||||
+ p_77659_2_.func_184185_a(soundevent, 1.0F, 1.0F);
|
||||
ItemStack itemstack1 = this.func_150910_a(itemstack, p_77659_2_, fluid.func_204524_b());
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/item/ElytraItem.java
|
||||
+++ b/net/minecraft/item/ElytraItem.java
|
||||
@@ -38,4 +38,17 @@
|
||||
return ActionResult.func_226251_d_(itemstack);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canElytraFly(ItemStack stack, net.minecraft.entity.LivingEntity entity) {
|
||||
+ return ElytraItem.func_185069_d(stack);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean elytraFlightTick(ItemStack stack, net.minecraft.entity.LivingEntity entity, int flightTicks) {
|
||||
+ if (!entity.field_70170_p.field_72995_K && (flightTicks + 1) % 20 == 0) {
|
||||
+ stack.func_222118_a(1, entity, e -> e.func_213361_c(net.minecraft.inventory.EquipmentSlotType.CHEST));
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/net/minecraft/item/SpawnEggItem.java
|
||||
+++ b/net/minecraft/item/SpawnEggItem.java
|
||||
@@ -35,11 +35,14 @@
|
||||
private final int field_195989_d;
|
||||
private final EntityType<?> field_200890_d;
|
||||
|
||||
+ /** @deprecated Forge: Use {@link net.minecraftforge.common.ForgeSpawnEggItem} instead for suppliers */
|
||||
+ @Deprecated
|
||||
public SpawnEggItem(EntityType<?> p_i48465_1_, int p_i48465_2_, int p_i48465_3_, Item.Properties p_i48465_4_) {
|
||||
super(p_i48465_4_);
|
||||
this.field_200890_d = p_i48465_1_;
|
||||
this.field_195988_c = p_i48465_2_;
|
||||
this.field_195989_d = p_i48465_3_;
|
||||
+ if (p_i48465_1_ != null)
|
||||
field_195987_b.put(p_i48465_1_, this);
|
||||
}
|
||||
|
||||
@@ -121,6 +124,8 @@
|
||||
return p_195983_1_ == 0 ? this.field_195988_c : this.field_195989_d;
|
||||
}
|
||||
|
||||
+ /** @deprecated Forge: call {@link net.minecraftforge.common.ForgeSpawnEggItem#fromEntityType(EntityType)} instead */
|
||||
+ @Deprecated
|
||||
@Nullable
|
||||
public static SpawnEggItem func_200889_b(@Nullable EntityType<?> p_200889_0_) {
|
||||
return field_195987_b.get(p_200889_0_);
|
||||
@@ -157,7 +157,20 @@
|
||||
return serverplayerentity;
|
||||
}
|
||||
|
||||
@@ -739,7 +767,7 @@
|
||||
@@ -698,12 +726,6 @@
|
||||
if (serverstatisticsmanager == null) {
|
||||
File file1 = new File(this.field_72400_f.func_71218_a(DimensionType.field_223227_a_).func_217485_w().func_75765_b(), "stats");
|
||||
File file2 = new File(file1, uuid + ".json");
|
||||
- if (!file2.exists()) {
|
||||
- File file3 = new File(file1, p_152602_1_.func_200200_C_().getString() + ".json");
|
||||
- if (file3.exists() && file3.isFile()) {
|
||||
- file3.renameTo(file2);
|
||||
- }
|
||||
- }
|
||||
|
||||
serverstatisticsmanager = new ServerStatisticsManager(this.field_72400_f, file2);
|
||||
this.field_148547_k.put(uuid, serverstatisticsmanager);
|
||||
@@ -739,7 +761,7 @@
|
||||
}
|
||||
|
||||
public List<ServerPlayerEntity> func_181057_v() {
|
||||
@@ -166,7 +179,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -769,4 +797,12 @@
|
||||
@@ -769,4 +791,12 @@
|
||||
public boolean func_206257_x() {
|
||||
return this.field_72407_n;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
TileEntity tileentity = p_195481_0_.func_175625_s(p_195481_1_);
|
||||
if (tileentity instanceof ChestTileEntity) {
|
||||
return ((ChestTileEntity)tileentity).field_145987_o;
|
||||
@@ -221,4 +222,56 @@
|
||||
@@ -221,4 +222,39 @@
|
||||
protected Container func_213906_a(int p_213906_1_, PlayerInventory p_213906_2_) {
|
||||
return ChestContainer.func_216992_a(p_213906_1_, p_213906_2_, this);
|
||||
}
|
||||
@@ -46,25 +46,8 @@
|
||||
+ if (!(state.func_177230_c() instanceof ChestBlock)) {
|
||||
+ return new net.minecraftforge.items.wrapper.InvWrapper(this);
|
||||
+ }
|
||||
+ ChestType type = state.func_177229_b(ChestBlock.field_196314_b);
|
||||
+ if (type != ChestType.SINGLE) {
|
||||
+ BlockPos opos = this.func_174877_v().func_177972_a(ChestBlock.func_196311_i(state));
|
||||
+ BlockState ostate = this.func_145831_w().func_180495_p(opos);
|
||||
+ if (state.func_177230_c() == ostate.func_177230_c()) {
|
||||
+ ChestType otype = ostate.func_177229_b(ChestBlock.field_196314_b);
|
||||
+ if (otype != ChestType.SINGLE && type != otype && state.func_177229_b(ChestBlock.field_176459_a) == ostate.func_177229_b(ChestBlock.field_176459_a)) {
|
||||
+ TileEntity ote = this.func_145831_w().func_175625_s(opos);
|
||||
+ if (ote instanceof ChestTileEntity) {
|
||||
+ IInventory top = type == ChestType.RIGHT ? this : (IInventory)ote;
|
||||
+ IInventory bottom = type == ChestType.RIGHT ? (IInventory)ote : this;
|
||||
+ return new net.minecraftforge.items.wrapper.CombinedInvWrapper(
|
||||
+ new net.minecraftforge.items.wrapper.InvWrapper(top),
|
||||
+ new net.minecraftforge.items.wrapper.InvWrapper(bottom));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return new net.minecraftforge.items.wrapper.InvWrapper(this);
|
||||
+ IInventory inv = ChestBlock.func_226916_a_((ChestBlock) state.func_177230_c(), state, func_145831_w(), func_174877_v(), true);
|
||||
+ return new net.minecraftforge.items.wrapper.InvWrapper(inv == null ? this : inv);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/net/minecraft/util/math/RayTraceContext.java
|
||||
+++ b/net/minecraft/util/math/RayTraceContext.java
|
||||
@@ -16,12 +16,12 @@
|
||||
private final RayTraceContext.FluidMode field_222257_d;
|
||||
private final ISelectionContext field_222258_e;
|
||||
|
||||
- public RayTraceContext(Vec3d p_i50009_1_, Vec3d p_i50009_2_, RayTraceContext.BlockMode p_i50009_3_, RayTraceContext.FluidMode p_i50009_4_, Entity p_i50009_5_) {
|
||||
+ public RayTraceContext(Vec3d p_i50009_1_, Vec3d p_i50009_2_, RayTraceContext.BlockMode p_i50009_3_, RayTraceContext.FluidMode p_i50009_4_, @javax.annotation.Nullable Entity p_i50009_5_) {
|
||||
this.field_222254_a = p_i50009_1_;
|
||||
this.field_222255_b = p_i50009_2_;
|
||||
this.field_222256_c = p_i50009_3_;
|
||||
this.field_222257_d = p_i50009_4_;
|
||||
- this.field_222258_e = ISelectionContext.func_216374_a(p_i50009_5_);
|
||||
+ this.field_222258_e = p_i50009_5_ == null ? ISelectionContext.func_216377_a() : ISelectionContext.func_216374_a(p_i50009_5_);
|
||||
}
|
||||
|
||||
public Vec3d func_222250_a() {
|
||||
@@ -41,7 +41,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -375,6 +375,17 @@
|
||||
@@ -375,6 +375,22 @@
|
||||
return this.field_185364_H;
|
||||
}
|
||||
|
||||
@@ -55,11 +55,16 @@
|
||||
+ public Biome getHill(net.minecraft.world.gen.INoiseRandom rand) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ public Biome getEdge(net.minecraft.world.gen.INoiseRandom rand, Biome northBiome, Biome westBiome, Biome southBiome, Biome eastBiome) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
public static class Builder {
|
||||
@Nullable
|
||||
private ConfiguredSurfaceBuilder<?> field_205422_a;
|
||||
@@ -526,6 +537,18 @@
|
||||
@@ -526,6 +542,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/world/gen/layer/ShoreLayer.java
|
||||
+++ b/net/minecraft/world/gen/layer/ShoreLayer.java
|
||||
@@ -34,6 +34,9 @@
|
||||
|
||||
public int func_202748_a(INoiseRandom p_202748_1_, int p_202748_2_, int p_202748_3_, int p_202748_4_, int p_202748_5_, int p_202748_6_) {
|
||||
Biome biome = Registry.field_212624_m.func_148745_a(p_202748_6_);
|
||||
+ Biome edgeBiome = biome.getEdge(p_202748_1_, Registry.field_212624_m.func_148745_a(p_202748_2_), Registry.field_212624_m.func_148745_a(p_202748_3_), Registry.field_212624_m.func_148745_a(p_202748_4_), Registry.field_212624_m.func_148745_a(p_202748_5_));
|
||||
+ if (edgeBiome != null) return Registry.field_212624_m.func_148757_b(edgeBiome);
|
||||
+
|
||||
if (p_202748_6_ == field_202784_r) {
|
||||
if (LayerUtil.func_203631_b(p_202748_2_) || LayerUtil.func_203631_b(p_202748_3_) || LayerUtil.func_203631_b(p_202748_4_) || LayerUtil.func_203631_b(p_202748_5_)) {
|
||||
return field_202785_s;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/server/ServerMultiWorld.java
|
||||
+++ b/net/minecraft/world/server/ServerMultiWorld.java
|
||||
@@ -10,11 +10,19 @@
|
||||
@@ -10,11 +10,22 @@
|
||||
import net.minecraft.world.storage.SaveHandler;
|
||||
|
||||
public class ServerMultiWorld extends ServerWorld {
|
||||
@@ -15,10 +15,12 @@
|
||||
+ p_i50708_1_.func_175723_af().func_177737_a(this.borderListener);
|
||||
}
|
||||
|
||||
- protected void func_217389_a() {
|
||||
protected void func_217389_a() {
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public void close() throws java.io.IOException {
|
||||
+ super.close();
|
||||
+ this.delegate.func_175723_af().removeListener(this.borderListener); // Unlink ourselves, to prevent world leak.
|
||||
}
|
||||
+ }
|
||||
}
|
||||
@@ -143,17 +143,18 @@
|
||||
i += this.field_73012_v.nextInt(8) - this.field_73012_v.nextInt(8);
|
||||
j += this.field_73012_v.nextInt(8) - this.field_73012_v.nextInt(8);
|
||||
++k;
|
||||
@@ -584,8 +593,9 @@
|
||||
@@ -584,9 +593,10 @@
|
||||
++p_217479_1_.field_70173_aa;
|
||||
IProfiler iprofiler = this.func_217381_Z();
|
||||
iprofiler.func_194340_a(() -> {
|
||||
- return Registry.field_212629_r.func_177774_c(p_217479_1_.func_200600_R()).toString();
|
||||
+ return p_217479_1_.func_200600_R().getRegistryName() == null ? p_217479_1_.func_200600_R().toString() : p_217479_1_.func_200600_R().getRegistryName().toString();
|
||||
});
|
||||
+ if (p_217479_1_.canUpdate())
|
||||
iprofiler.func_230035_c_("tickNonPassenger");
|
||||
+ if (p_217479_1_.canUpdate())
|
||||
p_217479_1_.func_70071_h_();
|
||||
iprofiler.func_76319_b();
|
||||
}
|
||||
@@ -652,6 +662,11 @@
|
||||
}
|
||||
|
||||
@@ -263,7 +264,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -985,8 +1015,11 @@
|
||||
@@ -985,12 +1015,16 @@
|
||||
}
|
||||
|
||||
public void func_217434_e(ServerPlayerEntity p_217434_1_) {
|
||||
@@ -277,7 +278,12 @@
|
||||
this.func_72854_c();
|
||||
}
|
||||
|
||||
@@ -1010,10 +1043,20 @@
|
||||
public void func_217468_a(LightningBoltEntity p_217468_1_) {
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.EntityJoinWorldEvent(p_217468_1_, this))) return;
|
||||
this.field_217497_w.add(p_217468_1_);
|
||||
this.field_73061_a.func_184103_al().func_148543_a((PlayerEntity)null, p_217468_1_.func_226277_ct_(), p_217468_1_.func_226278_cu_(), p_217468_1_.func_226281_cx_(), 512.0D, this.field_73011_w.func_186058_p(), new SSpawnGlobalEntityPacket(p_217468_1_));
|
||||
}
|
||||
@@ -1010,10 +1044,20 @@
|
||||
}
|
||||
|
||||
public void func_184148_a(@Nullable PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) {
|
||||
@@ -298,7 +304,7 @@
|
||||
this.field_73061_a.func_184103_al().func_148543_a(p_217384_1_, p_217384_2_.func_226277_ct_(), p_217384_2_.func_226278_cu_(), p_217384_2_.func_226281_cx_(), p_217384_5_ > 1.0F ? (double)(16.0F * p_217384_5_) : 16.0D, this.field_73011_w.func_186058_p(), new SSpawnMovingSoundEffectPacket(p_217384_3_, p_217384_4_, p_217384_2_, p_217384_5_, p_217384_6_));
|
||||
}
|
||||
|
||||
@@ -1049,6 +1092,7 @@
|
||||
@@ -1049,6 +1093,7 @@
|
||||
|
||||
public Explosion func_217401_a(@Nullable Entity p_217401_1_, @Nullable DamageSource p_217401_2_, double p_217401_3_, double p_217401_5_, double p_217401_7_, float p_217401_9_, boolean p_217401_10_, Explosion.Mode p_217401_11_) {
|
||||
Explosion explosion = new Explosion(this, p_217401_1_, p_217401_3_, p_217401_5_, p_217401_7_, p_217401_9_, p_217401_10_, p_217401_11_);
|
||||
@@ -306,7 +312,7 @@
|
||||
if (p_217401_2_ != null) {
|
||||
explosion.func_199592_a(p_217401_2_);
|
||||
}
|
||||
@@ -1377,4 +1421,15 @@
|
||||
@@ -1377,4 +1422,15 @@
|
||||
return p_229854_1_.func_175898_b(p_229855_1_.func_180328_a());
|
||||
});
|
||||
}
|
||||
|
||||
+6
-2
@@ -1,9 +1,13 @@
|
||||
rootProject.name = 'Forge'
|
||||
|
||||
include ':mcp'
|
||||
include ':clean'
|
||||
include ':forge'
|
||||
|
||||
project(":mcp").projectDir = file("projects/mcp")
|
||||
project(":clean").projectDir = file("projects/clean")
|
||||
project(":forge").projectDir = file("projects/forge")
|
||||
|
||||
|
||||
if (false) {
|
||||
include ':clean'
|
||||
project(":clean").projectDir = file("projects/clean")
|
||||
}
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.common.asm;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.common.asm;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.common.asm;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
@@ -79,6 +65,8 @@ public class FMLServiceProvider implements ITransformationService
|
||||
FMLPaths.setup(environment);
|
||||
LOGGER.debug(CORE, "Loading configuration");
|
||||
FMLConfig.load();
|
||||
LOGGER.debug(CORE, "Preparing ModFile");
|
||||
environment.computePropertyIfAbsent(Environment.Keys.MODFILEFACTORY.get(), k->ModFile.buildFactory());
|
||||
arguments = new HashMap<>();
|
||||
arguments.put("modLists", modListsArgumentList);
|
||||
arguments.put("mods", modsArgumentList);
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+3
-17
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
@@ -54,7 +40,7 @@ public class ExplodedDirectoryLocator implements IModLocator {
|
||||
Path modtoml = resources.resolve(modstoml);
|
||||
if (Files.exists(modtoml)) {
|
||||
LOGGER.debug(LOADING, "Found exploded directory mod manifest at {}", modtoml.toString());
|
||||
ModFile mf = new ModFile(pathPathPair.getLeft(), this);
|
||||
ModFile mf = ModFile.newFMLInstance(pathPathPair.getLeft(), this);
|
||||
mods.put(mf, pathPathPair);
|
||||
} else {
|
||||
LOGGER.warn(LOADING, "Failed to find exploded resource mods.toml in directory {}", resources.toString());
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+3
-17
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
@@ -36,7 +22,7 @@ public class MavenDirectoryLocator extends AbstractJarFileLocator {
|
||||
@Override
|
||||
public List<IModFile> scanMods() {
|
||||
return modCoords.stream()
|
||||
.map(mc -> new ModFile(mc, this))
|
||||
.map(mc -> ModFile.newFMLInstance(mc, this))
|
||||
.peek(f->modJars.compute(f, (mf, fs)->createFileSystem(mf)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+3
-17
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
@@ -158,7 +144,7 @@ public class ModDiscoverer {
|
||||
|
||||
@Override
|
||||
public List<IModFile> scanMods() {
|
||||
return Collections.singletonList(new ModFile(mcJar, this));
|
||||
return Collections.singletonList(ModFile.newFMLInstance(mcJar, this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
@@ -1,33 +1,21 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import net.minecraftforge.fml.loading.progress.StartupMessageManager;
|
||||
import net.minecraftforge.forgespi.Environment;
|
||||
import net.minecraftforge.fml.loading.FMLLoader;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.forgespi.language.ModFileScanData;
|
||||
import net.minecraftforge.fml.loading.FMLLoader;
|
||||
import net.minecraftforge.forgespi.language.IModLanguageProvider;
|
||||
import net.minecraftforge.forgespi.language.ModFileScanData;
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import net.minecraftforge.forgespi.locating.IModLocator;
|
||||
import net.minecraftforge.forgespi.locating.ModFileFactory;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -57,31 +45,10 @@ public class ModFile implements IModFile {
|
||||
}
|
||||
|
||||
private final String jarVersion;
|
||||
private final ModFileFactory.ModFileInfoParser parser;
|
||||
private Map<String, Object> fileProperties;
|
||||
private IModLanguageProvider loader;
|
||||
private Throwable scanError;
|
||||
|
||||
public void setFileProperties(Map<String, Object> fileProperties)
|
||||
{
|
||||
this.fileProperties = fileProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModLanguageProvider getLoader()
|
||||
{
|
||||
return loader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path findResource(String className)
|
||||
{
|
||||
return locator.findPath(this, className);
|
||||
}
|
||||
|
||||
public void identifyLanguage() {
|
||||
this.loader = FMLLoader.getLanguageLoadingProvider().findLanguage(this, this.modFileInfo.getModLoader(), this.modFileInfo.getModLoaderVersion());
|
||||
}
|
||||
|
||||
private final Path filePath;
|
||||
private final Type modFileType;
|
||||
private final Manifest manifest;
|
||||
@@ -94,9 +61,10 @@ public class ModFile implements IModFile {
|
||||
|
||||
public static final Attributes.Name TYPE = new Attributes.Name("FMLModType");
|
||||
|
||||
public ModFile(final Path file, final IModLocator locator) {
|
||||
public ModFile(final Path file, final IModLocator locator, final ModFileFactory.ModFileInfoParser parser) {
|
||||
this.locator = locator;
|
||||
this.filePath = file;
|
||||
this.parser = parser;
|
||||
manifest = locator.findManifest(file).orElse(DEFAULTMANIFEST);
|
||||
if (manifest != DEFAULTMANIFEST) LOGGER.debug(SCAN,"Mod file {} has a manifest", file);
|
||||
else LOGGER.debug(SCAN,"Mod file {} is missing a manifest", file);
|
||||
@@ -129,7 +97,7 @@ public class ModFile implements IModFile {
|
||||
}
|
||||
|
||||
public boolean identifyMods() {
|
||||
this.modFileInfo = ModFileParser.readModList(this);
|
||||
this.modFileInfo = ModFileParser.readModList(this, this.parser);
|
||||
if (this.modFileInfo == null) return false;
|
||||
LOGGER.debug(LOADING,"Loading mod file {} with language {}", this.getFilePath(), this.modFileInfo.getModLoader());
|
||||
this.coreMods = ModFileParser.getCoreMods(this);
|
||||
@@ -182,6 +150,27 @@ public class ModFile implements IModFile {
|
||||
StartupMessageManager.modLoaderConsumer().ifPresent(c->c.accept("Completed deep scan of "+this.getFileName()));
|
||||
}
|
||||
|
||||
public void setFileProperties(Map<String, Object> fileProperties)
|
||||
{
|
||||
this.fileProperties = fileProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModLanguageProvider getLoader()
|
||||
{
|
||||
return loader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path findResource(String className)
|
||||
{
|
||||
return locator.findPath(this, className);
|
||||
}
|
||||
|
||||
public void identifyLanguage() {
|
||||
this.loader = FMLLoader.getLanguageLoadingProvider().findLanguage(this, this.modFileInfo.getModLoader(), this.modFileInfo.getModLoaderVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Mod File: " + Objects.toString(this.filePath);
|
||||
@@ -201,4 +190,12 @@ public class ModFile implements IModFile {
|
||||
public IModFileInfo getModFileInfo() {
|
||||
return modFileInfo;
|
||||
}
|
||||
|
||||
public static ModFileFactory buildFactory() {
|
||||
return ModFile::new;
|
||||
}
|
||||
|
||||
public static ModFile newFMLInstance(final Path path, final IModLocator locator) {
|
||||
return (ModFile) ModFileFactory.FACTORY.build(path, locator, ModFileParser::modsTomlParser);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,35 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
import net.minecraftforge.forgespi.language.MavenVersionAdapter;
|
||||
import net.minecraftforge.fml.loading.StringUtils;
|
||||
import net.minecraftforge.forgespi.language.IConfigurable;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.fml.loading.StringUtils;
|
||||
import net.minecraftforge.forgespi.language.MavenVersionAdapter;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.maven.artifact.versioning.VersionRange;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.minecraftforge.fml.loading.LogMarkers.LOADING;
|
||||
|
||||
public class ModFileInfo implements IModFileInfo
|
||||
public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private final UnmodifiableConfig config;
|
||||
private final IConfigurable config;
|
||||
private final ModFile modFile;
|
||||
private final URL issueURL;
|
||||
private final String modLoader;
|
||||
@@ -47,32 +38,30 @@ public class ModFileInfo implements IModFileInfo
|
||||
private final List<IModInfo> mods;
|
||||
private final Map<String,Object> properties;
|
||||
|
||||
ModFileInfo(final ModFile modFile, final UnmodifiableConfig config)
|
||||
ModFileInfo(final ModFile modFile, final IConfigurable config)
|
||||
{
|
||||
this.modFile = modFile;
|
||||
this.config = config;
|
||||
this.modLoader = config.<String>getOptional("modLoader").
|
||||
this.modLoader = config.<String>getConfigElement("modLoader").
|
||||
orElseThrow(()->new InvalidModFileException("Missing ModLoader in file", this));
|
||||
this.modLoaderVersion = config.<String>getOptional("loaderVersion").
|
||||
this.modLoaderVersion = config.<String>getConfigElement("loaderVersion").
|
||||
map(MavenVersionAdapter::createFromVersionSpec).
|
||||
orElseThrow(()->new InvalidModFileException("Missing ModLoader version in file", this));
|
||||
this.showAsResourcePack = config.<Boolean>getOrElse("showAsResourcePack", false);
|
||||
this.properties = config.<UnmodifiableConfig>getOptional("properties").
|
||||
map(UnmodifiableConfig::valueMap).orElse(Collections.emptyMap());
|
||||
this.showAsResourcePack = config.<Boolean>getConfigElement("showAsResourcePack").orElse(false);
|
||||
this.properties = config.<Map<String, Object>>getConfigElement("properties").orElse(Collections.emptyMap());
|
||||
this.modFile.setFileProperties(this.properties);
|
||||
if (config.contains("mods") && !(config.get("mods") instanceof Collection)) {
|
||||
throw new InvalidModFileException("Mods list is not a list.", this);
|
||||
}
|
||||
final ArrayList<UnmodifiableConfig> modConfigs = config.getOrElse("mods", ArrayList::new);
|
||||
this.issueURL = config.<String>getConfigElement("issueTrackerURL").map(StringUtils::toURL).orElse(null);
|
||||
final List<? extends IConfigurable> modConfigs = config.getConfigList("mods");
|
||||
if (modConfigs.isEmpty()) {
|
||||
throw new InvalidModFileException("Missing mods list", this);
|
||||
}
|
||||
this.mods = modConfigs.stream().map(mi-> new ModInfo(this, mi)).collect(Collectors.toList());
|
||||
this.issueURL = config.<String>getOptional("issueTrackerURL").map(StringUtils::toURL).orElse(null);
|
||||
this.mods = modConfigs.stream()
|
||||
.map(mi-> new ModInfo(this, mi))
|
||||
.collect(Collectors.toList());
|
||||
LOGGER.debug(LOADING, "Found valid mod file {} with {} mods - versions {}",
|
||||
this.modFile::getFileName,
|
||||
() -> mods.stream().map(IModInfo::getModId).collect(Collectors.joining(",", "{", "}")),
|
||||
() -> mods.stream().map(IModInfo::getVersion).map(Objects::toString).collect(Collectors.joining(",", "{", "}")));
|
||||
() -> this.mods.stream().map(IModInfo::getModId).collect(Collectors.joining(",", "{", "}")),
|
||||
() -> this.mods.stream().map(IModInfo::getVersion).map(Objects::toString).collect(Collectors.joining(",", "{", "}")));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,12 +75,6 @@ public class ModFileInfo implements IModFileInfo
|
||||
return this.modFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnmodifiableConfig getConfig()
|
||||
{
|
||||
return this.config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModLoader()
|
||||
{
|
||||
@@ -117,4 +100,14 @@ public class ModFileInfo implements IModFileInfo
|
||||
public boolean showAsResourcePack() {
|
||||
return this.showAsResourcePack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Optional<T> getConfigElement(final String... key) {
|
||||
return this.config.getConfigElement(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends IConfigurable> getConfigList(final String... key) {
|
||||
return this.config.getConfigList(key);
|
||||
}
|
||||
}
|
||||
+14
-23
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
@@ -23,6 +9,8 @@ import com.electronwill.nightconfig.core.file.FileConfig;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import net.minecraftforge.forgespi.locating.ModFileFactory;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -38,25 +26,28 @@ import java.util.stream.Collectors;
|
||||
import static net.minecraftforge.fml.loading.LogMarkers.LOADING;
|
||||
|
||||
public class ModFileParser {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
public static IModFileInfo readModList(final ModFile modFile) {
|
||||
public static IModFileInfo readModList(final ModFile modFile, final ModFileFactory.ModFileInfoParser parser) {
|
||||
return parser.build(modFile);
|
||||
}
|
||||
|
||||
public static IModFileInfo modsTomlParser(final IModFile imodFile) {
|
||||
ModFile modFile = (ModFile) imodFile;
|
||||
LOGGER.debug(LOADING,"Considering mod file candidate {}", modFile.getFilePath());
|
||||
final Path modsjson = modFile.getLocator().findPath(modFile, "META-INF", "mods.toml");
|
||||
if (!Files.exists(modsjson)) {
|
||||
LOGGER.warn(LOADING, "Mod file {} is missing mods.toml file", modFile);
|
||||
return null;
|
||||
}
|
||||
return loadModFile(modFile, modsjson);
|
||||
}
|
||||
|
||||
public static IModFileInfo loadModFile(final ModFile file, final Path modsjson)
|
||||
{
|
||||
final FileConfig fileConfig = FileConfig.builder(modsjson).build();
|
||||
fileConfig.load();
|
||||
fileConfig.close();
|
||||
return new ModFileInfo(file, fileConfig);
|
||||
final NightConfigWrapper configWrapper = new NightConfigWrapper(fileConfig);
|
||||
final ModFileInfo modFileInfo = new ModFileInfo(modFile, configWrapper);
|
||||
configWrapper.setFile(modFileInfo);
|
||||
return modFileInfo;
|
||||
}
|
||||
|
||||
protected static List<CoreModFile> getCoreMods(final ModFile modFile) {
|
||||
|
||||
@@ -1,31 +1,22 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
import net.minecraftforge.fml.loading.StringUtils;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.fml.loading.StringSubstitutor;
|
||||
import net.minecraftforge.fml.loading.StringUtils;
|
||||
import net.minecraftforge.forgespi.language.IConfigurable;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.forgespi.language.MavenVersionAdapter;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.maven.artifact.versioning.ArtifactVersion;
|
||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import org.apache.maven.artifact.versioning.VersionRange;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -33,12 +24,7 @@ import java.util.Optional;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.maven.artifact.versioning.ArtifactVersion;
|
||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
|
||||
public class ModInfo implements IModInfo
|
||||
public class ModInfo implements IModInfo, IConfigurable
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final DefaultArtifactVersion DEFAULT_VERSION = new DefaultArtifactVersion("1");
|
||||
@@ -53,50 +39,51 @@ public class ModInfo implements IModInfo
|
||||
private final Optional<String> logoFile;
|
||||
private final boolean logoBlur;
|
||||
private final URL updateJSONURL;
|
||||
private final List<IModInfo.ModVersion> dependencies;
|
||||
private final List<? extends IModInfo.ModVersion> dependencies;
|
||||
private final Map<String,Object> properties;
|
||||
private final UnmodifiableConfig modConfig;
|
||||
private final IConfigurable config;
|
||||
|
||||
public ModInfo(final ModFileInfo owningFile, final UnmodifiableConfig modConfig)
|
||||
public ModInfo(final ModFileInfo owningFile, final IConfigurable config)
|
||||
{
|
||||
Optional<ModFileInfo> ownFile = Optional.ofNullable(owningFile);
|
||||
this.owningFile = owningFile;
|
||||
this.modConfig = modConfig;
|
||||
this.modId = modConfig.<String>getOptional("modId").orElseThrow(() -> new InvalidModFileException("Missing modId entry", owningFile));
|
||||
this.config = config;
|
||||
this.modId = config.<String>getConfigElement("modId")
|
||||
.orElseThrow(() -> new InvalidModFileException("Missing modId", owningFile));
|
||||
if (!VALID_LABEL.matcher(this.modId).matches()) {
|
||||
LOGGER.fatal("Invalid modId found in file {} - {} does not match the standard: {}", this.owningFile.getFile().getFilePath(), this.modId, VALID_LABEL.pattern());
|
||||
throw new InvalidModFileException("Invalid modId found : "+ this.modId, owningFile);
|
||||
throw new InvalidModFileException("Invalid modId found : " + this.modId, owningFile);
|
||||
}
|
||||
this.namespace = modConfig.<String>getOptional("namespace").orElse(this.modId);
|
||||
this.namespace = config.<String>getConfigElement("namespace").orElse(this.modId);
|
||||
if (!VALID_LABEL.matcher(this.namespace).matches()) {
|
||||
LOGGER.fatal("Invalid override namespace found in file {} - {} does not match the standard: {}", this.owningFile.getFile().getFilePath(), this.namespace, VALID_LABEL.pattern());
|
||||
throw new InvalidModFileException("Invalid override namespace found : "+ this.namespace, owningFile);
|
||||
throw new InvalidModFileException("Invalid override namespace found : " + this.namespace, owningFile);
|
||||
}
|
||||
this.version = modConfig.<String>getOptional("version").
|
||||
map(s->StringSubstitutor.replace(s, owningFile != null ? owningFile.getFile() : null )).
|
||||
map(DefaultArtifactVersion::new).orElse(DEFAULT_VERSION);
|
||||
this.displayName = modConfig.<String>getOptional("displayName").orElse(this.modId);
|
||||
this.description = modConfig.get("description");
|
||||
this.version = config.<String>getConfigElement("version")
|
||||
.map(s -> StringSubstitutor.replace(s, ownFile.map(ModFileInfo::getFile).orElse(null)))
|
||||
.map(DefaultArtifactVersion::new).orElse(DEFAULT_VERSION);
|
||||
this.displayName = config.<String>getConfigElement("displayName").orElse(this.modId);
|
||||
this.description = config.<String>getConfigElement("description").orElse("MISSING DESCRIPTION");
|
||||
|
||||
Optional<String> tmp = modConfig.<String>getOptional("logoFile");
|
||||
if (!tmp.isPresent() && this.owningFile != null) {
|
||||
tmp = this.owningFile.getConfig().getOptional("logoFile");
|
||||
}
|
||||
this.logoFile = tmp;
|
||||
this.logoBlur = modConfig.<Boolean>getOptional("logoBlur").
|
||||
orElseGet(() -> Optional.ofNullable(this.owningFile).
|
||||
flatMap(f -> f.getConfig().<Boolean>getOptional("logoBlur")).
|
||||
orElse(true));
|
||||
this.logoFile = Optional.ofNullable(config.<String>getConfigElement("logoFile")
|
||||
.orElseGet(() -> ownFile.flatMap(mf -> mf.<String>getConfigElement("logoFile")).orElse(null)));
|
||||
this.logoBlur = config.<Boolean>getConfigElement("logoBlur")
|
||||
.orElseGet(() -> ownFile.flatMap(f -> f.<Boolean>getConfigElement("logoBlur"))
|
||||
.orElse(true));
|
||||
|
||||
this.updateJSONURL = modConfig.<String>getOptional("updateJSONURL").map(StringUtils::toURL).orElse(null);
|
||||
if (owningFile != null) {
|
||||
this.dependencies = owningFile.getConfig().<List<UnmodifiableConfig>>getOptional(Arrays.asList("dependencies", this.modId)).
|
||||
orElse(Collections.emptyList()).stream().map(dep -> new ModVersion(this, dep)).collect(Collectors.toList());
|
||||
this.properties = owningFile.getConfig().<UnmodifiableConfig>getOptional(Arrays.asList("modproperties", this.modId)).
|
||||
map(UnmodifiableConfig::valueMap).orElse(Collections.emptyMap());
|
||||
} else {
|
||||
this.dependencies = Collections.emptyList();
|
||||
this.properties = Collections.emptyMap();
|
||||
}
|
||||
this.updateJSONURL = config.<String>getConfigElement("updateJSONURL")
|
||||
.map(StringUtils::toURL)
|
||||
.orElse(null);
|
||||
|
||||
this.dependencies = ownFile.map(mfi -> mfi.getConfigList("dependencies", this.modId)
|
||||
.stream()
|
||||
.map(dep -> new ModVersion(this, dep))
|
||||
.collect(Collectors.toList()))
|
||||
.orElse(Collections.emptyList());
|
||||
|
||||
this.properties = ownFile.map(mfi -> mfi.<Map<String, Object>>getConfigElement("modproperties", this.modId)
|
||||
.orElse(Collections.emptyMap()))
|
||||
.orElse(Collections.emptyMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,15 +114,10 @@ public class ModInfo implements IModInfo
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IModInfo.ModVersion> getDependencies() {
|
||||
public List<? extends IModInfo.ModVersion> getDependencies() {
|
||||
return this.dependencies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnmodifiableConfig getModConfig() {
|
||||
return this.modConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespace() {
|
||||
return this.namespace;
|
||||
@@ -169,4 +151,84 @@ public class ModInfo implements IModInfo
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Optional<T> getConfigElement(final String... key) {
|
||||
return this.config.getConfigElement(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends IConfigurable> getConfigList(final String... key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
class ModVersion implements net.minecraftforge.forgespi.language.IModInfo.ModVersion {
|
||||
private IModInfo owner;
|
||||
private final String modId;
|
||||
private final VersionRange versionRange;
|
||||
private final boolean mandatory;
|
||||
private final Ordering ordering;
|
||||
private final DependencySide side;
|
||||
|
||||
public ModVersion(final IModInfo owner, final IConfigurable config) {
|
||||
this.owner = owner;
|
||||
this.modId = config.<String>getConfigElement("modId")
|
||||
.orElseThrow(()->new InvalidModFileException("Missing required field modid in dependency", getOwningFile()));
|
||||
this.mandatory = config.<Boolean>getConfigElement("mandatory")
|
||||
.orElseThrow(()->new InvalidModFileException("Missing required field mandatory in dependency", getOwningFile()));
|
||||
this.versionRange = config.<String>getConfigElement("versionRange")
|
||||
.map(MavenVersionAdapter::createFromVersionSpec)
|
||||
.orElse(UNBOUNDED);
|
||||
this.ordering = config.<String>getConfigElement("ordering")
|
||||
.map(Ordering::valueOf)
|
||||
.orElse(Ordering.NONE);
|
||||
this.side = config.<String>getConfigElement("side")
|
||||
.map(DependencySide::valueOf)
|
||||
.orElse(DependencySide.BOTH);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getModId()
|
||||
{
|
||||
return modId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionRange getVersionRange()
|
||||
{
|
||||
return versionRange;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMandatory()
|
||||
{
|
||||
return mandatory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ordering getOrdering()
|
||||
{
|
||||
return ordering;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DependencySide getSide()
|
||||
{
|
||||
return side;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOwner(final IModInfo owner)
|
||||
{
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModInfo getOwner()
|
||||
{
|
||||
return owner;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+3
-17
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
@@ -65,7 +51,7 @@ public class ModsFolderLocator extends AbstractJarFileLocator {
|
||||
.filter(p->!excluded.contains(p))
|
||||
.sorted(Comparator.comparing(path-> StringUtils.toLowerCase(path.getFileName().toString())))
|
||||
.filter(p->StringUtils.toLowerCase(p.getFileName().toString()).endsWith(SUFFIX))
|
||||
.map(p->new ModFile(p, this))
|
||||
.map(p->ModFile.newFMLInstance(p, this))
|
||||
.peek(f->modJars.compute(f, (mf, fs)->createFileSystem(mf)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
import net.minecraftforge.forgespi.language.IConfigurable;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class NightConfigWrapper implements IConfigurable {
|
||||
private final UnmodifiableConfig config;
|
||||
private IModFileInfo file;
|
||||
|
||||
public NightConfigWrapper(final UnmodifiableConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
NightConfigWrapper setFile(IModFileInfo file) {
|
||||
this.file = file;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Optional<T> getConfigElement(final String... key) {
|
||||
return this.config.getOptional(asList(key)).map(value -> {
|
||||
if (value instanceof UnmodifiableConfig) {
|
||||
return (T) ((UnmodifiableConfig) value).valueMap();
|
||||
}
|
||||
return (T) value;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends IConfigurable> getConfigList(final String... key) {
|
||||
final List<String> path = asList(key);
|
||||
if (this.config.contains(path) && !(this.config.get(path) instanceof Collection)) {
|
||||
throw new InvalidModFileException("The configuration path "+path+" is invalid. Expecting a collection!", file);
|
||||
}
|
||||
final ArrayList<UnmodifiableConfig> nestedConfigs = this.config.getOrElse(path, ArrayList::new);
|
||||
return nestedConfigs.stream()
|
||||
.map(NightConfigWrapper::new)
|
||||
.map(cw->cw.setFile(file))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.progress;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.progress;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.progress;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.toposort;
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.toposort;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.toposort;
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.server;
|
||||
|
||||
@@ -20,24 +20,24 @@
|
||||
<Appenders>
|
||||
<TerminalConsole name="Console">
|
||||
<PatternLayout>
|
||||
<LoggerNamePatternSelector defaultPattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [%c{2.}/%markerSimpleName]: %minecraftFormatting{%msg}%n%tEx}">
|
||||
<LoggerNamePatternSelector defaultPattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [%c{2.}/%markerSimpleName]: %minecraftFormatting{%msg{nolookup}}%n%tEx}">
|
||||
<!-- don't include the full logger name for Mojang's logs since they use full class names and it's very verbose -->
|
||||
<PatternMatch key="net.minecraft." pattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [minecraft/%logger{1}]: %minecraftFormatting{%msg}%n%tEx}"/>
|
||||
<PatternMatch key="com.mojang." pattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [mojang/%logger{1}]: %minecraftFormatting{%msg}%n%tEx}"/>
|
||||
<PatternMatch key="net.minecraft." pattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [minecraft/%logger{1}]: %minecraftFormatting{%msg{nolookup}}%n%tEx}"/>
|
||||
<PatternMatch key="com.mojang." pattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [mojang/%logger{1}]: %minecraftFormatting{%msg{nolookup}}%n%tEx}"/>
|
||||
</LoggerNamePatternSelector>
|
||||
</PatternLayout>
|
||||
</TerminalConsole>
|
||||
<Queue name="ServerGuiConsole" ignoreExceptions="true">
|
||||
<PatternLayout>
|
||||
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%c{2.}/%markerSimpleName]: %minecraftFormatting{%msg}{strip}%n">
|
||||
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%c{2.}/%markerSimpleName]: %minecraftFormatting{%msg{nolookup}}{strip}%n">
|
||||
<!-- don't include the full logger name for Mojang's logs since they use full class names and it's very verbose -->
|
||||
<PatternMatch key="net.minecraft." pattern="[%d{HH:mm:ss}] [%t/%level] [minecraft/%logger{1}]: %minecraftFormatting{%msg}{strip}%n"/>
|
||||
<PatternMatch key="com.mojang." pattern="[%d{HH:mm:ss}] [%t/%level] [mojang/%logger{1}]: %minecraftFormatting{%msg}{strip}%n"/>
|
||||
<PatternMatch key="net.minecraft." pattern="[%d{HH:mm:ss}] [%t/%level] [minecraft/%logger{1}]: %minecraftFormatting{%msg{nolookup}}{strip}%n"/>
|
||||
<PatternMatch key="com.mojang." pattern="[%d{HH:mm:ss}] [%t/%level] [mojang/%logger{1}]: %minecraftFormatting{%msg{nolookup}}{strip}%n"/>
|
||||
</LoggerNamePatternSelector>
|
||||
</PatternLayout>
|
||||
</Queue>
|
||||
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout pattern="[%d{ddMMMyyyy HH:mm:ss.SSS}] [%t/%level] [%logger/%markerSimpleName]: %minecraftFormatting{%msg}{strip}%n%xEx"/>
|
||||
<PatternLayout pattern="[%d{ddMMMyyyy HH:mm:ss.SSS}] [%t/%level] [%logger/%markerSimpleName]: %minecraftFormatting{%msg{nolookup}}{strip}%n%xEx"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy/>
|
||||
<OnStartupTriggeringPolicy/>
|
||||
@@ -45,7 +45,7 @@
|
||||
<DefaultRolloverStrategy max="99" fileIndex="min"/>
|
||||
</RollingRandomAccessFile>
|
||||
<RollingRandomAccessFile name="DebugFile" fileName="logs/debug.log" filePattern="logs/debug-%i.log.gz">
|
||||
<PatternLayout pattern="[%d{ddMMMyyyy HH:mm:ss.SSS}] [%t/%level] [%logger/%markerSimpleName]: %minecraftFormatting{%msg}{strip}%n%xEx"/>
|
||||
<PatternLayout pattern="[%d{ddMMMyyyy HH:mm:ss.SSS}] [%t/%level] [%logger/%markerSimpleName]: %minecraftFormatting{%msg{nolookup}}{strip}%n%xEx"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy/>
|
||||
<SizeBasedTriggeringPolicy size="200MB"/>
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.test;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:shears"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:alternative",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"tag": "forge:shears"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "minecraft:acacia_leaves"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"chances": [
|
||||
0.05,
|
||||
0.0625,
|
||||
0.083333336,
|
||||
0.1
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "minecraft:acacia_sapling"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"chances": [
|
||||
0.02,
|
||||
0.022222223,
|
||||
0.025,
|
||||
0.033333335,
|
||||
0.1
|
||||
]
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": {
|
||||
"min": 1.0,
|
||||
"max": 2.0,
|
||||
"type": "minecraft:uniform"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term": {
|
||||
"condition": "minecraft:alternative",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"tag": "forge:shears"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:alternative",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"tag": "forge:shears"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "minecraft:birch_leaves"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"chances": [
|
||||
0.05,
|
||||
0.0625,
|
||||
0.083333336,
|
||||
0.1
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "minecraft:birch_sapling"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"chances": [
|
||||
0.02,
|
||||
0.022222223,
|
||||
0.025,
|
||||
0.033333335,
|
||||
0.1
|
||||
]
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": {
|
||||
"min": 1.0,
|
||||
"max": 2.0,
|
||||
"type": "minecraft:uniform"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term": {
|
||||
"condition": "minecraft:alternative",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"tag": "forge:shears"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:alternative",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"tag": "forge:shears"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "minecraft:cobweb"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"name": "minecraft:string"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loaded 100 of 767 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user