mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 17:14:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e392f6012 | ||
|
|
867159643c | ||
|
|
0e6e6ef2d8 | ||
|
|
404ea1e016 | ||
|
|
f8877789b5 | ||
|
|
a3d50ff545 | ||
|
|
5c3f80bbcf | ||
|
|
181b9bd927 | ||
|
|
c63db5758d | ||
|
|
38a9fe304c | ||
|
|
6807c294c4 | ||
|
|
026b6d6519 | ||
|
|
90ced4b3f7 | ||
|
|
52dd0eceb2 | ||
|
|
2d6de8ea7b | ||
|
|
60eb1c25e9 | ||
|
|
90c50085c0 | ||
|
|
9ea3f8f6f1 | ||
|
|
10d72c3cf0 | ||
|
|
214cff1aae | ||
|
|
b5802b150a | ||
|
|
043765257d | ||
|
|
210e931c31 | ||
|
|
45e125b0ec | ||
|
|
46eb109a7e | ||
|
|
a753a3eddc | ||
|
|
5224533d45 | ||
|
|
46804f6a0c | ||
|
|
934e0cad6f | ||
|
|
29c0512de9 | ||
|
|
043cb331ee | ||
|
|
614e65c6a3 | ||
|
|
f321e58a41 | ||
|
|
7288c2106d | ||
|
|
4ebb390a1e | ||
|
|
eceaf7ecc8 | ||
|
|
0c25531761 | ||
|
|
ea0b61ad5e | ||
|
|
6f18c61070 | ||
|
|
feae488fa8 | ||
|
|
034e75f5a5 | ||
|
|
2acf2110ef | ||
|
|
6345f2670c | ||
|
|
9114bec81d | ||
|
|
9ac626d2a9 | ||
|
|
457909b6d5 | ||
|
|
07b62b77e6 | ||
|
|
e374f62037 | ||
|
|
0209daec36 | ||
|
|
1b89f931eb | ||
|
|
a3e4b75c59 | ||
|
|
45b90a0d45 | ||
|
|
fd9bf64d53 | ||
|
|
5dbea9ea8d | ||
|
|
28f7b5d885 | ||
|
|
0c0603dc91 | ||
|
|
f24991f3bb | ||
|
|
a39f1cbe1a | ||
|
|
6fd01a13ee | ||
|
|
6829324f5a | ||
|
|
eb9c966095 | ||
|
|
f0bab0fb38 | ||
|
|
d5cb0935e9 | ||
|
|
d4f79882f9 | ||
|
|
8d3685439e | ||
|
|
68cf703435 | ||
|
|
bcdd04d549 | ||
|
|
ec7d9d4179 | ||
|
|
765da1aca8 | ||
|
|
7fa42ca064 | ||
|
|
c23ea1e733 | ||
|
|
0f48e851a3 | ||
|
|
549007a4a6 | ||
|
|
932e7c84b3 | ||
|
|
999b5df933 | ||
|
|
29396b6235 | ||
|
|
4ce32c3663 | ||
|
|
8084cc5499 | ||
|
|
988fc97af1 | ||
|
|
5f082045b0 | ||
|
|
abc98ba56b | ||
|
|
e35c5c9ae4 | ||
|
|
926fa5d5a6 | ||
|
|
99d8fa1a6b | ||
|
|
1a317a7306 | ||
|
|
fa01ba3221 | ||
|
|
766019e1fc | ||
|
|
a7e4cdcc49 | ||
|
|
6551ccc247 | ||
|
|
c3e4d303e9 | ||
|
|
9e763a8334 | ||
|
|
035c01e222 | ||
|
|
1fa88ebd56 | ||
|
|
4fce4eb10b | ||
|
|
2e694d3a6d | ||
|
|
e8966a05f5 | ||
|
|
a377727ac4 | ||
|
|
385fb64ab7 | ||
|
|
f2216f4e25 | ||
|
|
0fc1ea01d1 | ||
|
|
ea23cd4779 | ||
|
|
903a400132 | ||
|
|
940f3ed731 | ||
|
|
9d8817b5db | ||
|
|
10204f8d82 | ||
|
|
746d702058 | ||
|
|
3c5728f070 | ||
|
|
8c8ef2d9e1 | ||
|
|
6a25490d7f | ||
|
|
6a0b16817d | ||
|
|
677e2104a0 | ||
|
|
438c969fef | ||
|
|
4af0bfd661 | ||
|
|
03c2a3d3a8 | ||
|
|
9a6d1c390e | ||
|
|
0512a47eba | ||
|
|
699a5c3c18 | ||
|
|
5a552b9f8d | ||
|
|
aa5b9d12ea | ||
|
|
a3b1007633 | ||
|
|
bdd0af5280 | ||
|
|
5e554530ac | ||
|
|
713c24d916 | ||
|
|
c359a38d9f | ||
|
|
d84a88d78d | ||
|
|
cf9b1b2193 | ||
|
|
25605505d5 | ||
|
|
0d2a0deef3 | ||
|
|
b6dc5381ca | ||
|
|
559bacbd98 | ||
|
|
19444ffa18 | ||
|
|
db3d202c4e | ||
|
|
2f5172f907 | ||
|
|
f6cb5268a2 | ||
|
|
fcee09cab2 | ||
|
|
dd1d8737ad | ||
|
|
3e48066021 | ||
|
|
0d16042705 | ||
|
|
52b8070692 | ||
|
|
23541ab175 | ||
|
|
c7a17946a5 | ||
|
|
208ca23515 | ||
|
|
6329c0fcf2 | ||
|
|
202ae50820 | ||
|
|
58e5f33fad | ||
|
|
2ce4f5ece5 | ||
|
|
aca45340bf | ||
|
|
30d4520c6b | ||
|
|
daff482092 | ||
|
|
a740044e21 | ||
|
|
1a4955f9fd | ||
|
|
2c4042c17c | ||
|
|
e95ba8a3dc | ||
|
|
63cb030cba | ||
|
|
743fc70a7f | ||
|
|
c14ffa3264 | ||
|
|
3f292d5d42 | ||
|
|
886e89ccb2 | ||
|
|
977428e42c | ||
|
|
1c02312ae6 | ||
|
|
8fbd84515f | ||
|
|
f93289e01c | ||
|
|
982ed69776 | ||
|
|
1f46169e1e | ||
|
|
7bac75f370 | ||
|
|
06d9b6531c | ||
|
|
2991e767dd | ||
|
|
a901d80dd5 | ||
|
|
d86f58a0df | ||
|
|
0ad574257e | ||
|
|
4839d18c73 | ||
|
|
e539e7ecbb | ||
|
|
1b618fae90 | ||
|
|
f12a93fe1e | ||
|
|
617159c825 | ||
|
|
c72d6e9122 | ||
|
|
69ae178bf4 | ||
|
|
d391299340 | ||
|
|
40091678a8 | ||
|
|
2b43aa6301 | ||
|
|
44d9fff2b4 | ||
|
|
509a28efd3 | ||
|
|
c4e000dbe7 | ||
|
|
0bcc2e3fbd | ||
|
|
e6c440a4f7 | ||
|
|
575af22cee | ||
|
|
dea08be906 | ||
|
|
0f27975f77 | ||
|
|
2d30419a31 | ||
|
|
68ce113c5b | ||
|
|
ad7e4e95ae | ||
|
|
345387645e | ||
|
|
380366e25f | ||
|
|
1936eb1f36 | ||
|
|
088fc6b67f | ||
|
|
983a47a7d6 | ||
|
|
c1840abb0a | ||
|
|
2c054fca76 | ||
|
|
d5b94aa9c8 | ||
|
|
c4c760bfb3 | ||
|
|
dd0260c476 | ||
|
|
ca62702ff9 | ||
|
|
0d50b4c39f | ||
|
|
c37e44efb6 | ||
|
|
df04ae11ef | ||
|
|
6e8b976089 | ||
|
|
bc878ddf19 | ||
|
|
3096608d4a | ||
|
|
7c99b756f9 | ||
|
|
90035ab084 | ||
|
|
b6c12f5fff | ||
|
|
4b9920bcb3 | ||
|
|
1e053298be | ||
|
|
ca031ca33f | ||
|
|
ecb56054bc | ||
|
|
53747b0cb5 | ||
|
|
e1b0a8c153 | ||
|
|
fc189c9aaf | ||
|
|
e8ce61d4cd | ||
|
|
ac61018806 | ||
|
|
18e97a487d | ||
|
|
c3b1f47754 | ||
|
|
503d277033 | ||
|
|
40de19f16e | ||
|
|
83ebdcd8f2 | ||
|
|
47a1f7529a | ||
|
|
747cb0f151 | ||
|
|
30b530836a | ||
|
|
49596dcacc | ||
|
|
5df687dddc | ||
|
|
599a754b60 | ||
|
|
eaac0c17a4 | ||
|
|
faaebe7a07 | ||
|
|
6256ba336e | ||
|
|
5987d917b8 | ||
|
|
738abbb360 | ||
|
|
1558362583 | ||
|
|
5b67354e24 | ||
|
|
dec91dec68 |
No files matched your search
@@ -14,3 +14,10 @@
|
||||
*.cfg text eol=lf
|
||||
*.py text eol=lf
|
||||
*.jks binary
|
||||
|
||||
# Disable autocrlf on generated files, they always generate with LF
|
||||
src/generated/**/.cache/cache text eol=lf
|
||||
src/generated/**/*.json text eol=lf
|
||||
src/generated_test/**/.cache/cache text eol=lf
|
||||
src/generated_test/**/*.json text eol=lf
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '1.15.x' ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main
|
||||
with:
|
||||
java: 8
|
||||
gradle_tasks: 'setup build publish'
|
||||
artifact_name: 'forge'
|
||||
secrets:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }}
|
||||
PROMOTE_ARTIFACT_USERNAME: ${{ secrets.PROMOTE_ARTIFACT_USERNAME }}
|
||||
PROMOTE_ARTIFACT_PASSWORD: ${{ secrets.PROMOTE_ARTIFACT_PASSWORD }}
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
# Unused for now until we upgrade gradle
|
||||
# SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }}
|
||||
# SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
|
||||
# SIGN_KEYSTORE_PASSWORD: ${{ secrets.SIGN_KEYSTORE_PASSWORD }}
|
||||
# SIGN_KEYSTORE_DATA: ${{ secrets.SIGN_KEYSTORE_DATA }}
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
#gradle
|
||||
/build
|
||||
/.gradle
|
||||
/mdk/.gradle
|
||||
/mdk/build
|
||||
/**/.gradle
|
||||
/**/build
|
||||
|
||||
#occupational hazards
|
||||
/projects/mcp/
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
language: java
|
||||
jdk: oraclejdk8
|
||||
|
||||
env:
|
||||
- BUILD_NUMBER=9999
|
||||
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar
|
||||
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $TRAVIS_BUILD_DIR/build/localCache/Forge/
|
||||
|
||||
before_install: chmod +x gradlew
|
||||
install:
|
||||
- ./gradlew --refresh-dependencies
|
||||
- ./gradlew ciWriteBuildNumber
|
||||
script:
|
||||
- travis_wait ./gradlew build -x createExe -S
|
||||
- ./gradlew -p projects/Forge test -S -i
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
# skip building travis on 1.13+ - it doesn't work there
|
||||
branches:
|
||||
except:
|
||||
- 1.13-pre
|
||||
- 1.13.x
|
||||
- 1.14.x
|
||||
- /^noci-.*$/
|
||||
Vendored
-110
@@ -1,110 +0,0 @@
|
||||
@Library('forge-shared-library')_
|
||||
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'gradlewrapper:latest'
|
||||
args '-v gradlecache:/gradlecache'
|
||||
}
|
||||
}
|
||||
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('fetch') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('notify_start') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Started",
|
||||
successful: true,
|
||||
result: 'ABORTED', //White border
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('changelog') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, 'build/changelog.txt')
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
environment {
|
||||
FORGE_MAVEN = credentials('forge-maven-forge-user')
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
KEYSTORE = credentials('forge-jenkins-keystore-old')
|
||||
KEYSTORE_KEYPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.forge/${MYVERSION}'
|
||||
}
|
||||
}
|
||||
stage('test_publish_pr') { //Publish to local repo to test full process, but don't include credentials so it can't sign/publish to maven
|
||||
when {
|
||||
changeRequest()
|
||||
}
|
||||
environment {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true, onlyIfSuccessful: true, allowEmptyArchive: true
|
||||
//junit 'build/test-results/*/*.xml'
|
||||
//jacoco sourcePattern: '**/src/*/java'
|
||||
|
||||
if (env.CHANGE_ID == null) { // This is unset for non-PRs
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Finished ${currentBuild.currentResult}",
|
||||
description: '```\n' + getChanges(currentBuild) + '\n```',
|
||||
successful: currentBuild.resultIsBetterOrEqualTo("SUCCESS"),
|
||||
result: currentBuild.currentResult,
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-16
@@ -1,16 +1,2 @@
|
||||
Minecraft Forge
|
||||
Copyright (c) 2016-2019.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation version 2.1
|
||||
of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (c) Forge Development LLC and contributors
|
||||
SPDX-License-Identifier: LGPL-2.1-only
|
||||
+110
-108
@@ -1,12 +1,15 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url = 'https://maven.minecraftforge.net/' }
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.197'
|
||||
classpath 'org.ow2.asm:asm:7.2'
|
||||
classpath 'org.ow2.asm:asm-tree:7.2'
|
||||
}
|
||||
@@ -42,25 +45,21 @@ import org.objectweb.asm.ClassReader
|
||||
|
||||
plugins {
|
||||
id 'net.minecrell.licenser' version '0.4'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id 'org.ajoberstar.grgit' version '4.1.1'
|
||||
id 'de.undercouch.download' version '3.3.0'
|
||||
id 'com.github.ben-manes.versions' version '0.22.0'
|
||||
// Does not support this old of gradle
|
||||
//id 'net.minecraftforge.gradlejarsigner' version '1.0.5'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version'))
|
||||
|
||||
ext {
|
||||
JAR_SIGNER = null
|
||||
if (project.hasProperty('keystore')) {
|
||||
JAR_SIGNER = [
|
||||
storepass: project.properties.keystoreStorePass,
|
||||
keypass: project.properties.keystoreKeyPass,
|
||||
keystore: project.properties.keystore
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'snapshot'
|
||||
MAPPING_VERSION = '20190719-1.14.3'
|
||||
MC_VERSION = '1.15'
|
||||
MCP_VERSION = '20191212.203412'
|
||||
MAPPING_VERSION = '20200514-1.15.1'
|
||||
MC_VERSION = '1.15.2'
|
||||
MCP_VERSION = '20200515.085601'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -71,6 +70,7 @@ project(':mcp') {
|
||||
}
|
||||
}
|
||||
|
||||
if (findProject(':clean') != null) {
|
||||
project(':clean') {
|
||||
evaluationDependsOn(':mcp')
|
||||
apply plugin: 'eclipse'
|
||||
@@ -78,7 +78,11 @@ project(':clean') {
|
||||
compileJava.sourceCompatibility = compileJava.targetCompatibility = sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -114,9 +118,10 @@ project(':clean') {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project(':forge') {
|
||||
evaluationDependsOn(':clean')
|
||||
project(':forge') {
|
||||
evaluationDependsOn(findProject(':clean') != null ? ':clean' : ':mcp')
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'eclipse'
|
||||
@@ -175,24 +180,34 @@ project(':forge') {
|
||||
srcDirs = ["$rootDir/src/userdev/resources"]
|
||||
}
|
||||
}
|
||||
userdev_test {
|
||||
compileClasspath += sourceSets.userdev.runtimeClasspath
|
||||
runtimeClasspath += sourceSets.userdev.runtimeClasspath
|
||||
compileClasspath += sourceSets.test.runtimeClasspath
|
||||
runtimeClasspath += sourceSets.test.runtimeClasspath
|
||||
}
|
||||
}
|
||||
//Eclipse adds the sourcesets twice, once where we tell it to, once in the projects folder. No idea why. So delete them
|
||||
eclipse.classpath.file.whenMerged { cls -> cls.entries.removeIf { e -> e instanceof SourceFolder && e.path.startsWith('src/') && !e.path.startsWith('src/main/') } }
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
SPEC_VERSION = '29.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
SPEC_VERSION = '31.2' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
|
||||
// ForgeMC is a unique identifier for every MC version we have supported.
|
||||
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
|
||||
MCP_ARTIFACT = project(':mcp').mcp.config
|
||||
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.8.5'
|
||||
VERSION_JSON = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.7:fatjar'
|
||||
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.12:fatjar'
|
||||
}
|
||||
|
||||
def getVersion = {
|
||||
@@ -212,10 +227,13 @@ project(':forge') {
|
||||
}
|
||||
|
||||
version = getVersion()
|
||||
println('Forge Version: ' + version)
|
||||
|
||||
patcher {
|
||||
exc = file("$rootDir/src/main/resources/forge.exc")
|
||||
parent = project(':clean')
|
||||
parent = project(':mcp')
|
||||
mcVersion = MC_VERSION
|
||||
mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION
|
||||
patches = file("$rootDir/patches/minecraft")
|
||||
patchedSrc = file('src/main/java')
|
||||
srgPatches = true
|
||||
@@ -254,6 +272,8 @@ project(':forge') {
|
||||
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev_test"
|
||||
|
||||
mods {
|
||||
TestMods { sources sourceSets.test }
|
||||
}
|
||||
@@ -286,6 +306,8 @@ project(':forge') {
|
||||
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev_test"
|
||||
|
||||
mods {
|
||||
TestMods { sources sourceSets.test }
|
||||
}
|
||||
@@ -321,12 +343,17 @@ project(':forge') {
|
||||
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev_test"
|
||||
|
||||
mods {
|
||||
tests { sources sourceSets.test }
|
||||
}
|
||||
|
||||
args '--mod', 'data_gen_test', '--all', '--output', rootProject.file('src/generated_test/resources/'), '--validate',
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
args '--flat', '--all', '--validate',
|
||||
'--mod', 'data_gen_test',
|
||||
'--mod', 'piston_event_test',
|
||||
'--output', rootProject.file('src/generated_test/resources/'),
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -405,21 +432,24 @@ project(':forge') {
|
||||
installer 'org.ow2.asm:asm:7.2'
|
||||
installer 'org.ow2.asm:asm-commons:7.2'
|
||||
installer 'org.ow2.asm:asm-tree:7.2'
|
||||
installer 'cpw.mods:modlauncher:5.0.+'
|
||||
installer 'cpw.mods:grossjava9hacks:1.1.+'
|
||||
installer 'net.minecraftforge:accesstransformers:2.0.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:2.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:2.0.+'
|
||||
installer 'org.ow2.asm:asm-util:7.2'
|
||||
installer 'org.ow2.asm:asm-analysis:7.2'
|
||||
installer 'cpw.mods:modlauncher:5.1.+'
|
||||
installer 'cpw.mods:grossjava9hacks:1.3.+'
|
||||
installer 'net.minecraftforge:accesstransformers:2.1.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:2.2.+:service'
|
||||
installer 'net.minecraftforge:forgespi:3.0.+'
|
||||
installer 'net.minecraftforge:coremods:2.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'org.spongepowered:mixin:0.8.2'
|
||||
installer 'com.electronwill.night-config:core:3.6.2'
|
||||
installer 'com.electronwill.night-config:toml:3.6.2'
|
||||
installer 'org.jline:jline:3.12.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.0'
|
||||
installer 'net.jodah:typetools:0.6.1'
|
||||
installer 'java3d:vecmath:1.5.2'
|
||||
installer 'org.apache.logging.log4j:log4j-api:2.11.2'
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
installer 'net.jodah:typetools:0.8.3'
|
||||
installer 'org.apache.logging.log4j:log4j-api:2.15.0' //TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.15.0' //TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version
|
||||
installer 'org.apache.logging.log4j:log4j-slf4j18-impl:2.15.0' //TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
fmllauncherImplementation 'com.google.guava:guava:21.0'
|
||||
@@ -443,48 +473,21 @@ project(':forge') {
|
||||
if (changelog.exists())
|
||||
extraTxts += changelog
|
||||
|
||||
task downloadCrowdin() {
|
||||
ext {
|
||||
output = file('build/crowdin_raw.zip')
|
||||
update = file('build/crowdin.json')
|
||||
id = 'minecraft-forge'
|
||||
}
|
||||
onlyIf {
|
||||
project.hasProperty('crowdinKey') && !project.gradle.startParameter.isOffline()
|
||||
}
|
||||
doLast {
|
||||
download {
|
||||
src "https://api.crowdin.com/api/project/${id}/export?key=${project.crowdinKey}&json"
|
||||
dest update
|
||||
overwrite true
|
||||
}
|
||||
if (!update.text.contains('success')) {
|
||||
throw new RuntimeException("Crowdin export failed, see ${update} for more info")
|
||||
}
|
||||
download {
|
||||
src "https://api.crowdin.com/api/project/${id}/download/all.zip?key=${project.crowdinKey}"
|
||||
dest output
|
||||
overwrite true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('downloadCrowdin', Download) {
|
||||
src 'https://files.minecraftforge.net/crowdin.zip'
|
||||
dest file('build/crowdin.zip')
|
||||
onlyIfModified true
|
||||
quiet true
|
||||
}
|
||||
|
||||
task crowdin(type: Zip) {
|
||||
dependsOn downloadCrowdin
|
||||
onlyIf {
|
||||
!downloadCrowdin.state.skipped
|
||||
}
|
||||
baseName = project.name
|
||||
version = project.version
|
||||
classifier = 'crowdin'
|
||||
destinationDir = file('build/distributions')
|
||||
from(zipTree(downloadCrowdin.output)){
|
||||
eachFile { //Tired of waiting for crowdin API, rename things myself. Remove once crowdin stops being dumb
|
||||
if (it.name.equals('en_us.json') && !it.path.startsWith('assets/')) {
|
||||
it.name = it.path.split('/')[0] + '.json'
|
||||
it.path = 'assets/forge/lang/' + it.name
|
||||
}
|
||||
}
|
||||
from(zipTree(downloadCrowdin.dest)){
|
||||
exclude { it.isDirectory() }
|
||||
rename { it.toLowerCase() }//Minecraft needs it lowercase.
|
||||
exclude '**/*.lang' //Pre-1.13 format
|
||||
@@ -687,7 +690,7 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
|
||||
task launcherJson(dependsOn: ['universalJar', 'launcherJar']) {
|
||||
inputs.file universalJar.archivePath
|
||||
inputs.file { launcherJar.archivePath }
|
||||
ext {
|
||||
@@ -796,16 +799,16 @@ project(':forge') {
|
||||
server: '/data/server.lzma'
|
||||
],
|
||||
MC_SLIM: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}:slim${MC_VERSION == '1.14.4' ? '-stable' : ''}]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:slim${MC_VERSION == '1.14.4' ? '-stable' : ''}]"
|
||||
client: "[net.minecraft:client:${MC_VERSION}:slim]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:slim]"
|
||||
],
|
||||
MC_SLIM_SHA: [
|
||||
client: "'${sha1(tasks.getByName('downloadClientSlim').output)}'",
|
||||
server: "'${sha1(tasks.getByName('downloadServerSlim').output)}'"
|
||||
],
|
||||
MC_EXTRA: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}:extra${MC_VERSION == '1.14.4' ? '-stable' : ''}]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:extra${MC_VERSION == '1.14.4' ? '-stable' : ''}]"
|
||||
client: "[net.minecraft:client:${MC_VERSION}:extra]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:extra]"
|
||||
],
|
||||
MC_EXTRA_SHA: [
|
||||
client: "'${sha1(tasks.getByName('downloadClientExtra').output)}'",
|
||||
@@ -893,7 +896,7 @@ project(':forge') {
|
||||
['slim', 'extra'].each { type ->
|
||||
def name = "download${side.capitalize()}${type.capitalize()}"
|
||||
task "${name}"(type: DownloadMavenArtifact) {
|
||||
artifact = "net.minecraft:${side}:${MC_VERSION}${MC_VERSION == '1.14.4' ? '-stable' : ''}:${type}"
|
||||
artifact = "net.minecraft:${side}:${MC_VERSION}:${type}"
|
||||
}
|
||||
installerJson.dependsOn(name)
|
||||
installerJson.inputs.file(tasks.getByName(name).output)
|
||||
@@ -923,7 +926,7 @@ project(':forge') {
|
||||
*/
|
||||
|
||||
// add crowdin locales
|
||||
from { !crowdin.state.skipped ? zipTree(crowdin.archivePath) : null}
|
||||
from zipTree(crowdin.archivePath)
|
||||
dependsOn crowdin
|
||||
|
||||
doFirst {
|
||||
@@ -946,7 +949,7 @@ project(':forge') {
|
||||
artifacts.each { key, lib ->
|
||||
classpath += "libraries/${lib.downloads.artifact.path} "
|
||||
}
|
||||
classpath += "libraries/net/minecraft/server/${MC_VERSION}/server-${MC_VERSION}-extra${MC_VERSION == '1.14.4' ? '-stable' : ''}.jar"
|
||||
classpath += "libraries/net/minecraft/server/${MC_VERSION}/server-${MC_VERSION}-extra.jar"
|
||||
|
||||
MANIFESTS.each{ pkg, values ->
|
||||
if (pkg == '/') {
|
||||
@@ -970,16 +973,16 @@ project(':forge') {
|
||||
}
|
||||
|
||||
task downloadInstaller(type: DownloadMavenArtifact) {
|
||||
artifact = 'net.minecraftforge:installer:2.0.+:shrunk'
|
||||
artifact = 'net.minecraftforge:installer:2.2.9:fatjar'
|
||||
changing = true
|
||||
}
|
||||
|
||||
task installerJar(type: Zip, dependsOn: [downloadInstaller, installerJson, launcherJson, genClientBinPatches, genServerBinPatches, 'signUniversalJar', 'signLauncherJar']) {
|
||||
task installerJar(type: Zip, dependsOn: [downloadInstaller, installerJson, launcherJson, genClientBinPatches, genServerBinPatches, universalJar, launcherJar]) {
|
||||
classifier = 'installer'
|
||||
extension = 'jar' //Needs to be Zip task to not override Manifest, so set extension
|
||||
destinationDir = file('build/libs')
|
||||
from(extraTxts)
|
||||
from(rootProject.file('/src/main/resources/forge_logo.png')) {
|
||||
from(rootProject.file('/installer_logo.png')) {
|
||||
rename{'big_logo.png'}
|
||||
}
|
||||
from(rootProject.file('/src/main/resources/url.png'))
|
||||
@@ -1003,24 +1006,12 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
[universalJar, launcherJar, installerJar].each { t ->
|
||||
task "sign${t.name.capitalize()}"(type: SignJar, dependsOn: t) {
|
||||
onlyIf {
|
||||
JAR_SIGNER != null && t.state.failure == null
|
||||
}
|
||||
def jarsigner = JAR_SIGNER == null ? [:] : JAR_SIGNER
|
||||
alias = 'forge'
|
||||
storePass = jarsigner.storepass
|
||||
keyPass = jarsigner.keypass
|
||||
keyStore = jarsigner.keystore
|
||||
inputFile = t.archivePath
|
||||
outputFile = t.archivePath
|
||||
doFirst {
|
||||
project.logger.lifecycle('Signing: ' + inputFile)
|
||||
}
|
||||
}
|
||||
t.finalizedBy(tasks.getByName("sign${t.name.capitalize()}"))
|
||||
}
|
||||
/*
|
||||
jarSigner.autoDetect()
|
||||
jarSigner.sign(universalJar)
|
||||
jarSigner.sign(launcherJar)
|
||||
jarSigner.sign(installerJar)
|
||||
*/
|
||||
|
||||
task makeMdk(type: Zip) {
|
||||
baseName = project.name
|
||||
@@ -1048,6 +1039,7 @@ project(':forge') {
|
||||
MAPPING_VERSION: MAPPING_VERSION
|
||||
])
|
||||
rename 'gitignore\\.txt', '.gitignore'
|
||||
rename 'gitattributes\\.txt', '.gitattributes'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1210,12 +1202,15 @@ project(':forge') {
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
if (project.hasProperty('forgeMavenPassword')) {
|
||||
credentials {
|
||||
username project.properties.forgeMavenUser
|
||||
password project.properties.forgeMavenPassword
|
||||
if (System.env.MAVEN_USER) {
|
||||
url "https://maven.minecraftforge.net/releases/"
|
||||
authentication {
|
||||
basic(BasicAuthentication)
|
||||
}
|
||||
credentials {
|
||||
username = System.env.MAVEN_USER ?: 'not'
|
||||
password = System.env.MAVEN_PASSWORD ?: 'set'
|
||||
}
|
||||
url 'https://files.minecraftforge.net/maven/manage/upload'
|
||||
} else {
|
||||
url 'file://' + rootProject.file('repo').getAbsolutePath()
|
||||
}
|
||||
@@ -1268,7 +1263,7 @@ def getArtifacts(project, config, classifiers) {
|
||||
def path = "${folder}${filename}"
|
||||
def url = "https://libraries.minecraft.net/${path}"
|
||||
if (!checkExists(url)) {
|
||||
url = "https://files.minecraftforge.net/maven/${path}"
|
||||
url = "https://maven.minecraftforge.net/${path}"
|
||||
}
|
||||
//TODO remove when Mojang launcher is updated
|
||||
if (!classifiers && art.classifier != null) { //Mojang launcher doesn't currently support classifiers, so... move it to part of the version, and force the extension to 'jar'
|
||||
@@ -1293,12 +1288,18 @@ def getArtifacts(project, config, classifiers) {
|
||||
}
|
||||
|
||||
def checkExists(url) {
|
||||
def code = new URL(url).openConnection().with {
|
||||
requestMethod = 'HEAD'
|
||||
connect()
|
||||
responseCode
|
||||
try {
|
||||
def code = new URL(url).openConnection().with {
|
||||
requestMethod = 'HEAD'
|
||||
connect()
|
||||
responseCode
|
||||
}
|
||||
return code == 200
|
||||
} catch (Exception e) {
|
||||
if (e.toString().contains('unable to find valid certification path to requested target'))
|
||||
throw new RuntimeException('Failed to connect to ' + url + ': Missing certificate root authority, try updating java')
|
||||
throw e
|
||||
}
|
||||
return code == 200
|
||||
}
|
||||
|
||||
def getClasspath(project, libs, artifact) {
|
||||
@@ -1313,6 +1314,7 @@ def getClasspath(project, libs, artifact) {
|
||||
|
||||
//evaluationDependsOnChildren()
|
||||
task setup() {
|
||||
if (findProject(':clean') != null)
|
||||
dependsOn ':clean:extractMapped'
|
||||
dependsOn ':forge:extractMapped' //These must be strings so that we can do lazy resolution. Else we need evaluationDependsOnChildren above
|
||||
}
|
||||
|
||||
+4
-4
@@ -2,16 +2,16 @@
|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos) [](https://forgedev.flocker.tv/)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
| Version | Support |
|
||||
| ------------- | ------------- |
|
||||
| 1.14.x | Active |
|
||||
| 1.12.x | Legacy |
|
||||
| 1.15.x | Active |
|
||||
| 1.14.x | LTS |
|
||||
|
||||
* [Download]
|
||||
* [Forum]
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
+10
-12
@@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = 'https://maven.minecraftforge.net/' }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
@@ -18,6 +17,8 @@ group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming
|
||||
archivesBaseName = 'modid'
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
//Print out JVM information so that we know what version is running. Extreamly useful for people to know when helping you.
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
|
||||
minecraft {
|
||||
// The mappings can be changed at any time, and must be in the following format.
|
||||
@@ -127,18 +128,15 @@ jar {
|
||||
}
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish task
|
||||
// we define a custom artifact that is sourced from the reobfJar output task
|
||||
// and then declare that to be published
|
||||
// Note you'll need to add a repository here
|
||||
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
||||
def reobfArtifact = artifacts.add('default', reobfFile) {
|
||||
type 'jar'
|
||||
builtBy 'reobfJar'
|
||||
}
|
||||
// This is the preferred method to reobfuscate your jar file
|
||||
jar.finalizedBy('reobfJar')
|
||||
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
|
||||
//publish.dependsOn('reobfJar')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact reobfArtifact
|
||||
artifact jar
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
@@ -146,4 +144,4 @@ publishing {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# Disable autocrlf on generated files, they always generate with LF
|
||||
# Add any extra files or paths here to make git stop saying they
|
||||
# are changed when only line endings change.
|
||||
src/generated/**/.cache/cache text eol=lf
|
||||
src/generated/**/*.json text eol=lf
|
||||
@@ -6,7 +6,7 @@
|
||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||
modLoader="javafml" #mandatory
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||
loaderVersion="[28,)" #mandatory (28 is current forge version)
|
||||
loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
issueTrackerURL="http://my.issue.tracker/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
@@ -42,7 +42,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory=true #mandatory
|
||||
# The version range of the dependency
|
||||
versionRange="[28,)" #mandatory
|
||||
versionRange="[31,)" #mandatory
|
||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||
ordering="NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||
@@ -51,6 +51,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.14.4]"
|
||||
versionRange="[1.15.2]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "examplemod resources",
|
||||
"pack_format": 4,
|
||||
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
|
||||
"pack_format": 5,
|
||||
"_comment": "A pack_format of 5 requires json lang files and some texture changes from 1.15. Note: we require v5 pack meta for all mods."
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -578,10 +578,17 @@
|
||||
@@ -579,10 +579,17 @@
|
||||
GL13.glClientActiveTexture(p_227747_0_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/vertex/IVertexBuilder.java
|
||||
+++ b/com/mojang/blaze3d/vertex/IVertexBuilder.java
|
||||
@@ -17,7 +17,7 @@
|
||||
@@ -18,7 +18,7 @@
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -9,3 +9,17 @@
|
||||
Logger field_227884_f_ = LogManager.getLogger();
|
||||
|
||||
IVertexBuilder func_225582_a_(double p_225582_1_, double p_225582_3_, double p_225582_5_);
|
||||
@@ -96,11 +96,12 @@
|
||||
f5 = p_227890_3_[k] * p_227890_6_;
|
||||
}
|
||||
|
||||
- int l = p_227890_7_[k];
|
||||
+ int l = applyBakedLighting(p_227890_7_[k], bytebuffer);
|
||||
float f9 = bytebuffer.getFloat(16);
|
||||
float f10 = bytebuffer.getFloat(20);
|
||||
Vector4f vector4f = new Vector4f(f, f1, f2, 1.0F);
|
||||
vector4f.func_229372_a_(matrix4f);
|
||||
+ applyBakedNormals(vector3f, bytebuffer, p_227890_1_.func_227872_b_());
|
||||
this.func_225588_a_(vector4f.func_195910_a(), vector4f.func_195913_b(), vector4f.func_195914_c(), f3, f4, f5, 1.0F, f9, f10, p_227890_8_, l, vector3f.func_195899_a(), vector3f.func_195900_b(), vector3f.func_195902_c());
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
--- a/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
|
||||
+++ b/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
|
||||
@@ -64,6 +64,15 @@
|
||||
super.tick();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean keyPressed(int key, int scanCode, int modifiers) {
|
||||
+ if (key == org.lwjgl.glfw.GLFW.GLFW_KEY_ESCAPE) {
|
||||
+ Realms.setScreen(this.field_224228_a);
|
||||
+ return true;
|
||||
+ }
|
||||
+ return super.keyPressed(key, scanCode, modifiers);
|
||||
+ }
|
||||
+
|
||||
public void render(int p_render_1_, int p_render_2_, float p_render_3_) {
|
||||
this.renderBackground();
|
||||
this.drawCenteredString(this.field_224229_b, this.width() / 2, 80, 16777215);
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/advancements/AdvancementList.java
|
||||
+++ b/net/minecraft/advancements/AdvancementList.java
|
||||
@@ -96,6 +96,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.common.AdvancementLoadFix.buildSortedTrees(this.field_192093_c);
|
||||
field_192091_a.info("Loaded {} advancements", (int)this.field_192092_b.size());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
--- a/net/minecraft/advancements/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/advancements/PlayerAdvancements.java
|
||||
@@ -187,6 +187,8 @@
|
||||
@@ -154,6 +154,7 @@
|
||||
}
|
||||
|
||||
this.func_192748_e();
|
||||
+ if (net.minecraftforge.common.ForgeConfig.SERVER.fixAdvancementLoading.get()) net.minecraftforge.common.AdvancementLoadFix.loadVisibility(this, this.field_192759_g, this.field_192760_h, this.field_192758_f, this.field_192761_i, this::func_192738_c); else
|
||||
this.func_192752_d();
|
||||
this.func_192751_c();
|
||||
}
|
||||
@@ -187,6 +188,8 @@
|
||||
}
|
||||
|
||||
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_) {
|
||||
@@ -9,7 +17,7 @@
|
||||
boolean flag = false;
|
||||
AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_);
|
||||
boolean flag1 = advancementprogress.func_192105_a();
|
||||
@@ -199,6 +201,7 @@
|
||||
@@ -199,6 +202,7 @@
|
||||
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223620_w)) {
|
||||
this.field_192756_d.func_184103_al().func_148539_a(new TranslationTextComponent("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/block/BambooBlock.java
|
||||
+++ b/net/minecraft/block/BambooBlock.java
|
||||
@@ -91,10 +91,11 @@
|
||||
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
|
||||
p_225534_2_.func_175655_b(p_225534_3_, true);
|
||||
} else if (p_225534_1_.func_177229_b(field_220266_f) == 0) {
|
||||
- if (p_225534_4_.nextInt(3) == 0 && p_225534_2_.func_175623_d(p_225534_3_.func_177984_a()) && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9) {
|
||||
+ if (true) {
|
||||
int i = this.func_220260_b(p_225534_2_, p_225534_3_) + 1;
|
||||
- if (i < 16) {
|
||||
+ if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(3) == 0 && p_225534_2_.func_175623_d(p_225534_3_.func_177984_a()) && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9)) {
|
||||
this.func_220258_a(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_, i);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,15 @@
|
||||
private static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
|
||||
private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() {
|
||||
public Boolean load(VoxelShape p_load_1_) {
|
||||
@@ -151,7 +152,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_220067_a(BlockState p_220067_1_, IBlockReader p_220067_2_, BlockPos p_220067_3_, EntityType<?> p_220067_4_) {
|
||||
- return p_220067_1_.func_224755_d(p_220067_2_, p_220067_3_, Direction.UP) && this.field_149784_t < 14;
|
||||
+ return p_220067_1_.func_224755_d(p_220067_2_, p_220067_3_, Direction.UP) && p_220067_1_.getLightValue(p_220067_2_, p_220067_3_) < 14;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -246,6 +247,10 @@
|
||||
this.field_149781_w = p_i48440_1_.field_200958_f;
|
||||
this.field_149782_v = p_i48440_1_.field_200959_g;
|
||||
@@ -49,7 +58,7 @@
|
||||
@Deprecated
|
||||
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
|
||||
- if (this.func_149716_u() && p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c()) {
|
||||
+ if (p_196243_1_.hasTileEntity() && p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c()) {
|
||||
+ if (p_196243_1_.hasTileEntity() && (p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c() || !p_196243_4_.hasTileEntity())) {
|
||||
p_196243_2_.func_175713_t(p_196243_3_);
|
||||
}
|
||||
-
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@
|
||||
@@ -87,9 +87,10 @@
|
||||
p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_));
|
||||
}
|
||||
|
||||
@@ -17,12 +17,13 @@
|
||||
- Block block = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a()).func_177230_c();
|
||||
- return block instanceof CropsBlock || block instanceof StemBlock || block instanceof AttachedStemBlock;
|
||||
+ private boolean func_176529_d(IBlockReader p_176529_0_, BlockPos p_176529_1_) {
|
||||
+ BlockState state = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a());
|
||||
+ return state.func_177230_c() instanceof net.minecraftforge.common.IPlantable && canSustainPlant(state, p_176529_0_, p_176529_1_, Direction.UP, (net.minecraftforge.common.IPlantable)state.func_177230_c());
|
||||
+ BlockState plant = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a());
|
||||
+ BlockState state = p_176529_0_.func_180495_p(p_176529_1_);
|
||||
+ return plant.func_177230_c() instanceof net.minecraftforge.common.IPlantable && state.canSustainPlant(p_176529_0_, p_176529_1_, Direction.UP, (net.minecraftforge.common.IPlantable)plant.func_177230_c());
|
||||
}
|
||||
|
||||
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
|
||||
@@ -99,7 +99,7 @@
|
||||
@@ -99,7 +100,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
for(Direction direction : Direction.values()) {
|
||||
BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction));
|
||||
- i = Math.max(this.func_220275_r(blockstate), i);
|
||||
+ i = Math.max(blockstate.getFlammability(p_176538_1_, p_176538_2_.func_177972_a(direction), direction.func_176734_d()), i);
|
||||
+ i = Math.max(blockstate.getFireSpreadSpeed(p_176538_1_, p_176538_2_.func_177972_a(direction), direction.func_176734_d()), i);
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
+ *
|
||||
+ * @param emptyPot The empty pot for this pot, or null for self.
|
||||
+ * @param p_i48395_1_ The flower block.
|
||||
+ * @param p_i48395_2_
|
||||
+ * @param properties
|
||||
+ */
|
||||
+ public FlowerPotBlock(@javax.annotation.Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, Block.Properties p_i48395_2_) {
|
||||
super(p_i48395_2_);
|
||||
|
||||
@@ -9,3 +9,48 @@
|
||||
netherportalblock$size.func_150859_c();
|
||||
return true;
|
||||
} else {
|
||||
@@ -241,13 +241,13 @@
|
||||
int i;
|
||||
for(i = 0; i < 22; ++i) {
|
||||
BlockPos blockpos = p_180120_1_.func_177967_a(p_180120_2_, i);
|
||||
- if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || this.field_150867_a.func_180495_p(blockpos.func_177977_b()).func_177230_c() != Blocks.field_150343_Z) {
|
||||
+ if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || !this.field_150867_a.func_180495_p(blockpos.func_177977_b()).isPortalFrame(this.field_150867_a, blockpos.func_177977_b())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- Block block = this.field_150867_a.func_180495_p(p_180120_1_.func_177967_a(p_180120_2_, i)).func_177230_c();
|
||||
- return block == Blocks.field_150343_Z ? i : 0;
|
||||
+ BlockPos framePos = p_180120_1_.func_177967_a(p_180120_2_, i);
|
||||
+ return this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos) ? i : 0;
|
||||
}
|
||||
|
||||
public int func_181100_a() {
|
||||
@@ -274,13 +274,13 @@
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150863_d)).func_177230_c();
|
||||
- if (block != Blocks.field_150343_Z) {
|
||||
+ BlockPos framePos = blockpos.func_177972_a(this.field_150863_d);
|
||||
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
|
||||
break label56;
|
||||
}
|
||||
} else if (i == this.field_150868_h - 1) {
|
||||
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150866_c)).func_177230_c();
|
||||
- if (block != Blocks.field_150343_Z) {
|
||||
+ BlockPos framePos = blockpos.func_177972_a(this.field_150866_c);
|
||||
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
|
||||
break label56;
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,8 @@
|
||||
}
|
||||
|
||||
for(int j = 0; j < this.field_150868_h; ++j) {
|
||||
- if (this.field_150867_a.func_180495_p(this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g)).func_177230_c() != Blocks.field_150343_Z) {
|
||||
+ BlockPos framePos = this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g);
|
||||
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
|
||||
this.field_150862_g = 0;
|
||||
break;
|
||||
}
|
||||
@@ -9,17 +9,18 @@
|
||||
p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0);
|
||||
}
|
||||
|
||||
@@ -60,6 +60,9 @@
|
||||
@@ -60,7 +60,9 @@
|
||||
if (p_225533_2_.field_72995_K) {
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
- p_225533_1_ = p_225533_1_.func_177231_a(field_196485_c);
|
||||
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_225533_2_, p_225533_3_, p_225533_1_, p_225533_1_.func_177229_b(field_196485_c), p_225533_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
|
||||
+ if (_new == -1) return ActionResultType.FAIL;
|
||||
+ p_225533_1_ = (BlockState)p_225533_1_.func_206870_a(field_196485_c, _new);
|
||||
p_225533_1_ = p_225533_1_.func_177231_a(field_196485_c);
|
||||
p_225533_2_.func_180501_a(p_225533_3_, p_225533_1_, 3);
|
||||
this.func_196482_a(p_225533_2_, p_225533_3_);
|
||||
@@ -76,6 +79,9 @@
|
||||
p_225533_4_.func_195066_a(Stats.field_188087_U);
|
||||
@@ -76,6 +78,9 @@
|
||||
}
|
||||
|
||||
public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) {
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
public class PoweredRailBlock extends AbstractRailBlock {
|
||||
public static final EnumProperty<RailShape> field_176568_b = BlockStateProperties.field_208166_S;
|
||||
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
|
||||
+ private final boolean isActivator;
|
||||
+ private final boolean isActivator; // TRUE for an Activator Rail, FALSE for Powered Rail
|
||||
|
||||
protected PoweredRailBlock(Block.Properties p_i48349_1_) {
|
||||
- super(true, p_i48349_1_);
|
||||
+ this(p_i48349_1_, false);
|
||||
+ }
|
||||
+
|
||||
+ protected PoweredRailBlock(Block.Properties builder, boolean isActivator) {
|
||||
+ protected PoweredRailBlock(Block.Properties builder, boolean isPoweredRail) {
|
||||
+ super(true, builder);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false)));
|
||||
+ this.isActivator = isActivator;
|
||||
+ this.isActivator = !isPoweredRail;
|
||||
}
|
||||
|
||||
protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, BlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) {
|
||||
@@ -35,3 +35,23 @@
|
||||
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
|
||||
} else {
|
||||
return false;
|
||||
@@ -156,6 +162,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176568_b, RailShape.SOUTH_EAST);
|
||||
case NORTH_EAST:
|
||||
return p_185499_1_.func_206870_a(field_176568_b, RailShape.SOUTH_WEST);
|
||||
+ //Forge fix: MC-196102
|
||||
+ case NORTH_SOUTH:
|
||||
+ case EAST_WEST:
|
||||
+ return p_185499_1_;
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176568_b)) {
|
||||
@@ -255,4 +265,8 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176568_b, field_176569_M);
|
||||
}
|
||||
+
|
||||
+ public boolean isActivatorRail() {
|
||||
+ return isActivator;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/block/RailBlock.java
|
||||
+++ b/net/minecraft/block/RailBlock.java
|
||||
@@ -49,6 +49,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176565_b, RailShape.SOUTH_EAST);
|
||||
case NORTH_EAST:
|
||||
return p_185499_1_.func_206870_a(field_176565_b, RailShape.SOUTH_WEST);
|
||||
+ //Forge fix: MC-196102
|
||||
+ case NORTH_SOUTH:
|
||||
+ case EAST_WEST:
|
||||
+ return p_185499_1_;
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176565_b)) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/StemBlock.java
|
||||
+++ b/net/minecraft/block/StemBlock.java
|
||||
@@ -40,22 +40,24 @@
|
||||
@@ -38,22 +38,24 @@
|
||||
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,4 +103,10 @@
|
||||
@@ -98,4 +100,10 @@
|
||||
public StemGrownBlock func_208486_d() {
|
||||
return this.field_149877_a;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@@ -12,7 +12,7 @@
|
||||
public class JungleTree extends BigTree {
|
||||
@Nullable
|
||||
protected ConfiguredFeature<TreeFeatureConfig, ?> func_225546_b_(Random p_225546_1_) {
|
||||
protected ConfiguredFeature<TreeFeatureConfig, ?> func_225546_b_(Random p_225546_1_, boolean p_225546_2_) {
|
||||
- return (new TreeFeature(TreeFeatureConfig::func_227338_a_)).func_225566_b_(DefaultBiomeFeatures.field_226808_c_);
|
||||
+ return (new TreeFeature(TreeFeatureConfig::deserializeJungle)).func_225566_b_(DefaultBiomeFeatures.field_226808_c_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -170,6 +170,7 @@
|
||||
@@ -171,6 +171,7 @@
|
||||
public String field_74363_ab = "en_us";
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
@@ -8,20 +8,20 @@
|
||||
this.field_74317_L = p_i46326_1_;
|
||||
this.field_74354_ai = new File(p_i46326_2_, "options.txt");
|
||||
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
|
||||
@@ -485,7 +486,11 @@
|
||||
@@ -490,7 +491,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s.equals("key_" + keybinding.func_151464_g())) {
|
||||
- keybinding.func_197979_b(InputMappings.func_197955_a(s1));
|
||||
+ if (s.indexOf(':') != -1) {
|
||||
+ String[] pts = s.split(":");
|
||||
+ if (s1.indexOf(':') != -1) {
|
||||
+ String[] pts = s1.split(":");
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(pts[1]), InputMappings.func_197955_a(pts[0]));
|
||||
+ } else
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s));
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,6 +538,7 @@
|
||||
@@ -538,6 +543,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
@@ -29,8 +29,8 @@
|
||||
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
|
||||
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
|
||||
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
|
||||
@@ -609,7 +615,7 @@
|
||||
printwriter.println("glDebugVerbosity:" + this.field_209231_W);
|
||||
@@ -615,7 +621,7 @@
|
||||
printwriter.println("skipMultiplayerWarning:" + this.field_230152_Z_);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
- printwriter.println("key_" + keybinding.func_151464_g() + ":" + keybinding.func_197982_m());
|
||||
@@ -38,11 +38,8 @@
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -706,6 +712,25 @@
|
||||
}
|
||||
}
|
||||
@@ -714,4 +720,22 @@
|
||||
|
||||
+ if (net.minecraftforge.fml.client.ClientModLoader.isLoading()) return; //Don't save settings before mods add keybindigns and the like to prevent them from being deleted.
|
||||
p_198017_1_.func_198985_a(set);
|
||||
}
|
||||
+
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/client/MainWindow.java
|
||||
+++ b/net/minecraft/client/MainWindow.java
|
||||
@@ -86,7 +86,7 @@
|
||||
GLFW.glfwWindowHint(139266, 2);
|
||||
GLFW.glfwWindowHint(139267, 0);
|
||||
GLFW.glfwWindowHint(139272, 0);
|
||||
- this.field_198119_f = GLFW.glfwCreateWindow(this.field_198129_p, this.field_198130_q, p_i51170_5_, this.field_198125_l && monitor != null ? monitor.func_197995_f() : 0L, 0L);
|
||||
+ this.field_198119_f = net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.handOffWindow(()->this.field_198129_p, ()->this.field_198130_q, ()->p_i51170_5_, ()->this.field_198125_l && monitor != null ? monitor.func_197995_f() : 0L);
|
||||
if (monitor != null) {
|
||||
VideoMode videomode = monitor.func_197992_a(this.field_198125_l ? this.field_198124_k : Optional.empty());
|
||||
this.field_198120_g = this.field_198127_n = monitor.func_197989_c() + videomode.func_198064_a() / 2 - this.field_198129_p / 2;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -321,6 +321,7 @@
|
||||
@@ -322,6 +322,7 @@
|
||||
public Minecraft(GameConfiguration p_i45547_1_) {
|
||||
super("Client");
|
||||
field_71432_P = this;
|
||||
@@ -8,7 +8,7 @@
|
||||
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
|
||||
File file1 = p_i45547_1_.field_178744_c.field_178759_c;
|
||||
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
|
||||
@@ -335,7 +336,6 @@
|
||||
@@ -336,7 +337,6 @@
|
||||
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
|
||||
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
||||
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
|
||||
@@ -16,15 +16,16 @@
|
||||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_147129_ai = func_147122_X();
|
||||
this.field_71437_Z = null;
|
||||
@@ -367,6 +367,7 @@
|
||||
screensize = p_i45547_1_.field_178743_b;
|
||||
@@ -350,7 +350,7 @@
|
||||
i = 0;
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.join();
|
||||
Util.field_211180_a = RenderSystem.initBackendSystem();
|
||||
this.field_195557_T = new VirtualScreen(this);
|
||||
this.field_195558_d = this.field_195557_T.func_217626_a(screensize, this.field_71474_y.field_198019_u, "Minecraft " + SharedConstants.func_215069_a().getName());
|
||||
@@ -382,7 +383,6 @@
|
||||
- Bootstrap.func_151354_b();
|
||||
+ net.minecraftforge.fml.loading.BackgroundWaiter.runAndTick(()->Bootstrap.func_151354_b(), net.minecraftforge.fml.loading.FMLLoader.progressWindowTick);
|
||||
Bootstrap.func_218821_c();
|
||||
KeybindTextComponent.field_193637_b = KeyBinding::func_193626_b;
|
||||
this.field_184131_U = DataFixesManager.func_210901_a();
|
||||
@@ -383,13 +383,13 @@
|
||||
|
||||
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
|
||||
this.field_71417_B = new MouseHelper(this);
|
||||
@@ -32,15 +33,14 @@
|
||||
this.field_195559_v = new KeyboardListener(this);
|
||||
this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i());
|
||||
RenderSystem.initRenderer(this.field_71474_y.field_209231_W, false);
|
||||
@@ -390,6 +390,7 @@
|
||||
this.field_147124_at = new Framebuffer(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), true, field_142025_a);
|
||||
this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F);
|
||||
this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC);
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.begin(this, this.field_110448_aq, this.field_110451_am, this.field_195554_ax);
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
this.field_110448_aq.func_198983_a();
|
||||
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
|
||||
this.field_110451_am.func_219534_a(this.field_135017_as);
|
||||
@@ -433,12 +434,14 @@
|
||||
@@ -434,12 +434,14 @@
|
||||
this.func_193986_ar();
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
@@ -56,7 +56,7 @@
|
||||
this.field_184132_p = new DebugRenderer(this);
|
||||
RenderSystem.setErrorCallback(this::func_195545_a);
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
@@ -450,12 +453,11 @@
|
||||
@@ -451,12 +453,11 @@
|
||||
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
|
||||
this.field_195558_d.func_227801_c_();
|
||||
this.func_213226_a();
|
||||
@@ -73,7 +73,7 @@
|
||||
ResourceLoadProgressGui.func_212970_a(this);
|
||||
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
|
||||
this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219537_a(Util.func_215072_e(), this, field_223714_G, list), (p_229990_2_) -> {
|
||||
@@ -465,6 +467,14 @@
|
||||
@@ -466,6 +467,14 @@
|
||||
this.func_213256_aB();
|
||||
}
|
||||
|
||||
@@ -88,7 +88,16 @@
|
||||
});
|
||||
}, false));
|
||||
}
|
||||
@@ -545,7 +555,7 @@
|
||||
@@ -505,7 +514,7 @@
|
||||
}
|
||||
|
||||
private void func_229988_a_(Throwable p_229988_1_) {
|
||||
- if (this.field_110448_aq.func_198980_d().size() > 1) {
|
||||
+ if (this.field_110448_aq.func_198980_d().stream().anyMatch(e -> !e.func_195797_g())) { //Forge: This caused infinite loop if any resource packs are forced. Such as mod resources. So check if we can disable any.
|
||||
ITextComponent itextcomponent;
|
||||
if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) {
|
||||
itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_230028_a().func_195762_a());
|
||||
@@ -579,7 +588,7 @@
|
||||
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
|
||||
});
|
||||
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
|
||||
@@ -97,7 +106,7 @@
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -633,13 +643,13 @@
|
||||
@@ -667,13 +676,13 @@
|
||||
Bootstrap.func_179870_a(p_71377_0_.func_71502_e());
|
||||
if (p_71377_0_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f());
|
||||
@@ -114,7 +123,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -648,6 +658,7 @@
|
||||
@@ -682,6 +691,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -122,7 +131,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -726,10 +737,6 @@
|
||||
@@ -760,10 +770,6 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -133,7 +142,7 @@
|
||||
if (p_147108_1_ == null && this.field_71441_e == null) {
|
||||
p_147108_1_ = new MainMenuScreen();
|
||||
} else if (p_147108_1_ == null && this.field_71439_g.func_110143_aJ() <= 0.0F) {
|
||||
@@ -740,6 +747,14 @@
|
||||
@@ -774,6 +780,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +157,7 @@
|
||||
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
this.field_71456_v.func_146158_b().func_146231_a(true);
|
||||
@@ -862,11 +877,13 @@
|
||||
@@ -905,11 +919,13 @@
|
||||
RenderSystem.enableTexture();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
@@ -162,20 +171,49 @@
|
||||
}
|
||||
|
||||
this.field_71424_I.func_219897_b();
|
||||
@@ -1121,10 +1138,10 @@
|
||||
@@ -976,7 +992,7 @@
|
||||
|
||||
Framebuffer framebuffer = this.func_147110_a();
|
||||
framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a);
|
||||
- this.field_71460_t.func_147704_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
+ if (this.field_71460_t!=null) this.field_71460_t.func_147704_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71417_B.func_198021_g();
|
||||
}
|
||||
|
||||
@@ -1164,11 +1180,21 @@
|
||||
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
- if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) {
|
||||
+ if (!this.field_71441_e.func_175623_d(blockpos)) {
|
||||
+ net.minecraftforge.client.event.InputEvent.ClickInputEvent inputEvent = net.minecraftforge.client.ForgeHooksClient.onClickInput(0, this.field_71474_y.field_74312_F, Hand.MAIN_HAND);
|
||||
+ if (inputEvent.isCanceled()) {
|
||||
+ if (inputEvent.shouldSwingHand()) {
|
||||
+ this.field_71452_i.addBlockHitEffects(blockpos, blockraytraceresult);
|
||||
+ this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
Direction direction = blockraytraceresult.func_216354_b();
|
||||
if (this.field_71442_b.func_180512_c(blockpos, direction)) {
|
||||
- this.field_71452_i.func_180532_a(blockpos, direction);
|
||||
+ if (inputEvent.shouldSwingHand()) {
|
||||
+ this.field_71452_i.addBlockHitEffects(blockpos, blockraytraceresult);
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1151,7 +1168,7 @@
|
||||
|
||||
@@ -1187,6 +1213,8 @@
|
||||
}
|
||||
|
||||
} else if (!this.field_71439_g.func_184838_M()) {
|
||||
+ net.minecraftforge.client.event.InputEvent.ClickInputEvent inputEvent = net.minecraftforge.client.ForgeHooksClient.onClickInput(0, this.field_71474_y.field_74312_F, Hand.MAIN_HAND);
|
||||
+ if (!inputEvent.isCanceled())
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
case ENTITY:
|
||||
this.field_71442_b.func_78764_a(this.field_71439_g, ((EntityRayTraceResult)this.field_71476_x).func_216348_a());
|
||||
@@ -1194,7 +1222,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -184,15 +222,46 @@
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1161,6 +1178,7 @@
|
||||
@@ -1204,8 +1232,10 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyLeftClick(this.field_71439_g);
|
||||
}
|
||||
|
||||
+ if (inputEvent.shouldSwingHand())
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
@@ -1217,6 +1235,9 @@
|
||||
}
|
||||
}
|
||||
@@ -1220,6 +1250,11 @@
|
||||
}
|
||||
|
||||
for(Hand hand : Hand.values()) {
|
||||
+ net.minecraftforge.client.event.InputEvent.ClickInputEvent inputEvent = net.minecraftforge.client.ForgeHooksClient.onClickInput(1, this.field_71474_y.field_74313_G, hand);
|
||||
+ if (inputEvent.isCanceled()) {
|
||||
+ if (inputEvent.shouldSwingHand()) this.field_71439_g.func_184609_a(hand);
|
||||
+ return;
|
||||
+ }
|
||||
ItemStack itemstack = this.field_71439_g.func_184586_b(hand);
|
||||
if (this.field_71476_x != null) {
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
@@ -1233,6 +1268,7 @@
|
||||
|
||||
if (actionresulttype.func_226246_a_()) {
|
||||
if (actionresulttype.func_226247_b_()) {
|
||||
+ if (inputEvent.shouldSwingHand())
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
}
|
||||
|
||||
@@ -1245,6 +1281,7 @@
|
||||
ActionResultType actionresulttype1 = this.field_71442_b.func_217292_a(this.field_71439_g, this.field_71441_e, hand, blockraytraceresult);
|
||||
if (actionresulttype1.func_226246_a_()) {
|
||||
if (actionresulttype1.func_226247_b_()) {
|
||||
+ if (inputEvent.shouldSwingHand())
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
if (!itemstack.func_190926_b() && (itemstack.func_190916_E() != i || this.field_71442_b.func_78758_h())) {
|
||||
this.field_71460_t.field_78516_c.func_187460_a(hand);
|
||||
@@ -1260,6 +1297,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +271,7 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand);
|
||||
if (actionresulttype2.func_226246_a_()) {
|
||||
@@ -1243,6 +1264,8 @@
|
||||
@@ -1286,6 +1326,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -211,7 +280,7 @@
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1360,6 +1383,8 @@
|
||||
@@ -1403,6 +1445,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -220,7 +289,7 @@
|
||||
}
|
||||
|
||||
private void func_184117_aA() {
|
||||
@@ -1514,6 +1539,12 @@
|
||||
@@ -1557,6 +1601,12 @@
|
||||
this.func_147108_a(worldloadprogressscreen);
|
||||
|
||||
while(!this.field_71437_Z.func_71200_ad()) {
|
||||
@@ -233,7 +302,7 @@
|
||||
worldloadprogressscreen.tick();
|
||||
this.func_195542_b(false);
|
||||
|
||||
@@ -1534,11 +1565,17 @@
|
||||
@@ -1577,11 +1627,17 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
@@ -252,7 +321,7 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1570,10 +1607,12 @@
|
||||
@@ -1613,10 +1669,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
@@ -265,15 +334,23 @@
|
||||
if (integratedserver != null) {
|
||||
while(!integratedserver.func_213201_w()) {
|
||||
this.func_195542_b(false);
|
||||
@@ -1605,6 +1644,7 @@
|
||||
this.field_71438_f.func_72732_a(p_213257_1_);
|
||||
@@ -1627,6 +1685,7 @@
|
||||
this.field_71456_v.func_181029_i();
|
||||
this.field_71422_O = null;
|
||||
this.field_71455_al = false;
|
||||
+ net.minecraftforge.fml.client.ClientHooks.handleClientWorldClosing(field_71441_e);
|
||||
this.field_213274_aO.func_216815_b();
|
||||
}
|
||||
|
||||
@@ -1649,6 +1708,7 @@
|
||||
this.field_71452_i.func_78870_a(p_213257_1_);
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
this.func_230150_b_();
|
||||
+ net.minecraftforge.client.MinecraftForgeClient.clearRenderCache();
|
||||
}
|
||||
|
||||
public final boolean func_71355_q() {
|
||||
@@ -1630,112 +1670,8 @@
|
||||
@@ -1674,112 +1734,9 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -383,12 +460,13 @@
|
||||
- }
|
||||
-
|
||||
- }
|
||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onClickInput(2, this.field_71474_y.field_74322_I, Hand.MAIN_HAND).isCanceled())
|
||||
+ net.minecraftforge.common.ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e);
|
||||
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1817,6 +1753,7 @@
|
||||
@@ -1861,6 +1818,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
@@ -396,7 +474,7 @@
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
|
||||
return p_229993_0_;
|
||||
@@ -1944,6 +1881,8 @@
|
||||
@@ -1988,6 +1946,8 @@
|
||||
}
|
||||
|
||||
public MusicTicker.MusicType func_147109_W() {
|
||||
@@ -405,7 +483,7 @@
|
||||
if (this.field_71462_r instanceof WinGameScreen) {
|
||||
return MusicTicker.MusicType.CREDITS;
|
||||
} else if (this.field_71439_g == null) {
|
||||
@@ -2120,7 +2059,7 @@
|
||||
@@ -2164,7 +2124,7 @@
|
||||
supplier = func_228022_c_(supplier);
|
||||
}
|
||||
|
||||
@@ -414,7 +492,7 @@
|
||||
}
|
||||
|
||||
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
|
||||
@@ -2138,4 +2077,12 @@
|
||||
@@ -2182,4 +2142,12 @@
|
||||
public void func_228020_b_(int p_228020_1_) {
|
||||
this.field_175617_aL.func_229355_a_(p_228020_1_);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
--- a/net/minecraft/client/MouseHelper.java
|
||||
+++ b/net/minecraft/client/MouseHelper.java
|
||||
@@ -72,16 +72,21 @@
|
||||
if (!this.field_198051_p && flag) {
|
||||
this.func_198034_i();
|
||||
}
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onRawMouseClicked(p_198023_3_, p_198023_4_, p_198023_5_)) return;
|
||||
} else {
|
||||
double d0 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
|
||||
@@ -66,6 +66,7 @@
|
||||
this.field_198042_g = -1;
|
||||
}
|
||||
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onRawMouseClicked(p_198023_3_, p_198023_4_, p_198023_5_)) return;
|
||||
boolean[] aboolean = new boolean[]{false};
|
||||
if (this.field_198036_a.field_213279_p == null) {
|
||||
if (this.field_198036_a.field_71462_r == null) {
|
||||
@@ -77,11 +78,15 @@
|
||||
double d1 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
if (flag) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
|
||||
@@ -46,6 +46,15 @@
|
||||
}
|
||||
|
||||
boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c;
|
||||
@@ -667,7 +675,7 @@
|
||||
|
||||
if (this.field_71158_b.field_78901_c && !flag7 && !flag && !this.field_71075_bZ.field_75100_b && !this.func_184218_aH() && !this.func_70617_f_()) {
|
||||
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
||||
- if (itemstack.func_77973_b() == Items.field_185160_cR && ElytraItem.func_185069_d(itemstack) && this.func_226566_ei_()) {
|
||||
+ if (itemstack.canElytraFly(this) && this.func_226566_ei_()) {
|
||||
this.field_71174_a.func_147297_a(new CEntityActionPacket(this, CEntityActionPacket.Action.START_FALL_FLYING));
|
||||
}
|
||||
}
|
||||
@@ -961,4 +969,16 @@
|
||||
return this.field_204230_bP;
|
||||
}
|
||||
|
||||
@@ -40,3 +40,12 @@
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
@@ -1045,7 +1056,7 @@
|
||||
ItemStack itemstack = this.field_73839_d.field_71439_g.field_71071_by.func_70448_g();
|
||||
if (itemstack.func_190926_b()) {
|
||||
this.field_92017_k = 0;
|
||||
- } else if (!this.field_92016_l.func_190926_b() && itemstack.func_77973_b() == this.field_92016_l.func_77973_b() && itemstack.func_200301_q().equals(this.field_92016_l.func_200301_q())) {
|
||||
+ } else if (!this.field_92016_l.func_190926_b() && itemstack.func_77973_b() == this.field_92016_l.func_77973_b() && (itemstack.func_200301_q().equals(this.field_92016_l.func_200301_q()) && itemstack.getHighlightTip(itemstack.func_200301_q().func_150261_e()).equals(field_92016_l.getHighlightTip(field_92016_l.func_200301_q().func_150261_e())))) {
|
||||
if (this.field_92017_k > 0) {
|
||||
--this.field_92017_k;
|
||||
}
|
||||
@@ -8,3 +8,19 @@
|
||||
if (f < 1.0F) {
|
||||
this.func_228181_a_(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
|
||||
}
|
||||
@@ -90,6 +91,7 @@
|
||||
}
|
||||
|
||||
if (this.field_212979_g == -1L && this.field_212975_c.func_219554_d() && (!this.field_212977_e || f1 >= 2.0F)) {
|
||||
+ this.field_212979_g = Util.func_211177_b(); // Moved up to guard against inf loops caused by callback
|
||||
try {
|
||||
this.field_212975_c.func_219556_e();
|
||||
this.field_212976_d.accept(Optional.empty());
|
||||
@@ -97,7 +99,6 @@
|
||||
this.field_212976_d.accept(Optional.of(throwable));
|
||||
}
|
||||
|
||||
- this.field_212979_g = Util.func_211177_b();
|
||||
if (this.field_212974_b.field_71462_r != null) {
|
||||
this.field_212974_b.field_71462_r.init(this.field_212974_b, this.field_212974_b.func_228018_at_().func_198107_o(), this.field_212974_b.func_228018_at_().func_198087_p());
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
} else {
|
||||
this.func_73969_a(j, 24);
|
||||
+ modbutton = this.addButton(new Button(this.width / 2 - 100, j + 24 * 2, 98, 20, I18n.func_135052_a("fml.menu.mods"), button -> {
|
||||
+ this.minecraft.func_147108_a(new net.minecraftforge.fml.client.gui.GuiModList(this));
|
||||
+ this.minecraft.func_147108_a(new net.minecraftforge.fml.client.gui.screen.ModListScreen(this));
|
||||
+ }));
|
||||
}
|
||||
|
||||
@@ -31,16 +31,16 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +132,7 @@
|
||||
this.addButton(new Button(this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, 200, 20, I18n.func_135052_a("menu.multiplayer"), (p_213086_1_) -> {
|
||||
this.minecraft.func_147108_a(new MultiplayerScreen(this));
|
||||
@@ -131,7 +137,7 @@
|
||||
}
|
||||
|
||||
}));
|
||||
- this.addButton(new Button(this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 200, 20, I18n.func_135052_a("menu.online"), (p_213095_1_) -> {
|
||||
+ this.addButton(new Button(this.width / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("menu.online"), (p_213095_1_) -> {
|
||||
this.func_140005_i();
|
||||
}));
|
||||
}
|
||||
@@ -190,6 +196,7 @@
|
||||
@@ -195,6 +201,7 @@
|
||||
|
||||
this.minecraft.func_110434_K().func_110577_a(field_194400_H);
|
||||
blit(j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);
|
||||
@@ -48,8 +48,8 @@
|
||||
if (this.field_73975_c != null) {
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.translatef((float)(this.width / 2 + 90), 70.0F, 0.0F);
|
||||
@@ -208,7 +215,13 @@
|
||||
s = s + ("release".equalsIgnoreCase(this.minecraft.func_184123_d()) ? "" : "/" + this.minecraft.func_184123_d());
|
||||
@@ -217,7 +224,13 @@
|
||||
s = s + I18n.func_135052_a("menu.modded");
|
||||
}
|
||||
|
||||
- this.drawString(this.font, s, 2, this.height - 10, 16777215 | l);
|
||||
@@ -63,7 +63,7 @@
|
||||
this.drawString(this.font, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.height - 10, 16777215 | l);
|
||||
if (p_render_1_ > this.field_193979_N && p_render_1_ < this.field_193979_N + this.field_193978_M && p_render_2_ > this.height - 10 && p_render_2_ < this.height) {
|
||||
fill(this.field_193979_N, this.height - 1, this.field_193979_N + this.field_193978_M, this.height, 16777215 | l);
|
||||
@@ -222,6 +235,7 @@
|
||||
@@ -231,6 +244,7 @@
|
||||
if (this.func_183501_a() && f1 >= 1.0F) {
|
||||
this.field_183503_M.render(p_render_1_, p_render_2_, p_render_3_);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/client/gui/screen/MultiplayerScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/MultiplayerScreen.java
|
||||
@@ -241,6 +241,11 @@
|
||||
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void onClose() {
|
||||
+ this.minecraft.func_147108_a(this.field_146798_g);
|
||||
+ }
|
||||
+
|
||||
public ServerPinger func_146789_i() {
|
||||
return this.field_146797_f;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/screen/OptionsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/OptionsScreen.java
|
||||
@@ -118,4 +118,12 @@
|
||||
this.drawCenteredString(this.font, this.title.func_150254_d(), this.width / 2, 15, 16777215);
|
||||
super.render(p_render_1_, p_render_2_, p_render_3_);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public void onClose() {
|
||||
+ // We need to consider 2 potential parent screens here:
|
||||
+ // 1. From the main menu, in which case display the main menu
|
||||
+ // 2. From the pause menu, in which case exit back to game
|
||||
+ this.minecraft.func_147108_a(this.field_146441_g instanceof IngameMenuScreen ? null : this.field_146441_g);
|
||||
+ }
|
||||
}
|
||||
@@ -6,9 +6,9 @@
|
||||
protected void renderTooltip(ItemStack p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) {
|
||||
- this.renderTooltip(this.getTooltipFromItem(p_renderTooltip_1_), p_renderTooltip_2_, p_renderTooltip_3_);
|
||||
+ FontRenderer font = p_renderTooltip_1_.func_77973_b().getFontRenderer(p_renderTooltip_1_);
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_renderTooltip_1_);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_renderTooltip_1_);
|
||||
+ this.renderTooltip(this.getTooltipFromItem(p_renderTooltip_1_), p_renderTooltip_2_, p_renderTooltip_3_, (font == null ? this.font : font));
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip();
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
|
||||
}
|
||||
|
||||
public List<String> getTooltipFromItem(ItemStack p_getTooltipFromItem_1_) {
|
||||
@@ -20,7 +20,7 @@
|
||||
+ renderTooltip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, font);
|
||||
+ }
|
||||
+ public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_, FontRenderer font) {
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.drawHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, width, height, -1, font);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, width, height, -1, font);
|
||||
+ if (false && !p_renderTooltip_1_.isEmpty()) {
|
||||
RenderSystem.disableRescaleNormal();
|
||||
RenderSystem.disableDepthTest();
|
||||
|
||||
+2
-2
@@ -180,9 +180,9 @@
|
||||
|
||||
- this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_);
|
||||
+ net.minecraft.client.gui.FontRenderer font = p_renderTooltip_1_.func_77973_b().getFontRenderer(p_renderTooltip_1_);
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_renderTooltip_1_);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_renderTooltip_1_);
|
||||
+ this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_, (font == null ? this.font : font));
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip();
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
|
||||
} else {
|
||||
super.renderTooltip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_);
|
||||
}
|
||||
|
||||
@@ -24,17 +24,21 @@
|
||||
public void setAlpha(float p_setAlpha_1_) {
|
||||
this.alpha = p_setAlpha_1_;
|
||||
}
|
||||
@@ -233,4 +241,13 @@
|
||||
@@ -233,4 +241,17 @@
|
||||
protected void setFocused(boolean p_setFocused_1_) {
|
||||
this.focused = p_setFocused_1_;
|
||||
}
|
||||
+
|
||||
+ protected int packedFGColor = 0;
|
||||
+ public static final int UNSET_FG_COLOR = -1;
|
||||
+ protected int packedFGColor = UNSET_FG_COLOR;
|
||||
+ public int getFGColor() {
|
||||
+ if (packedFGColor != 0) return packedFGColor;
|
||||
+ return this.active ? 16777215 : 10526880;
|
||||
+ if (packedFGColor != UNSET_FG_COLOR) return packedFGColor;
|
||||
+ return this.active ? 16777215 : 10526880; // White : Light Grey
|
||||
+ }
|
||||
+ public void setFGColor(int color) {
|
||||
+ this.packedFGColor = color;
|
||||
+ }
|
||||
+ public void clearFGColor() {
|
||||
+ this.packedFGColor = UNSET_FG_COLOR;
|
||||
+ }
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
if (this.field_78776_a.field_71439_g.func_223729_a(this.field_78776_a.field_71441_e, p_187103_1_, this.field_78779_k)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -103,7 +104,7 @@
|
||||
@@ -103,12 +104,11 @@
|
||||
Block block = blockstate.func_177230_c();
|
||||
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
|
||||
return false;
|
||||
@@ -16,8 +16,14 @@
|
||||
+ } else if (blockstate.isAir(world, p_187103_1_)) {
|
||||
return false;
|
||||
} else {
|
||||
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
|
||||
@@ -129,21 +130,25 @@
|
||||
- block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
|
||||
IFluidState ifluidstate = world.func_204610_c(p_187103_1_);
|
||||
- boolean flag = world.func_180501_a(p_187103_1_, ifluidstate.func_206883_i(), 11);
|
||||
+ boolean flag = blockstate.removedByPlayer(world, p_187103_1_, field_78776_a.field_71439_g, false, ifluidstate);
|
||||
if (flag) {
|
||||
block.func_176206_d(world, p_187103_1_, blockstate);
|
||||
}
|
||||
@@ -129,21 +129,25 @@
|
||||
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_);
|
||||
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate, 1.0F);
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
|
||||
@@ -44,7 +50,7 @@
|
||||
if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) {
|
||||
this.func_187103_a(p_180511_1_);
|
||||
} else {
|
||||
@@ -183,22 +188,24 @@
|
||||
@@ -183,22 +187,24 @@
|
||||
BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
|
||||
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, blockstate1, 1.0F);
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
|
||||
@@ -71,7 +77,7 @@
|
||||
if (this.field_78770_f >= 1.0F) {
|
||||
this.field_78778_j = false;
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
|
||||
@@ -217,7 +224,8 @@
|
||||
@@ -217,7 +223,8 @@
|
||||
}
|
||||
|
||||
public float func_78757_d() {
|
||||
@@ -81,7 +87,7 @@
|
||||
}
|
||||
|
||||
public void func_78765_e() {
|
||||
@@ -234,7 +242,7 @@
|
||||
@@ -234,7 +241,7 @@
|
||||
ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca();
|
||||
boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b();
|
||||
if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) {
|
||||
@@ -90,7 +96,7 @@
|
||||
}
|
||||
|
||||
return p_178893_1_.equals(this.field_178895_c) && flag;
|
||||
@@ -256,13 +264,19 @@
|
||||
@@ -256,13 +263,27 @@
|
||||
return ActionResultType.FAIL;
|
||||
} else {
|
||||
ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_);
|
||||
@@ -105,6 +111,14 @@
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
- boolean flag = !p_217292_1_.func_184614_ca().func_190926_b() || !p_217292_1_.func_184592_cb().func_190926_b();
|
||||
+ ItemUseContext itemusecontext = new ItemUseContext(p_217292_1_, p_217292_3_, p_217292_4_);
|
||||
+ if (event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
|
||||
+ ActionResultType result = itemstack.onItemUseFirst(itemusecontext);
|
||||
+ if (result != ActionResultType.PASS) {
|
||||
+ this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
+ return result;
|
||||
+ }
|
||||
+ }
|
||||
+ boolean flag = !p_217292_1_.func_184614_ca().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_) || !p_217292_1_.func_184592_cb().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_);
|
||||
boolean flag1 = p_217292_1_.func_226563_dT_() && flag;
|
||||
- if (!flag1) {
|
||||
@@ -112,15 +126,17 @@
|
||||
ActionResultType actionresulttype = p_217292_2_.func_180495_p(blockpos).func_227031_a_(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_);
|
||||
if (actionresulttype.func_226246_a_()) {
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
@@ -271,6 +285,7 @@
|
||||
@@ -271,8 +292,8 @@
|
||||
}
|
||||
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return ActionResultType.PASS;
|
||||
if (!itemstack.func_190926_b() && !p_217292_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
|
||||
ItemUseContext itemusecontext = new ItemUseContext(p_217292_1_, p_217292_3_, p_217292_4_);
|
||||
- ItemUseContext itemusecontext = new ItemUseContext(p_217292_1_, p_217292_3_, p_217292_4_);
|
||||
ActionResultType actionresulttype1;
|
||||
@@ -300,11 +315,14 @@
|
||||
if (this.field_78779_k.func_77145_d()) {
|
||||
int i = itemstack.func_190916_E();
|
||||
@@ -300,11 +321,14 @@
|
||||
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
|
||||
return ActionResultType.PASS;
|
||||
} else {
|
||||
@@ -135,7 +151,7 @@
|
||||
}
|
||||
|
||||
return actionresult.func_188397_a();
|
||||
@@ -329,6 +347,9 @@
|
||||
@@ -329,6 +353,9 @@
|
||||
public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) {
|
||||
this.func_78750_j();
|
||||
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_));
|
||||
@@ -145,7 +161,7 @@
|
||||
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
|
||||
}
|
||||
|
||||
@@ -336,6 +357,9 @@
|
||||
@@ -336,6 +363,9 @@
|
||||
this.func_78750_j();
|
||||
Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.func_226277_ct_(), p_187102_2_.func_226278_cu_(), p_187102_2_.func_226281_cx_());
|
||||
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d));
|
||||
|
||||
@@ -39,17 +39,27 @@
|
||||
this.field_187241_h.add(p_78873_1_);
|
||||
}
|
||||
|
||||
@@ -312,7 +313,8 @@
|
||||
@@ -305,14 +306,18 @@
|
||||
|
||||
public void func_228345_a_(MatrixStack p_228345_1_, IRenderTypeBuffer.Impl p_228345_2_, LightTexture p_228345_3_, ActiveRenderInfo p_228345_4_, float p_228345_5_) {
|
||||
p_228345_3_.func_205109_c();
|
||||
+ Runnable enable = () -> {
|
||||
RenderSystem.enableAlphaTest();
|
||||
RenderSystem.defaultAlphaFunc();
|
||||
RenderSystem.enableDepthTest();
|
||||
RenderSystem.enableFog();
|
||||
+ };
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.multMatrix(p_228345_1_.func_227866_c_().func_227870_a_());
|
||||
|
||||
- for(IParticleRenderType iparticlerendertype : field_215241_b) {
|
||||
+ for(IParticleRenderType iparticlerendertype : this.field_78876_b.keySet()) { // Forge: allow custom IParticleRenderType's
|
||||
+ if (iparticlerendertype == IParticleRenderType.field_217606_f) continue;
|
||||
+ enable.run(); //Forge: MC-168672 Make sure all render types have the correct GL state.
|
||||
Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype);
|
||||
if (iterable != null) {
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -351,7 +353,7 @@
|
||||
@@ -351,7 +356,7 @@
|
||||
}
|
||||
|
||||
public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) {
|
||||
@@ -58,7 +68,7 @@
|
||||
VoxelShape voxelshape = p_180533_2_.func_196954_c(this.field_78878_a, p_180533_1_);
|
||||
double d0 = 0.25D;
|
||||
voxelshape.func_197755_b((p_228348_3_, p_228348_5_, p_228348_7_, p_228348_9_, p_228348_11_, p_228348_13_) -> {
|
||||
@@ -423,6 +425,12 @@
|
||||
@@ -423,6 +428,12 @@
|
||||
return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum());
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
|
||||
+ @Deprecated //Forge: Model data argument
|
||||
public boolean func_228802_a_(ILightReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_) {
|
||||
- boolean flag = Minecraft.func_71379_u() && p_228802_3_.func_185906_d() == 0 && p_228802_2_.func_177555_b();
|
||||
+ return renderModel(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
|
||||
+ }
|
||||
+ public boolean renderModel(ILightReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_, net.minecraftforge.client.model.data.IModelData modelData) {
|
||||
boolean flag = Minecraft.func_71379_u() && p_228802_3_.func_185906_d() == 0 && p_228802_2_.func_177555_b();
|
||||
+ boolean flag = Minecraft.func_71379_u() && p_228802_3_.getLightValue(p_228802_1_, p_228802_4_) == 0 && p_228802_2_.func_177555_b();
|
||||
Vec3d vec3d = p_228802_3_.func_191059_e(p_228802_1_, p_228802_4_);
|
||||
p_228802_5_.func_227861_a_(vec3d.field_72450_a, vec3d.field_72448_b, vec3d.field_72449_c);
|
||||
+ modelData = p_228802_2_.getModelData(p_228802_1_, p_228802_4_, p_228802_3_, modelData);
|
||||
@@ -79,7 +80,22 @@
|
||||
if (!list1.isEmpty()) {
|
||||
this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, -1, p_228806_11_, true, p_228806_5_, p_228806_6_, list1, bitset);
|
||||
flag = true;
|
||||
@@ -208,7 +222,11 @@
|
||||
@@ -125,6 +139,14 @@
|
||||
f1 = 1.0F;
|
||||
f2 = 1.0F;
|
||||
}
|
||||
+ // FORGE: Apply diffuse lighting at render-time instead of baking it in
|
||||
+ if (p_228800_6_.shouldApplyDiffuseLighting()) {
|
||||
+ // TODO this should be handled by the forge lighting pipeline
|
||||
+ float l = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(p_228800_6_.func_178210_d());
|
||||
+ f *= l;
|
||||
+ f1 *= l;
|
||||
+ f2 *= l;
|
||||
+ }
|
||||
|
||||
p_228800_4_.func_227890_a_(p_228800_5_, p_228800_6_, new float[]{p_228800_7_, p_228800_8_, p_228800_9_, p_228800_10_}, f, f1, f2, new int[]{p_228800_11_, p_228800_12_, p_228800_13_, p_228800_14_}, p_228800_15_, true);
|
||||
}
|
||||
@@ -208,17 +230,21 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -91,3 +107,15 @@
|
||||
Random random = new Random();
|
||||
long i = 42L;
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
random.setSeed(42L);
|
||||
- func_228803_a_(p_228804_1_, p_228804_2_, p_228804_5_, p_228804_6_, p_228804_7_, p_228804_4_.func_200117_a(p_228804_3_, direction, random), p_228804_8_, p_228804_9_);
|
||||
+ func_228803_a_(p_228804_1_, p_228804_2_, p_228804_5_, p_228804_6_, p_228804_7_, p_228804_4_.getQuads(p_228804_3_, direction, random, modelData), p_228804_8_, p_228804_9_);
|
||||
}
|
||||
|
||||
random.setSeed(42L);
|
||||
- func_228803_a_(p_228804_1_, p_228804_2_, p_228804_5_, p_228804_6_, p_228804_7_, p_228804_4_.func_200117_a(p_228804_3_, (Direction)null, random), p_228804_8_, p_228804_9_);
|
||||
+ func_228803_a_(p_228804_1_, p_228804_2_, p_228804_5_, p_228804_6_, p_228804_7_, p_228804_4_.getQuads(p_228804_3_, (Direction)null, random, modelData), p_228804_8_, p_228804_9_);
|
||||
}
|
||||
|
||||
private static void func_228803_a_(MatrixStack.Entry p_228803_0_, IVertexBuilder p_228803_1_, float p_228803_2_, float p_228803_3_, float p_228803_4_, List<BakedQuad> p_228803_5_, int p_228803_6_, int p_228803_7_) {
|
||||
@@ -1,5 +1,14 @@
|
||||
--- a/net/minecraft/client/renderer/BlockRendererDispatcher.java
|
||||
+++ b/net/minecraft/client/renderer/BlockRendererDispatcher.java
|
||||
@@ -32,7 +32,7 @@
|
||||
public BlockRendererDispatcher(BlockModelShapes p_i46577_1_, BlockColors p_i46577_2_) {
|
||||
this.field_175028_a = p_i46577_1_;
|
||||
this.field_228790_e_ = p_i46577_2_;
|
||||
- this.field_175027_c = new BlockModelRenderer(this.field_228790_e_);
|
||||
+ this.field_175027_c = new net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer(this.field_228790_e_);
|
||||
this.field_175025_e = new FluidBlockRenderer();
|
||||
}
|
||||
|
||||
@@ -40,18 +40,26 @@
|
||||
return this.field_175028_a;
|
||||
}
|
||||
@@ -41,7 +50,7 @@
|
||||
BlockRenderType blockrendertype = p_228791_1_.func_185901_i();
|
||||
if (blockrendertype != BlockRenderType.INVISIBLE) {
|
||||
switch(blockrendertype) {
|
||||
@@ -89,7 +101,7 @@
|
||||
@@ -89,10 +101,11 @@
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
@@ -49,8 +58,13 @@
|
||||
+ this.field_175027_c.renderModel(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_228394_b_(p_228791_1_)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_, modelData);
|
||||
break;
|
||||
case ENTITYBLOCK_ANIMATED:
|
||||
ItemStackTileEntityRenderer.field_147719_a.func_228364_a_(new ItemStack(p_228791_1_.func_177230_c()), p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_);
|
||||
@@ -101,4 +113,9 @@
|
||||
- ItemStackTileEntityRenderer.field_147719_a.func_228364_a_(new ItemStack(p_228791_1_.func_177230_c()), p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_);
|
||||
+ ItemStack stack = new ItemStack(p_228791_1_.func_177230_c());
|
||||
+ stack.func_77973_b().getItemStackTileEntityRenderer().func_228364_a_(stack, p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,4 +114,9 @@
|
||||
public void func_195410_a(IResourceManager p_195410_1_) {
|
||||
this.field_175025_e.func_178268_a();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/BufferBuilder.java
|
||||
+++ b/net/minecraft/client/renderer/BufferBuilder.java
|
||||
@@ -121,7 +121,6 @@
|
||||
@@ -122,7 +122,6 @@
|
||||
|
||||
bitset.set(l);
|
||||
}
|
||||
@@ -8,16 +8,25 @@
|
||||
}
|
||||
|
||||
private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) {
|
||||
@@ -364,4 +363,14 @@
|
||||
@@ -298,6 +297,7 @@
|
||||
}
|
||||
|
||||
ByteBuffer bytebuffer = this.field_179001_a.slice();
|
||||
+ bytebuffer.order(this.field_179001_a.order()); // FORGE: Fix incorrect byte order
|
||||
((Buffer)this.field_179001_a).clear();
|
||||
return Pair.of(bufferbuilder$drawstate, bytebuffer);
|
||||
}
|
||||
@@ -365,4 +365,15 @@
|
||||
this.field_179018_e = p_i225907_2_;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public void putBulkData(ByteBuffer buffer) {
|
||||
+ func_181670_b(buffer.limit() + this.field_179011_q.func_177338_f());
|
||||
+ this.field_179001_a.position(this.field_178997_d * this.field_179011_q.func_177338_f());
|
||||
+ ((Buffer)this.field_179001_a).position(this.field_178997_d * this.field_179011_q.func_177338_f());
|
||||
+ this.field_179001_a.put(buffer);
|
||||
+ this.field_178997_d += buffer.limit() / this.field_179011_q.func_177338_f();
|
||||
+ this.field_227824_l_ += buffer.limit();
|
||||
+ }
|
||||
+
|
||||
+ // Forge start
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
if (flag) {
|
||||
float f5 = hand == Hand.MAIN_HAND ? f : 0.0F;
|
||||
float f2 = 1.0F - MathHelper.func_219799_g(p_228396_1_, this.field_187470_g, this.field_187469_f);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.MAIN_HAND, p_228396_2_, p_228396_1_, f1, f3, f5, this.field_187467_d))
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.MAIN_HAND, p_228396_2_, p_228396_3_, p_228396_5_, p_228396_1_, f1, f5, f2, this.field_187467_d))
|
||||
this.func_228405_a_(p_228396_4_, p_228396_1_, f1, Hand.MAIN_HAND, f5, this.field_187467_d, f2, p_228396_2_, p_228396_3_, p_228396_5_);
|
||||
}
|
||||
|
||||
if (flag1) {
|
||||
float f6 = hand == Hand.OFF_HAND ? f : 0.0F;
|
||||
float f7 = 1.0F - MathHelper.func_219799_g(p_228396_1_, this.field_187472_i, this.field_187471_h);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_228396_2_, p_228396_1_, f1, f4, f6, this.field_187468_e))
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_228396_2_, p_228396_3_, p_228396_5_, p_228396_1_, f1, f6, f7, this.field_187468_e))
|
||||
this.func_228405_a_(p_228396_4_, p_228396_1_, f1, Hand.OFF_HAND, f6, this.field_187468_e, f7, p_228396_2_, p_228396_3_, p_228396_5_);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, f16, f20, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
|
||||
if (p_228796_4_.func_205586_a(p_228796_1_, p_228796_2_.func_177984_a())) {
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, f16, f20, j);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
|
||||
+ this.vertex(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +44,28 @@
|
||||
- this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, f34, f37, i1);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, f35, f37, i1);
|
||||
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, f35, f39, i1);
|
||||
+ this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, alpha, f34, f39, i1);
|
||||
+ this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, alpha, f34, f37, i1);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, alpha, f35, f37, i1);
|
||||
+ this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, alpha, f35, f39, i1);
|
||||
+ this.vertex(p_228796_3_, d0, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, alpha, f34, f39, i1);
|
||||
+ this.vertex(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, alpha, f34, f37, i1);
|
||||
+ this.vertex(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, alpha, f35, f37, i1);
|
||||
+ this.vertex(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, alpha, f35, f39, i1);
|
||||
flag7 = true;
|
||||
}
|
||||
|
||||
@@ -239,15 +240,15 @@
|
||||
@@ -222,10 +223,9 @@
|
||||
flag7 = true;
|
||||
BlockPos blockpos = p_228796_2_.func_177972_a(direction);
|
||||
TextureAtlasSprite textureatlassprite2 = atextureatlassprite[1];
|
||||
- if (!flag) {
|
||||
- Block block = p_228796_1_.func_180495_p(blockpos).func_177230_c();
|
||||
- if (block == Blocks.field_150359_w || block instanceof StainedGlassBlock) {
|
||||
- textureatlassprite2 = this.field_187501_d;
|
||||
+ if (atextureatlassprite[2] != null) {
|
||||
+ if (p_228796_1_.func_180495_p(blockpos).shouldDisplayFluidOverlay(p_228796_1_, blockpos, p_228796_4_)) {
|
||||
+ textureatlassprite2 = atextureatlassprite[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,15 +239,15 @@
|
||||
float f31 = 1.0F * f30 * f;
|
||||
float f32 = 1.0F * f30 * f1;
|
||||
float f33 = 1.0F * f30 * f2;
|
||||
@@ -59,34 +73,35 @@
|
||||
- this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, f49, f28, k);
|
||||
- this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, f49, f29, k);
|
||||
- this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, f48, f29, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, alpha, f48, f50, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, alpha, f49, f28, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, alpha, f49, f29, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, alpha, f48, f29, k);
|
||||
if (textureatlassprite2 != this.field_187501_d) {
|
||||
- if (textureatlassprite2 != this.field_187501_d) {
|
||||
- this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, f48, f29, k);
|
||||
- this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, f49, f29, k);
|
||||
- this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, f49, f28, k);
|
||||
- this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, f48, f50, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, alpha, f48, f29, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, alpha, f49, f29, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, alpha, f49, f28, k);
|
||||
+ this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, alpha, f48, f50, k);
|
||||
+ this.vertex(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, alpha, f48, f50, k);
|
||||
+ this.vertex(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, alpha, f49, f28, k);
|
||||
+ this.vertex(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, alpha, f49, f29, k);
|
||||
+ this.vertex(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, alpha, f48, f29, k);
|
||||
+ if (textureatlassprite2 != atextureatlassprite[2]) {
|
||||
+ this.vertex(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, alpha, f48, f29, k);
|
||||
+ this.vertex(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, alpha, f49, f29, k);
|
||||
+ this.vertex(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, alpha, f49, f28, k);
|
||||
+ this.vertex(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, alpha, f48, f50, k);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -256,10 +257,15 @@
|
||||
@@ -256,10 +256,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
private void func_228797_a_(IVertexBuilder p_228797_1_, double p_228797_2_, double p_228797_4_, double p_228797_6_, float p_228797_8_, float p_228797_9_, float p_228797_10_, float p_228797_11_, float p_228797_12_, int p_228797_13_) {
|
||||
- p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, 1.0F).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d();
|
||||
+ func_228797_a_(p_228797_1_, p_228797_2_, p_228797_4_, p_228797_6_, p_228797_8_, p_228797_9_, p_228797_10_, 1.0F, p_228797_11_, p_228797_12_, p_228797_13_);
|
||||
+ vertex(p_228797_1_, p_228797_2_, p_228797_4_, p_228797_6_, p_228797_8_, p_228797_9_, p_228797_10_, 1.0F, p_228797_11_, p_228797_12_, p_228797_13_);
|
||||
}
|
||||
|
||||
+ private void func_228797_a_(IVertexBuilder p_228797_1_, double p_228797_2_, double p_228797_4_, double p_228797_6_, float p_228797_8_, float p_228797_9_, float p_228797_10_, float alpha, float p_228797_11_, float p_228797_12_, int p_228797_13_) {
|
||||
+ p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, alpha).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d();
|
||||
+ private void vertex(IVertexBuilder p_228797_1_, double p_228797_2_, double p_228797_4_, double p_228797_6_, float p_228797_8_, float p_228797_9_, float p_228797_10_, float alpha, float p_228797_11_, float p_228797_12_, int p_228797_13_) {
|
||||
+ p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, alpha).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d();
|
||||
+ }
|
||||
+
|
||||
private int func_228795_a_(ILightReader p_228795_1_, BlockPos p_228795_2_) {
|
||||
|
||||
@@ -18,15 +18,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,6 +360,7 @@
|
||||
}
|
||||
|
||||
boolean flag = this.field_78531_r.func_175606_aa() instanceof LivingEntity && ((LivingEntity)this.field_78531_r.func_175606_aa()).func_70608_bn();
|
||||
+ if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(field_78531_r.field_71438_f, p_228381_1_, p_228381_3_))
|
||||
if (this.field_78531_r.field_71474_y.field_74320_O == 0 && !flag && !this.field_78531_r.field_71474_y.field_74319_N && this.field_78531_r.field_71442_b.func_178889_l() != GameType.SPECTATOR) {
|
||||
this.field_78513_d.func_205109_c();
|
||||
this.field_78516_c.func_228396_a_(p_228381_3_, p_228381_1_, this.field_228374_i_.func_228487_b_(), this.field_78531_r.field_71439_g, this.field_78531_r.func_175598_ae().func_229085_a_(this.field_78531_r.field_71439_g, p_228381_3_));
|
||||
@@ -475,7 +478,7 @@
|
||||
@@ -475,7 +477,7 @@
|
||||
}
|
||||
} else if (this.field_78531_r.field_71462_r != null) {
|
||||
try {
|
||||
@@ -35,7 +27,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
|
||||
@@ -588,9 +591,16 @@
|
||||
@@ -588,9 +590,16 @@
|
||||
Matrix4f matrix4f = matrixstack.func_227866_c_().func_227870_a_();
|
||||
this.func_228379_a_(matrix4f);
|
||||
activerenderinfo.func_216772_a(this.field_78531_r.field_71441_e, (Entity)(this.field_78531_r.func_175606_aa() == null ? this.field_78531_r.field_71439_g : this.field_78531_r.func_175606_aa()), this.field_78531_r.field_71474_y.field_74320_O > 0, this.field_78531_r.field_71474_y.field_74320_O == 2, p_228378_1_);
|
||||
@@ -48,11 +40,11 @@
|
||||
p_228378_4_.func_227863_a_(Vector3f.field_229181_d_.func_229187_a_(activerenderinfo.func_216778_f() + 180.0F));
|
||||
this.field_78531_r.field_71438_f.func_228426_a_(p_228378_4_, p_228378_1_, p_228378_2_, flag, activerenderinfo, this, this.field_78513_d, matrix4f);
|
||||
+ this.field_78531_r.func_213239_aq().func_219895_b("forge_render_last");
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(this.field_78531_r.field_71438_f, p_228378_4_, p_228378_2_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(this.field_78531_r.field_71438_f, p_228378_4_, p_228378_1_, matrix4f, p_228378_2_);
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("hand");
|
||||
if (this.field_175074_C) {
|
||||
RenderSystem.clear(256, Minecraft.field_142025_a);
|
||||
@@ -670,4 +680,9 @@
|
||||
@@ -670,4 +679,9 @@
|
||||
public OverlayTexture func_228385_m_() {
|
||||
return this.field_228375_t_;
|
||||
}
|
||||
|
||||
@@ -9,36 +9,34 @@
|
||||
|
||||
for(Item item : Registry.field_212630_s) {
|
||||
if (!field_195411_c.contains(item)) {
|
||||
@@ -70,6 +70,10 @@
|
||||
}
|
||||
|
||||
private void func_229114_a_(IBakedModel p_229114_1_, ItemStack p_229114_2_, int p_229114_3_, int p_229114_4_, MatrixStack p_229114_5_, IVertexBuilder p_229114_6_) {
|
||||
+ if (false && net.minecraftforge.common.ForgeConfig.CLIENT.allowEmissiveItems.get()) { //TODO: Find way to re-introduce emissive items.
|
||||
+ net.minecraftforge.client.ForgeHooksClient.renderLitItem(this, p_229114_5_, p_229114_6_, p_229114_1_, p_229114_2_);
|
||||
+ return;
|
||||
+ }
|
||||
Random random = new Random();
|
||||
long i = 42L;
|
||||
|
||||
@@ -91,7 +95,7 @@
|
||||
@@ -91,7 +91,7 @@
|
||||
p_229111_8_ = this.field_175059_m.func_178083_a().func_174953_a(new ModelResourceLocation("minecraft:trident#inventory"));
|
||||
}
|
||||
|
||||
- p_229111_8_.func_177552_f().func_181688_b(p_229111_2_).func_228830_a_(p_229111_3_, p_229111_4_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_229111_4_, p_229111_8_, p_229111_2_, p_229111_3_);
|
||||
+ p_229111_8_ = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_229111_4_, p_229111_8_, p_229111_2_, p_229111_3_);
|
||||
p_229111_4_.func_227861_a_(-0.5D, -0.5D, -0.5D);
|
||||
if (!p_229111_8_.func_188618_c() && (p_229111_1_.func_77973_b() != Items.field_203184_eO || flag1)) {
|
||||
RenderType rendertype = RenderTypeLookup.func_228389_a_(p_229111_1_);
|
||||
@@ -105,7 +109,7 @@
|
||||
@@ -105,7 +105,7 @@
|
||||
IVertexBuilder ivertexbuilder = func_229113_a_(p_229111_5_, rendertype1, true, p_229111_1_.func_77962_s());
|
||||
this.func_229114_a_(p_229111_8_, p_229111_1_, p_229111_6_, p_229111_7_, p_229111_4_, ivertexbuilder);
|
||||
} else {
|
||||
- ItemStackTileEntityRenderer.field_147719_a.func_228364_a_(p_229111_1_, p_229111_4_, p_229111_5_, p_229111_6_, p_229111_7_);
|
||||
+ p_229111_1_.func_77973_b().getTileEntityItemStackRenderer().func_228364_a_(p_229111_1_, p_229111_4_, p_229111_5_, p_229111_6_, p_229111_7_);
|
||||
+ p_229111_1_.func_77973_b().getItemStackTileEntityRenderer().func_228364_a_(p_229111_1_, p_229111_4_, p_229111_5_, p_229111_6_, p_229111_7_);
|
||||
}
|
||||
|
||||
p_229111_4_.func_227865_b_();
|
||||
@@ -216,6 +220,7 @@
|
||||
@@ -129,7 +129,7 @@
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
- p_229112_2_.func_227889_a_(matrixstack$entry, bakedquad, f, f1, f2, p_229112_5_, p_229112_6_);
|
||||
+ p_229112_2_.addVertexData(matrixstack$entry, bakedquad, f, f1, f2, p_229112_5_, p_229112_6_, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -215,6 +215,7 @@
|
||||
crashreportcategory.func_189529_a("Item Type", () -> {
|
||||
return String.valueOf((Object)p_184391_2_.func_77973_b());
|
||||
});
|
||||
@@ -46,7 +44,7 @@
|
||||
crashreportcategory.func_189529_a("Item Damage", () -> {
|
||||
return String.valueOf(p_184391_2_.func_77952_i());
|
||||
});
|
||||
@@ -247,18 +252,16 @@
|
||||
@@ -246,18 +247,16 @@
|
||||
irendertypebuffer$impl.func_228461_a_();
|
||||
}
|
||||
|
||||
@@ -69,7 +67,7 @@
|
||||
this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255);
|
||||
this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255);
|
||||
RenderSystem.enableBlend();
|
||||
@@ -296,4 +299,9 @@
|
||||
@@ -295,4 +294,9 @@
|
||||
public void func_195410_a(IResourceManager p_195410_1_) {
|
||||
this.field_175059_m.func_178085_b();
|
||||
}
|
||||
|
||||
@@ -9,3 +9,12 @@
|
||||
vector3f1.func_195901_a(0.0F, 1.0F);
|
||||
if (f2 > 0.0F) {
|
||||
float f10 = Math.max(vector3f1.func_195899_a(), Math.max(vector3f1.func_195900_b(), vector3f1.func_195902_c()));
|
||||
@@ -169,7 +171,7 @@
|
||||
}
|
||||
|
||||
public static int func_228450_a_(int p_228450_0_) {
|
||||
- return p_228450_0_ >> 4 & '\uffff';
|
||||
+ return (p_228450_0_ & 0xFFFF) >> 4; // Forge: Fix fullbright quads showing dark artifacts. Reported as MC-169806
|
||||
}
|
||||
|
||||
public static int func_228454_b_(int p_228454_0_) {
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/client/renderer/Matrix3f.java
|
||||
+++ b/net/minecraft/client/renderer/Matrix3f.java
|
||||
@@ -406,4 +406,11 @@
|
||||
public Matrix3f func_226121_d_() {
|
||||
return new Matrix3f(this);
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ public void multiplyBackward(Matrix3f other) {
|
||||
+ Matrix3f copy = other.func_226121_d_();
|
||||
+ copy.func_226118_b_(this);
|
||||
+ this.func_226114_a_(copy);
|
||||
+ }
|
||||
}
|
||||
@@ -1,12 +1,30 @@
|
||||
--- a/net/minecraft/client/renderer/Matrix4f.java
|
||||
+++ b/net/minecraft/client/renderer/Matrix4f.java
|
||||
@@ -373,4 +373,88 @@
|
||||
@@ -373,4 +373,78 @@
|
||||
matrix4f.field_226586_l_ = p_226599_2_;
|
||||
return matrix4f;
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ public Matrix4f(float[] values) { set(values); }
|
||||
+ public Matrix4f(float[] values) {
|
||||
+ field_226575_a_ = values[0];
|
||||
+ field_226576_b_ = values[1];
|
||||
+ field_226577_c_ = values[2];
|
||||
+ field_226578_d_ = values[3];
|
||||
+ field_226579_e_ = values[4];
|
||||
+ field_226580_f_ = values[5];
|
||||
+ field_226581_g_ = values[6];
|
||||
+ field_226582_h_ = values[7];
|
||||
+ field_226583_i_ = values[8];
|
||||
+ field_226584_j_ = values[9];
|
||||
+ field_226585_k_ = values[10];
|
||||
+ field_226586_l_ = values[11];
|
||||
+ field_226587_m_ = values[12];
|
||||
+ field_226588_n_ = values[13];
|
||||
+ field_226589_o_ = values[14];
|
||||
+ field_226590_p_ = values[15];
|
||||
+ }
|
||||
+
|
||||
+ public void set(Matrix4f mat) {
|
||||
+ this.field_226575_a_ = mat.field_226575_a_;
|
||||
+ this.field_226576_b_ = mat.field_226576_b_;
|
||||
@@ -45,47 +63,19 @@
|
||||
+ field_226590_p_ += other.field_226590_p_;
|
||||
+ }
|
||||
+
|
||||
+ public void set(float[] others) {
|
||||
+ field_226575_a_ = others[0];
|
||||
+ field_226576_b_ = others[1];
|
||||
+ field_226577_c_ = others[2];
|
||||
+ field_226578_d_ = others[3];
|
||||
+ field_226579_e_ = others[4];
|
||||
+ field_226580_f_ = others[5];
|
||||
+ field_226581_g_ = others[6];
|
||||
+ field_226582_h_ = others[7];
|
||||
+ field_226583_i_ = others[8];
|
||||
+ field_226584_j_ = others[9];
|
||||
+ field_226585_k_ = others[10];
|
||||
+ field_226586_l_ = others[11];
|
||||
+ field_226587_m_ = others[12];
|
||||
+ field_226588_n_ = others[13];
|
||||
+ field_226589_o_ = others[14];
|
||||
+ field_226590_p_ = others[15];
|
||||
+ }
|
||||
+
|
||||
+ public void write(float[] dest) {
|
||||
+ dest[0] = field_226575_a_;
|
||||
+ dest[1] = field_226576_b_;
|
||||
+ dest[2] = field_226577_c_;
|
||||
+ dest[3] = field_226578_d_;
|
||||
+ dest[4] = field_226579_e_;
|
||||
+ dest[5] = field_226580_f_;
|
||||
+ dest[6] = field_226581_g_;
|
||||
+ dest[7] = field_226582_h_;
|
||||
+ dest[8] = field_226583_i_;
|
||||
+ dest[9] = field_226584_j_;
|
||||
+ dest[10] = field_226585_k_;
|
||||
+ dest[11] = field_226586_l_;
|
||||
+ dest[12] = field_226587_m_;
|
||||
+ dest[13] = field_226588_n_;
|
||||
+ dest[14] = field_226589_o_;
|
||||
+ dest[15] = field_226590_p_;
|
||||
+ }
|
||||
+
|
||||
+ public void multiplyBackward(Matrix4f other) {
|
||||
+ Matrix4f copy = other.func_226601_d_();
|
||||
+ copy.func_226595_a_(this);
|
||||
+ this.set(copy);
|
||||
+ }
|
||||
+
|
||||
+ public void setTranslation(float x, float y, float z) {
|
||||
+ this.field_226575_a_ = 1.0F;
|
||||
+ this.field_226580_f_ = 1.0F;
|
||||
+ this.field_226585_k_ = 1.0F;
|
||||
+ this.field_226590_p_ = 1.0F;
|
||||
+ this.field_226578_d_ = x;
|
||||
+ this.field_226582_h_ = y;
|
||||
+ this.field_226586_l_ = z;
|
||||
+ }
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
--- a/net/minecraft/client/renderer/Quaternion.java
|
||||
+++ b/net/minecraft/client/renderer/Quaternion.java
|
||||
@@ -176,4 +176,12 @@
|
||||
public Quaternion func_227068_g_() {
|
||||
return new Quaternion(this);
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ public Quaternion(float[] values) {
|
||||
+ this.field_227061_b_ = values[0];
|
||||
+ this.field_227062_c_ = values[1];
|
||||
+ this.field_227063_d_ = values[2];
|
||||
+ this.field_227064_e_ = values[3];
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/client/renderer/RenderState.java
|
||||
+++ b/net/minecraft/client/renderer/RenderState.java
|
||||
@@ -360,7 +360,7 @@
|
||||
private final OptionalDouble field_228587_Q_;
|
||||
|
||||
public LineState(OptionalDouble p_i225982_1_) {
|
||||
- super("alpha", () -> {
|
||||
+ super("line_width", () -> { // FORGE: fix MC-167447
|
||||
if (!Objects.equals(p_i225982_1_, OptionalDouble.of(1.0D))) {
|
||||
if (p_i225982_1_.isPresent()) {
|
||||
RenderSystem.lineWidth((float)p_i225982_1_.getAsDouble());
|
||||
@@ -46,8 +46,8 @@
|
||||
|
||||
+ // FORGE START
|
||||
+
|
||||
+ private static final Map<Block, java.util.function.Predicate<RenderType>> blockRenderChecks = Maps.newHashMap();
|
||||
+ private static final Map<Fluid, java.util.function.Predicate<RenderType>> fluidRenderChecks = Maps.newHashMap();
|
||||
+ private static final Map<net.minecraftforge.registries.IRegistryDelegate<Block>, java.util.function.Predicate<RenderType>> blockRenderChecks = Maps.newHashMap();
|
||||
+ private static final Map<net.minecraftforge.registries.IRegistryDelegate<Fluid>, java.util.function.Predicate<RenderType>> fluidRenderChecks = Maps.newHashMap();
|
||||
+ static {
|
||||
+ field_228386_a_.forEach(RenderTypeLookup::setRenderLayer);
|
||||
+ field_228387_b_.forEach(RenderTypeLookup::setRenderLayer);
|
||||
@@ -60,7 +60,7 @@
|
||||
+ } else {
|
||||
+ java.util.function.Predicate<RenderType> rendertype;
|
||||
+ synchronized (RenderTypeLookup.class) {
|
||||
+ rendertype = blockRenderChecks.get(block);
|
||||
+ rendertype = blockRenderChecks.get(block.delegate);
|
||||
+ }
|
||||
+ return rendertype != null ? rendertype.test(type) : type == RenderType.func_228639_c_();
|
||||
+ }
|
||||
@@ -69,7 +69,7 @@
|
||||
+ public static boolean canRenderInLayer(IFluidState fluid, RenderType type) {
|
||||
+ java.util.function.Predicate<RenderType> rendertype;
|
||||
+ synchronized (RenderTypeLookup.class) {
|
||||
+ rendertype = fluidRenderChecks.get(fluid.func_206886_c());
|
||||
+ rendertype = fluidRenderChecks.get(fluid.func_206886_c().delegate);
|
||||
+ }
|
||||
+ return rendertype != null ? rendertype.test(type) : type == RenderType.func_228639_c_();
|
||||
+ }
|
||||
@@ -80,7 +80,7 @@
|
||||
+ }
|
||||
+
|
||||
+ public static synchronized void setRenderLayer(Block block, java.util.function.Predicate<RenderType> predicate) {
|
||||
+ blockRenderChecks.put(block, predicate);
|
||||
+ blockRenderChecks.put(block.delegate, predicate);
|
||||
+ }
|
||||
+
|
||||
+ public static void setRenderLayer(Fluid fluid, RenderType type) {
|
||||
@@ -89,7 +89,7 @@
|
||||
+ }
|
||||
+
|
||||
+ public static synchronized void setRenderLayer(Fluid fluid, java.util.function.Predicate<RenderType> predicate) {
|
||||
+ fluidRenderChecks.put(fluid, predicate);
|
||||
+ fluidRenderChecks.put(fluid.delegate, predicate);
|
||||
+ }
|
||||
+
|
||||
public static void func_228393_a_(boolean p_228393_0_) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
private final Matrix4f field_227976_a_;
|
||||
private boolean field_227977_b_;
|
||||
@Nullable
|
||||
@@ -133,4 +133,33 @@
|
||||
@@ -133,4 +133,32 @@
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.field_227976_a_);
|
||||
}
|
||||
@@ -29,17 +29,16 @@
|
||||
+ return field_227981_f_.func_227068_g_();
|
||||
+ }
|
||||
+
|
||||
+ private javax.vecmath.Matrix3f normalTransform = null;
|
||||
+ public javax.vecmath.Matrix3f getNormalMatrix() {
|
||||
+ private Matrix3f normalTransform = null;
|
||||
+ public Matrix3f getNormalMatrix() {
|
||||
+ checkNormalTransform();
|
||||
+ return normalTransform;
|
||||
+ }
|
||||
+ private void checkNormalTransform() {
|
||||
+ if (normalTransform == null) {
|
||||
+ normalTransform = new javax.vecmath.Matrix3f();
|
||||
+ net.minecraftforge.common.model.TransformationHelper.toVecmath(field_227976_a_).getRotationScale(normalTransform);
|
||||
+ normalTransform.invert();
|
||||
+ normalTransform.transpose();
|
||||
+ normalTransform = new Matrix3f(field_227976_a_);
|
||||
+ normalTransform.func_226123_f_();
|
||||
+ normalTransform.func_226110_a_();
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
--- a/net/minecraft/client/renderer/Vector3f.java
|
||||
+++ b/net/minecraft/client/renderer/Vector3f.java
|
||||
@@ -198,4 +198,14 @@
|
||||
@@ -198,4 +198,17 @@
|
||||
public String toString() {
|
||||
return "[" + this.field_229184_g_ + ", " + this.field_229185_h_ + ", " + this.field_229186_i_ + "]";
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ public Vector3f(float[] values) {
|
||||
+ set(values);
|
||||
+ }
|
||||
+ public void set(float[] values) {
|
||||
+ this.field_229184_g_ = values[0];
|
||||
+ this.field_229185_h_ = values[1];
|
||||
+ this.field_229186_i_ = values[2];
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
--- a/net/minecraft/client/renderer/Vector4f.java
|
||||
+++ b/net/minecraft/client/renderer/Vector4f.java
|
||||
@@ -129,4 +129,21 @@
|
||||
@@ -129,4 +129,16 @@
|
||||
public String toString() {
|
||||
return "[" + this.field_229368_a_ + ", " + this.field_229369_b_ + ", " + this.field_229370_c_ + ", " + this.field_229371_d_ + "]";
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ public Vector4f(float[] values) {
|
||||
+ set(values);
|
||||
+ }
|
||||
+ public void set(float[] values) {
|
||||
+ this.field_229368_a_ = values[0];
|
||||
+ this.field_229369_b_ = values[1];
|
||||
+ this.field_229370_c_ = values[2];
|
||||
+ this.field_229371_d_ = values[3];
|
||||
+ }
|
||||
+ public void write(float[] values) {
|
||||
+ values[0] = this.field_229368_a_;
|
||||
+ values[1] = this.field_229369_b_;
|
||||
+ values[2] = this.field_229370_c_;
|
||||
+ values[3] = this.field_229371_d_;
|
||||
+ }
|
||||
+ public void setX(float x) { this.field_229368_a_ = x; }
|
||||
+ public void setY(float y) { this.field_229369_b_ = y; }
|
||||
+ public void setZ(float z) { this.field_229370_c_ = z; }
|
||||
+ public void setW(float z) { this.field_229371_d_ = z; }
|
||||
}
|
||||
@@ -41,7 +41,7 @@
|
||||
this.func_174967_a(p_228426_3_ + l1);
|
||||
iprofiler.func_219895_b("terrain");
|
||||
this.func_228441_a_(RenderType.func_228639_c_(), p_228426_1_, d0, d1, d2);
|
||||
+ this.field_72777_q.func_209506_al().func_229356_a_(AtlasTexture.field_110575_b).func_174937_a(false, this.field_72777_q.field_71474_y.field_151442_I > 0); // FORGE: fix flickering leaves when mods mess up the blurMipmap settings
|
||||
+ this.field_72777_q.func_209506_al().func_229356_a_(AtlasTexture.field_110575_b).setBlurMipmap(false, this.field_72777_q.field_71474_y.field_151442_I > 0); // FORGE: fix flickering leaves when mods mess up the blurMipmap settings
|
||||
this.func_228441_a_(RenderType.func_228641_d_(), p_228426_1_, d0, d1, d2);
|
||||
+ this.field_72777_q.func_209506_al().func_229356_a_(AtlasTexture.field_110575_b).restoreLastBlurMipmap();
|
||||
this.func_228441_a_(RenderType.func_228643_e_(), p_228426_1_, d0, d1, d2);
|
||||
@@ -68,24 +68,84 @@
|
||||
BlockPos blockpos = ((BlockRayTraceResult)raytraceresult).func_216350_a();
|
||||
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
|
||||
- if (!blockstate.func_196958_f() && this.field_72769_h.func_175723_af().func_177746_a(blockpos)) {
|
||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(this, p_228426_6_, field_72777_q.field_71476_x, 0, p_228426_2_))
|
||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(this, p_228426_6_, field_72777_q.field_71476_x, p_228426_2_, p_228426_1_, irendertypebuffer$impl))
|
||||
+ if (!blockstate.isAir(this.field_72769_h, blockpos) && this.field_72769_h.func_175723_af().func_177746_a(blockpos)) {
|
||||
IVertexBuilder ivertexbuilder2 = irendertypebuffer$impl.getBuffer(RenderType.func_228659_m_());
|
||||
this.func_228429_a_(p_228426_1_, ivertexbuilder2, p_228426_6_.func_216773_g(), d0, d1, d2, blockpos, blockstate);
|
||||
}
|
||||
@@ -1380,6 +1390,11 @@
|
||||
@@ -1380,6 +1390,15 @@
|
||||
}
|
||||
|
||||
public void func_228424_a_(MatrixStack p_228424_1_, float p_228424_2_) {
|
||||
+ net.minecraftforge.client.IRenderHandler renderer = this.field_72769_h.func_201675_m().getSkyRenderer();
|
||||
+ if (renderer != null) {
|
||||
+ renderer.render(this.field_72773_u, p_228424_2_, this.field_72769_h, this.field_72777_q);
|
||||
+ if (renderer instanceof net.minecraftforge.client.SkyRenderHandler) {
|
||||
+ ((net.minecraftforge.client.SkyRenderHandler) renderer).render(this.field_72773_u, p_228424_2_, p_228424_1_, this.field_72769_h, this.field_72777_q);
|
||||
+ } else {
|
||||
+ renderer.render(this.field_72773_u, p_228424_2_, this.field_72769_h, this.field_72777_q);
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.field_223229_c_) {
|
||||
this.func_228444_b_(p_228424_1_);
|
||||
} else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
|
||||
@@ -2283,8 +2298,8 @@
|
||||
@@ -1508,6 +1527,15 @@
|
||||
}
|
||||
|
||||
public void func_228425_a_(MatrixStack p_228425_1_, float p_228425_2_, double p_228425_3_, double p_228425_5_, double p_228425_7_) {
|
||||
+ net.minecraftforge.client.IRenderHandler renderer = this.field_72769_h.func_201675_m().getCloudRenderer();
|
||||
+ if (renderer != null) {
|
||||
+ if (renderer instanceof net.minecraftforge.client.CloudRenderHandler) {
|
||||
+ ((net.minecraftforge.client.CloudRenderHandler) renderer).render(this.field_72773_u, p_228425_2_, p_228425_1_, this.field_72769_h, this.field_72777_q);
|
||||
+ } else {
|
||||
+ renderer.render(this.field_72773_u, p_228425_2_, this.field_72769_h, this.field_72777_q);
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
|
||||
RenderSystem.disableCull();
|
||||
RenderSystem.enableBlend();
|
||||
@@ -1689,7 +1717,7 @@
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkRenderDispatcher.ChunkRender chunkrenderdispatcher$chunkrender = iterator.next();
|
||||
- if (chunkrenderdispatcher$chunkrender.func_188281_o()) {
|
||||
+ if (!net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() && chunkrenderdispatcher$chunkrender.func_188281_o()) {
|
||||
this.field_174995_M.func_228902_a_(chunkrenderdispatcher$chunkrender);
|
||||
} else {
|
||||
chunkrenderdispatcher$chunkrender.func_228929_a_(this.field_174995_M);
|
||||
@@ -1977,7 +2005,12 @@
|
||||
this.field_175008_n.func_217628_a(p_215319_1_, p_215319_2_, p_215319_3_, p_215319_4_);
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: use item aware function below
|
||||
public void func_184377_a(@Nullable SoundEvent p_184377_1_, BlockPos p_184377_2_) {
|
||||
+ this.playRecord(p_184377_1_, p_184377_2_, p_184377_1_ == null? null : MusicDiscItem.func_185074_a(p_184377_1_));
|
||||
+ }
|
||||
+
|
||||
+ public void playRecord(@Nullable SoundEvent p_184377_1_, BlockPos p_184377_2_, @Nullable MusicDiscItem musicDiscItem) {
|
||||
ISound isound = this.field_147593_P.get(p_184377_2_);
|
||||
if (isound != null) {
|
||||
this.field_72777_q.func_147118_V().func_147683_b(isound);
|
||||
@@ -1985,7 +2018,7 @@
|
||||
}
|
||||
|
||||
if (p_184377_1_ != null) {
|
||||
- MusicDiscItem musicdiscitem = MusicDiscItem.func_185074_a(p_184377_1_);
|
||||
+ MusicDiscItem musicdiscitem = musicDiscItem;
|
||||
if (musicdiscitem != null) {
|
||||
this.field_72777_q.field_71456_v.func_73833_a(musicdiscitem.func_200299_h().func_150254_d());
|
||||
}
|
||||
@@ -2133,7 +2166,7 @@
|
||||
break;
|
||||
case 1010:
|
||||
if (Item.func_150899_d(p_180439_4_) instanceof MusicDiscItem) {
|
||||
- this.func_184377_a(((MusicDiscItem)Item.func_150899_d(p_180439_4_)).func_185075_h(), p_180439_3_);
|
||||
+ this.playRecord(((MusicDiscItem)Item.func_150899_d(p_180439_4_)).func_185075_h(), p_180439_3_, (MusicDiscItem) Item.func_150899_d(p_180439_4_));
|
||||
} else {
|
||||
this.func_184377_a((SoundEvent)null, p_180439_3_);
|
||||
}
|
||||
@@ -2283,8 +2316,8 @@
|
||||
break;
|
||||
case 2001:
|
||||
BlockState blockstate = Block.func_196257_b(p_180439_4_);
|
||||
@@ -96,7 +156,16 @@
|
||||
this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false);
|
||||
}
|
||||
|
||||
@@ -2445,6 +2460,11 @@
|
||||
@@ -2432,7 +2465,7 @@
|
||||
} else {
|
||||
int i = p_228420_0_.func_226658_a_(LightType.SKY, p_228420_2_);
|
||||
int j = p_228420_0_.func_226658_a_(LightType.BLOCK, p_228420_2_);
|
||||
- int k = p_228420_1_.func_185906_d();
|
||||
+ int k = p_228420_1_.getLightValue(p_228420_0_, p_228420_2_);
|
||||
if (j < k) {
|
||||
j = k;
|
||||
}
|
||||
@@ -2445,6 +2478,11 @@
|
||||
return this.field_175015_z;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/client/renderer/entity/EntityRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/EntityRenderer.java
|
||||
@@ -54,8 +54,10 @@
|
||||
}
|
||||
|
||||
public void func_225623_a_(T p_225623_1_, float p_225623_2_, float p_225623_3_, MatrixStack p_225623_4_, IRenderTypeBuffer p_225623_5_, int p_225623_6_) {
|
||||
- if (this.func_177070_b(p_225623_1_)) {
|
||||
- this.func_225629_a_(p_225623_1_, p_225623_1_.func_145748_c_().func_150254_d(), p_225623_4_, p_225623_5_, p_225623_6_);
|
||||
+ net.minecraftforge.client.event.RenderNameplateEvent renderNameplateEvent = new net.minecraftforge.client.event.RenderNameplateEvent(p_225623_1_, p_225623_1_.func_145748_c_().func_150254_d(), this, p_225623_4_, p_225623_5_, p_225623_6_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(renderNameplateEvent);
|
||||
+ if (renderNameplateEvent.getResult() != net.minecraftforge.eventbus.api.Event.Result.DENY && (renderNameplateEvent.getResult() == net.minecraftforge.eventbus.api.Event.Result.ALLOW || this.func_177070_b(p_225623_1_))) {
|
||||
+ this.func_225629_a_(p_225623_1_, renderNameplateEvent.getContent(), p_225623_4_, p_225623_5_, p_225623_6_);
|
||||
}
|
||||
}
|
||||
|
||||
+18
-1
@@ -1,6 +1,23 @@
|
||||
--- a/net/minecraft/client/renderer/entity/EntityRendererManager.java
|
||||
+++ b/net/minecraft/client/renderer/entity/EntityRendererManager.java
|
||||
@@ -445,4 +445,8 @@
|
||||
@@ -183,13 +183,15 @@
|
||||
this.field_178637_m = new PlayerRenderer(this);
|
||||
this.field_178636_l.put("default", this.field_178637_m);
|
||||
this.field_178636_l.put("slim", new PlayerRenderer(this, true));
|
||||
+ }
|
||||
|
||||
+ //FORGE: Validate the existence of a renderer for each entity type after modded entity renderers have been added
|
||||
+ public void validateRendererExistence() {
|
||||
for(EntityType<?> entitytype : Registry.field_212629_r) {
|
||||
if (entitytype != EntityType.field_200729_aH && !this.field_78729_o.containsKey(entitytype)) {
|
||||
throw new IllegalStateException("No renderer registered for " + Registry.field_212629_r.func_177774_c(entitytype));
|
||||
}
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
public <T extends Entity> EntityRenderer<? super T> func_78713_a(T p_78713_1_) {
|
||||
@@ -445,4 +447,8 @@
|
||||
public FontRenderer func_78716_a() {
|
||||
return this.field_78736_p;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
+ int i = mapdata != null ? p_225623_1_.func_82333_j() % 4 * 2 : p_225623_1_.func_82333_j();
|
||||
p_225623_4_.func_227863_a_(Vector3f.field_229183_f_.func_229187_a_((float)i * 360.0F / 8.0F));
|
||||
- if (flag) {
|
||||
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderItemInFrameEvent(p_225623_1_, this))) {
|
||||
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderItemInFrameEvent(p_225623_1_, this, p_225623_4_, p_225623_5_, p_225623_6_))) {
|
||||
+ if (mapdata != null) {
|
||||
p_225623_4_.func_227863_a_(Vector3f.field_229183_f_.func_229187_a_(180.0F));
|
||||
float f = 0.0078125F;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
p_225623_4_.func_227861_a_((double)f7, (double)f8, (double)f9);
|
||||
}
|
||||
|
||||
@@ -75,18 +72,19 @@
|
||||
@@ -75,18 +72,18 @@
|
||||
float f11 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
|
||||
float f13 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
|
||||
float f10 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
|
||||
@@ -37,9 +37,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_177080_a.func_229111_a_(itemstack, ItemCameraTransforms.TransformType.GROUND, false, p_225623_4_, p_225623_5_, p_225623_6_, OverlayTexture.field_229196_a_, ibakedmodel);
|
||||
+ IBakedModel transformedModel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_225623_4_, ibakedmodel, ItemCameraTransforms.TransformType.GROUND, false);
|
||||
+ this.field_177080_a.func_229111_a_(itemstack, ItemCameraTransforms.TransformType.GROUND, false, p_225623_4_, p_225623_5_, p_225623_6_, OverlayTexture.field_229196_a_, transformedModel);
|
||||
this.field_177080_a.func_229111_a_(itemstack, ItemCameraTransforms.TransformType.GROUND, false, p_225623_4_, p_225623_5_, p_225623_6_, OverlayTexture.field_229196_a_, ibakedmodel);
|
||||
p_225623_4_.func_227865_b_();
|
||||
if (!flag) {
|
||||
- p_225623_4_.func_227861_a_((double)(0.0F * f4), (double)(0.0F * f5), (double)(0.09375F * f6));
|
||||
@@ -47,7 +45,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,4 +95,21 @@
|
||||
@@ -97,4 +94,21 @@
|
||||
public ResourceLocation func_110775_a(ItemEntity p_110775_1_) {
|
||||
return AtlasTexture.field_110575_b;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/client/renderer/entity/LivingRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/LivingRenderer.java
|
||||
@@ -47,14 +47,17 @@
|
||||
@@ -48,14 +48,17 @@
|
||||
}
|
||||
|
||||
public void func_225623_a_(T p_225623_1_, float p_225623_2_, float p_225623_3_, MatrixStack p_225623_4_, IRenderTypeBuffer p_225623_5_, int p_225623_6_) {
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Pre<T, M>(p_225623_1_, this, p_225623_3_, p_225623_4_))) return;
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Pre<T, M>(p_225623_1_, this, p_225623_3_, p_225623_4_, p_225623_5_, p_225623_6_))) return;
|
||||
p_225623_4_.func_227860_a_();
|
||||
this.field_77045_g.field_217112_c = this.func_77040_d(p_225623_1_, p_225623_3_);
|
||||
- this.field_77045_g.field_217113_d = p_225623_1_.func_184218_aH();
|
||||
@@ -20,7 +20,7 @@
|
||||
LivingEntity livingentity = (LivingEntity)p_225623_1_.func_184187_bx();
|
||||
f = MathHelper.func_219805_h(p_225623_3_, livingentity.field_70760_ar, livingentity.field_70761_aq);
|
||||
f2 = f1 - f;
|
||||
@@ -91,7 +94,7 @@
|
||||
@@ -92,7 +95,7 @@
|
||||
p_225623_4_.func_227861_a_(0.0D, (double)-1.501F, 0.0D);
|
||||
float f8 = 0.0F;
|
||||
float f5 = 0.0F;
|
||||
@@ -29,11 +29,11 @@
|
||||
f8 = MathHelper.func_219799_g(p_225623_3_, p_225623_1_.field_184618_aE, p_225623_1_.field_70721_aZ);
|
||||
f5 = p_225623_1_.field_184619_aG - p_225623_1_.field_70721_aZ * (1.0F - p_225623_3_);
|
||||
if (p_225623_1_.func_70631_g_()) {
|
||||
@@ -132,6 +135,7 @@
|
||||
@@ -123,6 +126,7 @@
|
||||
|
||||
p_225623_4_.func_227865_b_();
|
||||
super.func_225623_a_(p_225623_1_, p_225623_2_, p_225623_3_, p_225623_4_, p_225623_5_, p_225623_6_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Post<T, M>(p_225623_1_, this, p_225623_3_, p_225623_4_));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Post<T, M>(p_225623_1_, this, p_225623_3_, p_225623_4_, p_225623_5_, p_225623_6_));
|
||||
}
|
||||
|
||||
public static int func_229117_c_(LivingEntity p_229117_0_, float p_229117_1_) {
|
||||
@Nullable
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
public void func_225623_a_(AbstractClientPlayerEntity p_225623_1_, float p_225623_2_, float p_225623_3_, MatrixStack p_225623_4_, IRenderTypeBuffer p_225623_5_, int p_225623_6_) {
|
||||
this.func_177137_d(p_225623_1_);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_225623_1_, this, p_225623_3_, p_225623_4_))) return;
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_225623_1_, this, p_225623_3_, p_225623_4_, p_225623_5_, p_225623_6_))) return;
|
||||
super.func_225623_a_(p_225623_1_, p_225623_2_, p_225623_3_, p_225623_4_, p_225623_5_, p_225623_6_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(p_225623_1_, this, p_225623_3_, p_225623_4_));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(p_225623_1_, this, p_225623_3_, p_225623_4_, p_225623_5_, p_225623_6_));
|
||||
}
|
||||
|
||||
public Vec3d func_225627_b_(AbstractClientPlayerEntity p_225627_1_, float p_225627_2_) {
|
||||
@@ -0,0 +1,54 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
public void func_225628_a_(MatrixStack p_225628_1_, IRenderTypeBuffer p_225628_2_, int p_225628_3_, T p_225628_4_, float p_225628_5_, float p_225628_6_, float p_225628_7_, float p_225628_8_, float p_225628_9_, float p_225628_10_) {
|
||||
ItemStack itemstack = p_225628_4_.func_184582_a(EquipmentSlotType.CHEST);
|
||||
- if (itemstack.func_77973_b() == Items.field_185160_cR) {
|
||||
+ if (shouldRender(itemstack, p_225628_4_)) {
|
||||
ResourceLocation resourcelocation;
|
||||
if (p_225628_4_ instanceof AbstractClientPlayerEntity) {
|
||||
AbstractClientPlayerEntity abstractclientplayerentity = (AbstractClientPlayerEntity)p_225628_4_;
|
||||
@@ -38,10 +38,10 @@
|
||||
} else if (abstractclientplayerentity.func_152122_n() && abstractclientplayerentity.func_110303_q() != null && abstractclientplayerentity.func_175148_a(PlayerModelPart.CAPE)) {
|
||||
resourcelocation = abstractclientplayerentity.func_110303_q();
|
||||
} else {
|
||||
- resourcelocation = field_188355_a;
|
||||
+ resourcelocation = getElytraTexture(itemstack, p_225628_4_);
|
||||
}
|
||||
} else {
|
||||
- resourcelocation = field_188355_a;
|
||||
+ resourcelocation = getElytraTexture(itemstack, p_225628_4_);
|
||||
}
|
||||
|
||||
p_225628_1_.func_227860_a_();
|
||||
@@ -53,4 +53,29 @@
|
||||
p_225628_1_.func_227865_b_();
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Determines if the ElytraLayer should render.
|
||||
+ * ItemStack and Entity are provided for modder convenience,
|
||||
+ * For example, using the same ElytraLayer for multiple custom Elytra.
|
||||
+ *
|
||||
+ * @param stack The Elytra ItemStack
|
||||
+ * @param entity The entity being rendered.
|
||||
+ * @return If the ElytraLayer should render.
|
||||
+ */
|
||||
+ public boolean shouldRender(ItemStack stack, T entity) {
|
||||
+ return stack.func_77973_b() == Items.field_185160_cR;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the texture to use with this ElytraLayer.
|
||||
+ * This assumes the vanilla Elytra model.
|
||||
+ *
|
||||
+ * @param stack The Elytra ItemStack.
|
||||
+ * @param entity The entity being rendered.
|
||||
+ * @return The texture.
|
||||
+ */
|
||||
+ public ResourceLocation getElytraTexture(ItemStack stack, T entity) {
|
||||
+ return field_188355_a;
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,13 @@
|
||||
--- a/net/minecraft/client/renderer/model/BakedQuad.java
|
||||
+++ b/net/minecraft/client/renderer/model/BakedQuad.java
|
||||
@@ -12,7 +12,17 @@
|
||||
@@ -6,13 +6,22 @@
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public class BakedQuad {
|
||||
+public class BakedQuad implements net.minecraftforge.client.model.pipeline.IVertexProducer {
|
||||
protected final int[] field_178215_a;
|
||||
protected final int field_178213_b;
|
||||
protected final Direction field_178214_c;
|
||||
protected final TextureAtlasSprite field_187509_d;
|
||||
|
||||
@@ -9,25 +16,25 @@
|
||||
+ */
|
||||
+ @Deprecated
|
||||
public BakedQuad(int[] p_i46574_1_, int p_i46574_2_, Direction p_i46574_3_, TextureAtlasSprite p_i46574_4_) {
|
||||
+ this(p_i46574_1_, p_i46574_2_, p_i46574_3_, p_i46574_4_, true, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176600_a);
|
||||
+ this(p_i46574_1_, p_i46574_2_, p_i46574_3_, p_i46574_4_, true);
|
||||
+ }
|
||||
+
|
||||
+ public BakedQuad(int[] p_i46574_1_, int p_i46574_2_, Direction p_i46574_3_, TextureAtlasSprite p_i46574_4_, boolean applyDiffuseLighting, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ this.format = format;
|
||||
+ public BakedQuad(int[] p_i46574_1_, int p_i46574_2_, Direction p_i46574_3_, TextureAtlasSprite p_i46574_4_, boolean applyDiffuseLighting) {
|
||||
+ this.applyDiffuseLighting = applyDiffuseLighting;
|
||||
this.field_178215_a = p_i46574_1_;
|
||||
this.field_178213_b = p_i46574_2_;
|
||||
this.field_178214_c = p_i46574_3_;
|
||||
@@ -34,4 +44,19 @@
|
||||
@@ -34,4 +43,20 @@
|
||||
public Direction func_178210_d() {
|
||||
return this.field_178214_c;
|
||||
}
|
||||
+
|
||||
+ protected final net.minecraft.client.renderer.vertex.VertexFormat format;
|
||||
+ // Forge start
|
||||
+ protected final boolean applyDiffuseLighting;
|
||||
+
|
||||
+ public net.minecraft.client.renderer.vertex.VertexFormat getFormat() {
|
||||
+ return format;
|
||||
+ @Override
|
||||
+ public void pipe(net.minecraftforge.client.model.pipeline.IVertexConsumer consumer) {
|
||||
+ net.minecraftforge.client.model.pipeline.LightUtil.putBakedQuad(consumer, this);
|
||||
+ }
|
||||
+
|
||||
+ public TextureAtlasSprite func_187508_a() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/model/BlockModel.java
|
||||
+++ b/net/minecraft/client/renderer/model/BlockModel.java
|
||||
@@ -56,9 +56,10 @@
|
||||
@@ -57,9 +57,10 @@
|
||||
public BlockModel field_178315_d;
|
||||
@Nullable
|
||||
protected ResourceLocation field_178316_e;
|
||||
@@ -12,8 +12,8 @@
|
||||
}
|
||||
|
||||
public static BlockModel func_178294_a(String p_178294_0_) {
|
||||
@@ -75,10 +76,15 @@
|
||||
this.field_187968_k = p_i46573_7_;
|
||||
@@ -76,10 +77,15 @@
|
||||
this.field_187968_k = p_i230056_7_;
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
@@ -28,7 +28,7 @@
|
||||
public boolean func_178309_b() {
|
||||
return this.field_178315_d != null ? this.field_178315_d.func_178309_b() : this.field_178322_i;
|
||||
}
|
||||
@@ -95,6 +101,10 @@
|
||||
@@ -100,6 +106,10 @@
|
||||
return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, this.field_187968_k);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
public Collection<ResourceLocation> func_187965_e() {
|
||||
Set<ResourceLocation> set = Sets.newHashSet();
|
||||
|
||||
@@ -138,6 +148,9 @@
|
||||
@@ -143,6 +153,9 @@
|
||||
|
||||
Set<Material> set1 = Sets.newHashSet(this.func_228816_c_("particle"));
|
||||
|
||||
@@ -49,20 +49,25 @@
|
||||
for(BlockPart blockpart : this.func_178298_a()) {
|
||||
for(BlockPartFace blockpartface : blockpart.field_178240_c.values()) {
|
||||
Material material = this.func_228816_c_(blockpartface.field_178242_d);
|
||||
@@ -168,7 +181,11 @@
|
||||
return this.func_228813_a_(p_225613_1_, this, p_225613_2_, p_225613_3_, p_225613_4_);
|
||||
@@ -169,11 +182,17 @@
|
||||
return set1;
|
||||
}
|
||||
|
||||
- public IBakedModel func_228813_a_(ModelBakery p_228813_1_, BlockModel p_228813_2_, Function<Material, TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_) {
|
||||
+ public IBakedModel func_228813_a_(ModelBakery p_228813_1_, BlockModel p_228813_2_, Function<Material, TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_)
|
||||
+ {
|
||||
+ return net.minecraftforge.client.model.ModelLoaderRegistry.bakeHelper(this, p_228813_1_, p_228813_2_, p_228813_3_, p_228813_4_, p_228813_5_);
|
||||
+ @Deprecated //Forge: Use Boolean variant
|
||||
public IBakedModel func_225613_a_(ModelBakery p_225613_1_, Function<Material, TextureAtlasSprite> p_225613_2_, IModelTransform p_225613_3_, ResourceLocation p_225613_4_) {
|
||||
return this.func_228813_a_(p_225613_1_, this, p_225613_2_, p_225613_3_, p_225613_4_, true);
|
||||
}
|
||||
|
||||
public IBakedModel func_228813_a_(ModelBakery p_228813_1_, BlockModel p_228813_2_, Function<Material, TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_, boolean p_228813_6_) {
|
||||
+ return net.minecraftforge.client.model.ModelLoaderRegistry.bakeHelper(this, p_228813_1_, p_228813_2_, p_228813_3_, p_228813_4_, p_228813_5_, p_228813_6_);
|
||||
+ }
|
||||
+ public IBakedModel bakeVanilla(ModelBakery p_228813_1_, BlockModel p_228813_2_, Function<Material, TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_) {
|
||||
+
|
||||
+ @Deprecated //Forge: exposed for our callbacks only. Use the above function.
|
||||
+ public IBakedModel bakeVanilla(ModelBakery p_228813_1_, BlockModel p_228813_2_, Function<Material, TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_, boolean p_228813_6_) {
|
||||
TextureAtlasSprite textureatlassprite = p_228813_3_.apply(this.func_228816_c_("particle"));
|
||||
if (this.func_178310_f() == ModelBakery.field_177616_r) {
|
||||
return new BuiltInModel(this.func_181682_g(), this.func_217646_a(p_228813_1_, p_228813_2_), textureatlassprite);
|
||||
@@ -195,6 +212,10 @@
|
||||
return new BuiltInModel(this.func_181682_g(), this.func_217646_a(p_228813_1_, p_228813_2_), textureatlassprite, this.func_230176_c_().func_230178_a_());
|
||||
@@ -200,6 +219,10 @@
|
||||
return field_217647_g.func_228824_a_(p_228812_0_.field_178241_a, p_228812_0_.field_178239_b, p_228812_1_, p_228812_2_, p_228812_3_, p_228812_4_, p_228812_0_.field_178237_d, p_228812_0_.field_178238_e, p_228812_5_);
|
||||
}
|
||||
|
||||
@@ -73,3 +78,11 @@
|
||||
public boolean func_178300_b(String p_178300_1_) {
|
||||
return !MissingTextureSprite.func_195675_b().equals(this.func_228816_c_(p_178300_1_).func_229313_b_());
|
||||
}
|
||||
@@ -373,5 +396,7 @@
|
||||
public boolean func_230178_a_() {
|
||||
return this == SIDE;
|
||||
}
|
||||
+
|
||||
+ public String getSerializedName() { return field_230177_c_; }
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,30 @@
|
||||
--- a/net/minecraft/client/renderer/model/FaceBakery.java
|
||||
+++ b/net/minecraft/client/renderer/model/FaceBakery.java
|
||||
@@ -24,7 +24,7 @@
|
||||
public BakedQuad func_228824_a_(Vector3f p_228824_1_, Vector3f p_228824_2_, BlockPartFace p_228824_3_, TextureAtlasSprite p_228824_4_, Direction p_228824_5_, IModelTransform p_228824_6_, @Nullable BlockPartRotation p_228824_7_, boolean p_228824_8_, ResourceLocation p_228824_9_) {
|
||||
BlockFaceUV blockfaceuv = p_228824_3_.field_178243_e;
|
||||
if (p_228824_6_.func_188049_c()) {
|
||||
- blockfaceuv = func_228821_a_(p_228824_3_.field_178243_e, p_228824_5_, p_228824_6_.func_225615_b_(), p_228824_9_);
|
||||
+ blockfaceuv = net.minecraftforge.client.ForgeHooksClient.applyUVLock(p_228824_3_.field_178243_e, p_228824_5_, p_228824_6_.func_225615_b_(), p_228824_9_);
|
||||
}
|
||||
|
||||
float[] afloat = new float[blockfaceuv.field_178351_a.length];
|
||||
@@ -43,7 +43,8 @@
|
||||
@@ -36,14 +36,16 @@
|
||||
blockfaceuv.field_178351_a[2] = MathHelper.func_219799_g(f, blockfaceuv.field_178351_a[2], f1);
|
||||
blockfaceuv.field_178351_a[1] = MathHelper.func_219799_g(f, blockfaceuv.field_178351_a[1], f2);
|
||||
blockfaceuv.field_178351_a[3] = MathHelper.func_219799_g(f, blockfaceuv.field_178351_a[3], f2);
|
||||
- int[] aint = this.func_228820_a_(blockfaceuv, p_228824_4_, p_228824_5_, this.func_199337_a(p_228824_1_, p_228824_2_), p_228824_6_.func_225615_b_(), p_228824_7_, p_228824_8_);
|
||||
+ // FORGE: Apply diffuse lighting at render-time instead of baking it in
|
||||
+ int[] aint = this.func_228820_a_(blockfaceuv, p_228824_4_, p_228824_5_, this.func_199337_a(p_228824_1_, p_228824_2_), p_228824_6_.func_225615_b_(), p_228824_7_, false);
|
||||
Direction direction = func_178410_a(aint);
|
||||
System.arraycopy(afloat, 0, blockfaceuv.field_178351_a, 0, afloat.length);
|
||||
if (p_228824_7_ == null) {
|
||||
this.func_178408_a(aint, direction);
|
||||
}
|
||||
|
||||
- return new BakedQuad(aint, p_228824_3_.field_178245_c, direction, p_228824_4_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.fillNormal(aint, direction);
|
||||
+ return new BakedQuad(aint, p_228824_3_.field_178245_c, direction, p_228824_4_, p_228824_8_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176600_a);
|
||||
+ return new BakedQuad(aint, p_228824_3_.field_178245_c, direction, p_228824_4_, p_228824_8_);
|
||||
}
|
||||
|
||||
public static BlockFaceUV func_228821_a_(BlockFaceUV p_228821_0_, Direction p_228821_1_, TransformationMatrix p_228821_2_, ResourceLocation p_228821_3_) {
|
||||
@@ -152,6 +153,8 @@
|
||||
@@ -150,8 +152,8 @@
|
||||
p_228826_1_[i + 1] = Float.floatToRawIntBits(p_228826_3_.func_195900_b());
|
||||
p_228826_1_[i + 2] = Float.floatToRawIntBits(p_228826_3_.func_195902_c());
|
||||
p_228826_1_[i + 3] = p_228826_4_;
|
||||
p_228826_1_[i + 4] = Float.floatToRawIntBits(p_228826_5_.func_94214_a((double)p_228826_6_.func_178348_a(p_228826_2_)));
|
||||
p_228826_1_[i + 4 + 1] = Float.floatToRawIntBits(p_228826_5_.func_94207_b((double)p_228826_6_.func_178346_b(p_228826_2_)));
|
||||
- p_228826_1_[i + 4] = Float.floatToRawIntBits(p_228826_5_.func_94214_a((double)p_228826_6_.func_178348_a(p_228826_2_)));
|
||||
- p_228826_1_[i + 4 + 1] = Float.floatToRawIntBits(p_228826_5_.func_94207_b((double)p_228826_6_.func_178346_b(p_228826_2_)));
|
||||
+ p_228826_1_[i + 4] = Float.floatToRawIntBits(p_228826_5_.func_94214_a((double)p_228826_6_.func_178348_a(p_228826_2_) * .999 + p_228826_6_.func_178348_a((p_228826_2_ + 2) % 4) * .001));
|
||||
+ p_228826_1_[i + 4 + 1] = Float.floatToRawIntBits(p_228826_5_.func_94207_b((double)p_228826_6_.func_178346_b(p_228826_2_) * .999 + p_228826_6_.func_178346_b((p_228826_2_ + 2) % 4) * .001));
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
List<BakedQuad> func_200117_a(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_);
|
||||
|
||||
boolean func_177555_b();
|
||||
@@ -19,9 +21,12 @@
|
||||
@@ -21,9 +23,13 @@
|
||||
|
||||
boolean func_188618_c();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
TextureAtlasSprite func_177554_e();
|
||||
|
||||
- ItemCameraTransforms func_177552_f();
|
||||
+ /**@deprecated Forge: Use {@link net.minecraftforge.client.extensions.IForgeBakedModel#handlePerspective(net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType, com.mojang.blaze3d.matrix.MatrixStack)} instead */
|
||||
+ @Deprecated
|
||||
+ default ItemCameraTransforms func_177552_f() { return ItemCameraTransforms.field_178357_a; }
|
||||
|
||||
|
||||
+3
-14
@@ -1,17 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/model/ItemCameraTransforms.java
|
||||
+++ b/net/minecraft/client/renderer/model/ItemCameraTransforms.java
|
||||
@@ -9,6 +9,10 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
+/**
|
||||
+ * @deprecated use {@link net.minecraft.client.renderer.model.IBakedModel#handlePerspective(TransformType)} instead
|
||||
+ */
|
||||
+@Deprecated
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ItemCameraTransforms {
|
||||
public static final ItemCameraTransforms field_178357_a = new ItemCameraTransforms();
|
||||
@@ -25,6 +29,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
this(ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a);
|
||||
}
|
||||
|
||||
@@ -19,7 +8,7 @@
|
||||
public ItemCameraTransforms(ItemCameraTransforms p_i46443_1_) {
|
||||
this.field_188036_k = p_i46443_1_.field_188036_k;
|
||||
this.field_188037_l = p_i46443_1_.field_188037_l;
|
||||
@@ -36,6 +41,7 @@
|
||||
@@ -36,6 +37,7 @@
|
||||
this.field_181700_p = p_i46443_1_.field_181700_p;
|
||||
}
|
||||
|
||||
@@ -27,7 +16,7 @@
|
||||
public ItemCameraTransforms(ItemTransformVec3f p_i46569_1_, ItemTransformVec3f p_i46569_2_, ItemTransformVec3f p_i46569_3_, ItemTransformVec3f p_i46569_4_, ItemTransformVec3f p_i46569_5_, ItemTransformVec3f p_i46569_6_, ItemTransformVec3f p_i46569_7_, ItemTransformVec3f p_i46569_8_) {
|
||||
this.field_188036_k = p_i46569_1_;
|
||||
this.field_188037_l = p_i46569_2_;
|
||||
@@ -47,6 +53,7 @@
|
||||
@@ -47,6 +49,7 @@
|
||||
this.field_181700_p = p_i46569_8_;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/renderer/model/ItemModelGenerator.java
|
||||
+++ b/net/minecraft/client/renderer/model/ItemModelGenerator.java
|
||||
@@ -36,6 +36,7 @@
|
||||
map.put("particle", p_209579_2_.func_178300_b("particle") ? Either.left(p_209579_2_.func_228816_c_("particle")) : map.get("layer0"));
|
||||
BlockModel blockmodel = new BlockModel((ResourceLocation)null, list, map, false, p_209579_2_.func_230176_c_(), p_209579_2_.func_181682_g(), p_209579_2_.func_187966_f());
|
||||
blockmodel.field_178317_b = p_209579_2_.field_178317_b;
|
||||
+ blockmodel.customData.copyFrom(p_209579_2_.customData);
|
||||
return blockmodel;
|
||||
}
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
field_177603_c.warn("Unable to bake model: '{}': {}", p_229350_1_, exception);
|
||||
}
|
||||
|
||||
@@ -447,6 +462,13 @@
|
||||
@@ -443,6 +458,13 @@
|
||||
this.field_217848_D.addAll(p_209593_2_.func_187965_e());
|
||||
}
|
||||
|
||||
+ // Same as func_217843_a but without restricting to MRL's
|
||||
+ // Same as loadTopModel but without restricting to MRL's
|
||||
+ private void addModelToCache(ResourceLocation p_217843_1_) {
|
||||
+ IUnbakedModel iunbakedmodel = this.func_209597_a(p_217843_1_);
|
||||
+ this.field_217849_F.put(p_217843_1_, iunbakedmodel);
|
||||
@@ -60,7 +60,7 @@
|
||||
private void func_217843_a(ModelResourceLocation p_217843_1_) {
|
||||
IUnbakedModel iunbakedmodel = this.func_209597_a(p_217843_1_);
|
||||
this.field_217849_F.put(p_217843_1_, iunbakedmodel);
|
||||
@@ -461,7 +483,13 @@
|
||||
@@ -457,7 +479,13 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -74,12 +74,12 @@
|
||||
Triple<ResourceLocation, TransformationMatrix, Boolean> triple = Triple.of(p_217845_1_, p_217845_2_.func_225615_b_(), p_217845_2_.func_188049_c());
|
||||
if (this.field_217850_G.containsKey(triple)) {
|
||||
return this.field_217850_G.get(triple);
|
||||
@@ -472,11 +500,11 @@
|
||||
@@ -468,11 +496,11 @@
|
||||
if (iunbakedmodel instanceof BlockModel) {
|
||||
BlockModel blockmodel = (BlockModel)iunbakedmodel;
|
||||
if (blockmodel.func_178310_f() == field_177606_o) {
|
||||
- return field_217854_z.func_209579_a(this.field_229322_z_::func_229151_a_, blockmodel).func_228813_a_(this, blockmodel, this.field_229322_z_::func_229151_a_, p_217845_2_, p_217845_1_);
|
||||
+ return field_217854_z.func_209579_a(textureGetter, blockmodel).func_228813_a_(this, blockmodel, textureGetter, p_217845_2_, p_217845_1_);
|
||||
- return field_217854_z.func_209579_a(this.field_229322_z_::func_229151_a_, blockmodel).func_228813_a_(this, blockmodel, this.field_229322_z_::func_229151_a_, p_217845_2_, p_217845_1_, false);
|
||||
+ return field_217854_z.func_209579_a(textureGetter, blockmodel).func_228813_a_(this, blockmodel, this.field_229322_z_::func_229151_a_, p_217845_2_, p_217845_1_, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
this.field_217850_G.put(triple, ibakedmodel);
|
||||
return ibakedmodel;
|
||||
}
|
||||
@@ -530,6 +558,10 @@
|
||||
@@ -526,6 +554,10 @@
|
||||
return this.field_225367_M;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static class BlockStateDefinitionException extends RuntimeException {
|
||||
public BlockStateDefinitionException(String p_i49526_1_) {
|
||||
@@ -537,6 +569,10 @@
|
||||
@@ -533,6 +565,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
p_212854_2_.func_219897_b();
|
||||
return modelbakery;
|
||||
}
|
||||
@@ -60,6 +64,7 @@
|
||||
@@ -64,6 +68,7 @@
|
||||
this.field_174958_a = p_212853_1_.func_217846_a();
|
||||
this.field_224744_f = p_212853_1_.func_225354_b();
|
||||
this.field_174955_d = this.field_174958_a.get(ModelBakery.field_177604_a);
|
||||
@@ -37,15 +37,15 @@
|
||||
p_212853_3_.func_219895_b("cache");
|
||||
this.field_174957_c.func_178124_c();
|
||||
p_212853_3_.func_76319_b();
|
||||
@@ -85,6 +90,7 @@
|
||||
@@ -89,6 +94,7 @@
|
||||
}
|
||||
|
||||
public AtlasTexture func_229356_a_(ResourceLocation p_229356_1_) {
|
||||
+ if (this.field_229352_b_ == null) throw new RuntimeException("func_229356_a_ called too early!");
|
||||
+ if (this.field_229352_b_ == null) throw new RuntimeException("getAtlasTexture called too early!");
|
||||
return this.field_229352_b_.func_229152_a_(p_229356_1_);
|
||||
}
|
||||
|
||||
@@ -95,4 +101,10 @@
|
||||
@@ -99,4 +105,10 @@
|
||||
public void func_229355_a_(int p_229355_1_) {
|
||||
this.field_229354_f_ = p_229355_1_;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
--- a/net/minecraft/client/renderer/model/SimpleBakedModel.java
|
||||
+++ b/net/minecraft/client/renderer/model/SimpleBakedModel.java
|
||||
@@ -74,6 +74,10 @@
|
||||
this(p_i46988_1_.func_178309_b(), p_i46988_1_.func_178311_c(), p_i46988_1_.func_181682_g(), p_i46988_2_);
|
||||
}
|
||||
@@ -77,6 +77,10 @@
|
||||
private final boolean field_177653_e;
|
||||
private final ItemCameraTransforms field_177651_f;
|
||||
|
||||
+ public Builder(net.minecraftforge.client.model.IModelConfiguration model, ItemOverrideList overrides) {
|
||||
+ this(model.useSmoothLighting(), model.isShadedInGui(), model.getCameraTransforms(), overrides);
|
||||
+ this(model.useSmoothLighting(), model.isShadedInGui(), model.isSideLit(), model.getCameraTransforms(), overrides);
|
||||
+ }
|
||||
+
|
||||
private Builder(boolean p_i46990_1_, boolean p_i46990_2_, ItemCameraTransforms p_i46990_3_, ItemOverrideList p_i46990_4_) {
|
||||
for(Direction direction : Direction.values()) {
|
||||
this.field_177654_b.put(direction, Lists.newArrayList());
|
||||
public Builder(BlockModel p_i230060_1_, ItemOverrideList p_i230060_2_, boolean p_i230060_3_) {
|
||||
this(p_i230060_1_.func_178309_b(), p_i230060_1_.func_230176_c_().func_230178_a_(), p_i230060_3_, p_i230060_1_.func_181682_g(), p_i230060_2_);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/client/renderer/model/VariantList.java
|
||||
+++ b/net/minecraft/client/renderer/model/VariantList.java
|
||||
@@ -64,7 +64,7 @@
|
||||
WeightedBakedModel.Builder weightedbakedmodel$builder = new WeightedBakedModel.Builder();
|
||||
|
||||
for(Variant variant : this.func_188114_a()) {
|
||||
- IBakedModel ibakedmodel = p_225613_1_.func_217845_a(variant.func_188046_a(), variant);
|
||||
+ IBakedModel ibakedmodel = p_225613_1_.getBakedModel(variant.func_188046_a(), variant, p_225613_2_);
|
||||
weightedbakedmodel$builder.func_177677_a(ibakedmodel, variant.func_188047_d());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/NativeImage.java
|
||||
+++ b/net/minecraft/client/renderer/texture/NativeImage.java
|
||||
@@ -178,7 +178,7 @@
|
||||
@@ -180,7 +180,7 @@
|
||||
public int func_195709_a(int p_195709_1_, int p_195709_2_) {
|
||||
if (this.field_211680_b != NativeImage.PixelFormat.RGBA) {
|
||||
throw new IllegalArgumentException(String.format("getPixelRGBA only works on RGBA images; have %s", this.field_211680_b));
|
||||
@@ -9,7 +9,7 @@
|
||||
this.func_195696_g();
|
||||
long i = (long)((p_195709_1_ + p_195709_2_ * this.field_195719_a) * 4);
|
||||
return MemoryUtil.memGetInt(this.field_195722_d + i);
|
||||
@@ -190,7 +190,7 @@
|
||||
@@ -192,7 +192,7 @@
|
||||
public void func_195700_a(int p_195700_1_, int p_195700_2_, int p_195700_3_) {
|
||||
if (this.field_211680_b != NativeImage.PixelFormat.RGBA) {
|
||||
throw new IllegalArgumentException(String.format("getPixelRGBA only works on RGBA images; have %s", this.field_211680_b));
|
||||
@@ -18,7 +18,7 @@
|
||||
this.func_195696_g();
|
||||
long i = (long)((p_195700_1_ + p_195700_2_ * this.field_195719_a) * 4);
|
||||
MemoryUtil.memPutInt(this.field_195722_d + i, p_195700_3_);
|
||||
@@ -202,7 +202,7 @@
|
||||
@@ -204,7 +204,7 @@
|
||||
public byte func_211675_e(int p_211675_1_, int p_211675_2_) {
|
||||
if (!this.field_211680_b.func_211653_r()) {
|
||||
throw new IllegalArgumentException(String.format("no luminance or alpha in %s", this.field_211680_b));
|
||||
@@ -27,12 +27,3 @@
|
||||
int i = (p_211675_1_ + p_211675_2_ * this.field_195719_a) * this.field_211680_b.func_211651_a() + this.field_211680_b.func_211647_v() / 8;
|
||||
return MemoryUtil.memGetByte(this.field_195722_d + (long)i);
|
||||
} else {
|
||||
@@ -336,7 +336,7 @@
|
||||
}
|
||||
|
||||
public void func_211676_a(STBTTFontinfo p_211676_1_, int p_211676_2_, int p_211676_3_, int p_211676_4_, float p_211676_5_, float p_211676_6_, float p_211676_7_, float p_211676_8_, int p_211676_9_, int p_211676_10_) {
|
||||
- if (p_211676_9_ >= 0 && p_211676_9_ + p_211676_3_ <= this.func_195702_a() && p_211676_10_ >= 0 && p_211676_10_ + p_211676_4_ <= this.func_195714_b()) {
|
||||
+ if (p_211676_9_ >= 0 && p_211676_9_ + p_211676_3_ < this.func_195702_a() && p_211676_10_ >= 0 && p_211676_10_ + p_211676_4_ < this.func_195714_b()) { //Fix MC-162953 bounds checks in `NativeImage`
|
||||
if (this.field_211680_b.func_211651_a() != 1) {
|
||||
throw new IllegalArgumentException("Can only write fonts into 1-component images.");
|
||||
} else {
|
||||
@@ -1,12 +1,21 @@
|
||||
--- a/net/minecraft/client/renderer/texture/Texture.java
|
||||
+++ b/net/minecraft/client/renderer/texture/Texture.java
|
||||
@@ -33,6 +33,11 @@
|
||||
@@ -33,6 +33,20 @@
|
||||
GlStateManager.func_227677_b_(3553, 10240, j);
|
||||
}
|
||||
|
||||
+ // FORGE: This seems to have been stripped out, but we need it
|
||||
+ private boolean lastBlur;
|
||||
+ private boolean lastMipmap;
|
||||
+
|
||||
+ public void setBlurMipmap(boolean blur, boolean mipmap) {
|
||||
+ this.lastBlur = this.field_174940_b;
|
||||
+ this.lastMipmap = this.field_174941_c;
|
||||
+ func_174937_a(blur, mipmap);
|
||||
+ }
|
||||
+
|
||||
+ public void restoreLastBlurMipmap() {
|
||||
+ func_174937_a(this.field_174940_b, this.field_174941_c);
|
||||
+ func_174937_a(this.lastBlur, this.lastMipmap);
|
||||
+ }
|
||||
+
|
||||
public int func_110552_b() {
|
||||
|
||||
+3
-4
@@ -17,14 +17,13 @@
|
||||
p_195667_3_[i].func_227788_a_(i, this.field_110975_c >> i, this.field_110974_d >> i, p_195667_1_ >> i, p_195667_2_ >> i, this.field_229226_c_.field_229245_b_ >> i, this.field_229226_c_.field_229246_c_ >> i, this.field_195670_c.length > 1, false);
|
||||
}
|
||||
|
||||
@@ -341,4 +342,10 @@
|
||||
@@ -341,4 +342,9 @@
|
||||
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+ // Forge Start
|
||||
+
|
||||
+ public int getPixelRGBA(int frameIndex, int x, int y) {
|
||||
+ return this.field_195670_c[frameIndex].func_195709_a(x + this.field_195671_d[frameIndex] * func_94211_a(), y + this.field_195672_e[frameIndex] * func_94216_b());
|
||||
+ return this.field_195670_c[0].func_195709_a(x + this.field_195671_d[frameIndex] * func_94211_a(), y + this.field_195672_e[frameIndex] * func_94216_b());
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
+++ b/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
@@ -140,6 +140,7 @@
|
||||
@@ -145,6 +145,7 @@
|
||||
public void func_147645_c(ResourceLocation p_147645_1_) {
|
||||
Texture texture = this.func_229267_b_(p_147645_1_);
|
||||
if (texture != null) {
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/client/renderer/tileentity/ChestTileEntityRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/tileentity/ChestTileEntityRenderer.java
|
||||
@@ -98,7 +98,7 @@
|
||||
f1 = 1.0F - f1;
|
||||
f1 = 1.0F - f1 * f1 * f1;
|
||||
int i = icallbackwrapper.apply(new DualBrightnessCallback<>()).applyAsInt(p_225616_5_);
|
||||
- Material material = Atlases.func_228771_a_(p_225616_1_, chesttype, this.field_147509_j);
|
||||
+ Material material = this.getMaterial(p_225616_1_, chesttype);
|
||||
IVertexBuilder ivertexbuilder = material.func_229311_a_(p_225616_4_, RenderType::func_228638_b_);
|
||||
if (flag1) {
|
||||
if (chesttype == ChestType.LEFT) {
|
||||
@@ -121,4 +121,8 @@
|
||||
p_228871_4_.func_228308_a_(p_228871_1_, p_228871_2_, p_228871_7_, p_228871_8_);
|
||||
p_228871_5_.func_228308_a_(p_228871_1_, p_228871_2_, p_228871_7_, p_228871_8_);
|
||||
}
|
||||
+
|
||||
+ protected Material getMaterial(T tileEntity, ChestType chestType) {
|
||||
+ return Atlases.func_228771_a_(tileEntity, chestType, this.field_147509_j);
|
||||
+ }
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
|
||||
+++ b/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
|
||||
@@ -141,4 +141,9 @@
|
||||
@@ -134,4 +134,9 @@
|
||||
public FontRenderer func_147548_a() {
|
||||
return this.field_147557_n;
|
||||
}
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
+ public boolean hasPosition() { return field_177355_b.stream().anyMatch(e -> e.func_177374_g()); }
|
||||
+ public boolean hasNormal() { return field_177355_b.stream().anyMatch(e -> e.func_177375_c() == VertexFormatElement.Usage.NORMAL); }
|
||||
+ public boolean hasColor() { return field_177355_b.stream().anyMatch(e -> e.func_177375_c() == VertexFormatElement.Usage.COLOR); }
|
||||
+ public boolean hasUV(int which) { return field_177355_b.stream().anyMatch(e -> e.func_177375_c() == VertexFormatElement.Usage.COLOR && e.func_177369_e() == which); }
|
||||
+ public boolean hasUV(int which) { return field_177355_b.stream().anyMatch(e -> e.func_177375_c() == VertexFormatElement.Usage.UV && e.func_177369_e() == which); }
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
this.field_135037_b = p_i1303_2_;
|
||||
this.field_135038_c = p_i1303_3_;
|
||||
this.field_135036_d = p_i1303_4_;
|
||||
+ String[] splitLangCode = field_135038_c.split("_", 2);
|
||||
+ String[] splitLangCode = field_135039_a.split("_", 2);
|
||||
+ if (splitLangCode.length == 1) { // Vanilla has some languages without underscores
|
||||
+ this.javaLocale = new java.util.Locale(field_135039_a);
|
||||
+ } else {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
public static void func_197981_a(InputMappings.Input p_197981_0_) {
|
||||
- KeyBinding keybinding = field_74514_b.get(p_197981_0_);
|
||||
+ for (KeyBinding keybinding : field_74514_b.lookupAll(p_197981_0_))
|
||||
+ KeyBinding keybinding = field_74514_b.lookupActive(p_197981_0_);
|
||||
if (keybinding != null) {
|
||||
++keybinding.field_151474_i;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
--- a/net/minecraft/client/shader/Framebuffer.java
|
||||
+++ b/net/minecraft/client/shader/Framebuffer.java
|
||||
@@ -100,8 +100,14 @@
|
||||
GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, FramebufferConstants.field_227594_c_, 3553, this.field_147617_g, 0);
|
||||
if (this.field_147619_e) {
|
||||
GlStateManager.func_227730_i_(FramebufferConstants.field_227593_b_, this.field_147624_h);
|
||||
+ if (!stencilEnabled) {
|
||||
GlStateManager.func_227678_b_(FramebufferConstants.field_227593_b_, 33190, this.field_147622_a, this.field_147620_b);
|
||||
GlStateManager.func_227693_c_(FramebufferConstants.field_227592_a_, FramebufferConstants.field_227595_d_, FramebufferConstants.field_227593_b_, this.field_147624_h);
|
||||
+ } else {
|
||||
+ GlStateManager.func_227678_b_(FramebufferConstants.field_227593_b_, org.lwjgl.opengl.EXTPackedDepthStencil.GL_DEPTH24_STENCIL8_EXT, this.field_147622_a, this.field_147620_b);
|
||||
+ GlStateManager.func_227693_c_(FramebufferConstants.field_227592_a_, org.lwjgl.opengl.EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, FramebufferConstants.field_227593_b_, this.field_147624_h);
|
||||
+ GlStateManager.func_227693_c_(FramebufferConstants.field_227592_a_, org.lwjgl.opengl.EXTFramebufferObject.GL_STENCIL_ATTACHMENT_EXT, FramebufferConstants.field_227593_b_, this.field_147624_h);
|
||||
+ }
|
||||
}
|
||||
|
||||
this.func_147611_b();
|
||||
@@ -254,4 +260,29 @@
|
||||
GlStateManager.func_227658_a_(i, p_216493_1_);
|
||||
this.func_147609_e();
|
||||
}
|
||||
+
|
||||
+ /*================================ FORGE START ================================================*/
|
||||
+ private boolean stencilEnabled = false;
|
||||
+ /**
|
||||
+ * Attempts to enable 8 bits of stencil buffer on this FrameBuffer.
|
||||
+ * Modders must call this directly to set things up.
|
||||
+ * This is to prevent the default cause where graphics cards do not support stencil bits.
|
||||
+ * <b>Make sure to call this on the main render thread!</b>
|
||||
+ */
|
||||
+ public void enableStencil()
|
||||
+ {
|
||||
+ if(stencilEnabled) return;
|
||||
+ stencilEnabled = true;
|
||||
+ this.func_216491_a(field_147621_c, field_147618_d, net.minecraft.client.Minecraft.field_142025_a);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns wither or not this FBO has been successfully initialized with stencil bits.
|
||||
+ * If not, and a modder wishes it to be, they must call enableStencil.
|
||||
+ */
|
||||
+ public boolean isStencilEnabled()
|
||||
+ {
|
||||
+ return this.stencilEnabled;
|
||||
+ }
|
||||
+ /*================================ FORGE END ================================================*/
|
||||
}
|
||||
@@ -69,3 +69,12 @@
|
||||
if (p_217384_1_ == this.field_73037_M.field_71439_g) {
|
||||
this.field_73037_M.func_147118_V().func_147682_a(new EntityTickableSound(p_217384_3_, p_217384_4_, p_217384_2_));
|
||||
}
|
||||
@@ -689,7 +706,7 @@
|
||||
}
|
||||
|
||||
public double func_228331_m_() {
|
||||
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
|
||||
+ return this.field_73011_w.getHorizonHeight();
|
||||
}
|
||||
|
||||
public int func_228332_n_() {
|
||||
@@ -1,6 +1,10 @@
|
||||
--- a/net/minecraft/data/DataGenerator.java
|
||||
+++ b/net/minecraft/data/DataGenerator.java
|
||||
@@ -19,7 +19,7 @@
|
||||
@@ -16,10 +16,11 @@
|
||||
private final Collection<Path> field_200394_b;
|
||||
private final Path field_200395_c;
|
||||
private final List<IDataProvider> field_200396_d = Lists.newArrayList();
|
||||
+ private final List<IDataProvider> providerView = java.util.Collections.unmodifiableList(field_200396_d);
|
||||
|
||||
public DataGenerator(Path p_i48266_1_, Collection<Path> p_i48266_2_) {
|
||||
this.field_200395_c = p_i48266_1_;
|
||||
@@ -9,10 +13,22 @@
|
||||
}
|
||||
|
||||
public Collection<Path> func_200389_a() {
|
||||
@@ -53,6 +53,10 @@
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
for(IDataProvider idataprovider : this.field_200396_d) {
|
||||
field_200393_a.info("Starting provider: {}", (Object)idataprovider.func_200397_b());
|
||||
+ net.minecraftforge.fml.StartupMessageManager.addModMessage("Generating: " + idataprovider.func_200397_b());
|
||||
stopwatch1.start();
|
||||
idataprovider.func_200398_a(directorycache);
|
||||
stopwatch1.stop();
|
||||
@@ -53,6 +55,14 @@
|
||||
this.field_200396_d.add(p_200390_1_);
|
||||
}
|
||||
|
||||
+ public List<IDataProvider> getProviders() {
|
||||
+ return this.providerView;
|
||||
+ }
|
||||
+
|
||||
+ public void addInput(Path value) {
|
||||
+ this.field_200394_b.add(value);
|
||||
+ }
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
--- a/net/minecraft/data/DirectoryCache.java
|
||||
+++ b/net/minecraft/data/DirectoryCache.java
|
||||
@@ -23,7 +23,7 @@
|
||||
private final Path field_208326_c;
|
||||
private int field_208327_d;
|
||||
private final Map<Path, String> field_208328_e = Maps.newHashMap();
|
||||
- private final Map<Path, String> field_208329_f = Maps.newHashMap();
|
||||
+ private final Map<Path, String> field_208329_f = Maps.newTreeMap(); //Forge: TreeMap, makes the file output predictable/sorted.
|
||||
private final Set<Path> field_218457_g = Sets.newHashSet();
|
||||
@@ -55,8 +55,8 @@
|
||||
}
|
||||
|
||||
public DirectoryCache(Path p_i49352_1_, String p_i49352_2_) throws IOException {
|
||||
IOUtils.writeLines(this.field_208329_f.entrySet().stream().map((p_208319_1_) -> {
|
||||
- return (String)p_208319_1_.getValue() + ' ' + this.field_208325_b.relativize(p_208319_1_.getKey());
|
||||
- }).collect(Collectors.toList()), System.lineSeparator(), writer);
|
||||
+ return (String)p_208319_1_.getValue() + ' ' + this.field_208325_b.relativize(p_208319_1_.getKey()).toString().replace('\\', '/'); //Forge: Standardize file paths.
|
||||
+ }).sorted(java.util.Comparator.comparing(a -> a.split(" ")[1])).collect(Collectors.toList()), System.lineSeparator(), writer);
|
||||
writer.close();
|
||||
field_208324_a.debug("Caching: cache hits: {}, created: {} removed: {}", this.field_208327_d, this.field_208329_f.size() - this.field_208327_d, this.field_208328_e.size());
|
||||
}
|
||||
@@ -1,19 +1,20 @@
|
||||
--- a/net/minecraft/data/Main.java
|
||||
+++ b/net/minecraft/data/Main.java
|
||||
@@ -21,8 +21,11 @@
|
||||
@@ -21,8 +21,12 @@
|
||||
OptionSpec<Void> optionspec6 = optionparser.accepts("all", "Include all generators");
|
||||
OptionSpec<String> optionspec7 = optionparser.accepts("output", "Output folder").withRequiredArg().defaultsTo("generated");
|
||||
OptionSpec<String> optionspec8 = optionparser.accepts("input", "Input folder").withRequiredArg();
|
||||
+ OptionSpec<String> existing = optionparser.accepts("existing", "Existing resource packs that generated resources can reference").withRequiredArg();
|
||||
+ OptionSpec<java.io.File> gameDir = optionparser.accepts("gameDir").withRequiredArg().ofType(java.io.File.class).defaultsTo(new java.io.File(".")).required(); //Need by modlauncher, so lets just eat it
|
||||
+ OptionSpec<String> mod = optionparser.accepts("mod", "A modid to dump").withRequiredArg().withValuesSeparatedBy(",");
|
||||
+ OptionSpec<Void> flat = optionparser.accepts("flat", "Do not append modid prefix to output directory when generating for multiple mods");
|
||||
OptionSet optionset = optionparser.parse(p_main_0_);
|
||||
- if (!optionset.has(optionspec) && optionset.hasOptions()) {
|
||||
+ if (!optionset.has(optionspec) && optionset.hasOptions() && !(optionset.specs().size() == 1 && optionset.has(gameDir))) {
|
||||
Path path = Paths.get(optionspec7.value(optionset));
|
||||
boolean flag = optionset.has(optionspec6);
|
||||
boolean flag1 = flag || optionset.has(optionspec2);
|
||||
@@ -30,10 +33,12 @@
|
||||
@@ -30,10 +34,13 @@
|
||||
boolean flag3 = flag || optionset.has(optionspec3);
|
||||
boolean flag4 = flag || optionset.has(optionspec4);
|
||||
boolean flag5 = flag || optionset.has(optionspec5);
|
||||
@@ -24,9 +25,10 @@
|
||||
+ Collection<Path> inputs = optionset.valuesOf(optionspec8).stream().map(Paths::get).collect(Collectors.toList());
|
||||
+ Collection<Path> existingPacks = optionset.valuesOf(existing).stream().map(Paths::get).collect(Collectors.toList());
|
||||
+ java.util.Set<String> mods = new java.util.HashSet<>(optionset.valuesOf(mod));
|
||||
+ net.minecraftforge.fml.ModLoader.get().runDataGenerator(mods, path, inputs, existingPacks, flag2, flag1, flag3, flag4, flag5);
|
||||
+ boolean isFlat = mods.isEmpty() || optionset.has(flat);
|
||||
+ net.minecraftforge.fml.ModLoader.get().runDataGenerator(mods, path, inputs, existingPacks, flag2, flag1, flag3, flag4, flag5, isFlat);
|
||||
+ if (mods.contains("minecraft") || mods.isEmpty())
|
||||
+ func_200264_a(mods.isEmpty() ? path : path.resolve("minecraft"), inputs, flag1, flag2, flag3, flag4, flag5).func_200392_c();
|
||||
+ func_200264_a(isFlat ? path : path.resolve("minecraft"), inputs, flag1, flag2, flag3, flag4, flag5).func_200392_c();
|
||||
} else {
|
||||
optionparser.printHelpOn(System.out);
|
||||
}
|
||||
@@ -1,6 +1,28 @@
|
||||
--- a/net/minecraft/dispenser/IDispenseItemBehavior.java
|
||||
+++ b/net/minecraft/dispenser/IDispenseItemBehavior.java
|
||||
@@ -295,8 +295,9 @@
|
||||
@@ -62,6 +62,7 @@
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IDispenseItemBehavior {
|
||||
+ org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
|
||||
IDispenseItemBehavior field_223216_a_ = (p_210297_0_, p_210297_1_) -> {
|
||||
return p_210297_1_;
|
||||
};
|
||||
@@ -162,7 +163,12 @@
|
||||
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
|
||||
Direction direction = p_82487_1_.func_189992_e().func_177229_b(DispenserBlock.field_176441_a);
|
||||
EntityType<?> entitytype = ((SpawnEggItem)p_82487_2_.func_77973_b()).func_208076_b(p_82487_2_.func_77978_p());
|
||||
- entitytype.func_220331_a(p_82487_1_.func_197524_h(), p_82487_2_, (PlayerEntity)null, p_82487_1_.func_180699_d().func_177972_a(direction), SpawnReason.DISPENSER, direction != Direction.UP, false);
|
||||
+ try { // FORGE: fix potential crash
|
||||
+ entitytype.func_220331_a(p_82487_1_.func_197524_h(), p_82487_2_, (PlayerEntity) null, p_82487_1_.func_180699_d().func_177972_a(direction), SpawnReason.DISPENSER, direction != Direction.UP, false);
|
||||
+ } catch (Exception e) {
|
||||
+ LOGGER.error("Error while dispensing spawn egg from dispenser at {}", p_82487_1_.func_180699_d(), e);
|
||||
+ return ItemStack.field_190927_a;
|
||||
+ }
|
||||
p_82487_2_.func_190918_g(1);
|
||||
return p_82487_2_;
|
||||
}
|
||||
@@ -295,8 +301,9 @@
|
||||
world.func_175656_a(blockpos, Blocks.field_150480_ab.func_176223_P());
|
||||
} else if (FlintAndSteelItem.func_219997_a(blockstate)) {
|
||||
world.func_175656_a(blockpos, blockstate.func_206870_a(BlockStateProperties.field_208190_q, Boolean.valueOf(true)));
|
||||
@@ -12,7 +34,7 @@
|
||||
world.func_217377_a(blockpos, false);
|
||||
} else {
|
||||
this.field_218407_b = false;
|
||||
@@ -426,15 +427,23 @@
|
||||
@@ -426,15 +433,23 @@
|
||||
}
|
||||
});
|
||||
DispenserBlock.func_199774_a(Items.field_151097_aZ.func_199767_j(), new OptionalDispenseBehavior() {
|
||||
|
||||
@@ -222,15 +222,27 @@
|
||||
}
|
||||
|
||||
public boolean func_70028_i(Entity p_70028_1_) {
|
||||
@@ -2046,6 +2073,7 @@
|
||||
@@ -2046,6 +2073,11 @@
|
||||
|
||||
@Nullable
|
||||
public Entity func_212321_a(DimensionType p_212321_1_) {
|
||||
+ return this.changeDimension(p_212321_1_, func_184102_h().func_71218_a(p_212321_1_).func_85176_s());
|
||||
+ }
|
||||
+ @Nullable
|
||||
+ public Entity changeDimension(DimensionType p_212321_1_, net.minecraftforge.common.util.ITeleporter teleporter) {
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.onTravelToDimension(this, p_212321_1_)) return null;
|
||||
if (!this.field_70170_p.field_72995_K && !this.field_70128_L) {
|
||||
this.field_70170_p.func_217381_Z().func_76320_a("changeDimension");
|
||||
MinecraftServer minecraftserver = this.func_184102_h();
|
||||
@@ -2063,16 +2091,9 @@
|
||||
@@ -2055,6 +2087,7 @@
|
||||
this.field_71093_bK = p_212321_1_;
|
||||
this.func_213319_R();
|
||||
this.field_70170_p.func_217381_Z().func_76320_a("reposition");
|
||||
+ Entity transportedEntity = teleporter.placeEntity(this, serverworld, serverworld1, this.field_70177_z, spawnPortal -> { //Forge: Start vanilla logic
|
||||
Vec3d vec3d = this.func_213322_ci();
|
||||
float f = 0.0F;
|
||||
BlockPos blockpos;
|
||||
@@ -2063,16 +2096,9 @@
|
||||
} else if (p_212321_1_ == DimensionType.field_223229_c_) {
|
||||
blockpos = serverworld1.func_180504_m();
|
||||
} else {
|
||||
@@ -250,16 +262,41 @@
|
||||
|
||||
double d3 = Math.min(-2.9999872E7D, serverworld1.func_175723_af().func_177726_b() + 16.0D);
|
||||
double d4 = Math.min(-2.9999872E7D, serverworld1.func_175723_af().func_177736_c() + 16.0D);
|
||||
@@ -2101,7 +2122,7 @@
|
||||
@@ -2082,6 +2108,7 @@
|
||||
d1 = MathHelper.func_151237_a(d1, d4, d6);
|
||||
Vec3d vec3d1 = this.func_181014_aG();
|
||||
blockpos = new BlockPos(d0, this.func_226278_cu_(), d1);
|
||||
+ if (spawnPortal) {
|
||||
BlockPattern.PortalInfo blockpattern$portalinfo = serverworld1.func_85176_s().func_222272_a(blockpos, vec3d, this.func_181012_aH(), vec3d1.field_72450_a, vec3d1.field_72448_b, this instanceof PlayerEntity);
|
||||
if (blockpattern$portalinfo == null) {
|
||||
return null;
|
||||
@@ -2090,6 +2117,7 @@
|
||||
blockpos = new BlockPos(blockpattern$portalinfo.field_222505_a);
|
||||
vec3d = blockpattern$portalinfo.field_222506_b;
|
||||
f = (float)blockpattern$portalinfo.field_222507_c;
|
||||
+ }
|
||||
}
|
||||
|
||||
this.field_70170_p.func_217381_Z().func_219895_b("reloading");
|
||||
@@ -2100,13 +2128,15 @@
|
||||
entity.func_213317_d(vec3d);
|
||||
serverworld1.func_217460_e(entity);
|
||||
}
|
||||
+ return entity;
|
||||
+ });//Forge: End vanilla logic
|
||||
|
||||
- this.field_70128_L = true;
|
||||
+ this.remove(false);
|
||||
this.field_70170_p.func_217381_Z().func_76319_b();
|
||||
serverworld.func_82742_i();
|
||||
serverworld1.func_82742_i();
|
||||
@@ -2129,10 +2150,12 @@
|
||||
this.field_70170_p.func_217381_Z().func_76319_b();
|
||||
- return entity;
|
||||
+ return transportedEntity;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -2129,10 +2159,12 @@
|
||||
}
|
||||
|
||||
public Vec3d func_181014_aG() {
|
||||
@@ -272,7 +309,7 @@
|
||||
return this.field_181018_ap;
|
||||
}
|
||||
|
||||
@@ -2261,7 +2284,7 @@
|
||||
@@ -2261,7 +2293,7 @@
|
||||
Pose pose = this.func_213283_Z();
|
||||
EntitySize entitysize1 = this.func_213305_a(pose);
|
||||
this.field_213325_aI = entitysize1;
|
||||
@@ -281,7 +318,7 @@
|
||||
if (entitysize1.field_220315_a < entitysize.field_220315_a) {
|
||||
double d0 = (double)entitysize1.field_220315_a / 2.0D;
|
||||
this.func_174826_a(new AxisAlignedBB(this.func_226277_ct_() - d0, this.func_226278_cu_(), this.func_226281_cx_() - d0, this.func_226277_ct_() + d0, this.func_226278_cu_() + (double)entitysize1.field_220316_b, this.func_226281_cx_() + d0));
|
||||
@@ -2713,6 +2736,7 @@
|
||||
@@ -2713,6 +2745,7 @@
|
||||
this.field_70165_t = p_226288_1_;
|
||||
this.field_70163_u = p_226288_3_;
|
||||
this.field_70161_v = p_226288_5_;
|
||||
@@ -289,7 +326,7 @@
|
||||
}
|
||||
|
||||
public void func_70623_bb() {
|
||||
@@ -2726,4 +2750,69 @@
|
||||
@@ -2726,4 +2759,69 @@
|
||||
public interface IMoveCallback {
|
||||
void accept(Entity p_accept_1_, double p_accept_2_, double p_accept_4_, double p_accept_6_);
|
||||
}
|
||||
|
||||
@@ -53,16 +53,16 @@
|
||||
|
||||
for(int i = 0; i < 20; ++i) {
|
||||
double d0 = this.field_70146_Z.nextGaussian() * 0.02D;
|
||||
@@ -571,7 +580,7 @@
|
||||
Effect effect = iterator.next();
|
||||
EffectInstance effectinstance = this.field_70713_bf.get(effect);
|
||||
if (!effectinstance.func_76455_a(this)) {
|
||||
@@ -573,7 +582,7 @@
|
||||
if (!effectinstance.func_76455_a(this, () -> {
|
||||
this.func_70695_b(effectinstance, true);
|
||||
})) {
|
||||
- if (!this.field_70170_p.field_72995_K) {
|
||||
+ if (!this.field_70170_p.field_72995_K && !net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.living.PotionEvent.PotionExpiryEvent(this, effectinstance))) {
|
||||
iterator.remove();
|
||||
this.func_70688_c(effectinstance);
|
||||
}
|
||||
@@ -621,8 +630,10 @@
|
||||
@@ -623,8 +632,10 @@
|
||||
this.func_82142_c(false);
|
||||
} else {
|
||||
Collection<EffectInstance> collection = this.field_70713_bf.values();
|
||||
@@ -75,7 +75,7 @@
|
||||
this.func_82142_c(this.func_70644_a(Effects.field_76441_p));
|
||||
}
|
||||
|
||||
@@ -686,7 +697,9 @@
|
||||
@@ -688,7 +699,9 @@
|
||||
|
||||
boolean flag;
|
||||
for(flag = false; iterator.hasNext(); flag = true) {
|
||||
@@ -86,7 +86,7 @@
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -716,6 +729,7 @@
|
||||
@@ -718,6 +731,7 @@
|
||||
return false;
|
||||
} else {
|
||||
EffectInstance effectinstance = this.field_70713_bf.get(p_195064_1_.func_188419_a());
|
||||
@@ -94,7 +94,7 @@
|
||||
if (effectinstance == null) {
|
||||
this.field_70713_bf.put(p_195064_1_.func_188419_a(), p_195064_1_);
|
||||
this.func_70670_a(p_195064_1_);
|
||||
@@ -730,6 +744,9 @@
|
||||
@@ -732,6 +746,9 @@
|
||||
}
|
||||
|
||||
public boolean func_70687_e(EffectInstance p_70687_1_) {
|
||||
@@ -104,7 +104,7 @@
|
||||
if (this.func_70668_bt() == CreatureAttribute.field_223223_b_) {
|
||||
Effect effect = p_70687_1_.func_188419_a();
|
||||
if (effect == Effects.field_76428_l || effect == Effects.field_76436_u) {
|
||||
@@ -750,6 +767,7 @@
|
||||
@@ -752,6 +769,7 @@
|
||||
}
|
||||
|
||||
public boolean func_195063_d(Effect p_195063_1_) {
|
||||
@@ -112,7 +112,7 @@
|
||||
EffectInstance effectinstance = this.func_184596_c(p_195063_1_);
|
||||
if (effectinstance != null) {
|
||||
this.func_70688_c(effectinstance);
|
||||
@@ -786,6 +804,8 @@
|
||||
@@ -788,6 +806,8 @@
|
||||
}
|
||||
|
||||
public void func_70691_i(float p_70691_1_) {
|
||||
@@ -121,7 +121,7 @@
|
||||
float f = this.func_110143_aJ();
|
||||
if (f > 0.0F) {
|
||||
this.func_70606_j(f + p_70691_1_);
|
||||
@@ -802,6 +822,7 @@
|
||||
@@ -804,6 +824,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
@@ -129,7 +129,7 @@
|
||||
if (this.func_180431_b(p_70097_1_)) {
|
||||
return false;
|
||||
} else if (this.field_70170_p.field_72995_K) {
|
||||
@@ -868,8 +889,8 @@
|
||||
@@ -870,8 +891,8 @@
|
||||
if (entity1 instanceof PlayerEntity) {
|
||||
this.field_70718_bc = 100;
|
||||
this.field_70717_bb = (PlayerEntity)entity1;
|
||||
@@ -140,15 +140,15 @@
|
||||
if (wolfentity.func_70909_n()) {
|
||||
this.field_70718_bc = 100;
|
||||
LivingEntity livingentity = wolfentity.func_70902_q();
|
||||
@@ -1051,6 +1072,7 @@
|
||||
@@ -1053,6 +1074,7 @@
|
||||
}
|
||||
|
||||
public void func_70645_a(DamageSource p_70645_1_) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onLivingDeath(this, p_70645_1_)) return;
|
||||
if (!this.field_70729_aU) {
|
||||
if (!this.field_70128_L && !this.field_70729_aU) {
|
||||
Entity entity = p_70645_1_.func_76346_g();
|
||||
LivingEntity livingentity = this.func_94060_bK();
|
||||
@@ -1082,10 +1104,10 @@
|
||||
@@ -1084,10 +1106,10 @@
|
||||
if (!this.field_70170_p.field_72995_K) {
|
||||
boolean flag = false;
|
||||
if (p_226298_1_ instanceof WitherEntity) {
|
||||
@@ -161,7 +161,7 @@
|
||||
this.field_70170_p.func_180501_a(blockpos, blockstate, 3);
|
||||
flag = true;
|
||||
}
|
||||
@@ -1102,13 +1124,10 @@
|
||||
@@ -1104,13 +1126,10 @@
|
||||
|
||||
protected void func_213345_d(DamageSource p_213345_1_) {
|
||||
Entity entity = p_213345_1_.func_76346_g();
|
||||
@@ -178,7 +178,7 @@
|
||||
boolean flag = this.field_70718_bc > 0;
|
||||
if (this.func_146066_aG() && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223602_e)) {
|
||||
this.func_213354_a(p_213345_1_, flag);
|
||||
@@ -1117,6 +1136,10 @@
|
||||
@@ -1119,6 +1138,10 @@
|
||||
|
||||
this.func_213337_cE();
|
||||
this.func_226294_cV_();
|
||||
@@ -189,7 +189,7 @@
|
||||
}
|
||||
|
||||
protected void func_213337_cE() {
|
||||
@@ -1126,6 +1149,7 @@
|
||||
@@ -1128,6 +1151,7 @@
|
||||
if (!this.field_70170_p.field_72995_K && (this.func_70684_aJ() || this.field_70718_bc > 0 && this.func_146066_aG() && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223602_e))) {
|
||||
int i = this.func_70693_a(this.field_70717_bb);
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
while(i > 0) {
|
||||
int j = ExperienceOrbEntity.func_70527_a(i);
|
||||
i -= j;
|
||||
@@ -1133,6 +1157,7 @@
|
||||
@@ -1135,6 +1159,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,17 @@
|
||||
}
|
||||
|
||||
protected void func_213333_a(DamageSource p_213333_1_, int p_213333_2_, boolean p_213333_3_) {
|
||||
@@ -1159,6 +1184,9 @@
|
||||
@@ -1148,7 +1173,8 @@
|
||||
ResourceLocation resourcelocation = this.func_213346_cF();
|
||||
LootTable loottable = this.field_70170_p.func_73046_m().func_200249_aQ().func_186521_a(resourcelocation);
|
||||
LootContext.Builder lootcontext$builder = this.func_213363_a(p_213354_2_, p_213354_1_);
|
||||
- loottable.func_216120_b(lootcontext$builder.func_216022_a(LootParameterSets.field_216263_d), this::func_199701_a_);
|
||||
+ LootContext ctx = lootcontext$builder.func_216022_a(LootParameterSets.field_216263_d);
|
||||
+ loottable.func_216113_a(ctx).forEach(this::func_199701_a_);
|
||||
}
|
||||
|
||||
protected LootContext.Builder func_213363_a(boolean p_213363_1_, DamageSource p_213363_2_) {
|
||||
@@ -1161,6 +1187,9 @@
|
||||
}
|
||||
|
||||
public void func_70653_a(Entity p_70653_1_, float p_70653_2_, double p_70653_3_, double p_70653_5_) {
|
||||
@@ -215,7 +225,7 @@
|
||||
if (!(this.field_70146_Z.nextDouble() < this.func_110148_a(SharedMonsterAttributes.field_111266_c).func_111126_e())) {
|
||||
this.field_70160_al = true;
|
||||
Vec3d vec3d = this.func_213322_ci();
|
||||
@@ -1194,12 +1222,7 @@
|
||||
@@ -1196,12 +1225,7 @@
|
||||
return false;
|
||||
} else {
|
||||
BlockState blockstate = this.func_213339_cH();
|
||||
@@ -229,7 +239,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,6 +1246,11 @@
|
||||
@@ -1225,6 +1249,11 @@
|
||||
}
|
||||
|
||||
public boolean func_225503_b_(float p_225503_1_, float p_225503_2_) {
|
||||
@@ -241,7 +251,7 @@
|
||||
boolean flag = super.func_225503_b_(p_225503_1_, p_225503_2_);
|
||||
int i = this.func_225508_e_(p_225503_1_, p_225503_2_);
|
||||
if (i > 0) {
|
||||
@@ -1246,9 +1274,10 @@
|
||||
@@ -1248,9 +1277,10 @@
|
||||
int i = MathHelper.func_76128_c(this.func_226277_ct_());
|
||||
int j = MathHelper.func_76128_c(this.func_226278_cu_() - (double)0.2F);
|
||||
int k = MathHelper.func_76128_c(this.func_226281_cx_());
|
||||
@@ -255,7 +265,7 @@
|
||||
this.func_184185_a(soundtype.func_185842_g(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F);
|
||||
}
|
||||
|
||||
@@ -1317,6 +1346,8 @@
|
||||
@@ -1319,6 +1349,8 @@
|
||||
|
||||
protected void func_70665_d(DamageSource p_70665_1_, float p_70665_2_) {
|
||||
if (!this.func_180431_b(p_70665_1_)) {
|
||||
@@ -264,7 +274,7 @@
|
||||
p_70665_2_ = this.func_70655_b(p_70665_1_, p_70665_2_);
|
||||
p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_);
|
||||
float f2 = Math.max(p_70665_2_ - this.func_110139_bj(), 0.0F);
|
||||
@@ -1326,10 +1357,11 @@
|
||||
@@ -1328,10 +1360,11 @@
|
||||
((ServerPlayerEntity)p_70665_1_.func_76346_g()).func_195067_a(Stats.field_212735_F, Math.round(f * 10.0F));
|
||||
}
|
||||
|
||||
@@ -277,7 +287,7 @@
|
||||
this.func_110149_m(this.func_110139_bj() - f2);
|
||||
}
|
||||
}
|
||||
@@ -1383,6 +1415,8 @@
|
||||
@@ -1385,6 +1418,8 @@
|
||||
}
|
||||
|
||||
public void func_226292_a_(Hand p_226292_1_, boolean p_226292_2_) {
|
||||
@@ -286,7 +296,7 @@
|
||||
if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0) {
|
||||
this.field_110158_av = -1;
|
||||
this.field_82175_bq = true;
|
||||
@@ -1769,15 +1803,16 @@
|
||||
@@ -1771,15 +1806,16 @@
|
||||
}
|
||||
|
||||
this.field_70160_al = true;
|
||||
@@ -305,7 +315,7 @@
|
||||
}
|
||||
|
||||
protected float func_189749_co() {
|
||||
@@ -1787,11 +1822,15 @@
|
||||
@@ -1789,11 +1825,15 @@
|
||||
public void func_213352_e(Vec3d p_213352_1_) {
|
||||
if (this.func_70613_aW() || this.func_184186_bw()) {
|
||||
double d0 = 0.08D;
|
||||
@@ -322,7 +332,7 @@
|
||||
|
||||
if (!this.func_70090_H() || this instanceof PlayerEntity && ((PlayerEntity)this).field_71075_bZ.field_75100_b) {
|
||||
if (!this.func_180799_ab() || this instanceof PlayerEntity && ((PlayerEntity)this).field_71075_bZ.field_75100_b) {
|
||||
@@ -1840,7 +1879,7 @@
|
||||
@@ -1842,7 +1882,7 @@
|
||||
}
|
||||
} else {
|
||||
BlockPos blockpos = this.func_226270_aj_();
|
||||
@@ -331,7 +341,7 @@
|
||||
float f7 = this.field_70122_E ? f5 * 0.91F : 0.91F;
|
||||
this.func_213309_a(this.func_213335_r(f5), p_213352_1_);
|
||||
this.func_213317_d(this.func_213362_f(this.func_213322_ci()));
|
||||
@@ -1902,6 +1941,7 @@
|
||||
@@ -1904,6 +1944,7 @@
|
||||
f = 0.96F;
|
||||
}
|
||||
|
||||
@@ -339,7 +349,7 @@
|
||||
this.func_213309_a(f1, p_213352_1_);
|
||||
this.func_213315_a(MoverType.SELF, this.func_213322_ci());
|
||||
Vec3d vec3d1 = this.func_213322_ci();
|
||||
@@ -1977,6 +2017,7 @@
|
||||
@@ -1979,6 +2020,7 @@
|
||||
}
|
||||
|
||||
public void func_70071_h_() {
|
||||
@@ -347,7 +357,7 @@
|
||||
super.func_70071_h_();
|
||||
this.func_184608_ct();
|
||||
this.func_205014_p();
|
||||
@@ -2020,7 +2061,9 @@
|
||||
@@ -2022,7 +2064,9 @@
|
||||
|
||||
ItemStack itemstack1 = this.func_184582_a(equipmentslottype);
|
||||
if (!ItemStack.func_77989_b(itemstack1, itemstack)) {
|
||||
@@ -357,7 +367,16 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
this.func_110140_aT().func_111148_a(itemstack.func_111283_C(equipmentslottype));
|
||||
}
|
||||
@@ -2472,13 +2515,22 @@
|
||||
@@ -2258,6 +2302,8 @@
|
||||
boolean flag = this.func_70083_f(7);
|
||||
if (flag && !this.field_70122_E && !this.func_184218_aH()) {
|
||||
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
||||
+ flag = itemstack.canElytraFly(this) && itemstack.elytraFlightTick(this, this.field_184629_bo);
|
||||
+ if (false) //Forge: Moved to ElytraItem
|
||||
if (itemstack.func_77973_b() == Items.field_185160_cR && ElytraItem.func_185069_d(itemstack)) {
|
||||
flag = true;
|
||||
if (!this.field_70170_p.field_72995_K && (this.field_184629_bo + 1) % 20 == 0) {
|
||||
@@ -2474,13 +2520,22 @@
|
||||
|
||||
private void func_184608_ct() {
|
||||
if (this.func_184587_cr()) {
|
||||
@@ -382,7 +401,7 @@
|
||||
this.func_71036_o();
|
||||
}
|
||||
} else {
|
||||
@@ -2520,8 +2572,10 @@
|
||||
@@ -2522,8 +2577,10 @@
|
||||
public void func_184598_c(Hand p_184598_1_) {
|
||||
ItemStack itemstack = this.func_184586_b(p_184598_1_);
|
||||
if (!itemstack.func_190926_b() && !this.func_184587_cr()) {
|
||||
@@ -394,7 +413,7 @@
|
||||
if (!this.field_70170_p.field_72995_K) {
|
||||
this.func_204802_c(1, true);
|
||||
this.func_204802_c(2, p_184598_1_ == Hand.OFF_HAND);
|
||||
@@ -2581,6 +2635,9 @@
|
||||
@@ -2583,6 +2640,9 @@
|
||||
vec3d1 = vec3d1.func_178789_a(-this.field_70125_A * ((float)Math.PI / 180F));
|
||||
vec3d1 = vec3d1.func_178785_b(-this.field_70177_z * ((float)Math.PI / 180F));
|
||||
vec3d1 = vec3d1.func_72441_c(this.func_226277_ct_(), this.func_226280_cw_(), this.func_226281_cx_());
|
||||
@@ -404,7 +423,7 @@
|
||||
this.field_70170_p.func_195594_a(new ItemParticleData(ParticleTypes.field_197591_B, p_195062_1_), vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c);
|
||||
}
|
||||
|
||||
@@ -2592,7 +2649,9 @@
|
||||
@@ -2594,7 +2654,9 @@
|
||||
} else {
|
||||
if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) {
|
||||
this.func_226293_b_(this.field_184627_bm, 16);
|
||||
@@ -415,7 +434,7 @@
|
||||
this.func_184602_cy();
|
||||
}
|
||||
|
||||
@@ -2613,7 +2672,11 @@
|
||||
@@ -2615,7 +2677,11 @@
|
||||
|
||||
public void func_184597_cx() {
|
||||
if (!this.field_184627_bm.func_190926_b()) {
|
||||
@@ -427,7 +446,7 @@
|
||||
if (this.field_184627_bm.func_222122_m()) {
|
||||
this.func_184608_ct();
|
||||
}
|
||||
@@ -2770,16 +2833,16 @@
|
||||
@@ -2772,16 +2838,16 @@
|
||||
|
||||
private boolean func_213359_p() {
|
||||
return this.func_213374_dv().map((p_213347_1_) -> {
|
||||
@@ -448,7 +467,7 @@
|
||||
BlockPos blockpos = p_213368_1_.func_177984_a();
|
||||
return new Vec3d((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.1D, (double)blockpos.func_177952_p() + 0.5D);
|
||||
});
|
||||
@@ -2795,7 +2858,9 @@
|
||||
@@ -2797,7 +2863,9 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public Direction func_213376_dz() {
|
||||
BlockPos blockpos = this.func_213374_dv().orElse((BlockPos)null);
|
||||
@@ -459,7 +478,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70094_T() {
|
||||
@@ -2864,4 +2929,58 @@
|
||||
@@ -2866,4 +2934,58 @@
|
||||
public void func_213334_d(Hand p_213334_1_) {
|
||||
this.func_213361_c(p_213334_1_ == Hand.MAIN_HAND ? EquipmentSlotType.MAINHAND : EquipmentSlotType.OFFHAND);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
--- a/net/minecraft/entity/effect/LightningBoltEntity.java
|
||||
+++ b/net/minecraft/entity/effect/LightningBoltEntity.java
|
||||
@@ -80,6 +80,7 @@
|
||||
@@ -38,11 +38,6 @@
|
||||
this.field_70264_a = this.field_70146_Z.nextLong();
|
||||
this.field_70263_c = this.field_70146_Z.nextInt(3) + 1;
|
||||
this.field_184529_d = p_i46780_8_;
|
||||
- Difficulty difficulty = p_i46780_1_.func_175659_aa();
|
||||
- if (difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD) {
|
||||
- this.func_195053_a(4);
|
||||
- }
|
||||
-
|
||||
}
|
||||
|
||||
public SoundCategory func_184176_by() {
|
||||
@@ -58,6 +53,10 @@
|
||||
if (this.field_70262_b == 2) {
|
||||
this.field_70170_p.func_184148_a((PlayerEntity)null, this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), SoundEvents.field_187754_de, SoundCategory.WEATHER, 10000.0F, 0.8F + this.field_70146_Z.nextFloat() * 0.2F);
|
||||
this.field_70170_p.func_184148_a((PlayerEntity)null, this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), SoundEvents.field_187752_dd, SoundCategory.WEATHER, 2.0F, 0.5F + this.field_70146_Z.nextFloat() * 0.2F);
|
||||
+ Difficulty difficulty = this.field_70170_p.func_175659_aa();
|
||||
+ if (difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD) {
|
||||
+ this.func_195053_a(4);
|
||||
+ }
|
||||
}
|
||||
|
||||
--this.field_70262_b;
|
||||
@@ -80,6 +79,7 @@
|
||||
List<Entity> list = this.field_70170_p.func_175674_a(this, new AxisAlignedBB(this.func_226277_ct_() - 3.0D, this.func_226278_cu_() - 3.0D, this.func_226281_cx_() - 3.0D, this.func_226277_ct_() + 3.0D, this.func_226278_cu_() + 6.0D + 3.0D, this.func_226281_cx_() + 3.0D), Entity::func_70089_S);
|
||||
|
||||
for(Entity entity : list) {
|
||||
|
||||
@@ -22,3 +22,17 @@
|
||||
}
|
||||
} else if (livingentity != null) {
|
||||
livingentity.func_70634_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_());
|
||||
@@ -121,11 +124,11 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- public Entity func_212321_a(DimensionType p_212321_1_) {
|
||||
+ public Entity changeDimension(DimensionType p_212321_1_, net.minecraftforge.common.util.ITeleporter teleporter) {
|
||||
if (this.field_70192_c.field_71093_bK != p_212321_1_) {
|
||||
this.field_70192_c = null;
|
||||
}
|
||||
|
||||
- return super.func_212321_a(p_212321_1_);
|
||||
+ return super.changeDimension(p_212321_1_, teleporter);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/entity/item/FallingBlockEntity.java
|
||||
+++ b/net/minecraft/entity/item/FallingBlockEntity.java
|
||||
@@ -152,7 +152,7 @@
|
||||
@@ -153,7 +153,7 @@
|
||||
((FallingBlock)block).func_176502_a_(this.field_70170_p, blockpos1, this.field_175132_d, blockstate);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/entity/item/FireworkRocketEntity.java
|
||||
+++ b/net/minecraft/entity/item/FireworkRocketEntity.java
|
||||
@@ -187,6 +187,7 @@
|
||||
}
|
||||
|
||||
protected void func_213892_a(RayTraceResult p_213892_1_) {
|
||||
+ if(p_213892_1_.func_216346_c() != RayTraceResult.Type.MISS && net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, p_213892_1_)) return;
|
||||
if (p_213892_1_.func_216346_c() == RayTraceResult.Type.ENTITY && !this.field_70170_p.field_72995_K) {
|
||||
this.func_213893_k();
|
||||
} else if (this.field_70132_H) {
|
||||
Loaded 100 of 1120 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user