mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3edefbe33e |
No files matched your search
@@ -23,7 +23,6 @@
|
||||
/projects/mcp/
|
||||
/projects/clean/
|
||||
/projects/forge/
|
||||
/projects/fmlonly/
|
||||
#/patches/*
|
||||
|
||||
#occupational hazards
|
||||
|
||||
Vendored
-125
@@ -1,125 +0,0 @@
|
||||
@Library('forge-shared-library')_
|
||||
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'gradle:7-jdk16'
|
||||
//args '-v forgegc:/home/gradle/.gradle_cache/'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
GRADLE_ARGS = '--no-daemon --console=plain' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
||||
DISCORD_WEBHOOK = credentials('forge-discord-jenkins-webhook')
|
||||
DISCORD_PREFIX = "Job: Forge Branch: ${BRANCH_NAME} Build: #${BUILD_NUMBER}"
|
||||
JENKINS_HEAD = 'https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('notify_start') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Started",
|
||||
successful: true,
|
||||
result: 'ABORTED', //White border
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
/*
|
||||
stage('pull_cache') {
|
||||
steps {
|
||||
sh 'cp -r /home/gradle/.gradle_cache/jdks/ /home/gradle/.gradle/jdks/'
|
||||
sh 'cp -r /home/gradle/.gradle_cache/wrapper/ /home/gradle/.gradle/wrapper/'
|
||||
sh 'cp -r /home/gradle/.gradle_cache/caches/ /home/gradle/.gradle/caches/'
|
||||
}
|
||||
}
|
||||
*/
|
||||
stage('setup') {
|
||||
steps {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
}
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "^version:" | cut -d" " -f2').trim()
|
||||
env.FMLONLY_VERSION = sh(returnStdout: true, script: './gradlew :fmlonly:properties -q | grep "^version:" | cut -d" " -f2').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('changelog') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, 'build/changelog.txt')
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
environment {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
KEYSTORE = credentials('forge-jenkins-keystore-old')
|
||||
KEYSTORE_KEYPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
steps {
|
||||
withCredentials([usernamePassword(credentialsId: 'maven-forge-user', usernameVariable: 'MAVEN_USER', passwordVariable: 'MAVEN_PASSWORD')]) {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} publish -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
build job: 'filegenerator', parameters: [string(name: 'COMMAND', value: "promote net.minecraftforge:forge ${env.MYVERSION} latest")], propagate: false, wait: false
|
||||
build job: 'filegenerator', parameters: [string(name: 'COMMAND', value: "promote net.minecraftforge:fmlonly ${env.FMLONLY_VERSION} latest")], propagate: false, wait: false
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('test_publish_pr') { //Publish to local repo to test full process, but don't include credentials so it can't sign/publish to maven
|
||||
when {
|
||||
changeRequest()
|
||||
}
|
||||
environment {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
}
|
||||
steps {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} publish -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true, onlyIfSuccessful: true, allowEmptyArchive: true
|
||||
|
||||
if (env.CHANGE_ID == null) { // This is unset for non-PRs
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Finished ${currentBuild.currentResult}",
|
||||
description: '```\n' + getChanges(currentBuild) + '\n```',
|
||||
successful: currentBuild.resultIsBetterOrEqualTo("SUCCESS"),
|
||||
result: currentBuild.currentResult,
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
-345
@@ -43,10 +43,10 @@ ext {
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'official'
|
||||
MAPPING_VERSION = '1.20.1'
|
||||
MC_VERSION = '1.20.1'
|
||||
MC_VERSION = '1.20.2-pre1'
|
||||
MAPPING_VERSION = MC_VERSION
|
||||
MC_NEXT_VERSION = '1.21'
|
||||
MCP_VERSION = '20230612.114412'
|
||||
MCP_VERSION = '20230906.154413'
|
||||
SNAPSHOT = false
|
||||
|
||||
SPI_VERSION = '7.0.1'
|
||||
@@ -72,11 +72,11 @@ ext {
|
||||
// To use a version newer than the version manifest JSON, the dependency must be added to the installer configuration
|
||||
MOJANG_LOGGING_VERSION = '1.1.1'
|
||||
LOG4J_VERSION = '2.19.0'
|
||||
GUAVA_VERSION = '31.1-jre'
|
||||
GSON_VERSION = '2.10'
|
||||
GUAVA_VERSION = '32.1.2-jre'
|
||||
GSON_VERSION = '2.10.1'
|
||||
APACHE_COMMONS_LANG3_VERSION = '3.12.0'
|
||||
JOPT_SIMPLE_VERSION = '5.0.4'
|
||||
COMMONS_IO_VERSION = '2.11.0'
|
||||
COMMONS_IO_VERSION = '2.13.0'
|
||||
|
||||
GIT_INFO = gradleutils.gitInfo
|
||||
VERSION = gradleutils.getFilteredMCTagOffsetBranchVersion(true, '[0-9]', MC_VERSION)
|
||||
@@ -86,7 +86,7 @@ ext {
|
||||
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.1.1:fatjar'
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.3.0'
|
||||
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.4'
|
||||
FART = 'net.minecraftforge:ForgeAutoRenamingTool:0.1.22:all'
|
||||
FART = 'net.minecraftforge:ForgeAutoRenamingTool:1.0.5:all'
|
||||
MIN_TAG_FOR_CHANGELOG = '41.0'
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ def sharedFmlonlyForge = { Project prj ->
|
||||
run.property 'org.lwjgl.system.SharedLibraryExtractDirectory', 'lwjgl_dll'
|
||||
run.args '--username', 'Dev'
|
||||
run.args '--version', prj.name
|
||||
run.args '--uuid', '0'
|
||||
//run.args '--uuid', '0'
|
||||
run.args '--accessToken', '0'
|
||||
run.args '--userType', 'mojang'
|
||||
run.args '--versionType', 'release'
|
||||
@@ -562,329 +562,6 @@ def sharedFmlonlyForge = { Project prj ->
|
||||
}
|
||||
}
|
||||
|
||||
def symlink = file("$rootDir/fmlonly/src/fmlcommon")
|
||||
def symlinkValid = symlink.exists() && symlink.directory
|
||||
|
||||
if (symlinkValid)
|
||||
project(':fmlonly') {
|
||||
evaluationDependsOn(':mcp')
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'net.minecraftforge.gradle.patcher'
|
||||
|
||||
ext {
|
||||
MCP_ARTIFACT = project(':mcp').mcp.config.get()
|
||||
PACKED_DEPS = [':fmlcore:jar', ':fmlloader:jar', ':fmlearlydisplay:jar', ':javafmllanguage:jar', ':lowcodelanguage:jar', ':mclanguage:jar']
|
||||
MAVEN_PATH = "${group.replace('.', '/')}/${project.name}/${VERSION}"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs = ["$rootDir/fmlonly/src/fmlcommon/java", "$rootDir/fmlonly/src/main/java"]
|
||||
}
|
||||
resources {
|
||||
srcDirs = ["$rootDir/fmlonly/src/fmlcommon/resources", "$rootDir/fmlonly/src/main/resources"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
moduleonly
|
||||
installer {
|
||||
// Don't pull all libraries, if we're missing something, add it to the installer list so the installer knows to download it.
|
||||
transitive = false
|
||||
}
|
||||
api.extendsFrom(installer)
|
||||
}
|
||||
|
||||
// TODO: Better coordination between project dependencies and the installer.
|
||||
dependencies {
|
||||
implementation project(':fmlcore')
|
||||
implementation project(':fmlloader')
|
||||
implementation project(':fmlearlydisplay')
|
||||
implementation project(':javafmllanguage')
|
||||
implementation project(':lowcodelanguage')
|
||||
implementation project(':mclanguage')
|
||||
runtimeOnly "cpw.mods:bootstraplauncher:${BOOTSTRAPLAUNCHER_VERSION}"
|
||||
}
|
||||
dependencies sharedDeps
|
||||
|
||||
patcher {
|
||||
parent = project(':mcp')
|
||||
mcVersion = MC_VERSION
|
||||
patchedSrc = file('src/main/java')
|
||||
|
||||
mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION
|
||||
runs {
|
||||
fmlonly_client {
|
||||
args '--launchTarget', 'fmlclientdev'
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
|
||||
mods {
|
||||
minecraft { source sourceSets.main }
|
||||
}
|
||||
}
|
||||
fmlonly_server {
|
||||
args '--launchTarget', 'fmlserverdev'
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
|
||||
mods {
|
||||
minecraft { source sourceSets.main }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sharedFmlonlyForge.call(project)
|
||||
|
||||
task launcherJson(type: LauncherJson) {
|
||||
packedDependencies = [':fmlloader:jar',':fmlearlydisplay:jar']
|
||||
doFirst {
|
||||
def fmlonly_client = project(':fmlonly').patcher.runs.fmlonly_client
|
||||
json = [
|
||||
_comment_: comment,
|
||||
id: id,
|
||||
time: timestamp,
|
||||
releaseTime: timestamp,
|
||||
type: 'release',
|
||||
mainClass: 'cpw.mods.bootstraplauncher.BootstrapLauncher',
|
||||
inheritsFrom: MC_VERSION,
|
||||
logging: {},
|
||||
arguments: [
|
||||
game: ['--launchTarget', 'fmlclient',
|
||||
'--fml.forgeVersion', FORGE_VERSION,
|
||||
'--fml.mcVersion', MC_VERSION,
|
||||
'--fml.forgeGroup', project.group,
|
||||
'--fml.mcpVersion', MCP_VERSION],
|
||||
jvm: ["-DignoreList=${fmlonly_client.properties.ignoreList},\${version_name}.jar",
|
||||
"-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',
|
||||
// Additions to these JVM module args should be mirrored to server_files/args.txt and other similar blocks in the buildscript
|
||||
'--add-opens', 'java.base/java.util.jar=cpw.mods.securejarhandler',
|
||||
'--add-opens', 'java.base/java.lang.invoke=cpw.mods.securejarhandler',
|
||||
'--add-exports', 'java.base/sun.security.util=cpw.mods.securejarhandler',
|
||||
'--add-exports', 'jdk.naming.dns/com.sun.jndi.dns=java.naming'
|
||||
]
|
||||
],
|
||||
libraries: []
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
task installerJson(type: InstallerJson, dependsOn: 'signUniversalJar') {
|
||||
icon = rootProject.file('icon.ico')
|
||||
packedDependencies = PACKED_DEPS
|
||||
|
||||
doFirst {
|
||||
def libs = libraries
|
||||
json = [
|
||||
_comment_: launcherJson.comment,
|
||||
spec: 1,
|
||||
profile: project.name,
|
||||
version: launcherJson.id,
|
||||
path: null,
|
||||
minecraft: MC_VERSION,
|
||||
serverJarPath: '{LIBRARY_DIR}/net/minecraft/server/{MINECRAFT_VERSION}/server-{MINECRAFT_VERSION}.jar',
|
||||
welcome: "Welcome to the simple FML installer.",
|
||||
data: [
|
||||
MAPPINGS: [
|
||||
client: "[${MCP_ARTIFACT.group}:${MCP_ARTIFACT.name}:${MCP_ARTIFACT.version}:mappings@txt]",
|
||||
server: "[${MCP_ARTIFACT.group}:${MCP_ARTIFACT.name}:${MCP_ARTIFACT.version}:mappings@txt]"
|
||||
],
|
||||
MOJMAPS: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:mappings@txt]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:mappings@txt]"
|
||||
],
|
||||
MERGED_MAPPINGS: [
|
||||
client: "[${MCP_ARTIFACT.group}:${MCP_ARTIFACT.name}:${MCP_ARTIFACT.version}:mappings-merged@txt]",
|
||||
server: "[${MCP_ARTIFACT.group}:${MCP_ARTIFACT.name}:${MCP_ARTIFACT.version}:mappings-merged@txt]"
|
||||
],
|
||||
MC_UNPACKED: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:unpacked]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:unpacked]"
|
||||
],
|
||||
MC_SLIM: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:slim]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:slim]"
|
||||
],
|
||||
MC_SLIM_SHA: [
|
||||
client: "'${downloadClientSlim.output.get().asFile.sha1()}'",
|
||||
server: "'${downloadServerSlim.output.get().asFile.sha1()}'"
|
||||
],
|
||||
MC_EXTRA: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:extra]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:extra]"
|
||||
],
|
||||
MC_EXTRA_SHA: [
|
||||
client: "'${downloadClientExtra.output.get().asFile.sha1()}'",
|
||||
server: "'${downloadServerExtra.output.get().asFile.sha1()}'"
|
||||
],
|
||||
MC_SRG: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:srg]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:srg]"
|
||||
],
|
||||
/*MC_SRG_SHA: [
|
||||
client: "'${createClientSRG.output.sha1()}'",
|
||||
server: "'${createServerSRG.output.sha1()}'"
|
||||
],*/
|
||||
MCP_VERSION: [
|
||||
client: "'${MCP_VERSION}'",
|
||||
server: "'${MCP_VERSION}'"
|
||||
]
|
||||
],
|
||||
processors: [
|
||||
[
|
||||
sides: ['server'],
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'EXTRACT_FILES',
|
||||
'--archive', '{INSTALLER}',
|
||||
|
||||
'--from', 'data/run.sh',
|
||||
'--to', '{ROOT}/run.sh',
|
||||
'--exec', '{ROOT}/run.sh',
|
||||
//'--from', "data/run_fml_${VERSION.replace('-', '_').sh",
|
||||
//'--to', '{ROOT}/run_fml_${VERSION.replace('-', '_').sh',
|
||||
//'--exec', '{ROOT}/run_fml_${VERSION.replace('-', '_').sh',
|
||||
|
||||
'--from', 'data/run.bat',
|
||||
'--to', '{ROOT}/run.bat',
|
||||
//'--from', 'data/run_fml_${VERSION.replace('-', '_').bat',
|
||||
//'--to', '{ROOT}/run_fml_${VERSION.replace('-', '_').bat',
|
||||
|
||||
'--from', 'data/user_jvm_args.txt',
|
||||
'--to', '{ROOT}/user_jvm_args.txt',
|
||||
'--optional', '{ROOT}/user_jvm_args.txt',
|
||||
|
||||
'--from', 'data/win_args.txt',
|
||||
'--to', "{ROOT}/libraries/${MAVEN_PATH}/win_args.txt",
|
||||
|
||||
'--from', 'data/unix_args.txt',
|
||||
'--to', "{ROOT}/libraries/${MAVEN_PATH}/unix_args.txt"
|
||||
]
|
||||
], [
|
||||
sides: ['server'],
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'BUNDLER_EXTRACT',
|
||||
'--input', '{MINECRAFT_JAR}',
|
||||
'--output', '{ROOT}/libraries/',
|
||||
'--libraries'
|
||||
]
|
||||
], [
|
||||
sides: ['server'],
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'BUNDLER_EXTRACT',
|
||||
'--input', '{MINECRAFT_JAR}',
|
||||
'--output', '{MC_UNPACKED}',
|
||||
'--jar-only'
|
||||
]
|
||||
], [
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'MCP_DATA',
|
||||
'--input', "[${MCP_ARTIFACT.descriptor}]",
|
||||
'--output', '{MAPPINGS}',
|
||||
'--key', 'mappings'
|
||||
]
|
||||
], [
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'DOWNLOAD_MOJMAPS',
|
||||
'--version', MC_VERSION,
|
||||
'--side', '{SIDE}',
|
||||
'--output', '{MOJMAPS}'
|
||||
]
|
||||
], [
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'MERGE_MAPPING',
|
||||
'--left', '{MAPPINGS}',
|
||||
'--right', '{MOJMAPS}',
|
||||
'--output', '{MERGED_MAPPINGS}',
|
||||
'--classes', '--reverse-right'
|
||||
]
|
||||
], [
|
||||
sides: ['client'],
|
||||
jar: JAR_SPLITTER,
|
||||
classpath: getClasspath(project, libs, JAR_SPLITTER),
|
||||
args: [
|
||||
'--input', '{MINECRAFT_JAR}',
|
||||
'--slim', '{MC_SLIM}',
|
||||
'--extra', '{MC_EXTRA}',
|
||||
'--srg', '{MERGED_MAPPINGS}'
|
||||
],
|
||||
outputs: [
|
||||
'{MC_SLIM}': '{MC_SLIM_SHA}',
|
||||
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
|
||||
]
|
||||
], [
|
||||
sides: ['server'],
|
||||
jar: JAR_SPLITTER,
|
||||
classpath: getClasspath(project, libs, JAR_SPLITTER),
|
||||
args: [
|
||||
'--input', '{MC_UNPACKED}',
|
||||
'--slim', '{MC_SLIM}',
|
||||
'--extra', '{MC_EXTRA}',
|
||||
'--srg', '{MERGED_MAPPINGS}'
|
||||
],
|
||||
outputs: [
|
||||
'{MC_SLIM}': '{MC_SLIM_SHA}',
|
||||
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
|
||||
]
|
||||
], [
|
||||
jar: FART,
|
||||
classpath: getClasspath(project, libs, FART),
|
||||
args: [
|
||||
'--input', '{MC_SLIM}',
|
||||
'--output', '{MC_SRG}',
|
||||
'--names', '{MERGED_MAPPINGS}',
|
||||
'--ann-fix', '--ids-fix', '--src-fix', '--record-fix'
|
||||
]/*,
|
||||
outputs: [
|
||||
'{MC_SRG}': '{MC_SRG_SHA}'
|
||||
]
|
||||
*/
|
||||
]
|
||||
]
|
||||
]
|
||||
getClasspath(project, libs, MCP_ARTIFACT.descriptor) //Tell it to download mcp_config
|
||||
}
|
||||
}
|
||||
|
||||
task installerJar(type: InstallerJar) {
|
||||
packedDependencies = PACKED_DEPS
|
||||
from(extraTxts)
|
||||
//TODO: make FML installer logo?
|
||||
from(rootProject.file('/forge_installer_logo.png')) {
|
||||
rename { 'big_logo.png' }
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact universalJar
|
||||
artifact installerJar
|
||||
artifact userdevJar
|
||||
artifact sourcesJar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Since we need the modules in the bootstrap, we need to make sure they are compiled before we do each run
|
||||
afterEvaluate { prepareRuns.dependsOn(PACKED_DEPS) }
|
||||
}
|
||||
|
||||
project(':forge') {
|
||||
evaluationDependsOn(':clean')
|
||||
apply plugin: 'java-library'
|
||||
@@ -1381,6 +1058,8 @@ project(':forge') {
|
||||
|
||||
doFirst {
|
||||
def libs = libraries
|
||||
def INSTALLER_TOOLS_CLASSPATH = getClasspath(project, libs, INSTALLER_TOOLS)
|
||||
def JAR_SPLITTER_CLASSPATH = getClasspath(project, libs, JAR_SPLITTER)
|
||||
json = [
|
||||
_comment_: launcherJson.comment,
|
||||
spec: 1,
|
||||
@@ -1451,7 +1130,7 @@ project(':forge') {
|
||||
[
|
||||
sides: ['server'],
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
classpath: INSTALLER_TOOLS_CLASSPATH,
|
||||
args: [
|
||||
'--task', 'EXTRACT_FILES',
|
||||
'--archive', '{INSTALLER}',
|
||||
@@ -1481,7 +1160,7 @@ project(':forge') {
|
||||
], [
|
||||
sides: ['server'],
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
classpath: INSTALLER_TOOLS_CLASSPATH,
|
||||
args: [
|
||||
'--task', 'BUNDLER_EXTRACT',
|
||||
'--input', '{MINECRAFT_JAR}',
|
||||
@@ -1491,7 +1170,7 @@ project(':forge') {
|
||||
], [
|
||||
sides: ['server'],
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
classpath: INSTALLER_TOOLS_CLASSPATH,
|
||||
args: [
|
||||
'--task', 'BUNDLER_EXTRACT',
|
||||
'--input', '{MINECRAFT_JAR}',
|
||||
@@ -1500,7 +1179,7 @@ project(':forge') {
|
||||
]
|
||||
], [
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
classpath: INSTALLER_TOOLS_CLASSPATH,
|
||||
args: [
|
||||
'--task', 'MCP_DATA',
|
||||
'--input', "[${MCP_ARTIFACT.descriptor}]",
|
||||
@@ -1509,7 +1188,7 @@ project(':forge') {
|
||||
]
|
||||
], [
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
classpath: INSTALLER_TOOLS_CLASSPATH,
|
||||
args: [
|
||||
'--task', 'DOWNLOAD_MOJMAPS',
|
||||
'--version', MC_VERSION,
|
||||
@@ -1518,7 +1197,7 @@ project(':forge') {
|
||||
]
|
||||
], [
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
classpath: INSTALLER_TOOLS_CLASSPATH,
|
||||
args: [
|
||||
'--task', 'MERGE_MAPPING',
|
||||
'--left', '{MAPPINGS}',
|
||||
@@ -1529,7 +1208,7 @@ project(':forge') {
|
||||
], [
|
||||
sides: ['client'],
|
||||
jar: JAR_SPLITTER,
|
||||
classpath: getClasspath(project, libs, JAR_SPLITTER),
|
||||
classpath: JAR_SPLITER_CLASSPATH,
|
||||
args: [
|
||||
'--input', '{MINECRAFT_JAR}',
|
||||
'--slim', '{MC_SLIM}',
|
||||
@@ -1543,7 +1222,7 @@ project(':forge') {
|
||||
], [
|
||||
sides: ['server'],
|
||||
jar: JAR_SPLITTER,
|
||||
classpath: getClasspath(project, libs, JAR_SPLITTER),
|
||||
classpath: JAR_SPLITTER_CLASSPATH,
|
||||
args: [
|
||||
'--input', '{MC_UNPACKED}',
|
||||
'--slim', '{MC_SLIM}',
|
||||
@@ -1788,8 +1467,6 @@ project(':forge') {
|
||||
//evaluationDependsOnChildren()
|
||||
task setup() { //These must be strings so that we can do lazy resolution. Else we need evaluationDependsOnChildren above
|
||||
dependsOn ':clean:extractMapped'
|
||||
if (symlinkValid)
|
||||
dependsOn ':fmlonly:extractMapped'
|
||||
dependsOn ':forge:extractMapped'
|
||||
}
|
||||
|
||||
@@ -1798,18 +1475,14 @@ task doChecks {
|
||||
dependsOn ':forge:publish'
|
||||
}
|
||||
|
||||
if (symlinkValid)
|
||||
project.gradle.startParameter.excludedTaskNames.add(':fmlonly:genPatches')
|
||||
project.gradle.startParameter.excludedTaskNames.add(':clean:genPatches')
|
||||
|
||||
//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}']"
|
||||
}
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
public class FMLClientDevLaunchHandler extends CommonDevLaunchHandler {
|
||||
@Override public String name() { return "fmlclientdev"; }
|
||||
@Override public Dist getDist() { return Dist.CLIENT; }
|
||||
|
||||
@Override
|
||||
public void devService(String[] arguments, ModuleLayer layer) throws Throwable {
|
||||
clientService(arguments, layer);
|
||||
}
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import net.minecraftforge.fml.loading.LibraryFinder;
|
||||
import net.minecraftforge.fml.loading.VersionInfo;
|
||||
|
||||
public class FMLClientLaunchHandler extends CommonClientLaunchHandler {
|
||||
@Override public String name() { return "fmlclient"; }
|
||||
|
||||
@Override
|
||||
protected void processMCStream(VersionInfo versionInfo, Stream.Builder<Path> mc, Stream.Builder<List<Path>> mods) {
|
||||
var fmlonly = LibraryFinder.findPathForMaven(versionInfo.forgeGroup(), "fmlonly", "", "universal", versionInfo.mcAndForgeVersion());
|
||||
mods.add(List.of(fmlonly));
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
public class FMLClientUserdevLaunchHandler extends FMLUserdevLaunchHandler {
|
||||
@Override
|
||||
public String name() { return "fmlclientuserdev"; }
|
||||
|
||||
@Override
|
||||
public Dist getDist() { return Dist.CLIENT; }
|
||||
|
||||
@Override
|
||||
protected void devService(String[] arguments, ModuleLayer layer) throws Throwable {
|
||||
clientService(arguments, layer);
|
||||
}
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
public class FMLDataUserdevLaunchHandler extends FMLUserdevLaunchHandler {
|
||||
@Override
|
||||
public String name() { return "fmldatauserdev"; }
|
||||
|
||||
@Override
|
||||
public Dist getDist() { return Dist.CLIENT; }
|
||||
|
||||
@Override
|
||||
public boolean isData() { return true; }
|
||||
|
||||
@Override
|
||||
public void devService(String[] arguments, ModuleLayer layer) throws Throwable {
|
||||
dataService(arguments, layer);
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
public class FMLServerDevLaunchHandler extends CommonDevLaunchHandler {
|
||||
@Override public String name() { return "fmlserverdev"; }
|
||||
@Override public Dist getDist() { return Dist.DEDICATED_SERVER; }
|
||||
|
||||
@Override
|
||||
public void devService(String[] arguments, ModuleLayer layer) throws Throwable {
|
||||
serverService(arguments, layer);
|
||||
}
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import cpw.mods.modlauncher.api.ILaunchHandlerService;
|
||||
import net.minecraftforge.fml.loading.LibraryFinder;
|
||||
import net.minecraftforge.fml.loading.VersionInfo;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.function.BiPredicate;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class FMLServerLaunchHandler extends CommonServerLaunchHandler implements ILaunchHandlerService {
|
||||
@Override public String name() { return "fmlserver"; }
|
||||
|
||||
@Override
|
||||
protected BiPredicate<String, String> processMCStream(VersionInfo versionInfo, Stream.Builder<Path> mc, BiPredicate<String, String> filter, Stream.Builder<List<Path>> mods) {
|
||||
var fmlonly = LibraryFinder.findPathForMaven(versionInfo.forgeGroup(), "fmlonly", "", "universal", versionInfo.mcAndForgeVersion());
|
||||
mods.add(List.of(fmlonly));
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
public class FMLServerUserdevLaunchHandler extends FMLUserdevLaunchHandler {
|
||||
@Override public String name() { return "fmlserveruserdev"; }
|
||||
@Override public Dist getDist() { return Dist.DEDICATED_SERVER; }
|
||||
|
||||
@Override
|
||||
public void devService(String[] arguments, ModuleLayer layer) throws Throwable {
|
||||
serverService(arguments, layer);
|
||||
}
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.targets;
|
||||
|
||||
import net.minecraftforge.fml.loading.VersionInfo;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public abstract class FMLUserdevLaunchHandler extends CommonUserdevLaunchHandler {
|
||||
@Override
|
||||
protected void processStreams(String[] classpath, VersionInfo versionInfo, Stream.Builder<Path> mc, Stream.Builder<List<Path>> mods) {
|
||||
var fmlonly = findJarOnClasspath(classpath, "fmlonly-" + versionInfo.mcAndForgeVersion());
|
||||
mc.add(fmlonly);
|
||||
}
|
||||
}
|
||||
-8
@@ -1,11 +1,3 @@
|
||||
net.minecraftforge.fml.loading.targets.FMLClientLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.FMLClientDevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.FMLClientUserdevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.FMLServerLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.FMLServerDevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.FMLServerUserdevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.FMLDataUserdevLaunchHandler
|
||||
|
||||
net.minecraftforge.fml.loading.targets.ForgeClientLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeClientDevLaunchHandler
|
||||
net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../src/fmlcommon/
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge - Forge Development LLC
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fmlonly;
|
||||
|
||||
import net.minecraftforge.eventbus.api.BusBuilder;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.I18NParser;
|
||||
import net.minecraftforge.fml.IBindingsProvider;
|
||||
import net.minecraftforge.fml.config.IConfigEvent;
|
||||
import net.minecraftforge.fml.event.config.ModConfigEvent;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class FMLOnlyBindings implements IBindingsProvider {
|
||||
private static final IEventBus DUMMYFORGEBUS = BusBuilder.builder().build();
|
||||
|
||||
@Override
|
||||
public Supplier<IEventBus> getForgeBusSupplier() {
|
||||
return ()->DUMMYFORGEBUS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier<I18NParser> getMessageParser() {
|
||||
return ()->new I18NParser() {
|
||||
@Override
|
||||
public String parseMessage(final String i18nMessage, final Object... args) {
|
||||
return i18nMessage + Arrays.stream(args).map(Objects::toString).collect(Collectors.joining(",", "[", "]"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String stripControlCodes(final String toStrip) {
|
||||
return toStrip;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier<IConfigEvent.ConfigConfig> getConfigConfiguration() {
|
||||
return ()->new IConfigEvent.ConfigConfig(ModConfigEvent.Loading::new, ModConfigEvent.Reloading::new, ModConfigEvent.Unloading::new);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge - Forge Development LLC
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fmlonly;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@Mod("fmlonly")
|
||||
public class FMLOnlyMod {}
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge - Forge Development LLC
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fmlonlyclient;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.ClientPackSource;
|
||||
import net.minecraft.server.packs.repository.PackRepository;
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import net.minecraft.server.packs.resources.ReloadableResourceManager;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.LoadingFailedException;
|
||||
import net.minecraftforge.fml.ModLoader;
|
||||
import net.minecraftforge.fml.ModWorkManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ClientModLoader
|
||||
{
|
||||
private static boolean loading;
|
||||
private static Minecraft mc;
|
||||
private static boolean loadingComplete;
|
||||
private static LoadingFailedException error;
|
||||
|
||||
public static void begin(final Minecraft minecraft, final PackRepository defaultResourcePacks, final ReloadableResourceManager mcResourceManager)
|
||||
{
|
||||
// force log4j to shutdown logging in a shutdown hook. This is because we disable default shutdown hook so the server properly logs it's shutdown
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(LogManager::shutdown));
|
||||
loading = true;
|
||||
ClientModLoader.mc = minecraft;
|
||||
createRunnableWithCatch(()->ModLoader.get().gatherAndInitializeMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), ()->{})).run();
|
||||
mcResourceManager.registerReloadListener(ClientModLoader::onResourceReload);
|
||||
}
|
||||
|
||||
private static CompletableFuture<Void> onResourceReload(final PreparableReloadListener.PreparationBarrier stage, final ResourceManager resourceManager, final ProfilerFiller prepareProfiler, final ProfilerFiller executeProfiler, final Executor asyncExecutor, final Executor syncExecutor) {
|
||||
return CompletableFuture.runAsync(createRunnableWithCatch(() -> startModLoading(ModWorkManager.wrappedExecutor(syncExecutor), asyncExecutor)), ModWorkManager.parallelExecutor())
|
||||
.thenCompose(stage::wait)
|
||||
.thenRunAsync(() -> finishModLoading(ModWorkManager.wrappedExecutor(syncExecutor), asyncExecutor), ModWorkManager.parallelExecutor());
|
||||
}
|
||||
|
||||
private static Runnable createRunnableWithCatch(Runnable r) {
|
||||
return ()-> {
|
||||
if (loadingComplete) return;
|
||||
try {
|
||||
r.run();
|
||||
} catch (LoadingFailedException e) {
|
||||
if (error == null) error = e;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static void startModLoading(ModWorkManager.DrivenExecutor syncExecutor, Executor parallelExecutor) {
|
||||
if (error!=null) throw error;
|
||||
createRunnableWithCatch(() -> ModLoader.get().loadMods(syncExecutor, parallelExecutor, ()->{})).run();
|
||||
}
|
||||
|
||||
private static void finishModLoading(ModWorkManager.DrivenExecutor syncExecutor, Executor parallelExecutor)
|
||||
{
|
||||
if (error!=null) throw error;
|
||||
createRunnableWithCatch(() -> ModLoader.get().finishMods(syncExecutor, parallelExecutor, ()->{})).run();
|
||||
loading = false;
|
||||
loadingComplete = true;
|
||||
// reload game settings on main thread
|
||||
syncExecutor.execute(()->mc.options.load());
|
||||
}
|
||||
|
||||
public static boolean isLoading()
|
||||
{
|
||||
return loading;
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge - Forge Development LLC
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fmlonlyserver;
|
||||
|
||||
import joptsimple.OptionParser;
|
||||
import net.minecraftforge.fml.LoadingFailedException;
|
||||
import net.minecraftforge.fml.ModLoader;
|
||||
import net.minecraftforge.fml.ModLoadingWarning;
|
||||
import net.minecraftforge.fml.ModWorkManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import static net.minecraftforge.fml.Logging.LOADING;
|
||||
|
||||
public class ServerModLoader
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static boolean hasErrors = false;
|
||||
|
||||
public static void addOptions(OptionParser parser)
|
||||
{
|
||||
// We consume this argument as we use it in the launcher and the client side.
|
||||
parser.accepts("gameDir").withRequiredArg().ofType(File.class).defaultsTo(new File("."));
|
||||
}
|
||||
|
||||
public static void load()
|
||||
{
|
||||
try
|
||||
{
|
||||
ModLoader.get().gatherAndInitializeMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), () -> {});
|
||||
ModLoader.get().loadMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), () -> {});
|
||||
ModLoader.get().finishMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), () -> {});
|
||||
} catch (LoadingFailedException error)
|
||||
{
|
||||
ServerModLoader.hasErrors = true;
|
||||
throw error;
|
||||
}
|
||||
List<ModLoadingWarning> warnings = ModLoader.get().getWarnings();
|
||||
if (!warnings.isEmpty())
|
||||
{
|
||||
LOGGER.warn(LOADING, "Mods loaded with {} warnings", warnings.size());
|
||||
warnings.forEach(warning -> LOGGER.warn(LOADING, warning.formatToString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasErrors()
|
||||
{
|
||||
return ServerModLoader.hasErrors;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"load_fml_client": "coremods/load_fml_client.js",
|
||||
"load_fml_server": "coremods/load_fml_server.js"
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
modLoader="javafml"
|
||||
loaderVersion="[24,]"
|
||||
issueTrackerURL="https://www.minecraftforge.net/"
|
||||
license="LGPL v2.1"
|
||||
|
||||
[[mods]]
|
||||
modId="fmlonly"
|
||||
# We use the global forge version
|
||||
version="${global.forgeVersion}"
|
||||
updateJSONURL="https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json"
|
||||
displayName="Forge"
|
||||
credits="Anyone who has contributed on Github and supports our development"
|
||||
authors="LexManos,cpw"
|
||||
description='''
|
||||
Forge, a broad compatibility API.
|
||||
'''
|
||||
@@ -1 +0,0 @@
|
||||
net.minecraftforge.fmlonly.FMLOnlyBindings
|
||||
@@ -1 +0,0 @@
|
||||
net.minecraftforge.fml.core.ModStateProvider
|
||||
@@ -1,36 +0,0 @@
|
||||
var ASMAPI = Java.type('net.minecraftforge.coremod.api.ASMAPI')
|
||||
var Opcodes = Java.type('org.objectweb.asm.Opcodes')
|
||||
|
||||
function initializeCoreMod() {
|
||||
return {
|
||||
'minecraft': {
|
||||
'target': {
|
||||
'type': 'METHOD',
|
||||
'class': 'net.minecraft.client.Minecraft',
|
||||
'methodName': '<init>',
|
||||
'methodDesc': '(Lnet/minecraft/client/main/GameConfig;)V'
|
||||
},
|
||||
'transformer': function(methodNode) {
|
||||
//print(ASMAPI.methodNodeToString(methodNode))
|
||||
var meth = ASMAPI.getMethodNode();
|
||||
var resourcePackRepository = ASMAPI.mapField("f_91038_")
|
||||
var resourceManager = ASMAPI.mapField("f_91036_")
|
||||
|
||||
meth.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
meth.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
meth.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/client/Minecraft", resourcePackRepository, "Lnet/minecraft/server/packs/repository/PackRepository;");
|
||||
meth.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
meth.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/client/Minecraft", resourceManager, "Lnet/minecraft/server/packs/resources/ReloadableResourceManager;");
|
||||
meth.visitMethodInsn(Opcodes.INVOKESTATIC, "net/minecraftforge/fmlonlyclient/ClientModLoader", "begin", "(Lnet/minecraft/client/Minecraft;Lnet/minecraft/server/packs/repository/PackRepository;Lnet/minecraft/server/packs/resources/ReloadableResourceManager;)V", false)
|
||||
for (var i=0; i<methodNode.instructions.size(); i++) {
|
||||
var ain = methodNode.instructions.get(i);
|
||||
if (ain.getOpcode() == Opcodes.PUTFIELD && ain.name.equals(resourceManager)) {
|
||||
methodNode.instructions.insert(ain, meth.instructions);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return methodNode;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
var ASMAPI = Java.type('net.minecraftforge.coremod.api.ASMAPI')
|
||||
var Opcodes = Java.type('org.objectweb.asm.Opcodes')
|
||||
|
||||
function initializeCoreMod() {
|
||||
return {
|
||||
'minecraft': {
|
||||
'target': {
|
||||
'type': 'METHOD',
|
||||
'class': 'net.minecraft.server.Main',
|
||||
'methodName': 'main',
|
||||
'methodDesc': '([Ljava/lang/String;)V'
|
||||
},
|
||||
'transformer': function(methodNode) {
|
||||
var meth = ASMAPI.getMethodNode();
|
||||
meth.visitMethodInsn(Opcodes.INVOKESTATIC, 'net/minecraftforge/fmlonlyserver/ServerModLoader', 'load', '()V', false)
|
||||
|
||||
var methOptions = ASMAPI.getMethodNode();
|
||||
methOptions.visitIntInsn(Opcodes.ALOAD, 1);
|
||||
methOptions.visitMethodInsn(Opcodes.INVOKESTATIC, 'net/minecraftforge/fmlonlyserver/ServerModLoader', 'addOptions', '(Ljoptsimple/OptionParser;)V', false)
|
||||
|
||||
for (var i=0; i<methodNode.instructions.size(); i++) {
|
||||
var ain = methodNode.instructions.get(i);
|
||||
if (ain.getOpcode() == Opcodes.INVOKESPECIAL && ain.owner == 'joptsimple/OptionParser' && ain.name == '<init>' && ain.desc == '()V') {
|
||||
// Inject after the STORE
|
||||
methodNode.instructions.insert(methodNode.instructions.get(i + 1), methOptions.instructions);
|
||||
} else if (ain.getOpcode() == Opcodes.INVOKESTATIC && ain.owner == 'net/minecraft/Util' && ain.name == ASMAPI.mapMethod('m_137584_') /* startTimerHackThread */ && ain.desc == '()V') {
|
||||
methodNode.instructions.insert(ain, meth.instructions);
|
||||
break; // By this point we've already reached the first injection point so break
|
||||
}
|
||||
}
|
||||
return methodNode;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/platform/Window.java
|
||||
+++ b/com/mojang/blaze3d/platform/Window.java
|
||||
@@ -83,7 +_,8 @@
|
||||
@@ -81,7 +_,8 @@
|
||||
GLFW.glfwWindowHint(139267, 2);
|
||||
GLFW.glfwWindowHint(139272, 204801);
|
||||
GLFW.glfwWindowHint(139270, 1);
|
||||
@@ -10,15 +10,15 @@
|
||||
if (monitor != null) {
|
||||
VideoMode videomode = monitor.m_84948_(this.f_85355_ ? this.f_85354_ : Optional.empty());
|
||||
this.f_85350_ = this.f_85357_ = monitor.m_84951_() + videomode.m_85332_() / 2 - this.f_85359_ / 2;
|
||||
@@ -95,6 +_,7 @@
|
||||
@@ -93,6 +_,7 @@
|
||||
this.f_85350_ = this.f_85357_ = aint1[0];
|
||||
this.f_85351_ = this.f_85358_ = aint[0];
|
||||
}
|
||||
+ }
|
||||
|
||||
GLFW.glfwMakeContextCurrent(this.f_85349_);
|
||||
Locale locale = Locale.getDefault(Category.FORMAT);
|
||||
@@ -238,6 +_,7 @@
|
||||
GL.createCapabilities();
|
||||
@@ -242,6 +_,7 @@
|
||||
GLFW.glfwGetFramebufferSize(this.f_85349_, aint, aint1);
|
||||
this.f_85361_ = aint[0] > 0 ? aint[0] : 1;
|
||||
this.f_85362_ = aint1[0] > 0 ? aint1[0] : 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/math/Transformation.java
|
||||
+++ b/com/mojang/math/Transformation.java
|
||||
@@ -14,7 +_,7 @@
|
||||
@@ -13,7 +_,7 @@
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector3fc;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
private final Matrix4f f_121078_;
|
||||
public static final Codec<Transformation> f_268453_ = RecordCodecBuilder.create((p_269604_) -> {
|
||||
return p_269604_.group(ExtraCodecs.f_252432_.fieldOf("translation").forGetter((p_269599_) -> {
|
||||
@@ -163,6 +_,19 @@
|
||||
@@ -156,6 +_,19 @@
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.f_121078_);
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
|
||||
+++ b/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
|
||||
@@ -68,6 +_,15 @@
|
||||
@@ -61,6 +_,15 @@
|
||||
return Component.m_237119_().m_7220_(this.f_200947_.f_287789_).m_130946_(": ").m_7220_(this.f_200947_.f_287787_);
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
+ }
|
||||
+
|
||||
public void m_88315_(GuiGraphics p_283497_, int p_88680_, int p_88681_, float p_88682_) {
|
||||
this.m_280273_(p_283497_);
|
||||
p_283497_.m_280653_(this.f_96547_, this.f_200947_.f_287789_, this.f_96543_ / 2, 80, 16777215);
|
||||
super.m_88315_(p_283497_, p_88680_, p_88681_, p_88682_);
|
||||
p_283497_.m_280653_(this.f_96547_, this.f_200947_.f_287789_, this.f_96543_ / 2, 80, -1);
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
--- a/com/mojang/realmsclient/gui/screens/RealmsNotificationsScreen.java
|
||||
+++ b/com/mojang/realmsclient/gui/screens/RealmsNotificationsScreen.java
|
||||
@@ -45,9 +_,9 @@
|
||||
}
|
||||
};
|
||||
private final RealmsNotificationsScreen.DataFetcherConfiguration f_273849_ = new RealmsNotificationsScreen.DataFetcherConfiguration() {
|
||||
- public DataFetcher.Subscription m_274316_(RealmsDataFetcher p_275731_) {
|
||||
- DataFetcher.Subscription datafetcher$subscription = p_275731_.f_238549_.m_239139_();
|
||||
- RealmsNotificationsScreen.this.m_274585_(p_275731_, datafetcher$subscription);
|
||||
+ public DataFetcher.Subscription m_274316_(RealmsDataFetcher p_275318_) {
|
||||
+ DataFetcher.Subscription datafetcher$subscription = p_275318_.f_238549_.m_239139_();
|
||||
+ RealmsNotificationsScreen.this.m_274585_(p_275318_, datafetcher$subscription);
|
||||
return datafetcher$subscription;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/SharedConstants.java
|
||||
+++ b/net/minecraft/SharedConstants.java
|
||||
@@ -210,6 +_,7 @@
|
||||
@@ -212,6 +_,7 @@
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/Util.java
|
||||
+++ b/net/minecraft/Util.java
|
||||
@@ -171,6 +_,11 @@
|
||||
@@ -172,6 +_,11 @@
|
||||
return 255;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public static ExecutorService m_183991_() {
|
||||
return f_137444_;
|
||||
}
|
||||
@@ -239,7 +_,7 @@
|
||||
@@ -240,7 +_,7 @@
|
||||
try {
|
||||
type = DataFixers.m_14512_().getSchema(DataFixUtils.makeKey(SharedConstants.m_183709_().m_183476_().m_193006_())).getChoiceType(p_137552_, p_137553_);
|
||||
} catch (IllegalArgumentException illegalargumentexception) {
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
--- a/net/minecraft/advancements/Advancement.java
|
||||
+++ b/net/minecraft/advancements/Advancement.java
|
||||
@@ -150,7 +_,7 @@
|
||||
return this.f_138305_;
|
||||
@@ -62,7 +_,14 @@
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public static class Builder {
|
||||
+ public static class Builder implements net.minecraftforge.common.extensions.IForgeAdvancementBuilder {
|
||||
@Nullable
|
||||
private ResourceLocation f_138332_;
|
||||
@Nullable
|
||||
@@ -340,7 +_,14 @@
|
||||
return "Task Advancement{parentId=" + this.f_138332_ + ", display=" + this.f_138334_ + ", rewards=" + this.f_138335_ + ", criteria=" + this.f_138336_ + ", requirements=" + Arrays.deepToString(this.f_138337_) + ", sends_telemetry_event=" + this.f_285655_ + "}";
|
||||
}
|
||||
|
||||
+ /** @deprecated Forge: use {@linkplain #fromJson(JsonObject, DeserializationContext, net.minecraftforge.common.crafting.conditions.ICondition.IContext) overload with context}. */
|
||||
+ @Deprecated
|
||||
public static Advancement.Builder m_138380_(JsonObject p_138381_, DeserializationContext p_138382_) {
|
||||
+ return fromJson(p_138381_, p_138382_, net.minecraftforge.common.crafting.conditions.ICondition.IContext.EMPTY);
|
||||
+ }
|
||||
+ /** @deprecated Forge: use {@linkplain #fromJson(JsonObject, DeserializationContext, net.minecraftforge.common.crafting.conditions.ICondition.IContext) overload with context}. */
|
||||
+ @Deprecated
|
||||
public static Advancement m_294730_(JsonObject p_300691_, DeserializationContext p_300053_) {
|
||||
+ return fromJson(p_300691_, p_300053_, net.minecraftforge.common.crafting.conditions.ICondition.IContext.EMPTY);
|
||||
+ }
|
||||
+
|
||||
+ public static Advancement.Builder fromJson(JsonObject p_138381_, DeserializationContext p_138382_, net.minecraftforge.common.crafting.conditions.ICondition.IContext context) {
|
||||
+ if ((p_138381_ = net.minecraftforge.common.crafting.ConditionalAdvancement.processConditional(p_138381_, context)) == null) return null;
|
||||
ResourceLocation resourcelocation = p_138381_.has("parent") ? new ResourceLocation(GsonHelper.m_13906_(p_138381_, "parent")) : null;
|
||||
DisplayInfo displayinfo = p_138381_.has("display") ? DisplayInfo.m_14981_(GsonHelper.m_13930_(p_138381_, "display")) : null;
|
||||
AdvancementRewards advancementrewards = p_138381_.has("rewards") ? AdvancementRewards.m_9991_(GsonHelper.m_13930_(p_138381_, "rewards")) : AdvancementRewards.f_9978_;
|
||||
+ public static Advancement fromJson(JsonObject p_300691_, DeserializationContext p_300053_, net.minecraftforge.common.crafting.conditions.ICondition.IContext context) {
|
||||
+ //if ((p_300691_ = net.minecraftforge.common.crafting.ConditionalAdvancement.processConditional(p_300691_, context)) == null) return null;
|
||||
Optional<ResourceLocation> optional = p_300691_.has("parent") ? Optional.of(new ResourceLocation(GsonHelper.m_13906_(p_300691_, "parent"))) : Optional.empty();
|
||||
Optional<DisplayInfo> optional1 = p_300691_.has("display") ? Optional.of(DisplayInfo.m_14981_(GsonHelper.m_13930_(p_300691_, "display"))) : Optional.empty();
|
||||
AdvancementRewards advancementrewards = p_300691_.has("rewards") ? AdvancementRewards.m_9991_(GsonHelper.m_13930_(p_300691_, "rewards")) : AdvancementRewards.f_9978_;
|
||||
@@ -1,47 +1,11 @@
|
||||
--- a/net/minecraft/advancements/critereon/ItemPredicate.java
|
||||
+++ b/net/minecraft/advancements/critereon/ItemPredicate.java
|
||||
@@ -29,6 +_,8 @@
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
|
||||
public class ItemPredicate {
|
||||
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> custom_predicates = new java.util.HashMap<>();
|
||||
+ 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 TagKey<Item> f_45029_;
|
||||
@@ -81,7 +_,7 @@
|
||||
@@ -50,7 +_,7 @@
|
||||
return false;
|
||||
} else {
|
||||
if (this.f_45033_.length > 0) {
|
||||
if (!this.f_45033_.isEmpty()) {
|
||||
- Map<Enchantment, Integer> map = EnchantmentHelper.m_44882_(p_45050_.m_41785_());
|
||||
+ Map<Enchantment, Integer> map = p_45050_.getAllEnchantments();
|
||||
|
||||
for(EnchantmentPredicate enchantmentpredicate : this.f_45033_) {
|
||||
if (!enchantmentpredicate.m_30476_(map)) {
|
||||
@@ -108,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");
|
||||
+ if (jsonobject.has("type")) {
|
||||
+ final ResourceLocation rl = new ResourceLocation(GsonHelper.m_13906_(jsonobject, "type"));
|
||||
+ if (custom_predicates.containsKey(rl)) return custom_predicates.get(rl).apply(jsonobject);
|
||||
+ else throw new JsonSyntaxException("There is no ItemPredicate of type "+rl);
|
||||
+ }
|
||||
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")) {
|
||||
@@ -215,6 +_,14 @@
|
||||
} else {
|
||||
return new ItemPredicate[0];
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ public static void register(ResourceLocation name, java.util.function.Function<JsonObject, ItemPredicate> deserializer) {
|
||||
+ custom_predicates.put(name, deserializer);
|
||||
+ }
|
||||
+
|
||||
+ public static Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> getPredicates() {
|
||||
+ return unmod_predicates;
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
@@ -1,20 +1,20 @@
|
||||
--- a/net/minecraft/client/ClientRecipeBook.java
|
||||
+++ b/net/minecraft/client/ClientRecipeBook.java
|
||||
@@ -54,7 +_,7 @@
|
||||
for(Recipe<?> recipe : p_90643_) {
|
||||
@@ -56,7 +_,7 @@
|
||||
Recipe<?> recipe = recipeholder.f_291008_();
|
||||
if (!recipe.m_5598_() && !recipe.m_142505_()) {
|
||||
RecipeBookCategories recipebookcategories = m_90646_(recipe);
|
||||
RecipeBookCategories recipebookcategories = m_90646_(recipeholder);
|
||||
- String s = recipe.m_6076_();
|
||||
+ String s = recipe.m_6076_().isEmpty() ? recipe.m_6423_().toString() : recipe.m_6076_(); // FORGE: Group value defaults to the recipe's ID if the recipe's explicit group is empty.
|
||||
+ String s = recipe.m_6076_().isEmpty() ? recipeholder.f_291676_().toString() : recipe.m_6076_(); // FORGE: Group value defaults to the recipe's ID if the recipe's explicit group is empty.
|
||||
if (s.isEmpty()) {
|
||||
map.computeIfAbsent(recipebookcategories, (p_90645_) -> {
|
||||
return Lists.newArrayList();
|
||||
@@ -141,6 +_,8 @@
|
||||
@@ -144,6 +_,8 @@
|
||||
} else if (recipetype == RecipeType.f_44113_) {
|
||||
return RecipeBookCategories.SMITHING;
|
||||
} else {
|
||||
+ RecipeBookCategories categories = net.minecraftforge.client.RecipeBookManager.findCategories((RecipeType) recipetype, p_90647_);
|
||||
+ RecipeBookCategories categories = net.minecraftforge.client.RecipeBookManager.findCategories((RecipeType) recipetype, p_299041_);
|
||||
+ if (categories != null) return categories;
|
||||
f_90618_.warn("Unknown recipe category: {}/{}", LogUtils.defer(() -> {
|
||||
return BuiltInRegistries.f_256990_.m_7981_(p_90647_.m_6671_());
|
||||
}), LogUtils.defer(p_90647_::m_6423_));
|
||||
return BuiltInRegistries.f_256990_.m_7981_(recipe.m_6671_());
|
||||
}), LogUtils.defer(p_299041_::f_291676_));
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/KeyboardHandler.java
|
||||
+++ b/net/minecraft/client/KeyboardHandler.java
|
||||
@@ -329,7 +_,9 @@
|
||||
@@ -340,7 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if (this.f_90867_.f_91066_.f_92105_.m_90832_(p_90895_, p_90896_)) {
|
||||
this.f_90867_.m_91268_().m_85438_();
|
||||
this.f_90867_.f_91066_.m_231829_().m_231514_(this.f_90867_.m_91268_().m_85440_());
|
||||
@@ -347,6 +_,8 @@
|
||||
@@ -358,6 +_,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -19,8 +19,8 @@
|
||||
+ ((KeyBindsScreen)this.f_90867_.f_91080_).f_193975_ = null; //Forge: Unset pure modifiers.
|
||||
}
|
||||
|
||||
if (this.f_90867_.m_240477_().m_93316_()) {
|
||||
@@ -369,11 +_,15 @@
|
||||
if (this.f_90867_.m_240477_().m_93316_() && this.f_90867_.f_91066_.m_292959_().m_231551_()) {
|
||||
@@ -380,11 +_,15 @@
|
||||
Screen.m_96579_(() -> {
|
||||
if (p_90897_ != 1 && p_90897_ != 2) {
|
||||
if (p_90897_ == 0) {
|
||||
@@ -38,8 +38,8 @@
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", screen.getClass().getCanonicalName());
|
||||
@@ -424,22 +_,26 @@
|
||||
}
|
||||
@@ -443,22 +_,26 @@
|
||||
this.f_90867_.m_91111_(p_90895_ - 48);
|
||||
}
|
||||
}
|
||||
-
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -249,7 +_,7 @@
|
||||
@@ -251,7 +_,7 @@
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -9,15 +9,15 @@
|
||||
static Minecraft f_90981_;
|
||||
private static final Logger f_90982_ = LogUtils.getLogger();
|
||||
public static final boolean f_91002_ = Util.m_137581_() == Util.OS.OSX;
|
||||
@@ -413,7 +_,6 @@
|
||||
@@ -421,7 +_,6 @@
|
||||
}, Util.m_183992_());
|
||||
this.f_193584_ = this.m_193585_(this.f_231338_, p_91084_);
|
||||
this.f_90998_ = p_91084_.f_101905_.f_101942_;
|
||||
f_90982_.info("Setting user: {}", (Object)this.f_90998_.m_92546_());
|
||||
- f_90982_.debug("(Session ID is {})", (Object)this.f_90998_.m_92544_());
|
||||
this.f_91033_ = p_91084_.f_101908_.f_101926_;
|
||||
this.f_91034_ = !p_91084_.f_101908_.f_101929_;
|
||||
this.f_91035_ = !p_91084_.f_101908_.f_101930_;
|
||||
@@ -449,15 +_,15 @@
|
||||
@@ -457,15 +_,15 @@
|
||||
}
|
||||
|
||||
this.f_90990_.m_85380_(this.f_91066_.m_232035_().m_231551_());
|
||||
@@ -35,7 +35,7 @@
|
||||
this.f_91038_.m_10506_();
|
||||
this.f_91066_.m_92145_(this.f_91038_);
|
||||
this.f_91039_ = new LanguageManager(this.f_91066_.f_92075_);
|
||||
@@ -504,10 +_,13 @@
|
||||
@@ -511,10 +_,13 @@
|
||||
this.f_91063_ = new GameRenderer(this, this.f_90994_.m_234586_(), this.f_91036_, this.f_90993_);
|
||||
this.f_91036_.m_7217_(this.f_91063_.m_247116_());
|
||||
this.f_91060_ = new LevelRenderer(this, this.f_90994_, this.f_167845_, this.f_90993_);
|
||||
@@ -50,7 +50,7 @@
|
||||
this.f_91036_.m_7217_(this.f_91061_);
|
||||
this.f_91053_ = new PaintingTextureManager(this.f_90987_);
|
||||
this.f_91036_.m_7217_(this.f_91053_);
|
||||
@@ -516,7 +_,10 @@
|
||||
@@ -525,7 +_,10 @@
|
||||
this.f_91047_ = new GpuWarnlistManager();
|
||||
this.f_91036_.m_7217_(this.f_91047_);
|
||||
this.f_91036_.m_7217_(this.f_205120_);
|
||||
@@ -62,7 +62,7 @@
|
||||
this.f_91064_ = new DebugRenderer(this);
|
||||
RealmsClient realmsclient = RealmsClient.m_239151_(this);
|
||||
this.f_238717_ = new RealmsDataFetcher(realmsclient);
|
||||
@@ -536,6 +_,7 @@
|
||||
@@ -545,6 +_,7 @@
|
||||
TinyFileDialogs.tinyfd_messageBox("Minecraft", stringbuilder.toString(), "ok", "error", false);
|
||||
}
|
||||
|
||||
@@ -70,52 +70,25 @@
|
||||
this.f_90990_.m_85409_(this.f_91066_.m_231817_().m_231551_());
|
||||
this.f_90990_.m_85424_(this.f_91066_.m_232123_().m_231551_());
|
||||
this.f_90990_.m_85426_();
|
||||
@@ -554,7 +_,7 @@
|
||||
this.f_167847_.m_168557_(ResourceLoadStateTracker.ReloadReason.INITIAL, list);
|
||||
@@ -564,7 +_,7 @@
|
||||
ReloadInstance reloadinstance = this.f_91036_.m_142463_(Util.m_183991_(), this, f_90983_, list);
|
||||
GameLoadTimesEvent.f_285635_.m_285833_(TelemetryProperty.f_285629_);
|
||||
- this.m_91150_(new LoadingOverlay(this, reloadinstance, (p_210745_) -> {
|
||||
+ this.m_91150_(net.minecraftforge.fml.loading.ImmediateWindowHandler.<LoadingOverlay>loadingOverlay(()->this, ()->reloadinstance, (p_210745_) -> {
|
||||
Util.m_137521_(p_210745_, this::m_91239_, () -> {
|
||||
if (SharedConstants.f_136183_) {
|
||||
this.m_91273_();
|
||||
@@ -562,20 +_,23 @@
|
||||
|
||||
Minecraft.GameLoadCookie minecraft$gameloadcookie = new Minecraft.GameLoadCookie(realmsclient, p_91084_.f_278410_);
|
||||
- this.m_91150_(new LoadingOverlay(this, reloadinstance, (p_296164_) -> {
|
||||
+ this.m_91150_(net.minecraftforge.fml.loading.ImmediateWindowHandler.<LoadingOverlay>loadingOverlay(() -> this, () -> reloadinstance, (p_296164_) -> {
|
||||
Util.m_137521_(p_296164_, (p_296162_) -> {
|
||||
this.m_91239_(p_296162_, minecraft$gameloadcookie);
|
||||
}, () -> {
|
||||
@@ -575,7 +_,7 @@
|
||||
this.f_167847_.m_168556_();
|
||||
this.m_286052_();
|
||||
+ if (net.minecraftforge.client.loading.ClientModLoader.completeModLoading())
|
||||
+ return; // Do not overwrite the error screen if there are errors
|
||||
+ // FORGE: Move opening initial screen to after startup and events are enabled
|
||||
+ if (this.m_239929_()) {
|
||||
+ this.m_91152_(BanNoticeScreen.m_239967_((p_278873_) -> {
|
||||
+ if (p_278873_) {
|
||||
+ Util.m_137581_().m_137646_("https://aka.ms/mcjavamoderation");
|
||||
+ }
|
||||
+
|
||||
+ this.m_278684_(realmsclient, reloadinstance, p_91084_.f_278410_);
|
||||
+ }, this.m_239210_()));
|
||||
+ } else {
|
||||
+ this.m_278684_(realmsclient, reloadinstance, p_91084_.f_278410_);
|
||||
+ }
|
||||
this.m_293750_(minecraft$gameloadcookie);
|
||||
});
|
||||
- }, false));
|
||||
+ }, false).get());
|
||||
this.f_278504_ = QuickPlayLog.m_278648_(p_91084_.f_278410_.f_278493_());
|
||||
- if (this.m_239929_()) {
|
||||
- this.m_91152_(BanNoticeScreen.m_239967_((p_278873_) -> {
|
||||
- if (p_278873_) {
|
||||
- Util.m_137581_().m_137646_("https://aka.ms/mcjavamoderation");
|
||||
- }
|
||||
-
|
||||
- this.m_278684_(realmsclient, reloadinstance, p_91084_.f_278410_);
|
||||
- }, this.m_239210_()));
|
||||
- } else {
|
||||
- this.m_278684_(realmsclient, reloadinstance, p_91084_.f_278410_);
|
||||
- }
|
||||
|
||||
}
|
||||
|
||||
@@ -611,7 +_,7 @@
|
||||
@@ -673,7 +_,7 @@
|
||||
private String m_91270_() {
|
||||
StringBuilder stringbuilder = new StringBuilder("Minecraft");
|
||||
if (m_193589_().m_184597_()) {
|
||||
@@ -124,7 +97,7 @@
|
||||
}
|
||||
|
||||
stringbuilder.append(" ");
|
||||
@@ -635,6 +_,8 @@
|
||||
@@ -698,6 +_,8 @@
|
||||
|
||||
private UserApiService m_193585_(YggdrasilAuthenticationService p_193586_, GameConfig p_193587_) {
|
||||
try {
|
||||
@@ -133,30 +106,30 @@
|
||||
return p_193586_.createUserApiService(p_193587_.f_101905_.f_101942_.m_92547_());
|
||||
} catch (AuthenticationException authenticationexception) {
|
||||
f_90982_.error("Failed to verify authentication", (Throwable)authenticationexception);
|
||||
@@ -647,7 +_,7 @@
|
||||
@@ -710,7 +_,7 @@
|
||||
}
|
||||
|
||||
private void m_91239_(Throwable p_91240_) {
|
||||
private void m_91239_(Throwable p_91240_, @Nullable Minecraft.GameLoadCookie p_299515_) {
|
||||
- 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.
|
||||
this.m_91241_(p_91240_, (Component)null);
|
||||
this.m_91241_(p_91240_, (Component)null, p_299515_);
|
||||
} else {
|
||||
Util.m_137559_(p_91240_);
|
||||
@@ -739,7 +_,10 @@
|
||||
@@ -802,7 +_,10 @@
|
||||
}
|
||||
|
||||
public void m_91271_() {
|
||||
- this.f_90997_.m_235232_(SearchRegistry.f_119941_, (p_231389_) -> {
|
||||
- this.f_90997_.m_235232_(SearchRegistry.f_119941_, (p_231451_) -> {
|
||||
+ var nameSearchKeys = net.minecraftforge.client.CreativeModeTabSearchRegistry.getNameSearchKeys();
|
||||
+ var tagSearchKeys = net.minecraftforge.client.CreativeModeTabSearchRegistry.getTagSearchKeys();
|
||||
+ for (var nameSearchKey : nameSearchKeys.values())
|
||||
+ this.f_90997_.m_235232_(nameSearchKey, (p_231389_) -> {
|
||||
+ this.f_90997_.m_235232_(nameSearchKey, (p_231451_) -> {
|
||||
return new FullTextSearchTree<>((p_210797_) -> {
|
||||
return p_210797_.m_41651_((Player)null, TooltipFlag.Default.f_256752_.m_257777_()).stream().map((p_210807_) -> {
|
||||
return ChatFormatting.m_126649_(p_210807_.getString()).trim();
|
||||
@@ -750,7 +_,8 @@
|
||||
return p_210797_.m_41651_((Player)null, TooltipFlag.Default.f_256752_.m_257777_()).stream().map((p_231455_) -> {
|
||||
return ChatFormatting.m_126649_(p_231455_.getString()).trim();
|
||||
@@ -813,14 +_,18 @@
|
||||
return Stream.of(BuiltInRegistries.f_257033_.m_7981_(p_91317_.m_41720_()));
|
||||
}, p_231389_);
|
||||
}, p_231451_);
|
||||
});
|
||||
- this.f_90997_.m_235232_(SearchRegistry.f_119942_, (p_231430_) -> {
|
||||
+ for (var tagSearchKey : tagSearchKeys.values())
|
||||
@@ -164,9 +137,6 @@
|
||||
return new IdSearchTree<>((p_231353_) -> {
|
||||
return p_231353_.m_204131_().map(TagKey::f_203868_);
|
||||
}, p_231430_);
|
||||
@@ -770,9 +_,12 @@
|
||||
});
|
||||
}, p_231451_);
|
||||
});
|
||||
- CreativeModeTabs.m_258007_().m_257882_((p_255439_) -> {
|
||||
- this.m_231374_(SearchRegistry.f_119941_, p_255439_);
|
||||
@@ -180,7 +150,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -824,13 +_,13 @@
|
||||
@@ -872,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_());
|
||||
@@ -197,7 +167,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -954,10 +_,6 @@
|
||||
@@ -1003,10 +_,6 @@
|
||||
f_90982_.error("setScreen called from non-game thread");
|
||||
}
|
||||
|
||||
@@ -208,27 +178,27 @@
|
||||
if (p_91153_ == null && this.f_91073_ == null) {
|
||||
p_91153_ = new TitleScreen();
|
||||
} else if (p_91153_ == null && this.f_91074_.m_21224_()) {
|
||||
@@ -968,6 +_,19 @@
|
||||
@@ -1017,6 +_,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.client.ForgeHooksClient.clearGuiLayers(this);
|
||||
+ Screen old = this.f_91080_;
|
||||
+ if (p_91153_ != null) {
|
||||
+ var event = new net.minecraftforge.client.event.ScreenEvent.Opening(old, p_91153_);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
|
||||
+ p_91153_ = event.getNewScreen();
|
||||
+ var event = net.minecraftforge.event.ForgeEventFactory.onScreenOpening(old, p_91153_);
|
||||
+ if (event == null) return;
|
||||
+ p_91153_ = event;
|
||||
+ }
|
||||
+
|
||||
+ if (old != null && p_91153_ != old) {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.Closing(old));
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onScreenClose(old);
|
||||
+ old.m_7861_();
|
||||
+ }
|
||||
+
|
||||
this.f_91080_ = p_91153_;
|
||||
if (this.f_91080_ != null) {
|
||||
this.f_91080_.m_274333_();
|
||||
@@ -1113,9 +_,12 @@
|
||||
@@ -1163,9 +_,12 @@
|
||||
RenderSystem.enableCull();
|
||||
this.f_91026_.m_7238_();
|
||||
if (!this.f_91079_) {
|
||||
@@ -241,7 +211,7 @@
|
||||
}
|
||||
|
||||
if (this.f_91056_ != null) {
|
||||
@@ -1240,10 +_,12 @@
|
||||
@@ -1286,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_());
|
||||
@@ -254,15 +224,15 @@
|
||||
this.f_91063_.m_109097_(this.f_90990_.m_85441_(), this.f_90990_.m_85442_());
|
||||
this.f_91067_.m_91599_();
|
||||
}
|
||||
@@ -1517,6 +_,7 @@
|
||||
@@ -1563,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_91395_() {
|
||||
+ if (this.m_91396_()) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.GameShuttingDownEvent());
|
||||
+ if (this.m_91396_()) net.minecraftforge.event.ForgeEventFactory.onGameShuttingDown();
|
||||
this.f_91019_ = false;
|
||||
}
|
||||
|
||||
@@ -1546,10 +_,18 @@
|
||||
@@ -1592,10 +_,18 @@
|
||||
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_();
|
||||
@@ -284,7 +254,7 @@
|
||||
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1578,6 +_,8 @@
|
||||
@@ -1624,6 +_,8 @@
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = false;
|
||||
@@ -293,7 +263,7 @@
|
||||
switch (this.f_91077_.m_6662_()) {
|
||||
case ENTITY:
|
||||
this.f_91072_.m_105223_(this.f_91074_, ((EntityHitResult)this.f_91077_).m_82443_());
|
||||
@@ -1585,7 +_,7 @@
|
||||
@@ -1631,7 +_,7 @@
|
||||
case BLOCK:
|
||||
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
|
||||
BlockPos blockpos = blockhitresult.m_82425_();
|
||||
@@ -302,7 +272,7 @@
|
||||
this.f_91072_.m_105269_(blockpos, blockhitresult.m_82434_());
|
||||
if (this.f_91073_.m_8055_(blockpos).m_60795_()) {
|
||||
flag = true;
|
||||
@@ -1598,8 +_,10 @@
|
||||
@@ -1644,8 +_,10 @@
|
||||
}
|
||||
|
||||
this.f_91074_.m_36334_();
|
||||
@@ -313,7 +283,7 @@
|
||||
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
|
||||
return flag;
|
||||
}
|
||||
@@ -1615,6 +_,11 @@
|
||||
@@ -1661,6 +_,11 @@
|
||||
}
|
||||
|
||||
for(InteractionHand interactionhand : InteractionHand.values()) {
|
||||
@@ -325,7 +295,7 @@
|
||||
ItemStack itemstack = this.f_91074_.m_21120_(interactionhand);
|
||||
if (!itemstack.m_246617_(this.f_91073_.m_246046_())) {
|
||||
return;
|
||||
@@ -1635,7 +_,7 @@
|
||||
@@ -1681,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (interactionresult.m_19077_()) {
|
||||
@@ -334,7 +304,7 @@
|
||||
this.f_91074_.m_6674_(interactionhand);
|
||||
}
|
||||
|
||||
@@ -1647,7 +_,7 @@
|
||||
@@ -1693,7 +_,7 @@
|
||||
int i = itemstack.m_41613_();
|
||||
InteractionResult interactionresult1 = this.f_91072_.m_233732_(this.f_91074_, interactionhand, blockhitresult);
|
||||
if (interactionresult1.m_19077_()) {
|
||||
@@ -343,7 +313,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);
|
||||
@@ -1663,6 +_,9 @@
|
||||
@@ -1709,6 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +323,7 @@
|
||||
if (!itemstack.m_41619_()) {
|
||||
InteractionResult interactionresult2 = this.f_91072_.m_233721_(this.f_91074_, interactionhand);
|
||||
if (interactionresult2.m_19077_()) {
|
||||
@@ -1689,6 +_,8 @@
|
||||
@@ -1735,6 +_,8 @@
|
||||
--this.f_91011_;
|
||||
}
|
||||
|
||||
@@ -362,7 +332,7 @@
|
||||
this.f_91026_.m_6180_("gui");
|
||||
this.f_240378_.m_240688_();
|
||||
this.f_91065_.m_193832_(this.f_91012_);
|
||||
@@ -1780,6 +_,7 @@
|
||||
@@ -1823,6 +_,7 @@
|
||||
|
||||
this.f_91005_.m_120596_();
|
||||
|
||||
@@ -370,7 +340,7 @@
|
||||
try {
|
||||
this.f_91073_.m_104726_(() -> {
|
||||
return true;
|
||||
@@ -1795,6 +_,7 @@
|
||||
@@ -1838,6 +_,7 @@
|
||||
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
@@ -378,7 +348,7 @@
|
||||
}
|
||||
|
||||
this.f_91026_.m_6182_("animateTick");
|
||||
@@ -1814,6 +_,8 @@
|
||||
@@ -1857,6 +_,8 @@
|
||||
this.f_91026_.m_6182_("keyboard");
|
||||
this.f_91068_.m_90931_();
|
||||
this.f_91026_.m_7238_();
|
||||
@@ -387,7 +357,7 @@
|
||||
}
|
||||
|
||||
private boolean m_91278_() {
|
||||
@@ -2011,6 +_,7 @@
|
||||
@@ -2053,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_91156_(ClientLevel p_91157_) {
|
||||
@@ -395,7 +365,7 @@
|
||||
ProgressScreen progressscreen = new ProgressScreen(true);
|
||||
progressscreen.m_6309_(Component.m_237115_("connect.joining"));
|
||||
this.m_91362_(progressscreen);
|
||||
@@ -2044,10 +_,12 @@
|
||||
@@ -2086,10 +_,12 @@
|
||||
IntegratedServer integratedserver = this.f_91007_;
|
||||
this.f_91007_ = null;
|
||||
this.f_91063_.m_109150_();
|
||||
@@ -408,7 +378,7 @@
|
||||
if (integratedserver != null) {
|
||||
this.f_91026_.m_6180_("waitForServer");
|
||||
|
||||
@@ -2061,6 +_,7 @@
|
||||
@@ -2103,6 +_,7 @@
|
||||
this.f_243981_.m_246151_();
|
||||
this.f_91065_.m_93089_();
|
||||
this.f_91010_ = false;
|
||||
@@ -416,7 +386,7 @@
|
||||
}
|
||||
|
||||
this.f_91073_ = null;
|
||||
@@ -2167,6 +_,7 @@
|
||||
@@ -2227,6 +_,7 @@
|
||||
|
||||
private void m_91280_() {
|
||||
if (this.f_91077_ != null && this.f_91077_.m_6662_() != HitResult.Type.MISS) {
|
||||
@@ -424,7 +394,7 @@
|
||||
boolean flag = this.f_91074_.m_150110_().f_35937_;
|
||||
BlockEntity blockentity = null;
|
||||
HitResult.Type hitresult$type = this.f_91077_.m_6662_();
|
||||
@@ -2179,10 +_,7 @@
|
||||
@@ -2239,10 +_,7 @@
|
||||
}
|
||||
|
||||
Block block = blockstate.m_60734_();
|
||||
@@ -436,7 +406,7 @@
|
||||
|
||||
if (flag && Screen.m_96637_() && blockstate.m_155947_()) {
|
||||
blockentity = this.f_91073_.m_7702_(blockpos);
|
||||
@@ -2193,7 +_,7 @@
|
||||
@@ -2253,7 +_,7 @@
|
||||
}
|
||||
|
||||
Entity entity = ((EntityHitResult)this.f_91077_).m_82443_();
|
||||
@@ -445,7 +415,7 @@
|
||||
if (itemstack == null) {
|
||||
return;
|
||||
}
|
||||
@@ -2732,6 +_,19 @@
|
||||
@@ -2788,6 +_,19 @@
|
||||
|
||||
public void m_91312_(int p_91313_) {
|
||||
this.f_91051_.m_119410_(p_91313_);
|
||||
|
||||
@@ -1,85 +1,75 @@
|
||||
--- a/net/minecraft/client/MouseHandler.java
|
||||
+++ b/net/minecraft/client/MouseHandler.java
|
||||
@@ -73,6 +_,7 @@
|
||||
@@ -74,6 +_,7 @@
|
||||
this.f_91510_ = -1;
|
||||
}
|
||||
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onMouseButtonPre(p_91532_, p_91533_, p_91534_)) return;
|
||||
+ if (net.minecraftforge.event.ForgeEventFactory.onMouseButtonPre(p_91532_, p_91533_, p_91534_)) return;
|
||||
boolean[] aboolean = new boolean[]{false};
|
||||
if (this.f_91503_.m_91265_() == null) {
|
||||
if (this.f_91503_.f_91080_ == null) {
|
||||
@@ -86,11 +_,19 @@
|
||||
@@ -87,11 +_,19 @@
|
||||
if (flag) {
|
||||
screen.m_169415_();
|
||||
Screen.m_96579_(() -> {
|
||||
- aboolean[0] = screen.m_6375_(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onScreenMouseClickedPre(screen, d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.event.ForgeEventFactory.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(screen, d0, d1, i, aboolean[0]);
|
||||
+ aboolean[0] = net.minecraftforge.event.ForgeEventFactory.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(screen, d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.event.ForgeEventFactory.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(screen, d0, d1, i, aboolean[0]);
|
||||
+ aboolean[0] = net.minecraftforge.event.ForgeEventFactory.onScreenMouseReleasedPost(screen, d0, d1, i, aboolean[0]);
|
||||
+ }
|
||||
}, "mouseReleased event handler", screen.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -114,19 +_,26 @@
|
||||
}
|
||||
@@ -116,6 +_,7 @@
|
||||
}
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onMouseButtonPost(p_91532_, p_91533_, p_91534_);
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onMouseButtonPost(p_91532_, p_91533_, p_91534_);
|
||||
}
|
||||
}
|
||||
|
||||
private void m_91526_(long p_91527_, double p_91528_, double p_91529_) {
|
||||
if (p_91527_ == Minecraft.m_91087_().m_91268_().m_85439_()) {
|
||||
- double d0 = (this.f_91503_.f_91066_.m_231821_().m_231551_() ? Math.signum(p_91529_) : p_91529_) * this.f_91503_.f_91066_.m_232122_().m_231551_();
|
||||
+ // FORGE: Allows for Horizontal Scroll to be recognized as Vertical Scroll - Fixes MC-121772
|
||||
+ double offset = p_91529_;
|
||||
+ if (Minecraft.f_91002_ && p_91529_ == 0) {
|
||||
+ offset = p_91528_;
|
||||
+ }
|
||||
+ double d0 = (this.f_91503_.f_91066_.m_231821_().m_231551_() ? Math.signum(offset) : offset) * this.f_91503_.f_91066_.m_232122_().m_231551_();
|
||||
if (this.f_91503_.m_91265_() == null) {
|
||||
@@ -129,8 +_,10 @@
|
||||
if (this.f_91503_.f_91080_ != null) {
|
||||
double d1 = this.f_91507_ * (double)this.f_91503_.m_91268_().m_85445_() / (double)this.f_91503_.m_91268_().m_85443_();
|
||||
double d2 = this.f_91508_ * (double)this.f_91503_.m_91268_().m_85446_() / (double)this.f_91503_.m_91268_().m_85444_();
|
||||
- this.f_91503_.f_91080_.m_6050_(d1, d2, d0);
|
||||
double d3 = this.f_91507_ * (double)this.f_91503_.m_91268_().m_85445_() / (double)this.f_91503_.m_91268_().m_85443_();
|
||||
double d4 = this.f_91508_ * (double)this.f_91503_.m_91268_().m_85446_() / (double)this.f_91503_.m_91268_().m_85444_();
|
||||
- this.f_91503_.f_91080_.m_6050_(d3, d4, d1, d2);
|
||||
this.f_91503_.f_91080_.m_169415_();
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onScreenMouseScrollPre(this, this.f_91503_.f_91080_, d0)) return;
|
||||
+ if (this.f_91503_.f_91080_.m_6050_(d1, d2, d0)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onScreenMouseScrollPost(this, this.f_91503_.f_91080_, d0);
|
||||
+ if (net.minecraftforge.event.ForgeEventFactory.onScreenMouseScrollPre(this.f_91503_.f_91080_, d3, d4, d1, d2)) return;
|
||||
+ if (this.f_91503_.f_91080_.m_6050_(d3, d4, d1, d2)) return;
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onScreenMouseScrollPost(this.f_91503_.f_91080_, d3, d4, d1, d2);
|
||||
} else if (this.f_91503_.f_91074_ != null) {
|
||||
if (this.f_91518_ != 0.0D && Math.signum(d0) != Math.signum(this.f_91518_)) {
|
||||
this.f_91518_ = 0.0D;
|
||||
@@ -139,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_91518_ -= (double)i;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onMouseScroll(this, d0)) return;
|
||||
if (this.f_291070_ != 0.0D && Math.signum(d1) != Math.signum(this.f_291070_)) {
|
||||
this.f_291070_ = 0.0D;
|
||||
@@ -151,6 +_,7 @@
|
||||
this.f_291070_ -= (double)j;
|
||||
this.f_291867_ -= (double)i;
|
||||
int k = i == 0 ? -j : i;
|
||||
+ if (net.minecraftforge.event.ForgeEventFactory.onMouseScroll(this, d1, d2)) 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_205380_(-i);
|
||||
@@ -207,7 +_,9 @@
|
||||
this.f_91503_.f_91065_.m_93085_().m_205380_(-k);
|
||||
@@ -219,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(screen, d0, d1, this.f_91510_, d2, d3)) return;
|
||||
+ if (net.minecraftforge.event.ForgeEventFactory.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(screen, d0, d1, this.f_91510_, d2, d3);
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onScreenMouseDragPost(screen, d0, d1, this.f_91510_, d2, d3);
|
||||
}, "mouseDragged event handler", screen.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
@@ -290,6 +_,14 @@
|
||||
@@ -302,6 +_,14 @@
|
||||
|
||||
public double m_91594_() {
|
||||
return this.f_91508_;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
--- a/net/minecraft/client/Options.java
|
||||
+++ b/net/minecraft/client/Options.java
|
||||
@@ -545,7 +_,8 @@
|
||||
@@ -507,7 +_,8 @@
|
||||
}, new OptionInstance.LazyEnum<>(() -> {
|
||||
return Stream.concat(Stream.of(""), Minecraft.m_91087_().m_91106_().m_194525_().stream()).toList();
|
||||
}, (p_232011_) -> {
|
||||
- return Minecraft.m_91087_().m_91396_() && p_232011_ != "" && !Minecraft.m_91087_().m_91106_().m_194525_().contains(p_232011_) ? Optional.empty() : Optional.of(p_232011_);
|
||||
+ // FORGE: fix incorrect string comparison - PR #8767
|
||||
+ return Minecraft.m_91087_().m_91396_() && (p_232011_ == null || !p_232011_.isEmpty()) && !Minecraft.m_91087_().m_91106_().m_194525_().contains(p_232011_) ? Optional.empty() : Optional.of(p_232011_);
|
||||
}, Codec.STRING), "", (p_275584_) -> {
|
||||
}, Codec.STRING), "", (p_299350_) -> {
|
||||
SoundManager soundmanager = Minecraft.m_91087_().m_91106_();
|
||||
soundmanager.m_194526_();
|
||||
@@ -869,6 +_,7 @@
|
||||
@@ -835,6 +_,7 @@
|
||||
}
|
||||
|
||||
public Options(Minecraft p_92138_, File p_92139_) {
|
||||
@@ -18,7 +18,7 @@
|
||||
this.f_92060_ = p_92138_;
|
||||
this.f_92110_ = new File(p_92139_, "options.txt");
|
||||
boolean flag = p_92138_.m_91103_();
|
||||
@@ -990,11 +_,21 @@
|
||||
@@ -957,11 +_,21 @@
|
||||
p_168428_.m_213982_("telemetryOptInExtra", this.f_260461_);
|
||||
this.f_263744_ = p_168428_.m_142682_("onboardAccessibility", this.f_263744_);
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1013,6 +_,9 @@
|
||||
@@ -980,6 +_,9 @@
|
||||
}
|
||||
|
||||
public void m_92140_() {
|
||||
@@ -52,7 +52,7 @@
|
||||
try {
|
||||
if (!this.f_92110_.exists()) {
|
||||
return;
|
||||
@@ -1041,7 +_,8 @@
|
||||
@@ -1008,7 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,15 +62,15 @@
|
||||
@Nullable
|
||||
private String m_168458_(String p_168459_) {
|
||||
return compoundtag1.m_128441_(p_168459_) ? compoundtag1.m_128461_(p_168459_) : null;
|
||||
@@ -1204,6 +_,7 @@
|
||||
@@ -1181,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_92172_() {
|
||||
+ if (net.minecraftforge.client.loading.ClientModLoader.isLoading()) return; //Don't save settings before mods add keybindigns and the like to prevent them from being deleted.
|
||||
if (this.f_92060_.f_91074_ != null) {
|
||||
int i = 0;
|
||||
|
||||
@@ -1268,6 +_,23 @@
|
||||
this.f_92060_.f_91074_.f_108617_.m_295327_(new ServerboundClientInformationPacket(this.m_294596_()));
|
||||
}
|
||||
@@ -1239,6 +_,23 @@
|
||||
}
|
||||
|
||||
p_92146_.m_10509_(set);
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
--- a/net/minecraft/client/User.java
|
||||
+++ b/net/minecraft/client/User.java
|
||||
@@ -21,8 +_,22 @@
|
||||
private final Optional<String> f_193796_;
|
||||
private final Optional<String> f_193797_;
|
||||
private final User.Type f_92538_;
|
||||
+ /** Forge: Cache of the local session's GameProfile properties. */
|
||||
+ private com.mojang.authlib.properties.PropertyMap properties;
|
||||
|
||||
public User(String p_193799_, String p_193800_, String p_193801_, Optional<String> p_193802_, Optional<String> p_193803_, User.Type p_193804_) {
|
||||
+ if (p_193799_ == null || p_193799_.isEmpty()) {
|
||||
+ p_193799_ = "MissingName";
|
||||
+ p_193800_ = p_193801_ = "NotValid";
|
||||
+ org.apache.logging.log4j.Logger logger = org.apache.logging.log4j.LogManager.getLogger(getClass().getName());
|
||||
+ logger.warn("=========================================================");
|
||||
+ logger.warn("WARNING!! the username was not set for this session, typically");
|
||||
+ logger.warn("this means you installed Forge incorrectly. We have set your");
|
||||
+ logger.warn("name to \"MissingName\" and your session to nothing. Please");
|
||||
+ logger.warn("check your installation and post a console log from the launcher");
|
||||
+ logger.warn("when asking for help!");
|
||||
+ logger.warn("=========================================================");
|
||||
+ }
|
||||
this.f_92535_ = p_193799_;
|
||||
this.f_92536_ = p_193800_;
|
||||
this.f_92537_ = p_193801_;
|
||||
@@ -64,8 +_,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ //For internal use only. Modders should never need to use this.
|
||||
+ public void setProperties(com.mojang.authlib.properties.PropertyMap properties) {
|
||||
+ if (this.properties == null)
|
||||
+ this.properties = properties;
|
||||
+ }
|
||||
+
|
||||
+ public boolean hasCachedProperties() {
|
||||
+ return properties != null;
|
||||
+ }
|
||||
+
|
||||
public GameProfile m_92548_() {
|
||||
- return new GameProfile(this.m_240411_(), this.m_92546_());
|
||||
+ // FORGE: Add cached GameProfile properties to returned GameProfile. This helps to cut down on calls to the session service.
|
||||
+ GameProfile ret = new GameProfile(this.m_240411_(), this.m_92546_());
|
||||
+ if (this.properties != null)
|
||||
+ ret.getProperties().putAll(this.properties);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
public User.Type m_168638_() {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/Gui.java
|
||||
+++ b/net/minecraft/client/gui/Gui.java
|
||||
@@ -424,6 +_,8 @@
|
||||
@@ -453,6 +_,8 @@
|
||||
|
||||
for(MobEffectInstance mobeffectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
|
||||
MobEffect mobeffect = mobeffectinstance.m_19544_();
|
||||
@@ -9,7 +9,7 @@
|
||||
if (mobeffectinstance.m_19575_()) {
|
||||
int i = this.f_92977_;
|
||||
int j = 1;
|
||||
@@ -452,6 +_,7 @@
|
||||
@@ -481,6 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.m_118732_(mobeffect);
|
||||
int i1 = j;
|
||||
float f1 = f;
|
||||
@@ -572,16 +_,21 @@
|
||||
@@ -601,16 +_,21 @@
|
||||
}
|
||||
|
||||
public void m_280295_(GuiGraphics p_283501_) {
|
||||
@@ -42,7 +42,7 @@
|
||||
if (!this.f_92986_.f_91072_.m_105205_()) {
|
||||
k += 14;
|
||||
}
|
||||
@@ -593,7 +_,13 @@
|
||||
@@ -622,7 +_,13 @@
|
||||
|
||||
if (l > 0) {
|
||||
p_283501_.m_280509_(j - 2, k - 2, j + i + 2, k + 9 + 2, this.f_92986_.f_91066_.m_92143_(0));
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1037,7 +_,7 @@
|
||||
@@ -1069,7 +_,7 @@
|
||||
ItemStack itemstack = this.f_92986_.f_91074_.m_150109_().m_36056_();
|
||||
if (itemstack.m_41619_()) {
|
||||
this.f_92993_ = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/GuiGraphics.java
|
||||
+++ b/net/minecraft/client/gui/GuiGraphics.java
|
||||
@@ -56,7 +_,7 @@
|
||||
@@ -55,7 +_,7 @@
|
||||
import org.joml.Vector2ic;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final float f_289044_ = 10000.0F;
|
||||
public static final float f_289038_ = -10000.0F;
|
||||
private static final int f_279564_ = 2;
|
||||
@@ -270,6 +_,11 @@
|
||||
@@ -271,6 +_,11 @@
|
||||
}
|
||||
|
||||
public int m_280056_(Font p_283343_, @Nullable String p_281896_, int p_283569_, int p_283418_, int p_281560_, boolean p_282130_) {
|
||||
@@ -21,7 +21,7 @@
|
||||
if (p_281896_ == null) {
|
||||
return 0;
|
||||
} else {
|
||||
@@ -284,6 +_,11 @@
|
||||
@@ -285,6 +_,11 @@
|
||||
}
|
||||
|
||||
public int m_280649_(Font p_282636_, FormattedCharSequence p_281596_, int p_281586_, int p_282816_, int p_281743_, boolean p_282394_) {
|
||||
@@ -33,27 +33,7 @@
|
||||
int i = p_282636_.m_272191_(p_281596_, (float)p_281586_, (float)p_282816_, p_281743_, p_282394_, this.f_279612_.m_85850_().m_252922_(), this.f_279627_, Font.DisplayMode.NORMAL, 0, 15728880);
|
||||
this.m_286081_();
|
||||
return i;
|
||||
@@ -405,6 +_,10 @@
|
||||
}
|
||||
|
||||
public void m_280543_(ResourceLocation p_283059_, int p_283575_, int p_283192_, int p_281790_, int p_283642_, int p_282691_, int p_281912_, int p_281728_, int p_282324_) {
|
||||
+ blitRepeating(p_283059_, p_283575_, p_283192_, p_281790_, p_283642_, p_282691_, p_281912_, p_281728_, p_282324_, 256, 256);
|
||||
+ }
|
||||
+
|
||||
+ public void blitRepeating(ResourceLocation p_283059_, int p_283575_, int p_283192_, int p_281790_, int p_283642_, int p_282691_, int p_281912_, int p_281728_, int p_282324_, int textureWidth, int textureHeight) {
|
||||
int i = p_283575_;
|
||||
|
||||
int j;
|
||||
@@ -417,7 +_,7 @@
|
||||
for(IntIterator intiterator1 = m_280358_(p_283642_, p_282324_); intiterator1.hasNext(); l += i1) {
|
||||
i1 = intiterator1.nextInt();
|
||||
int j1 = (p_282324_ - i1) / 2;
|
||||
- this.m_280218_(p_283059_, i, l, p_282691_ + k, p_281912_ + j1, j, i1);
|
||||
+ this.m_280163_(p_283059_, i, l, p_282691_ + k, p_281912_ + j1, j, i1, textureWidth, textureHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,6 +_,7 @@
|
||||
@@ -511,6 +_,7 @@
|
||||
crashreportcategory.m_128165_("Item Type", () -> {
|
||||
return String.valueOf((Object)p_281675_.m_41720_());
|
||||
});
|
||||
@@ -61,7 +41,7 @@
|
||||
crashreportcategory.m_128165_("Item Damage", () -> {
|
||||
return String.valueOf(p_281675_.m_41773_());
|
||||
});
|
||||
@@ -524,18 +_,26 @@
|
||||
@@ -558,18 +_,26 @@
|
||||
}
|
||||
|
||||
this.f_279612_.m_85849_();
|
||||
@@ -92,7 +72,7 @@
|
||||
this.m_280497_(p_283128_, list, p_283678_, p_281696_, DefaultTooltipPositioner.f_262752_);
|
||||
}
|
||||
|
||||
@@ -544,7 +_,15 @@
|
||||
@@ -578,7 +_,15 @@
|
||||
}
|
||||
|
||||
public void m_280666_(Font p_282739_, List<Component> p_281832_, int p_282191_, int p_282446_) {
|
||||
@@ -109,7 +89,7 @@
|
||||
}
|
||||
|
||||
public void m_280245_(Font p_282192_, List<? extends FormattedCharSequence> p_282297_, int p_281680_, int p_283325_) {
|
||||
@@ -557,11 +_,13 @@
|
||||
@@ -591,11 +_,13 @@
|
||||
|
||||
private void m_280497_(Font p_282675_, List<ClientTooltipComponent> p_282615_, int p_283230_, int p_283417_, ClientTooltipPositioner p_282442_) {
|
||||
if (!p_282615_.isEmpty()) {
|
||||
@@ -124,7 +104,7 @@
|
||||
if (k > i) {
|
||||
i = k;
|
||||
}
|
||||
@@ -571,20 +_,21 @@
|
||||
@@ -605,20 +_,21 @@
|
||||
|
||||
int i2 = i;
|
||||
int j2 = j;
|
||||
@@ -149,7 +129,7 @@
|
||||
k1 += clienttooltipcomponent1.m_142103_() + (l1 == 0 ? 2 : 0);
|
||||
}
|
||||
|
||||
@@ -592,7 +_,7 @@
|
||||
@@ -626,7 +_,7 @@
|
||||
|
||||
for(int k2 = 0; k2 < p_282615_.size(); ++k2) {
|
||||
ClientTooltipComponent clienttooltipcomponent2 = p_282615_.get(k2);
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/MapRenderer.java
|
||||
+++ b/net/minecraft/client/gui/MapRenderer.java
|
||||
@@ -118,6 +_,7 @@
|
||||
|
||||
for(MapDecoration mapdecoration : this.f_93280_.m_164811_()) {
|
||||
if (!p_93294_ || mapdecoration.m_77809_()) {
|
||||
+ if (mapdecoration.render(k)) { k++; continue; }
|
||||
p_93292_.m_85836_();
|
||||
p_93292_.m_252880_(0.0F + (float)mapdecoration.m_77804_() / 2.0F + 64.0F, 0.0F + (float)mapdecoration.m_77805_() / 2.0F + 64.0F, -0.02F);
|
||||
p_93292_.m_252781_(Axis.f_252403_.m_252977_((float)(mapdecoration.m_77806_() * 360) / 16.0F));
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/client/gui/components/AbstractButton.java
|
||||
+++ b/net/minecraft/client/gui/components/AbstractButton.java
|
||||
@@ -32,7 +_,7 @@
|
||||
@@ -29,7 +_,7 @@
|
||||
RenderSystem.enableDepthTest();
|
||||
p_281670_.m_280027_(f_93617_, this.m_252754_(), this.m_252907_(), this.m_5711_(), this.m_93694_(), 20, 4, 200, 20, 0, this.m_274533_());
|
||||
p_281670_.m_292816_(f_290895_.m_295557_(this.f_93623_, this.m_198029_()), this.m_252754_(), this.m_252907_(), this.m_5711_(), this.m_93694_());
|
||||
p_281670_.m_280246_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
- int i = this.f_93623_ ? 16777215 : 10526880;
|
||||
+ int i = getFGColor();
|
||||
this.m_280139_(p_281670_, minecraft.f_91062_, i | Mth.m_14167_(this.f_93625_ * 255.0F) << 24);
|
||||
this.m_280465_(p_281670_, minecraft.f_91062_, i | Mth.m_14167_(this.f_93625_ * 255.0F) << 24);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/components/AbstractSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/components/AbstractSelectionList.java
|
||||
@@ -514,6 +_,13 @@
|
||||
@@ -504,6 +_,13 @@
|
||||
return new ScreenRectangle(this.f_93393_, this.f_93390_, this.f_93392_ - this.f_93393_, this.f_93391_ - this.f_93390_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
--- a/net/minecraft/client/gui/components/AbstractWidget.java
|
||||
+++ b/net/minecraft/client/gui/components/AbstractWidget.java
|
||||
@@ -234,6 +_,10 @@
|
||||
this.f_93618_ = p_93675_;
|
||||
}
|
||||
|
||||
+ public void setHeight(int value) {
|
||||
+ this.f_93619_ = value;
|
||||
+ }
|
||||
+
|
||||
public void m_93650_(float p_93651_) {
|
||||
this.f_93625_ = p_93651_;
|
||||
}
|
||||
@@ -264,6 +_,19 @@
|
||||
|
||||
public void m_93692_(boolean p_93693_) {
|
||||
@@ -259,6 +_,19 @@
|
||||
this.f_93616_ = p_93693_;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ public static final int UNSET_FG_COLOR = -1;
|
||||
+ protected int packedFGColor = UNSET_FG_COLOR;
|
||||
+ public int getFGColor() {
|
||||
@@ -28,6 +15,8 @@
|
||||
+ }
|
||||
+ public void clearFGColor() {
|
||||
+ this.packedFGColor = UNSET_FG_COLOR;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
public NarratableEntry.NarrationPriority m_142684_() {
|
||||
if (this.m_93696_()) {
|
||||
return NarratableEntry.NarrationPriority.FOCUSED;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/components/BossHealthOverlay.java
|
||||
+++ b/net/minecraft/client/gui/components/BossHealthOverlay.java
|
||||
@@ -33,13 +_,16 @@
|
||||
@@ -36,13 +_,16 @@
|
||||
|
||||
for(LerpingBossEvent lerpingbossevent : this.f_93699_.values()) {
|
||||
int k = i / 2 - 91;
|
||||
|
||||
+14
-1
@@ -1,6 +1,19 @@
|
||||
--- a/net/minecraft/client/gui/components/DebugScreenOverlay.java
|
||||
+++ b/net/minecraft/client/gui/components/DebugScreenOverlay.java
|
||||
@@ -403,6 +_,7 @@
|
||||
@@ -93,9 +_,9 @@
|
||||
@Nullable
|
||||
private CompletableFuture<LevelChunk> f_94036_;
|
||||
private boolean f_291101_;
|
||||
- private boolean f_291871_;
|
||||
- private boolean f_290551_;
|
||||
- private boolean f_291005_;
|
||||
+ protected boolean f_291871_;
|
||||
+ protected boolean f_290551_;
|
||||
+ protected boolean f_291005_;
|
||||
private final SampleLogger f_291039_ = new SampleLogger();
|
||||
private final SampleLogger f_291524_ = new SampleLogger();
|
||||
private final SampleLogger f_290653_ = new SampleLogger();
|
||||
@@ -430,6 +_,7 @@
|
||||
list.add("");
|
||||
list.add(ChatFormatting.UNDERLINE + "Targeted Entity");
|
||||
list.add(String.valueOf((Object)BuiltInRegistries.f_256780_.m_7981_(entity.m_6095_())));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/ChatScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/ChatScreen.java
|
||||
@@ -225,7 +_,7 @@
|
||||
@@ -224,7 +_,7 @@
|
||||
this.f_96541_.f_91074_.f_108617_.m_246175_(p_242400_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/client/gui/screens/ConnectScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/ConnectScreen.java
|
||||
@@ -86,6 +_,8 @@
|
||||
@@ -84,6 +_,8 @@
|
||||
}
|
||||
|
||||
if (!optional.isPresent()) {
|
||||
if (optional.isEmpty()) {
|
||||
+ ConnectScreen.f_95683_.error("Couldn't connect to server: Unknown host \"{}\"", p_249536_.m_171863_());
|
||||
+ net.minecraftforge.network.DualStackUtils.logInitialPreferences();
|
||||
p_251955_.execute(() -> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/client/gui/screens/OptionsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/OptionsScreen.java
|
||||
@@ -151,6 +_,14 @@
|
||||
super.m_88315_(p_283520_, p_281826_, p_283378_, p_281975_);
|
||||
@@ -150,6 +_,14 @@
|
||||
p_283520_.m_280653_(this.f_96547_, this.f_96539_, this.f_96543_ / 2, 15, 16777215);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/screens/PauseScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/PauseScreen.java
|
||||
@@ -82,6 +_,7 @@
|
||||
@@ -88,6 +_,7 @@
|
||||
} else {
|
||||
gridlayout$rowhelper.m_264139_(this.m_262456_(f_262254_, SocialInteractionsScreen::new));
|
||||
}
|
||||
+ gridlayout$rowhelper.m_264108_(Button.m_253074_(Component.m_237115_("fml.menu.mods"), button -> this.f_96541_.m_91152_(new net.minecraftforge.client.gui.ModListScreen(this))).m_252780_(f_262268_).m_253136_(), 2);
|
||||
|
||||
Component component = this.f_96541_.m_91090_() ? f_262217_ : f_262246_;
|
||||
Component component = this.f_96541_.m_91090_() ? f_262217_ : CommonComponents.f_290546_;
|
||||
this.f_252482_ = gridlayout$rowhelper.m_264108_(Button.m_253074_(component, (p_280815_) -> {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/Screen.java
|
||||
+++ b/net/minecraft/client/gui/screens/Screen.java
|
||||
@@ -205,7 +_,7 @@
|
||||
@@ -207,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7379_() {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
protected <T extends GuiEventListener & Renderable & NarratableEntry> T m_142416_(T p_169406_) {
|
||||
@@ -317,7 +_,10 @@
|
||||
@@ -319,7 +_,10 @@
|
||||
this.f_96543_ = p_96608_;
|
||||
this.f_96544_ = p_96609_;
|
||||
if (!this.f_267454_) {
|
||||
@@ -20,7 +20,7 @@
|
||||
} else {
|
||||
this.m_267719_();
|
||||
}
|
||||
@@ -330,7 +_,10 @@
|
||||
@@ -332,7 +_,10 @@
|
||||
protected void m_232761_() {
|
||||
this.m_169413_();
|
||||
this.m_264131_();
|
||||
@@ -31,15 +31,15 @@
|
||||
}
|
||||
|
||||
public List<? extends GuiEventListener> m_6702_() {
|
||||
@@ -352,6 +_,7 @@
|
||||
public void m_280273_(GuiGraphics p_283688_) {
|
||||
@@ -354,6 +_,7 @@
|
||||
public void m_280273_(GuiGraphics p_283688_, int p_299421_, int p_298679_, float p_297268_) {
|
||||
if (this.f_96541_.f_91073_ != null) {
|
||||
p_283688_.m_280024_(0, 0, this.f_96543_, this.f_96544_, -1072689136, -804253680);
|
||||
this.m_293900_(p_283688_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.BackgroundRendered(this, p_283688_));
|
||||
} else {
|
||||
this.m_280039_(p_283688_);
|
||||
}
|
||||
@@ -363,6 +_,7 @@
|
||||
@@ -369,6 +_,7 @@
|
||||
int i = 32;
|
||||
p_282281_.m_280398_(f_279548_, 0, 0, 0, 0.0F, 0.0F, this.f_96543_, this.f_96544_, 32, 32);
|
||||
p_282281_.m_280246_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
public boolean m_7043_() {
|
||||
@@ -456,6 +_,10 @@
|
||||
@@ -462,6 +_,10 @@
|
||||
public void m_7400_(List<Path> p_96591_) {
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
private void m_169380_(long p_169381_, boolean p_169382_) {
|
||||
this.f_169377_ = Util.m_137550_() + p_169381_;
|
||||
if (p_169382_) {
|
||||
@@ -622,5 +_,13 @@
|
||||
@@ -628,5 +_,13 @@
|
||||
this.f_169421_ = p_169425_;
|
||||
this.f_169422_ = p_169426_;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/TitleScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/TitleScreen.java
|
||||
@@ -63,6 +_,7 @@
|
||||
@@ -64,6 +_,7 @@
|
||||
@Nullable
|
||||
private TitleScreen.WarningLabel f_232768_;
|
||||
private final LogoRenderer f_263781_;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public TitleScreen() {
|
||||
this(false);
|
||||
@@ -113,11 +_,15 @@
|
||||
@@ -114,11 +_,15 @@
|
||||
int j = this.f_96543_ - i - 2;
|
||||
int k = 24;
|
||||
int l = this.f_96544_ / 4 + 48;
|
||||
@@ -22,9 +22,9 @@
|
||||
}
|
||||
+ modUpdateNotification = net.minecraftforge.client.gui.TitleScreenModUpdateIndicator.init(this, modButton);
|
||||
|
||||
this.m_142416_(new ImageButton(this.f_96543_ / 2 - 124, l + 72 + 12, 20, 20, 0, 106, 20, Button.f_93617_, 256, 256, (p_280830_) -> {
|
||||
SpriteIconButton spriteiconbutton = this.m_142416_(CommonButtons.m_292713_(20, (p_280830_) -> {
|
||||
this.f_96541_.m_91152_(new LanguageSelectScreen(this, this.f_96541_.f_91066_, this.f_96541_.m_91102_()));
|
||||
@@ -162,7 +_,7 @@
|
||||
@@ -164,7 +_,7 @@
|
||||
}).m_252987_(this.f_96543_ / 2 - 100, p_96764_ + p_96765_ * 1, 200, 20).m_257505_(tooltip).m_253136_())).f_93623_ = flag;
|
||||
(this.m_142416_(Button.m_253074_(Component.m_237115_("menu.online"), (p_210872_) -> {
|
||||
this.m_96793_();
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -244,6 +_,7 @@
|
||||
@@ -248,6 +_,7 @@
|
||||
this.f_232768_.m_280409_(p_282860_, i);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if (this.f_96721_ != null) {
|
||||
this.f_96721_.m_280672_(p_282860_, this.f_96543_, this.f_96547_, i);
|
||||
}
|
||||
@@ -259,7 +_,14 @@
|
||||
@@ -263,7 +_,14 @@
|
||||
s = s + I18n.m_118938_("menu.modded");
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
for(GuiEventListener guieventlistener : this.m_6702_()) {
|
||||
if (guieventlistener instanceof AbstractWidget) {
|
||||
@@ -272,6 +_,7 @@
|
||||
@@ -276,6 +_,7 @@
|
||||
RenderSystem.enableDepthTest();
|
||||
this.f_96726_.m_88315_(p_282860_, p_281753_, p_283539_, p_282628_);
|
||||
}
|
||||
|
||||
+8
-8
@@ -1,18 +1,18 @@
|
||||
--- a/net/minecraft/client/gui/screens/advancements/AdvancementTab.java
|
||||
+++ b/net/minecraft/client/gui/screens/advancements/AdvancementTab.java
|
||||
@@ -36,6 +_,7 @@
|
||||
@@ -38,6 +_,7 @@
|
||||
private int f_97141_ = Integer.MIN_VALUE;
|
||||
private float f_97142_;
|
||||
private boolean f_97143_;
|
||||
+ private int page;
|
||||
|
||||
public AdvancementTab(Minecraft p_97145_, AdvancementsScreen p_97146_, AdvancementTabType p_97147_, int p_97148_, Advancement p_97149_, DisplayInfo p_97150_) {
|
||||
public AdvancementTab(Minecraft p_97145_, AdvancementsScreen p_97146_, AdvancementTabType p_97147_, int p_97148_, AdvancementNode p_297568_, DisplayInfo p_97150_) {
|
||||
this.f_97126_ = p_97145_;
|
||||
@@ -50,6 +_,15 @@
|
||||
this.m_97175_(this.f_97134_, p_97149_);
|
||||
@@ -52,6 +_,15 @@
|
||||
this.m_97175_(this.f_97134_, p_297568_.m_295246_());
|
||||
}
|
||||
|
||||
+ public AdvancementTab(Minecraft mc, AdvancementsScreen screen, AdvancementTabType type, int index, int page, Advancement adv, DisplayInfo info) {
|
||||
+ public AdvancementTab(Minecraft mc, AdvancementsScreen screen, AdvancementTabType type, int index, int page, AdvancementNode adv, DisplayInfo info) {
|
||||
+ this(mc, screen, type, index, adv, info);
|
||||
+ this.page = page;
|
||||
+ }
|
||||
@@ -24,14 +24,14 @@
|
||||
public AdvancementTabType m_169538_() {
|
||||
return this.f_97128_;
|
||||
}
|
||||
@@ -143,8 +_,8 @@
|
||||
@@ -146,8 +_,8 @@
|
||||
return null;
|
||||
} else {
|
||||
for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) {
|
||||
- if (p_97173_ < advancementtabtype.m_97210_()) {
|
||||
- return new AdvancementTab(p_97171_, p_97172_, advancementtabtype, p_97173_, p_97174_, p_97174_.m_138320_());
|
||||
- return new AdvancementTab(p_97171_, p_97172_, advancementtabtype, p_97173_, p_299876_, optional.get());
|
||||
+ if ((p_97173_ % AdvancementTabType.MAX_TABS) < advancementtabtype.m_97210_()) {
|
||||
+ return new AdvancementTab(p_97171_, p_97172_, advancementtabtype, p_97173_ % AdvancementTabType.MAX_TABS, p_97173_ / AdvancementTabType.MAX_TABS, p_97174_, p_97174_.m_138320_());
|
||||
+ return new AdvancementTab(p_97171_, p_97172_, advancementtabtype, p_97173_ % AdvancementTabType.MAX_TABS, p_97173_ / AdvancementTabType.MAX_TABS, p_299876_, optional.get());
|
||||
}
|
||||
|
||||
p_97173_ -= advancementtabtype.m_97210_();
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/screens/advancements/AdvancementTabType.java
|
||||
+++ b/net/minecraft/client/gui/screens/advancements/AdvancementTabType.java
|
||||
@@ -12,6 +_,7 @@
|
||||
LEFT(0, 64, 32, 28, 5),
|
||||
RIGHT(96, 64, 32, 28, 5);
|
||||
@@ -13,6 +_,7 @@
|
||||
LEFT(new AdvancementTabType.Sprites(new ResourceLocation("advancements/tab_left_top_selected"), new ResourceLocation("advancements/tab_left_middle_selected"), new ResourceLocation("advancements/tab_left_bottom_selected")), new AdvancementTabType.Sprites(new ResourceLocation("advancements/tab_left_top"), new ResourceLocation("advancements/tab_left_middle"), new ResourceLocation("advancements/tab_left_bottom")), 32, 28, 5),
|
||||
RIGHT(new AdvancementTabType.Sprites(new ResourceLocation("advancements/tab_right_top_selected"), new ResourceLocation("advancements/tab_right_middle_selected"), new ResourceLocation("advancements/tab_right_bottom_selected")), new AdvancementTabType.Sprites(new ResourceLocation("advancements/tab_right_top"), new ResourceLocation("advancements/tab_right_middle"), new ResourceLocation("advancements/tab_right_bottom")), 32, 28, 5);
|
||||
|
||||
+ public static final int MAX_TABS = java.util.Arrays.stream(values()).mapToInt(e -> e.f_97199_).sum();
|
||||
private final int f_97195_;
|
||||
private final int f_97196_;
|
||||
private final AdvancementTabType.Sprites f_291110_;
|
||||
private final AdvancementTabType.Sprites f_291777_;
|
||||
private final int f_97197_;
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/advancements/AdvancementsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/advancements/AdvancementsScreen.java
|
||||
@@ -41,6 +_,7 @@
|
||||
@@ -42,6 +_,7 @@
|
||||
@Nullable
|
||||
private AdvancementTab f_97336_;
|
||||
private boolean f_97337_;
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
public AdvancementsScreen(ClientAdvancements p_97340_) {
|
||||
super(GameNarrator.f_93310_);
|
||||
@@ -56,7 +_,15 @@
|
||||
@@ -58,7 +_,15 @@
|
||||
} else {
|
||||
this.f_97334_.m_104401_(this.f_97336_ == null ? null : this.f_97336_.m_97182_(), true);
|
||||
this.f_97334_.m_104401_(this.f_97336_ == null ? null : this.f_97336_.m_293004_().m_295246_(), true);
|
||||
}
|
||||
-
|
||||
+ if (this.f_97335_.size() > AdvancementTabType.MAX_TABS) {
|
||||
@@ -25,19 +25,19 @@
|
||||
}
|
||||
|
||||
public void m_7861_() {
|
||||
@@ -74,7 +_,7 @@
|
||||
@@ -76,7 +_,7 @@
|
||||
int j = (this.f_96544_ - 140) / 2;
|
||||
|
||||
for(AdvancementTab advancementtab : this.f_97335_.values()) {
|
||||
- if (advancementtab.m_97154_(i, j, p_97343_, p_97344_)) {
|
||||
+ if (advancementtab.getPage() == tabPage && advancementtab.m_97154_(i, j, p_97343_, p_97344_)) {
|
||||
this.f_97334_.m_104401_(advancementtab.m_97182_(), true);
|
||||
this.f_97334_.m_104401_(advancementtab.m_293004_().m_295246_(), true);
|
||||
break;
|
||||
}
|
||||
@@ -98,9 +_,15 @@
|
||||
@@ -100,9 +_,15 @@
|
||||
int i = (this.f_96543_ - 252) / 2;
|
||||
int j = (this.f_96544_ - 140) / 2;
|
||||
this.m_280273_(p_282589_);
|
||||
this.m_280273_(p_282589_, p_282255_, p_283354_, p_283123_);
|
||||
+ if (maxPages != 0) {
|
||||
+ net.minecraft.network.chat.Component page = Component.m_237113_(String.format("%d / %d", tabPage + 1, maxPages + 1));
|
||||
+ int width = this.f_96547_.m_92852_(page);
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
public boolean m_7979_(double p_97347_, double p_97348_, int p_97349_, double p_97350_, double p_97351_) {
|
||||
@@ -135,10 +_,12 @@
|
||||
@@ -146,10 +_,12 @@
|
||||
p_283395_.m_280218_(f_97329_, p_281890_, p_282532_, 0, 0, 252, 140);
|
||||
if (this.f_97335_.size() > 1) {
|
||||
for(AdvancementTab advancementtab : this.f_97335_.values()) {
|
||||
@@ -63,7 +63,7 @@
|
||||
advancementtab1.m_280485_(p_283395_, p_281890_, p_282532_);
|
||||
}
|
||||
}
|
||||
@@ -158,7 +_,7 @@
|
||||
@@ -169,7 +_,7 @@
|
||||
|
||||
if (this.f_97335_.size() > 1) {
|
||||
for(AdvancementTab advancementtab : this.f_97335_.values()) {
|
||||
|
||||
+14
-14
@@ -3,12 +3,12 @@
|
||||
@@ -90,6 +_,7 @@
|
||||
int i = this.f_97735_;
|
||||
int j = this.f_97736_;
|
||||
this.m_7286_(p_283479_, p_281886_, p_283661_, p_281248_);
|
||||
super.m_88315_(p_283479_, p_283661_, p_281248_, p_281886_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ContainerScreenEvent.Render.Background(this, p_283479_, p_283661_, p_281248_));
|
||||
RenderSystem.disableDepthTest();
|
||||
super.m_88315_(p_283479_, p_283661_, p_281248_, p_281886_);
|
||||
p_283479_.m_280168_().m_85836_();
|
||||
@@ -107,12 +_,13 @@
|
||||
p_283479_.m_280168_().m_252880_((float)i, (float)j, 0.0F);
|
||||
@@ -106,12 +_,13 @@
|
||||
int l = slot.f_40220_;
|
||||
int i1 = slot.f_40221_;
|
||||
if (this.f_97734_.m_280329_()) {
|
||||
@@ -23,7 +23,7 @@
|
||||
ItemStack itemstack = this.f_97711_.m_41619_() ? this.f_97732_.m_142621_() : this.f_97711_;
|
||||
if (!itemstack.m_41619_()) {
|
||||
int l1 = 8;
|
||||
@@ -149,13 +_,16 @@
|
||||
@@ -153,13 +_,16 @@
|
||||
}
|
||||
|
||||
public static void m_280359_(GuiGraphics p_283692_, int p_281453_, int p_281915_, int p_283504_) {
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -168,7 +_,8 @@
|
||||
@@ -172,7 +_,8 @@
|
||||
p_282567_.m_280168_().m_85836_();
|
||||
p_282567_.m_280168_().m_252880_(0.0F, 0.0F, 232.0F);
|
||||
p_282567_.m_280480_(p_281330_, p_281772_, p_281689_);
|
||||
@@ -52,7 +52,7 @@
|
||||
p_282567_.m_280168_().m_85849_();
|
||||
}
|
||||
|
||||
@@ -270,7 +_,8 @@
|
||||
@@ -274,7 +_,8 @@
|
||||
if (super.m_6375_(p_97748_, p_97749_, p_97750_)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -62,7 +62,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_;
|
||||
@@ -281,6 +_,7 @@
|
||||
@@ -285,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_);
|
||||
@@ -70,7 +70,7 @@
|
||||
int l = -1;
|
||||
if (slot != null) {
|
||||
l = slot.f_40219_;
|
||||
@@ -306,7 +_,7 @@
|
||||
@@ -310,7 +_,7 @@
|
||||
}
|
||||
} else if (!this.f_97738_) {
|
||||
if (this.f_97732_.m_142621_().m_41619_()) {
|
||||
@@ -79,7 +79,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));
|
||||
@@ -330,7 +_,7 @@
|
||||
@@ -334,7 +_,7 @@
|
||||
this.f_97717_ = 0;
|
||||
} else if (p_97750_ == 1) {
|
||||
this.f_97717_ = 1;
|
||||
@@ -88,7 +88,7 @@
|
||||
this.f_97717_ = 2;
|
||||
}
|
||||
}
|
||||
@@ -399,10 +_,13 @@
|
||||
@@ -403,10 +_,13 @@
|
||||
}
|
||||
|
||||
public boolean m_6348_(double p_97812_, double p_97813_, int p_97814_) {
|
||||
@@ -102,7 +102,7 @@
|
||||
int k = -1;
|
||||
if (slot != null) {
|
||||
k = slot.f_40219_;
|
||||
@@ -416,7 +_,7 @@
|
||||
@@ -420,7 +_,7 @@
|
||||
if (m_96638_()) {
|
||||
if (!this.f_97724_.m_41619_()) {
|
||||
for(Slot slot2 : this.f_97732_.f_38839_) {
|
||||
@@ -111,7 +111,7 @@
|
||||
this.m_6597_(slot2, slot2.f_40219_, p_97814_, ClickType.QUICK_MOVE);
|
||||
}
|
||||
}
|
||||
@@ -479,7 +_,7 @@
|
||||
@@ -483,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_()) {
|
||||
@@ -120,7 +120,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));
|
||||
@@ -526,34 +_,39 @@
|
||||
@@ -530,34 +_,39 @@
|
||||
}
|
||||
|
||||
public boolean m_7933_(int p_97765_, int p_97766_, int p_97767_) {
|
||||
@@ -167,7 +167,7 @@
|
||||
this.m_6597_(this.f_97734_, this.f_97734_.f_40219_, i, ClickType.SWAP);
|
||||
return true;
|
||||
}
|
||||
@@ -588,6 +_,18 @@
|
||||
@@ -592,6 +_,18 @@
|
||||
|
||||
public T m_6262_() {
|
||||
return this.f_97732_;
|
||||
|
||||
+31
-35
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java
|
||||
@@ -74,6 +_,8 @@
|
||||
@@ -79,6 +_,8 @@
|
||||
private boolean f_98515_;
|
||||
private final Set<TagKey<Item>> f_98516_ = new HashSet<>();
|
||||
private final boolean f_256872_;
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
public CreativeModeInventoryScreen(Player p_259788_, FeatureFlagSet p_260074_, boolean p_259569_) {
|
||||
super(new CreativeModeInventoryScreen.ItemPickerMenu(p_259788_), p_259788_.m_150109_(), CommonComponents.f_237098_);
|
||||
@@ -107,7 +_,7 @@
|
||||
@@ -112,7 +_,7 @@
|
||||
private void m_257687_(Collection<ItemStack> p_261591_) {
|
||||
int i = this.f_97732_.m_257485_(this.f_98508_);
|
||||
(this.f_97732_).f_98639_.clear();
|
||||
@@ -18,7 +18,7 @@
|
||||
this.m_98630_();
|
||||
} else {
|
||||
(this.f_97732_).f_98639_.addAll(p_261591_);
|
||||
@@ -263,6 +_,34 @@
|
||||
@@ -266,6 +_,34 @@
|
||||
protected void m_7856_() {
|
||||
if (this.f_96541_.f_91072_.m_105290_()) {
|
||||
super.m_7856_();
|
||||
@@ -53,7 +53,7 @@
|
||||
this.f_98510_ = new EditBox(this.f_96547_, this.f_97735_ + 82, this.f_97736_ + 6, 80, 9, Component.m_237115_("itemGroup.search"));
|
||||
this.f_98510_.m_94199_(50);
|
||||
this.f_98510_.m_94182_(false);
|
||||
@@ -308,7 +_,7 @@
|
||||
@@ -311,7 +_,7 @@
|
||||
public boolean m_5534_(char p_98521_, int p_98522_) {
|
||||
if (this.f_98514_) {
|
||||
return false;
|
||||
@@ -62,7 +62,7 @@
|
||||
return false;
|
||||
} else {
|
||||
String s = this.f_98510_.m_94155_();
|
||||
@@ -326,7 +_,7 @@
|
||||
@@ -329,7 +_,7 @@
|
||||
|
||||
public boolean m_7933_(int p_98547_, int p_98548_, int p_98549_) {
|
||||
this.f_98514_ = false;
|
||||
@@ -71,7 +71,7 @@
|
||||
if (this.f_96541_.f_91066_.f_92098_.m_90832_(p_98547_, p_98548_)) {
|
||||
this.f_98514_ = true;
|
||||
this.m_98560_(CreativeModeTabs.m_258007_());
|
||||
@@ -361,6 +_,7 @@
|
||||
@@ -364,6 +_,7 @@
|
||||
}
|
||||
|
||||
private void m_98630_() {
|
||||
@@ -79,7 +79,7 @@
|
||||
(this.f_97732_).f_98639_.clear();
|
||||
this.f_98516_.clear();
|
||||
String s = this.f_98510_.m_94155_();
|
||||
@@ -370,10 +_,10 @@
|
||||
@@ -373,10 +_,10 @@
|
||||
SearchTree<ItemStack> searchtree;
|
||||
if (s.startsWith("#")) {
|
||||
s = s.substring(1);
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
(this.f_97732_).f_98639_.addAll(searchtree.m_6293_(s.toLowerCase(Locale.ROOT)));
|
||||
@@ -405,7 +_,8 @@
|
||||
@@ -408,7 +_,8 @@
|
||||
|
||||
protected void m_280003_(GuiGraphics p_283168_, int p_281774_, int p_281466_) {
|
||||
if (f_98507_.m_40789_()) {
|
||||
@@ -102,7 +102,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -415,7 +_,7 @@
|
||||
@@ -418,7 +_,7 @@
|
||||
double d0 = p_98531_ - (double)this.f_97735_;
|
||||
double d1 = p_98532_ - (double)this.f_97736_;
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
if (this.m_98562_(creativemodetab, d0, d1)) {
|
||||
return true;
|
||||
}
|
||||
@@ -436,7 +_,7 @@
|
||||
@@ -439,7 +_,7 @@
|
||||
double d1 = p_98623_ - (double)this.f_97736_;
|
||||
this.f_98509_ = false;
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
if (this.m_98562_(creativemodetab, d0, d1)) {
|
||||
this.m_98560_(creativemodetab);
|
||||
return true;
|
||||
@@ -454,6 +_,7 @@
|
||||
@@ -457,6 +_,7 @@
|
||||
private void m_98560_(CreativeModeTab p_98561_) {
|
||||
CreativeModeTab creativemodetab = f_98507_;
|
||||
f_98507_ = p_98561_;
|
||||
@@ -128,7 +128,7 @@
|
||||
this.f_97737_.clear();
|
||||
(this.f_97732_).f_98639_.clear();
|
||||
this.m_238391_();
|
||||
@@ -530,13 +_,15 @@
|
||||
@@ -533,13 +_,15 @@
|
||||
this.f_98511_ = null;
|
||||
}
|
||||
|
||||
@@ -145,8 +145,8 @@
|
||||
|
||||
this.m_98630_();
|
||||
} else {
|
||||
@@ -593,7 +_,7 @@
|
||||
this.m_280273_(p_283000_);
|
||||
@@ -595,7 +_,7 @@
|
||||
public void m_88315_(GuiGraphics p_283000_, int p_281317_, int p_282770_, float p_281295_) {
|
||||
super.m_88315_(p_283000_, p_281317_, p_282770_, p_281295_);
|
||||
|
||||
- for(CreativeModeTab creativemodetab : CreativeModeTabs.m_257388_()) {
|
||||
@@ -154,7 +154,7 @@
|
||||
if (this.m_280537_(p_283000_, creativemodetab, p_281317_, p_282770_)) {
|
||||
break;
|
||||
}
|
||||
@@ -603,13 +_,22 @@
|
||||
@@ -605,13 +_,22 @@
|
||||
p_283000_.m_280557_(this.f_96547_, f_98506_, p_281317_, p_282770_);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
TooltipFlag.Default tooltipflag$default = this.f_96541_.f_91066_.f_92125_ ? TooltipFlag.Default.f_256730_ : TooltipFlag.Default.f_256752_;
|
||||
TooltipFlag tooltipflag = flag ? tooltipflag$default.m_257777_() : tooltipflag$default;
|
||||
List<Component> list = p_281769_.m_41651_(this.f_96541_.f_91074_, tooltipflag);
|
||||
@@ -629,7 +_,7 @@
|
||||
@@ -631,7 +_,7 @@
|
||||
int i = 1;
|
||||
|
||||
for(CreativeModeTab creativemodetab : CreativeModeTabs.m_257388_()) {
|
||||
@@ -187,7 +187,7 @@
|
||||
list1.add(i++, creativemodetab.m_40786_().m_6881_().m_130940_(ChatFormatting.BLUE));
|
||||
}
|
||||
}
|
||||
@@ -639,21 +_,22 @@
|
||||
@@ -641,13 +_,13 @@
|
||||
}
|
||||
|
||||
protected void m_7286_(GuiGraphics p_282663_, float p_282504_, int p_282089_, int p_282249_) {
|
||||
@@ -203,17 +203,15 @@
|
||||
this.f_98510_.m_88315_(p_282663_, p_282089_, p_282249_, p_282504_);
|
||||
int j = this.f_97735_ + 175;
|
||||
int k = this.f_97736_ + 18;
|
||||
int i = k + 112;
|
||||
if (f_98507_.m_40791_()) {
|
||||
- p_282663_.m_280218_(f_98504_, j, k + (int)((float)(i - k - 17) * this.f_98508_), 232 + (this.m_98631_() ? 0 : 12), 0, 12, 15);
|
||||
+ p_282663_.m_280218_(f_98507_.getTabsImage(), j, k + (int)((float)(i - k - 17) * this.f_98508_), 232 + (this.m_98631_() ? 0 : 12), 0, 12, 15);
|
||||
@@ -657,6 +_,7 @@
|
||||
p_282663_.m_292816_(resourcelocation, j, k + (int)((float)(i - k - 17) * this.f_98508_), 12, 15);
|
||||
}
|
||||
|
||||
+ if (currentPage.getVisibleTabs().contains(f_98507_)) //Forge: only display tab selection when the selected tab is on the current page
|
||||
this.m_280560_(p_282663_, f_98507_);
|
||||
if (f_98507_.m_257962_() == CreativeModeTab.Type.INVENTORY) {
|
||||
InventoryScreen.m_274545_(p_282663_, this.f_97735_ + 88, this.f_97736_ + 45, 20, (float)(this.f_97735_ + 88 - p_282089_), (float)(this.f_97736_ + 45 - 30 - p_282249_), this.f_96541_.f_91074_);
|
||||
@@ -662,7 +_,7 @@
|
||||
InventoryScreen.m_274545_(p_282663_, this.f_97735_ + 73, this.f_97736_ + 6, this.f_97735_ + 105, this.f_97736_ + 49, 20, 0.0625F, (float)p_282089_, (float)p_282249_, this.f_96541_.f_91074_);
|
||||
@@ -665,7 +_,7 @@
|
||||
}
|
||||
|
||||
private int m_258094_(CreativeModeTab p_260136_) {
|
||||
@@ -222,7 +220,7 @@
|
||||
int j = 27;
|
||||
int k = 27 * i;
|
||||
if (p_260136_.m_6563_()) {
|
||||
@@ -674,7 +_,7 @@
|
||||
@@ -677,7 +_,7 @@
|
||||
|
||||
private int m_257995_(CreativeModeTab p_260181_) {
|
||||
int i = 0;
|
||||
@@ -231,7 +229,7 @@
|
||||
i -= 32;
|
||||
} else {
|
||||
i += this.f_97727_;
|
||||
@@ -702,8 +_,8 @@
|
||||
@@ -705,8 +_,8 @@
|
||||
|
||||
protected void m_280560_(GuiGraphics p_283590_, CreativeModeTab p_283489_) {
|
||||
boolean flag = p_283489_ == f_98507_;
|
||||
@@ -239,20 +237,18 @@
|
||||
- int i = p_283489_.m_257903_();
|
||||
+ boolean flag1 = currentPage.isTop(p_283489_);
|
||||
+ int i = currentPage.getColumn(p_283489_);
|
||||
int j = i * 26;
|
||||
int k = 0;
|
||||
int l = this.f_97735_ + this.m_258094_(p_283489_);
|
||||
@@ -720,7 +_,8 @@
|
||||
i1 += this.f_97727_ - 4;
|
||||
int j = this.f_97735_ + this.m_258094_(p_283489_);
|
||||
int k = this.f_97736_ - (flag1 ? 28 : -(this.f_97727_ - 4));
|
||||
ResourceLocation[] aresourcelocation;
|
||||
@@ -716,6 +_,7 @@
|
||||
aresourcelocation = flag ? f_291557_ : f_291303_;
|
||||
}
|
||||
|
||||
- p_283590_.m_280218_(f_98504_, l, i1, j, k, 26, 32);
|
||||
+ com.mojang.blaze3d.systems.RenderSystem.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border.
|
||||
+ p_283590_.m_280218_(p_283489_.getTabsImage(), l, i1, j, k, 26, 32);
|
||||
p_283590_.m_292816_(aresourcelocation[Mth.m_14045_(i, 0, aresourcelocation.length)], j, k, 26, 32);
|
||||
p_283590_.m_280168_().m_85836_();
|
||||
p_283590_.m_280168_().m_252880_(0.0F, 0.0F, 100.0F);
|
||||
l += 5;
|
||||
@@ -763,6 +_,14 @@
|
||||
@@ -759,6 +_,14 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -267,7 +263,7 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static class CustomCreativeSlot extends Slot {
|
||||
public CustomCreativeSlot(Container p_98633_, int p_98634_, int p_98635_, int p_98636_) {
|
||||
@@ -930,6 +_,22 @@
|
||||
@@ -926,6 +_,22 @@
|
||||
|
||||
public boolean m_8010_(Player p_98665_) {
|
||||
return this.f_98655_.m_8010_(p_98665_);
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/EffectRenderingInventoryScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/EffectRenderingInventoryScreen.java
|
||||
@@ -41,12 +_,17 @@
|
||||
@@ -45,12 +_,17 @@
|
||||
Collection<MobEffectInstance> collection = this.f_96541_.f_91074_.m_21220_();
|
||||
if (!collection.isEmpty() && j >= 32) {
|
||||
boolean flag = j >= 120;
|
||||
@@ -19,7 +19,7 @@
|
||||
this.m_280172_(p_281945_, i, k, iterable, flag);
|
||||
this.m_280301_(p_281945_, i, k, iterable, flag);
|
||||
if (flag) {
|
||||
@@ -92,6 +_,11 @@
|
||||
@@ -96,6 +_,11 @@
|
||||
int i = this.f_97736_;
|
||||
|
||||
for(MobEffectInstance mobeffectinstance : p_282642_) {
|
||||
@@ -31,7 +31,7 @@
|
||||
MobEffect mobeffect = mobeffectinstance.m_19544_();
|
||||
TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.m_118732_(mobeffect);
|
||||
p_282745_.m_280159_(p_282521_ + (p_281536_ ? 6 : 7), i + 7, 0, 18, 18, textureatlassprite);
|
||||
@@ -104,6 +_,11 @@
|
||||
@@ -108,6 +_,11 @@
|
||||
int i = this.f_97736_;
|
||||
|
||||
for(MobEffectInstance mobeffectinstance : p_281986_) {
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java
|
||||
@@ -88,7 +_,7 @@
|
||||
@@ -93,7 +_,7 @@
|
||||
int l1 = 86 - this.f_96547_.m_92895_(s);
|
||||
FormattedText formattedtext = EnchantmentNames.m_98734_().m_98737_(this.f_96547_, l1);
|
||||
int i2 = 6839882;
|
||||
- if ((k < l + 1 || this.f_96541_.f_91074_.f_36078_ < k1) && !this.f_96541_.f_91074_.m_150110_().f_35937_) {
|
||||
+ if (((k < l + 1 || this.f_96541_.f_91074_.f_36078_ < k1) && !this.f_96541_.f_91074_.m_150110_().f_35937_) || this.f_97732_.f_39447_[l] == -1) { // Forge: render buttons as disabled when enchantable but enchantability not met on lower levels
|
||||
p_282430_.m_280218_(f_98747_, i1, j + 14 + 19 * l, 0, 185, 108, 19);
|
||||
p_282430_.m_280218_(f_98747_, i1 + 1, j + 15 + 19 * l, 16 * l, 239, 16, 16);
|
||||
p_282430_.m_292816_(f_291504_, i1, j + 14 + 19 * l, 108, 19);
|
||||
p_282430_.m_292816_(f_291094_[l], i1 + 1, j + 15 + 19 * l, 16, 16);
|
||||
p_282430_.m_280554_(this.f_96547_, formattedtext, j1, j + 16 + 19 * l, l1, (i2 & 16711422) >> 1);
|
||||
@@ -150,10 +_,13 @@
|
||||
@@ -154,10 +_,13 @@
|
||||
Enchantment enchantment = Enchantment.m_44697_((this.f_97732_).f_39447_[j]);
|
||||
int l = (this.f_97732_).f_39448_[j];
|
||||
int i1 = j + 1;
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/InventoryScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/InventoryScreen.java
|
||||
@@ -93,6 +_,13 @@
|
||||
public static void m_274545_(GuiGraphics p_282802_, int p_275688_, int p_275245_, int p_275535_, float p_275604_, float p_275546_, LivingEntity p_275689_) {
|
||||
float f = (float)Math.atan((double)(p_275604_ / 40.0F));
|
||||
float f1 = (float)Math.atan((double)(p_275546_ / 40.0F));
|
||||
+ // Forge: Allow passing in direct angle components instead of mouse position
|
||||
+ renderEntityInInventoryFollowsAngle(p_282802_, p_275688_, p_275245_, p_275535_, f, f1, p_275689_);
|
||||
+ }
|
||||
+
|
||||
+ public static void renderEntityInInventoryFollowsAngle(GuiGraphics p_282802_, int p_275688_, int p_275245_, int p_275535_, float angleXComponent, float angleYComponent, LivingEntity p_275689_) {
|
||||
+ float f = angleXComponent;
|
||||
+ float f1 = angleYComponent;
|
||||
Quaternionf quaternionf = (new Quaternionf()).rotateZ((float)Math.PI);
|
||||
Quaternionf quaternionf1 = (new Quaternionf()).rotateX(f1 * 20.0F * ((float)Math.PI / 180F));
|
||||
quaternionf.mul(quaternionf1);
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/MerchantScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/MerchantScreen.java
|
||||
@@ -229,7 +_,12 @@
|
||||
@@ -236,7 +_,12 @@
|
||||
p_281357_.m_280370_(this.f_96547_, p_283466_, p_282403_, p_283601_);
|
||||
} else {
|
||||
p_281357_.m_280302_(this.f_96547_, p_282046_, p_282403_, p_283601_, p_282046_.m_41613_() == 1 ? "1" : null);
|
||||
@@ -13,4 +13,4 @@
|
||||
+ p_281357_.m_280168_().m_85849_();
|
||||
p_281357_.m_280168_().m_85836_();
|
||||
p_281357_.m_280168_().m_252880_(0.0F, 0.0F, 300.0F);
|
||||
p_281357_.m_280398_(f_99113_, p_282403_ + 7, p_283601_ + 12, 0, 0.0F, 176.0F, 9, 2, 512, 256);
|
||||
p_281357_.m_295520_(f_291695_, p_282403_ + 7, p_283601_ + 12, 0, 9, 2);
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
@@ -283,6 +_,11 @@
|
||||
@@ -281,6 +_,11 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
@@ -318,6 +_,8 @@
|
||||
@@ -346,6 +_,8 @@
|
||||
this.f_99855_.m_99707_(list1);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.client.ForgeHooksClient.drawForgePingInfo(this.f_99855_, f_99857_, p_281406_, p_281363_, p_282921_, p_283596_, i1, j1);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.drawForgePingInfo(this.f_99855_, f_99857_, p_281406_, p_281363_, p_282921_, p_283596_, l, i1);
|
||||
+
|
||||
if (this.f_99856_.f_91066_.m_231828_().m_231551_() || p_282999_) {
|
||||
p_281406_.m_280509_(p_281363_, p_282921_, p_281363_ + 32, p_282921_ + 32, -1601138544);
|
||||
int k1 = p_283567_ - p_281363_;
|
||||
int j1 = p_283567_ - p_281363_;
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/packs/PackSelectionScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/packs/PackSelectionScreen.java
|
||||
@@ -130,10 +_,10 @@
|
||||
@@ -138,10 +_,10 @@
|
||||
TransferableSelectionList.PackEntry transferableselectionlist$packentry = p_100014_.m_93511_();
|
||||
String s = transferableselectionlist$packentry == null ? "" : transferableselectionlist$packentry.m_264411_();
|
||||
p_100014_.m_6987_((TransferableSelectionList.PackEntry)null);
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java
|
||||
+++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java
|
||||
@@ -104,7 +_,7 @@
|
||||
@@ -106,7 +_,7 @@
|
||||
this.m_5674_();
|
||||
this.f_100279_.clear();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
this.f_100279_.add(new RecipeBookTabButton(recipebookcategories));
|
||||
}
|
||||
|
||||
@@ -294,7 +_,7 @@
|
||||
@@ -309,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (itemstack != null && this.f_100272_.f_91080_ != null) {
|
||||
|
||||
+5
-5
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java
|
||||
@@ -120,6 +_,7 @@
|
||||
@@ -121,6 +_,7 @@
|
||||
public static void m_232896_(Minecraft p_232897_, @Nullable Screen p_232898_) {
|
||||
m_232899_(p_232897_, f_232866_);
|
||||
PackRepository packrepository = new PackRepository(new ServerPacksSource());
|
||||
PackRepository packrepository = new PackRepository(new ServerPacksSource(p_232897_.m_294312_()));
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.event.AddPackFindersEvent(net.minecraft.server.packs.PackType.SERVER_DATA, packrepository::addPackFinder));
|
||||
WorldLoader.InitConfig worldloader$initconfig = m_245574_(packrepository, WorldDataConfiguration.f_244649_);
|
||||
CompletableFuture<WorldCreationContext> completablefuture = WorldLoader.m_214362_(worldloader$initconfig, (p_247792_) -> {
|
||||
return new WorldLoader.DataLoadOutput<>(new CreateWorldScreen.DataPackReloadCookie(new WorldGenSettings(WorldOptions.m_247394_(), WorldPresets.m_246552_(p_247792_.f_244104_())), p_247792_.f_244127_()), p_247792_.f_243759_());
|
||||
@@ -367,7 +_,7 @@
|
||||
@@ -364,7 +_,7 @@
|
||||
if (p_269627_) {
|
||||
p_270552_.accept(this.f_267389_.m_267573_().f_243842_());
|
||||
} else {
|
||||
@@ -17,10 +17,10 @@
|
||||
}
|
||||
|
||||
}, Component.m_237115_("dataPack.validation.failed"), CommonComponents.f_237098_, Component.m_237115_("dataPack.validation.back"), Component.m_237115_("dataPack.validation.reset")));
|
||||
@@ -481,6 +_,7 @@
|
||||
@@ -478,6 +_,7 @@
|
||||
if (path != null) {
|
||||
if (this.f_100832_ == null) {
|
||||
this.f_100832_ = ServerPacksSource.m_245786_(path);
|
||||
this.f_100832_ = ServerPacksSource.m_245786_(path, this.f_291518_);
|
||||
+ net.minecraftforge.resource.ResourcePackLoader.loadResourcePacks(this.f_100832_, net.minecraftforge.server.ServerLifecycleHooks::buildPackFinder);
|
||||
this.f_100832_.m_10506_();
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java
|
||||
@@ -68,6 +_,7 @@
|
||||
@@ -74,6 +_,7 @@
|
||||
static final Logger f_101645_ = LogUtils.getLogger();
|
||||
static final DateFormat f_101646_ = new SimpleDateFormat();
|
||||
private static final ResourceLocation f_101647_ = new ResourceLocation("textures/misc/unknown_server.png");
|
||||
static final ResourceLocation f_101648_ = new ResourceLocation("textures/gui/world_selection.png");
|
||||
+ private static final ResourceLocation FORGE_EXPERIMENTAL_WARNING_ICON = new ResourceLocation("forge","textures/gui/experimental_warning.png");
|
||||
static final Component f_101649_ = Component.m_237115_("selectWorld.tooltip.fromNewerVersion1").m_130940_(ChatFormatting.RED);
|
||||
static final Component f_101650_ = Component.m_237115_("selectWorld.tooltip.fromNewerVersion2").m_130940_(ChatFormatting.RED);
|
||||
static final Component f_101651_ = Component.m_237115_("selectWorld.tooltip.snapshot1").m_130940_(ChatFormatting.GOLD);
|
||||
@@ -361,6 +_,7 @@
|
||||
@@ -362,6 +_,7 @@
|
||||
RenderSystem.enableBlend();
|
||||
p_281612_.m_280163_(this.f_101698_.m_289196_(), p_282820_, p_283181_, 0.0F, 0.0F, 32, 32, 32, 32);
|
||||
RenderSystem.disableBlend();
|
||||
@@ -16,7 +16,7 @@
|
||||
if (this.f_101693_.f_91066_.m_231828_().m_231551_() || p_283396_) {
|
||||
p_281612_.m_280509_(p_282820_, p_283181_, p_282820_ + 32, p_283181_ + 32, -1601138544);
|
||||
int j = p_283204_ - p_282820_;
|
||||
@@ -604,6 +_,19 @@
|
||||
@@ -608,6 +_,19 @@
|
||||
|
||||
public boolean m_214209_() {
|
||||
return !this.f_101695_.m_164916_();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/main/Main.java
|
||||
+++ b/net/minecraft/client/main/Main.java
|
||||
@@ -147,8 +_,8 @@
|
||||
@@ -150,8 +_,8 @@
|
||||
}
|
||||
|
||||
CrashReport.m_127529_();
|
||||
@@ -9,4 +9,4 @@
|
||||
+ net.minecraftforge.fml.loading.BackgroundWaiter.runAndTick(()->Bootstrap.m_135870_(), net.minecraftforge.fml.loading.FMLLoader.progressWindowTick);
|
||||
Bootstrap.m_135889_();
|
||||
Util.m_137584_();
|
||||
String s13 = optionspec25.value(optionset);
|
||||
String s12 = optionspec25.value(optionset);
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientChunkCache.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientChunkCache.java
|
||||
@@ -60,6 +_,7 @@
|
||||
int i = this.f_104410_.m_104481_(p_104456_, p_104457_);
|
||||
int i = this.f_104410_.m_104481_(p_298665_.f_45578_, p_298665_.f_45579_);
|
||||
LevelChunk levelchunk = this.f_104410_.m_104479_(i);
|
||||
if (m_104438_(levelchunk, p_104456_, p_104457_)) {
|
||||
if (m_104438_(levelchunk, p_298665_.f_45578_, p_298665_.f_45579_)) {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.level.ChunkEvent.Unload(levelchunk));
|
||||
this.f_104410_.m_104487_(i, levelchunk, (LevelChunk)null);
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java
|
||||
@@ -89,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_293213_(ClientboundCustomPayloadPacket p_298103_) {
|
||||
+ if (net.minecraftforge.network.NetworkHooks.onCustomPayload(p_298103_, this.f_290549_)) return;
|
||||
CustomPacketPayload custompacketpayload = p_298103_.f_291001_();
|
||||
if (!(custompacketpayload instanceof DiscardedPayload)) {
|
||||
PacketUtils.m_131363_(p_298103_, this, this.f_291812_);
|
||||
+10
-10
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java
|
||||
@@ -129,6 +_,7 @@
|
||||
@@ -133,6 +_,7 @@
|
||||
this.f_104521_.accept(Component.m_237115_("connect.joining"));
|
||||
this.f_104523_ = p_104547_.m_134774_();
|
||||
this.f_104522_.m_129498_(ConnectionProtocol.PLAY);
|
||||
GameProfile gameprofile = p_104547_.m_134774_();
|
||||
this.f_104522_.m_129512_(new ServerboundLoginAcknowledgedPacket());
|
||||
+ net.minecraftforge.network.NetworkHooks.handleClientLoginSuccess(this.f_104522_);
|
||||
this.f_104522_.m_129505_(new ClientPacketListener(this.f_104519_, this.f_104520_, this.f_104522_, this.f_243717_, this.f_104523_, this.f_104519_.m_261007_().m_285995_(this.f_260722_, this.f_260612_, this.f_285614_)));
|
||||
}
|
||||
|
||||
@@ -136,7 +_,7 @@
|
||||
if (this.f_104520_ != null && this.f_104520_ instanceof RealmsScreen) {
|
||||
this.f_104522_.m_129505_(new ClientConfigurationPacketListenerImpl(this.f_104519_, this.f_104522_, new CommonListenerCookie(gameprofile, this.f_104519_.m_261007_().m_285995_(this.f_260722_, this.f_260612_, this.f_285614_), ClientRegistryLayer.m_245874_().m_247579_(), FeatureFlags.f_244332_, (String)null, this.f_243717_, this.f_104520_)));
|
||||
this.f_104522_.m_129512_(new ServerboundCustomPayloadPacket(new BrandPayload(ClientBrandRetriever.getClientModName())));
|
||||
this.f_104522_.m_129512_(new ServerboundClientInformationPacket(this.f_104519_.f_91066_.m_294596_()));
|
||||
@@ -142,7 +_,7 @@
|
||||
if (this.f_243717_ != null && this.f_243717_.m_295074_()) {
|
||||
this.f_104519_.m_91152_(new DisconnectedRealmsScreen(this.f_104520_, CommonComponents.f_130661_, p_104543_));
|
||||
} else {
|
||||
- this.f_104519_.m_91152_(new DisconnectedScreen(this.f_104520_, CommonComponents.f_130661_, p_104543_));
|
||||
@@ -17,11 +17,11 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -157,6 +_,7 @@
|
||||
@@ -163,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7254_(ClientboundCustomQueryPacket p_104545_) {
|
||||
+ if (net.minecraftforge.network.NetworkHooks.onCustomPayload(p_104545_, this.f_104522_)) return;
|
||||
this.f_104521_.accept(Component.m_237115_("connect.negotiating"));
|
||||
this.f_104522_.m_129512_(new ServerboundCustomQueryPacket(p_104545_.m_134755_(), (FriendlyByteBuf)null));
|
||||
this.f_104522_.m_129512_(new ServerboundCustomQueryAnswerPacket(p_104545_.f_134745_(), (CustomQueryAnswerPayload)null));
|
||||
}
|
||||
@@ -33,7 +33,7 @@
|
||||
p_104640_.m_8119_();
|
||||
this.m_46473_().m_7238_();
|
||||
|
||||
@@ -327,8 +_,10 @@
|
||||
@@ -328,8 +_,10 @@
|
||||
}
|
||||
|
||||
private void m_104739_(int p_104740_, Entity p_104741_) {
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
public void m_171642_(int p_171643_, Entity.RemovalReason p_171644_) {
|
||||
@@ -455,6 +_,12 @@
|
||||
@@ -456,6 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_262808_(@Nullable Player p_263381_, double p_263372_, double p_263404_, double p_263365_, Holder<SoundEvent> p_263335_, SoundSource p_263417_, float p_263416_, float p_263349_, long p_263408_) {
|
||||
@@ -57,7 +57,7 @@
|
||||
if (p_263381_ == this.f_104565_.f_91074_) {
|
||||
this.m_233602_(p_263372_, p_263404_, p_263365_, p_263335_.m_203334_(), p_263417_, p_263416_, p_263349_, false, p_263408_);
|
||||
}
|
||||
@@ -462,6 +_,12 @@
|
||||
@@ -463,6 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_213890_(@Nullable Player p_263514_, Entity p_263536_, Holder<SoundEvent> p_263518_, SoundSource p_263487_, float p_263538_, float p_263524_, long p_263509_) {
|
||||
@@ -70,7 +70,7 @@
|
||||
if (p_263514_ == this.f_104565_.f_91074_) {
|
||||
this.f_104565_.m_91106_().m_120367_(new EntityBoundSoundInstance(p_263518_.m_203334_(), p_263487_, p_263538_, p_263524_, p_263536_, p_263509_));
|
||||
}
|
||||
@@ -899,6 +_,7 @@
|
||||
@@ -900,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_104851_(Difficulty p_104852_) {
|
||||
@@ -78,7 +78,7 @@
|
||||
this.f_104840_ = p_104852_;
|
||||
}
|
||||
|
||||
@@ -936,14 +_,46 @@
|
||||
@@ -937,14 +_,46 @@
|
||||
ClientLevel.this.f_104566_.add((AbstractClientPlayer)p_171712_);
|
||||
}
|
||||
|
||||
|
||||
+35
-53
@@ -1,91 +1,73 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientPacketListener.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientPacketListener.java
|
||||
@@ -412,6 +_,7 @@
|
||||
@@ -386,6 +_,7 @@
|
||||
|
||||
this.f_104888_.f_91064_.m_113434_();
|
||||
this.f_104888_.f_91074_.m_172530_();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerLogin(this.f_104888_.f_91072_, this.f_104888_.f_91074_, this.f_104888_.m_91403_().f_104885_);
|
||||
this.f_291812_.f_91064_.m_113434_();
|
||||
this.f_291812_.f_91074_.m_172530_();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerLogin(this.f_291812_.f_91072_, this.f_291812_.f_91074_, this.f_291812_.m_91403_().f_290549_);
|
||||
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_);
|
||||
@@ -425,6 +_,7 @@
|
||||
this.f_104888_.f_91074_.m_287199_(p_105030_.f_286971_());
|
||||
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_());
|
||||
+ net.minecraftforge.network.NetworkHooks.sendMCRegistryPackets(f_104885_, "PLAY_TO_SERVER");
|
||||
this.f_104888_.f_91066_.m_92172_();
|
||||
this.f_104885_.m_129512_(new ServerboundCustomPayloadPacket(ServerboundCustomPayloadPacket.f_133979_, (new FriendlyByteBuf(Unpooled.buffer())).m_130070_(ClientBrandRetriever.getClientModName())));
|
||||
this.f_291812_.f_91074_.m_20234_(i);
|
||||
this.f_104889_.m_104630_(i, this.f_291812_.f_91074_);
|
||||
@@ -400,6 +_,7 @@
|
||||
this.f_291812_.f_91074_.m_287199_(commonplayerspawninfo.f_291470_());
|
||||
this.f_291812_.f_91072_.m_171805_(commonplayerspawninfo.f_291098_(), commonplayerspawninfo.f_290730_());
|
||||
this.f_291812_.f_91066_.m_193770_(p_105030_.f_132370_());
|
||||
+ net.minecraftforge.network.NetworkHooks.sendMCRegistryPackets(f_290549_, "PLAY_TO_SERVER");
|
||||
this.f_252517_ = null;
|
||||
@@ -1069,8 +_,10 @@
|
||||
this.f_244346_ = new LastSeenMessagesTracker(20);
|
||||
this.f_244113_ = MessageSignatureCache.m_246587_();
|
||||
@@ -1026,7 +_,9 @@
|
||||
localplayer1.m_21204_().m_22159_(localplayer.m_21204_());
|
||||
}
|
||||
|
||||
+ localplayer1.updateSyncFields(localplayer); // Forge: fix MC-10657
|
||||
localplayer1.m_172530_();
|
||||
localplayer1.m_108748_(s);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerRespawn(this.f_104888_.f_91072_, localplayer, localplayer1, localplayer1.f_108617_.f_104885_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerRespawn(this.f_291812_.f_91072_, localplayer, localplayer1, localplayer1.f_108617_.f_290549_);
|
||||
this.f_104889_.m_104630_(i, localplayer1);
|
||||
localplayer1.m_146922_(-180.0F);
|
||||
localplayer1.f_108618_ = new KeyboardInput(this.f_104888_.f_91066_);
|
||||
@@ -1180,10 +_,7 @@
|
||||
PacketUtils.m_131363_(p_104976_, this, this.f_104888_);
|
||||
localplayer1.f_108618_ = new KeyboardInput(this.f_291812_.f_91066_);
|
||||
@@ -1135,10 +_,7 @@
|
||||
PacketUtils.m_131363_(p_104976_, this, this.f_291812_);
|
||||
BlockPos blockpos = p_104976_.m_131704_();
|
||||
this.f_104888_.f_91073_.m_141902_(blockpos, p_104976_.m_195645_()).ifPresent((p_205557_) -> {
|
||||
this.f_291812_.f_91073_.m_141902_(blockpos, p_104976_.m_195645_()).ifPresent((p_205557_) -> {
|
||||
- CompoundTag compoundtag = p_104976_.m_131708_();
|
||||
- if (compoundtag != null) {
|
||||
- p_205557_.m_142466_(compoundtag);
|
||||
- }
|
||||
+ p_205557_.onDataPacket(f_104885_, p_104976_);
|
||||
+ p_205557_.onDataPacket(f_290549_, p_104976_);
|
||||
|
||||
if (p_205557_ instanceof CommandBlockEntity && this.f_104888_.f_91080_ instanceof CommandBlockEditScreen) {
|
||||
((CommandBlockEditScreen)this.f_104888_.f_91080_).m_98398_();
|
||||
@@ -1329,7 +_,9 @@
|
||||
if (p_205557_ instanceof CommandBlockEntity && this.f_291812_.f_91080_ instanceof CommandBlockEditScreen) {
|
||||
((CommandBlockEditScreen)this.f_291812_.f_91080_).m_98398_();
|
||||
@@ -1286,7 +_,9 @@
|
||||
|
||||
public void m_7443_(ClientboundCommandsPacket p_104990_) {
|
||||
PacketUtils.m_131363_(p_104990_, this, this.f_104888_);
|
||||
- this.f_104899_ = new CommandDispatcher<>(p_104990_.m_237624_(CommandBuildContext.m_255418_(this.f_104903_.m_247579_(), this.f_244039_)));
|
||||
+ var context = CommandBuildContext.m_255418_(this.f_104903_.m_247579_(), this.f_244039_);
|
||||
PacketUtils.m_131363_(p_104990_, this, this.f_291812_);
|
||||
- this.f_104899_ = new CommandDispatcher<>(p_104990_.m_237624_(CommandBuildContext.m_255418_(this.f_104903_, this.f_244039_)));
|
||||
+ var context = CommandBuildContext.m_255418_(this.f_104903_, this.f_244039_);
|
||||
+ this.f_104899_ = new CommandDispatcher<>(p_104990_.m_237624_(context));
|
||||
+ this.f_104899_ = net.minecraftforge.client.ClientCommandHandler.mergeServerCommands(this.f_104899_, context);
|
||||
}
|
||||
|
||||
public void m_7183_(ClientboundStopSoundPacket p_105116_) {
|
||||
@@ -1348,6 +_,7 @@
|
||||
ClientRecipeBook clientrecipebook = this.f_104888_.f_91074_.m_108631_();
|
||||
clientrecipebook.m_266394_(this.f_104900_.m_44051_(), this.f_104888_.f_91073_.m_9598_());
|
||||
this.f_104888_.m_231374_(SearchRegistry.f_119943_, clientrecipebook.m_90639_());
|
||||
@@ -1304,6 +_,7 @@
|
||||
this.f_104900_.m_44024_(p_105132_.m_133644_());
|
||||
ClientRecipeBook clientrecipebook = this.f_291812_.f_91074_.m_108631_();
|
||||
clientrecipebook.m_266394_(this.f_104900_.m_44051_(), this.f_291812_.f_91073_.m_9598_());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(this.f_104900_);
|
||||
}
|
||||
|
||||
public void m_7244_(ClientboundPlayerLookAtPacket p_105054_) {
|
||||
@@ -1443,7 +_,8 @@
|
||||
@@ -1402,7 +_,8 @@
|
||||
Blocks.m_50758_();
|
||||
}
|
||||
|
||||
- CreativeModeTabs.m_258007_().m_257466_();
|
||||
+ CreativeModeTabs.m_257478_().stream().filter(net.minecraft.world.item.CreativeModeTab::hasSearchBar).forEach(net.minecraft.world.item.CreativeModeTab::m_257466_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(this.f_104903_.m_247579_(), true, f_104885_.m_129531_()));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(this.f_104903_, true, f_290549_.m_129531_()));
|
||||
}
|
||||
|
||||
public void m_241155_(ClientboundUpdateEnabledFeaturesPacket p_251591_) {
|
||||
@@ -1855,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7413_(ClientboundCustomPayloadPacket p_105004_) {
|
||||
+ if (net.minecraftforge.network.NetworkHooks.onCustomPayload(p_105004_, this.f_104885_)) return;
|
||||
PacketUtils.m_131363_(p_105004_, this, this.f_104888_);
|
||||
ResourceLocation resourcelocation = p_105004_.m_132042_();
|
||||
FriendlyByteBuf friendlybytebuf = null;
|
||||
@@ -2052,7 +_,7 @@
|
||||
int j5 = friendlybytebuf.m_130242_();
|
||||
this.f_104888_.f_91064_.f_173815_.m_173830_(positionsource, j5);
|
||||
} else {
|
||||
- f_104883_.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
|
||||
+ f_104883_.warn("Unknown custom packet identifier: {}", (Object)resourcelocation);
|
||||
}
|
||||
} finally {
|
||||
if (friendlybytebuf != null) {
|
||||
@@ -2399,6 +_,8 @@
|
||||
public void m_142234_(ClientboundPlayerCombatEndPacket p_171771_) {
|
||||
@@ -2095,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_246175_(String p_249888_) {
|
||||
@@ -94,7 +76,7 @@
|
||||
Instant instant = Instant.now();
|
||||
long i = Crypt.SaltSupplier.m_216113_();
|
||||
LastSeenMessagesTracker.Update lastseenmessagestracker$update = this.f_244346_.m_246442_();
|
||||
@@ -2407,6 +_,7 @@
|
||||
@@ -2103,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_246623_(String p_250092_) {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
});
|
||||
@@ -149,15 +_,19 @@
|
||||
if (this.f_105196_) {
|
||||
this.f_105190_.m_104955_(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK, this.f_105191_, p_105271_));
|
||||
this.f_105190_.m_295327_(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK, this.f_105191_, p_105271_));
|
||||
}
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.f_105189_.f_91074_, p_105270_, p_105271_, ServerboundPlayerActionPacket.Action.START_DESTROY_BLOCK);
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
@@ -382,6 +_,9 @@
|
||||
this.m_105297_();
|
||||
Vec3 vec3 = p_105233_.m_82450_().m_82492_(p_105232_.m_20185_(), p_105232_.m_20186_(), p_105232_.m_20189_());
|
||||
this.f_105190_.m_104955_(ServerboundInteractPacket.m_179612_(p_105232_, p_105231_.m_6144_(), p_105234_, vec3));
|
||||
this.f_105190_.m_295327_(ServerboundInteractPacket.m_179612_(p_105232_, p_105231_.m_6144_(), p_105234_, vec3));
|
||||
+ if (this.f_105197_ == GameType.SPECTATOR) return InteractionResult.PASS; // don't fire for spectators to match non-specific EntityInteract
|
||||
+ InteractionResult cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_105231_, p_105232_, p_105233_, p_105234_);
|
||||
+ if(cancelResult != null) return cancelResult;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/PlayerInfo.java
|
||||
+++ b/net/minecraft/client/multiplayer/PlayerInfo.java
|
||||
@@ -74,6 +_,7 @@
|
||||
@@ -89,6 +_,7 @@
|
||||
}
|
||||
|
||||
protected void m_105317_(GameType p_105318_) {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
+++ b/net/minecraft/client/multiplayer/ServerData.java
|
||||
@@ -32,6 +_,7 @@
|
||||
private byte[] f_271511_;
|
||||
private boolean f_105373_;
|
||||
private ServerData.Type f_291831_;
|
||||
private boolean f_242950_;
|
||||
+ public net.minecraftforge.client.ExtendedServerListData forgeData = null;
|
||||
|
||||
public ServerData(String p_105375_, String p_105376_, boolean p_105377_) {
|
||||
public ServerData(String p_105375_, String p_105376_, ServerData.Type p_297678_) {
|
||||
this.f_105362_ = p_105375_;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
+++ b/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
@@ -116,6 +_,7 @@
|
||||
@@ -105,6 +_,7 @@
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/chat/ChatListener.java
|
||||
+++ b/net/minecraft/client/multiplayer/chat/ChatListener.java
|
||||
@@ -104,7 +_,9 @@
|
||||
@@ -119,7 +_,9 @@
|
||||
Instant instant = Instant.now();
|
||||
this.m_246163_((MessageSignature)null, () -> {
|
||||
Component component = p_251256_.m_240977_(p_250375_);
|
||||
@@ -11,7 +11,7 @@
|
||||
this.m_241119_(p_251256_, p_250375_);
|
||||
this.m_240498_(component, instant);
|
||||
this.f_240659_ = Util.m_137550_();
|
||||
@@ -121,12 +_,16 @@
|
||||
@@ -136,12 +_,16 @@
|
||||
MessageSignature messagesignature = p_249430_.f_244279_();
|
||||
FilterMask filtermask = p_249430_.f_242992_();
|
||||
if (filtermask.m_243095_()) {
|
||||
@@ -30,7 +30,7 @@
|
||||
this.m_241119_(p_251766_, component);
|
||||
}
|
||||
}
|
||||
@@ -159,6 +_,8 @@
|
||||
@@ -174,6 +_,8 @@
|
||||
|
||||
public void m_240494_(Component p_240522_, boolean p_240642_) {
|
||||
if (!this.f_240348_.f_91066_.m_231833_().m_231551_() || !this.f_240348_.m_91246_(this.m_240473_(p_240522_))) {
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
public void m_107355_(BlockPos p_107356_, BlockState p_107357_) {
|
||||
- if (!p_107357_.m_60795_() && p_107357_.m_245147_()) {
|
||||
- if (!p_107357_.m_60795_() && p_107357_.m_295777_()) {
|
||||
+ if (!p_107357_.m_60795_() && !net.minecraftforge.client.extensions.common.IClientBlockExtensions.of(p_107357_).addDestroyEffects(p_107357_, this.f_107287_, p_107356_, this)) {
|
||||
VoxelShape voxelshape = p_107357_.m_60808_(this.f_107287_, p_107356_);
|
||||
double d0 = 0.25D;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public static class Provider implements ParticleProvider<BlockParticleOption> {
|
||||
public Particle m_6966_(BlockParticleOption p_108304_, ClientLevel p_108305_, double p_108306_, double p_108307_, double p_108308_, double p_108309_, double p_108310_, double p_108311_) {
|
||||
BlockState blockstate = p_108304_.m_123642_();
|
||||
- return !blockstate.m_60795_() && !blockstate.m_60713_(Blocks.f_50110_) ? new TerrainParticle(p_108305_, p_108306_, p_108307_, p_108308_, p_108309_, p_108310_, p_108311_, blockstate) : null;
|
||||
- return !blockstate.m_60795_() && !blockstate.m_60713_(Blocks.f_50110_) && blockstate.m_295777_() ? new TerrainParticle(p_108305_, p_108306_, p_108307_, p_108308_, p_108309_, p_108310_, p_108311_, blockstate) : null;
|
||||
+ return !blockstate.m_60795_() && !blockstate.m_60713_(Blocks.f_50110_) ? (new TerrainParticle(p_108305_, p_108306_, p_108307_, p_108308_, p_108309_, p_108310_, p_108311_, blockstate)).updateSprite(blockstate, p_108304_.getPos()) : null;
|
||||
}
|
||||
+ }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/AbstractClientPlayer.java
|
||||
+++ b/net/minecraft/client/player/AbstractClientPlayer.java
|
||||
@@ -147,6 +_,6 @@
|
||||
@@ -93,6 +_,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/LocalPlayer.java
|
||||
+++ b/net/minecraft/client/player/LocalPlayer.java
|
||||
@@ -151,6 +_,7 @@
|
||||
@@ -150,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean m_6469_(DamageSource p_108662_, float p_108663_) {
|
||||
@@ -8,15 +8,15 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -277,6 +_,7 @@
|
||||
@@ -276,6 +_,7 @@
|
||||
|
||||
public boolean m_108700_(boolean p_108701_) {
|
||||
ServerboundPlayerActionPacket.Action serverboundplayeractionpacket$action = p_108701_ ? ServerboundPlayerActionPacket.Action.DROP_ALL_ITEMS : ServerboundPlayerActionPacket.Action.DROP_ITEM;
|
||||
+ if (m_6117_() && m_7655_() == InteractionHand.MAIN_HAND && (p_108701_ || m_21211_().m_41613_() == 1)) m_5810_(); // Forge: fix MC-231097 on the clientside
|
||||
ItemStack itemstack = this.m_150109_().m_182403_(p_108701_);
|
||||
this.f_108617_.m_104955_(new ServerboundPlayerActionPacket(serverboundplayeractionpacket$action, BlockPos.f_121853_, Direction.DOWN));
|
||||
this.f_108617_.m_295327_(new ServerboundPlayerActionPacket(serverboundplayeractionpacket$action, BlockPos.f_121853_, Direction.DOWN));
|
||||
return !itemstack.m_41619_();
|
||||
@@ -459,7 +_,14 @@
|
||||
@@ -457,7 +_,14 @@
|
||||
}
|
||||
|
||||
public void m_5496_(SoundEvent p_108651_, float p_108652_, float p_108653_) {
|
||||
@@ -32,15 +32,15 @@
|
||||
}
|
||||
|
||||
public void m_6330_(SoundEvent p_108655_, SoundSource p_108656_, float p_108657_, float p_108658_) {
|
||||
@@ -633,6 +_,7 @@
|
||||
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));
|
||||
@@ -631,6 +_,7 @@
|
||||
this.f_108601_ = !this.m_150110_().f_35935_ && !this.m_6069_() && !this.m_20159_() && this.m_295652_(Pose.CROUCHING) && (this.m_6144_() || !this.m_5803_() && !this.m_295652_(Pose.STANDING));
|
||||
float f = Mth.m_14036_(0.3F + EnchantmentHelper.m_220302_(this), 0.0F, 1.0F);
|
||||
this.f_108618_.m_214106_(this.m_108635_(), f);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onMovementInputUpdate(this, this.f_108618_);
|
||||
this.f_108619_.m_91301_().m_120586_(this.f_108618_);
|
||||
if (this.m_6117_() && !this.m_20159_()) {
|
||||
this.f_108618_.f_108566_ *= 0.2F;
|
||||
@@ -661,7 +_,7 @@
|
||||
@@ -659,7 +_,7 @@
|
||||
boolean flag4 = this.m_264082_();
|
||||
boolean flag5 = this.m_20159_() ? this.m_20202_().m_20096_() : this.m_20096_();
|
||||
boolean flag6 = !flag1 && !flag2;
|
||||
@@ -49,7 +49,7 @@
|
||||
if (this.f_108583_ <= 0 && !this.f_108619_.f_91066_.f_92091_.m_90857_()) {
|
||||
this.f_108583_ = 7;
|
||||
} else {
|
||||
@@ -669,15 +_,15 @@
|
||||
@@ -667,15 +_,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@
|
||||
this.m_6858_(false);
|
||||
}
|
||||
} else if (flag8) {
|
||||
@@ -707,14 +_,15 @@
|
||||
@@ -705,14 +_,15 @@
|
||||
|
||||
if (this.f_108618_.f_108572_ && !flag9 && !flag && !this.m_150110_().f_35935_ && !this.m_20159_() && !this.m_6147_()) {
|
||||
ItemStack itemstack = this.m_6844_(EquipmentSlot.CHEST);
|
||||
- if (itemstack.m_150930_(Items.f_42741_) && ElytraItem.m_41140_(itemstack) && this.m_36319_()) {
|
||||
+ if (itemstack.canElytraFly(this) && this.m_36319_()) {
|
||||
this.f_108617_.m_104955_(new ServerboundPlayerCommandPacket(this, ServerboundPlayerCommandPacket.Action.START_FALL_FLYING));
|
||||
this.f_108617_.m_295327_(new ServerboundPlayerCommandPacket(this, ServerboundPlayerCommandPacket.Action.START_FALL_FLYING));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
|
||||
if (this.m_204029_(FluidTags.f_13131_)) {
|
||||
@@ -814,6 +_,7 @@
|
||||
@@ -812,6 +_,7 @@
|
||||
|
||||
public void m_6083_() {
|
||||
super.m_6083_();
|
||||
@@ -95,7 +95,7 @@
|
||||
this.f_108611_ = false;
|
||||
Entity entity = this.m_275832_();
|
||||
if (entity instanceof Boat boat) {
|
||||
@@ -1046,6 +_,18 @@
|
||||
@@ -1044,6 +_,18 @@
|
||||
} else {
|
||||
return super.m_7398_(p_108758_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/RemotePlayer.java
|
||||
+++ b/net/minecraft/client/player/RemotePlayer.java
|
||||
@@ -32,6 +_,7 @@
|
||||
@@ -31,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean m_6469_(DamageSource p_108772_, float p_108773_) {
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -907,12 +_,12 @@
|
||||
@@ -908,12 +_,12 @@
|
||||
|
||||
Window window = this.f_109059_.m_91268_();
|
||||
RenderSystem.clear(256, Minecraft.f_91002_);
|
||||
@@ -90,16 +90,16 @@
|
||||
RenderSystem.applyModelViewMatrix();
|
||||
Lighting.m_84931_();
|
||||
GuiGraphics guigraphics = new GuiGraphics(this.f_109059_, this.f_109064_.m_110104_());
|
||||
@@ -948,7 +_,7 @@
|
||||
@@ -949,7 +_,7 @@
|
||||
}
|
||||
} else if (this.f_109059_.f_91080_ != null) {
|
||||
} else if (flag && this.f_109059_.f_91080_ != null) {
|
||||
try {
|
||||
- this.f_109059_.f_91080_.m_280264_(guigraphics, i, j, this.f_109059_.m_91297_());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.f_109059_.f_91080_, guigraphics, i, j, this.f_109059_.m_91297_());
|
||||
} catch (Throwable throwable1) {
|
||||
CrashReport crashreport1 = CrashReport.m_127521_(throwable1, "Rendering screen");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.m_127514_("Screen render details");
|
||||
@@ -1099,12 +_,19 @@
|
||||
@@ -1103,12 +_,19 @@
|
||||
Matrix4f matrix4f = posestack.m_85850_().m_252922_();
|
||||
this.m_252879_(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_);
|
||||
@@ -115,7 +115,7 @@
|
||||
this.f_109059_.f_91060_.m_253210_(p_109092_, camera.m_90583_(), this.m_253088_(Math.max(d0, (double)this.f_109059_.f_91066_.m_231837_().m_231551_().intValue())));
|
||||
this.f_109059_.f_91060_.m_109599_(p_109092_, p_109090_, p_109091_, flag, camera, this, this.f_109074_, matrix4f);
|
||||
+ this.f_109059_.m_91307_().m_6182_("forge_render_last");
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_LEVEL, this.f_109059_.f_91060_, posestack, matrix4f, this.f_109059_.f_91060_.getTicks(), camera, this.f_109059_.f_91060_.getFrustum());
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_LEVEL.dispatch(this.f_109059_.f_91060_, posestack, matrix4f, this.f_109059_.f_91060_.getTicks(), camera, this.f_109059_.f_91060_.getFrustum());
|
||||
this.f_109059_.m_91307_().m_6182_("hand");
|
||||
if (this.f_109070_) {
|
||||
RenderSystem.clear(256, Minecraft.f_91002_);
|
||||
@@ -5,18 +5,18 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ItemBlockRenderTypes {
|
||||
+ @Deprecated
|
||||
private static final Map<Block, RenderType> f_109275_ = Util.m_137469_(Maps.newHashMap(), (p_277225_) -> {
|
||||
private static final Map<Block, RenderType> f_109275_ = Util.m_137469_(Maps.newHashMap(), (p_296246_) -> {
|
||||
RenderType rendertype = RenderType.m_110503_();
|
||||
p_277225_.put(Blocks.f_50267_, rendertype);
|
||||
@@ -310,6 +_,7 @@
|
||||
p_277225_.put(Blocks.f_50628_, rendertype3);
|
||||
p_277225_.put(Blocks.f_152498_, rendertype3);
|
||||
p_296246_.put(Blocks.f_50267_, rendertype);
|
||||
@@ -309,6 +_,7 @@
|
||||
p_296246_.put(Blocks.f_50628_, rendertype3);
|
||||
p_296246_.put(Blocks.f_152498_, rendertype3);
|
||||
});
|
||||
+ @Deprecated
|
||||
private static final Map<Fluid, RenderType> f_109276_ = Util.m_137469_(Maps.newHashMap(), (p_109290_) -> {
|
||||
RenderType rendertype = RenderType.m_110466_();
|
||||
p_109290_.put(Fluids.f_76192_, rendertype);
|
||||
@@ -317,6 +_,8 @@
|
||||
@@ -316,6 +_,8 @@
|
||||
});
|
||||
private static boolean f_109277_;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
public static RenderType m_109282_(BlockState p_109283_) {
|
||||
Block block = p_109283_.m_60734_();
|
||||
if (block instanceof LeavesBlock) {
|
||||
@@ -327,6 +_,8 @@
|
||||
@@ -326,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
public static RenderType m_109293_(BlockState p_109294_) {
|
||||
Block block = p_109294_.m_60734_();
|
||||
if (block instanceof LeavesBlock) {
|
||||
@@ -341,6 +_,8 @@
|
||||
@@ -340,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
public static RenderType m_109284_(BlockState p_109285_, boolean p_109286_) {
|
||||
RenderType rendertype = m_109282_(p_109285_);
|
||||
if (rendertype == RenderType.m_110466_()) {
|
||||
@@ -354,6 +_,8 @@
|
||||
@@ -353,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
public static RenderType m_109279_(ItemStack p_109280_, boolean p_109281_) {
|
||||
Item item = p_109280_.m_41720_();
|
||||
if (item instanceof BlockItem) {
|
||||
@@ -365,8 +_,73 @@
|
||||
@@ -364,8 +_,73 @@
|
||||
}
|
||||
|
||||
public static RenderType m_109287_(FluidState p_109288_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/ItemInHandRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/ItemInHandRenderer.java
|
||||
@@ -313,12 +_,14 @@
|
||||
@@ -310,12 +_,14 @@
|
||||
if (iteminhandrenderer$handrenderselection.f_172921_) {
|
||||
float f4 = interactionhand == InteractionHand.MAIN_HAND ? f : 0.0F;
|
||||
float f5 = 1.0F - Mth.m_14179_(p_109315_, this.f_109303_, this.f_109302_);
|
||||
@@ -15,7 +15,7 @@
|
||||
this.m_109371_(p_109318_, p_109315_, f1, InteractionHand.OFF_HAND, f6, this.f_109301_, f7, p_109316_, p_109317_, p_109319_);
|
||||
}
|
||||
|
||||
@@ -369,7 +_,7 @@
|
||||
@@ -366,7 +_,7 @@
|
||||
} else {
|
||||
this.m_109353_(p_109379_, p_109380_, p_109381_, p_109378_, humanoidarm, p_109376_, p_109377_);
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
boolean flag1 = CrossbowItem.m_40932_(p_109377_);
|
||||
boolean flag2 = humanoidarm == HumanoidArm.RIGHT;
|
||||
int i = flag2 ? 1 : -1;
|
||||
@@ -411,6 +_,7 @@
|
||||
@@ -408,6 +_,7 @@
|
||||
this.m_269530_(p_109372_, p_109377_, flag2 ? ItemDisplayContext.FIRST_PERSON_RIGHT_HAND : ItemDisplayContext.FIRST_PERSON_LEFT_HAND, !flag2, p_109379_, p_109380_, p_109381_);
|
||||
} else {
|
||||
boolean flag3 = humanoidarm == HumanoidArm.RIGHT;
|
||||
@@ -32,7 +32,7 @@
|
||||
if (p_109372_.m_6117_() && p_109372_.m_21212_() > 0 && p_109372_.m_7655_() == p_109375_) {
|
||||
int k = flag3 ? 1 : -1;
|
||||
switch (p_109377_.m_41780_()) {
|
||||
@@ -517,8 +_,16 @@
|
||||
@@ -514,8 +_,16 @@
|
||||
this.f_109304_ = Mth.m_14036_(this.f_109304_ - 0.4F, 0.0F, 1.0F);
|
||||
} else {
|
||||
float f = localplayer.m_36403_(1.0F);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/LevelRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/LevelRenderer.java
|
||||
@@ -267,6 +_,8 @@
|
||||
@@ -245,6 +_,8 @@
|
||||
}
|
||||
|
||||
private void m_109703_(LightTexture p_109704_, float p_109705_, double p_109706_, double p_109707_, double p_109708_) {
|
||||
@@ -9,7 +9,7 @@
|
||||
float f = this.f_109461_.f_91073_.m_46722_(p_109705_);
|
||||
if (!(f <= 0.0F)) {
|
||||
p_109704_.m_109896_();
|
||||
@@ -386,6 +_,8 @@
|
||||
@@ -364,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_109693_(Camera p_109694_) {
|
||||
@@ -18,7 +18,7 @@
|
||||
float f = this.f_109461_.f_91073_.m_46722_(1.0F) / (Minecraft.m_91405_() ? 1.0F : 2.0F);
|
||||
if (!(f <= 0.0F)) {
|
||||
RandomSource randomsource = RandomSource.m_216335_((long)this.f_109477_ * 312987231L);
|
||||
@@ -1145,11 +_,13 @@
|
||||
@@ -888,11 +_,13 @@
|
||||
RenderSystem.clear(16640, Minecraft.f_91002_);
|
||||
float f = p_109605_.m_109152_();
|
||||
boolean flag1 = 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_();
|
||||
@@ -28,30 +28,30 @@
|
||||
this.m_202423_(p_109600_, p_254120_, p_109601_, p_109604_, flag1, () -> {
|
||||
FogRenderer.m_234172_(p_109604_, FogRenderer.FogMode.FOG_SKY, f, flag1, p_109601_);
|
||||
});
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_SKY, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_SKY.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
profilerfiller.m_6182_("fog");
|
||||
FogRenderer.m_234172_(p_109604_, FogRenderer.FogMode.FOG_TERRAIN, Math.max(f, 32.0F), flag1, p_109601_);
|
||||
profilerfiller.m_6182_("terrain_setup");
|
||||
@@ -1158,7 +_,9 @@
|
||||
@@ -901,7 +_,9 @@
|
||||
this.m_194370_(p_109604_);
|
||||
profilerfiller.m_6182_("terrain");
|
||||
this.m_172993_(RenderType.m_110451_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
this.m_293111_(RenderType.m_110451_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
+ this.f_109461_.m_91304_().m_119428_(TextureAtlas.f_118259_).setBlurMipmap(false, this.f_109461_.f_91066_.m_232119_().m_231551_() > 0); // FORGE: fix flickering leaves when mods mess up the blurMipmap settings
|
||||
this.m_172993_(RenderType.m_110457_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
this.m_293111_(RenderType.m_110457_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
+ this.f_109461_.m_91304_().m_119428_(TextureAtlas.f_118259_).restoreLastBlurMipmap();
|
||||
this.m_172993_(RenderType.m_110463_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
this.m_293111_(RenderType.m_110463_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
if (this.f_109465_.m_104583_().m_108885_()) {
|
||||
Lighting.m_252995_(p_109600_.m_85850_().m_252922_());
|
||||
@@ -1190,7 +_,7 @@
|
||||
@@ -933,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_)) {
|
||||
BlockPos blockpos = entity.m_20183_();
|
||||
- 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
|
||||
- if ((this.f_109465_.m_151562_(blockpos.m_123342_()) || this.m_292727_(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_292727_(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_();
|
||||
@@ -1206,6 +_,9 @@
|
||||
@@ -949,6 +_,9 @@
|
||||
int i = entity.m_19876_();
|
||||
outlinebuffersource.m_109929_(FastColor.ARGB32.m_13665_(i), FastColor.ARGB32.m_13667_(i), FastColor.ARGB32.m_13669_(i), 255);
|
||||
} else {
|
||||
@@ -61,22 +61,22 @@
|
||||
multibuffersource = multibuffersource$buffersource;
|
||||
}
|
||||
|
||||
@@ -1220,12 +_,14 @@
|
||||
@@ -963,12 +_,14 @@
|
||||
multibuffersource$buffersource.m_109912_(RenderType.m_110452_(TextureAtlas.f_118259_));
|
||||
multibuffersource$buffersource.m_109912_(RenderType.m_110458_(TextureAtlas.f_118259_));
|
||||
multibuffersource$buffersource.m_109912_(RenderType.m_110476_(TextureAtlas.f_118259_));
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_ENTITIES, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_ENTITIES.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
profilerfiller.m_6182_("blockentities");
|
||||
|
||||
for(LevelRenderer.RenderChunkInfo levelrenderer$renderchunkinfo : this.f_194297_) {
|
||||
List<BlockEntity> list = levelrenderer$renderchunkinfo.f_109839_.m_112835_().m_112773_();
|
||||
for(SectionRenderDispatcher.RenderSection sectionrenderdispatcher$rendersection : this.f_290776_) {
|
||||
List<BlockEntity> list = sectionrenderdispatcher$rendersection.m_293175_().m_293674_();
|
||||
if (!list.isEmpty()) {
|
||||
for(BlockEntity blockentity1 : list) {
|
||||
+ if(!frustum.m_113029_(blockentity1.getRenderBoundingBox())) continue;
|
||||
+ if (!frustum.m_113029_(blockentity1.getRenderBoundingBox())) continue;
|
||||
BlockPos blockpos4 = blockentity1.m_58899_();
|
||||
MultiBufferSource multibuffersource1 = multibuffersource$buffersource;
|
||||
p_109600_.m_85836_();
|
||||
@@ -1242,6 +_,9 @@
|
||||
@@ -985,6 +_,9 @@
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
this.f_172946_.m_112267_(blockentity1, p_109601_, p_109600_, multibuffersource1);
|
||||
p_109600_.m_85849_();
|
||||
@@ -1251,9 +_,13 @@
|
||||
@@ -994,9 +_,13 @@
|
||||
|
||||
synchronized(this.f_109468_) {
|
||||
for(BlockEntity blockentity : this.f_109468_) {
|
||||
@@ -100,25 +100,25 @@
|
||||
this.f_172946_.m_112267_(blockentity, p_109601_, p_109600_, multibuffersource$buffersource);
|
||||
p_109600_.m_85849_();
|
||||
}
|
||||
@@ -1276,6 +_,7 @@
|
||||
@@ -1019,6 +_,7 @@
|
||||
this.f_109461_.m_91385_().m_83947_(false);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_BLOCK_ENTITIES, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_BLOCK_ENTITIES.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
profilerfiller.m_6182_("destroyProgress");
|
||||
|
||||
for(Long2ObjectMap.Entry<SortedSet<BlockDestructionProgress>> entry : this.f_109409_.long2ObjectEntrySet()) {
|
||||
@@ -1291,7 +_,8 @@
|
||||
@@ -1034,7 +_,8 @@
|
||||
p_109600_.m_85837_((double)blockpos2.m_123341_() - d0, (double)blockpos2.m_123342_() - d1, (double)blockpos2.m_123343_() - d2);
|
||||
PoseStack.Pose posestack$pose1 = p_109600_.m_85850_();
|
||||
VertexConsumer vertexconsumer1 = new SheetedDecalTextureGenerator(this.f_109464_.m_110108_().m_6299_(ModelBakery.f_119229_.get(k)), posestack$pose1.m_252922_(), posestack$pose1.m_252943_(), 1.0F);
|
||||
- this.f_109461_.m_91289_().m_110918_(this.f_109465_.m_8055_(blockpos2), blockpos2, this.f_109465_, p_109600_, vertexconsumer1);
|
||||
+ net.minecraftforge.client.model.data.ModelData modelData = f_109465_.getModelDataManager().getAt(blockpos2);
|
||||
+ var modelData = f_109465_.getModelDataManager().getAt(blockpos2);
|
||||
+ this.f_109461_.m_91289_().renderBreakingTexture(this.f_109465_.m_8055_(blockpos2), blockpos2, this.f_109465_, p_109600_, vertexconsumer1, modelData == null ? net.minecraftforge.client.model.data.ModelData.EMPTY : modelData);
|
||||
p_109600_.m_85849_();
|
||||
}
|
||||
}
|
||||
@@ -1303,10 +_,13 @@
|
||||
@@ -1046,10 +_,13 @@
|
||||
profilerfiller.m_6182_("outline");
|
||||
BlockPos blockpos1 = ((BlockHitResult)hitresult).m_82425_();
|
||||
BlockState blockstate = this.f_109465_.m_8055_(blockpos1);
|
||||
@@ -132,51 +132,51 @@
|
||||
}
|
||||
|
||||
this.f_109461_.f_91064_.m_113457_(p_109600_, multibuffersource$buffersource, d0, d1, d2);
|
||||
@@ -1338,7 +_,8 @@
|
||||
@@ -1081,7 +_,8 @@
|
||||
this.f_109415_.m_83945_(this.f_109461_.m_91385_());
|
||||
RenderStateShard.f_110126_.m_110185_();
|
||||
profilerfiller.m_6182_("particles");
|
||||
- this.f_109461_.f_91061_.m_107336_(p_109600_, multibuffersource$buffersource, p_109606_, p_109604_, p_109601_);
|
||||
+ this.f_109461_.f_91061_.render(p_109600_, multibuffersource$buffersource, p_109606_, p_109604_, p_109601_, frustum);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
RenderStateShard.f_110126_.m_110188_();
|
||||
} else {
|
||||
profilerfiller.m_6182_("translucent");
|
||||
@@ -1352,7 +_,8 @@
|
||||
@@ -1095,7 +_,8 @@
|
||||
profilerfiller.m_6182_("string");
|
||||
this.m_172993_(RenderType.m_110503_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
this.m_293111_(RenderType.m_110503_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
profilerfiller.m_6182_("particles");
|
||||
- this.f_109461_.f_91061_.m_107336_(p_109600_, multibuffersource$buffersource, p_109606_, p_109604_, p_109601_);
|
||||
+ this.f_109461_.f_91061_.render(p_109600_, multibuffersource$buffersource, p_109606_, p_109604_, p_109601_, frustum);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_PARTICLES.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
}
|
||||
|
||||
posestack.m_85836_();
|
||||
@@ -1376,6 +_,7 @@
|
||||
@@ -1119,6 +_,7 @@
|
||||
RenderStateShard.f_110127_.m_110185_();
|
||||
profilerfiller.m_6182_("weather");
|
||||
this.m_109703_(p_109606_, p_109601_, d0, d1, d2);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_WEATHER, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_WEATHER.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
this.m_173012_(p_109604_);
|
||||
RenderStateShard.f_110127_.m_110188_();
|
||||
this.f_109418_.m_110023_(p_109601_);
|
||||
@@ -1384,6 +_,7 @@
|
||||
@@ -1127,6 +_,7 @@
|
||||
RenderSystem.depthMask(false);
|
||||
profilerfiller.m_6182_("weather");
|
||||
this.m_109703_(p_109606_, p_109601_, d0, d1, d2);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_WEATHER, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
+ net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_WEATHER.dispatch(this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
this.m_173012_(p_109604_);
|
||||
RenderSystem.depthMask(true);
|
||||
}
|
||||
@@ -1527,6 +_,7 @@
|
||||
@@ -1269,6 +_,7 @@
|
||||
shaderinstance.m_173362_();
|
||||
VertexBuffer.m_85931_();
|
||||
this.f_109461_.m_91307_().m_7238_();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(p_172994_, this, p_172995_, p_254039_, this.f_109477_, this.f_109461_.f_91063_.m_109153_(), this.getFrustum());
|
||||
p_172994_.m_110188_();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(p_298012_, this, p_298121_, p_297481_, this.f_109477_, this.f_109461_.f_91063_.m_109153_(), this.getFrustum());
|
||||
p_298012_.m_110188_();
|
||||
}
|
||||
|
||||
@@ -1741,6 +_,8 @@
|
||||
@@ -1485,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_202423_(PoseStack p_202424_, Matrix4f p_254034_, float p_202426_, Camera p_202427_, boolean p_202428_, Runnable p_202429_) {
|
||||
@@ -185,7 +185,7 @@
|
||||
p_202429_.run();
|
||||
if (!p_202428_) {
|
||||
FogType fogtype = p_202427_.m_167685_();
|
||||
@@ -1862,6 +_,8 @@
|
||||
@@ -1606,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_253054_(PoseStack p_254145_, Matrix4f p_254537_, float p_254364_, double p_253843_, double p_253663_, double p_253795_) {
|
||||
@@ -194,16 +194,16 @@
|
||||
float f = this.f_109465_.m_104583_().m_108871_();
|
||||
if (!Float.isNaN(f)) {
|
||||
RenderSystem.disableCull();
|
||||
@@ -2049,7 +_,7 @@
|
||||
@@ -1792,7 +_,7 @@
|
||||
boolean flag = false;
|
||||
if (this.f_109461_.f_91066_.m_232080_().m_231551_() == PrioritizeChunkUpdates.NEARBY) {
|
||||
BlockPos blockpos1 = chunkrenderdispatcher$renderchunk.m_112839_().m_7918_(8, 8, 8);
|
||||
- flag = blockpos1.m_123331_(blockpos) < 768.0D || chunkrenderdispatcher$renderchunk.m_112842_();
|
||||
+ flag = !net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() && (blockpos1.m_123331_(blockpos) < 768.0D || chunkrenderdispatcher$renderchunk.m_112842_()); // the target is the else block below, so invert the forge addition to get there early
|
||||
BlockPos blockpos1 = sectionrenderdispatcher$rendersection.m_295500_().m_7918_(8, 8, 8);
|
||||
- flag = blockpos1.m_123331_(blockpos) < 768.0D || sectionrenderdispatcher$rendersection.m_295878_();
|
||||
+ flag = !net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() && (blockpos1.m_123331_(blockpos) < 768.0D || sectionrenderdispatcher$rendersection.m_295878_()); // the target is the else block below, so invert the forge addition to get there early
|
||||
} else if (this.f_109461_.f_91066_.m_232080_().m_231551_() == PrioritizeChunkUpdates.PLAYER_AFFECTED) {
|
||||
flag = chunkrenderdispatcher$renderchunk.m_112842_();
|
||||
flag = sectionrenderdispatcher$rendersection.m_295878_();
|
||||
}
|
||||
@@ -2396,7 +_,23 @@
|
||||
@@ -2139,7 +_,23 @@
|
||||
this.f_109469_.m_110859_(p_109502_, p_109503_, p_109504_, p_109505_);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
SoundInstance soundinstance = this.f_109410_.get(p_109516_);
|
||||
if (soundinstance != null) {
|
||||
this.f_109461_.m_91106_().m_120399_(soundinstance);
|
||||
@@ -2404,7 +_,7 @@
|
||||
@@ -2147,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (p_109515_ != null) {
|
||||
@@ -236,7 +236,7 @@
|
||||
if (recorditem != null) {
|
||||
this.f_109461_.f_91065_.m_93055_(recorditem.m_43050_());
|
||||
}
|
||||
@@ -2541,7 +_,7 @@
|
||||
@@ -2284,7 +_,7 @@
|
||||
case 1010:
|
||||
Item item = Item.m_41445_(p_234307_);
|
||||
if (item instanceof RecordItem recorditem) {
|
||||
@@ -245,7 +245,7 @@
|
||||
}
|
||||
break;
|
||||
case 1011:
|
||||
@@ -2694,7 +_,7 @@
|
||||
@@ -2437,7 +_,7 @@
|
||||
case 2001:
|
||||
BlockState blockstate1 = Block.m_49803_(p_234307_);
|
||||
if (!blockstate1.m_60795_()) {
|
||||
@@ -254,7 +254,7 @@
|
||||
this.f_109465_.m_245747_(p_234306_, soundtype.m_56775_(), SoundSource.BLOCKS, (soundtype.m_56773_() + 1.0F) / 2.0F, soundtype.m_56774_() * 0.8F, false);
|
||||
}
|
||||
|
||||
@@ -2925,7 +_,7 @@
|
||||
@@ -2672,7 +_,7 @@
|
||||
} else {
|
||||
int i = p_109538_.m_45517_(LightLayer.SKY, p_109540_);
|
||||
int j = p_109538_.m_45517_(LightLayer.BLOCK, p_109540_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/RenderType.java
|
||||
+++ b/net/minecraft/client/renderer/RenderType.java
|
||||
@@ -314,7 +_,7 @@
|
||||
@@ -322,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static RenderType m_110497_(ResourceLocation p_110498_) {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
public static RenderType m_269058_() {
|
||||
@@ -322,19 +_,19 @@
|
||||
@@ -330,19 +_,19 @@
|
||||
}
|
||||
|
||||
public static RenderType m_173237_(ResourceLocation p_173238_) {
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
|
||||
public static RenderType m_269508_() {
|
||||
@@ -342,7 +_,7 @@
|
||||
@@ -350,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static RenderType m_173240_(ResourceLocation p_173241_) {
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
public static RenderType m_110502_() {
|
||||
@@ -669,4 +_,17 @@
|
||||
@@ -677,4 +_,17 @@
|
||||
return this.f_110696_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/Sheets.java
|
||||
+++ b/net/minecraft/client/renderer/Sheets.java
|
||||
@@ -145,11 +_,13 @@
|
||||
@@ -146,11 +_,13 @@
|
||||
}
|
||||
|
||||
private static Material m_173385_(WoodType p_173386_) {
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
|
||||
public static Material m_173381_(WoodType p_173382_) {
|
||||
@@ -208,6 +_,23 @@
|
||||
@@ -209,6 +_,23 @@
|
||||
case SINGLE:
|
||||
default:
|
||||
return p_110773_;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
|
||||
public VertexConsumer m_7421_(float p_110805_, float p_110806_) {
|
||||
- return this.f_110795_.m_7421_(this.f_110796_.m_118367_((double)(p_110805_ * 16.0F)), this.f_110796_.m_118393_((double)(p_110806_ * 16.0F)));
|
||||
+ this.f_110795_.m_7421_(this.f_110796_.m_118367_((double)(p_110805_ * 16.0F)), this.f_110796_.m_118393_((double)(p_110806_ * 16.0F)));
|
||||
- return this.f_110795_.m_7421_(this.f_110796_.m_118367_(p_110805_), this.f_110796_.m_118393_(p_110806_));
|
||||
+ this.f_110795_.m_7421_(this.f_110796_.m_118367_(p_110805_), this.f_110796_.m_118393_(p_110806_));
|
||||
+ return this; //Forge: Fix MC-263524 not working with chained methods
|
||||
}
|
||||
|
||||
|
||||
@@ -16,14 +16,3 @@
|
||||
}
|
||||
|
||||
public static BlockFaceUV m_111581_(BlockFaceUV p_111582_, Direction p_111583_, Transformation p_111584_, ResourceLocation p_111585_) {
|
||||
@@ -129,8 +_,8 @@
|
||||
p_111615_[i + 1] = Float.floatToRawIntBits(p_254291_.y());
|
||||
p_111615_[i + 2] = Float.floatToRawIntBits(p_254291_.z());
|
||||
p_111615_[i + 3] = -1;
|
||||
- p_111615_[i + 4] = Float.floatToRawIntBits(p_111618_.m_118367_((double)p_111619_.m_111392_(p_111616_)));
|
||||
- p_111615_[i + 4 + 1] = Float.floatToRawIntBits(p_111618_.m_118393_((double)p_111619_.m_111396_(p_111616_)));
|
||||
+ p_111615_[i + 4] = Float.floatToRawIntBits(p_111618_.m_118367_((double)p_111619_.m_111392_(p_111616_) * .999 + p_111619_.m_111392_((p_111616_ + 2) % 4) * .001));
|
||||
+ p_111615_[i + 4 + 1] = Float.floatToRawIntBits(p_111618_.m_118393_((double)p_111619_.m_111396_(p_111616_) * .999 + p_111619_.m_111396_((p_111616_ + 2) % 4) * .001));
|
||||
}
|
||||
|
||||
private void m_252985_(Vector3f p_254412_, @Nullable BlockElementRotation p_254150_) {
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java
|
||||
@@ -55,6 +_,7 @@
|
||||
@@ -53,6 +_,7 @@
|
||||
builder.put(SkullBlock.Types.CREEPER, new SkullModel(p_173662_.m_171103_(ModelLayers.f_171130_)));
|
||||
builder.put(SkullBlock.Types.DRAGON, new DragonHeadModel(p_173662_.m_171103_(ModelLayers.f_171135_)));
|
||||
builder.put(SkullBlock.Types.PIGLIN, new PiglinHeadModel(p_173662_.m_171103_(ModelLayers.f_260668_)));
|
||||
|
||||
-134
@@ -1,134 +0,0 @@
|
||||
--- a/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java
|
||||
+++ b/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java
|
||||
@@ -79,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_) {
|
||||
+ this(p_194405_, p_194406_, p_194407_, p_194408_, p_194409_, -1);
|
||||
+ }
|
||||
+ public ChunkRenderDispatcher(ClientLevel p_194405_, LevelRenderer p_194406_, Executor p_194407_, boolean p_194408_, ChunkBufferBuilderPack p_194409_, int countRenderBuilders) {
|
||||
this.f_112681_ = p_194405_;
|
||||
this.f_112682_ = p_194406_;
|
||||
int i = Math.max(1, (int)((double)Runtime.getRuntime().maxMemory() * 0.3D) / (RenderType.m_110506_().stream().mapToInt(RenderType::m_110507_).sum() * 4) - 1);
|
||||
int j = Runtime.getRuntime().availableProcessors();
|
||||
int k = p_194408_ ? j : Math.min(j, 4);
|
||||
- int l = Math.max(1, Math.min(k, i));
|
||||
+ int l = countRenderBuilders < 0 ? Math.max(1, Math.min(k, i)) : countRenderBuilders;
|
||||
this.f_112678_ = p_194409_;
|
||||
List<ChunkBufferBuilderPack> list = Lists.newArrayListWithExpectedSize(l);
|
||||
|
||||
@@ -420,7 +_,7 @@
|
||||
if (!chunkrenderdispatcher$compiledchunk.f_112749_.contains(p_112810_)) {
|
||||
return false;
|
||||
} else {
|
||||
- this.f_112788_ = new ChunkRenderDispatcher.RenderChunk.ResortTransparencyTask(this.m_112832_(), chunkrenderdispatcher$compiledchunk);
|
||||
+ this.f_112788_ = new ChunkRenderDispatcher.RenderChunk.ResortTransparencyTask(new net.minecraft.world.level.ChunkPos(m_112839_()), this.m_112832_(), chunkrenderdispatcher$compiledchunk);
|
||||
p_112811_.m_112709_(this.f_112788_);
|
||||
return true;
|
||||
}
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
@@ -485,10 +_,20 @@
|
||||
protected final double f_112847_;
|
||||
protected final AtomicBoolean f_112848_ = new AtomicBoolean(false);
|
||||
protected final boolean f_194420_;
|
||||
+ protected java.util.Map<net.minecraft.core.BlockPos, net.minecraftforge.client.model.data.ModelData> modelData;
|
||||
|
||||
public ChunkCompileTask(double p_194423_, boolean p_194424_) {
|
||||
+ this(null, p_194423_, p_194424_);
|
||||
+ }
|
||||
+
|
||||
+ public ChunkCompileTask(@Nullable net.minecraft.world.level.ChunkPos pos, double p_194423_, boolean p_194424_) {
|
||||
this.f_112847_ = p_194423_;
|
||||
this.f_194420_ = p_194424_;
|
||||
+ if (pos == null) {
|
||||
+ this.modelData = java.util.Collections.emptyMap();
|
||||
+ } else {
|
||||
+ this.modelData = net.minecraft.client.Minecraft.m_91087_().f_91073_.getModelDataManager().getAt(pos);
|
||||
+ }
|
||||
}
|
||||
|
||||
public abstract CompletableFuture<ChunkRenderDispatcher.ChunkTaskResult> m_5869_(ChunkBufferBuilderPack p_112853_);
|
||||
@@ -500,6 +_,10 @@
|
||||
public int compareTo(ChunkRenderDispatcher.RenderChunk.ChunkCompileTask p_112855_) {
|
||||
return Doubles.compare(this.f_112847_, p_112855_.f_112847_);
|
||||
}
|
||||
+
|
||||
+ public net.minecraftforge.client.model.data.ModelData getModelData(net.minecraft.core.BlockPos pos) {
|
||||
+ return modelData.getOrDefault(pos, net.minecraftforge.client.model.data.ModelData.EMPTY);
|
||||
+ }
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -507,8 +_,13 @@
|
||||
@Nullable
|
||||
protected RenderChunkRegion f_112858_;
|
||||
|
||||
+ @Deprecated
|
||||
public RebuildTask(double p_194427_, @Nullable RenderChunkRegion p_194428_, boolean p_194429_) {
|
||||
- super(p_194427_, p_194429_);
|
||||
+ this(null, p_194427_, p_194428_, p_194429_);
|
||||
+ }
|
||||
+
|
||||
+ public RebuildTask(@Nullable net.minecraft.world.level.ChunkPos pos, double p_194427_, @Nullable RenderChunkRegion p_194428_, boolean p_194429_) {
|
||||
+ super(pos, p_194427_, p_194429_);
|
||||
this.f_112858_ = p_194428_;
|
||||
}
|
||||
|
||||
@@ -605,7 +_,10 @@
|
||||
}
|
||||
|
||||
if (blockstate.m_60799_() != RenderShape.INVISIBLE) {
|
||||
- RenderType rendertype2 = ItemBlockRenderTypes.m_109282_(blockstate);
|
||||
+ var model = blockrenderdispatcher.m_110910_(blockstate);
|
||||
+ var modelData = model.getModelData(renderchunkregion, blockpos2, blockstate, getModelData(blockpos2));
|
||||
+ randomsource.m_188584_(blockstate.m_60726_(blockpos2));
|
||||
+ for (RenderType rendertype2 : model.getRenderTypes(blockstate, randomsource, modelData)) {
|
||||
BufferBuilder bufferbuilder2 = p_234471_.m_108839_(rendertype2);
|
||||
if (set.add(rendertype2)) {
|
||||
RenderChunk.this.m_112805_(bufferbuilder2);
|
||||
@@ -613,8 +_,9 @@
|
||||
|
||||
posestack.m_85836_();
|
||||
posestack.m_252880_((float)(blockpos2.m_123341_() & 15), (float)(blockpos2.m_123342_() & 15), (float)(blockpos2.m_123343_() & 15));
|
||||
- blockrenderdispatcher.m_234355_(blockstate, blockpos2, renderchunkregion, posestack, bufferbuilder2, true, randomsource);
|
||||
+ blockrenderdispatcher.renderBatched(blockstate, blockpos2, renderchunkregion, posestack, bufferbuilder2, true, randomsource, modelData, rendertype2);
|
||||
posestack.m_85849_();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -643,10 +_,10 @@
|
||||
private <E extends BlockEntity> void m_234476_(ChunkRenderDispatcher.RenderChunk.RebuildTask.CompileResults p_234477_, E p_234478_) {
|
||||
BlockEntityRenderer<E> blockentityrenderer = Minecraft.m_91087_().m_167982_().m_112265_(p_234478_);
|
||||
if (blockentityrenderer != null) {
|
||||
- p_234477_.f_234485_.add(p_234478_);
|
||||
if (blockentityrenderer.m_5932_(p_234478_)) {
|
||||
p_234477_.f_234484_.add(p_234478_);
|
||||
}
|
||||
+ else p_234477_.f_234485_.add(p_234478_); //FORGE: Fix MC-112730
|
||||
}
|
||||
|
||||
}
|
||||
@@ -674,8 +_,13 @@
|
||||
class ResortTransparencyTask extends ChunkRenderDispatcher.RenderChunk.ChunkCompileTask {
|
||||
private final ChunkRenderDispatcher.CompiledChunk f_112886_;
|
||||
|
||||
+ @Deprecated
|
||||
public ResortTransparencyTask(double p_112889_, ChunkRenderDispatcher.CompiledChunk p_112890_) {
|
||||
- super(p_112889_, true);
|
||||
+ this(null, p_112889_, p_112890_);
|
||||
+ }
|
||||
+
|
||||
+ public ResortTransparencyTask(@Nullable net.minecraft.world.level.ChunkPos pos, double p_112889_, ChunkRenderDispatcher.CompiledChunk p_112890_) {
|
||||
+ super(pos, p_112889_, true);
|
||||
this.f_112886_ = p_112890_;
|
||||
}
|
||||
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
--- a/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java
|
||||
+++ b/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java
|
||||
@@ -78,12 +_,16 @@
|
||||
private Vec3 f_290602_ = Vec3.f_82478_;
|
||||
|
||||
public SectionRenderDispatcher(ClientLevel p_299878_, LevelRenderer p_299032_, Executor p_298480_, boolean p_298587_, SectionBufferBuilderPack p_299187_) {
|
||||
+ this(p_299878_, p_299032_, p_298480_, p_298587_, p_299187_, -1);
|
||||
+ }
|
||||
+
|
||||
+ public SectionRenderDispatcher(ClientLevel p_299878_, LevelRenderer p_299032_, Executor p_298480_, boolean p_298587_, SectionBufferBuilderPack p_299187_, int countRenderBuilders) {
|
||||
this.f_291400_ = p_299878_;
|
||||
this.f_290611_ = p_299032_;
|
||||
int i = Math.max(1, (int)((double)Runtime.getRuntime().maxMemory() * 0.3D) / (RenderType.m_110506_().stream().mapToInt(RenderType::m_110507_).sum() * 4) - 1);
|
||||
int j = Runtime.getRuntime().availableProcessors();
|
||||
int k = p_298587_ ? j : Math.min(j, 4);
|
||||
- int l = Math.max(1, Math.min(k, i));
|
||||
+ int l = countRenderBuilders < 0 ? Math.max(1, Math.min(k, i)) : countRenderBuilders;
|
||||
this.f_290794_ = p_299187_;
|
||||
List<SectionBufferBuilderPack> list = Lists.newArrayListWithExpectedSize(l);
|
||||
|
||||
@@ -413,7 +_,7 @@
|
||||
if (!sectionrenderdispatcher$compiledsection.f_290391_.contains(p_301074_)) {
|
||||
return false;
|
||||
} else {
|
||||
- this.f_291330_ = new SectionRenderDispatcher.RenderSection.ResortTransparencyTask(this.m_293828_(), sectionrenderdispatcher$compiledsection);
|
||||
+ this.f_291330_ = new SectionRenderDispatcher.RenderSection.ResortTransparencyTask(new net.minecraft.world.level.ChunkPos(m_295500_()), this.m_293828_(), sectionrenderdispatcher$compiledsection);
|
||||
p_298196_.m_294204_(this.f_291330_);
|
||||
return true;
|
||||
}
|
||||
@@ -445,7 +_,7 @@
|
||||
this.f_291503_.incrementAndGet();
|
||||
}
|
||||
|
||||
- this.f_291315_ = new SectionRenderDispatcher.RenderSection.RebuildTask(this.m_293828_(), renderchunkregion, !flag1 || this.f_291503_.get() > 2);
|
||||
+ this.f_291315_ = new SectionRenderDispatcher.RenderSection.RebuildTask(new net.minecraft.world.level.ChunkPos(m_295500_()), this.m_293828_(), renderchunkregion, !flag1 || this.f_291503_.get() > 2);
|
||||
return this.f_291315_;
|
||||
}
|
||||
|
||||
@@ -483,10 +_,20 @@
|
||||
protected final double f_290350_;
|
||||
protected final AtomicBoolean f_291175_ = new AtomicBoolean(false);
|
||||
protected final boolean f_290632_;
|
||||
+ protected java.util.Map<net.minecraft.core.BlockPos, net.minecraftforge.client.model.data.ModelData> modelData;
|
||||
|
||||
public CompileTask(double p_300617_, boolean p_299251_) {
|
||||
+ this(null, p_300617_, p_299251_);
|
||||
+ }
|
||||
+
|
||||
+ public CompileTask(@Nullable net.minecraft.world.level.ChunkPos pos, double p_300617_, boolean p_299251_) {
|
||||
this.f_290350_ = p_300617_;
|
||||
this.f_290632_ = p_299251_;
|
||||
+ if (pos == null) {
|
||||
+ this.modelData = java.util.Collections.emptyMap();
|
||||
+ } else {
|
||||
+ this.modelData = net.minecraft.client.Minecraft.m_91087_().f_91073_.getModelDataManager().getAt(pos);
|
||||
+ }
|
||||
}
|
||||
|
||||
public abstract CompletableFuture<SectionRenderDispatcher.SectionTaskResult> m_294443_(SectionBufferBuilderPack p_300298_);
|
||||
@@ -498,6 +_,10 @@
|
||||
public int compareTo(SectionRenderDispatcher.RenderSection.CompileTask p_298947_) {
|
||||
return Doubles.compare(this.f_290350_, p_298947_.f_290350_);
|
||||
}
|
||||
+
|
||||
+ public net.minecraftforge.client.model.data.ModelData getModelData(net.minecraft.core.BlockPos pos) {
|
||||
+ return modelData.getOrDefault(pos, net.minecraftforge.client.model.data.ModelData.EMPTY);
|
||||
+ }
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -505,8 +_,13 @@
|
||||
@Nullable
|
||||
protected RenderChunkRegion f_290484_;
|
||||
|
||||
+ @Deprecated
|
||||
public RebuildTask(double p_301300_, @Nullable RenderChunkRegion p_300496_, boolean p_299891_) {
|
||||
- super(p_301300_, p_299891_);
|
||||
+ this(null, p_301300_, p_300496_, p_299891_);
|
||||
+ }
|
||||
+
|
||||
+ public RebuildTask(@Nullable net.minecraft.world.level.ChunkPos pos, double p_301300_, @Nullable RenderChunkRegion p_300496_, boolean p_299891_) {
|
||||
+ super(pos, p_301300_, p_299891_);
|
||||
this.f_290484_ = p_300496_;
|
||||
}
|
||||
|
||||
@@ -602,7 +_,10 @@
|
||||
}
|
||||
|
||||
if (blockstate.m_60799_() != RenderShape.INVISIBLE) {
|
||||
- RenderType rendertype2 = ItemBlockRenderTypes.m_109282_(blockstate);
|
||||
+ var model = blockrenderdispatcher.m_110910_(blockstate);
|
||||
+ var modelData = model.getModelData(renderchunkregion, blockpos2, blockstate, getModelData(blockpos2));
|
||||
+ randomsource.m_188584_(blockstate.m_60726_(blockpos2));
|
||||
+ for (RenderType rendertype2 : model.getRenderTypes(blockstate, randomsource, modelData)) {
|
||||
BufferBuilder bufferbuilder2 = p_300020_.m_294384_(rendertype2);
|
||||
if (set.add(rendertype2)) {
|
||||
RenderSection.this.m_293308_(bufferbuilder2);
|
||||
@@ -610,8 +_,9 @@
|
||||
|
||||
posestack.m_85836_();
|
||||
posestack.m_252880_((float)(blockpos2.m_123341_() & 15), (float)(blockpos2.m_123342_() & 15), (float)(blockpos2.m_123343_() & 15));
|
||||
- blockrenderdispatcher.m_234355_(blockstate, blockpos2, renderchunkregion, posestack, bufferbuilder2, true, randomsource);
|
||||
+ blockrenderdispatcher.renderBatched(blockstate, blockpos2, renderchunkregion, posestack, bufferbuilder2, true, randomsource, modelData, rendertype2);
|
||||
posestack.m_85849_();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,10 +_,10 @@
|
||||
private <E extends BlockEntity> void m_293240_(SectionRenderDispatcher.RenderSection.RebuildTask.CompileResults p_297364_, E p_299361_) {
|
||||
BlockEntityRenderer<E> blockentityrenderer = Minecraft.m_91087_().m_167982_().m_112265_(p_299361_);
|
||||
if (blockentityrenderer != null) {
|
||||
- p_297364_.f_290796_.add(p_299361_);
|
||||
if (blockentityrenderer.m_5932_(p_299361_)) {
|
||||
p_297364_.f_291894_.add(p_299361_);
|
||||
}
|
||||
+ else p_297364_.f_290796_.add(p_299361_); //FORGE: Fix MC-112730
|
||||
}
|
||||
|
||||
}
|
||||
@@ -671,8 +_,13 @@
|
||||
class ResortTransparencyTask extends SectionRenderDispatcher.RenderSection.CompileTask {
|
||||
private final SectionRenderDispatcher.CompiledSection f_291899_;
|
||||
|
||||
+ @Deprecated
|
||||
public ResortTransparencyTask(double p_300619_, SectionRenderDispatcher.CompiledSection p_297742_) {
|
||||
- super(p_300619_, true);
|
||||
+ this(null, p_300619_, p_297742_);
|
||||
+ }
|
||||
+
|
||||
+ public ResortTransparencyTask(@Nullable net.minecraft.world.level.ChunkPos pos, double p_300619_, SectionRenderDispatcher.CompiledSection p_297742_) {
|
||||
+ super(pos, p_300619_, true);
|
||||
this.f_291899_ = p_297742_;
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java
|
||||
+++ b/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java
|
||||
@@ -172,12 +_,12 @@
|
||||
@@ -173,12 +_,12 @@
|
||||
private static void m_114441_(PoseStack p_114442_, VertexConsumer p_114443_, Entity p_114444_, float p_114445_) {
|
||||
AABB aabb = p_114444_.m_20191_().m_82386_(-p_114444_.m_20185_(), -p_114444_.m_20186_(), -p_114444_.m_20189_());
|
||||
LevelRenderer.m_109646_(p_114442_, p_114443_, aabb, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -15,11 +15,11 @@
|
||||
p_114442_.m_85836_();
|
||||
double d3 = d0 + Mth.m_14139_((double)p_114445_, enderdragonpart.f_19790_, enderdragonpart.m_20185_());
|
||||
double d4 = d1 + Mth.m_14139_((double)p_114445_, enderdragonpart.f_19791_, enderdragonpart.m_20186_());
|
||||
@@ -351,9 +_,14 @@
|
||||
@@ -360,9 +_,14 @@
|
||||
return this.f_234577_;
|
||||
}
|
||||
|
||||
+ public Map<String, EntityRenderer<? extends Player>> getSkinMap() {
|
||||
+ public Map<PlayerSkin.Model, EntityRenderer<? extends Player>> getSkinMap() {
|
||||
+ return java.util.Collections.unmodifiableMap(f_114363_);
|
||||
+ }
|
||||
+
|
||||
@@ -27,6 +27,6 @@
|
||||
EntityRendererProvider.Context entityrendererprovider$context = new EntityRendererProvider.Context(this, this.f_173995_, this.f_234576_, this.f_234577_, p_174004_, this.f_173996_, this.f_114365_);
|
||||
this.f_114362_ = EntityRenderers.m_174049_(entityrendererprovider$context);
|
||||
this.f_114363_ = EntityRenderers.m_174051_(entityrendererprovider$context);
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.EntityRenderersEvent.AddLayers(f_114362_, f_114363_, entityrendererprovider$context));
|
||||
+ net.minecraftforge.event.ForgeEventFactory.gatherLayers(f_114362_, f_114363_, entityrendererprovider$context);
|
||||
}
|
||||
}
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/LivingEntityRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/LivingEntityRenderer.java
|
||||
@@ -49,14 +_,17 @@
|
||||
@@ -50,14 +_,17 @@
|
||||
}
|
||||
|
||||
public void m_7392_(T p_115308_, float p_115309_, float p_115310_, PoseStack p_115311_, MultiBufferSource p_115312_, int p_115313_) {
|
||||
@@ -15,21 +15,21 @@
|
||||
float f = Mth.m_14189_(p_115310_, p_115308_.f_20884_, p_115308_.f_20883_);
|
||||
float f1 = Mth.m_14189_(p_115310_, p_115308_.f_20886_, p_115308_.f_20885_);
|
||||
float f2 = f1 - f;
|
||||
- if (p_115308_.m_20159_() && p_115308_.m_20202_() instanceof LivingEntity) {
|
||||
- if (p_115308_.m_20159_()) {
|
||||
+ if (shouldSit && p_115308_.m_20202_() instanceof LivingEntity) {
|
||||
LivingEntity livingentity = (LivingEntity)p_115308_.m_20202_();
|
||||
f = Mth.m_14189_(p_115310_, livingentity.f_20884_, livingentity.f_20883_);
|
||||
f2 = f1 - f;
|
||||
@@ -98,7 +_,7 @@
|
||||
Entity $$14 = p_115308_.m_20202_();
|
||||
if ($$14 instanceof LivingEntity) {
|
||||
LivingEntity livingentity = (LivingEntity)$$14;
|
||||
@@ -102,7 +_,7 @@
|
||||
p_115311_.m_252880_(0.0F, -1.501F, 0.0F);
|
||||
float f8 = 0.0F;
|
||||
float f5 = 0.0F;
|
||||
float f4 = 0.0F;
|
||||
- if (!p_115308_.m_20159_() && p_115308_.m_6084_()) {
|
||||
+ if (!shouldSit && p_115308_.m_6084_()) {
|
||||
f8 = p_115308_.f_267362_.m_267711_(p_115310_);
|
||||
f5 = p_115308_.f_267362_.m_267590_(p_115310_);
|
||||
f4 = p_115308_.f_267362_.m_267590_(p_115310_);
|
||||
if (p_115308_.m_6162_()) {
|
||||
@@ -131,6 +_,7 @@
|
||||
@@ -135,6 +_,7 @@
|
||||
|
||||
p_115311_.m_85849_();
|
||||
super.m_7392_(p_115308_, p_115309_, p_115310_, p_115311_, p_115312_, p_115313_);
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
@@ -33,7 +_,7 @@
|
||||
@@ -34,7 +_,7 @@
|
||||
|
||||
public void m_6494_(PoseStack p_116951_, MultiBufferSource p_116952_, int p_116953_, T p_116954_, float p_116955_, float p_116956_, float p_116957_, float p_116958_, float p_116959_, float p_116960_) {
|
||||
ItemStack itemstack = p_116954_.m_6844_(EquipmentSlot.CHEST);
|
||||
@@ -9,9 +9,9 @@
|
||||
ResourceLocation resourcelocation;
|
||||
if (p_116954_ instanceof AbstractClientPlayer) {
|
||||
AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)p_116954_;
|
||||
@@ -42,10 +_,10 @@
|
||||
} else if (abstractclientplayer.m_108555_() && abstractclientplayer.m_108561_() != null && abstractclientplayer.m_36170_(PlayerModelPart.CAPE)) {
|
||||
resourcelocation = abstractclientplayer.m_108561_();
|
||||
@@ -44,10 +_,10 @@
|
||||
} else if (playerskin.f_291348_() != null && abstractclientplayer.m_36170_(PlayerModelPart.CAPE)) {
|
||||
resourcelocation = playerskin.f_291348_();
|
||||
} else {
|
||||
- resourcelocation = f_116934_;
|
||||
+ resourcelocation = getElytraTexture(itemstack, p_116954_);
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
p_116951_.m_85836_();
|
||||
@@ -56,5 +_,30 @@
|
||||
@@ -58,5 +_,30 @@
|
||||
this.f_116935_.m_7695_(p_116951_, vertexconsumer, p_116953_, OverlayTexture.f_118083_, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
p_116951_.m_85849_();
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, armoritem, model, flag, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
}
|
||||
|
||||
ArmorTrim.m_266285_(p_117121_.m_9236_().m_9598_(), itemstack).ifPresent((p_289638_) -> {
|
||||
ArmorTrim.m_266285_(p_117121_.m_9236_().m_9598_(), itemstack, true).ifPresent((p_289638_) -> {
|
||||
- this.m_289604_(armoritem.m_40401_(), p_117119_, p_117120_, p_117123_, p_289638_, p_117124_, flag);
|
||||
+ this.renderTrim(armoritem.m_40401_(), p_117119_, p_117120_, p_117123_, p_289638_, model, flag);
|
||||
});
|
||||
@@ -50,7 +50,7 @@
|
||||
+ }
|
||||
+ private void renderTrim(ArmorMaterial p_289690_, PoseStack p_289687_, MultiBufferSource p_289643_, int p_289683_, ArmorTrim p_289692_, net.minecraft.client.model.Model p_289663_, boolean p_289651_) {
|
||||
TextureAtlasSprite textureatlassprite = this.f_266073_.m_118316_(p_289651_ ? p_289692_.m_267774_(p_289690_) : p_289692_.m_267606_(p_289690_));
|
||||
VertexConsumer vertexconsumer = textureatlassprite.m_118381_(p_289643_.m_6299_(Sheets.m_266442_()));
|
||||
VertexConsumer vertexconsumer = textureatlassprite.m_118381_(p_289643_.m_6299_(Sheets.m_266442_(p_289692_.m_266429_().m_203334_().f_290976_())));
|
||||
p_289663_.m_7695_(p_289687_, vertexconsumer, p_289683_, OverlayTexture.f_118083_, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/player/PlayerRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/player/PlayerRenderer.java
|
||||
@@ -59,7 +_,9 @@
|
||||
@@ -60,7 +_,9 @@
|
||||
|
||||
public void m_7392_(AbstractClientPlayer p_117788_, float p_117789_, float p_117790_, PoseStack p_117791_, MultiBufferSource p_117792_, int p_117793_) {
|
||||
this.m_117818_(p_117788_);
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
public Vec3 m_7860_(AbstractClientPlayer p_117785_, float p_117786_) {
|
||||
@@ -132,10 +_,13 @@
|
||||
@@ -133,10 +_,13 @@
|
||||
if (useanim == UseAnim.BRUSH) {
|
||||
return HumanoidModel.ArmPose.BRUSH;
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
return HumanoidModel.ArmPose.ITEM;
|
||||
}
|
||||
}
|
||||
@@ -167,10 +_,12 @@
|
||||
@@ -168,10 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_117770_(PoseStack p_117771_, MultiBufferSource p_117772_, int p_117773_, AbstractClientPlayer p_117774_) {
|
||||
@@ -38,12 +38,12 @@
|
||||
this.m_117775_(p_117814_, p_117815_, p_117816_, p_117817_, (this.f_115290_).f_102812_, (this.f_115290_).f_103374_);
|
||||
}
|
||||
|
||||
@@ -208,7 +_,7 @@
|
||||
@@ -211,7 +_,7 @@
|
||||
}
|
||||
} else if (f > 0.0F) {
|
||||
super.m_7523_(p_117802_, p_117803_, p_117804_, p_117805_, p_117806_);
|
||||
- float f3 = p_117802_.m_20069_() ? -90.0F - p_117802_.m_146909_() : -90.0F;
|
||||
+ float f3 = p_117802_.m_20069_() || p_117802_.isInFluidType((fluidType, height) -> p_117802_.canSwimInFluidType(fluidType)) ? -90.0F - p_117802_.m_146909_() : -90.0F;
|
||||
float f4 = Mth.m_14179_(f, 0.0F, f3);
|
||||
p_117803_.m_252781_(Axis.f_252529_.m_252977_(f4));
|
||||
- float f4 = p_117802_.m_20069_() ? -90.0F - f1 : -90.0F;
|
||||
+ float f4 = p_117802_.m_20069_() || p_117802_.isInFluidType((fluidType, height) -> p_117802_.canSwimInFluidType(fluidType)) ? -90.0F - p_117802_.m_146909_() : -90.0F;
|
||||
float f5 = Mth.m_14179_(f, 0.0F, f4);
|
||||
p_117803_.m_252781_(Axis.f_252529_.m_252977_(f5));
|
||||
if (p_117802_.m_6067_()) {
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/client/renderer/texture/SpriteContents.java
|
||||
+++ b/net/minecraft/client/renderer/texture/SpriteContents.java
|
||||
@@ -32,14 +_,29 @@
|
||||
public NativeImage[] f_243731_;
|
||||
@@ -34,8 +_,18 @@
|
||||
@Nullable
|
||||
final SpriteContents.AnimatedTexture f_244575_;
|
||||
private final ResourceMetadata f_290652_;
|
||||
+ @Nullable
|
||||
+ public final net.minecraftforge.client.textures.ForgeTextureMetadata forgeMeta;
|
||||
|
||||
@@ -11,26 +11,23 @@
|
||||
+ * @deprecated Forge: Use the {@linkplain SpriteContents#SpriteContents(ResourceLocation, FrameSize, NativeImage, AnimationMetadataSection, net.minecraftforge.client.textures.ForgeTextureMetadata) overload with Forge metadata parameter} to properly forward custom loaders.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
public SpriteContents(ResourceLocation p_249787_, FrameSize p_251031_, NativeImage p_252131_, AnimationMetadataSection p_250432_) {
|
||||
+ this(p_249787_, p_251031_, p_252131_, p_250432_, null);
|
||||
public SpriteContents(ResourceLocation p_249787_, FrameSize p_251031_, NativeImage p_252131_, ResourceMetadata p_299427_) {
|
||||
+ this(p_249787_, p_251031_, p_252131_, p_299427_, null);
|
||||
+ }
|
||||
+
|
||||
+ public SpriteContents(ResourceLocation p_249787_, FrameSize p_251031_, NativeImage p_252131_, AnimationMetadataSection p_250432_, @org.jetbrains.annotations.Nullable net.minecraftforge.client.textures.ForgeTextureMetadata forgeMeta) {
|
||||
+ public SpriteContents(ResourceLocation p_249787_, FrameSize p_251031_, NativeImage p_252131_, ResourceMetadata p_299427_, @Nullable net.minecraftforge.client.textures.ForgeTextureMetadata forgeMeta) {
|
||||
this.f_243877_ = p_249787_;
|
||||
this.f_244302_ = p_251031_.f_244129_();
|
||||
this.f_244600_ = p_251031_.f_244503_();
|
||||
this.f_244575_ = this.m_247391_(p_251031_, p_252131_.m_84982_(), p_252131_.m_85084_(), p_250432_);
|
||||
@@ -44,6 +_,7 @@
|
||||
this.f_244575_ = this.m_247391_(p_251031_, p_252131_.m_84982_(), p_252131_.m_85084_(), animationmetadatasection);
|
||||
this.f_243904_ = p_252131_;
|
||||
this.f_243731_ = new NativeImage[]{this.f_243904_};
|
||||
+ this.forgeMeta = forgeMeta;
|
||||
+ }
|
||||
+
|
||||
+ public NativeImage getOriginalImage() {
|
||||
+ return this.f_243904_;
|
||||
}
|
||||
|
||||
public void m_246368_(int p_248864_) {
|
||||
@@ -124,6 +_,9 @@
|
||||
@@ -128,6 +_,9 @@
|
||||
|
||||
void m_247381_(int p_248895_, int p_250245_, int p_250458_, int p_251337_, NativeImage[] p_248825_) {
|
||||
for(int i = 0; i < this.f_243731_.length; ++i) {
|
||||
@@ -40,7 +37,18 @@
|
||||
p_248825_[i].m_85003_(i, p_248895_ >> i, p_250245_ >> i, p_250458_ >> i, p_251337_ >> i, this.f_244302_ >> i, this.f_244600_ >> i, this.f_243731_.length > 1, false);
|
||||
}
|
||||
|
||||
@@ -241,7 +_,8 @@
|
||||
@@ -145,6 +_,10 @@
|
||||
return this.f_243877_;
|
||||
}
|
||||
|
||||
+ public NativeImage getOriginalImage() {
|
||||
+ return this.f_243904_;
|
||||
+ }
|
||||
+
|
||||
public IntStream m_245638_() {
|
||||
return this.f_244575_ != null ? this.f_244575_.m_246130_() : IntStream.of(1);
|
||||
}
|
||||
@@ -249,7 +_,8 @@
|
||||
for(int i = 0; i < this.f_244527_.length; ++i) {
|
||||
int j = SpriteContents.this.f_244302_ >> i;
|
||||
int k = SpriteContents.this.f_244600_ >> i;
|
||||
@@ -50,7 +58,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -257,6 +_,9 @@
|
||||
@@ -265,6 +_,9 @@
|
||||
for(int k = 0; k < this.f_244527_.length; ++k) {
|
||||
int l = SpriteContents.this.f_244302_ >> k;
|
||||
int i1 = SpriteContents.this.f_244600_ >> k;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/SpriteLoader.java
|
||||
+++ b/net/minecraft/client/renderer/texture/SpriteLoader.java
|
||||
@@ -68,7 +_,7 @@
|
||||
@@ -67,7 +_,7 @@
|
||||
int j1 = Math.min(j, k);
|
||||
int k1 = Mth.m_14173_(j1);
|
||||
int l1;
|
||||
@@ -9,17 +9,7 @@
|
||||
f_244357_.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.f_244500_, p_261919_, k1, j1);
|
||||
l1 = k1;
|
||||
} else {
|
||||
@@ -144,6 +_,9 @@
|
||||
|
||||
FrameSize framesize = animationmetadatasection.m_245821_(nativeimage.m_84982_(), nativeimage.m_85084_());
|
||||
if (Mth.m_264612_(nativeimage.m_84982_(), framesize.f_244129_()) && Mth.m_264612_(nativeimage.m_85084_(), framesize.f_244503_())) {
|
||||
+ SpriteContents contents = net.minecraftforge.client.ForgeHooksClient.loadSpriteContents(p_251630_, p_250558_, framesize, nativeimage, animationmetadatasection);
|
||||
+ if (contents != null)
|
||||
+ return contents;
|
||||
return new SpriteContents(p_251630_, framesize, nativeimage, animationmetadatasection);
|
||||
} else {
|
||||
f_244357_.error("Image {} size {},{} is not multiple of frame size {},{}", p_251630_, nativeimage.m_84982_(), nativeimage.m_85084_(), framesize.f_244129_(), framesize.f_244503_());
|
||||
@@ -155,6 +_,11 @@
|
||||
@@ -133,6 +_,11 @@
|
||||
private Map<ResourceLocation, TextureAtlasSprite> m_276091_(Stitcher<SpriteContents> p_276117_, int p_276111_, int p_276112_) {
|
||||
Map<ResourceLocation, TextureAtlasSprite> map = new HashMap<>();
|
||||
p_276117_.m_118180_((p_251421_, p_250533_, p_251913_) -> {
|
||||
|
||||
Loaded 100 of 368 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user