mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
425eff39ff | ||
|
|
34291c1fb2 | ||
|
|
4011c3fb07 | ||
|
|
104daf8ef0 | ||
|
|
d9a04b881a | ||
|
|
ae62362d49 | ||
|
|
2f8c3ea738 | ||
|
|
f0c2554b1c | ||
|
|
bb547a5748 | ||
|
|
5dd3842b77 | ||
|
|
2ab4685149 | ||
|
|
edbc07ed22 | ||
|
|
e225dbc8d1 | ||
|
|
117be913da | ||
|
|
512d4d7271 | ||
|
|
a9237cff75 | ||
|
|
bc24487d0e | ||
|
|
c3e0b071a2 | ||
|
|
21787234f4 | ||
|
|
a9958b19db | ||
|
|
b25d9562f2 | ||
|
|
2765c0d8d9 | ||
|
|
82a20911cb | ||
|
|
f19f7e4670 | ||
|
|
e10f5c637e | ||
|
|
4bfe562f14 | ||
|
|
5e64ef9ecb | ||
|
|
dda1be91ea | ||
|
|
4f4849b60c | ||
|
|
3b754fef5e | ||
|
|
5e295f2485 | ||
|
|
5c9258491f | ||
|
|
af87677516 | ||
|
|
a68c886ea2 | ||
|
|
b129e385cc | ||
|
|
fdc921923c | ||
|
|
476e20ae96 | ||
|
|
d63516f2ac | ||
|
|
fd522d38b0 | ||
|
|
5f0d4abf23 | ||
|
|
8e3e8b2120 | ||
|
|
72fd6808d8 | ||
|
|
2c35d04495 | ||
|
|
f704d65d5a | ||
|
|
6c6a4817e7 | ||
|
|
ef3408c1eb | ||
|
|
0ea593c50e | ||
|
|
643b972e97 | ||
|
|
93ce9e72f7 | ||
|
|
f1bafce275 | ||
|
|
75408c1a70 | ||
|
|
00fafb07ce | ||
|
|
e49a347aea | ||
|
|
2c8ca313a0 | ||
|
|
fe7dcdf637 | ||
|
|
15daa2955d | ||
|
|
03af8a53a2 | ||
|
|
c7e4e4b5b4 | ||
|
|
d477425f70 | ||
|
|
a3449f2866 | ||
|
|
2a1f98aec2 | ||
|
|
bc9bd40d03 | ||
|
|
58344b0b15 | ||
|
|
edcc8b3c97 | ||
|
|
d494ba9be4 | ||
|
|
b92f56503e | ||
|
|
5a9be79785 | ||
|
|
225c2125c6 | ||
|
|
e2a932108e | ||
|
|
ec38717702 | ||
|
|
3009f5350c | ||
|
|
a24dd3c8ee | ||
|
|
3fae26a470 | ||
|
|
a44ac01aee | ||
|
|
b09f8d0fc8 | ||
|
|
57a916bf09 | ||
|
|
15d3df2818 | ||
|
|
63a42bad98 | ||
|
|
28d3c491a0 | ||
|
|
551296813e | ||
|
|
62b99be117 | ||
|
|
6683e9e660 | ||
|
|
3b9df7df1b | ||
|
|
a9a8d7ed8c | ||
|
|
80770898c6 | ||
|
|
335cb5edc4 | ||
|
|
7259887176 | ||
|
|
0320c185b5 | ||
|
|
2f5f696b68 | ||
|
|
d33e9c8251 | ||
|
|
21c50da8ec | ||
|
|
e2a205d2e7 | ||
|
|
950e7b032a | ||
|
|
d1a55a147e | ||
|
|
1fd8b1a4b8 |
No files matched your search
Vendored
+104
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>MinecraftForge_Forge Config DSL Script</name>
|
||||
<groupId>MinecraftForge_Forge</groupId>
|
||||
<artifactId>MinecraftForge_Forge_dsl</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jetbrains-all</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>teamcity-server</id>
|
||||
<url>https://teamcity.minecraftforge.net/app/dsl-plugins-repository</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>JetBrains</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${basedir}</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<version>${kotlin.version}</version>
|
||||
|
||||
<configuration/>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<phase>process-test-sources</phase>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>teamcity-configs-maven-plugin</artifactId>
|
||||
<version>${teamcity.dsl.version}</version>
|
||||
<configuration>
|
||||
<format>kotlin</format>
|
||||
<dstDir>target/generated-configs</dstDir>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin</artifactId>
|
||||
<version>${teamcity.dsl.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin-plugins</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-script-runtime</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Vendored
+136
@@ -0,0 +1,136 @@
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.githubIssues
|
||||
|
||||
/*
|
||||
The settings script is an entry point for defining a TeamCity
|
||||
project hierarchy. The script should contain a single call to the
|
||||
project() function with a Project instance or an init function as
|
||||
an argument.
|
||||
|
||||
VcsRoots, BuildTypes, Templates, and subprojects can be
|
||||
registered inside the project using the vcsRoot(), buildType(),
|
||||
template(), and subProject() methods respectively.
|
||||
|
||||
To debug settings scripts in command-line, run the
|
||||
|
||||
mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
|
||||
|
||||
command and attach your debugger to the port 8000.
|
||||
|
||||
To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
|
||||
-> Tool Windows -> Maven Projects), find the generate task node
|
||||
(Plugins -> teamcity-configs -> teamcity-configs:generate), the
|
||||
'Debug' option is available in the context menu for the task.
|
||||
*/
|
||||
|
||||
version = "2021.2"
|
||||
|
||||
project {
|
||||
|
||||
buildType(Build)
|
||||
buildType(BuildSecondaryBranches)
|
||||
buildType(PullRequests)
|
||||
|
||||
params {
|
||||
text("docker_jdk_version", "17", label = "Gradle version", description = "The version of the JDK to use during execution of tasks in a JDK.", display = ParameterDisplay.HIDDEN, allowEmpty = false)
|
||||
text("docker_gradle_version", "7.4", label = "Gradle version", description = "The version of Gradle to use during execution of Gradle tasks.", display = ParameterDisplay.HIDDEN, allowEmpty = false)
|
||||
text("git_main_branch", "1.18.x", label = "Git Main Branch", description = "The git main or default branch to use in VCS operations.", display = ParameterDisplay.HIDDEN, allowEmpty = false)
|
||||
text("git_branch_spec", """
|
||||
+:refs/heads/(main*)
|
||||
+:refs/heads/(master*)
|
||||
+:refs/heads/(develop|release|staging|main|master)
|
||||
+:refs/heads/(1.*)
|
||||
""".trimIndent(), label = "The branch specification of the repository", description = "By default all main branches are build by the configuration. Modify this value to adapt the branches build.", display = ParameterDisplay.HIDDEN, allowEmpty = true)
|
||||
text("github_repository_name", "MinecraftForge", label = "The github repository name. Used to connect to it in VCS Roots.", description = "This is the repository slug on github. So for example `MinecraftForge` or `MinecraftForge`. It is interpolated into the global VCS Roots.", display = ParameterDisplay.HIDDEN, allowEmpty = false)
|
||||
text("env.PUBLISHED_JAVA_ARTIFACT_ID", "forge", label = "Published artifact id", description = "The maven coordinate artifact id that has been published by this build. Can not be empty.", allowEmpty = false)
|
||||
text("env.PUBLISHED_JAVA_FML_ARTIFACT_ID", "fmlonly", label = "Published fmlonly artifact id", description = "The maven coordinate artifact id for fml only that has been published by this build. Can not be empty.", allowEmpty = false)
|
||||
text("env.PUBLISHED_JAVA_FML_ARTIFACT_VERSION", "0.0.0-SNAPSHOT", label = "Published fmlonly artifact version", description = "The version for fml only that has been published by this build. Can not be empty.", allowEmpty = false)
|
||||
text("env.PUBLISHED_JAVA_GROUP", "net.minecraftforge", label = "Published group", description = "The maven coordinate group that has been published by this build. Can not be empty.", allowEmpty = false)
|
||||
//These are references and not actually keys
|
||||
password("env.CROWDIN_KEY", "credentialsJSON:a3102dbe-805d-4177-9f54-3d2c2eb08fd5", display = ParameterDisplay.HIDDEN)
|
||||
password("env.KEYSTORE_URL", "credentialsJSON:a7ae1c82-8058-4061-8d12-7f6bc2618d2e", display = ParameterDisplay.HIDDEN)
|
||||
password("env.KEYSTORE_PASSWORD", "credentialsJSON:d7b964e3-a1fd-47a8-b892-6f601fe47479", display = ParameterDisplay.HIDDEN)
|
||||
text("additional_publishing_gradle_parameters", "-PcrowdinKey=%env.CROWDIN_KEY% -PkeystoreKeyPass=%env.KEYSTORE_PASSWORD% -PkeystoreStorePass=%env.KEYSTORE_PASSWORD% -Pkeystore=%env.KEYSTORE_URL%", label = "Additional gradle parameters for publish", description = "Contains the additional gradle parameters used during publishing.", display = ParameterDisplay.HIDDEN, allowEmpty = true)
|
||||
|
||||
checkbox("should_execute_build", "false", label = "Should build", description = "Indicates if the build task should be executed.", display = ParameterDisplay.HIDDEN,
|
||||
checked = "true", unchecked = "false")
|
||||
checkbox("should_execute_test", "false", label = "Should build", description = "Indicates if the build task should be executed.", display = ParameterDisplay.HIDDEN,
|
||||
checked = "true", unchecked = "false")
|
||||
}
|
||||
|
||||
features {
|
||||
githubIssues {
|
||||
id = "MinecraftForge_MinecraftForge__IssueTracker"
|
||||
displayName = "MinecraftForge/MinecraftForge"
|
||||
repositoryURL = "https://github.com/MinecraftForge/MinecraftForge"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object Build : BuildType({
|
||||
templates(AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_BuildMainBranches"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"), AbsoluteId("MinecraftForge_BuildUsingGradle"), AbsoluteId("MinecraftForge_PublishProjectUsingGradle"), AbsoluteId("MinecraftForge_TriggersStaticFilesWebpageGenerator"))
|
||||
id("MinecraftForge_MinecraftForge__Build")
|
||||
name = "Build"
|
||||
description = "Builds and Publishes the main branches of the project."
|
||||
|
||||
features {
|
||||
feature {
|
||||
id = "trigger_fml_only_files_generator"
|
||||
type = "triggerBuildFeature"
|
||||
param("triggers", "MinecraftForge_FilesGenerator_GeneratePages")
|
||||
param("parameters", """
|
||||
env.PUBLISHED_JAVA_FML_ARTIFACT_ID~env.PUBLISHED_JAVA_ARTIFACT_ID
|
||||
env.PUBLISHED_JAVA_FML_ARTIFACT_VERSION~env.PUBLISHED_JAVA_ARTIFACT_VERSION
|
||||
env.PUBLISHED_JAVA_GROUP
|
||||
""".trimIndent())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
object BuildSecondaryBranches : BuildType({
|
||||
templates(AbsoluteId("MinecraftForge_ExcludesBuildingDefaultBranch"), AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_BuildMainBranches"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"), AbsoluteId("MinecraftForge_BuildUsingGradle"))
|
||||
id("MinecraftForge_MinecraftForge__BuildSecondaryBranches")
|
||||
name = "Build - Secondary Branches"
|
||||
description = "Builds and Publishes the secondary branches of the project."
|
||||
params {
|
||||
text("git_branch_spec", """
|
||||
+:refs/heads/(*)
|
||||
-:refs/heads/noci*
|
||||
""".trimIndent(), label = "The branch specification of the repository", description = "By default all main branches are build by the configuration. Modify this value to adapt the branches build.", display = ParameterDisplay.HIDDEN, allowEmpty = true)
|
||||
}
|
||||
vcs {
|
||||
branchFilter = """
|
||||
+:*
|
||||
-:1.*
|
||||
-:<default>
|
||||
""".trimIndent()
|
||||
}
|
||||
})
|
||||
|
||||
object PullRequests : BuildType({
|
||||
templates(AbsoluteId("MinecraftForge_BuildPullRequests"), AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"), AbsoluteId("MinecraftForge_BuildUsingGradle"))
|
||||
id("MinecraftForge_MinecraftForge__PullRequests")
|
||||
name = "Pull Requests"
|
||||
description = "Builds pull requests for the project"
|
||||
|
||||
params {
|
||||
checkbox("should_execute_build", "true", label = "Should build", description = "Indicates if the build task should be executed.", display = ParameterDisplay.HIDDEN,
|
||||
checked = "true", unchecked = "false")
|
||||
text(
|
||||
"gradle_build_task",
|
||||
"assemble",
|
||||
label = "Gradle build task to execute during build",
|
||||
description = "Determines the build task that is executed to build the project.",
|
||||
display = ParameterDisplay.HIDDEN,
|
||||
allowEmpty = false
|
||||
)
|
||||
}
|
||||
|
||||
vcs {
|
||||
branchFilter = """
|
||||
+:*
|
||||
-:1.*
|
||||
-:<default>
|
||||
""".trimIndent()
|
||||
}
|
||||
})
|
||||
+2
-16
@@ -1,16 +1,2 @@
|
||||
Minecraft Forge
|
||||
Copyright (c) 2016-${year}.
|
||||
|
||||
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
|
||||
Minecraft Forge - Forge Development LLC
|
||||
SPDX-License-Identifier: LGPL-2.1-only
|
||||
+71
-46
@@ -27,7 +27,7 @@ import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
plugins {
|
||||
id 'org.cadixdev.licenser' version '0.6.1'
|
||||
id 'com.github.ben-manes.versions' version '0.36.0'
|
||||
id 'net.minecraftforge.gradleutils' version '1.+'
|
||||
id 'net.minecraftforge.gradleutils' version '2.+'
|
||||
id 'eclipse'
|
||||
id 'de.undercouch.download' version '4.1.2'
|
||||
}
|
||||
@@ -44,17 +44,17 @@ ext {
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'official'
|
||||
MAPPING_VERSION = '1.18.1'
|
||||
MC_VERSION = '1.18.1'
|
||||
MCP_VERSION = '20211210.034407'
|
||||
MAPPING_VERSION = '1.18.2'
|
||||
MC_VERSION = '1.18.2'
|
||||
MCP_VERSION = '20220228.144236'
|
||||
SPI_VERSION = '4.0.10'
|
||||
ACCESSTRANSFORMERS_VERSION = '8.0.4'
|
||||
COREMODS_VERSION = '5.0.1'
|
||||
EVENTBUS_VERSION = '5.0.3'
|
||||
MODLAUNCHER_VERSION = '9.0.7'
|
||||
SECUREJARHANDLER_VERSION = '0.9.54'
|
||||
BOOTSTRAPLAUNCHER_VERSION = '0.1.17'
|
||||
ASM_VERSION = '9.1'
|
||||
MODLAUNCHER_VERSION = '9.1.3'
|
||||
SECUREJARHANDLER_VERSION = '1.0.3'
|
||||
BOOTSTRAPLAUNCHER_VERSION = '1.0.0'
|
||||
ASM_VERSION = '9.2'
|
||||
INSTALLER_VERSION = '2.1.+'
|
||||
MIXIN_VERSION = '0.8.5'
|
||||
|
||||
@@ -68,6 +68,7 @@ ext {
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.2.10'
|
||||
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.4'
|
||||
FART = 'net.minecraftforge:ForgeAutoRenamingTool:0.1.17:all'
|
||||
MIN_TAG_FOR_CHANGELOG = "39.0"
|
||||
}
|
||||
|
||||
println('Version: ' + VERSION +
|
||||
@@ -75,15 +76,16 @@ println('Version: ' + VERSION +
|
||||
' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ')' +
|
||||
' Arch: ' + System.getProperty('os.arch'))
|
||||
|
||||
changelog {
|
||||
fromTag MIN_TAG_FOR_CHANGELOG
|
||||
}
|
||||
|
||||
def extraTxts = [
|
||||
rootProject.file('CREDITS.txt'),
|
||||
rootProject.file('LICENSE.txt')
|
||||
rootProject.file('LICENSE.txt'),
|
||||
rootProject.tasks.createChangelog.outputFile
|
||||
]
|
||||
|
||||
def changelog = rootProject.file('build/changelog.txt')
|
||||
if (changelog.exists())
|
||||
extraTxts += changelog
|
||||
|
||||
task downloadVersionManifest(type: Download) {
|
||||
src 'https://launchermeta.mojang.com/mc/game/version_manifest_v2.json'
|
||||
dest file('build/versions/version_manifest.json')
|
||||
@@ -181,20 +183,7 @@ subprojects {
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
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'
|
||||
}
|
||||
} else {
|
||||
url 'file://' + rootProject.file('repo').getAbsolutePath()
|
||||
}
|
||||
}
|
||||
maven gradleutils.getPublishingForgeMaven()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,19 +266,12 @@ def sharedDeps = {
|
||||
installer 'com.electronwill.night-config:core:3.6.4'
|
||||
installer 'com.electronwill.night-config:toml:3.6.4'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.3'
|
||||
installer 'org.apache.commons:commons-lang3:3.12.0'
|
||||
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.0'
|
||||
installer 'org.jline:jline-reader:3.12.+' //Dep of TerminaalConsoleeAppender
|
||||
installer 'org.jline:jline-terminal:3.12.+' //Dep of TerminaalConsoleeAppender
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
installer "org.spongepowered:mixin:${MIXIN_VERSION}"
|
||||
installer 'org.openjdk.nashorn:nashorn-core:15.3'
|
||||
installer 'com.google.guava:guava:31.0.1-jre'
|
||||
installer 'com.google.code.gson:gson:2.8.8'
|
||||
|
||||
/*
|
||||
installer 'org.lwjgl:lwjgl:3.2.2'
|
||||
@@ -383,6 +365,9 @@ def sharedFmlonlyForge = { Project prj ->
|
||||
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
||||
|
||||
property 'nativesDirectory', '{natives}'
|
||||
if (prj.name == 'forge') {
|
||||
property 'forge.enableGameTest', 'true'
|
||||
}
|
||||
|
||||
args '--launchTarget', "${launchPrefix}clientuserdev"
|
||||
args '--version', 'MOD_DEV'
|
||||
@@ -394,9 +379,22 @@ def sharedFmlonlyForge = { Project prj ->
|
||||
environment 'MOD_CLASSES', '{source_roots}'
|
||||
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
||||
|
||||
if (prj.name == 'forge') {
|
||||
property 'forge.enableGameTest', 'true'
|
||||
}
|
||||
|
||||
args '--launchTarget', "${launchPrefix}serveruserdev"
|
||||
}
|
||||
|
||||
if (prj.name == 'forge') {
|
||||
gameTestServer {
|
||||
environment 'MOD_CLASSES', '{source_roots}'
|
||||
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
||||
|
||||
args '--launchTarget', "${launchPrefix}gametestserveruserdev"
|
||||
}
|
||||
}
|
||||
|
||||
data {
|
||||
environment 'MOD_CLASSES', '{source_roots}'
|
||||
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
||||
@@ -428,7 +426,7 @@ def sharedFmlonlyForge = { Project prj ->
|
||||
|
||||
// SecureJarHandler bootstrap values.
|
||||
run.property 'ignoreList', prj.configurations.moduleonly.files.collect {it.name.replaceAll(/([-_]([.\d]*\d+)|\.jar$)/, '') }.join(',') + ",client-extra,fmlcore,javafmllanguage,mclanguage,${prj.name}-"
|
||||
run.property 'mergeModules', 'jna-5.8.0.jar,jna-platform-58.0.jar,java-objc-bridge-1.0.0.jar'
|
||||
//run.property 'mergeModules', 'jna-5.10.0.jar,jna-platform-5.10.0.jar,java-objc-bridge-1.0.0.jar'
|
||||
if (userdevRuns.contains(run)) {
|
||||
run.property 'legacyClassPath.file', '{minecraft_classpath_file}'
|
||||
run.jvmArgs '-p', '{modules}'
|
||||
@@ -621,7 +619,7 @@ project(':fmlonly') {
|
||||
'--fml.forgeGroup', project.group,
|
||||
'--fml.mcpVersion', MCP_VERSION],
|
||||
jvm: ["-DignoreList=${fmlonly_client.properties.ignoreList},\${version_name}.jar",
|
||||
"-DmergeModules=${fmlonly_client.properties.mergeModules}",
|
||||
//"-DmergeModules=${fmlonly_client.properties.mergeModules}",
|
||||
'-DlibraryDirectory=${library_directory}',
|
||||
'-p', Util.getArtifacts(project, configurations.moduleonly, false).values().collect{"\${library_directory}/${it.downloads.artifact.path}"}.join('${classpath_separator}'),
|
||||
'--add-modules', 'ALL-MODULE-PATH',
|
||||
@@ -915,6 +913,7 @@ project(':forge') {
|
||||
implementation project(':fmlloader')
|
||||
implementation project(':javafmllanguage')
|
||||
implementation project(':mclanguage')
|
||||
runtimeOnly "cpw.mods:bootstraplauncher:${BOOTSTRAPLAUNCHER_VERSION}"
|
||||
}
|
||||
dependencies sharedDeps
|
||||
|
||||
@@ -941,6 +940,7 @@ project(':forge') {
|
||||
parent runs.forge_client
|
||||
taskName 'forge_test_client'
|
||||
|
||||
property 'forge.enableGameTest', 'true'
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.test"
|
||||
@@ -963,6 +963,7 @@ project(':forge') {
|
||||
parent runs.forge_server
|
||||
taskName 'forge_test_server'
|
||||
|
||||
property 'forge.enableGameTest', 'true'
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.test"
|
||||
@@ -972,6 +973,27 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
forge_gameTestServer {
|
||||
taskName 'forge_gameTestServer'
|
||||
args '--launchTarget', 'forgegametestserverdev'
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
|
||||
mods {
|
||||
minecraft { source sourceSets.main }
|
||||
}
|
||||
}
|
||||
|
||||
forge_test_gameTestServer {
|
||||
parent runs.forge_gameTestServer
|
||||
taskName 'forge_test_gameTestServer'
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.test"
|
||||
|
||||
mods {
|
||||
tests { sources sourceSets.test }
|
||||
}
|
||||
}
|
||||
|
||||
def forgeDataArgs = [
|
||||
'--mod', 'forge',
|
||||
'--all',
|
||||
@@ -1166,7 +1188,7 @@ project(':forge') {
|
||||
'--fml.forgeGroup', project.group,
|
||||
'--fml.mcpVersion', MCP_VERSION],
|
||||
jvm: ["-DignoreList=${forge_client.properties.ignoreList},\${version_name}.jar",
|
||||
"-DmergeModules=${forge_client.properties.mergeModules}",
|
||||
//"-DmergeModules=${forge_client.properties.mergeModules}",
|
||||
'-DlibraryDirectory=${library_directory}',
|
||||
'-p', Util.getArtifacts(project, configurations.moduleonly, false).values().collect{'${library_directory}/' + it.downloads.artifact.path}.join('${classpath_separator}'),
|
||||
'--add-modules', 'ALL-MODULE-PATH',
|
||||
@@ -1464,10 +1486,6 @@ project(':forge') {
|
||||
license {
|
||||
header = file("$rootDir/LICENSE-header.txt")
|
||||
|
||||
ext {
|
||||
year = new Date().format("yyyy")
|
||||
}
|
||||
|
||||
include 'net/minecraftforge/'
|
||||
exclude 'net/minecraftforge/server/terminalconsole/'
|
||||
exclude 'net/minecraftforge/api/' // exclude API here because it's validated in the SPI build
|
||||
@@ -1509,11 +1527,6 @@ project(':forge') {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact universalJar
|
||||
if (changelog.exists()) {
|
||||
artifact(changelog) {
|
||||
classifier = 'changelog'
|
||||
}
|
||||
}
|
||||
artifact installerJar
|
||||
//TODO: installer-win
|
||||
artifact makeMdk
|
||||
@@ -1533,3 +1546,15 @@ task setup() { //These must be strings so that we can do lazy resolution. Else
|
||||
dependsOn ':fmlonly:extractMapped'
|
||||
dependsOn ':forge:extractMapped'
|
||||
}
|
||||
|
||||
//Also output FMLOnly when building a version.
|
||||
if (System.env.TEAMCITY_VERSION) {
|
||||
//Only setup the CI environment if and only if the environment variables are set.
|
||||
tasks.configureTeamCity {
|
||||
doLast {
|
||||
println "##teamcity[buildNumber '${project(':forge').version}']"
|
||||
println "##teamcity[setParameter name='env.PUBLISHED_JAVA_ARTIFACT_VERSION' value='${project(':forge').version}']"
|
||||
println "##teamcity[setParameter name='env.PUBLISHED_JAVA_FML_ARTIFACT_VERSION' value='${project(':fmlonly').version}']"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# On the Contribution of an RF-lite Energy System: "Energy"
|
||||
Forge has acquired an Energy system, after many years of debate on the topic. The prevalence of the RF API has warranted the inclusion of a similar (but simpler) implementation to forge for 1.10.2 and onwards.
|
||||
Those who wish to use an RF like API, feel free to use it. If you don't want to think about Energy, but know you need it, you can use it *if you wish*. If you want to interoperate with other energy systems, feel free to use this to broker with them.
|
||||
|
||||
# On Diversity in Energy Systems
|
||||
Forge has always supported diversity in energy-like systems. If you have a burning desire to simulate electricity flow in all it's glory, we fully support you and look forward to playing your mod. If you wish to have pneumatic power, we have no objections, and would love to see your wonderful creations. If you have a power system of your own devising that is simply beyond our imagination, please, blow us away.
|
||||
|
||||
# On Modder Obligations
|
||||
As a modder, you are under *no* obligation to use or support the forge Energy system. If anyone, user, mod-pack maker or even us, tells you otherwise, refer them to this statement. The Forge energy system is not intended to supplant diversity in energy systems. It is not intended to be one-size-fits-all. The choice to support it, is the choice of the modder.
|
||||
-127
@@ -1,127 +0,0 @@
|
||||
# FML
|
||||
|
||||
Entrypoint : ```FMLServiceProvider.onLoad```
|
||||
|
||||
- Verify environment
|
||||
-- Check all libraries are present: ```accesstransformer```, ```coremod```, ```deobfuscator```
|
||||
-- Check versions are suitable: ```modlauncher```, ```accesstransformer```, ```coremod```, ```deobfuscator```
|
||||
- Find deobfuscated and patched MC
|
||||
-- If not found, trigger job to generate that (loaded later at FMLLaunchProvider.launch)
|
||||
|
||||
Injected arguments:
|
||||
|
||||
- ```mods``` : CSV list of mod files to load
|
||||
- ```modlist``` : JSON formatted list of mod files in a maven-like repository format
|
||||
|
||||
Entrypoint : ```FMLServiceProvider.initializer```
|
||||
- Setup paths
|
||||
-- ```mods``` folder
|
||||
-- ```config``` folder
|
||||
- FML config file read (JSON?)
|
||||
- Trigger initial loading
|
||||
|
||||
Entrypoint : ```FMLLaunchProvider.launch```
|
||||
- Launches the patched and deobfuscated game
|
||||
- - If that wasn't found it'll be generated from the vanilla jar and patch/deobf files (see above)
|
||||
- Possible we'll use an alternative launch for the development environment
|
||||
|
||||
(A goal is that we pre-generate this JAR during forge installation or modpack installation)
|
||||
|
||||
## Loading
|
||||
|
||||
- First we discover all mods
|
||||
- - IModLocator instances present in system are found and queried to compile a master list of all mod artifacts of the three types
|
||||
- LANGPROVIDERs are added to the supported language system : IModLanguageProvider
|
||||
- The MODS from the list have their META-INF/mods.json file queried for mod instances to load
|
||||
- - MODS are cross-referenced for their language being available
|
||||
- - MODS are cross-referenced for their libraries being available
|
||||
- - MODS are cross-referenced for their MOD dependencies being available
|
||||
- - MODS with META-INF/coremods.json specification are loaded into the COREMOD system
|
||||
- - MODS with META-INF/accesstransformer.json are loaded into the ACCESSTRANSFORMER system
|
||||
- - MODS are enqueued to the background loading system
|
||||
- FMLLaunchProvider will be triggered from the ModLauncher to start the game
|
||||
|
||||
## Game loading
|
||||
|
||||
- Events triggered from loadGame will launch various phases of modloading as before
|
||||
-- Deprecation of old "FML" events in favour of Forge events
|
||||
-- If a mod hasn't completed scanning there might be a pause waiting for it to complete before loading (testing indicates this should be a very rare occurrence and isn't worse than existing status quo where all scanning and loading is on-thread)
|
||||
|
||||
### ```IModLocator```
|
||||
|
||||
Finds mods from various sources of various types
|
||||
manifest is queried for type: FMLModType
|
||||
|
||||
- MOD : this file will be scanned as a mod. This is default if nothing is present
|
||||
- LIBRARY : this file will be added to the classpath and no further processing is done
|
||||
- LANGPROVIDER : this file will be loaded as a language provider
|
||||
|
||||
#### ```ModsFolderLocator```
|
||||
|
||||
- scans for jar files from mods folder
|
||||
-- able to load all types
|
||||
-- loads in all environments
|
||||
-- maybe able to do runtime name transformation for dev time?
|
||||
|
||||
Standard mechanism to find and load mods
|
||||
|
||||
#### ```ExplodedDirectoryLocator```
|
||||
|
||||
- loads a directory as a mod
|
||||
-- only able to load mods
|
||||
-- should only load in dev env
|
||||
|
||||
Intended as a mechanism to allow development of mods easily by pointing at a compiled output directory
|
||||
|
||||
#### ```ArgumentModsLocator``` : NYI
|
||||
|
||||
- loads mods from the arguments on the command line
|
||||
-- able to load all types
|
||||
-- loads in all environments
|
||||
|
||||
### ```IModLanguageProvider```
|
||||
|
||||
Provides mod and language provider services
|
||||
|
||||
- Provides a means to transform a Mod File (from the IModLocator) into a list of modcontainer objects based on mods.json
|
||||
- Scanning work will be done in background threads
|
||||
- Language providers can be provided as JARs via the modlocator for ease of distribution
|
||||
|
||||
#### ```FMLModLanguageProvider```
|
||||
|
||||
This is the standard Java @Mod implementation provider
|
||||
|
||||
- provided by default (always supported)
|
||||
- All scanning for @Mod will be done in the background thread
|
||||
|
||||
#### ```ScalaModLanguageProvider```
|
||||
|
||||
This is the scala language provider. It'll be provided separately as a JAR mod download.
|
||||
|
||||
- API contract will need definition
|
||||
|
||||
Other languages? Kotlin? Alternative Scala versions? Javascript?
|
||||
|
||||
## Coremods
|
||||
|
||||
Coremods are now forcefully separated into _injection_ and _runtime_ phases.
|
||||
|
||||
### Injection
|
||||
|
||||
Injection is the act of intercepting the loading of a class and modifying the inbound class with alterations such as additions, replacements and deletions
|
||||
|
||||
Injections will be written using Javascript. Two functions are required: a function providing the list of injection sites, and the function to transform the injection site.
|
||||
|
||||
All injection sites will need to be pre-specified by the coremod in their metadata. Lookup services should be provided in the Javascript API.
|
||||
|
||||
Javascript API for common coremod injection tasks needs to be developed, to allow common best-practice tooling for these complex tasks.
|
||||
|
||||
Runtime coremod code (code that has been injected) is Java as usual.
|
||||
|
||||
## Background loading thread
|
||||
|
||||
Early in loading, a background thread is triggered which will perform scanning tasks for common resources, such as @Mod instances and other annotations. This thread will also be responsible for loading any cached resources, either those defined at build time or pre-computed from previous runs. It may also be tasked with writing those precomputed resources.
|
||||
|
||||
There will be a IPreLoaderJobProvider that will allow extension of the scope of these tasks
|
||||
|
||||
|
||||
+3
-6
@@ -2,15 +2,15 @@
|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
| Version | Support |
|
||||
| ------------- | ------------- |
|
||||
| 1.17.x | Active |
|
||||
| 1.18.x | Active |
|
||||
| 1.16.x | LTS |
|
||||
|
||||
* [Download]
|
||||
@@ -18,9 +18,6 @@ Forge is a free, open-source modding API all of your favourite mods use!
|
||||
* [Discord]
|
||||
* [Documentation]
|
||||
|
||||
#### Notes:
|
||||
- Introduced in 1.13 was a new FML, information found [here](NewFML.md).
|
||||
|
||||
# Installing Forge
|
||||
|
||||
Go to [the Forge website](https://files.minecraftforge.net)
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
|
||||
<svg enable-background="new 164.072 372.466 294.41 46.56" version="1.1" viewBox="164.072 372.466 294.41 46.56" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#DFA86A">
|
||||
<polygon points="266.16 417.99 277.12 417.99 277.12 401.05 295.09 401.05 295.09 390.78 277.12 390.78 277.12 383.77 296.18 383.77 296.18 373.5 266.16 373.5"/>
|
||||
<path d="m337.33 378.7c-2.103-2.057-4.629-3.64-7.51-4.704-2.743-1.015-5.786-1.528-9.041-1.528l-0.356 2e-3c-3.362 0-6.503 0.556-9.338 1.651-2.857 1.106-5.357 2.707-7.434 4.761-2.073 2.052-3.714 4.559-4.877 7.45-1.158 2.876-1.748 6.104-1.748 9.59 0 3.417 0.59 6.582 1.753 9.403 1.163 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.834 1.096 5.975 1.651 9.339 1.651h0.023c3.402-0.043 6.57-0.639 9.42-1.772 2.863-1.142 5.375-2.757 7.465-4.804 2.091-2.051 3.742-4.524 4.91-7.358 1.162-2.823 1.75-5.987 1.75-9.402 0-3.487-0.588-6.705-1.748-9.568-1.168-2.874-2.82-5.371-4.913-7.425zm-4.644 16.762c0 1.96-0.302 3.782-0.896 5.413-0.587 1.607-1.42 3.011-2.479 4.167-1.05 1.147-2.335 2.065-3.821 2.728-1.479 0.656-3.164 0.99-5.008 0.99-1.84 0-3.514-0.333-4.973-0.988-1.47-0.662-2.747-1.578-3.799-2.729-1.062-1.156-1.895-2.559-2.479-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.298-3.497 0.887-5.044 0.584-1.536 1.419-2.894 2.479-4.037 1.048-1.132 2.323-2.03 3.792-2.674 1.465-0.642 3.145-0.968 4.988-0.968 1.848 0 3.539 0.326 5.025 0.971 1.481 0.643 2.766 1.541 3.812 2.671 1.062 1.143 1.896 2.501 2.479 4.036 0.589 1.548 0.889 3.245 0.889 5.044z"/>
|
||||
<path d="m376.27 395.65c1.902-2.327 2.867-5.221 2.867-8.603 0-2.614-0.508-4.84-1.506-6.613-0.997-1.762-2.354-3.188-4.035-4.234-1.603-0.995-3.445-1.705-5.482-2.114-1.938-0.388-3.969-0.583-6.037-0.583h-16.021v44.487h10.961v-17.282h2.35l9.447 17.282h13.127l-11.199-18.646c2.262-0.728 4.116-1.964 5.528-3.694zm-19.254-12.223h4.426c0.844 0 1.73 0.054 2.636 0.16 0.784 0.094 1.503 0.283 2.132 0.568 0.496 0.225 0.888 0.553 1.193 0.998 0.283 0.415 0.428 1.031 0.428 1.836 0 0.931-0.16 1.643-0.459 2.06-0.34 0.472-0.771 0.813-1.32 1.046-0.686 0.289-1.459 0.477-2.301 0.554-0.975 0.089-1.963 0.136-2.938 0.136h-3.795l-2e-3 -7.358z"/>
|
||||
<path d="m394.82 386.38c1.05-1.132 2.325-2.03 3.793-2.674 1.464-0.642 3.144-0.968 4.988-0.968 1.843 0 3.611 0.311 5.26 0.921 1.609 0.599 2.992 1.449 4.107 2.531l1.314 1.278 8.019-8.105-1.454-1.298c-2.355-2.103-5.066-3.586-8.058-4.407-2.879-0.789-5.987-1.189-9.247-1.189-3.361 0-6.503 0.556-9.339 1.651-2.856 1.106-5.355 2.707-7.431 4.761-2.074 2.052-3.716 4.559-4.88 7.45-1.158 2.876-1.746 6.104-1.746 9.59 0 3.417 0.59 6.582 1.752 9.403 1.164 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.832 1.096 5.975 1.651 9.339 1.651 6.501 0 12.475-1.432 17.751-4.25l0.979-0.522v-23.814h-19.313v10.27h8.354v6.639c-0.871 0.397-1.834 0.709-2.881 0.933-1.5 0.314-3.127 0.478-4.83 0.478-1.841 0-3.514-0.333-4.973-0.988-1.472-0.662-2.748-1.578-3.801-2.729-1.06-1.156-1.893-2.559-2.478-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.299-3.497 0.887-5.044 0.586-1.54 1.421-2.897 2.479-4.041z"/>
|
||||
<polygon points="437.69 407.72 437.69 400.36 456.41 400.36 456.41 390.09 437.69 390.09 437.69 383.77 457.44 383.77 457.44 373.5 426.72 373.5 426.72 417.99 458.48 417.99 458.48 407.72"/>
|
||||
</g>
|
||||
<path d="m243.63 379.09l-37.842-1.852 46.229-0.034v-3.727h-52.125l-1e-3 7.798v6.201c0 0.115-1.52-9.144-1.87-11.734h-4.098v13.029c0 0.123-1.753-10.888-1.939-12.264h-27.914c1.902 1.648 12.401 10.598 19.865 14.28 3.741 1.846 8.33 1.86 12.414 1.974 2.075 0.06 4.25 0.217 5.803 1.754 2.255 2.236 2.758 5.704 0.814 8.33-1.922 2.594-7.335 3.156-7.335 3.156l-4.509 5.531v6.424h10.251l0.319-6.348 8.863-6.285c-0.946 0.757-3.058 2.783-6.229 7.666-0.717 1.102-1.275 2.306-1.711 3.49 2.238-1.896 6.84-3.194 12.153-3.194 5.307 0 9.903 1.295 12.146 3.188-0.437-1.185-0.994-2.385-1.709-3.483-3.172-4.883-5.284-6.909-6.229-7.666l8.863 6.285 0.32 6.348h9.565v-6.424l-4.507-5.531s-6.675-0.425-8.423-3.156c-5.032-7.869 2.115-20.082 18.836-23.756z" fill="#1E2D41"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="164.072 372.466 294.41 46.56">
|
||||
<g fill="#DFA86A">
|
||||
<path d="M266.16 417.99h10.96v-16.94h17.97v-10.27h-17.97v-7.01h19.06V373.5h-30.02zM337.33 378.7c-2.103-2.057-4.629-3.64-7.51-4.704-2.743-1.015-5.786-1.528-9.041-1.528l-.356.002c-3.362 0-6.503.556-9.338 1.651-2.857 1.106-5.357 2.707-7.434 4.761-2.073 2.052-3.714 4.559-4.877 7.45-1.158 2.876-1.748 6.104-1.748 9.59 0 3.417.59 6.582 1.753 9.403 1.163 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.834 1.096 5.975 1.651 9.339 1.651h.023c3.402-.043 6.57-.639 9.42-1.772 2.863-1.142 5.375-2.757 7.465-4.804 2.091-2.051 3.742-4.524 4.91-7.358 1.162-2.823 1.75-5.987 1.75-9.402 0-3.487-.588-6.705-1.748-9.568-1.168-2.874-2.82-5.371-4.913-7.425zm-4.644 16.762c0 1.96-.302 3.782-.896 5.413-.587 1.607-1.42 3.011-2.479 4.167-1.05 1.147-2.335 2.065-3.821 2.728-1.479.656-3.164.99-5.008.99-1.84 0-3.514-.333-4.973-.988-1.47-.662-2.747-1.578-3.799-2.729-1.062-1.156-1.895-2.559-2.479-4.167-.595-1.63-.896-3.451-.896-5.413 0-1.801.298-3.497.887-5.044.584-1.536 1.419-2.894 2.479-4.037 1.048-1.132 2.323-2.03 3.792-2.674 1.465-.642 3.145-.968 4.988-.968 1.848 0 3.539.326 5.025.971 1.481.643 2.766 1.541 3.812 2.671 1.062 1.143 1.896 2.501 2.479 4.036.589 1.548.889 3.245.889 5.044zM376.27 395.65c1.902-2.327 2.867-5.221 2.867-8.603 0-2.614-.508-4.84-1.506-6.613-.997-1.762-2.354-3.188-4.035-4.234-1.603-.995-3.445-1.705-5.482-2.114-1.938-.388-3.969-.583-6.037-.583h-16.021v44.487h10.961v-17.282h2.35l9.447 17.282h13.127l-11.199-18.646c2.262-.728 4.116-1.964 5.528-3.694zm-19.254-12.223h4.426c.844 0 1.73.054 2.636.16.784.094 1.503.283 2.132.568.496.225.888.553 1.193.998.283.415.428 1.031.428 1.836 0 .931-.16 1.643-.459 2.06-.34.472-.771.813-1.32 1.046-.686.289-1.459.477-2.301.554-.975.089-1.963.136-2.938.136h-3.795l-.002-7.358z"/>
|
||||
<path d="M394.82 386.38c1.05-1.132 2.325-2.03 3.793-2.674 1.464-.642 3.144-.968 4.988-.968 1.843 0 3.611.311 5.26.921 1.609.599 2.992 1.449 4.107 2.531l1.314 1.278 8.019-8.105-1.454-1.298c-2.355-2.103-5.066-3.586-8.058-4.407-2.879-.789-5.987-1.189-9.247-1.189-3.361 0-6.503.556-9.339 1.651-2.856 1.106-5.355 2.707-7.431 4.761-2.074 2.052-3.716 4.559-4.88 7.45-1.158 2.876-1.746 6.104-1.746 9.59 0 3.417.59 6.582 1.752 9.403 1.164 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.832 1.096 5.975 1.651 9.339 1.651 6.501 0 12.475-1.432 17.751-4.25l.979-.522v-23.814h-19.313v10.27h8.354v6.639c-.871.397-1.834.709-2.881.933-1.5.314-3.127.478-4.83.478-1.841 0-3.514-.333-4.973-.988-1.472-.662-2.748-1.578-3.801-2.729-1.06-1.156-1.893-2.559-2.478-4.167-.595-1.63-.896-3.451-.896-5.413 0-1.801.299-3.497.887-5.044.586-1.54 1.421-2.897 2.479-4.041zM437.69 407.72v-7.36h18.72v-10.27h-18.72v-6.32h19.75V373.5h-30.72v44.49h31.76v-10.27z"/>
|
||||
</g>
|
||||
<path fill="#1E2D41" d="m243.63 379.09-37.842-1.852 46.229-.034v-3.727h-52.125l-.001 7.798v6.201c0 .115-1.52-9.144-1.87-11.734h-4.098v13.029c0 .123-1.753-10.888-1.939-12.264H164.07c1.902 1.648 12.401 10.598 19.865 14.28 3.741 1.846 8.33 1.86 12.414 1.974 2.075.06 4.25.217 5.803 1.754 2.255 2.236 2.758 5.704.814 8.33-1.922 2.594-7.335 3.156-7.335 3.156l-4.509 5.531v6.424h10.251l.319-6.348 8.863-6.285c-.946.757-3.058 2.783-6.229 7.666-.717 1.102-1.275 2.306-1.711 3.49 2.238-1.896 6.84-3.194 12.153-3.194 5.307 0 9.903 1.295 12.146 3.188-.437-1.185-.994-2.385-1.709-3.483-3.172-4.883-5.284-6.909-6.229-7.666l8.863 6.285.32 6.348h9.565v-6.424l-4.507-5.531s-6.675-.425-8.423-3.156c-5.032-7.869 2.115-20.082 18.836-23.756z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2021.
|
||||
* Copyright (c) 2016-2022.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -37,6 +37,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
@@ -85,7 +86,7 @@ public class ModList
|
||||
}
|
||||
|
||||
private String fileToLine(IModFile mf) {
|
||||
return String.format("%-50.50s|%-30.30s|%-30.30s|%-20.20s|%-10.10s|Manifest: %s", mf.getFileName(),
|
||||
return String.format(Locale.ENGLISH, "%-50.50s|%-30.30s|%-30.30s|%-20.20s|%-10.10s|Manifest: %s", mf.getFileName(),
|
||||
mf.getModInfos().get(0).getDisplayName(),
|
||||
mf.getModInfos().get(0).getModId(),
|
||||
mf.getModInfos().get(0).getVersion(),
|
||||
|
||||
@@ -81,6 +81,7 @@ public class ConfigFileTypeHandler {
|
||||
}
|
||||
|
||||
private boolean setupConfigFile(final ModConfig modConfig, final Path file, final ConfigFormat<?> conf) throws IOException {
|
||||
Files.createDirectories(file.getParent());
|
||||
Path p = defaultConfigPath.resolve(modConfig.getFileName());
|
||||
if (Files.exists(p)) {
|
||||
LOGGER.info(CONFIG, "Loading default config file from path {}", p);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2021.
|
||||
* Copyright (c) 2016-2022.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -27,6 +27,7 @@ import net.minecraftforge.fml.loading.StringUtils;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public class ModConfig
|
||||
@@ -54,7 +55,7 @@ public class ModConfig
|
||||
|
||||
private static String defaultConfigName(Type type, String modId) {
|
||||
// config file name would be "forge-client.toml" and "forge-server.toml"
|
||||
return String.format("%s-%s.toml", modId, type.extension());
|
||||
return String.format(Locale.ROOT, "%s-%s.toml", modId, type.extension());
|
||||
}
|
||||
public Type getType() {
|
||||
return type;
|
||||
|
||||
@@ -11,23 +11,24 @@ configurations.forEach{ it.transitive = false }
|
||||
|
||||
dependencies {
|
||||
implementation('net.sf.jopt-simple:jopt-simple:5.0.4')
|
||||
compileOnly('org.jetbrains:annotations:21.0.0')
|
||||
compileOnly('org.jetbrains:annotations:23.0.0')
|
||||
api("org.ow2.asm:asm:${ASM_VERSION}")
|
||||
api("org.ow2.asm:asm-tree:${ASM_VERSION}")
|
||||
api("org.ow2.asm:asm-commons:${ASM_VERSION}")
|
||||
api('net.minecraftforge:forgespi:4.0.+')
|
||||
api('org.apache.logging.log4j:log4j-api:2.14.1')
|
||||
api('org.apache.logging.log4j:log4j-api:2.17.0')
|
||||
api('org.slf4j:slf4j-api:1.8.0-beta4')
|
||||
api('com.google.guava:guava:21.0')
|
||||
api('com.google.code.gson:gson:2.8.0')
|
||||
api('com.google.code.gson:gson:2.8.9')
|
||||
api('org.apache.maven:maven-artifact:3.8.1')
|
||||
api('org.apache.commons:commons-lang3:3.8.1')
|
||||
api('com.electronwill.night-config:core:3.6.3')
|
||||
api('com.electronwill.night-config:toml:3.6.3')
|
||||
api('org.apache.commons:commons-lang3:3.12.0')
|
||||
api('com.electronwill.night-config:core:3.6.4')
|
||||
api('com.electronwill.night-config:toml:3.6.4')
|
||||
api('cpw.mods:modlauncher:9.0.+')
|
||||
api('net.minecraftforge:coremods:5.0.+')
|
||||
implementation("cpw.mods:securejarhandler:${SECUREJARHANDLER_VERSION}")
|
||||
implementation('org.apache.logging.log4j:log4j-core:2.14.1')
|
||||
annotationProcessor('org.apache.logging.log4j:log4j-core:2.14.1')
|
||||
implementation('org.apache.logging.log4j:log4j-core:2.17.0')
|
||||
annotationProcessor('org.apache.logging.log4j:log4j-core:2.17.0')
|
||||
implementation('net.minecraftforge:accesstransformers:8.0.4')
|
||||
implementation('net.minecrell:terminalconsoleappender:1.2.0')
|
||||
// implementation('org.jline:jline:3.12.+')
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.stream.Collectors.*;
|
||||
@@ -233,6 +234,13 @@ public class ModSorter
|
||||
LOGGER.debug(LOADING, "Found {} mod requirements missing ({} mandatory, {} optional)", missingVersions.size(), mandatoryMissing, missingVersions.size() - mandatoryMissing);
|
||||
|
||||
if (!missingVersions.isEmpty()) {
|
||||
if (mandatoryMissing > 0) {
|
||||
LOGGER.error(LOADING, "Missing mandatory dependencies: {}", missingVersions.stream().filter(IModInfo.ModVersion::isMandatory).map(IModInfo.ModVersion::getModId).collect(Collectors.joining(", ")));
|
||||
}
|
||||
if (missingVersions.size() - mandatoryMissing > 0) {
|
||||
LOGGER.error(LOADING, "Unsupported installed optional dependencies: {}", missingVersions.stream().filter(ver -> !ver.isMandatory()).map(IModInfo.ModVersion::getModId).collect(Collectors.joining(", ")));
|
||||
}
|
||||
|
||||
return missingVersions.stream()
|
||||
.map(mv -> new ExceptionData(mv.isMandatory() ? "fml.modloading.missingdependency" : "fml.modloading.missingdependency.optional",
|
||||
mv.getOwner(), mv.getModId(), mv.getOwner().getModId(), mv.getVersionRange(),
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package net.minecraftforge.fml.loading.log4j;
|
||||
|
||||
import cpw.mods.modlauncher.api.NamedPath;
|
||||
import cpw.mods.modlauncher.serviceapi.ILaunchPluginService;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class SLF4JFixerLaunchPluginService implements ILaunchPluginService {
|
||||
private static final EnumSet<Phase> NO_PHASES = EnumSet.noneOf(Phase.class);
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "slf4jfixer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<Phase> handlesClass(Type classType, boolean isEmpty) {
|
||||
return NO_PHASES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeLaunch(ITransformerLoader transformerLoader, NamedPath[] specialPaths) {
|
||||
Thread curThread = Thread.currentThread();
|
||||
ClassLoader contextClassLoader = curThread.getContextClassLoader();
|
||||
|
||||
// Set the CCL of the current thread to MC-BOOTSTRAP ModuleClassLoader
|
||||
curThread.setContextClassLoader(this.getClass().getClassLoader());
|
||||
|
||||
// Force SLF4J to bind the service providers while we manually set the context classloader to be correct
|
||||
LoggerFactory.getILoggerFactory();
|
||||
|
||||
// Set CCL back to TransformingClassLoader
|
||||
curThread.setContextClassLoader(contextClassLoader);
|
||||
}
|
||||
}
|
||||
+2
-69
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2021.
|
||||
* Copyright (c) 2016-2022.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -43,10 +43,8 @@ import java.util.jar.Manifest;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public abstract class AbstractJarFileLocator implements IModLocator {
|
||||
public abstract class AbstractJarFileLocator extends AbstractModLocator {
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
protected static final String MODS_TOML = "META-INF/mods.toml";
|
||||
protected static final String MANIFEST = "META-INF/MANIFEST.MF";
|
||||
|
||||
@Override
|
||||
public void scanFile(final IModFile file, final Consumer<Path> pathConsumer) {
|
||||
@@ -70,69 +68,4 @@ public abstract class AbstractJarFileLocator implements IModLocator {
|
||||
}
|
||||
|
||||
public abstract Stream<Path> scanCandidates();
|
||||
|
||||
@Override
|
||||
public boolean isValid(final IModFile modFile) {
|
||||
return true;
|
||||
}
|
||||
|
||||
private Optional<IModFile> createMod(Path path) {
|
||||
var mjm = new ModJarMetadata();
|
||||
var sj = SecureJar.from(
|
||||
Manifest::new,
|
||||
jar -> jar.findFile(MODS_TOML).isPresent() ? mjm : JarMetadata.from(jar, path),
|
||||
(root, p) -> true,
|
||||
path
|
||||
);
|
||||
|
||||
IModFile mod = null;
|
||||
var type = sj.getManifest().getMainAttributes().getValue(ModFile.TYPE);
|
||||
if (sj.findFile(MODS_TOML).isPresent()) {
|
||||
LOGGER.debug(LogMarkers.SCAN, "Found {} mod of type {}: {}", MODS_TOML, type, path);
|
||||
mod = new ModFile(sj, this, ModFileParser::modsTomlParser);
|
||||
} else if (type != null) {
|
||||
LOGGER.debug(LogMarkers.SCAN, "Found {} mod of type {}: {}", MANIFEST, type, path);
|
||||
mod = new ModFile(sj, this, this::manifestParser);
|
||||
} else {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
mjm.setModFile(mod);
|
||||
return Optional.ofNullable(mod);
|
||||
}
|
||||
|
||||
private IModFileInfo manifestParser(final IModFile mod) {
|
||||
Function<String, Optional<String>> cfg = name -> Optional.ofNullable(mod.getSecureJar().getManifest().getMainAttributes().getValue(name));
|
||||
var license = cfg.apply("LICENSE").orElse("");
|
||||
var dummy = new IConfigurable() {
|
||||
@Override
|
||||
public <T> Optional<T> getConfigElement(String... key) {
|
||||
return Optional.empty();
|
||||
}
|
||||
@Override
|
||||
public List<? extends IConfigurable> getConfigList(String... key) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
};
|
||||
|
||||
return new IModFileInfo() {
|
||||
@Override public List<IModInfo> getMods() { return Collections.emptyList(); }
|
||||
@Override public List<LanguageSpec> requiredLanguageLoaders() { return Collections.emptyList(); }
|
||||
@Override public boolean showAsResourcePack() { return false; }
|
||||
@Override public Map<String, Object> getFileProperties() { return Collections.emptyMap(); }
|
||||
@Override public String getLicense() { return license; }
|
||||
@Override public IModFile getFile() { return mod; }
|
||||
@Override public IConfigurable getConfig() { return dummy; }
|
||||
|
||||
// These Should never be called as it's only called from ModJarMetadata.version and we bypass that
|
||||
@Override public String moduleName() { return mod.getSecureJar().name(); }
|
||||
@Override public String versionString() { return null; }
|
||||
@Override public List<String> usesServices() { return null; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IModFileInfo(" + mod.getFilePath() + ")";
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2022.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import cpw.mods.jarhandling.JarMetadata;
|
||||
import cpw.mods.jarhandling.SecureJar;
|
||||
import net.minecraftforge.fml.loading.LogMarkers;
|
||||
import net.minecraftforge.forgespi.language.IConfigurable;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import net.minecraftforge.forgespi.locating.IModLocator;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import java.util.jar.Manifest;
|
||||
|
||||
public abstract class AbstractModLocator implements IModLocator {
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
protected static final String MODS_TOML = "META-INF/mods.toml";
|
||||
protected static final String MANIFEST = "META-INF/MANIFEST.MF";
|
||||
|
||||
protected Optional<IModFile> createMod(Path... path) {
|
||||
var mjm = new ModJarMetadata();
|
||||
var sj = SecureJar.from(
|
||||
Manifest::new,
|
||||
jar -> jar.findFile(MODS_TOML).isPresent() ? mjm : JarMetadata.from(jar, path),
|
||||
(root, p) -> true,
|
||||
path
|
||||
);
|
||||
|
||||
IModFile mod;
|
||||
var type = sj.getManifest().getMainAttributes().getValue(ModFile.TYPE);
|
||||
if (sj.findFile(MODS_TOML).isPresent()) {
|
||||
LOGGER.debug(LogMarkers.SCAN, "Found {} mod of type {}: {}", MODS_TOML, type, path);
|
||||
mod = new ModFile(sj, this, ModFileParser::modsTomlParser);
|
||||
} else if (type != null) {
|
||||
LOGGER.debug(LogMarkers.SCAN, "Found {} mod of type {}: {}", MANIFEST, type, path);
|
||||
mod = new ModFile(sj, this, this::manifestParser);
|
||||
} else {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
mjm.setModFile(mod);
|
||||
return Optional.of(mod);
|
||||
}
|
||||
|
||||
protected IModFileInfo manifestParser(final IModFile mod) {
|
||||
Function<String, Optional<String>> cfg = name -> Optional.ofNullable(mod.getSecureJar().getManifest().getMainAttributes().getValue(name));
|
||||
var license = cfg.apply("LICENSE").orElse("");
|
||||
var dummy = new IConfigurable() {
|
||||
@Override
|
||||
public <T> Optional<T> getConfigElement(String... key) {
|
||||
return Optional.empty();
|
||||
}
|
||||
@Override
|
||||
public List<? extends IConfigurable> getConfigList(String... key) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
};
|
||||
|
||||
return new IModFileInfo() {
|
||||
@Override public List<IModInfo> getMods() { return Collections.emptyList(); }
|
||||
@Override public List<LanguageSpec> requiredLanguageLoaders() { return Collections.emptyList(); }
|
||||
@Override public boolean showAsResourcePack() { return false; }
|
||||
@Override public Map<String, Object> getFileProperties() { return Collections.emptyMap(); }
|
||||
@Override public String getLicense() { return license; }
|
||||
@Override public IModFile getFile() { return mod; }
|
||||
@Override public IConfigurable getConfig() { return dummy; }
|
||||
|
||||
// These Should never be called as it's only called from ModJarMetadata.version and we bypass that
|
||||
@Override public String moduleName() { return mod.getSecureJar().name(); }
|
||||
@Override public String versionString() { return null; }
|
||||
@Override public List<String> usesServices() { return null; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IModFileInfo(" + mod.getFilePath() + ")";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(final IModFile modFile) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
-1
@@ -51,7 +51,6 @@ public class BackgroundScanHandler
|
||||
private ScanStatus status;
|
||||
private LoadingModList loadingModList;
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public BackgroundScanHandler(final List<ModFile> modFiles) {
|
||||
this.modFiles = modFiles;
|
||||
modContentScanner = Executors.newSingleThreadExecutor(r -> {
|
||||
|
||||
+4
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2021.
|
||||
* Copyright (c) 2016-2022.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -21,13 +21,15 @@ package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class InvalidModFileException extends RuntimeException
|
||||
{
|
||||
private final IModFileInfo modFileInfo;
|
||||
|
||||
public InvalidModFileException(String message, IModFileInfo modFileInfo)
|
||||
{
|
||||
super(String.format("%s (%s)", message, ((ModFileInfo)modFileInfo).getFile().getFileName()));
|
||||
super(String.format(Locale.ENGLISH, "%s (%s)", message, ((ModFileInfo)modFileInfo).getFile().getFileName()));
|
||||
this.modFileInfo = modFileInfo;
|
||||
}
|
||||
}
|
||||
+22
-7
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2022.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import com.electronwill.nightconfig.core.Config;
|
||||
@@ -18,7 +37,7 @@ import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class MinecraftLocator implements IModLocator {
|
||||
public class MinecraftLocator extends AbstractModLocator {
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
@Override
|
||||
@@ -31,7 +50,8 @@ public class MinecraftLocator implements IModLocator {
|
||||
.map(sj -> new ModFile(sj, this, ModFileParser::modsTomlParser))
|
||||
.collect(Collectors.<IModFile>toList());
|
||||
var othermods = baseMC.otherModPaths().stream()
|
||||
.map(p->ModJarMetadata.buildFile(this, p.toArray(Path[]::new)))
|
||||
.map(p -> createMod(p.toArray(Path[]::new)).orElse(null))
|
||||
.filter(Objects::nonNull)
|
||||
.toList();
|
||||
artifacts.add(mcjar);
|
||||
artifacts.addAll(othermods);
|
||||
@@ -112,9 +132,4 @@ public class MinecraftLocator implements IModLocator {
|
||||
public void initArguments(final Map<String, ?> arguments) {
|
||||
// no op
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(final IModFile modFile) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,8 @@ public class ModInfo implements IModInfo, IConfigurable
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final DefaultArtifactVersion DEFAULT_VERSION = new DefaultArtifactVersion("1");
|
||||
private static final Pattern VALID_LABEL = Pattern.compile("^[a-z][a-z0-9_-]{1,63}$");
|
||||
private static final Pattern VALID_MODID = Pattern.compile("^[a-z][a-z0-9_]{1,63}$");
|
||||
private static final Pattern VALID_NAMESPACE = Pattern.compile("^[a-z][a-z0-9_.-]{1,63}$");
|
||||
|
||||
private final ModFileInfo owningFile;
|
||||
private final String modId;
|
||||
@@ -64,13 +65,13 @@ public class ModInfo implements IModInfo, IConfigurable
|
||||
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());
|
||||
if (!VALID_MODID.matcher(this.modId).matches()) {
|
||||
LOGGER.fatal("Invalid modId found in file {} - {} does not match the standard: {}", this.owningFile.getFile().getFilePath(), this.modId, VALID_MODID.pattern());
|
||||
throw new InvalidModFileException("Invalid modId found : " + this.modId, owningFile);
|
||||
}
|
||||
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());
|
||||
if (!VALID_NAMESPACE.matcher(this.namespace).matches()) {
|
||||
LOGGER.fatal("Invalid override namespace found in file {} - {} does not match the standard: {}", this.owningFile.getFile().getFilePath(), this.namespace, VALID_NAMESPACE.pattern());
|
||||
throw new InvalidModFileException("Invalid override namespace found : " + this.namespace, owningFile);
|
||||
}
|
||||
this.version = config.<String>getConfigElement("version")
|
||||
|
||||
+13
-23
@@ -17,33 +17,23 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
package net.minecraftforge.server.permission.context;
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public class WorldContext extends Context
|
||||
{
|
||||
private final Level world;
|
||||
|
||||
public WorldContext(Level w)
|
||||
{
|
||||
world = Preconditions.checkNotNull(w, "World can't be null in WorldContext!");
|
||||
}
|
||||
public class ForgeGametestDevLaunchHandler extends CommonDevLaunchHandler {
|
||||
@Override public String name() { return "forgegametestserverdev"; }
|
||||
@Override public Dist getDist() { return Dist.DEDICATED_SERVER; }
|
||||
|
||||
@Override
|
||||
public Level getWorld()
|
||||
{
|
||||
return world;
|
||||
}
|
||||
public Callable<Void> launchService(String[] arguments, ModuleLayer layer) {
|
||||
return () -> {
|
||||
var args = preLaunch(arguments, layer);
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Player getPlayer()
|
||||
{
|
||||
return null;
|
||||
Class.forName(layer.findModule("forge").orElseThrow(), "net.minecraftforge.gametest.GameTestMain").getMethod("main", String[].class).invoke(null, (Object)args);
|
||||
return null;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-23
@@ -17,33 +17,23 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
package net.minecraftforge.server.permission.context;
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public class TargetContext extends PlayerContext
|
||||
{
|
||||
private final Entity target;
|
||||
|
||||
public TargetContext(Player ep, @Nullable Entity entity)
|
||||
{
|
||||
super(ep);
|
||||
target = entity;
|
||||
}
|
||||
public class ForgeGametestUserdevLaunchHandler extends ForgeUserdevLaunchHandler {
|
||||
@Override public String name() { return "forgegametestserveruserdev"; }
|
||||
@Override public Dist getDist() { return Dist.DEDICATED_SERVER; }
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T> T get(ContextKey<T> key)
|
||||
{
|
||||
return key.equals(ContextKeys.TARGET) ? (T) target : super.get(key);
|
||||
}
|
||||
public Callable<Void> launchService(String[] arguments, ModuleLayer layer) {
|
||||
return () -> {
|
||||
var args = preLaunch(arguments, layer);
|
||||
|
||||
@Override
|
||||
protected boolean covers(ContextKey<?> key)
|
||||
{
|
||||
return target != null && key.equals(ContextKeys.TARGET);
|
||||
Class.forName(layer.findModule("forge").orElseThrow(), "net.minecraftforge.gametest.GameTestMain").getMethod("main", String[].class).invoke(null, (Object)args);
|
||||
return null;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -14,3 +14,5 @@ net.minecraftforge.fml.loading.targets.ForgeServerDevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeServerUserdevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeDataDevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeDataUserdevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeGametestDevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeGametestUserdevLaunchHandler
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
net.minecraftforge.fml.loading.log4j.SLF4JFixerLaunchPluginService
|
||||
net.minecraftforge.fml.loading.RuntimeDistCleaner
|
||||
net.minecraftforge.fml.common.asm.RuntimeEnumExtender
|
||||
net.minecraftforge.fml.common.asm.ObjectHolderDefinalize
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
+39
-16
@@ -8,10 +8,13 @@ buildscript {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
plugins {
|
||||
id 'eclipse'
|
||||
id 'maven-publish'
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
|
||||
|
||||
version = '1.0'
|
||||
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
@@ -20,17 +23,19 @@ archivesBaseName = 'modid'
|
||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
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.
|
||||
// Channel: Version:
|
||||
// snapshot YYYYMMDD Snapshot are built nightly.
|
||||
// stable # Stables are built at the discretion of the MCP team.
|
||||
// official MCVersion Official field/method names from Mojang mapping files
|
||||
// official MCVersion Official field/method names from Mojang mapping files
|
||||
// parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
|
||||
//
|
||||
// You must be aware of the Mojang license when using the 'official' mappings.
|
||||
// You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
|
||||
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||
//
|
||||
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
|
||||
// Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
|
||||
//
|
||||
// Use non-default mappings at your own risk. They may not always work.
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
mappings channel: '@MAPPING_CHANNEL@', version: '@MAPPING_VERSION@'
|
||||
@@ -55,6 +60,9 @@ minecraft {
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||
property 'forge.enabledGameTestNamespaces', 'examplemod'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
@@ -65,6 +73,26 @@ minecraft {
|
||||
server {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||
property 'forge.enabledGameTestNamespaces', 'examplemod'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This run config launches GameTestServer and runs all registered gametests, then exits.
|
||||
// By default, the server will crash when no gametests are provided.
|
||||
// The gametest system is also enabled by default for other run configs under the /test command.
|
||||
gameTestServer {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
// The markers can be added/remove as needed separated by commas.
|
||||
// "SCAN": For mods scan.
|
||||
@@ -77,6 +105,9 @@ minecraft {
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||
property 'forge.enabledGameTestNamespaces', 'examplemod'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
@@ -87,16 +118,8 @@ minecraft {
|
||||
data {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
// The markers can be added/remove as needed separated by commas.
|
||||
// "SCAN": For mods scan.
|
||||
// "REGISTRIES": For firing of registry events.
|
||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
// Recommended logging level for the console
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.example.examplemod;
|
||||
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -12,8 +13,7 @@ import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -21,10 +21,11 @@ import java.util.stream.Collectors;
|
||||
@Mod("examplemod")
|
||||
public class ExampleMod
|
||||
{
|
||||
// Directly reference a log4j logger.
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
// Directly reference a slf4j logger
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
public ExampleMod() {
|
||||
public ExampleMod()
|
||||
{
|
||||
// Register the setup method for modloading
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
|
||||
// Register the enqueueIMC method for modloading
|
||||
@@ -45,31 +46,35 @@ public class ExampleMod
|
||||
|
||||
private void enqueueIMC(final InterModEnqueueEvent event)
|
||||
{
|
||||
// some example code to dispatch IMC to another mod
|
||||
// Some example code to dispatch IMC to another mod
|
||||
InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
|
||||
}
|
||||
|
||||
private void processIMC(final InterModProcessEvent event)
|
||||
{
|
||||
// some example code to receive and process InterModComms from other mods
|
||||
// Some example code to receive and process InterModComms from other mods
|
||||
LOGGER.info("Got IMC {}", event.getIMCStream().
|
||||
map(m->m.messageSupplier().get()).
|
||||
collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
// You can use SubscribeEvent and let the Event Bus discover methods to call
|
||||
@SubscribeEvent
|
||||
public void onServerStarting(ServerStartingEvent event) {
|
||||
// do something when the server starts
|
||||
public void onServerStarting(ServerStartingEvent event)
|
||||
{
|
||||
// Do something when the server starts
|
||||
LOGGER.info("HELLO from server starting");
|
||||
}
|
||||
|
||||
// You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
|
||||
// Event bus for receiving Registry Events)
|
||||
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
|
||||
public static class RegistryEvents {
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public static class RegistryEvents
|
||||
{
|
||||
@SubscribeEvent
|
||||
public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
|
||||
// register a new block here
|
||||
public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent)
|
||||
{
|
||||
// Register a new block here
|
||||
LOGGER.info("HELLO from Register Block");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "examplemod resources",
|
||||
"pack_format": 8
|
||||
"pack_format": 9
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/com/mojang/blaze3d/vertex/VertexConsumer.java
|
||||
+++ b/com/mojang/blaze3d/vertex/VertexConsumer.java
|
||||
@@ -16,7 +_,7 @@
|
||||
@@ -14,7 +_,7 @@
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public interface VertexConsumer {
|
||||
+public interface VertexConsumer extends net.minecraftforge.client.extensions.IForgeVertexConsumer {
|
||||
Logger f_85943_ = LogManager.getLogger();
|
||||
|
||||
VertexConsumer m_5483_(double p_85945_, double p_85946_, double p_85947_);
|
||||
@@ -105,11 +_,12 @@
|
||||
|
||||
VertexConsumer m_6122_(int p_85973_, int p_85974_, int p_85975_, int p_85976_);
|
||||
@@ -101,11 +_,12 @@
|
||||
f5 = afloat[k] * p_86001_;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/SharedConstants.java
|
||||
+++ b/net/minecraft/SharedConstants.java
|
||||
@@ -184,6 +_,7 @@
|
||||
@@ -183,6 +_,7 @@
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/Util.java
|
||||
+++ b/net/minecraft/Util.java
|
||||
@@ -158,6 +_,9 @@
|
||||
@@ -155,6 +_,9 @@
|
||||
return 255;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
public static ExecutorService m_183988_() {
|
||||
return f_137443_;
|
||||
}
|
||||
@@ -236,7 +_,7 @@
|
||||
@@ -233,7 +_,7 @@
|
||||
try {
|
||||
type = DataFixers.m_14512_().getSchema(DataFixUtils.makeKey(SharedConstants.m_183709_().getWorldVersion())).getChoiceType(p_137552_, p_137553_);
|
||||
} catch (IllegalArgumentException illegalargumentexception) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/critereon/ItemPredicate.java
|
||||
+++ b/net/minecraft/advancements/critereon/ItemPredicate.java
|
||||
@@ -29,6 +_,8 @@
|
||||
@@ -28,6 +_,8 @@
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
|
||||
public class ItemPredicate {
|
||||
@@ -8,8 +8,8 @@
|
||||
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> unmod_predicates = java.util.Collections.unmodifiableMap(custom_predicates);
|
||||
public static final ItemPredicate f_45028_ = new ItemPredicate();
|
||||
@Nullable
|
||||
private final Tag<Item> f_45029_;
|
||||
@@ -108,6 +_,11 @@
|
||||
private final TagKey<Item> f_45029_;
|
||||
@@ -107,6 +_,11 @@
|
||||
public static ItemPredicate m_45051_(@Nullable JsonElement p_45052_) {
|
||||
if (p_45052_ != null && !p_45052_.isJsonNull()) {
|
||||
JsonObject jsonobject = GsonHelper.m_13918_(p_45052_, "item");
|
||||
@@ -21,7 +21,7 @@
|
||||
MinMaxBounds.Ints minmaxbounds$ints = MinMaxBounds.Ints.m_55373_(jsonobject.get("count"));
|
||||
MinMaxBounds.Ints minmaxbounds$ints1 = MinMaxBounds.Ints.m_55373_(jsonobject.get("durability"));
|
||||
if (jsonobject.has("data")) {
|
||||
@@ -219,6 +_,14 @@
|
||||
@@ -214,6 +_,14 @@
|
||||
} else {
|
||||
return new ItemPredicate[0];
|
||||
}
|
||||
|
||||
@@ -25,20 +25,20 @@
|
||||
if (p_90897_ != 1 && (p_90897_ != 2 || !this.f_90868_)) {
|
||||
if (p_90897_ == 0) {
|
||||
- aboolean[0] = screen.m_7920_(p_90895_, p_90896_, p_90898_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyReleasedPre(this.f_90867_.f_91080_, p_90895_, p_90896_, p_90898_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyReleasedPre(screen, p_90895_, p_90896_, p_90898_);
|
||||
+ if (!aboolean[0]) aboolean[0] = screen.m_7920_(p_90895_, p_90896_, p_90898_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyReleasedPost(this.f_90867_.f_91080_, p_90895_, p_90896_, p_90898_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyReleasedPost(screen, p_90895_, p_90896_, p_90898_);
|
||||
}
|
||||
} else {
|
||||
screen.m_169416_();
|
||||
- aboolean[0] = screen.m_7933_(p_90895_, p_90896_, p_90898_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyPressedPre(this.f_90867_.f_91080_, p_90895_, p_90896_, p_90898_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyPressedPre(screen, p_90895_, p_90896_, p_90898_);
|
||||
+ if (!aboolean[0]) aboolean[0] = screen.m_7933_(p_90895_, p_90896_, p_90898_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyPressedPost(this.f_90867_.f_91080_, p_90895_, p_90896_, p_90898_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenKeyPressedPost(screen, p_90895_, p_90896_, p_90898_);
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", screen.getClass().getCanonicalName());
|
||||
@@ -406,7 +_,7 @@
|
||||
@@ -406,22 +_,26 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,22 +47,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,12 +_,16 @@
|
||||
private void m_90889_(long p_90890_, int p_90891_, int p_90892_) {
|
||||
if (p_90890_ == this.f_90867_.m_91268_().m_85439_()) {
|
||||
- GuiEventListener guieventlistener = this.f_90867_.f_91080_;
|
||||
+ Screen guieventlistener = this.f_90867_.f_91080_;
|
||||
if (guieventlistener != null && this.f_90867_.m_91265_() == null) {
|
||||
if (Character.charCount(p_90891_) == 1) {
|
||||
Screen.m_96579_(() -> {
|
||||
- guieventlistener.m_5534_((char)p_90891_, p_90892_);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPre(this.f_90867_.f_91080_, (char)p_90891_, p_90892_)) return;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPre(guieventlistener, (char)p_90891_, p_90892_)) return;
|
||||
+ if (guieventlistener.m_5534_((char)p_90891_, p_90892_)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPost(this.f_90867_.f_91080_, (char)p_90891_, p_90892_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPost(guieventlistener, (char)p_90891_, p_90892_);
|
||||
}, "charTyped event handler", guieventlistener.getClass().getCanonicalName());
|
||||
} else {
|
||||
for(char c0 : Character.toChars(p_90891_)) {
|
||||
Screen.m_96579_(() -> {
|
||||
- guieventlistener.m_5534_(c0, p_90892_);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPre(this.f_90867_.f_91080_, c0, p_90892_)) return;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPre(guieventlistener, c0, p_90892_)) return;
|
||||
+ if (guieventlistener.m_5534_(c0, p_90892_)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPost(this.f_90867_.f_91080_, c0, p_90892_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenCharTypedPost(guieventlistener, c0, p_90892_);
|
||||
}, "charTyped event handler", guieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -254,7 +_,7 @@
|
||||
import org.lwjgl.util.tinyfd.TinyFileDialogs;
|
||||
@@ -252,7 +_,7 @@
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements WindowEventHandler {
|
||||
+public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements WindowEventHandler, net.minecraftforge.client.extensions.IForgeMinecraft {
|
||||
private static Minecraft f_90981_;
|
||||
private static final Logger f_90982_ = LogManager.getLogger();
|
||||
private static final Logger f_90982_ = LogUtils.getLogger();
|
||||
public static final boolean f_91002_ = Util.m_137581_() == Util.OS.OSX;
|
||||
@@ -394,14 +_,13 @@
|
||||
this.f_91029_ = p_91084_.f_101908_.f_101928_;
|
||||
@@ -44,7 +44,7 @@
|
||||
@@ -456,6 +_,7 @@
|
||||
this.f_91042_.m_83931_(0.0F, 0.0F, 0.0F, 0.0F);
|
||||
this.f_91042_.m_83954_(f_91002_);
|
||||
this.f_91036_ = new SimpleReloadableResourceManager(PackType.CLIENT_RESOURCES);
|
||||
this.f_91036_ = new ReloadableResourceManager(PackType.CLIENT_RESOURCES);
|
||||
+ net.minecraftforge.client.loading.ClientModLoader.begin(this, this.f_91038_, this.f_91036_, this.f_91037_);
|
||||
this.f_91038_.m_10506_();
|
||||
this.f_91066_.m_92145_(this.f_91038_);
|
||||
@@ -57,20 +57,21 @@
|
||||
this.f_91036_.m_7217_(this.f_91061_);
|
||||
this.f_91053_ = new PaintingTextureManager(this.f_90987_);
|
||||
this.f_91036_.m_7217_(this.f_91053_);
|
||||
@@ -511,7 +_,8 @@
|
||||
this.f_91036_.m_7217_(this.f_91054_);
|
||||
@@ -512,7 +_,8 @@
|
||||
this.f_91047_ = new GpuWarnlistManager();
|
||||
this.f_91036_.m_7217_(this.f_91047_);
|
||||
this.f_91036_.m_7217_(this.f_205120_);
|
||||
- this.f_91065_ = new Gui(this);
|
||||
+ this.f_91065_ = new net.minecraftforge.client.gui.ForgeIngameGui(this);
|
||||
+ this.f_91067_.m_91524_(this.f_90990_.m_85439_()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
|
||||
this.f_91064_ = new DebugRenderer(this);
|
||||
RenderSystem.m_69900_(this::m_91113_);
|
||||
if (this.f_91042_.f_83915_ == this.f_90990_.m_85441_() && this.f_91042_.f_83916_ == this.f_90990_.m_85442_()) {
|
||||
@@ -529,6 +_,10 @@
|
||||
@@ -530,6 +_,11 @@
|
||||
TinyFileDialogs.tinyfd_messageBox("Minecraft", stringbuilder.toString(), "ok", "error", false);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.gametest.ForgeGameTestHooks.registerGametests();
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.RegisterClientReloadListenersEvent(this.f_91036_));
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.EntityRenderersEvent.RegisterLayerDefinitions());
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.EntityRenderersEvent.RegisterRenderers());
|
||||
@@ -78,7 +79,7 @@
|
||||
this.f_90990_.m_85409_(this.f_91066_.f_92041_);
|
||||
this.f_90990_.m_85424_(this.f_91066_.f_92034_);
|
||||
this.f_90990_.m_85426_();
|
||||
@@ -544,13 +_,16 @@
|
||||
@@ -545,13 +_,16 @@
|
||||
}
|
||||
|
||||
this.f_167847_.m_168556_();
|
||||
@@ -100,7 +101,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -585,6 +_,8 @@
|
||||
@@ -594,6 +_,8 @@
|
||||
|
||||
private UserApiService m_193585_(YggdrasilAuthenticationService p_193586_, GameConfig p_193587_) {
|
||||
try {
|
||||
@@ -109,25 +110,16 @@
|
||||
return p_193586_.createUserApiService(p_193587_.f_101905_.f_101942_.m_92547_());
|
||||
} catch (AuthenticationException authenticationexception) {
|
||||
f_90982_.error("Failed to verify authentication", (Throwable)authenticationexception);
|
||||
@@ -597,7 +_,7 @@
|
||||
@@ -606,7 +_,7 @@
|
||||
}
|
||||
|
||||
private void m_91239_(Throwable p_91240_) {
|
||||
- if (this.f_91038_.m_10523_().size() > 1) {
|
||||
+ if (this.f_91038_.m_10524_().stream().anyMatch(e -> !e.m_10449_())) { //Forge: This caused infinite loop if any resource packs are forced. Such as mod resources. So check if we can disable any.
|
||||
Component component;
|
||||
if (p_91240_ instanceof SimpleReloadableResourceManager.ResourcePackLoadingFailure) {
|
||||
component = new TextComponent(((SimpleReloadableResourceManager.ResourcePackLoadingFailure)p_91240_).m_10921_().m_8017_());
|
||||
@@ -691,7 +_,7 @@
|
||||
return Stream.of(Registry.f_122827_.m_7981_(p_91317_.m_41720_()));
|
||||
});
|
||||
ReloadableIdSearchTree<ItemStack> reloadableidsearchtree = new ReloadableIdSearchTree<>((p_91121_) -> {
|
||||
- return ItemTags.m_13193_().m_13394_(p_91121_.m_41720_()).stream();
|
||||
+ return p_91121_.m_41720_().getTags().stream();
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.m_122779_();
|
||||
|
||||
@@ -761,13 +_,13 @@
|
||||
this.m_91241_(p_91240_, (Component)null);
|
||||
} else {
|
||||
Util.m_137559_(p_91240_);
|
||||
@@ -763,13 +_,13 @@
|
||||
Bootstrap.m_135875_(p_91333_.m_127526_());
|
||||
if (p_91333_.m_127527_() != null) {
|
||||
Bootstrap.m_135875_("#@!@# Game crashed! Crash report saved to: #@!@# " + p_91333_.m_127527_());
|
||||
@@ -144,7 +136,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -877,10 +_,6 @@
|
||||
@@ -879,10 +_,6 @@
|
||||
f_90982_.error("setScreen called from non-game thread");
|
||||
}
|
||||
|
||||
@@ -155,7 +147,7 @@
|
||||
if (p_91153_ == null && this.f_91073_ == null) {
|
||||
p_91153_ = new TitleScreen();
|
||||
} else if (p_91153_ == null && this.f_91074_.m_21224_()) {
|
||||
@@ -891,6 +_,15 @@
|
||||
@@ -893,6 +_,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +163,7 @@
|
||||
this.f_91080_ = p_91153_;
|
||||
BufferUploader.m_166835_();
|
||||
if (p_91153_ != null) {
|
||||
@@ -1019,11 +_,13 @@
|
||||
@@ -1022,11 +_,13 @@
|
||||
RenderSystem.m_69481_();
|
||||
this.f_91026_.m_7238_();
|
||||
if (!this.f_91079_) {
|
||||
@@ -185,7 +177,7 @@
|
||||
}
|
||||
|
||||
if (this.f_91056_ != null) {
|
||||
@@ -1129,10 +_,12 @@
|
||||
@@ -1132,10 +_,12 @@
|
||||
this.f_90990_.m_85378_((double)i);
|
||||
if (this.f_91080_ != null) {
|
||||
this.f_91080_.m_6574_(this, this.f_90990_.m_85445_(), this.f_90990_.m_85446_());
|
||||
@@ -198,7 +190,7 @@
|
||||
this.f_91063_.m_109097_(this.f_90990_.m_85441_(), this.f_90990_.m_85442_());
|
||||
this.f_91067_.m_91599_();
|
||||
}
|
||||
@@ -1429,11 +_,21 @@
|
||||
@@ -1432,11 +_,21 @@
|
||||
if (p_91387_ && this.f_91077_ != null && this.f_91077_.m_6662_() == HitResult.Type.BLOCK) {
|
||||
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
|
||||
BlockPos blockpos = blockhitresult.m_82425_();
|
||||
@@ -222,36 +214,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1452,6 +_,8 @@
|
||||
@@ -1460,6 +_,8 @@
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = false;
|
||||
+ net.minecraftforge.client.event.InputEvent.ClickInputEvent inputEvent = net.minecraftforge.client.ForgeHooksClient.onClickInput(0, this.f_91066_.f_92096_, InteractionHand.MAIN_HAND);
|
||||
+ if (!inputEvent.isCanceled())
|
||||
switch(this.f_91077_.m_6662_()) {
|
||||
case ENTITY:
|
||||
this.f_91072_.m_105223_(this.f_91074_, ((EntityHitResult)this.f_91077_).m_82443_());
|
||||
@@ -1467,7 +_,7 @@
|
||||
case BLOCK:
|
||||
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
|
||||
BlockPos blockpos = blockhitresult.m_82425_();
|
||||
- if (!this.f_91073_.m_8055_(blockpos).m_60795_()) {
|
||||
+ if (!this.f_91073_.m_46859_(blockpos)) {
|
||||
this.f_91072_.m_105269_(blockpos, blockhitresult.m_82434_());
|
||||
if (this.f_91073_.m_8055_(blockpos).m_60795_()) {
|
||||
flag = true;
|
||||
@@ -1480,8 +_,10 @@
|
||||
}
|
||||
|
||||
} else if (!this.f_91074_.m_108637_()) {
|
||||
+ net.minecraftforge.client.event.InputEvent.ClickInputEvent inputEvent = net.minecraftforge.client.ForgeHooksClient.onClickInput(0, this.f_91066_.f_92096_, InteractionHand.MAIN_HAND);
|
||||
+ if (!inputEvent.isCanceled())
|
||||
switch(this.f_91077_.m_6662_()) {
|
||||
case ENTITY:
|
||||
this.f_91072_.m_105223_(this.f_91074_, ((EntityHitResult)this.f_91077_).m_82443_());
|
||||
@@ -1459,7 +_,7 @@
|
||||
case BLOCK:
|
||||
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
|
||||
BlockPos blockpos = blockhitresult.m_82425_();
|
||||
- if (!this.f_91073_.m_8055_(blockpos).m_60795_()) {
|
||||
+ if (!this.f_91073_.m_46859_(blockpos)) {
|
||||
this.f_91072_.m_105269_(blockpos, blockhitresult.m_82434_());
|
||||
break;
|
||||
}
|
||||
@@ -1469,8 +_,10 @@
|
||||
}
|
||||
|
||||
this.f_91074_.m_36334_();
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyLeftClick(this.f_91074_);
|
||||
}
|
||||
|
||||
+ if (inputEvent.shouldSwingHand())
|
||||
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
|
||||
this.f_91074_.m_36334_();
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyLeftClick(this.f_91074_);
|
||||
}
|
||||
|
||||
+ if (inputEvent.shouldSwingHand())
|
||||
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
|
||||
return flag;
|
||||
}
|
||||
@@ -1485,6 +_,11 @@
|
||||
@@ -1496,6 +_,11 @@
|
||||
}
|
||||
|
||||
for(InteractionHand interactionhand : InteractionHand.values()) {
|
||||
@@ -263,7 +255,7 @@
|
||||
ItemStack itemstack = this.f_91074_.m_21120_(interactionhand);
|
||||
if (this.f_91077_ != null) {
|
||||
switch(this.f_91077_.m_6662_()) {
|
||||
@@ -1502,6 +_,7 @@
|
||||
@@ -1513,6 +_,7 @@
|
||||
|
||||
if (interactionresult.m_19077_()) {
|
||||
if (interactionresult.m_19080_()) {
|
||||
@@ -271,7 +263,7 @@
|
||||
this.f_91074_.m_6674_(interactionhand);
|
||||
}
|
||||
|
||||
@@ -1514,6 +_,7 @@
|
||||
@@ -1525,6 +_,7 @@
|
||||
InteractionResult interactionresult1 = this.f_91072_.m_105262_(this.f_91074_, this.f_91073_, interactionhand, blockhitresult);
|
||||
if (interactionresult1.m_19077_()) {
|
||||
if (interactionresult1.m_19080_()) {
|
||||
@@ -279,7 +271,7 @@
|
||||
this.f_91074_.m_6674_(interactionhand);
|
||||
if (!itemstack.m_41619_() && (itemstack.m_41613_() != i || this.f_91072_.m_105290_())) {
|
||||
this.f_91063_.f_109055_.m_109320_(interactionhand);
|
||||
@@ -1529,6 +_,9 @@
|
||||
@@ -1540,6 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +281,7 @@
|
||||
if (!itemstack.m_41619_()) {
|
||||
InteractionResult interactionresult2 = this.f_91072_.m_105235_(this.f_91074_, this.f_91073_, interactionhand);
|
||||
if (interactionresult2.m_19077_()) {
|
||||
@@ -1555,6 +_,8 @@
|
||||
@@ -1566,6 +_,8 @@
|
||||
--this.f_91011_;
|
||||
}
|
||||
|
||||
@@ -298,7 +290,7 @@
|
||||
this.f_91026_.m_6180_("gui");
|
||||
this.f_91065_.m_193832_(this.f_91012_);
|
||||
this.f_91026_.m_7238_();
|
||||
@@ -1683,6 +_,8 @@
|
||||
@@ -1694,6 +_,8 @@
|
||||
this.f_91026_.m_6182_("keyboard");
|
||||
this.f_91068_.m_90931_();
|
||||
this.f_91026_.m_7238_();
|
||||
@@ -307,73 +299,73 @@
|
||||
}
|
||||
|
||||
private boolean m_91278_() {
|
||||
@@ -1821,11 +_,11 @@
|
||||
@@ -1814,11 +_,11 @@
|
||||
}
|
||||
|
||||
public void m_91200_(String p_91201_) {
|
||||
- this.m_91219_(p_91201_, RegistryAccess.m_123086_(), Minecraft::m_91133_, Minecraft::m_91135_, false, Minecraft.ExperimentalDialogType.BACKUP);
|
||||
+ this.doLoadLevel(p_91201_, RegistryAccess.m_123086_(), Minecraft::m_91133_, Minecraft::m_91135_, false, Minecraft.ExperimentalDialogType.BACKUP, false);
|
||||
- this.m_205205_(p_91201_, WorldStem.DataPackConfigSupplier::m_206928_, WorldStem.WorldDataSupplier::m_206954_, false, Minecraft.ExperimentalDialogType.BACKUP);
|
||||
+ this.doLoadLevel(p_91201_, WorldStem.DataPackConfigSupplier::m_206928_, WorldStem.WorldDataSupplier::m_206954_, false, Minecraft.ExperimentalDialogType.BACKUP, false);
|
||||
}
|
||||
|
||||
public void m_91202_(String p_91203_, LevelSettings p_91204_, RegistryAccess.RegistryHolder p_91205_, WorldGenSettings p_91206_) {
|
||||
- this.m_91219_(p_91203_, p_91205_, (p_167869_) -> {
|
||||
+ this.doLoadLevel(p_91203_, p_91205_, (p_91129_) -> {
|
||||
return p_91204_.m_46934_();
|
||||
}, (p_167886_, p_167887_, p_167888_, p_167889_) -> {
|
||||
RegistryWriteOps<JsonElement> registrywriteops = RegistryWriteOps.m_135767_(JsonOps.INSTANCE, p_91205_);
|
||||
@@ -1835,10 +_,10 @@
|
||||
});
|
||||
WorldGenSettings worldgensettings = dataresult.resultOrPartial(Util.m_137489_("Error reading worldgen settings after loading data packs: ", f_90982_::error)).orElse(p_91206_);
|
||||
return new PrimaryLevelData(p_91204_, worldgensettings, dataresult.lifecycle());
|
||||
public void m_205185_(String p_205186_, LevelSettings p_205187_, RegistryAccess p_205188_, WorldGenSettings p_205189_) {
|
||||
- this.m_205205_(p_205186_, (p_210684_) -> {
|
||||
+ this.doLoadLevel(p_205186_, (p_210684_) -> {
|
||||
return p_205187_::m_46934_;
|
||||
}, (p_210718_) -> {
|
||||
return (p_210712_, p_210713_) -> {
|
||||
@@ -1831,10 +_,10 @@
|
||||
WorldGenSettings worldgensettings = dataresult.getOrThrow(false, Util.m_137489_("Error reading worldgen settings after loading data packs: ", f_90982_::error));
|
||||
return Pair.of(new PrimaryLevelData(p_205187_, worldgensettings, dataresult.lifecycle()), registryaccess$writable.m_203557_());
|
||||
};
|
||||
- }, false, Minecraft.ExperimentalDialogType.CREATE);
|
||||
+ }, false, Minecraft.ExperimentalDialogType.CREATE, true);
|
||||
}
|
||||
|
||||
- private void m_91219_(String p_91220_, RegistryAccess.RegistryHolder p_91221_, Function<LevelStorageSource.LevelStorageAccess, DataPackConfig> p_91222_, Function4<LevelStorageSource.LevelStorageAccess, RegistryAccess.RegistryHolder, ResourceManager, DataPackConfig, WorldData> p_91223_, boolean p_91224_, Minecraft.ExperimentalDialogType p_91225_) {
|
||||
+ private void doLoadLevel(String p_91220_, RegistryAccess.RegistryHolder p_91221_, Function<LevelStorageSource.LevelStorageAccess, DataPackConfig> p_91222_, Function4<LevelStorageSource.LevelStorageAccess, RegistryAccess.RegistryHolder, ResourceManager, DataPackConfig, WorldData> p_91223_, boolean p_91224_, Minecraft.ExperimentalDialogType p_91225_, boolean creating) {
|
||||
- private void m_205205_(String p_205206_, Function<LevelStorageSource.LevelStorageAccess, WorldStem.DataPackConfigSupplier> p_205207_, Function<LevelStorageSource.LevelStorageAccess, WorldStem.WorldDataSupplier> p_205208_, boolean p_205209_, Minecraft.ExperimentalDialogType p_205210_) {
|
||||
+ private void doLoadLevel(String p_205206_, Function<LevelStorageSource.LevelStorageAccess, WorldStem.DataPackConfigSupplier> p_205207_, Function<LevelStorageSource.LevelStorageAccess, WorldStem.WorldDataSupplier> p_205208_, boolean p_205209_, Minecraft.ExperimentalDialogType p_205210_, boolean creating) {
|
||||
LevelStorageSource.LevelStorageAccess levelstoragesource$levelstorageaccess;
|
||||
try {
|
||||
levelstoragesource$levelstorageaccess = this.f_91031_.m_78260_(p_91220_);
|
||||
@@ -1850,12 +_,17 @@
|
||||
}
|
||||
levelstoragesource$levelstorageaccess = this.f_91031_.m_78260_(p_205206_);
|
||||
@@ -1849,11 +_,18 @@
|
||||
|
||||
Minecraft.ServerStem minecraft$serverstem;
|
||||
+ final RegistryAccess.RegistryHolder dyn_f;
|
||||
WorldStem worldstem;
|
||||
try {
|
||||
- minecraft$serverstem = this.m_91190_(p_91221_, p_91222_, p_91223_, p_91224_, levelstoragesource$levelstorageaccess);
|
||||
+ Minecraft.ServerStem mgr = this.m_91190_(p_91221_, p_91222_, p_91223_, p_91224_, levelstoragesource$levelstorageaccess);
|
||||
+ // We need to rebuild this if we're loading world, so that it gets all the information from AFTER we inject our mappings from the save.
|
||||
+ dyn_f = creating ? p_91221_ : RegistryAccess.m_123086_();
|
||||
+ minecraft$serverstem = creating ? mgr : this.m_91190_(dyn_f, p_91222_, p_91223_, p_91224_, levelstoragesource$levelstorageaccess); //Note this runs the injection again... which isn't good.. but hey.. we need a better spot to hook in.
|
||||
+
|
||||
+ //TODO-PATCHING: World loading has changed massively. Figure out what calls need to be delayed.
|
||||
+ /*if (!creating) levelstoragesource$levelstorageaccess.readAdditionalLevelSaveData();
|
||||
+ registryHolder = creating ? p_91221_ : RegistryAccess.m_123086_();
|
||||
+ minecraft$serverstem = this.m_91190_(registryHolder, p_91222_, p_91223_, p_91224_, levelstoragesource$levelstorageaccess);
|
||||
+*/
|
||||
+
|
||||
worldstem = this.m_205125_(packrepository, p_205209_, p_205207_.apply(levelstoragesource$levelstorageaccess), p_205208_.apply(levelstoragesource$levelstorageaccess));
|
||||
} catch (Exception exception) {
|
||||
f_90982_.warn("Failed to load datapacks, can't proceed with server load", (Throwable)exception);
|
||||
this.m_91152_(new DatapackLoadFailureScreen(() -> {
|
||||
- this.m_91219_(p_91220_, p_91221_, p_91222_, p_91223_, true, p_91225_);
|
||||
+ this.doLoadLevel(p_91220_, p_91221_, p_91222_, p_91223_, true, p_91225_, creating);
|
||||
- this.m_205205_(p_205206_, p_205207_, p_205208_, true, p_205210_);
|
||||
+ this.doLoadLevel(p_205206_, p_205207_, p_205208_, true, p_205210_, creating);
|
||||
}));
|
||||
|
||||
try {
|
||||
@@ -1875,7 +_,7 @@
|
||||
this.f_90999_.set((StoringChunkProgressListener)null);
|
||||
|
||||
try {
|
||||
- levelstoragesource$levelstorageaccess.m_78287_(p_91221_, worlddata);
|
||||
+ levelstoragesource$levelstorageaccess.m_78287_(dyn_f, worlddata);
|
||||
minecraft$serverstem.m_91433_().m_136179_();
|
||||
RegistryAccess.Frozen registryaccess$frozen = worldstem.f_206894_();
|
||||
- levelstoragesource$levelstorageaccess.m_78287_(registryaccess$frozen, worlddata);
|
||||
+ levelstoragesource$levelstorageaccess.m_78287_(registryaccess$frozen, worlddata); //TODO-PATCHING: Figure out what registry access needs to be passed in here.
|
||||
worldstem.m_206901_();
|
||||
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(this.f_91030_);
|
||||
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|
||||
@@ -1885,7 +_,7 @@
|
||||
SkullBlockEntity.m_196700_(gameprofilecache, minecraftsessionservice, this);
|
||||
GameProfileCache.m_11004_(false);
|
||||
this.f_91007_ = MinecraftServer.m_129872_((p_167898_) -> {
|
||||
- return new IntegratedServer(p_167898_, this, p_91221_, levelstoragesource$levelstorageaccess, minecraft$serverstem.m_91432_(), minecraft$serverstem.m_91433_(), worlddata, minecraftsessionservice, gameprofilerepository, gameprofilecache, (p_168000_) -> {
|
||||
+ return new IntegratedServer(p_167898_, this, dyn_f, levelstoragesource$levelstorageaccess, minecraft$serverstem.m_91432_(), minecraft$serverstem.m_91433_(), worlddata, minecraftsessionservice, gameprofilerepository, gameprofilecache, (p_168000_) -> {
|
||||
StoringChunkProgressListener storingchunkprogresslistener = new StoringChunkProgressListener(p_168000_ + 0);
|
||||
this.f_91007_ = MinecraftServer.m_129872_((p_210695_) -> {
|
||||
- return new IntegratedServer(p_210695_, this, levelstoragesource$levelstorageaccess, packrepository, worldstem, minecraftsessionservice, gameprofilerepository, gameprofilecache, (p_210795_) -> {
|
||||
+ return new IntegratedServer(p_210695_, this, levelstoragesource$levelstorageaccess, packrepository, worldstem, minecraftsessionservice, gameprofilerepository, gameprofilecache, (p_210795_) -> { //TODO-PATCHING: Handle the registry freeze delay again.
|
||||
StoringChunkProgressListener storingchunkprogresslistener = new StoringChunkProgressListener(p_210795_ + 0);
|
||||
this.f_90999_.set(storingchunkprogresslistener);
|
||||
return ProcessorChunkProgressListener.m_143583_(storingchunkprogresslistener, this.f_91023_::add);
|
||||
@@ -1929,11 +_,16 @@
|
||||
connection.m_129505_(new ClientHandshakePacketListenerImpl(connection, this, (Screen)null, (p_167998_) -> {
|
||||
connection.m_129505_(new ClientHandshakePacketListenerImpl(connection, this, (Screen)null, (p_210793_) -> {
|
||||
}));
|
||||
connection.m_129512_(new ClientIntentionPacket(socketaddress.toString(), 0, ConnectionProtocol.LOGIN));
|
||||
- connection.m_129512_(new ServerboundHelloPacket(this.m_91094_().m_92548_()));
|
||||
@@ -385,13 +377,13 @@
|
||||
+ connection.m_129512_(new ServerboundHelloPacket(gameProfile));
|
||||
this.f_91009_ = connection;
|
||||
} else {
|
||||
this.m_91143_(p_91225_, p_91220_, flag, () -> {
|
||||
- this.m_91219_(p_91220_, p_91221_, p_91222_, p_91223_, p_91224_, Minecraft.ExperimentalDialogType.NONE);
|
||||
+ this.doLoadLevel(p_91220_, dyn_f, p_91222_, p_91223_, p_91224_, Minecraft.ExperimentalDialogType.NONE, creating);
|
||||
this.m_91143_(p_205210_, p_205206_, flag, () -> {
|
||||
- this.m_205205_(p_205206_, p_205207_, p_205208_, p_205209_, Minecraft.ExperimentalDialogType.NONE);
|
||||
+ this.doLoadLevel(p_205206_, p_205207_, p_205208_, p_205209_, Minecraft.ExperimentalDialogType.NONE, creating);
|
||||
});
|
||||
minecraft$serverstem.close();
|
||||
worldstem.close();
|
||||
|
||||
@@ -2021,6 +_,7 @@
|
||||
@@ -2026,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_91156_(ClientLevel p_91157_) {
|
||||
@@ -399,7 +391,7 @@
|
||||
ProgressScreen progressscreen = new ProgressScreen(true);
|
||||
progressscreen.m_6309_(new TranslatableComponent("connect.joining"));
|
||||
this.m_91362_(progressscreen);
|
||||
@@ -2053,10 +_,12 @@
|
||||
@@ -2058,10 +_,12 @@
|
||||
IntegratedServer integratedserver = this.f_91007_;
|
||||
this.f_91007_ = null;
|
||||
this.f_91063_.m_109150_();
|
||||
@@ -412,7 +404,7 @@
|
||||
if (integratedserver != null) {
|
||||
this.f_91026_.m_6180_("waitForServer");
|
||||
|
||||
@@ -2071,6 +_,7 @@
|
||||
@@ -2076,6 +_,7 @@
|
||||
this.f_91065_.m_93089_();
|
||||
this.f_91008_ = null;
|
||||
this.f_91010_ = false;
|
||||
@@ -420,7 +412,7 @@
|
||||
this.f_91004_.m_90740_();
|
||||
}
|
||||
|
||||
@@ -2157,66 +_,9 @@
|
||||
@@ -2162,66 +_,9 @@
|
||||
|
||||
private void m_91280_() {
|
||||
if (this.f_91077_ != null && this.f_91077_.m_6662_() != HitResult.Type.MISS) {
|
||||
@@ -490,7 +482,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2707,7 +_,7 @@
|
||||
@@ -2713,7 +_,7 @@
|
||||
return this.f_90993_;
|
||||
}
|
||||
|
||||
@@ -499,7 +491,7 @@
|
||||
int i = p_167938_.m_10374_();
|
||||
Supplier<PackResources> supplier = p_167937_;
|
||||
if (i <= 3) {
|
||||
@@ -2718,7 +_,7 @@
|
||||
@@ -2724,7 +_,7 @@
|
||||
supplier = m_91352_(supplier);
|
||||
}
|
||||
|
||||
@@ -508,7 +500,7 @@
|
||||
}
|
||||
|
||||
private static Supplier<PackResources> m_91330_(Supplier<PackResources> p_91331_) {
|
||||
@@ -2735,6 +_,14 @@
|
||||
@@ -2741,6 +_,14 @@
|
||||
|
||||
public void m_91312_(int p_91313_) {
|
||||
this.f_91051_.m_119410_(p_91313_);
|
||||
|
||||
@@ -13,19 +13,19 @@
|
||||
screen.m_169415_();
|
||||
Screen.m_96579_(() -> {
|
||||
- aboolean[0] = screen.m_6375_(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseClickedPre(this.f_91503_.f_91080_, d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseClickedPre(screen, d0, d1, i);
|
||||
+ if (!aboolean[0]) {
|
||||
+ aboolean[0] = this.f_91503_.f_91080_.m_6375_(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseClickedPost(this.f_91503_.f_91080_, d0, d1, i, aboolean[0]);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseClickedPost(screen, d0, d1, i, aboolean[0]);
|
||||
+ }
|
||||
}, "mouseClicked event handler", screen.getClass().getCanonicalName());
|
||||
} else {
|
||||
Screen.m_96579_(() -> {
|
||||
- aboolean[0] = screen.m_6348_(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseReleasedPre(this.f_91503_.f_91080_, d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseReleasedPre(screen, d0, d1, i);
|
||||
+ if (!aboolean[0]) {
|
||||
+ aboolean[0] = this.f_91503_.f_91080_.m_6348_(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseReleasedPost(this.f_91503_.f_91080_, d0, d1, i, aboolean[0]);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseReleasedPost(screen, d0, d1, i, aboolean[0]);
|
||||
+ }
|
||||
}, "mouseReleased event handler", screen.getClass().getCanonicalName());
|
||||
}
|
||||
@@ -63,19 +63,19 @@
|
||||
@@ -135,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_91518_ -= (double)f1;
|
||||
this.f_91518_ -= (double)i;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onMouseScroll(this, d0)) return;
|
||||
if (this.f_91503_.f_91074_.m_5833_()) {
|
||||
if (this.f_91503_.f_91065_.m_93085_().m_94768_()) {
|
||||
this.f_91503_.f_91065_.m_93085_().m_94769_((double)(-f1));
|
||||
this.f_91503_.f_91065_.m_93085_().m_205380_(-i);
|
||||
@@ -203,7 +_,9 @@
|
||||
double d2 = (p_91563_ - this.f_91507_) * (double)this.f_91503_.m_91268_().m_85445_() / (double)this.f_91503_.m_91268_().m_85443_();
|
||||
double d3 = (p_91564_ - this.f_91508_) * (double)this.f_91503_.m_91268_().m_85446_() / (double)this.f_91503_.m_91268_().m_85444_();
|
||||
Screen.m_96579_(() -> {
|
||||
- screen.m_7979_(d0, d1, this.f_91510_, d2, d3);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenMouseDragPre(this.f_91503_.f_91080_, d0, d1, this.f_91510_, d2, d3)) return;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenMouseDragPre(screen, d0, d1, this.f_91510_, d2, d3)) return;
|
||||
+ if (screen.m_7979_(d0, d1, this.f_91510_, d2, d3)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenMouseDragPost(this.f_91503_.f_91080_, d0, d1, this.f_91510_, d2, d3);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenMouseDragPost(screen, d0, d1, this.f_91510_, d2, d3);
|
||||
}, "mouseDragged event handler", screen.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Options.java
|
||||
+++ b/net/minecraft/client/Options.java
|
||||
@@ -187,6 +_,7 @@
|
||||
@@ -188,6 +_,7 @@
|
||||
public boolean f_92076_;
|
||||
|
||||
public Options(Minecraft p_92138_, File p_92139_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
this.f_92060_ = p_92138_;
|
||||
this.f_92110_ = new File(p_92139_, "options.txt");
|
||||
if (p_92138_.m_91103_() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
|
||||
@@ -300,10 +_,14 @@
|
||||
@@ -302,10 +_,14 @@
|
||||
this.f_193762_ = p_168428_.m_142682_("allowServerListing", this.f_193762_);
|
||||
|
||||
for(KeyMapping keymapping : this.f_92059_) {
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,6 +_,7 @@
|
||||
@@ -493,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_92169_() {
|
||||
@@ -33,7 +33,7 @@
|
||||
try {
|
||||
final PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.f_92110_), StandardCharsets.UTF_8));
|
||||
|
||||
@@ -639,6 +_,23 @@
|
||||
@@ -641,6 +_,23 @@
|
||||
}
|
||||
|
||||
p_92146_.m_10509_(set);
|
||||
|
||||
+2
-20
@@ -1,28 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/components/DebugScreenOverlay.java
|
||||
+++ b/net/minecraft/client/gui/components/DebugScreenOverlay.java
|
||||
@@ -363,7 +_,7 @@
|
||||
list.add(this.m_94071_(entry));
|
||||
}
|
||||
|
||||
- for(ResourceLocation resourcelocation : this.f_94030_.m_91403_().m_105148_().m_144452_(Registry.f_122901_).m_13394_(blockstate.m_60734_())) {
|
||||
+ for(ResourceLocation resourcelocation : blockstate.m_60734_().getTags()) {
|
||||
list.add("#" + resourcelocation);
|
||||
}
|
||||
}
|
||||
@@ -379,7 +_,7 @@
|
||||
list.add(this.m_94071_(entry1));
|
||||
}
|
||||
|
||||
- for(ResourceLocation resourcelocation1 : this.f_94030_.m_91403_().m_105148_().m_144452_(Registry.f_122899_).m_13394_(fluidstate.m_76152_())) {
|
||||
+ for(ResourceLocation resourcelocation1 : fluidstate.m_76152_().getTags()) {
|
||||
list.add("#" + resourcelocation1);
|
||||
}
|
||||
}
|
||||
@@ -389,6 +_,7 @@
|
||||
@@ -399,6 +_,7 @@
|
||||
list.add("");
|
||||
list.add(ChatFormatting.UNDERLINE + "Targeted Entity");
|
||||
list.add(String.valueOf((Object)Registry.f_122826_.m_7981_(entity.m_6095_())));
|
||||
+ entity.m_6095_().getTags().forEach(t -> list.add("#" + t));
|
||||
+ entity.m_6095_().m_204041_().m_203616_().forEach(t -> list.add("#" + t.f_203868_()));
|
||||
}
|
||||
|
||||
return list;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/Screen.java
|
||||
+++ b/net/minecraft/client/gui/screens/Screen.java
|
||||
@@ -126,7 +_,7 @@
|
||||
@@ -127,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7379_() {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
protected <T extends GuiEventListener & Widget & NarratableEntry> T m_142416_(T p_169406_) {
|
||||
@@ -163,15 +_,29 @@
|
||||
@@ -164,15 +_,29 @@
|
||||
this.f_169368_.clear();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
this.m_169383_(p_169389_, list, p_169392_, p_169393_);
|
||||
}
|
||||
|
||||
@@ -184,20 +_,44 @@
|
||||
@@ -185,20 +_,44 @@
|
||||
}
|
||||
|
||||
public void m_96597_(PoseStack p_96598_, List<Component> p_96599_, int p_96600_, int p_96601_) {
|
||||
@@ -90,7 +90,7 @@
|
||||
if (k > i) {
|
||||
i = k;
|
||||
}
|
||||
@@ -205,8 +_,8 @@
|
||||
@@ -206,8 +_,8 @@
|
||||
j += clienttooltipcomponent.m_142103_();
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
if (j2 + i > this.f_96543_) {
|
||||
j2 -= 28 + i;
|
||||
}
|
||||
@@ -227,15 +_,16 @@
|
||||
@@ -228,15 +_,16 @@
|
||||
RenderSystem.m_157427_(GameRenderer::m_172811_);
|
||||
bufferbuilder.m_166779_(VertexFormat.Mode.QUADS, DefaultVertexFormat.f_85815_);
|
||||
Matrix4f matrix4f = p_169384_.m_85850_().m_85861_();
|
||||
@@ -127,7 +127,7 @@
|
||||
RenderSystem.m_69482_();
|
||||
RenderSystem.m_69472_();
|
||||
RenderSystem.m_69478_();
|
||||
@@ -250,7 +_,7 @@
|
||||
@@ -251,7 +_,7 @@
|
||||
|
||||
for(int i2 = 0; i2 < p_169385_.size(); ++i2) {
|
||||
ClientTooltipComponent clienttooltipcomponent1 = p_169385_.get(i2);
|
||||
@@ -136,7 +136,7 @@
|
||||
l1 += clienttooltipcomponent1.m_142103_() + (i2 == 0 ? 2 : 0);
|
||||
}
|
||||
|
||||
@@ -260,7 +_,7 @@
|
||||
@@ -261,7 +_,7 @@
|
||||
|
||||
for(int l2 = 0; l2 < p_169385_.size(); ++l2) {
|
||||
ClientTooltipComponent clienttooltipcomponent2 = p_169385_.get(l2);
|
||||
@@ -145,7 +145,7 @@
|
||||
l1 += clienttooltipcomponent2.m_142103_() + (l2 == 0 ? 2 : 0);
|
||||
}
|
||||
|
||||
@@ -354,9 +_,12 @@
|
||||
@@ -355,9 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_96612_(String p_96613_, boolean p_96614_) {
|
||||
@@ -154,11 +154,11 @@
|
||||
if (p_96614_) {
|
||||
this.f_96541_.f_91065_.m_93076_().m_93783_(p_96613_);
|
||||
}
|
||||
+ //if (net.minecraftforge.client.ClientCommandHandler.instance.executeCommand(mc.player, msg) != 0) return; //Forge: TODO Client command re-write
|
||||
+ if (net.minecraftforge.client.ClientCommandHandler.sendMessage(p_96613_)) return;
|
||||
|
||||
this.f_96541_.f_91074_.m_108739_(p_96613_);
|
||||
}
|
||||
@@ -367,11 +_,21 @@
|
||||
@@ -368,11 +_,21 @@
|
||||
this.f_96547_ = p_96607_.f_91062_;
|
||||
this.f_96543_ = p_96608_;
|
||||
this.f_96544_ = p_96609_;
|
||||
@@ -180,7 +180,7 @@
|
||||
}
|
||||
|
||||
public List<? extends GuiEventListener> m_6702_() {
|
||||
@@ -394,6 +_,7 @@
|
||||
@@ -395,6 +_,7 @@
|
||||
public void m_96558_(PoseStack p_96559_, int p_96560_) {
|
||||
if (this.f_96541_.f_91073_ != null) {
|
||||
this.m_93179_(p_96559_, 0, 0, this.f_96543_, this.f_96544_, -1072689136, -804253680);
|
||||
@@ -188,7 +188,7 @@
|
||||
} else {
|
||||
this.m_96626_(p_96560_);
|
||||
}
|
||||
@@ -413,6 +_,7 @@
|
||||
@@ -414,6 +_,7 @@
|
||||
bufferbuilder.m_5483_((double)this.f_96543_, 0.0D, 0.0D).m_7421_((float)this.f_96543_ / 32.0F, (float)p_96627_).m_6122_(64, 64, 64, 255).m_5752_();
|
||||
bufferbuilder.m_5483_(0.0D, 0.0D, 0.0D).m_7421_(0.0F, (float)p_96627_).m_6122_(64, 64, 64, 255).m_5752_();
|
||||
tesselator.m_85914_();
|
||||
@@ -196,7 +196,7 @@
|
||||
}
|
||||
|
||||
public boolean m_7043_() {
|
||||
@@ -498,6 +_,10 @@
|
||||
@@ -499,6 +_,10 @@
|
||||
}
|
||||
|
||||
public void m_7400_(List<Path> p_96591_) {
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
--- a/net/minecraft/client/gui/screens/TitleScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/TitleScreen.java
|
||||
@@ -64,6 +_,7 @@
|
||||
private final PanoramaRenderer f_96729_ = new PanoramaRenderer(f_96716_);
|
||||
private final boolean f_96714_;
|
||||
private long f_96715_;
|
||||
@@ -73,6 +_,7 @@
|
||||
private TitleScreen.Warning32Bit f_210857_;
|
||||
private RealmsClient f_210858_;
|
||||
private boolean f_210859_ = false;
|
||||
+ private net.minecraftforge.client.gui.NotificationModUpdateScreen modUpdateNotification;
|
||||
|
||||
public TitleScreen() {
|
||||
this(false);
|
||||
@@ -107,11 +_,16 @@
|
||||
this.f_96728_ = this.f_96543_ - this.f_96727_ - 2;
|
||||
int i = 24;
|
||||
int j = this.f_96544_ / 4 + 48;
|
||||
@@ -131,11 +_,16 @@
|
||||
int j = this.f_96543_ - i - 2;
|
||||
int k = 24;
|
||||
int l = this.f_96544_ / 4 + 48;
|
||||
+ Button modButton = null;
|
||||
if (this.f_96541_.m_91402_()) {
|
||||
this.m_96772_(j, 24);
|
||||
this.m_96772_(l, 24);
|
||||
} else {
|
||||
this.m_96763_(j, 24);
|
||||
+ modButton = this.m_142416_(new Button(this.f_96543_ / 2 - 100, j + 24 * 2, 98, 20, new TranslatableComponent("fml.menu.mods"), button -> {
|
||||
this.m_96763_(l, 24);
|
||||
+ modButton = this.m_142416_(new Button(this.f_96543_ / 2 - 100, l + 24 * 2, 98, 20, new TranslatableComponent("fml.menu.mods"), button -> {
|
||||
+ this.f_96541_.m_91152_(new net.minecraftforge.client.gui.ModListScreen(this));
|
||||
+ }));
|
||||
}
|
||||
+ modUpdateNotification = net.minecraftforge.client.gui.NotificationModUpdateScreen.init(this, modButton);
|
||||
|
||||
this.m_142416_(new ImageButton(this.f_96543_ / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, Button.f_93617_, 256, 256, (p_96791_) -> {
|
||||
this.m_142416_(new ImageButton(this.f_96543_ / 2 - 124, l + 72 + 12, 20, 20, 0, 106, 20, Button.f_93617_, 256, 256, (p_96791_) -> {
|
||||
this.f_96541_.m_91152_(new LanguageSelectScreen(this, this.f_96541_.f_91066_, this.f_96541_.m_91102_()));
|
||||
@@ -159,7 +_,7 @@
|
||||
@@ -201,7 +_,7 @@
|
||||
Screen screen = (Screen)(this.f_96541_.f_91066_.f_92083_ ? new JoinMultiplayerScreen(this) : new SafetyScreen(this));
|
||||
this.f_96541_.m_91152_(screen);
|
||||
}, button$ontooltip))).f_93623_ = flag;
|
||||
- (this.m_142416_(new Button(this.f_96543_ / 2 - 100, p_96764_ + p_96765_ * 2, 200, 20, new TranslatableComponent("menu.online"), (p_96776_) -> {
|
||||
- (this.m_142416_(new Button(this.f_96543_ / 2 - 100, p_96764_ + p_96765_ * 2, 200, 20, new TranslatableComponent("menu.online"), (p_211788_) -> {
|
||||
+ (this.m_142416_(new Button(this.f_96543_ / 2 + 2, p_96764_ + p_96765_ * 2, 98, 20, new TranslatableComponent("menu.online"), (p_96771_) -> {
|
||||
this.m_96793_();
|
||||
}, button$ontooltip))).f_93623_ = flag;
|
||||
}
|
||||
@@ -284,6 +_,7 @@
|
||||
@@ -331,6 +_,7 @@
|
||||
this.f_210857_.f_210875_.m_6514_(p_96739_, this.f_210857_.f_210876_, this.f_210857_.f_210877_, 9, 16777215 | l);
|
||||
}
|
||||
|
||||
RenderSystem.m_157456_(0, f_96724_);
|
||||
m_93133_(p_96739_, j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, p_96739_, this.f_96547_, this.f_96543_, this.f_96544_, l);
|
||||
if (this.f_96721_ != null) {
|
||||
p_96739_.m_85836_();
|
||||
p_96739_.m_85837_((double)(this.f_96543_ / 2 + 90), 70.0D, 0.0D);
|
||||
@@ -306,7 +_,14 @@
|
||||
@@ -353,7 +_,14 @@
|
||||
s = s + I18n.m_118938_("menu.modded");
|
||||
}
|
||||
|
||||
@@ -55,14 +55,14 @@
|
||||
+ m_93236_(p_96739_, this.f_96547_, brd, this.f_96543_ - f_96547_.m_92895_(brd), this.f_96544_ - (10 + (brdline + 1) * ( this.f_96547_.f_92710_ + 1)), 16777215 | l)
|
||||
+ );
|
||||
+
|
||||
m_93236_(p_96739_, this.f_96547_, "Copyright Mojang AB. Do not distribute!", this.f_96728_, this.f_96544_ - 10, 16777215 | l);
|
||||
if (p_96740_ > this.f_96728_ && p_96740_ < this.f_96728_ + this.f_96727_ && p_96741_ > this.f_96544_ - 10 && p_96741_ < this.f_96544_) {
|
||||
m_93172_(p_96739_, this.f_96728_, this.f_96544_ - 1, this.f_96728_ + this.f_96727_, this.f_96544_, 16777215 | l);
|
||||
@@ -322,6 +_,7 @@
|
||||
|
||||
for(GuiEventListener guieventlistener : this.m_6702_()) {
|
||||
if (guieventlistener instanceof AbstractWidget) {
|
||||
@@ -365,6 +_,7 @@
|
||||
if (this.m_96789_() && f1 >= 1.0F) {
|
||||
this.f_96726_.m_6305_(p_96739_, p_96740_, p_96741_, p_96742_);
|
||||
}
|
||||
+ modUpdateNotification.m_6305_(p_96739_, p_96740_, p_96741_, p_96742_);
|
||||
+ if (f1 >= 1.0f) modUpdateNotification.m_6305_(p_96739_, p_96740_, p_96741_, p_96742_);
|
||||
|
||||
}
|
||||
}
|
||||
+13
-13
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java
|
||||
@@ -91,6 +_,7 @@
|
||||
@@ -90,6 +_,7 @@
|
||||
int i = this.f_97735_;
|
||||
int j = this.f_97736_;
|
||||
this.m_7286_(p_97795_, p_97798_, p_97796_, p_97797_);
|
||||
@@ -8,7 +8,7 @@
|
||||
RenderSystem.m_69465_();
|
||||
super.m_6305_(p_97795_, p_97796_, p_97797_, p_97798_);
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
@@ -112,11 +_,12 @@
|
||||
@@ -111,11 +_,12 @@
|
||||
this.f_97734_ = slot;
|
||||
int l = slot.f_40220_;
|
||||
int i1 = slot.f_40221_;
|
||||
@@ -22,7 +22,7 @@
|
||||
ItemStack itemstack = this.f_97711_.m_41619_() ? this.f_97732_.m_142621_() : this.f_97711_;
|
||||
if (!itemstack.m_41619_()) {
|
||||
int l1 = 8;
|
||||
@@ -156,9 +_,13 @@
|
||||
@@ -155,9 +_,13 @@
|
||||
}
|
||||
|
||||
public static void m_169606_(PoseStack p_169607_, int p_169608_, int p_169609_, int p_169610_) {
|
||||
@@ -37,7 +37,7 @@
|
||||
RenderSystem.m_69444_(true, true, true, true);
|
||||
RenderSystem.m_69482_();
|
||||
}
|
||||
@@ -176,8 +_,10 @@
|
||||
@@ -175,8 +_,10 @@
|
||||
RenderSystem.m_157182_();
|
||||
this.m_93250_(200);
|
||||
this.f_96542_.f_115093_ = 200.0F;
|
||||
@@ -49,7 +49,7 @@
|
||||
this.m_93250_(0);
|
||||
this.f_96542_.f_115093_ = 0.0F;
|
||||
}
|
||||
@@ -287,7 +_,8 @@
|
||||
@@ -286,7 +_,8 @@
|
||||
if (super.m_6375_(p_97748_, p_97749_, p_97750_)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -59,7 +59,7 @@
|
||||
Slot slot = this.m_97744_(p_97748_, p_97749_);
|
||||
long i = Util.m_137550_();
|
||||
this.f_97723_ = this.f_97709_ == slot && i - this.f_97721_ < 250L && this.f_97722_ == p_97750_;
|
||||
@@ -298,6 +_,7 @@
|
||||
@@ -297,6 +_,7 @@
|
||||
int j = this.f_97735_;
|
||||
int k = this.f_97736_;
|
||||
boolean flag1 = this.m_7467_(p_97748_, p_97749_, j, k, p_97750_);
|
||||
@@ -67,7 +67,7 @@
|
||||
int l = -1;
|
||||
if (slot != null) {
|
||||
l = slot.f_40219_;
|
||||
@@ -323,7 +_,7 @@
|
||||
@@ -322,7 +_,7 @@
|
||||
}
|
||||
} else if (!this.f_97738_) {
|
||||
if (this.f_97732_.m_142621_().m_41619_()) {
|
||||
@@ -76,7 +76,7 @@
|
||||
this.m_6597_(slot, l, p_97750_, ClickType.CLONE);
|
||||
} else {
|
||||
boolean flag2 = l != -999 && (InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 340) || InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 344));
|
||||
@@ -347,7 +_,7 @@
|
||||
@@ -346,7 +_,7 @@
|
||||
this.f_97717_ = 0;
|
||||
} else if (p_97750_ == 1) {
|
||||
this.f_97717_ = 1;
|
||||
@@ -85,7 +85,7 @@
|
||||
this.f_97717_ = 2;
|
||||
}
|
||||
}
|
||||
@@ -416,10 +_,13 @@
|
||||
@@ -415,10 +_,13 @@
|
||||
}
|
||||
|
||||
public boolean m_6348_(double p_97812_, double p_97813_, int p_97814_) {
|
||||
@@ -99,7 +99,7 @@
|
||||
int k = -1;
|
||||
if (slot != null) {
|
||||
k = slot.f_40219_;
|
||||
@@ -433,7 +_,7 @@
|
||||
@@ -432,7 +_,7 @@
|
||||
if (m_96638_()) {
|
||||
if (!this.f_97724_.m_41619_()) {
|
||||
for(Slot slot2 : this.f_97732_.f_38839_) {
|
||||
@@ -108,7 +108,7 @@
|
||||
this.m_6597_(slot2, slot2.f_40219_, p_97814_, ClickType.QUICK_MOVE);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +_,7 @@
|
||||
@@ -496,7 +_,7 @@
|
||||
|
||||
this.m_6597_((Slot)null, -999, AbstractContainerMenu.m_38930_(2, this.f_97717_), ClickType.QUICK_CRAFT);
|
||||
} else if (!this.f_97732_.m_142621_().m_41619_()) {
|
||||
@@ -117,7 +117,7 @@
|
||||
this.m_6597_(slot, k, p_97814_, ClickType.CLONE);
|
||||
} else {
|
||||
boolean flag1 = k != -999 && (InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 340) || InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 344));
|
||||
@@ -539,34 +_,39 @@
|
||||
@@ -538,34 +_,39 @@
|
||||
}
|
||||
|
||||
public boolean m_7933_(int p_97765_, int p_97766_, int p_97767_) {
|
||||
@@ -164,7 +164,7 @@
|
||||
this.m_6597_(this.f_97734_, this.f_97734_.f_40219_, i, ClickType.SWAP);
|
||||
return true;
|
||||
}
|
||||
@@ -601,6 +_,18 @@
|
||||
@@ -600,6 +_,18 @@
|
||||
|
||||
public T m_6262_() {
|
||||
return this.f_97732_;
|
||||
|
||||
+18
-18
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java
|
||||
@@ -74,6 +_,8 @@
|
||||
@@ -73,6 +_,8 @@
|
||||
private Slot f_98512_;
|
||||
private CreativeInventoryListener f_98513_;
|
||||
private boolean f_98514_;
|
||||
+ private static int tabPage = 0;
|
||||
+ private int maxPages = 0;
|
||||
private boolean f_98515_;
|
||||
private final Map<ResourceLocation, Tag<Item>> f_98516_ = Maps.newTreeMap();
|
||||
private final Set<TagKey<Item>> f_98516_ = new HashSet<>();
|
||||
|
||||
@@ -233,6 +_,12 @@
|
||||
@@ -232,6 +_,12 @@
|
||||
protected void m_7856_() {
|
||||
if (this.f_96541_.f_91072_.m_105290_()) {
|
||||
super.m_7856_();
|
||||
@@ -22,7 +22,7 @@
|
||||
this.f_96541_.f_91068_.m_90926_(true);
|
||||
this.f_98510_ = new EditBox(this.f_96547_, this.f_97735_ + 82, this.f_97736_ + 6, 80, 9, new TranslatableComponent("itemGroup.search"));
|
||||
this.f_98510_.m_94199_(50);
|
||||
@@ -274,7 +_,7 @@
|
||||
@@ -273,7 +_,7 @@
|
||||
public boolean m_5534_(char p_98521_, int p_98522_) {
|
||||
if (this.f_98514_) {
|
||||
return false;
|
||||
@@ -31,7 +31,7 @@
|
||||
return false;
|
||||
} else {
|
||||
String s = this.f_98510_.m_94155_();
|
||||
@@ -292,7 +_,7 @@
|
||||
@@ -291,7 +_,7 @@
|
||||
|
||||
public boolean m_7933_(int p_98547_, int p_98548_, int p_98549_) {
|
||||
this.f_98514_ = false;
|
||||
@@ -40,7 +40,7 @@
|
||||
if (this.f_96541_.f_91066_.f_92098_.m_90832_(p_98547_, p_98548_)) {
|
||||
this.f_98514_ = true;
|
||||
this.m_98560_(CreativeModeTab.f_40754_);
|
||||
@@ -329,6 +_,32 @@
|
||||
@@ -328,6 +_,32 @@
|
||||
private void m_98630_() {
|
||||
(this.f_97732_).f_98639_.clear();
|
||||
this.f_98516_.clear();
|
||||
@@ -73,7 +73,7 @@
|
||||
String s = this.f_98510_.m_94155_();
|
||||
if (s.isEmpty()) {
|
||||
for(Item item : Registry.f_122827_) {
|
||||
@@ -374,9 +_,9 @@
|
||||
@@ -372,9 +_,9 @@
|
||||
|
||||
protected void m_7027_(PoseStack p_98616_, int p_98617_, int p_98618_) {
|
||||
CreativeModeTab creativemodetab = CreativeModeTab.f_40748_[f_98507_];
|
||||
@@ -85,7 +85,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -387,7 +_,7 @@
|
||||
@@ -385,7 +_,7 @@
|
||||
double d1 = p_98532_ - (double)this.f_97736_;
|
||||
|
||||
for(CreativeModeTab creativemodetab : CreativeModeTab.f_40748_) {
|
||||
@@ -94,7 +94,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -408,7 +_,7 @@
|
||||
@@ -406,7 +_,7 @@
|
||||
this.f_98509_ = false;
|
||||
|
||||
for(CreativeModeTab creativemodetab : CreativeModeTab.f_40748_) {
|
||||
@@ -103,7 +103,7 @@
|
||||
this.m_98560_(creativemodetab);
|
||||
return true;
|
||||
}
|
||||
@@ -419,12 +_,15 @@
|
||||
@@ -417,12 +_,15 @@
|
||||
}
|
||||
|
||||
private boolean m_98631_() {
|
||||
@@ -119,7 +119,7 @@
|
||||
this.f_97737_.clear();
|
||||
(this.f_97732_).f_98639_.clear();
|
||||
if (p_98561_ == CreativeModeTab.f_40760_) {
|
||||
@@ -501,13 +_,15 @@
|
||||
@@ -499,13 +_,15 @@
|
||||
}
|
||||
|
||||
if (this.f_98510_ != null) {
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
this.m_98630_();
|
||||
} else {
|
||||
@@ -567,16 +_,34 @@
|
||||
@@ -565,16 +_,34 @@
|
||||
this.m_7333_(p_98577_);
|
||||
super.m_6305_(p_98577_, p_98578_, p_98579_, p_98580_);
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.m_7025_(p_98577_, p_98578_, p_98579_);
|
||||
}
|
||||
@@ -611,7 +_,7 @@
|
||||
@@ -609,7 +_,7 @@
|
||||
list1.add(1, creativemodetab.m_40786_().m_6881_().m_130940_(ChatFormatting.BLUE));
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
} else {
|
||||
super.m_6057_(p_98590_, p_98591_, p_98592_, p_98593_);
|
||||
}
|
||||
@@ -622,16 +_,32 @@
|
||||
@@ -620,16 +_,32 @@
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
CreativeModeTab creativemodetab = CreativeModeTab.f_40748_[f_98507_];
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
this.m_93228_(p_98572_, this.f_97735_, this.f_97736_, 0, 0, this.f_97726_, this.f_97727_);
|
||||
this.f_98510_.m_6305_(p_98572_, p_98574_, p_98575_, p_98573_);
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -639,11 +_,14 @@
|
||||
@@ -637,11 +_,14 @@
|
||||
int j = this.f_97736_ + 18;
|
||||
int k = j + 112;
|
||||
RenderSystem.m_157427_(GameRenderer::m_172817_);
|
||||
@@ -235,7 +235,7 @@
|
||||
this.m_98581_(p_98572_, creativemodetab);
|
||||
if (creativemodetab == CreativeModeTab.f_40761_) {
|
||||
InventoryScreen.m_98850_(this.f_97735_ + 88, this.f_97736_ + 45, 20, (float)(this.f_97735_ + 88 - p_98574_), (float)(this.f_97736_ + 45 - 30 - p_98575_), this.f_96541_.f_91074_);
|
||||
@@ -652,6 +_,7 @@
|
||||
@@ -650,6 +_,7 @@
|
||||
}
|
||||
|
||||
protected boolean m_98562_(CreativeModeTab p_98563_, double p_98564_, double p_98565_) {
|
||||
@@ -243,7 +243,7 @@
|
||||
int i = p_98563_.m_40793_();
|
||||
int j = 28 * i;
|
||||
int k = 0;
|
||||
@@ -720,6 +_,7 @@
|
||||
@@ -718,6 +_,7 @@
|
||||
i1 += this.f_97727_ - 4;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
this.m_93228_(p_98582_, l, i1, j, k, 28, 32);
|
||||
this.f_96542_.f_115093_ = 100.0F;
|
||||
l += 6;
|
||||
@@ -909,6 +_,22 @@
|
||||
@@ -907,6 +_,22 @@
|
||||
|
||||
public boolean m_8010_(Player p_98665_) {
|
||||
return this.f_98655_.m_8010_(p_98665_);
|
||||
|
||||
+7
-7
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java
|
||||
@@ -116,7 +_,7 @@
|
||||
@@ -106,7 +_,7 @@
|
||||
|
||||
public static CreateWorldScreen m_100898_(@Nullable Screen p_100899_) {
|
||||
RegistryAccess.RegistryHolder registryaccess$registryholder = RegistryAccess.m_123086_();
|
||||
- return new CreateWorldScreen(p_100899_, DataPackConfig.f_45842_, new WorldGenSettingsComponent(registryaccess$registryholder, WorldGenSettings.m_190050_(registryaccess$registryholder), Optional.of(WorldPreset.f_101506_), OptionalLong.empty()));
|
||||
+ return new CreateWorldScreen(p_100899_, DataPackConfig.f_45842_, new WorldGenSettingsComponent(registryaccess$registryholder, net.minecraftforge.client.ForgeHooksClient.getDefaultWorldPreset().map(type -> type.m_7012_(registryaccess$registryholder, new java.util.Random().nextLong(), true, false)).orElseGet(() -> WorldGenSettings.m_190050_(registryaccess$registryholder)), net.minecraftforge.client.ForgeHooksClient.getDefaultWorldPreset(), OptionalLong.empty()));
|
||||
public static CreateWorldScreen m_205424_(@Nullable Screen p_205425_) {
|
||||
RegistryAccess.Frozen registryaccess$frozen = RegistryAccess.f_123049_.get();
|
||||
- return new CreateWorldScreen(p_205425_, DataPackConfig.f_45842_, new WorldGenSettingsComponent(registryaccess$frozen, WorldGenSettings.m_190050_(registryaccess$frozen), Optional.of(WorldPreset.f_101506_), OptionalLong.empty()));
|
||||
+ return new CreateWorldScreen(p_205425_, DataPackConfig.f_45842_, new WorldGenSettingsComponent(registryaccess$frozen, net.minecraftforge.client.ForgeHooksClient.getDefaultWorldPreset().map(type -> type.m_205485_(registryaccess$frozen, new java.util.Random().nextLong(), true, false)).orElseGet(() -> WorldGenSettings.m_190050_(registryaccess$frozen)), net.minecraftforge.client.ForgeHooksClient.getDefaultWorldPreset(), OptionalLong.empty()));
|
||||
}
|
||||
|
||||
private CreateWorldScreen(@Nullable Screen p_100861_, DataPackConfig p_100862_, WorldGenSettingsComponent p_100863_) {
|
||||
@@ -595,6 +_,7 @@
|
||||
public static CreateWorldScreen m_205426_(@Nullable Screen p_205427_, WorldStem p_205428_, @Nullable Path p_205429_) {
|
||||
@@ -625,6 +_,7 @@
|
||||
File file1 = path.toFile();
|
||||
if (this.f_100832_ == null) {
|
||||
this.f_100832_ = new PackRepository(PackType.SERVER_DATA, new ServerPacksSource(), new FolderRepositorySource(file1, PackSource.f_10527_));
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/WorldGenSettingsComponent.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/WorldGenSettingsComponent.java
|
||||
@@ -113,6 +_,7 @@
|
||||
@@ -107,6 +_,7 @@
|
||||
this.f_170244_.f_93624_ = false;
|
||||
this.f_101391_ = p_101430_.m_142416_(new Button(j, 120, 150, 20, new TranslatableComponent("selectWorld.customizeType"), (p_170248_) -> {
|
||||
WorldPreset.PresetEditor worldpreset$preseteditor = WorldPreset.f_101509_.get(this.f_101395_);
|
||||
@@ -8,7 +8,7 @@
|
||||
if (worldpreset$preseteditor != null) {
|
||||
p_101431_.m_91152_(worldpreset$preseteditor.m_101642_(p_101430_, this.f_101394_));
|
||||
}
|
||||
@@ -283,7 +_,7 @@
|
||||
@@ -273,7 +_,7 @@
|
||||
} else {
|
||||
this.f_101389_.f_93624_ = p_170288_;
|
||||
this.f_101380_.f_93624_ = p_170288_;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/WorldPreset.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/WorldPreset.java
|
||||
@@ -83,6 +_,9 @@
|
||||
@@ -93,6 +_,9 @@
|
||||
WorldPreset(String p_101519_) {
|
||||
this.f_101516_ = new TranslatableComponent("generator." + p_101519_);
|
||||
}
|
||||
@@ -8,9 +8,9 @@
|
||||
+ this.f_101516_ = displayName;
|
||||
+ }
|
||||
|
||||
private static WorldGenSettings m_101549_(RegistryAccess p_101550_, WorldGenSettings p_101551_, WorldPreset p_101552_, Biome p_101553_) {
|
||||
BiomeSource biomesource = new FixedBiomeSource(p_101553_);
|
||||
@@ -125,4 +_,8 @@
|
||||
private static WorldGenSettings m_205493_(RegistryAccess p_205494_, WorldGenSettings p_205495_, Holder<Biome> p_205496_) {
|
||||
BiomeSource biomesource = new FixedBiomeSource(p_205496_);
|
||||
@@ -134,4 +_,8 @@
|
||||
public interface PresetEditor {
|
||||
Screen m_101642_(CreateWorldScreen p_101643_, WorldGenSettings p_101644_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientChunkCache.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientChunkCache.java
|
||||
@@ -59,6 +_,7 @@
|
||||
@@ -60,6 +_,7 @@
|
||||
int i = this.f_104410_.m_104481_(p_104456_, p_104457_);
|
||||
LevelChunk levelchunk = this.f_104410_.m_104479_(i);
|
||||
if (m_104438_(levelchunk, p_104456_, p_104457_)) {
|
||||
@@ -8,7 +8,7 @@
|
||||
this.f_104410_.m_104487_(i, levelchunk, (LevelChunk)null);
|
||||
}
|
||||
|
||||
@@ -99,6 +_,7 @@
|
||||
@@ -100,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_104411_.m_171649_(chunkpos);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientLevel.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientLevel.java
|
||||
@@ -130,6 +_,8 @@
|
||||
this.f_194123_ = p_194134_;
|
||||
@@ -129,6 +_,8 @@
|
||||
this.f_194123_ = p_205510_;
|
||||
this.m_46465_();
|
||||
this.m_46466_();
|
||||
+ this.gatherCapabilities();
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
public void m_194171_(Runnable p_194172_) {
|
||||
@@ -216,6 +_,7 @@
|
||||
@@ -215,6 +_,7 @@
|
||||
this.m_46473_().m_6521_(() -> {
|
||||
return Registry.f_122826_.m_7981_(p_104640_.m_6095_()).toString();
|
||||
});
|
||||
@@ -17,7 +17,7 @@
|
||||
p_104640_.m_8119_();
|
||||
this.m_46473_().m_7238_();
|
||||
|
||||
@@ -278,8 +_,10 @@
|
||||
@@ -277,8 +_,10 @@
|
||||
}
|
||||
|
||||
private void m_104739_(int p_104740_, Entity p_104741_) {
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
public void m_171642_(int p_171643_, Entity.RemovalReason p_171644_) {
|
||||
@@ -410,6 +_,11 @@
|
||||
@@ -409,6 +_,11 @@
|
||||
}
|
||||
|
||||
public void m_6263_(@Nullable Player p_104645_, double p_104646_, double p_104647_, double p_104648_, SoundEvent p_104649_, SoundSource p_104650_, float p_104651_, float p_104652_) {
|
||||
@@ -40,7 +40,7 @@
|
||||
if (p_104645_ == this.f_104565_.f_91074_) {
|
||||
this.m_7785_(p_104646_, p_104647_, p_104648_, p_104649_, p_104650_, p_104651_, p_104652_, false);
|
||||
}
|
||||
@@ -417,6 +_,11 @@
|
||||
@@ -416,6 +_,11 @@
|
||||
}
|
||||
|
||||
public void m_6269_(@Nullable Player p_104659_, Entity p_104660_, SoundEvent p_104661_, SoundSource p_104662_, float p_104663_, float p_104664_) {
|
||||
@@ -52,7 +52,7 @@
|
||||
if (p_104659_ == this.f_104565_.f_91074_) {
|
||||
this.f_104565_.m_91106_().m_120367_(new EntityBoundSoundInstance(p_104661_, p_104662_, p_104663_, p_104664_, p_104660_));
|
||||
}
|
||||
@@ -879,6 +_,7 @@
|
||||
@@ -870,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_104851_(Difficulty p_104852_) {
|
||||
@@ -60,7 +60,7 @@
|
||||
this.f_104840_ = p_104852_;
|
||||
}
|
||||
|
||||
@@ -921,6 +_,9 @@
|
||||
@@ -912,6 +_,9 @@
|
||||
public void m_141981_(Entity p_171716_) {
|
||||
p_171716_.m_19877_();
|
||||
ClientLevel.this.f_104566_.remove(p_171716_);
|
||||
|
||||
+30
-22
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientPacketListener.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientPacketListener.java
|
||||
@@ -357,6 +_,7 @@
|
||||
@@ -360,6 +_,7 @@
|
||||
|
||||
this.f_104888_.f_91064_.m_113434_();
|
||||
this.f_104888_.f_91074_.m_172530_();
|
||||
@@ -8,7 +8,7 @@
|
||||
int i = p_105030_.f_132360_();
|
||||
this.f_104888_.f_91074_.m_20234_(i);
|
||||
this.f_104889_.m_104630_(i, this.f_104888_.f_91074_);
|
||||
@@ -368,6 +_,7 @@
|
||||
@@ -371,6 +_,7 @@
|
||||
this.f_104888_.f_91074_.m_108711_(p_105030_.f_132372_());
|
||||
this.f_104888_.f_91072_.m_171805_(p_105030_.f_132363_(), p_105030_.f_132364_());
|
||||
this.f_104888_.f_91066_.m_193770_(p_105030_.f_132370_());
|
||||
@@ -16,7 +16,7 @@
|
||||
this.f_104888_.f_91066_.m_92172_();
|
||||
this.f_104885_.m_129512_(new ServerboundCustomPayloadPacket(ServerboundCustomPayloadPacket.f_133979_, (new FriendlyByteBuf(Unpooled.buffer())).m_130070_(ClientBrandRetriever.m_129629_())));
|
||||
this.f_104888_.m_91309_().m_90739_();
|
||||
@@ -715,7 +_,9 @@
|
||||
@@ -712,7 +_,9 @@
|
||||
|
||||
public void m_5784_(ClientboundChatPacket p_104986_) {
|
||||
PacketUtils.m_131363_(p_104986_, this, this.f_104888_);
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
public void m_7791_(ClientboundAnimatePacket p_104968_) {
|
||||
@@ -886,8 +_,10 @@
|
||||
@@ -894,8 +_,10 @@
|
||||
localplayer1.m_21204_().m_22159_(localplayer.m_21204_());
|
||||
}
|
||||
|
||||
@@ -38,19 +38,27 @@
|
||||
this.f_104889_.m_104630_(i, localplayer1);
|
||||
localplayer1.m_146922_(-180.0F);
|
||||
localplayer1.f_108618_ = new KeyboardInput(this.f_104888_.f_91066_);
|
||||
@@ -990,10 +_,7 @@
|
||||
@@ -998,10 +_,7 @@
|
||||
PacketUtils.m_131363_(p_104976_, this, this.f_104888_);
|
||||
BlockPos blockpos = p_104976_.m_131704_();
|
||||
this.f_104888_.f_91073_.m_141902_(blockpos, p_104976_.m_195645_()).ifPresent((p_194239_) -> {
|
||||
this.f_104888_.f_91073_.m_141902_(blockpos, p_104976_.m_195645_()).ifPresent((p_205557_) -> {
|
||||
- CompoundTag compoundtag = p_104976_.m_131708_();
|
||||
- if (compoundtag != null) {
|
||||
- p_194239_.m_142466_(compoundtag);
|
||||
- p_205557_.m_142466_(compoundtag);
|
||||
- }
|
||||
+ p_194239_.onDataPacket(f_104885_, p_104976_);
|
||||
+ p_205557_.onDataPacket(f_104885_, p_104976_);
|
||||
|
||||
if (p_194239_ instanceof CommandBlockEntity && this.f_104888_.f_91080_ instanceof CommandBlockEditScreen) {
|
||||
if (p_205557_ instanceof CommandBlockEntity && this.f_104888_.f_91080_ instanceof CommandBlockEditScreen) {
|
||||
((CommandBlockEditScreen)this.f_104888_.f_91080_).m_98398_();
|
||||
@@ -1160,6 +_,7 @@
|
||||
@@ -1147,6 +_,7 @@
|
||||
public void m_7443_(ClientboundCommandsPacket p_104990_) {
|
||||
PacketUtils.m_131363_(p_104990_, this, this.f_104888_);
|
||||
this.f_104899_ = new CommandDispatcher<>(p_104990_.m_131884_());
|
||||
+ this.f_104899_ = net.minecraftforge.client.ClientCommandHandler.mergeServerCommands(this.f_104899_);
|
||||
}
|
||||
|
||||
public void m_7183_(ClientboundStopSoundPacket p_105116_) {
|
||||
@@ -1168,6 +_,7 @@
|
||||
clientrecipebook.m_90625_(this.f_104900_.m_44051_());
|
||||
clientrecipebook.m_90639_().forEach(mutablesearchtree::m_8080_);
|
||||
mutablesearchtree.m_7729_();
|
||||
@@ -58,24 +66,24 @@
|
||||
}
|
||||
|
||||
public void m_7244_(ClientboundPlayerLookAtPacket p_105054_) {
|
||||
@@ -1237,7 +_,7 @@
|
||||
@@ -1245,7 +_,7 @@
|
||||
PacketUtils.m_131363_(p_105130_, this, this.f_104888_);
|
||||
Entity entity = this.f_104889_.m_6815_(p_105130_.m_133622_());
|
||||
if (entity instanceof LivingEntity) {
|
||||
- MobEffect mobeffect = MobEffect.m_19453_(p_105130_.m_133623_());
|
||||
+ MobEffect mobeffect = MobEffect.m_19453_(p_105130_.m_133623_() & 0xFF);
|
||||
- MobEffect mobeffect = MobEffect.m_19453_(p_105130_.m_211135_());
|
||||
+ MobEffect mobeffect = MobEffect.m_19453_(p_105130_.m_211135_() & 0xFF);
|
||||
if (mobeffect != null) {
|
||||
MobEffectInstance mobeffectinstance = new MobEffectInstance(mobeffect, p_105130_.m_133625_(), p_105130_.m_133624_(), p_105130_.m_133627_(), p_105130_.m_133626_(), p_105130_.m_133628_());
|
||||
mobeffectinstance.m_19562_(p_105130_.m_133619_());
|
||||
@@ -1254,6 +_,7 @@
|
||||
f_104883_.warn("Incomplete server tags, disconnecting. Missing: {}", (Object)multimap);
|
||||
this.f_104885_.m_129507_(new TranslatableComponent("multiplayer.disconnect.missing_tags"));
|
||||
} else {
|
||||
+ tagcontainer = net.minecraftforge.common.ForgeTagHandler.reinjectOptionalTags(tagcontainer);
|
||||
this.f_104895_ = tagcontainer;
|
||||
if (!this.f_104885_.m_129531_()) {
|
||||
tagcontainer.m_13431_();
|
||||
@@ -1803,7 +_,8 @@
|
||||
@@ -1262,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_104888_.m_91171_(SearchRegistry.f_119942_).m_7729_();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(this.f_104903_));
|
||||
}
|
||||
|
||||
private <T> void m_205560_(ResourceKey<? extends Registry<? extends T>> p_205561_, TagNetworkSerialization.NetworkPayload p_205562_) {
|
||||
@@ -1815,7 +_,8 @@
|
||||
int i5 = friendlybytebuf.m_130242_();
|
||||
this.f_104888_.f_91064_.f_173815_.m_173830_(positionsource, i5);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
--- a/net/minecraft/client/particle/ParticleEngine.java
|
||||
+++ b/net/minecraft/client/particle/ParticleEngine.java
|
||||
@@ -70,7 +_,7 @@
|
||||
@@ -66,11 +_,11 @@
|
||||
private static final int f_172264_ = 16384;
|
||||
private static final List<ParticleRenderType> f_107288_ = ImmutableList.of(ParticleRenderType.f_107429_, ParticleRenderType.f_107430_, ParticleRenderType.f_107432_, ParticleRenderType.f_107431_, ParticleRenderType.f_107433_);
|
||||
protected ClientLevel f_107287_;
|
||||
- private final Map<ParticleRenderType, Queue<Particle>> f_107289_ = Maps.newIdentityHashMap();
|
||||
+ private final Map<ParticleRenderType, Queue<Particle>> f_107289_ = Maps.newTreeMap(net.minecraftforge.client.ForgeHooksClient.makeParticleRenderTypeComparator(f_107288_));
|
||||
private final Queue<TrackingEmitter> f_107290_ = Queues.newArrayDeque();
|
||||
private final TextureManager f_107291_;
|
||||
private final Random f_107292_ = new Random();
|
||||
@@ -34,7 +39,7 @@
|
||||
return particleprovider == null ? null : particleprovider.m_6966_(p_107396_, this.f_107287_, p_107397_, p_107398_, p_107399_, p_107400_, p_107401_, p_107402_);
|
||||
}
|
||||
|
||||
@@ -381,7 +_,13 @@
|
||||
@@ -381,15 +_,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +52,11 @@
|
||||
+ public void render(PoseStack p_107337_, MultiBufferSource.BufferSource p_107338_, LightTexture p_107339_, Camera p_107340_, float p_107341_, @Nullable net.minecraft.client.renderer.culling.Frustum clippingHelper) {
|
||||
p_107339_.m_109896_();
|
||||
RenderSystem.m_69482_();
|
||||
+ RenderSystem.m_69388_(org.lwjgl.opengl.GL13.GL_TEXTURE2);
|
||||
+ RenderSystem.m_69493_();
|
||||
+ RenderSystem.m_69388_(org.lwjgl.opengl.GL13.GL_TEXTURE0);
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
@@ -389,7 +_,8 @@
|
||||
posestack.m_85836_();
|
||||
posestack.m_166854_(p_107337_.m_85850_().m_85861_());
|
||||
RenderSystem.m_157182_();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/LocalPlayer.java
|
||||
+++ b/net/minecraft/client/player/LocalPlayer.java
|
||||
@@ -144,6 +_,7 @@
|
||||
@@ -145,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean m_6469_(DamageSource p_108662_, float p_108663_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -466,6 +_,11 @@
|
||||
@@ -461,6 +_,11 @@
|
||||
}
|
||||
|
||||
public void m_5496_(SoundEvent p_108651_, float p_108652_, float p_108653_) {
|
||||
@@ -20,7 +20,7 @@
|
||||
this.f_19853_.m_7785_(this.m_20185_(), this.m_20186_(), this.m_20189_(), p_108651_, this.m_5720_(), p_108652_, p_108653_, false);
|
||||
}
|
||||
|
||||
@@ -621,6 +_,7 @@
|
||||
@@ -616,6 +_,7 @@
|
||||
boolean flag2 = this.m_108733_();
|
||||
this.f_108601_ = !this.m_150110_().f_35935_ && !this.m_6069_() && this.m_20175_(Pose.CROUCHING) && (this.m_6144_() || !this.m_5803_() && !this.m_20175_(Pose.STANDING));
|
||||
this.f_108618_.m_7606_(this.m_108635_());
|
||||
@@ -28,7 +28,7 @@
|
||||
this.f_108619_.m_91301_().m_120586_(this.f_108618_);
|
||||
if (this.m_6117_() && !this.m_20159_()) {
|
||||
this.f_108618_.f_108566_ *= 0.2F;
|
||||
@@ -693,7 +_,7 @@
|
||||
@@ -688,7 +_,7 @@
|
||||
|
||||
if (this.f_108618_.f_108572_ && !flag7 && !flag && !this.m_150110_().f_35935_ && !this.m_20159_() && !this.m_6147_()) {
|
||||
ItemStack itemstack = this.m_6844_(EquipmentSlot.CHEST);
|
||||
@@ -37,7 +37,7 @@
|
||||
this.f_108617_.m_104955_(new ServerboundPlayerCommandPacket(this, ServerboundPlayerCommandPacket.Action.START_FALL_FLYING));
|
||||
}
|
||||
}
|
||||
@@ -811,6 +_,7 @@
|
||||
@@ -806,6 +_,7 @@
|
||||
|
||||
public void m_6083_() {
|
||||
super.m_6083_();
|
||||
@@ -45,7 +45,7 @@
|
||||
this.f_108611_ = false;
|
||||
if (this.m_20202_() instanceof Boat) {
|
||||
Boat boat = (Boat)this.m_20202_();
|
||||
@@ -1024,6 +_,18 @@
|
||||
@@ -1019,6 +_,18 @@
|
||||
} else {
|
||||
return super.m_7398_(p_108758_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/FogRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/FogRenderer.java
|
||||
@@ -171,21 +_,40 @@
|
||||
@@ -173,24 +_,42 @@
|
||||
|
||||
if (f_109010_ != 0.0F && f_109011_ != 0.0F && f_109012_ != 0.0F) {
|
||||
float f8 = Math.min(1.0F / f_109010_, Math.min(1.0F / f_109011_, 1.0F / f_109012_));
|
||||
@@ -33,20 +33,22 @@
|
||||
+ public static void setupFog(Camera p_109025_, FogRenderer.FogMode p_109026_, float p_109027_, boolean p_109028_, float partialTicks) {
|
||||
FogType fogtype = p_109025_.m_167685_();
|
||||
Entity entity = p_109025_.m_90592_();
|
||||
+ // TODO
|
||||
FogShape fogshape = FogShape.SPHERE;
|
||||
float f;
|
||||
float f1;
|
||||
+ float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(p_109026_, p_109025_, partialTicks, 0.1F);
|
||||
+ if (hook >= 0) {
|
||||
+ RenderSystem.m_157445_(-8.0F);
|
||||
+ RenderSystem.m_157443_(hook * 0.5F);
|
||||
+ f = -8.0f;
|
||||
+ f1 = hook * 0.5F;
|
||||
+ } else
|
||||
if (fogtype == FogType.WATER) {
|
||||
float f = 192.0F;
|
||||
if (entity instanceof LocalPlayer) {
|
||||
@@ -245,6 +_,7 @@
|
||||
|
||||
RenderSystem.m_157445_(f2);
|
||||
RenderSystem.m_157443_(f3);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(p_109026_, p_109025_, partialTicks, f3);
|
||||
}
|
||||
|
||||
if (fogtype == FogType.LAVA) {
|
||||
if (entity.m_5833_()) {
|
||||
f = -8.0F;
|
||||
@@ -253,6 +_,7 @@
|
||||
RenderSystem.m_157445_(f);
|
||||
RenderSystem.m_157443_(f1);
|
||||
RenderSystem.m_202160_(fogshape);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(p_109026_, p_109025_, partialTicks, f1);
|
||||
}
|
||||
|
||||
public static void m_109036_() {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/GameRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/GameRenderer.java
|
||||
@@ -286,6 +_,8 @@
|
||||
@@ -288,6 +_,8 @@
|
||||
this.m_109128_(new ResourceLocation("shaders/post/spider.json"));
|
||||
} else if (p_109107_ instanceof EnderMan) {
|
||||
this.m_109128_(new ResourceLocation("shaders/post/invert.json"));
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -542,6 +_,7 @@
|
||||
@@ -544,6 +_,7 @@
|
||||
list1.add(Pair.of(new ShaderInstance(p_172768_, "rendertype_crumbling", DefaultVertexFormat.f_85811_), (p_172733_) -> {
|
||||
f_172607_ = p_172733_;
|
||||
}));
|
||||
@@ -17,7 +17,7 @@
|
||||
} catch (IOException ioexception) {
|
||||
list1.forEach((p_172772_) -> {
|
||||
p_172772_.getFirst().close();
|
||||
@@ -704,7 +_,7 @@
|
||||
@@ -706,7 +_,7 @@
|
||||
d0 *= (double)Mth.m_14179_(this.f_109059_.f_91066_.f_92070_, 1.0F, 0.85714287F);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,11 +_,11 @@
|
||||
@@ -843,11 +_,11 @@
|
||||
|
||||
Window window = this.f_109059_.m_91268_();
|
||||
RenderSystem.m_69421_(256, Minecraft.f_91002_);
|
||||
@@ -40,7 +40,7 @@
|
||||
RenderSystem.m_157182_();
|
||||
Lighting.m_84931_();
|
||||
PoseStack posestack1 = new PoseStack();
|
||||
@@ -880,7 +_,7 @@
|
||||
@@ -882,7 +_,7 @@
|
||||
}
|
||||
} else if (this.f_109059_.f_91080_ != null) {
|
||||
try {
|
||||
@@ -49,7 +49,7 @@
|
||||
} catch (Throwable throwable1) {
|
||||
CrashReport crashreport1 = CrashReport.m_127521_(throwable1, "Rendering screen");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.m_127514_("Screen render details");
|
||||
@@ -1037,6 +_,11 @@
|
||||
@@ -1040,6 +_,11 @@
|
||||
Matrix4f matrix4f = posestack.m_85850_().m_85861_();
|
||||
this.m_109111_(matrix4f);
|
||||
camera.m_90575_(this.f_109059_.f_91073_, (Entity)(this.f_109059_.m_91288_() == null ? this.f_109059_.f_91074_ : this.f_109059_.m_91288_()), !this.f_109059_.f_91066_.m_92176_().m_90612_(), this.f_109059_.f_91066_.m_92176_().m_90613_(), p_109090_);
|
||||
@@ -61,7 +61,7 @@
|
||||
p_109092_.m_85845_(Vector3f.f_122223_.m_122240_(camera.m_90589_()));
|
||||
p_109092_.m_85845_(Vector3f.f_122225_.m_122240_(camera.m_90590_() + 180.0F));
|
||||
Matrix3f matrix3f = p_109092_.m_85850_().m_85864_().m_8183_();
|
||||
@@ -1046,6 +_,8 @@
|
||||
@@ -1049,6 +_,8 @@
|
||||
|
||||
this.f_109059_.f_91060_.m_172961_(p_109092_, camera.m_90583_(), this.m_172716_(Math.max(d0, this.f_109059_.f_91066_.f_92068_)));
|
||||
this.f_109059_.f_91060_.m_109599_(p_109092_, p_109090_, p_109091_, flag, camera, this, this.f_109074_, matrix4f);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/LevelRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/LevelRenderer.java
|
||||
@@ -257,6 +_,11 @@
|
||||
@@ -259,6 +_,11 @@
|
||||
}
|
||||
|
||||
private void m_109703_(LightTexture p_109704_, float p_109705_, double p_109706_, double p_109707_, double p_109708_) {
|
||||
@@ -12,7 +12,7 @@
|
||||
float f = this.f_109461_.f_91073_.m_46722_(p_109705_);
|
||||
if (!(f <= 0.0F)) {
|
||||
p_109704_.m_109896_();
|
||||
@@ -377,6 +_,11 @@
|
||||
@@ -379,6 +_,11 @@
|
||||
}
|
||||
|
||||
public void m_109693_(Camera p_109694_) {
|
||||
@@ -24,14 +24,14 @@
|
||||
float f = this.f_109461_.f_91073_.m_46722_(1.0F) / (Minecraft.m_91405_() ? 1.0F : 2.0F);
|
||||
if (!(f <= 0.0F)) {
|
||||
Random random = new Random((long)this.f_109477_ * 312987231L);
|
||||
@@ -1148,20 +_,23 @@
|
||||
@@ -1134,20 +_,23 @@
|
||||
RenderSystem.m_69421_(16640, Minecraft.f_91002_);
|
||||
float f = p_109605_.m_109152_();
|
||||
boolean flag2 = this.f_109461_.f_91073_.m_104583_().m_5781_(Mth.m_14107_(d0), Mth.m_14107_(d1)) || this.f_109461_.f_91065_.m_93090_().m_93715_();
|
||||
+ FogRenderer.setupFog(p_109604_, FogRenderer.FogMode.FOG_SKY, f, flag2, p_109601_);
|
||||
profilerfiller.m_6182_("sky");
|
||||
RenderSystem.m_157427_(GameRenderer::m_172808_);
|
||||
this.m_181409_(p_109600_, p_109607_, p_109601_, () -> {
|
||||
this.m_202423_(p_109600_, p_109607_, p_109601_, p_109604_, flag2, () -> {
|
||||
- FogRenderer.m_109024_(p_109604_, FogRenderer.FogMode.FOG_SKY, f, flag2);
|
||||
+ FogRenderer.setupFog(p_109604_, FogRenderer.FogMode.FOG_SKY, f, flag2, p_109601_);
|
||||
});
|
||||
@@ -50,46 +50,46 @@
|
||||
this.m_172993_(RenderType.m_110463_(), p_109600_, d0, d1, d2, p_109607_);
|
||||
if (this.f_109465_.m_104583_().m_108885_()) {
|
||||
Lighting.m_84925_(p_109600_.m_85850_().m_85861_());
|
||||
@@ -1191,7 +_,7 @@
|
||||
MultiBufferSource.BufferSource multibuffersource$buffersource = this.f_109464_.m_110104_();
|
||||
|
||||
@@ -1179,7 +_,7 @@
|
||||
for(Entity entity : this.f_109465_.m_104735_()) {
|
||||
- if ((this.f_109463_.m_114397_(entity, frustum, d0, d1, d2) || entity.m_20367_(this.f_109461_.f_91074_)) && (entity != p_109604_.m_90592_() || p_109604_.m_90594_() || p_109604_.m_90592_() instanceof LivingEntity && ((LivingEntity)p_109604_.m_90592_()).m_5803_()) && (!(entity instanceof LocalPlayer) || p_109604_.m_90592_() == entity)) {
|
||||
+ if ((this.f_109463_.m_114397_(entity, frustum, d0, d1, d2) || entity.m_20367_(this.f_109461_.f_91074_)) && (entity != p_109604_.m_90592_() || p_109604_.m_90594_() || p_109604_.m_90592_() instanceof LivingEntity && ((LivingEntity)p_109604_.m_90592_()).m_5803_()) && (!(entity instanceof LocalPlayer) || p_109604_.m_90592_() == entity || (entity == f_109461_.f_91074_ && !f_109461_.f_91074_.m_5833_()))) { //FORGE: render local player entity when it is not the renderViewEntity
|
||||
++this.f_109439_;
|
||||
if (entity.f_19797_ == 0) {
|
||||
entity.f_19790_ = entity.m_20185_();
|
||||
@@ -1230,6 +_,7 @@
|
||||
if (this.f_109463_.m_114397_(entity, frustum, d0, d1, d2) || entity.m_20367_(this.f_109461_.f_91074_)) {
|
||||
BlockPos blockpos = entity.m_142538_();
|
||||
- if ((this.f_109465_.m_151562_(blockpos.m_123342_()) || this.m_202430_(blockpos)) && (entity != p_109604_.m_90592_() || p_109604_.m_90594_() || p_109604_.m_90592_() instanceof LivingEntity && ((LivingEntity)p_109604_.m_90592_()).m_5803_()) && (!(entity instanceof LocalPlayer) || p_109604_.m_90592_() == entity)) {
|
||||
+ if ((this.f_109465_.m_151562_(blockpos.m_123342_()) || this.m_202430_(blockpos)) && (entity != p_109604_.m_90592_() || p_109604_.m_90594_() || p_109604_.m_90592_() instanceof LivingEntity && ((LivingEntity)p_109604_.m_90592_()).m_5803_()) && (!(entity instanceof LocalPlayer) || p_109604_.m_90592_() == entity || (entity == f_109461_.f_91074_ && !f_109461_.f_91074_.m_5833_()))) { //FORGE: render local player entity when it is not the renderViewEntity
|
||||
++this.f_109439_;
|
||||
if (entity.f_19797_ == 0) {
|
||||
entity.f_19790_ = entity.m_20185_();
|
||||
@@ -1219,6 +_,7 @@
|
||||
List<BlockEntity> list = levelrenderer$renderchunkinfo.f_109839_.m_112835_().m_112773_();
|
||||
if (!list.isEmpty()) {
|
||||
for(BlockEntity blockentity1 : list) {
|
||||
+ if(!frustum.m_113029_(blockentity1.getRenderBoundingBox())) continue;
|
||||
BlockPos blockpos3 = blockentity1.m_58899_();
|
||||
BlockPos blockpos4 = blockentity1.m_58899_();
|
||||
MultiBufferSource multibuffersource1 = multibuffersource$buffersource;
|
||||
p_109600_.m_85836_();
|
||||
@@ -1255,6 +_,7 @@
|
||||
@@ -1244,6 +_,7 @@
|
||||
|
||||
synchronized(this.f_109468_) {
|
||||
for(BlockEntity blockentity : this.f_109468_) {
|
||||
+ if(!frustum.m_113029_(blockentity.getRenderBoundingBox())) continue;
|
||||
BlockPos blockpos2 = blockentity.m_58899_();
|
||||
BlockPos blockpos3 = blockentity.m_58899_();
|
||||
p_109600_.m_85836_();
|
||||
p_109600_.m_85837_((double)blockpos2.m_123341_() - d0, (double)blockpos2.m_123342_() - d1, (double)blockpos2.m_123343_() - d2);
|
||||
@@ -1306,10 +_,13 @@
|
||||
p_109600_.m_85837_((double)blockpos3.m_123341_() - d0, (double)blockpos3.m_123342_() - d1, (double)blockpos3.m_123343_() - d2);
|
||||
@@ -1295,10 +_,13 @@
|
||||
profilerfiller.m_6182_("outline");
|
||||
BlockPos blockpos = ((BlockHitResult)hitresult).m_82425_();
|
||||
BlockState blockstate = this.f_109465_.m_8055_(blockpos);
|
||||
BlockPos blockpos1 = ((BlockHitResult)hitresult).m_82425_();
|
||||
BlockState blockstate = this.f_109465_.m_8055_(blockpos1);
|
||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawHighlight(this, p_109604_, hitresult, p_109601_, p_109600_, multibuffersource$buffersource))
|
||||
if (!blockstate.m_60795_() && this.f_109465_.m_6857_().m_61937_(blockpos)) {
|
||||
if (!blockstate.m_60795_() && this.f_109465_.m_6857_().m_61937_(blockpos1)) {
|
||||
VertexConsumer vertexconsumer2 = multibuffersource$buffersource.m_6299_(RenderType.m_110504_());
|
||||
this.m_109637_(p_109600_, vertexconsumer2, p_109604_.m_90592_(), d0, d1, d2, blockpos, blockstate);
|
||||
this.m_109637_(p_109600_, vertexconsumer2, p_109604_.m_90592_(), d0, d1, d2, blockpos1, blockstate);
|
||||
}
|
||||
+ } else if (hitresult != null && hitresult.m_6662_() == HitResult.Type.ENTITY) {
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onDrawHighlight(this, p_109604_, hitresult, p_109601_, p_109600_, multibuffersource$buffersource);
|
||||
}
|
||||
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
@@ -1344,7 +_,7 @@
|
||||
@@ -1333,7 +_,7 @@
|
||||
this.f_109415_.m_83945_(this.f_109461_.m_91385_());
|
||||
RenderStateShard.f_110126_.m_110185_();
|
||||
profilerfiller.m_6182_("particles");
|
||||
@@ -98,7 +98,7 @@
|
||||
RenderStateShard.f_110126_.m_110188_();
|
||||
} else {
|
||||
profilerfiller.m_6182_("translucent");
|
||||
@@ -1358,7 +_,7 @@
|
||||
@@ -1347,7 +_,7 @@
|
||||
profilerfiller.m_6182_("string");
|
||||
this.m_172993_(RenderType.m_110503_(), p_109600_, d0, d1, d2, p_109607_);
|
||||
profilerfiller.m_6182_("particles");
|
||||
@@ -107,19 +107,19 @@
|
||||
}
|
||||
|
||||
posestack.m_85836_();
|
||||
@@ -1790,6 +_,11 @@
|
||||
@@ -1783,6 +_,11 @@
|
||||
|
||||
public void m_181409_(PoseStack p_181410_, Matrix4f p_181411_, float p_181412_, Runnable p_181413_) {
|
||||
p_181413_.run();
|
||||
public void m_202423_(PoseStack p_202424_, Matrix4f p_202425_, float p_202426_, Camera p_202427_, boolean p_202428_, Runnable p_202429_) {
|
||||
p_202429_.run();
|
||||
+ net.minecraftforge.client.ISkyRenderHandler renderHandler = f_109465_.m_104583_().getSkyRenderHandler();
|
||||
+ if (renderHandler != null) {
|
||||
+ renderHandler.render(f_109477_, p_181412_, p_181410_, f_109465_, f_109461_);
|
||||
+ renderHandler.render(f_109477_, p_202426_, p_202424_, f_109465_, f_109461_);
|
||||
+ return;
|
||||
+ }
|
||||
if (this.f_109461_.f_91073_.m_104583_().m_108883_() == DimensionSpecialEffects.SkyType.END) {
|
||||
this.m_109780_(p_181410_);
|
||||
} else if (this.f_109461_.f_91073_.m_104583_().m_108883_() == DimensionSpecialEffects.SkyType.NORMAL) {
|
||||
@@ -1904,6 +_,11 @@
|
||||
if (!p_202428_) {
|
||||
FogType fogtype = p_202427_.m_167685_();
|
||||
if (fogtype != FogType.POWDER_SNOW && fogtype != FogType.LAVA) {
|
||||
@@ -1910,6 +_,11 @@
|
||||
}
|
||||
|
||||
public void m_172954_(PoseStack p_172955_, Matrix4f p_172956_, float p_172957_, double p_172958_, double p_172959_, double p_172960_) {
|
||||
@@ -131,7 +131,7 @@
|
||||
float f = this.f_109465_.m_104583_().m_108871_();
|
||||
if (!Float.isNaN(f)) {
|
||||
RenderSystem.m_69464_();
|
||||
@@ -2089,7 +_,7 @@
|
||||
@@ -2095,7 +_,7 @@
|
||||
}
|
||||
} else {
|
||||
BlockPos blockpos1 = chunkrenderdispatcher$renderchunk.m_112839_().m_142082_(8, 8, 8);
|
||||
@@ -140,7 +140,7 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
@@ -2387,7 +_,12 @@
|
||||
@@ -2393,7 +_,12 @@
|
||||
this.f_109469_.m_110859_(p_109502_, p_109503_, p_109504_, p_109505_);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
SoundInstance soundinstance = this.f_109410_.get(p_109516_);
|
||||
if (soundinstance != null) {
|
||||
this.f_109461_.m_91106_().m_120399_(soundinstance);
|
||||
@@ -2395,7 +_,7 @@
|
||||
@@ -2401,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (p_109515_ != null) {
|
||||
@@ -162,7 +162,7 @@
|
||||
if (recorditem != null) {
|
||||
this.f_109461_.f_91065_.m_93055_(recorditem.m_43050_());
|
||||
}
|
||||
@@ -2547,7 +_,7 @@
|
||||
@@ -2553,7 +_,7 @@
|
||||
break;
|
||||
case 1010:
|
||||
if (Item.m_41445_(p_109536_) instanceof RecordItem) {
|
||||
@@ -171,7 +171,7 @@
|
||||
} else {
|
||||
this.m_109514_((SoundEvent)null, p_109535_);
|
||||
}
|
||||
@@ -2717,7 +_,7 @@
|
||||
@@ -2723,7 +_,7 @@
|
||||
case 2001:
|
||||
BlockState blockstate = Block.m_49803_(p_109536_);
|
||||
if (!blockstate.m_60795_()) {
|
||||
@@ -180,7 +180,7 @@
|
||||
this.f_109465_.m_104677_(p_109535_, soundtype.m_56775_(), SoundSource.BLOCKS, (soundtype.m_56773_() + 1.0F) / 2.0F, soundtype.m_56774_() * 0.8F, false);
|
||||
}
|
||||
|
||||
@@ -2882,7 +_,7 @@
|
||||
@@ -2888,7 +_,7 @@
|
||||
} else {
|
||||
int i = p_109538_.m_45517_(LightLayer.SKY, p_109540_);
|
||||
int j = p_109538_.m_45517_(LightLayer.BLOCK, p_109540_);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
}
|
||||
|
||||
if (!p_110719_.f_91074_.m_5833_()) {
|
||||
if (p_110719_.f_91074_.m_19941_(FluidTags.f_13131_)) {
|
||||
if (p_110719_.f_91074_.m_204029_(FluidTags.f_13131_)) {
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderWaterOverlay(player, p_110720_))
|
||||
m_110725_(p_110719_, p_110720_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/ShaderInstance.java
|
||||
+++ b/net/minecraft/client/renderer/ShaderInstance.java
|
||||
@@ -94,10 +_,14 @@
|
||||
@@ -96,10 +_,14 @@
|
||||
@Nullable
|
||||
public final Uniform f_173320_;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
Resource resource = null;
|
||||
|
||||
try {
|
||||
@@ -206,8 +_,9 @@
|
||||
@@ -209,8 +_,9 @@
|
||||
Program program1 = p_173342_.m_85570_().get(p_173343_);
|
||||
Program program;
|
||||
if (program1 == null) {
|
||||
|
||||
+67
-65
@@ -1,96 +1,98 @@
|
||||
--- a/net/minecraft/client/renderer/block/LiquidBlockRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/block/LiquidBlockRenderer.java
|
||||
@@ -72,9 +_,10 @@
|
||||
@@ -68,8 +_,9 @@
|
||||
|
||||
public boolean m_110954_(BlockAndTintGetter p_110955_, BlockPos p_110956_, VertexConsumer p_110957_, FluidState p_110958_) {
|
||||
boolean flag = p_110958_.m_76153_(FluidTags.f_13132_);
|
||||
public boolean m_203173_(BlockAndTintGetter p_203174_, BlockPos p_203175_, VertexConsumer p_203176_, BlockState p_203177_, FluidState p_203178_) {
|
||||
boolean flag = p_203178_.m_205070_(FluidTags.f_13132_);
|
||||
- TextureAtlasSprite[] atextureatlassprite = flag ? this.f_110940_ : this.f_110941_;
|
||||
+ TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_110955_, p_110956_, p_110958_);
|
||||
BlockState blockstate = p_110955_.m_8055_(p_110956_);
|
||||
- int i = flag ? 16777215 : BiomeColors.m_108811_(p_110955_, p_110956_);
|
||||
+ int i = p_110958_.m_76152_().getAttributes().getColor(p_110955_, p_110956_);
|
||||
- int i = flag ? 16777215 : BiomeColors.m_108811_(p_203174_, p_203175_);
|
||||
+ TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_203174_, p_203175_, p_203178_);
|
||||
+ int i = p_203178_.m_76152_().getAttributes().getColor(p_203174_, p_203175_);
|
||||
+ float alpha = (float)(i >> 24 & 255) / 255.0F;
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
@@ -159,15 +_,15 @@
|
||||
float f25 = f4 * f;
|
||||
float f26 = f4 * f1;
|
||||
float f27 = f4 * f2;
|
||||
- this.m_110984_(p_110957_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j);
|
||||
- this.m_110984_(p_110957_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
|
||||
- this.m_110984_(p_110957_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
|
||||
- this.m_110984_(p_110957_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, f16, f20, j);
|
||||
+ this.vertex(p_110957_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
|
||||
+ this.vertex(p_110957_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
|
||||
+ this.vertex(p_110957_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
|
||||
+ this.vertex(p_110957_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
|
||||
if (p_110958_.m_76171_(p_110955_, p_110956_.m_7494_())) {
|
||||
- this.m_110984_(p_110957_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j);
|
||||
- this.m_110984_(p_110957_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, f16, f20, j);
|
||||
- this.m_110984_(p_110957_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
|
||||
- this.m_110984_(p_110957_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
|
||||
+ this.vertex(p_110957_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
|
||||
+ this.vertex(p_110957_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
|
||||
+ this.vertex(p_110957_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
|
||||
+ this.vertex(p_110957_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
|
||||
@@ -184,15 +_,16 @@
|
||||
float f30 = f4 * f;
|
||||
float f31 = f4 * f1;
|
||||
float f32 = f4 * f2;
|
||||
- this.m_110984_(p_203176_, d1 + 0.0D, d2 + (double)f8, d0 + 0.0D, f30, f31, f32, f18, f22, j);
|
||||
- this.m_110984_(p_203176_, d1 + 0.0D, d2 + (double)f10, d0 + 1.0D, f30, f31, f32, f19, f23, j);
|
||||
- this.m_110984_(p_203176_, d1 + 1.0D, d2 + (double)f9, d0 + 1.0D, f30, f31, f32, f20, f24, j);
|
||||
- this.m_110984_(p_203176_, d1 + 1.0D, d2 + (double)f7, d0 + 0.0D, f30, f31, f32, f21, f25, j);
|
||||
+
|
||||
+ this.vertex(p_203176_, d1 + 0.0D, d2 + (double)f8, d0 + 0.0D, f30, f31, f32, alpha, f18, f22, j);
|
||||
+ this.vertex(p_203176_, d1 + 0.0D, d2 + (double)f10, d0 + 1.0D, f30, f31, f32, alpha, f19, f23, j);
|
||||
+ this.vertex(p_203176_, d1 + 1.0D, d2 + (double)f9, d0 + 1.0D, f30, f31, f32, alpha, f20, f24, j);
|
||||
+ this.vertex(p_203176_, d1 + 1.0D, d2 + (double)f7, d0 + 0.0D, f30, f31, f32, alpha, f21, f25, j);
|
||||
if (p_203178_.m_76171_(p_203174_, p_203175_.m_7494_())) {
|
||||
- this.m_110984_(p_203176_, d1 + 0.0D, d2 + (double)f8, d0 + 0.0D, f30, f31, f32, f18, f22, j);
|
||||
- this.m_110984_(p_203176_, d1 + 1.0D, d2 + (double)f7, d0 + 0.0D, f30, f31, f32, f21, f25, j);
|
||||
- this.m_110984_(p_203176_, d1 + 1.0D, d2 + (double)f9, d0 + 1.0D, f30, f31, f32, f20, f24, j);
|
||||
- this.m_110984_(p_203176_, d1 + 0.0D, d2 + (double)f10, d0 + 1.0D, f30, f31, f32, f19, f23, j);
|
||||
+ this.vertex(p_203176_, d1 + 0.0D, d2 + (double)f8, d0 + 0.0D, f30, f31, f32, alpha, f18, f22, j);
|
||||
+ this.vertex(p_203176_, d1 + 1.0D, d2 + (double)f7, d0 + 0.0D, f30, f31, f32, alpha, f21, f25, j);
|
||||
+ this.vertex(p_203176_, d1 + 1.0D, d2 + (double)f9, d0 + 1.0D, f30, f31, f32, alpha, f20, f24, j);
|
||||
+ this.vertex(p_203176_, d1 + 0.0D, d2 + (double)f10, d0 + 1.0D, f30, f31, f32, alpha, f19, f23, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,10 +_,10 @@
|
||||
float f41 = f3 * f;
|
||||
float f42 = f3 * f1;
|
||||
float f43 = f3 * f2;
|
||||
- this.m_110984_(p_110957_, d0, d1 + (double)f12, d2 + 1.0D, f41, f42, f43, f35, f39, i1);
|
||||
- this.m_110984_(p_110957_, d0, d1 + (double)f12, d2, f41, f42, f43, f35, f37, i1);
|
||||
- this.m_110984_(p_110957_, d0 + 1.0D, d1 + (double)f12, d2, f41, f42, f43, f36, f37, i1);
|
||||
- this.m_110984_(p_110957_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f41, f42, f43, f36, f39, i1);
|
||||
+ this.vertex(p_110957_, d0, d1 + (double)f12, d2 + 1.0D, f41, f42, f43, alpha, f35, f39, i1);
|
||||
+ this.vertex(p_110957_, d0, d1 + (double)f12, d2, f41, f42, f43, alpha, f35, f37, i1);
|
||||
+ this.vertex(p_110957_, d0 + 1.0D, d1 + (double)f12, d2, f41, f42, f43, alpha, f36, f37, i1);
|
||||
+ this.vertex(p_110957_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f41, f42, f43, alpha, f36, f39, i1);
|
||||
@@ -205,10 +_,11 @@
|
||||
float f46 = f3 * f;
|
||||
float f47 = f3 * f1;
|
||||
float f48 = f3 * f2;
|
||||
- this.m_110984_(p_203176_, d1, d2 + (double)f17, d0 + 1.0D, f46, f47, f48, f40, f43, l);
|
||||
- this.m_110984_(p_203176_, d1, d2 + (double)f17, d0, f46, f47, f48, f40, f42, l);
|
||||
- this.m_110984_(p_203176_, d1 + 1.0D, d2 + (double)f17, d0, f46, f47, f48, f41, f42, l);
|
||||
- this.m_110984_(p_203176_, d1 + 1.0D, d2 + (double)f17, d0 + 1.0D, f46, f47, f48, f41, f43, l);
|
||||
+
|
||||
+ this.vertex(p_203176_, d1, d2 + (double)f17, d0 + 1.0D, f46, f47, f48, alpha, f40, f43, l);
|
||||
+ this.vertex(p_203176_, d1, d2 + (double)f17, d0, f46, f47, f48, alpha, f40, f42, l);
|
||||
+ this.vertex(p_203176_, d1 + 1.0D, d2 + (double)f17, d0, f46, f47, f48, alpha, f41, f42, l);
|
||||
+ this.vertex(p_203176_, d1 + 1.0D, d2 + (double)f17, d0 + 1.0D, f46, f47, f48, alpha, f41, f43, l);
|
||||
flag7 = true;
|
||||
}
|
||||
|
||||
@@ -240,10 +_,9 @@
|
||||
@@ -264,10 +_,9 @@
|
||||
flag7 = true;
|
||||
BlockPos blockpos = p_110956_.m_142300_(direction);
|
||||
BlockPos blockpos = p_203175_.m_142300_(direction);
|
||||
TextureAtlasSprite textureatlassprite2 = atextureatlassprite[1];
|
||||
- if (!flag) {
|
||||
- Block block = p_110955_.m_8055_(blockpos).m_60734_();
|
||||
- Block block = p_203174_.m_8055_(blockpos).m_60734_();
|
||||
- if (block instanceof HalfTransparentBlock || block instanceof LeavesBlock) {
|
||||
- textureatlassprite2 = this.f_110942_;
|
||||
+ if (atextureatlassprite[2] != null) {
|
||||
+ if (p_110955_.m_8055_(blockpos).shouldDisplayFluidOverlay(p_110955_, blockpos, p_110958_)) {
|
||||
+ if (p_203174_.m_8055_(blockpos).shouldDisplayFluidOverlay(p_203174_, blockpos, p_203178_)) {
|
||||
+ textureatlassprite2 = atextureatlassprite[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,15 +_,15 @@
|
||||
float f32 = f4 * f31 * f;
|
||||
float f33 = f4 * f31 * f1;
|
||||
float f34 = f4 * f31 * f2;
|
||||
- this.m_110984_(p_110957_, d3, d1 + (double)f38, d4, f32, f33, f34, f49, f28, k);
|
||||
- this.m_110984_(p_110957_, d5, d1 + (double)f40, d6, f32, f33, f34, f50, f29, k);
|
||||
- this.m_110984_(p_110957_, d5, d1 + (double)f12, d6, f32, f33, f34, f50, f30, k);
|
||||
- this.m_110984_(p_110957_, d3, d1 + (double)f12, d4, f32, f33, f34, f49, f30, k);
|
||||
+ this.vertex(p_110957_, d3, d1 + (double)f38, d4, f32, f33, f34, alpha, f49, f28, k);
|
||||
+ this.vertex(p_110957_, d5, d1 + (double)f40, d6, f32, f33, f34, alpha, f50, f29, k);
|
||||
+ this.vertex(p_110957_, d5, d1 + (double)f12, d6, f32, f33, f34, alpha, f50, f30, k);
|
||||
+ this.vertex(p_110957_, d3, d1 + (double)f12, d4, f32, f33, f34, alpha, f49, f30, k);
|
||||
@@ -280,15 +_,16 @@
|
||||
float f37 = f4 * f36 * f;
|
||||
float f38 = f4 * f36 * f1;
|
||||
float f39 = f4 * f36 * f2;
|
||||
- this.m_110984_(p_203176_, d3, d2 + (double)f44, d4, f37, f38, f39, f54, f33, k);
|
||||
- this.m_110984_(p_203176_, d5, d2 + (double)f45, d6, f37, f38, f39, f55, f34, k);
|
||||
- this.m_110984_(p_203176_, d5, d2 + (double)f17, d6, f37, f38, f39, f55, f35, k);
|
||||
- this.m_110984_(p_203176_, d3, d2 + (double)f17, d4, f37, f38, f39, f54, f35, k);
|
||||
+
|
||||
+ this.vertex(p_203176_, d3, d2 + (double)f44, d4, f37, f38, f39, alpha, f54, f33, k);
|
||||
+ this.vertex(p_203176_, d5, d2 + (double)f45, d6, f37, f38, f39, alpha, f55, f34, k);
|
||||
+ this.vertex(p_203176_, d5, d2 + (double)f17, d6, f37, f38, f39, alpha, f55, f35, k);
|
||||
+ this.vertex(p_203176_, d3, d2 + (double)f17, d4, f37, f38, f39, alpha, f54, f35, k);
|
||||
if (textureatlassprite2 != this.f_110942_) {
|
||||
- this.m_110984_(p_110957_, d3, d1 + (double)f12, d4, f32, f33, f34, f49, f30, k);
|
||||
- this.m_110984_(p_110957_, d5, d1 + (double)f12, d6, f32, f33, f34, f50, f30, k);
|
||||
- this.m_110984_(p_110957_, d5, d1 + (double)f40, d6, f32, f33, f34, f50, f29, k);
|
||||
- this.m_110984_(p_110957_, d3, d1 + (double)f38, d4, f32, f33, f34, f49, f28, k);
|
||||
+ this.vertex(p_110957_, d3, d1 + (double)f12, d4, f32, f33, f34, alpha, f49, f30, k);
|
||||
+ this.vertex(p_110957_, d5, d1 + (double)f12, d6, f32, f33, f34, alpha, f50, f30, k);
|
||||
+ this.vertex(p_110957_, d5, d1 + (double)f40, d6, f32, f33, f34, alpha, f50, f29, k);
|
||||
+ this.vertex(p_110957_, d3, d1 + (double)f38, d4, f32, f33, f34, alpha, f49, f28, k);
|
||||
- this.m_110984_(p_203176_, d3, d2 + (double)f17, d4, f37, f38, f39, f54, f35, k);
|
||||
- this.m_110984_(p_203176_, d5, d2 + (double)f17, d6, f37, f38, f39, f55, f35, k);
|
||||
- this.m_110984_(p_203176_, d5, d2 + (double)f45, d6, f37, f38, f39, f55, f34, k);
|
||||
- this.m_110984_(p_203176_, d3, d2 + (double)f44, d4, f37, f38, f39, f54, f33, k);
|
||||
+ this.vertex(p_203176_, d3, d2 + (double)f17, d4, f37, f38, f39, alpha, f54, f35, k);
|
||||
+ this.vertex(p_203176_, d5, d2 + (double)f17, d6, f37, f38, f39, alpha, f55, f35, k);
|
||||
+ this.vertex(p_203176_, d5, d2 + (double)f45, d6, f37, f38, f39, alpha, f55, f34, k);
|
||||
+ this.vertex(p_203176_, d3, d2 + (double)f44, d4, f37, f38, f39, alpha, f54, f33, k);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,8 +_,8 @@
|
||||
@@ -343,8 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java
|
||||
+++ b/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java
|
||||
@@ -72,12 +_,15 @@
|
||||
@@ -73,12 +_,15 @@
|
||||
private Vec3 f_112683_ = Vec3.f_82478_;
|
||||
|
||||
public ChunkRenderDispatcher(ClientLevel p_194405_, LevelRenderer p_194406_, Executor p_194407_, boolean p_194408_, ChunkBufferBuilderPack p_194409_) {
|
||||
@@ -17,7 +17,7 @@
|
||||
this.f_112678_ = p_194409_;
|
||||
List<ChunkBufferBuilderPack> list = Lists.newArrayListWithExpectedSize(l);
|
||||
|
||||
@@ -415,7 +_,7 @@
|
||||
@@ -420,7 +_,7 @@
|
||||
if (!chunkrenderdispatcher$compiledchunk.f_112750_.contains(p_112810_)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -26,16 +26,16 @@
|
||||
p_112811_.m_112709_(this.f_112788_);
|
||||
return true;
|
||||
}
|
||||
@@ -443,7 +_,7 @@
|
||||
BlockPos blockpos = this.f_112793_.m_7949_();
|
||||
int i = 1;
|
||||
RenderChunkRegion renderchunkregion = p_200438_.m_200465_(ChunkRenderDispatcher.this.f_112681_, blockpos.m_142082_(-1, -1, -1), blockpos.m_142082_(16, 16, 16), 1);
|
||||
- this.f_112787_ = new ChunkRenderDispatcher.RenderChunk.RebuildTask(this.m_112832_(), renderchunkregion, flag || this.f_112784_.get() != ChunkRenderDispatcher.CompiledChunk.f_112748_);
|
||||
@@ -452,7 +_,7 @@
|
||||
this.f_202433_.incrementAndGet();
|
||||
}
|
||||
|
||||
- this.f_112787_ = new ChunkRenderDispatcher.RenderChunk.RebuildTask(this.m_112832_(), renderchunkregion, !flag1 || this.f_202433_.get() > 2);
|
||||
+ this.f_112787_ = new ChunkRenderDispatcher.RenderChunk.RebuildTask(new net.minecraft.world.level.ChunkPos(m_112839_()), this.m_112832_(), renderchunkregion, flag || this.f_112784_.get() != ChunkRenderDispatcher.CompiledChunk.f_112748_);
|
||||
return this.f_112787_;
|
||||
}
|
||||
|
||||
@@ -476,10 +_,20 @@
|
||||
@@ -485,10 +_,20 @@
|
||||
protected final double f_112847_;
|
||||
protected final AtomicBoolean f_112848_ = new AtomicBoolean(false);
|
||||
protected final boolean f_194420_;
|
||||
@@ -56,7 +56,7 @@
|
||||
}
|
||||
|
||||
public abstract CompletableFuture<ChunkRenderDispatcher.ChunkTaskResult> m_5869_(ChunkBufferBuilderPack p_112853_);
|
||||
@@ -491,6 +_,10 @@
|
||||
@@ -500,6 +_,10 @@
|
||||
public int compareTo(ChunkRenderDispatcher.RenderChunk.ChunkCompileTask p_112855_) {
|
||||
return Doubles.compare(this.f_112847_, p_112855_.f_112847_);
|
||||
}
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -498,8 +_,13 @@
|
||||
@@ -507,8 +_,13 @@
|
||||
@Nullable
|
||||
protected RenderChunkRegion f_112858_;
|
||||
|
||||
@@ -82,10 +82,10 @@
|
||||
this.f_112858_ = p_194428_;
|
||||
}
|
||||
|
||||
@@ -580,8 +_,10 @@
|
||||
}
|
||||
@@ -591,8 +_,10 @@
|
||||
|
||||
FluidState fluidstate = renderchunkregion.m_6425_(blockpos2);
|
||||
BlockState blockstate1 = renderchunkregion.m_8055_(blockpos2);
|
||||
FluidState fluidstate = blockstate1.m_60819_();
|
||||
- if (!fluidstate.m_76178_()) {
|
||||
- RenderType rendertype = ItemBlockRenderTypes.m_109287_(fluidstate);
|
||||
+ net.minecraftforge.client.model.data.IModelData modelData = getModelData(blockpos2);
|
||||
@@ -95,7 +95,7 @@
|
||||
BufferBuilder bufferbuilder = p_112870_.m_108839_(rendertype);
|
||||
if (p_112869_.f_112750_.add(rendertype)) {
|
||||
RenderChunk.this.m_112805_(bufferbuilder);
|
||||
@@ -593,8 +_,8 @@
|
||||
@@ -604,8 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
BufferBuilder bufferbuilder2 = p_112870_.m_108839_(rendertype1);
|
||||
if (p_112869_.f_112750_.add(rendertype1)) {
|
||||
RenderChunk.this.m_112805_(bufferbuilder2);
|
||||
@@ -602,14 +_,16 @@
|
||||
@@ -613,14 +_,16 @@
|
||||
|
||||
posestack.m_85836_();
|
||||
posestack.m_85837_((double)(blockpos2.m_123341_() & 15), (double)(blockpos2.m_123342_() & 15), (double)(blockpos2.m_123343_() & 15));
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
if (p_112869_.f_112749_.contains(RenderType.m_110466_())) {
|
||||
BufferBuilder bufferbuilder1 = p_112870_.m_108839_(RenderType.m_110466_());
|
||||
@@ -628,10 +_,10 @@
|
||||
@@ -639,10 +_,10 @@
|
||||
private <E extends BlockEntity> void m_112877_(ChunkRenderDispatcher.CompiledChunk p_112878_, Set<BlockEntity> p_112879_, E p_112880_) {
|
||||
BlockEntityRenderer<E> blockentityrenderer = Minecraft.m_91087_().m_167982_().m_112265_(p_112880_);
|
||||
if (blockentityrenderer != null) {
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -649,8 +_,13 @@
|
||||
@@ -660,8 +_,13 @@
|
||||
class ResortTransparencyTask extends ChunkRenderDispatcher.RenderChunk.ChunkCompileTask {
|
||||
private final ChunkRenderDispatcher.CompiledChunk f_112886_;
|
||||
|
||||
|
||||
+9
-11
@@ -1,12 +1,10 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java
|
||||
@@ -44,19 +_,20 @@
|
||||
if (itemstack.m_41720_() instanceof ArmorItem) {
|
||||
ArmorItem armoritem = (ArmorItem)itemstack.m_41720_();
|
||||
@@ -46,17 +_,18 @@
|
||||
if (armoritem.m_40402_() == p_117122_) {
|
||||
+ p_117124_ = getArmorModelHook(p_117121_, itemstack, p_117122_, p_117124_);
|
||||
this.m_117386_().m_102872_(p_117124_);
|
||||
this.m_117125_(p_117124_, p_117122_);
|
||||
+ net.minecraft.client.model.Model model = getArmorModelHook(p_117121_, itemstack, p_117122_, p_117124_);
|
||||
boolean flag = this.m_117128_(p_117122_);
|
||||
boolean flag1 = itemstack.m_41790_();
|
||||
- if (armoritem instanceof DyeableArmorItem) {
|
||||
@@ -18,11 +16,11 @@
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag1, p_117124_, flag, f, f1, f2, (String)null);
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag1, p_117124_, flag, 1.0F, 1.0F, 1.0F, "overlay");
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, p_117124_, f, f1, f2, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, p_117124_, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, "overlay"));
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, model, f, f1, f2, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, model, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, "overlay"));
|
||||
} else {
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag1, p_117124_, flag, 1.0F, 1.0F, 1.0F, (String)null);
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, p_117124_, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, model, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,7 +31,7 @@
|
||||
- VertexConsumer vertexconsumer = ItemRenderer.m_115184_(p_117108_, RenderType.m_110431_(this.m_117080_(p_117110_, p_117113_, p_117117_)), false, p_117111_);
|
||||
+ renderModel(p_117107_, p_117108_, p_117109_, p_117111_, p_117112_, p_117114_, p_117115_, p_117116_, this.m_117080_(p_117110_, p_117113_, p_117117_));
|
||||
+ }
|
||||
+ private void renderModel(PoseStack p_117107_, MultiBufferSource p_117108_, int p_117109_, boolean p_117111_, A p_117112_, float p_117114_, float p_117115_, float p_117116_, ResourceLocation armorResource) {
|
||||
+ private void renderModel(PoseStack p_117107_, MultiBufferSource p_117108_, int p_117109_, boolean p_117111_, net.minecraft.client.model.Model p_117112_, float p_117114_, float p_117115_, float p_117116_, ResourceLocation armorResource) {
|
||||
+ VertexConsumer vertexconsumer = ItemRenderer.m_115184_(p_117108_, RenderType.m_110431_(armorResource), false, p_117111_);
|
||||
p_117112_.m_7695_(p_117107_, vertexconsumer, p_117109_, OverlayTexture.f_118083_, p_117114_, p_117115_, p_117116_, 1.0F);
|
||||
}
|
||||
@@ -51,9 +49,9 @@
|
||||
+ /*=================================== FORGE START =========================================*/
|
||||
+
|
||||
+ /**
|
||||
+ * Hook to allow item-sensitive armor model. for LayerBipedArmor.
|
||||
+ * Hook to allow item-sensitive armor model. for HumanoidArmorLayer.
|
||||
+ */
|
||||
+ protected A getArmorModelHook(T entity, ItemStack itemStack, EquipmentSlot slot, A model) {
|
||||
+ protected net.minecraft.client.model.Model getArmorModelHook(T entity, ItemStack itemStack, EquipmentSlot slot, A model) {
|
||||
+ return net.minecraftforge.client.ForgeHooksClient.getArmorModel(entity, itemStack, slot, model);
|
||||
+ }
|
||||
+
|
||||
@@ -75,7 +73,7 @@
|
||||
+ domain = texture.substring(0, idx);
|
||||
+ texture = texture.substring(idx + 1);
|
||||
+ }
|
||||
+ String s1 = String.format("%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, (m_117128_(slot) ? 2 : 1), type == null ? "" : String.format("_%s", type));
|
||||
+ String s1 = String.format(java.util.Locale.ROOT, "%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, (m_117128_(slot) ? 2 : 1), type == null ? "" : String.format(java.util.Locale.ROOT, "_%s", type));
|
||||
+
|
||||
+ s1 = net.minecraftforge.client.ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, type);
|
||||
+ ResourceLocation resourcelocation = f_117070_.get(s1);
|
||||
|
||||
+13
@@ -10,3 +10,16 @@
|
||||
}
|
||||
|
||||
public Vec3 m_7860_(AbstractClientPlayer p_117785_, float p_117786_) {
|
||||
@@ -158,10 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_117770_(PoseStack p_117771_, MultiBufferSource p_117772_, int p_117773_, AbstractClientPlayer p_117774_) {
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonArm(p_117771_, p_117772_, p_117773_, p_117774_, HumanoidArm.RIGHT))
|
||||
this.m_117775_(p_117771_, p_117772_, p_117773_, p_117774_, (this.f_115290_).f_102811_, (this.f_115290_).f_103375_);
|
||||
}
|
||||
|
||||
public void m_117813_(PoseStack p_117814_, MultiBufferSource p_117815_, int p_117816_, AbstractClientPlayer p_117817_) {
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonArm(p_117814_, p_117815_, p_117816_, p_117817_, HumanoidArm.LEFT))
|
||||
this.m_117775_(p_117814_, p_117815_, p_117816_, p_117817_, (this.f_115290_).f_102812_, (this.f_115290_).f_103374_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/server/IntegratedServer.java
|
||||
+++ b/net/minecraft/client/server/IntegratedServer.java
|
||||
@@ -62,9 +_,10 @@
|
||||
@@ -60,9 +_,10 @@
|
||||
this.m_129997_(true);
|
||||
this.m_129999_(true);
|
||||
this.m_129793_();
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
public void m_5705_(BooleanSupplier p_120049_) {
|
||||
@@ -181,6 +_,7 @@
|
||||
@@ -179,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7570_(boolean p_120053_) {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -35,7 +_,7 @@
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
-public class CommandSourceStack implements SharedSuggestionProvider {
|
||||
+public class CommandSourceStack implements SharedSuggestionProvider, net.minecraftforge.common.extensions.IForgeCommandSourceStack {
|
||||
public static final SimpleCommandExceptionType f_81286_ = new SimpleCommandExceptionType(new TranslatableComponent("permissions.requires.player"));
|
||||
public static final SimpleCommandExceptionType f_81287_ = new SimpleCommandExceptionType(new TranslatableComponent("permissions.requires.entity"));
|
||||
private final CommandSource f_81288_;
|
||||
@@ -1,6 +1,15 @@
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -199,6 +_,7 @@
|
||||
@@ -177,7 +_,7 @@
|
||||
JfrCommand.m_183645_(this.f_82090_);
|
||||
}
|
||||
|
||||
- if (SharedConstants.f_136183_) {
|
||||
+ if (net.minecraftforge.gametest.ForgeGameTestHooks.isGametestEnabled()) {
|
||||
TestCommand.m_127946_(this.f_82090_);
|
||||
}
|
||||
|
||||
@@ -201,6 +_,7 @@
|
||||
if (p_82093_.f_82144_) {
|
||||
PublishCommand.m_138184_(this.f_82090_);
|
||||
}
|
||||
@@ -8,7 +17,7 @@
|
||||
|
||||
this.f_82090_.findAmbiguities((p_82108_, p_82109_, p_82110_, p_82111_) -> {
|
||||
f_82089_.warn("Ambiguity between arguments {} and {} with inputs: {}", this.f_82090_.getPath(p_82109_), this.f_82090_.getPath(p_82110_), p_82111_);
|
||||
@@ -218,7 +_,15 @@
|
||||
@@ -220,7 +_,15 @@
|
||||
|
||||
try {
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/commands/arguments/ObjectiveArgument.java
|
||||
+++ b/net/minecraft/commands/arguments/ObjectiveArgument.java
|
||||
@@ -31,7 +_,7 @@
|
||||
|
||||
public static Objective m_101960_(CommandContext<CommandSourceStack> p_101961_, String p_101962_) throws CommandSyntaxException {
|
||||
String s = p_101961_.getArgument(p_101962_, String.class);
|
||||
- Scoreboard scoreboard = p_101961_.getSource().m_81377_().m_129896_();
|
||||
+ Scoreboard scoreboard = p_101961_.getSource().getScoreboard();
|
||||
Objective objective = scoreboard.m_83477_(s);
|
||||
if (objective == null) {
|
||||
throw f_101953_.create(s);
|
||||
@@ -57,7 +_,7 @@
|
||||
S s = p_101974_.getSource();
|
||||
if (s instanceof CommandSourceStack) {
|
||||
CommandSourceStack commandsourcestack = (CommandSourceStack)s;
|
||||
- return SharedSuggestionProvider.m_82970_(commandsourcestack.m_81377_().m_129896_().m_83474_(), p_101975_);
|
||||
+ return SharedSuggestionProvider.m_82970_(commandsourcestack.getScoreboard().m_83474_(), p_101975_);
|
||||
} else if (s instanceof SharedSuggestionProvider) {
|
||||
SharedSuggestionProvider sharedsuggestionprovider = (SharedSuggestionProvider)s;
|
||||
return sharedsuggestionprovider.m_212155_(p_101974_);
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/commands/arguments/ResourceLocationArgument.java
|
||||
+++ b/net/minecraft/commands/arguments/ResourceLocationArgument.java
|
||||
@@ -39,7 +_,7 @@
|
||||
|
||||
public static Advancement m_106987_(CommandContext<CommandSourceStack> p_106988_, String p_106989_) throws CommandSyntaxException {
|
||||
ResourceLocation resourcelocation = m_107011_(p_106988_, p_106989_);
|
||||
- Advancement advancement = p_106988_.getSource().m_81377_().m_129889_().m_136041_(resourcelocation);
|
||||
+ Advancement advancement = p_106988_.getSource().getAdvancement(resourcelocation);
|
||||
if (advancement == null) {
|
||||
throw f_106978_.create(resourcelocation);
|
||||
} else {
|
||||
@@ -48,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static Recipe<?> m_106994_(CommandContext<CommandSourceStack> p_106995_, String p_106996_) throws CommandSyntaxException {
|
||||
- RecipeManager recipemanager = p_106995_.getSource().m_81377_().m_129894_();
|
||||
+ RecipeManager recipemanager = p_106995_.getSource().getRecipeManager();
|
||||
ResourceLocation resourcelocation = m_107011_(p_106995_, p_106996_);
|
||||
return recipemanager.m_44043_(resourcelocation).orElseThrow(() -> {
|
||||
return f_106979_.create(resourcelocation);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/commands/arguments/TeamArgument.java
|
||||
+++ b/net/minecraft/commands/arguments/TeamArgument.java
|
||||
@@ -28,7 +_,7 @@
|
||||
|
||||
public static PlayerTeam m_112091_(CommandContext<CommandSourceStack> p_112092_, String p_112093_) throws CommandSyntaxException {
|
||||
String s = p_112092_.getArgument(p_112093_, String.class);
|
||||
- Scoreboard scoreboard = p_112092_.getSource().m_81377_().m_129896_();
|
||||
+ Scoreboard scoreboard = p_112092_.getSource().getScoreboard();
|
||||
PlayerTeam playerteam = scoreboard.m_83489_(s);
|
||||
if (playerteam == null) {
|
||||
throw f_112085_.create(s);
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/commands/arguments/coordinates/BlockPosArgument.java
|
||||
+++ b/net/minecraft/commands/arguments/coordinates/BlockPosArgument.java
|
||||
@@ -30,9 +_,9 @@
|
||||
|
||||
public static BlockPos m_118242_(CommandContext<CommandSourceStack> p_118243_, String p_118244_) throws CommandSyntaxException {
|
||||
BlockPos blockpos = p_118243_.getArgument(p_118244_, Coordinates.class).m_119568_(p_118243_.getSource());
|
||||
- if (!p_118243_.getSource().m_81372_().m_46805_(blockpos)) {
|
||||
+ if (!p_118243_.getSource().getUnsidedLevel().m_46805_(blockpos)) {
|
||||
throw f_118234_.create();
|
||||
- } else if (!p_118243_.getSource().m_81372_().m_46739_(blockpos)) {
|
||||
+ } else if (!p_118243_.getSource().getUnsidedLevel().m_46739_(blockpos)) {
|
||||
throw f_118235_.create();
|
||||
} else {
|
||||
return blockpos;
|
||||
@@ -1,11 +1,21 @@
|
||||
--- a/net/minecraft/commands/synchronization/ArgumentTypes.java
|
||||
+++ b/net/minecraft/commands/synchronization/ArgumentTypes.java
|
||||
@@ -257,4 +_,8 @@
|
||||
this.f_121620_ = p_121624_;
|
||||
@@ -122,7 +_,7 @@
|
||||
m_121601_("uuid", UuidArgument.class, new EmptyArgumentSerializer<>(UuidArgument::m_113850_));
|
||||
m_121601_("resource", m_211031_(ResourceKeyArgument.class), new ResourceKeyArgument.Serializer());
|
||||
m_121601_("resource_or_tag", m_211031_(ResourceOrTagLocationArgument.class), new ResourceOrTagLocationArgument.Serializer());
|
||||
- if (SharedConstants.f_136183_) {
|
||||
+ if (net.minecraftforge.gametest.ForgeGameTestHooks.isGametestEnabled()) {
|
||||
m_121601_("test_argument", TestFunctionArgument.class, new EmptyArgumentSerializer<>(TestFunctionArgument::m_128088_));
|
||||
m_121601_("test_class", TestClassNameArgument.class, new EmptyArgumentSerializer<>(TestClassNameArgument::m_127917_));
|
||||
}
|
||||
}
|
||||
@@ -262,5 +_,9 @@
|
||||
this.f_121619_ = p_211034_;
|
||||
this.f_121620_ = p_211035_;
|
||||
}
|
||||
+ }
|
||||
+ @javax.annotation.Nullable public static ResourceLocation getId(ArgumentType<?> type) {
|
||||
+ Entry<?> entry = m_121616_(type);
|
||||
+ return entry == null ? null : entry.f_121620_;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
--- a/net/minecraft/core/MappedRegistry.java
|
||||
+++ b/net/minecraft/core/MappedRegistry.java
|
||||
@@ -218,9 +_,10 @@
|
||||
@@ -279,6 +_,13 @@
|
||||
return this.f_205842_.containsKey(p_175392_);
|
||||
}
|
||||
|
||||
public static <T> Codec<MappedRegistry<T>> m_122756_(ResourceKey<? extends Registry<T>> p_122757_, Lifecycle p_122758_, Codec<T> p_122759_) {
|
||||
- return Codec.unboundedMap(ResourceLocation.f_135803_.xmap(ResourceKey.m_135797_(p_122757_), ResourceKey::m_135782_), p_122759_).xmap((p_194547_) -> {
|
||||
+ // FORGE: Fix MC-197860
|
||||
+ return new net.minecraftforge.common.LenientUnboundedMapCodec<>(ResourceLocation.f_135803_.xmap(ResourceKey.m_135797_(p_122757_), ResourceKey::m_135782_), p_122759_).xmap((p_122726_) -> {
|
||||
MappedRegistry<T> mappedregistry = new MappedRegistry<>(p_122757_, p_122758_);
|
||||
- p_194547_.forEach((p_194536_, p_194537_) -> {
|
||||
+ p_122726_.forEach((p_194536_, p_194537_) -> {
|
||||
mappedregistry.m_7135_(p_194536_, p_194537_, p_122758_);
|
||||
});
|
||||
return mappedregistry;
|
||||
+ // Forge: For internal use only. Use the Register events when registering values.
|
||||
+ public void unfreeze() {
|
||||
+ this.f_205845_ = false;
|
||||
+ if (this.f_205846_ != null && this.f_205847_ == null)
|
||||
+ this.f_205847_ = new IdentityHashMap<>();
|
||||
+ }
|
||||
+
|
||||
public Registry<T> m_203521_() {
|
||||
this.f_205845_ = true;
|
||||
List<ResourceLocation> list = this.f_205842_.entrySet().stream().filter((p_211055_) -> {
|
||||
@@ -1,184 +1,195 @@
|
||||
--- a/net/minecraft/core/Registry.java
|
||||
+++ b/net/minecraft/core/Registry.java
|
||||
@@ -106,6 +_,10 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -116,6 +_,10 @@
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+/*
|
||||
+ * Attention Modders: This SHOULD NOT be used, you should use ForgeRegistries instead. As it has a cleaner modder facing API.
|
||||
+ * We will be wrapping all of these in our API as necessary for syncing and management.
|
||||
+ */
|
||||
public abstract class Registry<T> implements Keyable, IdMap<T> {
|
||||
protected static final Logger f_122894_ = LogManager.getLogger();
|
||||
private static final Logger f_122894_ = LogUtils.getLogger();
|
||||
private static final Map<ResourceLocation, Supplier<?>> f_122834_ = Maps.newLinkedHashMap();
|
||||
@@ -153,43 +_,43 @@
|
||||
public static final DefaultedRegistry<GameEvent> f_175412_ = m_122995_(f_175423_, "step", () -> {
|
||||
@@ -163,43 +_,43 @@
|
||||
public static final DefaultedRegistry<GameEvent> f_175412_ = m_206031_(f_175423_, "step", GameEvent::m_204530_, (p_206044_) -> {
|
||||
return GameEvent.f_157785_;
|
||||
});
|
||||
- public static final Registry<SoundEvent> f_122821_ = m_122999_(f_122898_, () -> {
|
||||
+ @Deprecated public static final Registry<SoundEvent> f_122821_ = forge(f_122898_, () -> {
|
||||
- public static final Registry<SoundEvent> f_122821_ = m_206008_(f_122898_, (p_206042_) -> {
|
||||
+ @Deprecated public static final Registry<SoundEvent> f_122821_ = forge(f_122898_, (registry) -> {
|
||||
return SoundEvents.f_12019_;
|
||||
});
|
||||
- public static final DefaultedRegistry<Fluid> f_122822_ = m_122995_(f_122899_, "empty", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Fluid> f_122822_ = forge(f_122899_, "empty", () -> {
|
||||
- public static final DefaultedRegistry<Fluid> f_122822_ = m_206031_(f_122899_, "empty", Fluid::m_205069_, (p_206040_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Fluid> f_122822_ = forge(f_122899_, "empty", (registry) -> {
|
||||
return Fluids.f_76191_;
|
||||
});
|
||||
- public static final Registry<MobEffect> f_122823_ = m_122999_(f_122900_, () -> {
|
||||
+ @Deprecated public static final Registry<MobEffect> f_122823_ = forge(f_122900_, () -> {
|
||||
- public static final Registry<MobEffect> f_122823_ = m_206008_(f_122900_, (p_205982_) -> {
|
||||
+ @Deprecated public static final Registry<MobEffect> f_122823_ = forge(f_122900_, (registry) -> {
|
||||
return MobEffects.f_19621_;
|
||||
});
|
||||
- public static final DefaultedRegistry<Block> f_122824_ = m_122995_(f_122901_, "air", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Block> f_122824_ = forge(f_122901_, "air", () -> {
|
||||
- public static final DefaultedRegistry<Block> f_122824_ = m_206031_(f_122901_, "air", Block::m_204297_, (p_205980_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Block> f_122824_ = forge(f_122901_, "air", (registry) -> {
|
||||
return Blocks.f_50016_;
|
||||
});
|
||||
- public static final Registry<Enchantment> f_122825_ = m_122999_(f_122902_, () -> {
|
||||
+ @Deprecated public static final Registry<Enchantment> f_122825_ = forge(f_122902_, () -> {
|
||||
- public static final Registry<Enchantment> f_122825_ = m_206008_(f_122902_, (p_205978_) -> {
|
||||
+ @Deprecated public static final Registry<Enchantment> f_122825_ = forge(f_122902_, (registry) -> {
|
||||
return Enchantments.f_44987_;
|
||||
});
|
||||
- public static final DefaultedRegistry<EntityType<?>> f_122826_ = m_122995_(f_122903_, "pig", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<EntityType<?>> f_122826_ = forge(f_122903_, "pig", () -> {
|
||||
- public static final DefaultedRegistry<EntityType<?>> f_122826_ = m_206031_(f_122903_, "pig", EntityType::m_204041_, (p_205976_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<EntityType<?>> f_122826_ = forge(f_122903_, "pig", (registry) -> {
|
||||
return EntityType.f_20510_;
|
||||
});
|
||||
- public static final DefaultedRegistry<Item> f_122827_ = m_122995_(f_122904_, "air", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Item> f_122827_ = forge(f_122904_, "air", () -> {
|
||||
- public static final DefaultedRegistry<Item> f_122827_ = m_206031_(f_122904_, "air", Item::m_204114_, (p_205974_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Item> f_122827_ = forge(f_122904_, "air", (registry) -> {
|
||||
return Items.f_41852_;
|
||||
});
|
||||
- public static final DefaultedRegistry<Potion> f_122828_ = m_122995_(f_122905_, "empty", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Potion> f_122828_ = forge(f_122905_, "empty", () -> {
|
||||
- public static final DefaultedRegistry<Potion> f_122828_ = m_206027_(f_122905_, "empty", (p_205972_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Potion> f_122828_ = forge(f_122905_, "empty", (registry) -> {
|
||||
return Potions.f_43598_;
|
||||
});
|
||||
- public static final Registry<ParticleType<?>> f_122829_ = m_122999_(f_122906_, () -> {
|
||||
+ @Deprecated public static final Registry<ParticleType<?>> f_122829_ = forge(f_122906_, () -> {
|
||||
- public static final Registry<ParticleType<?>> f_122829_ = m_206008_(f_122906_, (p_205970_) -> {
|
||||
+ @Deprecated public static final Registry<ParticleType<?>> f_122829_ = forge(f_122906_, (registry) -> {
|
||||
return ParticleTypes.f_123794_;
|
||||
});
|
||||
- public static final Registry<BlockEntityType<?>> f_122830_ = m_122999_(f_122907_, () -> {
|
||||
+ @Deprecated public static final Registry<BlockEntityType<?>> f_122830_ = forge(f_122907_, () -> {
|
||||
- public static final Registry<BlockEntityType<?>> f_122830_ = m_206008_(f_122907_, (p_205968_) -> {
|
||||
+ @Deprecated public static final Registry<BlockEntityType<?>> f_122830_ = forge(f_122907_, (registry) -> {
|
||||
return BlockEntityType.f_58917_;
|
||||
});
|
||||
- public static final DefaultedRegistry<Motive> f_122831_ = m_122995_(f_122908_, "kebab", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Motive> f_122831_ = forge(f_122908_, "kebab", () -> {
|
||||
- public static final DefaultedRegistry<Motive> f_122831_ = m_206027_(f_122908_, "kebab", (p_205966_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<Motive> f_122831_ = forge(f_122908_, "kebab", (registry) -> {
|
||||
return Motive.f_31866_;
|
||||
});
|
||||
public static final Registry<ResourceLocation> f_122832_ = m_122999_(f_122909_, () -> {
|
||||
public static final Registry<ResourceLocation> f_122832_ = m_206008_(f_122909_, (p_205964_) -> {
|
||||
return Stats.f_12926_;
|
||||
});
|
||||
- public static final DefaultedRegistry<ChunkStatus> f_122833_ = m_122995_(f_122910_, "empty", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<ChunkStatus> f_122833_ = forge(f_122910_, "empty", () -> {
|
||||
- public static final DefaultedRegistry<ChunkStatus> f_122833_ = m_206027_(f_122910_, "empty", (p_205962_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<ChunkStatus> f_122833_ = forge(f_122910_, "empty", (registry) -> {
|
||||
return ChunkStatus.f_62314_;
|
||||
});
|
||||
public static final Registry<RuleTestType<?>> f_122861_ = m_122999_(f_122911_, () -> {
|
||||
@@ -198,43 +_,43 @@
|
||||
public static final Registry<PosRuleTestType<?>> f_122862_ = m_122999_(f_122912_, () -> {
|
||||
public static final Registry<RuleTestType<?>> f_122861_ = m_206008_(f_122911_, (p_205960_) -> {
|
||||
@@ -208,43 +_,43 @@
|
||||
public static final Registry<PosRuleTestType<?>> f_122862_ = m_206008_(f_122912_, (p_205958_) -> {
|
||||
return PosRuleTestType.f_74205_;
|
||||
});
|
||||
- public static final Registry<MenuType<?>> f_122863_ = m_122999_(f_122913_, () -> {
|
||||
+ @Deprecated public static final Registry<MenuType<?>> f_122863_ = forge(f_122913_, () -> {
|
||||
- public static final Registry<MenuType<?>> f_122863_ = m_206008_(f_122913_, (p_205956_) -> {
|
||||
+ @Deprecated public static final Registry<MenuType<?>> f_122863_ = forge(f_122913_, (registry) -> {
|
||||
return MenuType.f_39964_;
|
||||
});
|
||||
public static final Registry<RecipeType<?>> f_122864_ = m_122999_(f_122914_, () -> {
|
||||
public static final Registry<RecipeType<?>> f_122864_ = m_206008_(f_122914_, (p_205954_) -> {
|
||||
return RecipeType.f_44107_;
|
||||
});
|
||||
- public static final Registry<RecipeSerializer<?>> f_122865_ = m_122999_(f_122915_, () -> {
|
||||
+ @Deprecated public static final Registry<RecipeSerializer<?>> f_122865_ = forge(f_122915_, () -> {
|
||||
- public static final Registry<RecipeSerializer<?>> f_122865_ = m_206008_(f_122915_, (p_205952_) -> {
|
||||
+ @Deprecated public static final Registry<RecipeSerializer<?>> f_122865_ = forge(f_122915_, (registry) -> {
|
||||
return RecipeSerializer.f_44077_;
|
||||
});
|
||||
- public static final Registry<Attribute> f_122866_ = m_122999_(f_122916_, () -> {
|
||||
+ @Deprecated public static final Registry<Attribute> f_122866_ = forge(f_122916_, () -> {
|
||||
- public static final Registry<Attribute> f_122866_ = m_206008_(f_122916_, (p_205950_) -> {
|
||||
+ @Deprecated public static final Registry<Attribute> f_122866_ = forge(f_122916_, (registry) -> {
|
||||
return Attributes.f_22286_;
|
||||
});
|
||||
public static final Registry<PositionSourceType<?>> f_175420_ = m_122999_(f_175408_, () -> {
|
||||
public static final Registry<PositionSourceType<?>> f_175420_ = m_206008_(f_175408_, (p_205948_) -> {
|
||||
return PositionSourceType.f_157871_;
|
||||
});
|
||||
- public static final Registry<StatType<?>> f_122867_ = m_122999_(f_122917_, () -> {
|
||||
+ @Deprecated public static final Registry<StatType<?>> f_122867_ = forge(f_122917_, () -> {
|
||||
- public static final Registry<StatType<?>> f_122867_ = m_206008_(f_122917_, (p_205946_) -> {
|
||||
+ @Deprecated public static final Registry<StatType<?>> f_122867_ = forge(f_122917_, (registry) -> {
|
||||
return Stats.f_12982_;
|
||||
});
|
||||
public static final DefaultedRegistry<VillagerType> f_122868_ = m_122995_(f_122808_, "plains", () -> {
|
||||
public static final DefaultedRegistry<VillagerType> f_122868_ = m_206027_(f_122808_, "plains", (p_205944_) -> {
|
||||
return VillagerType.f_35821_;
|
||||
});
|
||||
- public static final DefaultedRegistry<VillagerProfession> f_122869_ = m_122995_(f_122809_, "none", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<VillagerProfession> f_122869_ = forge(f_122809_, "none", () -> {
|
||||
- public static final DefaultedRegistry<VillagerProfession> f_122869_ = m_206027_(f_122809_, "none", (p_205942_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<VillagerProfession> f_122869_ = forge(f_122809_, "none", (registry) -> {
|
||||
return VillagerProfession.f_35585_;
|
||||
});
|
||||
- public static final DefaultedRegistry<PoiType> f_122870_ = m_122995_(f_122810_, "unemployed", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<PoiType> f_122870_ = forge(f_122810_, "unemployed", () -> {
|
||||
- public static final DefaultedRegistry<PoiType> f_122870_ = m_206027_(f_122810_, "unemployed", (p_205940_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<PoiType> f_122870_ = forge(f_122810_, "unemployed", (registry) -> {
|
||||
return PoiType.f_27331_;
|
||||
});
|
||||
- public static final DefaultedRegistry<MemoryModuleType<?>> f_122871_ = m_122995_(f_122811_, "dummy", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<MemoryModuleType<?>> f_122871_ = forge(f_122811_, "dummy", () -> {
|
||||
- public static final DefaultedRegistry<MemoryModuleType<?>> f_122871_ = m_206027_(f_122811_, "dummy", (p_205938_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<MemoryModuleType<?>> f_122871_ = forge(f_122811_, "dummy", (registry) -> {
|
||||
return MemoryModuleType.f_26349_;
|
||||
});
|
||||
- public static final DefaultedRegistry<SensorType<?>> f_122872_ = m_122995_(f_122812_, "dummy", () -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<SensorType<?>> f_122872_ = forge(f_122812_, "dummy", () -> {
|
||||
- public static final DefaultedRegistry<SensorType<?>> f_122872_ = m_206027_(f_122812_, "dummy", (p_205936_) -> {
|
||||
+ @Deprecated public static final DefaultedRegistry<SensorType<?>> f_122872_ = forge(f_122812_, "dummy", (registry) -> {
|
||||
return SensorType.f_26809_;
|
||||
});
|
||||
- public static final Registry<Schedule> f_122873_ = m_122999_(f_122813_, () -> {
|
||||
+ @Deprecated public static final Registry<Schedule> f_122873_ = forge(f_122813_, () -> {
|
||||
- public static final Registry<Schedule> f_122873_ = m_206008_(f_122813_, (p_205934_) -> {
|
||||
+ @Deprecated public static final Registry<Schedule> f_122873_ = forge(f_122813_, (registry) -> {
|
||||
return Schedule.f_38012_;
|
||||
});
|
||||
- public static final Registry<Activity> f_122874_ = m_122999_(f_122814_, () -> {
|
||||
+ @Deprecated public static final Registry<Activity> f_122874_ = forge(f_122814_, () -> {
|
||||
- public static final Registry<Activity> f_122874_ = m_206008_(f_122814_, (p_205932_) -> {
|
||||
+ @Deprecated public static final Registry<Activity> f_122874_ = forge(f_122814_, (registry) -> {
|
||||
return Activity.f_37979_;
|
||||
});
|
||||
public static final Registry<LootPoolEntryType> f_122875_ = m_122999_(f_122815_, () -> {
|
||||
@@ -281,15 +_,15 @@
|
||||
public static final ResourceKey<Registry<Biome>> f_122885_ = m_122978_("worldgen/biome");
|
||||
public static final Registry<LootPoolEntryType> f_122875_ = m_206008_(f_122815_, (p_206133_) -> {
|
||||
@@ -293,15 +_,15 @@
|
||||
public static final ResourceKey<Registry<NormalNoise.NoiseParameters>> f_194568_ = m_122978_("worldgen/noise");
|
||||
public static final ResourceKey<Registry<DensityFunction>> f_211074_ = m_122978_("worldgen/density_function");
|
||||
public static final ResourceKey<Registry<WorldCarver<?>>> f_122836_ = m_122978_("worldgen/carver");
|
||||
- public static final Registry<WorldCarver<?>> f_122837_ = m_122999_(f_122836_, () -> {
|
||||
+ @Deprecated public static final Registry<WorldCarver<?>> f_122837_ = forge(f_122836_, () -> {
|
||||
- public static final Registry<WorldCarver<?>> f_122837_ = m_206008_(f_122836_, (p_206112_) -> {
|
||||
+ @Deprecated public static final Registry<WorldCarver<?>> f_122837_ = forge(f_122836_, (registry) -> {
|
||||
return WorldCarver.f_64974_;
|
||||
});
|
||||
public static final ResourceKey<Registry<Feature<?>>> f_122838_ = m_122978_("worldgen/feature");
|
||||
- public static final Registry<Feature<?>> f_122839_ = m_122999_(f_122838_, () -> {
|
||||
+ @Deprecated public static final Registry<Feature<?>> f_122839_ = forge(f_122838_, () -> {
|
||||
- public static final Registry<Feature<?>> f_122839_ = m_206008_(f_122838_, (p_206109_) -> {
|
||||
+ @Deprecated public static final Registry<Feature<?>> f_122839_ = forge(f_122838_, (registry) -> {
|
||||
return Feature.f_65731_;
|
||||
});
|
||||
public static final ResourceKey<Registry<StructureFeature<?>>> f_122840_ = m_122978_("worldgen/structure_feature");
|
||||
- public static final Registry<StructureFeature<?>> f_122841_ = m_122999_(f_122840_, () -> {
|
||||
+ @Deprecated public static final Registry<StructureFeature<?>> f_122841_ = forge(f_122840_, () -> {
|
||||
- public static final Registry<StructureFeature<?>> f_122841_ = m_206008_(f_122840_, (p_206107_) -> {
|
||||
+ @Deprecated public static final Registry<StructureFeature<?>> f_122841_ = forge(f_122840_, (registry) -> {
|
||||
return StructureFeature.f_67014_;
|
||||
});
|
||||
public static final ResourceKey<Registry<StructurePieceType>> f_122842_ = m_122978_("worldgen/structure_piece");
|
||||
@@ -311,7 +_,7 @@
|
||||
public static final ResourceKey<Registry<Codec<? extends SurfaceRules.RuleSource>>> f_194572_ = m_122978_("worldgen/material_rule");
|
||||
public static final ResourceKey<Registry<StructurePlacementType<?>>> f_205929_ = m_122978_("worldgen/structure_placement");
|
||||
@@ -328,16 +_,16 @@
|
||||
public static final ResourceKey<Registry<Codec<? extends DensityFunction>>> f_211075_ = m_122978_("worldgen/density_function_type");
|
||||
public static final ResourceKey<Registry<StructureProcessorType<?>>> f_122854_ = m_122978_("worldgen/structure_processor");
|
||||
public static final ResourceKey<Registry<StructurePoolElementType<?>>> f_122855_ = m_122978_("worldgen/structure_pool_element");
|
||||
- public static final Registry<BlockStateProviderType<?>> f_122856_ = m_122999_(f_122846_, () -> {
|
||||
+ @Deprecated public static final Registry<BlockStateProviderType<?>> f_122856_ = forge(f_122846_, () -> {
|
||||
- public static final Registry<BlockStateProviderType<?>> f_122856_ = m_206008_(f_122846_, (p_206098_) -> {
|
||||
+ @Deprecated public static final Registry<BlockStateProviderType<?>> f_122856_ = forge(f_122846_, (registry) -> {
|
||||
return BlockStateProviderType.f_68752_;
|
||||
});
|
||||
public static final Registry<FoliagePlacerType<?>> f_122858_ = m_122999_(f_122848_, () -> {
|
||||
@@ -365,16 +_,32 @@
|
||||
return m_122981_(p_123000_, Lifecycle.experimental(), p_123001_);
|
||||
- public static final Registry<FoliagePlacerType<?>> f_122858_ = m_206008_(f_122848_, (p_206092_) -> {
|
||||
+ @Deprecated public static final Registry<FoliagePlacerType<?>> f_122858_ = forge(f_122848_, (registry) -> {
|
||||
return FoliagePlacerType.f_68591_;
|
||||
});
|
||||
public static final Registry<TrunkPlacerType<?>> f_122859_ = m_206008_(f_122849_, (p_206086_) -> {
|
||||
return TrunkPlacerType.f_70315_;
|
||||
});
|
||||
- public static final Registry<TreeDecoratorType<?>> f_122860_ = m_206008_(f_122850_, (p_206078_) -> {
|
||||
+ @Deprecated public static final Registry<TreeDecoratorType<?>> f_122860_ = forge(f_122850_, (registry) -> {
|
||||
return TreeDecoratorType.f_70043_;
|
||||
});
|
||||
public static final Registry<FeatureSizeType<?>> f_122888_ = m_206008_(f_122851_, (p_206072_) -> {
|
||||
@@ -383,16 +_,32 @@
|
||||
return m_205999_(p_206009_, Lifecycle.experimental(), p_206010_);
|
||||
}
|
||||
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> Registry<T> forge(ResourceKey<? extends Registry<T>> key, Supplier<T> def) {
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> Registry<T> forge(ResourceKey<? extends Registry<T>> key, Registry.RegistryBootstrap<T> def) {
|
||||
+ return forge(key, Lifecycle.experimental(), def);
|
||||
+ }
|
||||
+
|
||||
private static <T> DefaultedRegistry<T> m_122995_(ResourceKey<? extends Registry<T>> p_122996_, String p_122997_, Supplier<T> p_122998_) {
|
||||
return m_122990_(p_122996_, p_122997_, Lifecycle.experimental(), p_122998_);
|
||||
private static <T> DefaultedRegistry<T> m_206027_(ResourceKey<? extends Registry<T>> p_206028_, String p_206029_, Registry.RegistryBootstrap<T> p_206030_) {
|
||||
return m_206016_(p_206028_, p_206029_, Lifecycle.experimental(), p_206030_);
|
||||
}
|
||||
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> DefaultedRegistry<T> forge(ResourceKey<? extends Registry<T>> key, String defKey, Supplier<T> def) {
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> DefaultedRegistry<T> forge(ResourceKey<? extends Registry<T>> key, String defKey, Registry.RegistryBootstrap<T> def) {
|
||||
+ return forge(key, defKey, Lifecycle.experimental(), def);
|
||||
+ }
|
||||
+
|
||||
private static <T> Registry<T> m_122981_(ResourceKey<? extends Registry<T>> p_122982_, Lifecycle p_122983_, Supplier<T> p_122984_) {
|
||||
return m_122985_(p_122982_, new MappedRegistry<>(p_122982_, p_122983_), p_122984_, p_122983_);
|
||||
private static <T> DefaultedRegistry<T> m_206031_(ResourceKey<? extends Registry<T>> p_206032_, String p_206033_, Function<T, Holder.Reference<T>> p_206034_, Registry.RegistryBootstrap<T> p_206035_) {
|
||||
return m_206021_(p_206032_, p_206033_, Lifecycle.experimental(), p_206034_, p_206035_);
|
||||
}
|
||||
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> Registry<T> forge(ResourceKey<? extends Registry<T>> key, Lifecycle cycle, Supplier<T> def) {
|
||||
+ return m_122985_(key, net.minecraftforge.registries.GameData.getWrapper(key, cycle), def, cycle);
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> Registry<T> forge(ResourceKey<? extends Registry<T>> key, Lifecycle cycle, Registry.RegistryBootstrap<T> def) {
|
||||
+ return m_206011_(key, net.minecraftforge.registries.GameData.getWrapper(key, cycle), def, cycle);
|
||||
+ }
|
||||
+
|
||||
private static <T> DefaultedRegistry<T> m_122990_(ResourceKey<? extends Registry<T>> p_122991_, String p_122992_, Lifecycle p_122993_, Supplier<T> p_122994_) {
|
||||
return m_122985_(p_122991_, new DefaultedRegistry<>(p_122992_, p_122991_, p_122993_), p_122994_, p_122993_);
|
||||
private static <T> Registry<T> m_205999_(ResourceKey<? extends Registry<T>> p_206000_, Lifecycle p_206001_, Registry.RegistryBootstrap<T> p_206002_) {
|
||||
return m_206011_(p_206000_, new MappedRegistry<>(p_206000_, p_206001_, (Function<T, Holder.Reference<T>>)null), p_206002_, p_206001_);
|
||||
+ }
|
||||
+
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> DefaultedRegistry<T> forge(ResourceKey<? extends Registry<T>> key, String defKey, Lifecycle cycle, Supplier<T> def) {
|
||||
+ return m_122985_(key, net.minecraftforge.registries.GameData.getWrapper(key, cycle, defKey), def, cycle);
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> DefaultedRegistry<T> forge(ResourceKey<? extends Registry<T>> key, String defKey, Lifecycle cycle, Registry.RegistryBootstrap<T> def) {
|
||||
+ return m_206011_(key, net.minecraftforge.registries.GameData.getWrapper(key, cycle, defKey), def, cycle);
|
||||
}
|
||||
|
||||
private static <T, R extends WritableRegistry<T>> R m_122985_(ResourceKey<? extends Registry<T>> p_122986_, R p_122987_, Supplier<T> p_122988_, Lifecycle p_122989_) {
|
||||
private static <T> Registry<T> m_206003_(ResourceKey<? extends Registry<T>> p_206004_, Lifecycle p_206005_, Function<T, Holder.Reference<T>> p_206006_, Registry.RegistryBootstrap<T> p_206007_) {
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/core/RegistryAccess.java
|
||||
+++ b/net/minecraft/core/RegistryAccess.java
|
||||
@@ -109,6 +_,8 @@
|
||||
ResourceKey<? extends Registry<E>> resourcekey = p_194617_.f_123101_();
|
||||
boolean flag = !resourcekey.equals(Registry.f_122878_) && !resourcekey.equals(Registry.f_122818_);
|
||||
Registry<E> registry = f_123049_.m_175515_(resourcekey);
|
||||
@@ -185,6 +_,8 @@
|
||||
private static <E> void m_211081_(RegistryResourceAccess.InMemoryStorage p_211082_, RegistryAccess.RegistryData<E> p_211083_) {
|
||||
ResourceKey<? extends Registry<E>> resourcekey = p_211083_.f_123101_();
|
||||
Registry<E> registry = BuiltinRegistries.f_206379_.m_175515_(resourcekey);
|
||||
+ if (!resourcekey.equals(Registry.f_122818_))
|
||||
+ registry = ((Registry<Registry<E>>)BuiltinRegistries.f_123858_).m_6246_((ResourceKey<Registry<E>>)resourcekey);
|
||||
WritableRegistry<E> writableregistry = p_194615_.m_175512_(resourcekey);
|
||||
|
||||
for(Entry<ResourceKey<E>, E> entry : registry.m_6579_()) {
|
||||
ResourceKey<E> resourcekey1 = entry.getKey();
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/core/RegistryCodecs.java
|
||||
+++ b/net/minecraft/core/RegistryCodecs.java
|
||||
@@ -95,7 +_,8 @@
|
||||
}
|
||||
|
||||
private static <T> Codec<Map<ResourceKey<T>, T>> m_206315_(ResourceKey<? extends Registry<T>> p_206316_, Codec<T> p_206317_) {
|
||||
- return Codec.unboundedMap(ResourceLocation.f_135803_.xmap(ResourceKey.m_135797_(p_206316_), ResourceKey::m_135782_), p_206317_);
|
||||
+ // FORGE: Fix MC-197860
|
||||
+ return new net.minecraftforge.common.LenientUnboundedMapCodec<>(ResourceLocation.f_135803_.xmap(ResourceKey.m_135797_(p_206316_), ResourceKey::m_135782_), p_206317_);
|
||||
}
|
||||
|
||||
public static <E> Codec<HolderSet<E>> m_206279_(ResourceKey<? extends Registry<E>> p_206280_, Codec<E> p_206281_) {
|
||||
@@ -1,22 +1,22 @@
|
||||
--- a/net/minecraft/data/BuiltinRegistries.java
|
||||
+++ b/net/minecraft/data/BuiltinRegistries.java
|
||||
@@ -44,7 +_,7 @@
|
||||
@@ -52,7 +_,7 @@
|
||||
return ProcessorLists.f_127199_;
|
||||
});
|
||||
public static final Registry<StructureTemplatePool> f_123864_ = m_123893_(Registry.f_122884_, Pools::m_127189_);
|
||||
- public static final Registry<Biome> f_123865_ = m_123893_(Registry.f_122885_, () -> {
|
||||
+ @Deprecated public static final Registry<Biome> f_123865_ = forge(Registry.f_122885_, () -> {
|
||||
return Biomes.f_127321_;
|
||||
});
|
||||
public static final Registry<NoiseGeneratorSettings> f_123866_ = m_123893_(Registry.f_122878_, NoiseGeneratorSettings::m_64488_);
|
||||
@@ -52,6 +_,10 @@
|
||||
public static final Registry<StructureTemplatePool> f_123864_ = m_123893_(Registry.f_122884_, Pools::m_206434_);
|
||||
- public static final Registry<Biome> f_123865_ = m_123893_(Registry.f_122885_, Biomes::m_206462_);
|
||||
+ @Deprecated public static final Registry<Biome> f_123865_ = forge(Registry.f_122885_, Biomes::m_206462_);
|
||||
public static final Registry<NormalNoise.NoiseParameters> f_194654_ = m_123893_(Registry.f_194568_, NoiseData::m_206433_);
|
||||
public static final Registry<DensityFunction> f_211085_ = m_123893_(Registry.f_211074_, NoiseRouterData::m_209468_);
|
||||
public static final Registry<NoiseGeneratorSettings> f_123866_ = m_123893_(Registry.f_122878_, NoiseGeneratorSettings::m_204599_);
|
||||
@@ -60,6 +_,10 @@
|
||||
|
||||
private static <T> Registry<T> m_123893_(ResourceKey<? extends Registry<T>> p_123894_, Supplier<T> p_123895_) {
|
||||
private static <T> Registry<T> m_123893_(ResourceKey<? extends Registry<T>> p_123894_, Supplier<? extends Holder<? extends T>> p_123895_) {
|
||||
return m_123884_(p_123894_, Lifecycle.stable(), p_123895_);
|
||||
+ }
|
||||
+
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> Registry<T> forge(ResourceKey<? extends Registry<T>> key, Supplier<T> def) {
|
||||
+ return m_123888_(key, net.minecraftforge.registries.GameData.getWrapper(key, Lifecycle.stable()), def, Lifecycle.stable());
|
||||
+ private static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> Registry<T> forge(ResourceKey<? extends Registry<T>> key, Supplier<? extends Holder<? extends T>> holderSupplier) {
|
||||
+ return m_123888_(key, net.minecraftforge.registries.GameData.getWrapper(key, Lifecycle.stable()), holderSupplier, Lifecycle.stable());
|
||||
}
|
||||
|
||||
private static <T> Registry<T> m_123884_(ResourceKey<? extends Registry<T>> p_123885_, Lifecycle p_123886_, Supplier<T> p_123887_) {
|
||||
private static <T> Registry<T> m_123884_(ResourceKey<? extends Registry<T>> p_123885_, Lifecycle p_123886_, Supplier<? extends Holder<? extends T>> p_123887_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/data/Main.java
|
||||
+++ b/net/minecraft/data/Main.java
|
||||
@@ -41,8 +_,15 @@
|
||||
@@ -43,8 +_,15 @@
|
||||
OptionSpec<Void> optionspec6 = optionparser.accepts("all", "Include all generators");
|
||||
OptionSpec<String> optionspec7 = optionparser.accepts("output", "Output folder").withRequiredArg().defaultsTo("generated");
|
||||
OptionSpec<String> optionspec8 = optionparser.accepts("input", "Input folder").withRequiredArg();
|
||||
@@ -17,7 +17,7 @@
|
||||
Path path = Paths.get(optionspec7.value(optionset));
|
||||
boolean flag = optionset.has(optionspec6);
|
||||
boolean flag1 = flag || optionset.has(optionspec2);
|
||||
@@ -50,10 +_,14 @@
|
||||
@@ -52,10 +_,14 @@
|
||||
boolean flag3 = flag || optionset.has(optionspec3);
|
||||
boolean flag4 = flag || optionset.has(optionspec4);
|
||||
boolean flag5 = flag || optionset.has(optionspec5);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/data/tags/BlockTagsProvider.java
|
||||
+++ b/net/minecraft/data/tags/BlockTagsProvider.java
|
||||
@@ -9,8 +_,12 @@
|
||||
@@ -7,8 +_,12 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
public class BlockTagsProvider extends TagsProvider<Block> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/data/tags/EntityTypeTagsProvider.java
|
||||
+++ b/net/minecraft/data/tags/EntityTypeTagsProvider.java
|
||||
@@ -8,8 +_,12 @@
|
||||
@@ -6,8 +_,12 @@
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
|
||||
public class EntityTypeTagsProvider extends TagsProvider<EntityType<?>> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/data/tags/FluidTagsProvider.java
|
||||
+++ b/net/minecraft/data/tags/FluidTagsProvider.java
|
||||
@@ -9,8 +_,12 @@
|
||||
@@ -7,8 +_,12 @@
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
public class FluidTagsProvider extends TagsProvider<Fluid> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/data/tags/GameEventTagsProvider.java
|
||||
+++ b/net/minecraft/data/tags/GameEventTagsProvider.java
|
||||
@@ -8,8 +_,12 @@
|
||||
@@ -6,8 +_,12 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
|
||||
public class GameEventTagsProvider extends TagsProvider<GameEvent> {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
--- a/net/minecraft/data/tags/ItemTagsProvider.java
|
||||
+++ b/net/minecraft/data/tags/ItemTagsProvider.java
|
||||
@@ -15,8 +_,13 @@
|
||||
@@ -14,8 +_,13 @@
|
||||
public class ItemTagsProvider extends TagsProvider<Item> {
|
||||
private final Function<Tag.Named<Block>, Tag.Builder> f_126528_;
|
||||
private final Function<TagKey<Block>, Tag.Builder> f_126528_;
|
||||
|
||||
+ @Deprecated
|
||||
public ItemTagsProvider(DataGenerator p_126530_, BlockTagsProvider p_126531_) {
|
||||
super(p_126530_, Registry.f_122827_);
|
||||
+ this.f_126528_ = p_126531_::m_126562_;
|
||||
+ this.f_126528_ = p_126531_::m_206426_;
|
||||
+ }
|
||||
+ public ItemTagsProvider(DataGenerator p_126530_, BlockTagsProvider p_126531_, String modId, @javax.annotation.Nullable net.minecraftforge.common.data.ExistingFileHelper existingFileHelper) {
|
||||
+ super(p_126530_, Registry.f_122827_, modId, existingFileHelper);
|
||||
this.f_126528_ = p_126531_::m_126562_;
|
||||
this.f_126528_ = p_126531_::m_206426_;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/data/tags/TagsProvider.java
|
||||
+++ b/net/minecraft/data/tags/TagsProvider.java
|
||||
@@ -29,10 +_,29 @@
|
||||
@@ -32,10 +_,29 @@
|
||||
protected final DataGenerator f_126539_;
|
||||
protected final Registry<T> f_126540_;
|
||||
protected final Map<ResourceLocation, Tag.Builder> f_126543_ = Maps.newLinkedHashMap();
|
||||
@@ -30,11 +30,11 @@
|
||||
}
|
||||
|
||||
protected abstract void m_6577_();
|
||||
@@ -43,12 +_,13 @@
|
||||
@@ -46,12 +_,13 @@
|
||||
this.f_126543_.forEach((p_176835_, p_176836_) -> {
|
||||
List<Tag.BuilderEntry> list = p_176836_.m_13330_().filter((p_176832_) -> {
|
||||
return !p_176832_.m_13347_().m_142746_(this.f_126540_::m_7804_, this.f_126543_::containsKey);
|
||||
- }).collect(Collectors.toList());
|
||||
return !p_176832_.f_13338_().m_142746_(this.f_126540_::m_7804_, this.f_126543_::containsKey);
|
||||
- }).toList();
|
||||
+ }).filter(this::missing).collect(Collectors.toList()); // Forge: Add validation via existing resources
|
||||
if (!list.isEmpty()) {
|
||||
throw new IllegalArgumentException(String.format("Couldn't define tag %s as it is missing following references: %s", p_176835_, list.stream().map(Objects::toString).collect(Collectors.joining(","))));
|
||||
@@ -45,30 +45,35 @@
|
||||
|
||||
try {
|
||||
String s = f_126542_.toJson((JsonElement)jsonobject);
|
||||
@@ -85,20 +_,31 @@
|
||||
@@ -88,6 +_,18 @@
|
||||
});
|
||||
}
|
||||
|
||||
+ private boolean missing(Tag.BuilderEntry reference) {
|
||||
+ Tag.Entry entry = reference.m_13347_();
|
||||
+ Tag.Entry entry = reference.f_13338_();
|
||||
+ // We only care about non-optional tag entries, this is the only type that can reference a resource and needs validation
|
||||
+ // Optional tags should not be validated
|
||||
+
|
||||
+ //TODO-PATCHING:Figure out optional tag data.
|
||||
+ if (entry instanceof Tag.TagEntry) {
|
||||
+ return existingFileHelper == null || !existingFileHelper.exists(((Tag.TagEntry)entry).getId(), resourceType);
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
protected abstract Path m_6648_(ResourceLocation p_126561_);
|
||||
protected Path m_6648_(ResourceLocation p_126561_) {
|
||||
ResourceKey<? extends Registry<T>> resourcekey = this.f_126540_.m_123023_();
|
||||
return this.f_126539_.m_123916_().resolve("data/" + p_126561_.m_135827_() + "/" + TagManager.m_203918_(resourcekey) + "/" + p_126561_.m_135815_() + ".json");
|
||||
@@ -95,16 +_,17 @@
|
||||
|
||||
protected TagsProvider.TagAppender<T> m_126548_(Tag.Named<T> p_126549_) {
|
||||
Tag.Builder tag$builder = this.m_126562_(p_126549_);
|
||||
protected TagsProvider.TagAppender<T> m_206424_(TagKey<T> p_206425_) {
|
||||
Tag.Builder tag$builder = this.m_206426_(p_206425_);
|
||||
- return new TagsProvider.TagAppender<>(tag$builder, this.f_126540_, "vanilla");
|
||||
+ return new TagsProvider.TagAppender<>(tag$builder, this.f_126540_, modId);
|
||||
}
|
||||
|
||||
protected Tag.Builder m_126562_(Tag.Named<T> p_126563_) {
|
||||
return this.f_126543_.computeIfAbsent(p_126563_.m_6979_(), (p_176838_) -> {
|
||||
protected Tag.Builder m_206426_(TagKey<T> p_206427_) {
|
||||
return this.f_126543_.computeIfAbsent(p_206427_.f_203868_(), (p_176838_) -> {
|
||||
+ existingFileHelper.trackGenerated(p_176838_, resourceType);
|
||||
return new Tag.Builder();
|
||||
});
|
||||
@@ -79,25 +84,7 @@
|
||||
private final Tag.Builder f_126568_;
|
||||
public final Registry<T> f_126569_;
|
||||
private final String f_126570_;
|
||||
@@ -114,7 +_,7 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
- public TagsProvider.TagAppender<T> m_176839_(ResourceLocation p_176840_) {
|
||||
+ public TagsProvider.TagAppender<T> addOptional(ResourceLocation p_176840_) {
|
||||
this.f_126568_.m_144379_(p_176840_, this.f_126570_);
|
||||
return this;
|
||||
}
|
||||
@@ -124,7 +_,7 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
- public TagsProvider.TagAppender<T> m_176841_(ResourceLocation p_176842_) {
|
||||
+ public TagsProvider.TagAppender<T> addOptionalTag(ResourceLocation p_176842_) {
|
||||
this.f_126568_.m_144382_(p_176842_, this.f_126570_);
|
||||
return this;
|
||||
}
|
||||
@@ -135,6 +_,19 @@
|
||||
@@ -150,6 +_,19 @@
|
||||
this.f_126568_.m_13327_(p_126587_, this.f_126570_);
|
||||
});
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/gametest/framework/GameTest.java
|
||||
+++ b/net/minecraft/gametest/framework/GameTest.java
|
||||
@@ -16,6 +_,11 @@
|
||||
|
||||
boolean m_177045_() default true;
|
||||
|
||||
+ /**
|
||||
+ * The namespace of where to grab the structure from, generally a mod id.
|
||||
+ */
|
||||
+ String templateNamespace() default "";
|
||||
+
|
||||
String m_177046_() default "";
|
||||
|
||||
long m_177047_() default 0L;
|
||||
@@ -0,0 +1,72 @@
|
||||
--- a/net/minecraft/gametest/framework/GameTestRegistry.java
|
||||
+++ b/net/minecraft/gametest/framework/GameTestRegistry.java
|
||||
@@ -25,21 +_,33 @@
|
||||
private static final Map<String, Consumer<ServerLevel>> f_177498_ = Maps.newHashMap();
|
||||
private static final Collection<TestFunction> f_177499_ = Sets.newHashSet();
|
||||
|
||||
+ /** @deprecated Forge: Use {@link net.minecraftforge.event.RegisterGameTestsEvent RegisterGameTestsEvent} to register game tests */
|
||||
+ @Deprecated
|
||||
public static void m_177501_(Class<?> p_177502_) {
|
||||
Arrays.stream(p_177502_.getDeclaredMethods()).forEach(GameTestRegistry::m_177503_);
|
||||
}
|
||||
|
||||
+ /** @deprecated Forge: Use {@link net.minecraftforge.event.RegisterGameTestsEvent RegisterGameTestsEvent} to register game tests */
|
||||
+ @Deprecated
|
||||
public static void m_177503_(Method p_177504_) {
|
||||
+ register(p_177504_, java.util.Set.of());
|
||||
+ }
|
||||
+ /** @deprecated Forge: Use {@link net.minecraftforge.event.RegisterGameTestsEvent RegisterGameTestsEvent} to register game tests */
|
||||
+ @Deprecated
|
||||
+ public static void register(Method p_177504_, java.util.Set<String> allowedNamespaces) {
|
||||
String s = p_177504_.getDeclaringClass().getSimpleName();
|
||||
GameTest gametest = p_177504_.getAnnotation(GameTest.class);
|
||||
- if (gametest != null) {
|
||||
+ if (gametest != null && (allowedNamespaces.isEmpty() || allowedNamespaces.contains(net.minecraftforge.gametest.ForgeGameTestHooks.getTemplateNamespace(p_177504_)))) {
|
||||
f_177495_.add(m_177515_(p_177504_));
|
||||
f_177496_.add(s);
|
||||
}
|
||||
|
||||
GameTestGenerator gametestgenerator = p_177504_.getAnnotation(GameTestGenerator.class);
|
||||
if (gametestgenerator != null) {
|
||||
- f_177495_.addAll(m_177513_(p_177504_));
|
||||
+ Collection<TestFunction> testFunctions = new java.util.ArrayList<>(m_177513_(p_177504_));
|
||||
+ if (!allowedNamespaces.isEmpty())
|
||||
+ testFunctions.removeIf(t -> !allowedNamespaces.contains(new net.minecraft.resources.ResourceLocation(t.m_128078_()).m_135827_()));
|
||||
+ f_177495_.addAll(testFunctions);
|
||||
f_177496_.add(s);
|
||||
}
|
||||
|
||||
@@ -104,7 +_,9 @@
|
||||
|
||||
private static Collection<TestFunction> m_177513_(Method p_177514_) {
|
||||
try {
|
||||
- Object object = p_177514_.getDeclaringClass().newInstance();
|
||||
+ Object object = null;
|
||||
+ if (!java.lang.reflect.Modifier.isStatic(p_177514_.getModifiers()))
|
||||
+ object = p_177514_.getDeclaringClass().newInstance();
|
||||
return (Collection)p_177514_.invoke(object);
|
||||
} catch (ReflectiveOperationException reflectiveoperationexception) {
|
||||
throw new RuntimeException(reflectiveoperationexception);
|
||||
@@ -115,8 +_,9 @@
|
||||
GameTest gametest = p_177516_.getAnnotation(GameTest.class);
|
||||
String s = p_177516_.getDeclaringClass().getSimpleName();
|
||||
String s1 = s.toLowerCase();
|
||||
- String s2 = s1 + "." + p_177516_.getName().toLowerCase();
|
||||
- String s3 = gametest.m_177046_().isEmpty() ? s2 : s1 + "." + gametest.m_177046_();
|
||||
+ boolean prefixGameTestTemplate = net.minecraftforge.gametest.ForgeGameTestHooks.prefixGameTestTemplate(p_177516_);
|
||||
+ String s2 = (prefixGameTestTemplate ? s1 + "." : "") + p_177516_.getName().toLowerCase();
|
||||
+ String s3 = net.minecraftforge.gametest.ForgeGameTestHooks.getTemplateNamespace(p_177516_) + ":" + (gametest.m_177046_().isEmpty() ? s2 : (prefixGameTestTemplate ? s1 + "." : "") + gametest.m_177046_());
|
||||
String s4 = gametest.m_177043_();
|
||||
Rotation rotation = StructureUtils.m_127835_(gametest.m_177044_());
|
||||
return new TestFunction(s4, s2, s3, rotation, gametest.m_177042_(), gametest.m_177047_(), gametest.m_177045_(), gametest.m_177049_(), gametest.m_177048_(), (Consumer<net.minecraft.gametest.framework.GameTestHelper>)m_177519_(p_177516_));
|
||||
@@ -125,7 +_,9 @@
|
||||
private static Consumer<?> m_177519_(Method p_177520_) {
|
||||
return (p_177512_) -> {
|
||||
try {
|
||||
- Object object = p_177520_.getDeclaringClass().newInstance();
|
||||
+ Object object = null;
|
||||
+ if (!java.lang.reflect.Modifier.isStatic(p_177520_.getModifiers()))
|
||||
+ object = p_177520_.getDeclaringClass().newInstance();
|
||||
p_177520_.invoke(object, p_177512_);
|
||||
} catch (InvocationTargetException invocationtargetexception) {
|
||||
if (invocationtargetexception.getCause() instanceof RuntimeException) {
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/net/minecraft/gametest/framework/GameTestServer.java
|
||||
+++ b/net/minecraft/gametest/framework/GameTestServer.java
|
||||
@@ -93,12 +_,13 @@
|
||||
public boolean m_7038_() {
|
||||
this.m_129823_(new PlayerList(this, this.m_206579_(), this.f_129745_, 1) {
|
||||
});
|
||||
+ if (!net.minecraftforge.server.ServerLifecycleHooks.handleServerAboutToStart(this)) return false;
|
||||
this.m_130006_();
|
||||
ServerLevel serverlevel = this.m_129783_();
|
||||
serverlevel.m_8733_(this.f_177588_, 0.0F);
|
||||
int i = 20000000;
|
||||
serverlevel.m_8606_(20000000, 20000000, false, false);
|
||||
- return true;
|
||||
+ return net.minecraftforge.server.ServerLifecycleHooks.handleServerStarting(this);
|
||||
}
|
||||
|
||||
public void m_5705_(BooleanSupplier p_177619_) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/gametest/framework/StructureUtils.java
|
||||
+++ b/net/minecraft/gametest/framework/StructureUtils.java
|
||||
@@ -238,7 +_,7 @@
|
||||
if (optional.isPresent()) {
|
||||
return optional.get();
|
||||
} else {
|
||||
- String s = p_127881_ + ".snbt";
|
||||
+ String s = new ResourceLocation(p_127881_).m_135815_() + ".snbt";
|
||||
Path path = Paths.get(f_127833_, s);
|
||||
CompoundTag compoundtag = m_127902_(path);
|
||||
if (compoundtag == null) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/nbt/NbtIo.java
|
||||
+++ b/net/minecraft/nbt/NbtIo.java
|
||||
@@ -218,10 +_,12 @@
|
||||
@@ -268,10 +_,12 @@
|
||||
|
||||
private static Tag m_128930_(DataInput p_128931_, int p_128932_, NbtAccounter p_128933_) throws IOException {
|
||||
byte b0 = p_128931_.readByte();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -77,6 +_,7 @@
|
||||
@@ -87,6 +_,7 @@
|
||||
private float f_129477_;
|
||||
private int f_129478_;
|
||||
private boolean f_129479_;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public Connection(PacketFlow p_129482_) {
|
||||
this.f_129466_ = p_129482_;
|
||||
@@ -86,6 +_,7 @@
|
||||
@@ -96,6 +_,7 @@
|
||||
super.channelActive(p_129525_);
|
||||
this.f_129468_ = p_129525_.channel();
|
||||
this.f_129469_ = this.f_129468_.remoteAddress();
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
try {
|
||||
this.m_129498_(ConnectionProtocol.HANDSHAKING);
|
||||
@@ -179,7 +_,7 @@
|
||||
@@ -191,7 +_,7 @@
|
||||
++this.f_129475_;
|
||||
if (connectionprotocol1 != connectionprotocol) {
|
||||
f_129465_.debug("Disabled auto read");
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
if (this.f_129468_.eventLoop().inEventLoop()) {
|
||||
@@ -277,7 +_,9 @@
|
||||
@@ -289,7 +_,9 @@
|
||||
}
|
||||
|
||||
public static Connection m_178300_(InetSocketAddress p_178301_, boolean p_178302_) {
|
||||
@@ -35,7 +35,7 @@
|
||||
Class<? extends SocketChannel> oclass;
|
||||
LazyLoadedValue<? extends EventLoopGroup> lazyloadedvalue;
|
||||
if (Epoll.isAvailable() && p_178302_) {
|
||||
@@ -303,6 +_,7 @@
|
||||
@@ -315,6 +_,7 @@
|
||||
|
||||
public static Connection m_129493_(SocketAddress p_129494_) {
|
||||
final Connection connection = new Connection(PacketFlow.CLIENTBOUND);
|
||||
@@ -43,7 +43,7 @@
|
||||
(new Bootstrap()).group(f_129464_.m_13971_()).handler(new ChannelInitializer<Channel>() {
|
||||
protected void initChannel(Channel p_129557_) {
|
||||
p_129557_.pipeline().addLast("packet_handler", connection);
|
||||
@@ -389,6 +_,14 @@
|
||||
@@ -401,6 +_,14 @@
|
||||
|
||||
public float m_129543_() {
|
||||
return this.f_129477_;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/net/minecraft/network/PacketEncoder.java
|
||||
@@ -48,7 +_,7 @@
|
||||
JvmProfiler.f_185340_.m_183508_(k, integer, p_130545_.channel().remoteAddress(), j);
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
- f_130538_.error(throwable);
|
||||
+ f_130538_.error("Error encoding packet", throwable); // Forge: Get Minecraft to spit out more information about the Throwable we got.
|
||||
if (p_130546_.m_6588_()) {
|
||||
throw new SkipPacketException(throwable);
|
||||
} else {
|
||||
+25
-1
@@ -9,11 +9,35 @@
|
||||
private static final int f_178834_ = 1048576;
|
||||
public static final ResourceLocation f_132012_ = new ResourceLocation("brand");
|
||||
public static final ResourceLocation f_132013_ = new ResourceLocation("debug/path");
|
||||
@@ -26,6 +_,7 @@
|
||||
public static final ResourceLocation f_178833_ = new ResourceLocation("debug/game_event_listeners");
|
||||
private final ResourceLocation f_132029_;
|
||||
private final FriendlyByteBuf f_132030_;
|
||||
+ private final boolean shouldRelease;
|
||||
|
||||
public ClientboundCustomPayloadPacket(ResourceLocation p_132034_, FriendlyByteBuf p_132035_) {
|
||||
this.f_132029_ = p_132034_;
|
||||
@@ -33,6 +_,7 @@
|
||||
if (p_132035_.writerIndex() > 1048576) {
|
||||
throw new IllegalArgumentException("Payload may not be larger than 1048576 bytes");
|
||||
}
|
||||
+ this.shouldRelease = false; //We are not the owner of the buffer, don't release it, it might be reused.
|
||||
}
|
||||
|
||||
public ClientboundCustomPayloadPacket(FriendlyByteBuf p_178836_) {
|
||||
@@ -43,6 +_,7 @@
|
||||
} else {
|
||||
throw new IllegalArgumentException("Payload may not be larger than 1048576 bytes");
|
||||
}
|
||||
+ this.shouldRelease = true; //We are the owner of the buffer, release it when we are done.
|
||||
}
|
||||
|
||||
public void m_5779_(FriendlyByteBuf p_132044_) {
|
||||
@@ -52,6 +_,7 @@
|
||||
|
||||
public void m_5797_(ClientGamePacketListener p_132041_) {
|
||||
p_132041_.m_7413_(this);
|
||||
+ this.f_132030_.release(); // FORGE: Fix impl buffer leaks (MC-121884)
|
||||
+ if (this.shouldRelease) this.f_132030_.release(); // FORGE: Fix impl buffer leaks (MC-121884), can only be fixed partially, because else you get problems in LAN-Worlds
|
||||
}
|
||||
|
||||
public ResourceLocation m_132042_() {
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
+ if (jsonobject.has("forgeData")) {
|
||||
+ serverstatus.setForgeData(net.minecraftforge.network.ServerStatusPing.Serializer.deserialize(GsonHelper.m_13930_(jsonobject, "forgeData"), p_134949_));
|
||||
+ serverstatus.setForgeData(net.minecraftforge.network.ServerStatusPing.Serializer.deserialize(GsonHelper.m_13930_(jsonobject, "forgeData")));
|
||||
+ }
|
||||
+
|
||||
return serverstatus;
|
||||
@@ -104,7 +104,7 @@
|
||||
+ }
|
||||
+
|
||||
+ if(p_134951_.getForgeData() != null){
|
||||
+ jsonobject.add("forgeData", net.minecraftforge.network.ServerStatusPing.Serializer.serialize(p_134951_.getForgeData(), p_134953_));
|
||||
+ jsonobject.add("forgeData", net.minecraftforge.network.ServerStatusPing.Serializer.serialize(p_134951_.getForgeData()));
|
||||
}
|
||||
|
||||
return jsonobject;
|
||||
@@ -8,11 +8,12 @@
|
||||
optional = Optional.of(p_195896_.parse(p_195893_, jsonelement).map(RegistryResourceAccess.ParsedEntry::m_195956_));
|
||||
} catch (Throwable throwable2) {
|
||||
try {
|
||||
@@ -138,6 +_,7 @@
|
||||
@@ -138,6 +_,8 @@
|
||||
|
||||
public <E> Optional<DataResult<RegistryResourceAccess.ParsedEntry<E>>> m_183313_(DynamicOps<JsonElement> p_195917_, ResourceKey<? extends Registry<E>> p_195918_, ResourceKey<E> p_195919_, Decoder<E> p_195920_) {
|
||||
RegistryResourceAccess.InMemoryStorage.Entry registryresourceaccess$inmemorystorage$entry = this.f_195913_.get(p_195919_);
|
||||
+ if (registryresourceaccess$inmemorystorage$entry != null && registryresourceaccess$inmemorystorage$entry.f_195936_ != null) registryresourceaccess$inmemorystorage$entry.f_195936_.getAsJsonObject().addProperty("forge:registry_name", p_195919_.m_135782_().toString());
|
||||
+ if (registryresourceaccess$inmemorystorage$entry != null && registryresourceaccess$inmemorystorage$entry.f_195936_ != null && registryresourceaccess$inmemorystorage$entry.f_195936_.isJsonObject())
|
||||
+ registryresourceaccess$inmemorystorage$entry.f_195936_.getAsJsonObject().addProperty("forge:registry_name", p_195919_.m_135782_().toString());
|
||||
return registryresourceaccess$inmemorystorage$entry == null ? Optional.of(DataResult.error("Unknown element: " + p_195919_)) : Optional.of(p_195920_.parse(p_195917_, registryresourceaccess$inmemorystorage$entry.f_195936_).setLifecycle(registryresourceaccess$inmemorystorage$entry.f_195938_).map((p_195930_) -> {
|
||||
return RegistryResourceAccess.ParsedEntry.m_195958_(p_195930_, registryresourceaccess$inmemorystorage$entry.f_195937_);
|
||||
}));
|
||||
@@ -9,7 +9,7 @@
|
||||
private static final Map<String, ResourceKey<?>> f_135775_ = Collections.synchronizedMap(Maps.newIdentityHashMap());
|
||||
private final ResourceLocation f_135776_;
|
||||
private final ResourceLocation f_135777_;
|
||||
@@ -59,5 +_,23 @@
|
||||
@@ -63,5 +_,23 @@
|
||||
return (p_195974_) -> {
|
||||
return m_135785_(p_135798_, p_195974_);
|
||||
};
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/server/Bootstrap.java
|
||||
+++ b/net/minecraft/server/Bootstrap.java
|
||||
@@ -56,6 +_,8 @@
|
||||
@@ -55,6 +_,8 @@
|
||||
CauldronInteraction.m_175649_();
|
||||
ArgumentTypes.m_121586_();
|
||||
StaticTags.m_13282_();
|
||||
Registry.m_206101_();
|
||||
+ net.minecraftforge.registries.GameData.vanillaSnapshot();
|
||||
+ if (false) // skip redirectOutputToLog, Forge already redirects stdout and stderr output to log so that they print with more context
|
||||
m_135890_();
|
||||
}
|
||||
}
|
||||
@@ -129,7 +_,6 @@
|
||||
@@ -128,7 +_,6 @@
|
||||
m_197757_();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/Eula.java
|
||||
+++ b/net/minecraft/server/Eula.java
|
||||
@@ -16,7 +_,7 @@
|
||||
|
||||
public Eula(Path p_135943_) {
|
||||
this.f_135939_ = p_135943_;
|
||||
- this.f_135940_ = SharedConstants.f_136183_ || this.m_135945_();
|
||||
+ this.f_135940_ = SharedConstants.f_136183_ || net.minecraftforge.gametest.ForgeGameTestHooks.isGametestServer() || this.m_135945_(); // Forge: Automatically agree to EULA for gametest servers to aid CI
|
||||
}
|
||||
|
||||
private boolean m_135945_() {
|
||||
@@ -1,15 +1,22 @@
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -76,6 +_,8 @@
|
||||
@@ -77,6 +_,15 @@
|
||||
OptionSpec<String> optionspec12 = optionparser.accepts("serverId").withRequiredArg();
|
||||
OptionSpec<Void> optionspec13 = optionparser.accepts("jfrProfile");
|
||||
OptionSpec<String> optionspec14 = optionparser.nonOptions();
|
||||
+ optionparser.accepts("allowUpdates").withRequiredArg().ofType(Boolean.class).defaultsTo(Boolean.TRUE); // Forge: allow mod updates to proceed
|
||||
+ optionparser.accepts("gameDir").withRequiredArg().ofType(File.class).defaultsTo(new File(".")); //Forge: Consume this argument, we use it in the launcher, and the client side.
|
||||
+ final OptionSpec<net.minecraft.core.BlockPos> spawnPosOpt;
|
||||
+ boolean gametestEnabled = Boolean.getBoolean("forge.gameTestServer");
|
||||
+ if (gametestEnabled) {
|
||||
+ spawnPosOpt = optionparser.accepts("spawnPos").withRequiredArg().withValuesConvertedBy(new net.minecraftforge.gametest.BlockPosValueConverter()).defaultsTo(new net.minecraft.core.BlockPos(0, 60, 0));
|
||||
+ } else {
|
||||
+ spawnPosOpt = null;
|
||||
+ }
|
||||
|
||||
try {
|
||||
OptionSet optionset = optionparser.parse(p_129699_);
|
||||
@@ -83,6 +_,13 @@
|
||||
@@ -84,6 +_,13 @@
|
||||
optionparser.printHelpOn(System.err);
|
||||
return;
|
||||
}
|
||||
@@ -23,12 +30,12 @@
|
||||
|
||||
CrashReport.m_127529_();
|
||||
if (optionset.has(optionspec13)) {
|
||||
@@ -92,28 +_,26 @@
|
||||
@@ -93,29 +_,29 @@
|
||||
Bootstrap.m_135870_();
|
||||
Bootstrap.m_135889_();
|
||||
Util.m_137584_();
|
||||
+ if (!optionset.has(optionspec1)) net.minecraftforge.server.loading.ServerModLoader.load(); // Load mods before we load almost anything else anymore. Single spot now. Only loads if they haven't passed the initserver param
|
||||
RegistryAccess.RegistryHolder registryaccess$registryholder = RegistryAccess.m_123086_();
|
||||
+ //TODO-PATCHING: Figure out how to handle the delayed initialization.
|
||||
Path path = Paths.get("server.properties");
|
||||
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(path);
|
||||
dedicatedserversettings.m_139780_();
|
||||
@@ -56,21 +63,46 @@
|
||||
+ }
|
||||
LevelStorageSource levelstoragesource = LevelStorageSource.m_78242_(file1.toPath());
|
||||
LevelStorageSource.LevelStorageAccess levelstoragesource$levelstorageaccess = levelstoragesource.m_78260_(s);
|
||||
+ levelstoragesource$levelstorageaccess.readAdditionalLevelSaveData();
|
||||
LevelSummary levelsummary = levelstoragesource$levelstorageaccess.m_78308_();
|
||||
@@ -164,6 +_,8 @@
|
||||
worldgensettings = optionset.has(optionspec3) ? dedicatedserverproperties.m_180927_(registryaccess$registryholder).m_64671_() : dedicatedserverproperties.m_180927_(registryaccess$registryholder);
|
||||
}
|
||||
|
||||
+ // Forge: Deserialize the DimensionGeneratorSettings to ensure modded dims are loaded on first server load (see SimpleRegistryCodec#decode). Vanilla behaviour only loads from the server.properties and deserializes only after the 2nd server load.
|
||||
+ worldgensettings = WorldGenSettings.f_64600_.encodeStart(net.minecraft.resources.RegistryWriteOps.m_135767_(NbtOps.f_128958_, registryaccess$registryholder), worldgensettings).flatMap(nbt -> WorldGenSettings.f_64600_.parse(registryreadops, nbt)).getOrThrow(false, errorMsg->{});
|
||||
worlddata = new PrimaryLevelData(levelsettings, worldgensettings, Lifecycle.stable());
|
||||
if (levelsummary != null) {
|
||||
if (levelsummary.m_193020_()) {
|
||||
@@ -181,22 +_,34 @@
|
||||
}
|
||||
|
||||
@@ -191,6 +_,7 @@
|
||||
levelstoragesource$levelstorageaccess.m_78287_(registryaccess$frozen, worlddata);
|
||||
- final DedicatedServer dedicatedserver = MinecraftServer.m_129872_((p_206536_) -> {
|
||||
- DedicatedServer dedicatedserver1 = new DedicatedServer(p_206536_, levelstoragesource$levelstorageaccess, packrepository, worldstem, dedicatedserversettings, DataFixers.m_14512_(), minecraftsessionservice, gameprofilerepository, gameprofilecache, LoggerChunkProgressListener::new);
|
||||
+ final MinecraftServer dedicatedserver = MinecraftServer.m_129872_((p_129697_) -> {
|
||||
+ MinecraftServer dedicatedserver1;
|
||||
+ if (gametestEnabled) {
|
||||
+ net.minecraftforge.gametest.ForgeGameTestHooks.registerGametests();
|
||||
+ java.util.Collection<net.minecraft.gametest.framework.GameTestBatch> testBatches = net.minecraft.gametest.framework.GameTestRunner.m_127724_(net.minecraft.gametest.framework.GameTestRegistry.m_127658_());
|
||||
+ net.minecraft.core.BlockPos spawnPos = optionset.valueOf(spawnPosOpt);
|
||||
+ dedicatedserver1 = new net.minecraft.gametest.framework.GameTestServer(p_129697_, levelstoragesource$levelstorageaccess, packrepository, worldstem, testBatches, spawnPos);
|
||||
+ } else {
|
||||
+ dedicatedserver1 = new DedicatedServer(p_129697_, levelstoragesource$levelstorageaccess, packrepository, worldstem, dedicatedserversettings, DataFixers.m_14512_(), minecraftsessionservice, gameprofilerepository, gameprofilecache, LoggerChunkProgressListener::new);
|
||||
+ }
|
||||
dedicatedserver1.m_129981_(optionset.valueOf(optionspec8));
|
||||
dedicatedserver1.m_129801_(optionset.valueOf(optionspec11));
|
||||
dedicatedserver1.m_129975_(optionset.has(optionspec2));
|
||||
dedicatedserver1.m_129948_(optionset.valueOf(optionspec12));
|
||||
boolean flag1 = !optionset.has(optionspec) && !optionset.valuesOf(optionspec14).contains("nogui");
|
||||
- if (flag1 && !GraphicsEnvironment.isHeadless()) {
|
||||
- dedicatedserver1.m_139667_();
|
||||
+ if (dedicatedserver1 instanceof DedicatedServer dedicatedServer && flag1 && !GraphicsEnvironment.isHeadless()) {
|
||||
+ dedicatedServer.m_139667_();
|
||||
}
|
||||
|
||||
return dedicatedserver1;
|
||||
});
|
||||
Thread thread = new Thread("Server Shutdown Thread") {
|
||||
public void run() {
|
||||
+ // FORGE: Halting as GameTestServer will cause issues as it always calls System#exit on both crash and normal exit, so skip it
|
||||
+ if (!(dedicatedserver instanceof net.minecraft.gametest.framework.GameTestServer))
|
||||
dedicatedserver.m_7570_(true);
|
||||
+ LogManager.shutdown(); // we're manually managing the logging shutdown on the server. Make sure we do it here at the end.
|
||||
+ //TODO-PATCHING: Figure out what needs to be done here after the logging update.
|
||||
+ //LogManager.shutdown(); // we're manually managing the logging shutdown on the server. Make sure we do it here at the end.
|
||||
}
|
||||
};
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(f_129670_));
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -254,7 +_,7 @@
|
||||
@@ -257,7 +_,7 @@
|
||||
|
||||
public static <S extends MinecraftServer> S m_129872_(Function<Thread, S> p_129873_) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference<>();
|
||||
@@ -9,7 +9,7 @@
|
||||
atomicreference.get().m_130011_();
|
||||
}, "Server thread");
|
||||
thread.setUncaughtExceptionHandler((p_177909_, p_177910_) -> {
|
||||
@@ -355,6 +_,7 @@
|
||||
@@ -358,6 +_,7 @@
|
||||
this.m_129841_(dimensiondatastorage);
|
||||
this.f_129732_ = new CommandStorage(dimensiondatastorage);
|
||||
WorldBorder worldborder = serverlevel.m_6857_();
|
||||
@@ -17,15 +17,15 @@
|
||||
if (!serverleveldata.m_6535_()) {
|
||||
try {
|
||||
m_177896_(serverlevel, serverleveldata, worldgensettings.m_64660_(), flag);
|
||||
@@ -391,6 +_,7 @@
|
||||
ServerLevel serverlevel1 = new ServerLevel(this, this.f_129738_, this.f_129744_, derivedleveldata, resourcekey1, dimensiontype1, p_129816_, chunkgenerator1, flag, j, ImmutableList.of(), false);
|
||||
@@ -394,6 +_,7 @@
|
||||
ServerLevel serverlevel1 = new ServerLevel(this, this.f_129738_, this.f_129744_, derivedleveldata, resourcekey1, holder1, p_129816_, chunkgenerator1, flag, j, ImmutableList.of(), false);
|
||||
worldborder.m_61929_(new BorderChangeListener.DelegateBorderChangeListener(serverlevel1.m_6857_()));
|
||||
this.f_129762_.put(resourcekey1, serverlevel1);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(f_129762_.get(resourcekey)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,6 +_,7 @@
|
||||
@@ -405,6 +_,7 @@
|
||||
p_177898_.m_7250_(BlockPos.f_121853_.m_6630_(80), 0.0F);
|
||||
} else {
|
||||
ChunkGenerator chunkgenerator = p_177897_.m_7726_().m_8481_();
|
||||
@@ -33,15 +33,7 @@
|
||||
ChunkPos chunkpos = new ChunkPos(chunkgenerator.m_183403_().m_183230_());
|
||||
int i = chunkgenerator.m_142051_(p_177897_);
|
||||
if (i < p_177897_.m_141937_()) {
|
||||
@@ -455,6 +_,7 @@
|
||||
}
|
||||
|
||||
private void m_129940_(ChunkProgressListener p_129941_) {
|
||||
+ net.minecraftforge.common.world.StructureSpawnManager.gatherEntitySpawns();
|
||||
ServerLevel serverlevel = this.m_129783_();
|
||||
f_129750_.info("Preparing start region for dimension {}", (Object)serverlevel.m_46472_().m_135782_());
|
||||
BlockPos blockpos = serverlevel.m_8900_();
|
||||
@@ -482,6 +_,7 @@
|
||||
@@ -485,6 +_,7 @@
|
||||
ChunkPos chunkpos = new ChunkPos(i);
|
||||
serverlevel1.m_7726_().m_6692_(chunkpos, true);
|
||||
}
|
||||
@@ -49,15 +41,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,6 +_,7 @@
|
||||
for(ServerLevel serverlevel1 : this.m_129785_()) {
|
||||
if (serverlevel1 != null) {
|
||||
@@ -609,6 +_,7 @@
|
||||
for(ServerLevel serverlevel2 : this.m_129785_()) {
|
||||
if (serverlevel2 != null) {
|
||||
try {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(serverlevel1));
|
||||
serverlevel1.close();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(serverlevel2));
|
||||
serverlevel2.close();
|
||||
} catch (IOException ioexception1) {
|
||||
f_129750_.error("Exception closing the level", (Throwable)ioexception1);
|
||||
@@ -636,6 +_,7 @@
|
||||
@@ -654,6 +_,7 @@
|
||||
protected void m_130011_() {
|
||||
try {
|
||||
if (this.m_7038_()) {
|
||||
@@ -65,7 +57,7 @@
|
||||
this.f_129726_ = Util.m_137550_();
|
||||
this.f_129757_.m_134908_(new TextComponent(this.f_129709_));
|
||||
this.f_129757_.m_134912_(new ServerStatus.Version(SharedConstants.m_183709_().getName(), SharedConstants.m_183709_().getProtocolVersion()));
|
||||
@@ -668,7 +_,10 @@
|
||||
@@ -686,7 +_,10 @@
|
||||
this.f_129717_ = true;
|
||||
JvmProfiler.f_185340_.m_183597_(this.f_129737_);
|
||||
}
|
||||
@@ -76,7 +68,7 @@
|
||||
this.m_7268_((CrashReport)null);
|
||||
}
|
||||
} catch (Throwable throwable1) {
|
||||
@@ -688,6 +_,7 @@
|
||||
@@ -700,6 +_,7 @@
|
||||
f_129750_.error("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
@@ -84,7 +76,7 @@
|
||||
this.m_7268_(crashreport);
|
||||
} finally {
|
||||
try {
|
||||
@@ -700,6 +_,7 @@
|
||||
@@ -712,6 +_,7 @@
|
||||
this.f_129723_.m_196559_();
|
||||
}
|
||||
|
||||
@@ -92,7 +84,7 @@
|
||||
this.m_6988_();
|
||||
}
|
||||
|
||||
@@ -791,6 +_,7 @@
|
||||
@@ -826,6 +_,7 @@
|
||||
|
||||
public void m_5705_(BooleanSupplier p_129871_) {
|
||||
long i = Util.m_137569_();
|
||||
@@ -100,7 +92,7 @@
|
||||
++this.f_129766_;
|
||||
this.m_5703_(p_129871_);
|
||||
if (i - this.f_129724_ >= 5000000000L) {
|
||||
@@ -812,6 +_,7 @@
|
||||
@@ -847,6 +_,7 @@
|
||||
Collections.shuffle(Arrays.asList(agameprofile));
|
||||
this.f_129757_.m_134914_().m_134924_(agameprofile);
|
||||
}
|
||||
@@ -108,7 +100,7 @@
|
||||
}
|
||||
|
||||
if (this.f_129766_ % 6000 == 0) {
|
||||
@@ -828,6 +_,7 @@
|
||||
@@ -863,6 +_,7 @@
|
||||
long i1 = Util.m_137569_();
|
||||
this.f_129735_.m_13755_(i1 - i);
|
||||
this.f_129754_.m_7238_();
|
||||
@@ -116,7 +108,7 @@
|
||||
}
|
||||
|
||||
public void m_5703_(BooleanSupplier p_129954_) {
|
||||
@@ -835,7 +_,8 @@
|
||||
@@ -870,7 +_,8 @@
|
||||
this.m_129890_().m_136128_();
|
||||
this.f_129754_.m_6182_("levels");
|
||||
|
||||
@@ -126,7 +118,7 @@
|
||||
this.f_129754_.m_6521_(() -> {
|
||||
return serverlevel + " " + serverlevel.m_46472_().m_135782_();
|
||||
});
|
||||
@@ -846,6 +_,7 @@
|
||||
@@ -881,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_129754_.m_6180_("tick");
|
||||
@@ -134,7 +126,7 @@
|
||||
|
||||
try {
|
||||
serverlevel.m_8793_(p_129954_);
|
||||
@@ -854,9 +_,11 @@
|
||||
@@ -889,16 +_,18 @@
|
||||
serverlevel.m_6026_(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
@@ -146,7 +138,15 @@
|
||||
}
|
||||
|
||||
this.f_129754_.m_6182_("connection");
|
||||
@@ -931,7 +_,7 @@
|
||||
this.m_129919_().m_9721_();
|
||||
this.f_129754_.m_6182_("players");
|
||||
this.f_129763_.m_11288_();
|
||||
- if (SharedConstants.f_136183_) {
|
||||
+ if (net.minecraftforge.gametest.ForgeGameTestHooks.isGametestEnabled()) {
|
||||
GameTestTicker.f_177648_.m_127790_();
|
||||
}
|
||||
|
||||
@@ -966,7 +_,7 @@
|
||||
|
||||
@DontObfuscate
|
||||
public String m_130001_() {
|
||||
@@ -155,23 +155,23 @@
|
||||
}
|
||||
|
||||
public SystemReport m_177935_(SystemReport p_177936_) {
|
||||
@@ -947,6 +_,7 @@
|
||||
@@ -982,6 +_,7 @@
|
||||
p_177936_.m_143522_("Data Packs", () -> {
|
||||
StringBuilder stringbuilder = new StringBuilder();
|
||||
|
||||
+ LogManager.shutdown(); // we're manually managing the logging shutdown on the server. Make sure we do it here at the end.
|
||||
+ //TODO-PATCHING:Figure out how to stop the logger here.
|
||||
for(Pack pack : this.f_129730_.m_10524_()) {
|
||||
if (stringbuilder.length() > 0) {
|
||||
stringbuilder.append(", ");
|
||||
@@ -1261,6 +_,7 @@
|
||||
@@ -1316,6 +_,7 @@
|
||||
this.m_6846_().m_11315_();
|
||||
this.f_129734_.m_136120_(this.f_129740_.m_136157_());
|
||||
this.f_129741_.m_74335_(this.f_129740_.m_136178_());
|
||||
this.f_129734_.m_136120_(this.f_129740_.f_206585_.m_206860_());
|
||||
this.f_129741_.m_74335_(this.f_129740_.f_206584_);
|
||||
+ this.m_6846_().m_11314_().forEach(this.m_6846_()::m_11289_); //Forge: Fix newly added/modified commands not being sent to the client when commands reload.
|
||||
}, this);
|
||||
if (this.m_18695_()) {
|
||||
this.m_18701_(completablefuture::isDone);
|
||||
@@ -1270,10 +_,13 @@
|
||||
@@ -1325,10 +_,13 @@
|
||||
}
|
||||
|
||||
public static DataPackConfig m_129819_(PackRepository p_129820_, DataPackConfig p_129821_, boolean p_129822_) {
|
||||
@@ -187,7 +187,7 @@
|
||||
} else {
|
||||
Set<String> set = Sets.newLinkedHashSet();
|
||||
|
||||
@@ -1428,6 +_,31 @@
|
||||
@@ -1479,6 +_,31 @@
|
||||
|
||||
public abstract boolean m_7779_(GameProfile p_129840_);
|
||||
|
||||
@@ -219,14 +219,14 @@
|
||||
public void m_142116_(Path p_177911_) throws IOException {
|
||||
}
|
||||
|
||||
@@ -1681,6 +_,10 @@
|
||||
@@ -1732,6 +_,10 @@
|
||||
|
||||
public WorldData m_129910_() {
|
||||
return this.f_129749_;
|
||||
+ }
|
||||
+
|
||||
+ public ServerResources getServerResources() {
|
||||
+ public MinecraftServer.ReloadableResources getServerResources() {
|
||||
+ return f_129740_;
|
||||
}
|
||||
|
||||
public RegistryAccess m_129911_() {
|
||||
public RegistryAccess.Frozen m_206579_() {
|
||||
@@ -0,0 +1,21 @@
|
||||
--- a/net/minecraft/server/ReloadableServerResources.java
|
||||
+++ b/net/minecraft/server/ReloadableServerResources.java
|
||||
@@ -76,7 +_,9 @@
|
||||
|
||||
public static CompletableFuture<ReloadableServerResources> m_206861_(ResourceManager p_206862_, RegistryAccess.Frozen p_206863_, Commands.CommandSelection p_206864_, int p_206865_, Executor p_206866_, Executor p_206867_) {
|
||||
ReloadableServerResources reloadableserverresources = new ReloadableServerResources(p_206863_, p_206864_, p_206865_);
|
||||
- return SimpleReloadInstance.m_203834_(p_206862_, reloadableserverresources.m_206890_(), p_206866_, p_206867_, f_206846_, f_206845_.isDebugEnabled()).m_7237_().thenApply((p_206880_) -> {
|
||||
+ List<PreparableReloadListener> listeners = new java.util.ArrayList<>(reloadableserverresources.m_206890_());
|
||||
+ listeners.addAll(net.minecraftforge.event.ForgeEventFactory.onResourceReload());
|
||||
+ return SimpleReloadInstance.m_203834_(p_206862_, listeners, p_206866_, p_206867_, f_206846_, f_206845_.isDebugEnabled()).m_7237_().thenApply((p_206880_) -> {
|
||||
return reloadableserverresources;
|
||||
});
|
||||
}
|
||||
@@ -86,6 +_,7 @@
|
||||
m_206870_(p_206869_, p_206884_);
|
||||
});
|
||||
Blocks.m_50758_();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(p_206869_));
|
||||
}
|
||||
|
||||
private static <T> void m_206870_(RegistryAccess p_206871_, TagManager.LoadResult<T> p_206872_) {
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/server/ServerResources.java
|
||||
+++ b/net/minecraft/server/ServerResources.java
|
||||
@@ -41,6 +_,7 @@
|
||||
this.f_136145_.m_7217_(this.f_180000_);
|
||||
this.f_136145_.m_7217_(this.f_136152_);
|
||||
this.f_136145_.m_7217_(this.f_136151_);
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onResourceReload(this).forEach(f_136145_::m_7217_);
|
||||
}
|
||||
|
||||
public ServerFunctionLibrary m_136157_() {
|
||||
@@ -1,21 +0,0 @@
|
||||
--- a/net/minecraft/server/commands/LocateCommand.java
|
||||
+++ b/net/minecraft/server/commands/LocateCommand.java
|
||||
@@ -25,11 +_,18 @@
|
||||
return p_137861_.m_6761_(2);
|
||||
});
|
||||
|
||||
+ if (false)
|
||||
for(Entry<String, StructureFeature<?>> entry : StructureFeature.f_67012_.entrySet()) {
|
||||
literalargumentbuilder = literalargumentbuilder.then(Commands.m_82127_(entry.getKey()).executes((p_137876_) -> {
|
||||
return m_137862_(p_137876_.getSource(), entry.getValue());
|
||||
}));
|
||||
}
|
||||
+ else {
|
||||
+ for (StructureFeature<?> structurefeatureFeature : net.minecraftforge.registries.ForgeRegistries.STRUCTURE_FEATURES) {
|
||||
+ String name = structurefeatureFeature.getRegistryName().toString().replace("minecraft:", "");
|
||||
+ literalargumentbuilder = literalargumentbuilder.then(Commands.m_82127_(name)
|
||||
+ .executes(ctx -> m_137862_(ctx.getSource(), structurefeatureFeature)));
|
||||
+ }}
|
||||
|
||||
p_137859_.register(literalargumentbuilder);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
+++ b/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
@@ -163,7 +_,8 @@
|
||||
@@ -173,7 +_,8 @@
|
||||
spreadplayerscommand$position = p_138732_[i++];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -91,6 +_,7 @@
|
||||
@@ -89,6 +_,7 @@
|
||||
public boolean m_7038_() throws IOException {
|
||||
Thread thread = new Thread("Server console handler") {
|
||||
public void run() {
|
||||
@@ -8,7 +8,7 @@
|
||||
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));
|
||||
|
||||
String s1;
|
||||
@@ -169,11 +_,13 @@
|
||||
@@ -167,11 +_,13 @@
|
||||
long i = Util.m_137569_();
|
||||
SkullBlockEntity.m_196700_(this.m_129927_(), this.m_129925_(), this);
|
||||
GameProfileCache.m_11004_(this.m_129797_());
|
||||
@@ -22,7 +22,7 @@
|
||||
if (dedicatedserverproperties.f_139744_ != null) {
|
||||
this.m_129900_().m_46170_(GameRules.f_46153_).m_46246_(dedicatedserverproperties.f_139744_, this);
|
||||
}
|
||||
@@ -197,12 +_,13 @@
|
||||
@@ -195,12 +_,13 @@
|
||||
}
|
||||
|
||||
Items.f_41852_.m_6787_(CreativeModeTab.f_40754_, NonNullList.m_122779_());
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,6 +_,11 @@
|
||||
@@ -543,6 +_,11 @@
|
||||
|
||||
public boolean m_7779_(GameProfile p_139642_) {
|
||||
return false;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
ThreadInfo[] athreadinfo = threadmxbean.dumpAllThreads(true, true);
|
||||
StringBuilder stringbuilder = new StringBuilder();
|
||||
- Error error = new Error("Watchdog");
|
||||
+ Error error = new Error(String.format("ServerHangWatchdog detected that a single server tick took %.2f seconds (should be max 0.05)", k / 1000F)); // Forge: don't just make a crash report with a seemingly-inexplicable Error
|
||||
+ Error error = new Error(String.format(java.util.Locale.ENGLISH, "ServerHangWatchdog detected that a single server tick took %.2f seconds (should be max 0.05)", k / 1000F)); // Forge: don't just make a crash report with a seemingly-inexplicable Error
|
||||
|
||||
for(ThreadInfo threadinfo : athreadinfo) {
|
||||
if (threadinfo.getThreadId() == this.f_139782_.m_6304_().getId()) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -64,6 +_,7 @@
|
||||
@@ -67,6 +_,7 @@
|
||||
private final ChunkHolder.PlayerProvider f_140016_;
|
||||
private boolean f_140017_;
|
||||
private boolean f_140018_;
|
||||
|
||||
Loaded 100 of 1051 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user