mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c75eb9e7cf | ||
|
|
2353cd982a | ||
|
|
dbcf8bd075 | ||
|
|
9f3141ea16 | ||
|
|
c382527ba2 | ||
|
|
45f8dc5245 | ||
|
|
43391c009c | ||
|
|
15733a18e4 | ||
|
|
f68344cd7c | ||
|
|
e421ea164c | ||
|
|
178e3d244a | ||
|
|
bd5e107628 | ||
|
|
a477671c03 | ||
|
|
887bc37209 | ||
|
|
47f05a4fcd | ||
|
|
47ba5b7a89 | ||
|
|
05480843cd | ||
|
|
0e1ed8c936 | ||
|
|
edf41bda19 | ||
|
|
051416b823 | ||
|
|
84fe2cbcc4 | ||
|
|
4ff0d246ce | ||
|
|
9051021474 | ||
|
|
cc473be332 | ||
|
|
b1f73a0760 | ||
|
|
de03eb6e3c | ||
|
|
bef8c2da3d | ||
|
|
3820d1b66f | ||
|
|
7dbae7ea4a | ||
|
|
be5885155c | ||
|
|
5dac065994 | ||
|
|
1d7db95539 | ||
|
|
de24783152 | ||
|
|
bfeec0c7bd | ||
|
|
2e42340dfa | ||
|
|
16b82bb97b | ||
|
|
d76ee4edd7 | ||
|
|
cf09f3eeb9 | ||
|
|
d8eaeabf3c | ||
|
|
600e68cace | ||
|
|
625cd746ef | ||
|
|
fc000fe913 | ||
|
|
e3db429763 | ||
|
|
e803006360 | ||
|
|
07ffc890e5 | ||
|
|
5a20705f05 | ||
|
|
aaa1deeef2 | ||
|
|
50197b1fa5 | ||
|
|
797791c2af | ||
|
|
c2de232703 | ||
|
|
9118c3dd24 | ||
|
|
c6d512afe8 | ||
|
|
5037adede9 | ||
|
|
a5aca97e31 | ||
|
|
edca0c7293 | ||
|
|
132cc3659d | ||
|
|
680c4062f4 | ||
|
|
e1efab0452 | ||
|
|
bd428de4fa | ||
|
|
978b3c7fb1 | ||
|
|
fe43088c96 | ||
|
|
a3c4ffd2c1 | ||
|
|
a8e68328c4 | ||
|
|
8bad5b1f13 | ||
|
|
54b4089afd | ||
|
|
493608e1b5 | ||
|
|
0984777c98 | ||
|
|
97a2b9a448 | ||
|
|
399bc6c9c3 | ||
|
|
20702456ac | ||
|
|
b4a6d186de | ||
|
|
8f9e52c260 | ||
|
|
e62805f1d7 | ||
|
|
ff752ab14b | ||
|
|
19a38f5cb9 | ||
|
|
7592bbe87e | ||
|
|
30bad1e26d | ||
|
|
5104824a1b | ||
|
|
4ffcdaa6da | ||
|
|
95d2b6ae89 | ||
|
|
d21c05b9ea | ||
|
|
97dfcbc52b | ||
|
|
532d153d33 | ||
|
|
849e718a42 | ||
|
|
720966544d | ||
|
|
7717795f42 | ||
|
|
daa817bbdf | ||
|
|
fba168051a | ||
|
|
941b9a1d1f | ||
|
|
27798c5804 | ||
|
|
9d84b5df31 | ||
|
|
00797fdb3a | ||
|
|
8d617767ad | ||
|
|
c9f9fd01b5 | ||
|
|
2450693f7d | ||
|
|
cf7784ac4b | ||
|
|
e3137213e5 | ||
|
|
7b43b9f8c0 | ||
|
|
daa85d3c5b | ||
|
|
9e8c4c3a58 | ||
|
|
24f3ef5ffe | ||
|
|
a3edfd3748 | ||
|
|
96b9a057b7 | ||
|
|
638d1d31de | ||
|
|
00013865b0 | ||
|
|
6722e7a428 | ||
|
|
0f56b4c4ee | ||
|
|
201349f8de | ||
|
|
065ebde57e | ||
|
|
6b3f2f46fa | ||
|
|
e4ffbeb329 | ||
|
|
60ee0bcdb3 | ||
|
|
2a2306d6e1 | ||
|
|
fc3fa13bf3 | ||
|
|
aab8adb884 | ||
|
|
2ad347b043 | ||
|
|
d26e285e09 | ||
|
|
91a2b02590 | ||
|
|
a567ddaa10 | ||
|
|
68e71009f3 | ||
|
|
0227bfe9ee | ||
|
|
df57e0a1ba | ||
|
|
68ea1b654c | ||
|
|
ff86201523 | ||
|
|
8e5138da27 | ||
|
|
a690a7526a | ||
|
|
517bbc8b5b | ||
|
|
ce3d8b40cf | ||
|
|
45152c6073 | ||
|
|
46c9dec421 | ||
|
|
a0b0e6788d | ||
|
|
b00c91af3c | ||
|
|
d11a582a25 | ||
|
|
bf1a0461cb | ||
|
|
4aa53dbb00 | ||
|
|
a79e4b3722 | ||
|
|
d1016f752e | ||
|
|
ab29145328 | ||
|
|
99e7fad655 | ||
|
|
d5aa0c4a91 | ||
|
|
20d231bbed | ||
|
|
5db6f158f8 | ||
|
|
88d02712db | ||
|
|
7858abe96d | ||
|
|
b0e35f358e | ||
|
|
80d2730fec | ||
|
|
3b64ea6305 | ||
|
|
5f1a7326c7 | ||
|
|
af9bb9641b | ||
|
|
fc6b38d7f2 | ||
|
|
4887a5e0e7 | ||
|
|
97d4652f5f | ||
|
|
41a6d70aee | ||
|
|
99917e569c | ||
|
|
30227a1e28 | ||
|
|
a1110b92d0 | ||
|
|
438e3886cc | ||
|
|
fa6ca9c275 | ||
|
|
71baebcc93 | ||
|
|
e7b5dcb149 | ||
|
|
29e52e963d | ||
|
|
3dc8d2b293 | ||
|
|
29be40adec | ||
|
|
272ea75aab | ||
|
|
cbac95de0f | ||
|
|
87d89fb09a | ||
|
|
7bca3684bd | ||
|
|
6cfc88e707 | ||
|
|
8179a504cb | ||
|
|
baf32612db | ||
|
|
9cf9305fd0 |
No files matched your search
+4
-1
@@ -27,7 +27,6 @@
|
||||
/projects/**/run/
|
||||
/projects/**/*.launch
|
||||
/repo/
|
||||
/buildSrc
|
||||
src/generated/resources/.cache/
|
||||
|
||||
#Patch rejects
|
||||
@@ -43,3 +42,7 @@ changelog.txt
|
||||
gradle.properties
|
||||
!/mdk/gradle.properties
|
||||
/projects/forge/rejects/
|
||||
|
||||
# Srg2Source causes import bugs on these patches. If you intentionnally change these, remove the ignore.
|
||||
/patches/minecraft/net/minecraft/client/renderer/ViewFrustum.java.patch
|
||||
/patches/minecraft/net/minecraft/data/BlockModelDefinition.java.patch
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Minecraft Forge
|
||||
Copyright (c) 2016-2019.
|
||||
Copyright (c) 2016-2020.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
+105
-399
@@ -10,49 +10,38 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.178'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.179'
|
||||
classpath 'org.ow2.asm:asm:7.2'
|
||||
classpath 'org.ow2.asm:asm-tree:7.2'
|
||||
}
|
||||
}
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.LinkedHashMap
|
||||
import java.util.TreeSet
|
||||
import java.util.stream.Collectors
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
import java.util.zip.ZipOutputStream
|
||||
import java.security.MessageDigest
|
||||
import java.net.URL
|
||||
import net.minecraftforge.gradle.common.task.ArchiveChecksum
|
||||
import net.minecraftforge.forge.tasks.*
|
||||
import static net.minecraftforge.forge.tasks.Util.*
|
||||
import net.minecraftforge.gradle.common.task.DownloadMavenArtifact
|
||||
import net.minecraftforge.gradle.common.task.ExtractInheritance
|
||||
import net.minecraftforge.gradle.common.task.SignJar
|
||||
import net.minecraftforge.gradle.common.util.HashStore
|
||||
import net.minecraftforge.gradle.mcp.function.MCPFunction
|
||||
import net.minecraftforge.gradle.mcp.util.MCPEnvironment
|
||||
import net.minecraftforge.gradle.patcher.task.ApplyBinPatches
|
||||
import net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
|
||||
import net.minecraftforge.gradle.userdev.tasks.RenameJar
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
import de.undercouch.gradle.tasks.download.Download
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
import org.objectweb.asm.ClassReader
|
||||
|
||||
plugins {
|
||||
id 'net.minecrell.licenser' version '0.4'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id 'de.undercouch.download' version '3.3.0'
|
||||
id 'com.github.ben-manes.versions' version '0.22.0'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version'))
|
||||
Util.init() //Init all our extension methods!
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
|
||||
ext {
|
||||
JAR_SIGNER = null
|
||||
@@ -65,8 +54,8 @@ ext {
|
||||
}
|
||||
MAPPING_CHANNEL = 'snapshot'
|
||||
MAPPING_VERSION = '20200514-1.16'
|
||||
MC_VERSION = '1.16.1'
|
||||
MCP_VERSION = '20200625.134731'
|
||||
MC_VERSION = '1.16.3'
|
||||
MCP_VERSION = '20200910.110331'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -122,7 +111,7 @@ project(':clean') {
|
||||
clean_server {
|
||||
taskName 'clean_server'
|
||||
|
||||
main 'net.minecraft.server.MinecraftServer'
|
||||
main 'net.minecraft.server.Main'
|
||||
workingDirectory project.file('run')
|
||||
}
|
||||
}
|
||||
@@ -136,8 +125,7 @@ project(':forge') {
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'net.minecraftforge.gradle.patcher'
|
||||
apply plugin: 'net.minecrell.licenser'
|
||||
apply plugin: 'de.undercouch.download'
|
||||
|
||||
|
||||
compileJava.sourceCompatibility = compileJava.targetCompatibility = sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
group = 'net.minecraftforge'
|
||||
|
||||
@@ -209,7 +197,7 @@ project(':forge') {
|
||||
}
|
||||
|
||||
ext {
|
||||
SPEC_VERSION = '31.2' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
SPEC_VERSION = '34.0' // 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.
|
||||
@@ -217,6 +205,7 @@ project(':forge') {
|
||||
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.12:fatjar'
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.1.11'
|
||||
}
|
||||
|
||||
def getVersion = {
|
||||
@@ -266,6 +255,7 @@ project(':forge') {
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
property 'org.lwjgl.system.SharedLibraryExtractDirectory', 'lwjgl_dll'
|
||||
property 'eventbus.checkTypesOnDispatch', 'true'
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
|
||||
@@ -300,6 +290,7 @@ project(':forge') {
|
||||
environment 'FORGE_SPEC', SPEC_VERSION
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
property 'eventbus.checkTypesOnDispatch', 'true'
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
|
||||
@@ -358,7 +349,10 @@ project(':forge') {
|
||||
|
||||
args '--flat', '--all', '--validate',
|
||||
'--mod', 'data_gen_test',
|
||||
'--mod', 'piston_event_test',
|
||||
'--mod', 'piston_event_test',
|
||||
'--mod', 'global_loot_test',
|
||||
'--mod', 'scaffolding_test',
|
||||
'--mod', 'custom_tag_types_test',
|
||||
'--output', rootProject.file('src/generated_test/resources/'),
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
}
|
||||
@@ -439,12 +433,14 @@ 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.1.+'
|
||||
installer 'org.ow2.asm:asm-util:7.2'
|
||||
installer 'org.ow2.asm:asm-analysis:7.2'
|
||||
installer 'cpw.mods:modlauncher:7.0.+'
|
||||
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:accesstransformers:2.2.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:3.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:3.1.+'
|
||||
installer 'net.minecraftforge:coremods:3.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'com.electronwill.night-config:core:3.6.2'
|
||||
installer 'com.electronwill.night-config:toml:3.6.2'
|
||||
@@ -455,12 +451,13 @@ project(':forge') {
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
installer 'org.spongepowered:mixin:0.8'
|
||||
fmllauncherImplementation 'com.google.guava:guava:21.0'
|
||||
fmllauncherImplementation 'com.google.code.gson:gson:2.8.0'
|
||||
fmllauncherImplementation "org.lwjgl:lwjgl:3.2.2"
|
||||
fmllauncherImplementation "org.lwjgl:lwjgl-glfw:3.2.2"
|
||||
fmllauncherImplementation "org.lwjgl:lwjgl-opengl:3.2.2"
|
||||
fmllauncherImplementation "org.lwjgl:lwjgl-stb:3.2.2"
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl:3.2.2'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl-glfw:3.2.2'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl-opengl:3.2.2'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl-stb:3.2.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0'
|
||||
testImplementation 'org.junit.vintage:junit-vintage-engine:5.+'
|
||||
testImplementation 'org.opentest4j:opentest4j:1.0.0' // needed for junit 5
|
||||
@@ -476,249 +473,70 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
exclude { it.isDirectory() }
|
||||
rename { it.toLowerCase() }//Minecraft needs it lowercase.
|
||||
exclude '**/*.lang' //Pre-1.13 format
|
||||
}
|
||||
}
|
||||
task crowdin(type: CrowdinTask) {
|
||||
key = project.hasProperty('crowdinKey') ? project.crowdinKey : null
|
||||
//TODO: Merge our english.json?
|
||||
}
|
||||
|
||||
// We apply the bin patches we just created to make a jar that is JUST our changes
|
||||
genClientBinPatches.tool = BINPATCH_TOOL
|
||||
task applyClientBinPatches(type: ApplyBinPatches, dependsOn: genClientBinPatches) {
|
||||
clean = { genClientBinPatches.cleanJar }
|
||||
input = genClientBinPatches.output
|
||||
tool = BINPATCH_TOOL
|
||||
}
|
||||
genServerBinPatches.tool = BINPATCH_TOOL
|
||||
task applyServerBinPatches(type: ApplyBinPatches, dependsOn: genServerBinPatches) {
|
||||
clean = { genServerBinPatches.cleanJar }
|
||||
input = genServerBinPatches.output
|
||||
tool = BINPATCH_TOOL
|
||||
}
|
||||
genJoinedBinPatches.tool = BINPATCH_TOOL
|
||||
task applyJoinedBinPatches(type: ApplyBinPatches, dependsOn: genJoinedBinPatches) {
|
||||
clean = { genJoinedBinPatches.cleanJar }
|
||||
input = genJoinedBinPatches.output
|
||||
tool = BINPATCH_TOOL
|
||||
}
|
||||
// Create SRG named Vanilla jars, using the SpecialSource we have in the installer
|
||||
task createClientSRG(type: RenameJar, dependsOn: genClientBinPatches) {
|
||||
tool = SPECIAL_SOURCE + ':shaded'
|
||||
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
|
||||
mappings = { genClientBinPatches.srg }
|
||||
input = { genClientBinPatches.cleanJar }
|
||||
output = file('build/createClientSRG/output.jar')
|
||||
}
|
||||
task createServerSRG(type: RenameJar, dependsOn: genServerBinPatches) {
|
||||
tool = SPECIAL_SOURCE + ':shaded'
|
||||
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
|
||||
mappings = { genServerBinPatches.srg }
|
||||
input = { genServerBinPatches.cleanJar }
|
||||
output = file('build/createServerSRG/output.jar')
|
||||
}
|
||||
// Checksum tasks so that we can know if the vanilla classes are what we expect them to do!
|
||||
task clientBaseChecksum(type: ArchiveChecksum, dependsOn: genClientBinPatches) {
|
||||
input = { genClientBinPatches.cleanJar} //Lazy because Patcher Plugin sets the value afterEvaluate
|
||||
name = 'client'
|
||||
}
|
||||
task serverBaseChecksum(type: ArchiveChecksum, dependsOn: genServerBinPatches) {
|
||||
input = { genServerBinPatches.cleanJar }
|
||||
name = 'server'
|
||||
}
|
||||
task joinedBaseChecksum(type: ArchiveChecksum, dependsOn: genJoinedBinPatches) {
|
||||
input = { genJoinedBinPatches.cleanJar }
|
||||
name = 'joined'
|
||||
}
|
||||
task clientPatchedChecksum(type: ArchiveChecksum, dependsOn: applyClientBinPatches) {
|
||||
input = applyClientBinPatches.output
|
||||
name = 'client_patched'
|
||||
}
|
||||
task serverPatchedChecksum(type: ArchiveChecksum, dependsOn: applyServerBinPatches) {
|
||||
input = applyServerBinPatches.output
|
||||
name = 'server_patched'
|
||||
}
|
||||
task joinedPatchedChecksum(type: ArchiveChecksum, dependsOn: applyJoinedBinPatches) {
|
||||
input = applyJoinedBinPatches.output
|
||||
name = 'joined_patched'
|
||||
}
|
||||
// Utility methods for testing checksums
|
||||
task cleanChecksums() {
|
||||
['client', 'server', 'joined'].each { side ->
|
||||
['Base', 'Patched'].each { type ->
|
||||
def clean = "clean${side.capitalize()}${type}Checksum"
|
||||
dependsOn(clean)
|
||||
tasks.findByName("${side}${type}Checksum").mustRunAfter(clean)
|
||||
}
|
||||
}
|
||||
}
|
||||
task checksums() {
|
||||
['client', 'server', 'joined'].each { side ->
|
||||
['Base', 'Patched'].each { type ->
|
||||
dependsOn("${side}${type}Checksum")
|
||||
}
|
||||
}
|
||||
}
|
||||
['Client', 'Server', 'Joined'].each { side ->
|
||||
def gen = tasks.getByName("gen${side}BinPatches")
|
||||
gen.tool = BINPATCH_TOOL
|
||||
task "apply${side}BinPatches"(type: ApplyBinPatches, dependsOn: gen) {
|
||||
clean = { gen.cleanJar }
|
||||
input = gen.output
|
||||
tool = BINPATCH_TOOL
|
||||
}
|
||||
if (side != 'Joined') {
|
||||
// Create SRG named Vanilla jars, using the SpecialSource we have in the installer
|
||||
task "create${side}SRG"(type: RenameJar, dependsOn: gen) {
|
||||
tool = SPECIAL_SOURCE + ':shaded'
|
||||
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
|
||||
mappings = { gen.srg }
|
||||
input = { gen.cleanJar }
|
||||
output = file("build/create${name}SRG/output.jar")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task downloadLibraries(dependsOn: ':mcp:setupMCP') {
|
||||
inputs.file VERSION_JSON
|
||||
doLast {
|
||||
def json = new JsonSlurper().parseText(VERSION_JSON.text)
|
||||
json.libraries.each {lib ->
|
||||
def artifacts = [lib.downloads.artifact] + lib.downloads.get('classifiers', [:]).values()
|
||||
artifacts.each{ art ->
|
||||
def target = file('build/libraries/' + art.path)
|
||||
if (!target.exists()) {
|
||||
download {
|
||||
src art.url
|
||||
dest target
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
task downloadLibraries(type: DownloadLibrariesTask, dependsOn: ':mcp:setupMCP') {
|
||||
input = VERSION_JSON
|
||||
output = rootProject.file('build/libraries/')
|
||||
}
|
||||
|
||||
task extractInheritance(type: ExtractInheritance, dependsOn: [genJoinedBinPatches, downloadLibraries]) {
|
||||
tool = INSTALLER_TOOLS + ':fatjar'
|
||||
input { genJoinedBinPatches.cleanJar }
|
||||
doFirst {
|
||||
def json = new JsonSlurper().parseText(VERSION_JSON.text)
|
||||
json.libraries.each {lib ->
|
||||
def artifacts = [lib.downloads.artifact] + lib.downloads.get('classifiers', [:]).values()
|
||||
artifacts.each{ art ->
|
||||
def target = file('build/libraries/' + art.path)
|
||||
if (target.exists())
|
||||
addLibrary(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
doFirst { downloadLibraries.libraries.each{ addLibrary(it) } }
|
||||
}
|
||||
task checkATs(dependsOn: genJoinedBinPatches) {
|
||||
inputs.file { genJoinedBinPatches.cleanJar }
|
||||
inputs.files patcher.accessTransformers
|
||||
doLast {
|
||||
def vanilla = [:]
|
||||
def zip = new java.util.zip.ZipFile(genJoinedBinPatches.cleanJar)
|
||||
zip.entries().findAll { !it.directory && it.name.endsWith('.class') }.each { entry ->
|
||||
new ClassReader(zip.getInputStream(entry)).accept(new org.objectweb.asm.ClassVisitor(org.objectweb.asm.Opcodes.ASM7) {
|
||||
String name
|
||||
void visit(int version, int access, String name, String sig, String superName, String[] interfaces) {
|
||||
this.name = name
|
||||
vanilla[name] = access
|
||||
}
|
||||
org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String sig, Object value) {
|
||||
vanilla[this.name + ' ' + name] = access
|
||||
return null
|
||||
}
|
||||
org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String sig, String[] excs) {
|
||||
vanilla[this.name + ' ' + name + desc] = access
|
||||
return null
|
||||
}
|
||||
}, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES)
|
||||
}
|
||||
patcher.accessTransformers.each { f ->
|
||||
TreeMap lines = [:]
|
||||
f.eachLine { line ->
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) return
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
def (modifier, cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
def key = cls + (desc.isEmpty() ? '' : ' ' + desc)
|
||||
def access = vanilla[key.replace('.', '/')]
|
||||
if (access == null) {
|
||||
if ((desc.equals('*') || desc.equals('*()')) && vanilla[cls.replace('.', '/')] != null)
|
||||
println('Warning: ' + line)
|
||||
else {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
}
|
||||
//TODO: Check access actually changes, and expand inheretence?
|
||||
lines[key] = [modifier: modifier, comment: comment]
|
||||
}
|
||||
f.text = lines.collect{ it.value.modifier + ' ' + it.key + (it.value.comment == null ? '' : ' ' + it.value.comment) }.join('\n')
|
||||
}
|
||||
}
|
||||
|
||||
task checkATs(type: CheckATs, dependsOn: extractInheritance) {
|
||||
inheritance = extractInheritance.output
|
||||
ats = patcher.accessTransformers
|
||||
}
|
||||
task checkSAS(dependsOn: extractInheritance) {
|
||||
inputs.file { extractInheritance.output }
|
||||
inputs.files patcher.sideAnnotationStrippers
|
||||
doLast {
|
||||
def json = new JsonSlurper().parseText(extractInheritance.output.text)
|
||||
|
||||
patcher.sideAnnotationStrippers.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
if (line[0] == '\t') return //Skip any tabed lines, those are ones we add
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
lines.add(line)
|
||||
return
|
||||
}
|
||||
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
|
||||
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
cls = cls.replaceAll('\\.', '/')
|
||||
desc = desc.replace('(', ' (')
|
||||
if (desc.isEmpty() || json[cls] == null || json[cls]['methods'] == null || json[cls]['methods'][desc] == null) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def mtd = json[cls]['methods'][desc]
|
||||
lines.add(cls + ' ' + desc.replace(' ', '') + (comment == null ? '' : ' ' + comment))
|
||||
def children = json.values().findAll{ it.methods != null && it.methods[desc] != null && it.methods[desc].override == cls}
|
||||
.collect { it.name + ' ' + desc.replace(' ', '') } as TreeSet
|
||||
children.each { lines.add('\t' + it) }
|
||||
}
|
||||
f.text = lines.join('\n')
|
||||
}
|
||||
}
|
||||
|
||||
task checkSAS(type: CheckSAS, dependsOn: extractInheritance) {
|
||||
inheritance = extractInheritance.output
|
||||
sass = patcher.sideAnnotationStrippers
|
||||
}
|
||||
|
||||
task checkExcs(type: CheckExcs, dependsOn: jar) {
|
||||
binary = jar.archivePath
|
||||
excs = patcher.excs
|
||||
}
|
||||
|
||||
task checkAll(dependsOn: [checkATs, checkSAS, checkExcs]){}
|
||||
|
||||
task checkPatchesAndFix(type: CheckPatches) {
|
||||
patchDir = file("$rootDir/patches")
|
||||
autoFix = true
|
||||
}
|
||||
|
||||
task checkPatches(type: CheckPatches) {
|
||||
patchDir = file("$rootDir/patches")
|
||||
autoFix = false
|
||||
}
|
||||
project(':forge').getTasks().getByName('genPatches').finalizedBy(checkPatches)
|
||||
|
||||
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
|
||||
inputs.file universalJar.archivePath
|
||||
@@ -726,7 +544,7 @@ project(':forge') {
|
||||
ext {
|
||||
output = file('build/version.json')
|
||||
vanilla = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
timestamp = dateToIso8601(new Date())
|
||||
timestamp = iso8601Now()
|
||||
comment = [
|
||||
"Please do not automate the download and installation of Forge.",
|
||||
"Our efforts are supported by ads from the download page.",
|
||||
@@ -738,7 +556,7 @@ project(':forge') {
|
||||
inputs.file vanilla
|
||||
outputs.file output
|
||||
doLast {
|
||||
def json_vanilla = new JsonSlurper().parseText(vanilla.text)
|
||||
def json_vanilla = vanilla.json()
|
||||
def json = [
|
||||
_comment_: comment,
|
||||
id: id,
|
||||
@@ -759,7 +577,7 @@ project(':forge') {
|
||||
artifact: [
|
||||
path: "${project.group.replace('.', '/')}/${project.name}/${project.version}/${project.name}-${project.version}.jar",
|
||||
url: "", //Do not include the URL so that the installer/launcher won't grab it. This is also why we don't have the universal classifier
|
||||
sha1: sha1(launcherJar.archivePath),
|
||||
sha1: launcherJar.archivePath.sha1(),
|
||||
size: launcherJar.archivePath.length()
|
||||
]
|
||||
]
|
||||
@@ -779,7 +597,6 @@ project(':forge') {
|
||||
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches/*, createClientSRG, createServerSRG*/]) {
|
||||
ext {
|
||||
output = file('build/install_profile.json')
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.1.4'
|
||||
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.2'
|
||||
}
|
||||
doFirst {
|
||||
@@ -802,7 +619,7 @@ project(':forge') {
|
||||
artifact: [
|
||||
path: "${project.group.replace('.', '/')}/${project.name}/${project.version}/${project.name}-${project.version}-universal.jar",
|
||||
url: "", //Do not include the URL so that the installer/launcher won't grab it. This is also why we don't have the universal classifier
|
||||
sha1: sha1(universalJar.archivePath),
|
||||
sha1: universalJar.archivePath.sha1(),
|
||||
size: universalJar.archivePath.length()
|
||||
]
|
||||
]
|
||||
@@ -829,36 +646,36 @@ project(':forge') {
|
||||
server: '/data/server.lzma'
|
||||
],
|
||||
MC_SLIM: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}:slim]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:slim]"
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:slim]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:slim]"
|
||||
],
|
||||
MC_SLIM_SHA: [
|
||||
client: "'${sha1(tasks.getByName('downloadClientSlim').output)}'",
|
||||
server: "'${sha1(tasks.getByName('downloadServerSlim').output)}'"
|
||||
client: "'${tasks.getByName('downloadClientSlim').output.sha1()}'",
|
||||
server: "'${tasks.getByName('downloadServerSlim').output.sha1()}'"
|
||||
],
|
||||
MC_EXTRA: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}:extra]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:extra]"
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:extra]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:extra]"
|
||||
],
|
||||
MC_EXTRA_SHA: [
|
||||
client: "'${sha1(tasks.getByName('downloadClientExtra').output)}'",
|
||||
server: "'${sha1(tasks.getByName('downloadServerExtra').output)}'"
|
||||
client: "'${tasks.getByName('downloadClientExtra').output.sha1()}'",
|
||||
server: "'${tasks.getByName('downloadServerExtra').output.sha1()}'"
|
||||
],
|
||||
MC_SRG: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:srg]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:srg]"
|
||||
],
|
||||
/*MC_SRG_SHA: [
|
||||
client: "'${sha1(createClientSRG.output)}'",
|
||||
server: "'${sha1(createServerSRG.output)}'"
|
||||
client: "'${createClientSRG.output.sha1()}'",
|
||||
server: "'${createServerSRG.output.sha1()}'"
|
||||
],*/
|
||||
PATCHED: [
|
||||
client: "[${project.group}:${project.name}:${project.version}:client]",
|
||||
server: "[${project.group}:${project.name}:${project.version}:server]"
|
||||
],
|
||||
PATCHED_SHA: [
|
||||
client: "'${sha1(applyClientBinPatches.output)}'",
|
||||
server: "'${sha1(applyServerBinPatches.output)}'"
|
||||
client: "'${applyClientBinPatches.output.sha1()}'",
|
||||
server: "'${applyServerBinPatches.output.sha1()}'"
|
||||
],
|
||||
MCP_VERSION: [
|
||||
client: "'${MCP_VERSION}'",
|
||||
@@ -926,7 +743,7 @@ project(':forge') {
|
||||
['slim', 'extra'].each { type ->
|
||||
def name = "download${side.capitalize()}${type.capitalize()}"
|
||||
task "${name}"(type: DownloadMavenArtifact) {
|
||||
artifact = "net.minecraft:${side}:${MC_VERSION}:${type}"
|
||||
artifact = "net.minecraft:${side}:${MC_VERSION}-${MCP_VERSION}:${type}"
|
||||
}
|
||||
installerJson.dependsOn(name)
|
||||
installerJson.inputs.file(tasks.getByName(name).output)
|
||||
@@ -936,28 +753,10 @@ project(':forge') {
|
||||
universalJar {
|
||||
from extraTxts
|
||||
|
||||
/* TODO: Annotation Cache? need to talk to cpw about his new design.
|
||||
from(fixAnnotationsJson){
|
||||
into 'META-INF'
|
||||
}
|
||||
dependsOn fixAnnotationsJson
|
||||
*/
|
||||
|
||||
/* We do not actually check this anywhere, so it's 400KB of uselless data
|
||||
// Add checksum files of clean and patched vanilla classes.
|
||||
['client', 'server'].each { side ->
|
||||
['Base', 'Patched'].each { type ->
|
||||
from(tasks.getByName("${side}${type}Checksum").output) {
|
||||
into 'checksums/'
|
||||
}
|
||||
}
|
||||
}
|
||||
dependsOn checksums
|
||||
*/
|
||||
|
||||
// add crowdin locales
|
||||
from { !crowdin.state.skipped ? zipTree(crowdin.archivePath) : null}
|
||||
from { crowdin.output.exists() ? zipTree(crowdin.output) : null}
|
||||
dependsOn crowdin
|
||||
duplicatesStrategy = 'exclude'
|
||||
|
||||
doFirst {
|
||||
MANIFESTS.each{ pkg, values ->
|
||||
@@ -979,7 +778,7 @@ project(':forge') {
|
||||
artifacts.each { key, lib ->
|
||||
classpath += "libraries/${lib.downloads.artifact.path} "
|
||||
}
|
||||
classpath += "libraries/net/minecraft/server/${MC_VERSION}/server-${MC_VERSION}-extra.jar"
|
||||
classpath += "libraries/net/minecraft/server/${MC_VERSION}-${MCP_VERSION}/server-${MC_VERSION}-${MCP_VERSION}-extra.jar"
|
||||
|
||||
MANIFESTS.each{ pkg, values ->
|
||||
if (pkg == '/') {
|
||||
@@ -1258,99 +1057,6 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
def dateToIso8601(date) {
|
||||
def format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
def result = format.format(date)
|
||||
return result[0..21] + ':' + result[22..-1]
|
||||
}
|
||||
|
||||
def sha1(file) {
|
||||
MessageDigest md = MessageDigest.getInstance('SHA-1')
|
||||
file.eachByte 4096, {bytes, size ->
|
||||
md.update(bytes, 0, size)
|
||||
}
|
||||
return md.digest().collect {String.format "%02x", it}.join()
|
||||
}
|
||||
|
||||
def artifactTree(project, artifact) {
|
||||
if (!project.ext.has('tree_resolver'))
|
||||
project.ext.tree_resolver = 1
|
||||
def cfg = project.configurations.create('tree_resolver_' + project.ext.tree_resolver++)
|
||||
def dep = project.dependencies.create(artifact)
|
||||
cfg.dependencies.add(dep)
|
||||
def files = cfg.resolve()
|
||||
return getArtifacts(project, cfg, true)
|
||||
}
|
||||
|
||||
def getArtifacts(project, config, classifiers) {
|
||||
def ret = [:]
|
||||
config.resolvedConfiguration.resolvedArtifacts.each {
|
||||
def art = [
|
||||
group: it.moduleVersion.id.group,
|
||||
name: it.moduleVersion.id.name,
|
||||
version: it.moduleVersion.id.version,
|
||||
classifier: it.classifier,
|
||||
extension: it.extension,
|
||||
file: it.file
|
||||
]
|
||||
def key = art.group + ':' + art.name
|
||||
def folder = "${art.group.replace('.', '/')}/${art.name}/${art.version}/"
|
||||
def filename = "${art.name}-${art.version}"
|
||||
if (art.classifier != null)
|
||||
filename += "-${art.classifier}"
|
||||
filename += ".${art.extension}"
|
||||
def path = "${folder}${filename}"
|
||||
def url = "https://libraries.minecraft.net/${path}"
|
||||
if (!checkExists(url)) {
|
||||
url = "https://files.minecraftforge.net/maven/${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'
|
||||
art.version = "${art.version}-${art.classifier}"
|
||||
art.classifier = null
|
||||
art.extension = 'jar'
|
||||
path = "${art.group.replace('.', '/')}/${art.name}/${art.version}/${art.name}-${art.version}.jar"
|
||||
}
|
||||
ret[key] = [
|
||||
name: "${art.group}:${art.name}:${art.version}" + (art.classifier == null ? '' : ":${art.classifier}") + (art.extension == 'jar' ? '' : "@${art.extension}"),
|
||||
downloads: [
|
||||
artifact: [
|
||||
path: path,
|
||||
url: url,
|
||||
sha1: sha1(art.file),
|
||||
size: art.file.length()
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
def checkExists(url) {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
def getClasspath(project, libs, artifact) {
|
||||
def ret = []
|
||||
artifactTree(project, artifact).each { key, lib ->
|
||||
libs[lib.name] = lib
|
||||
if (lib.name != artifact)
|
||||
ret.add(lib.name)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
//evaluationDependsOnChildren()
|
||||
task setup() {
|
||||
dependsOn ':clean:extractMapped'
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
/.gradle/
|
||||
/build/
|
||||
@@ -0,0 +1,10 @@
|
||||
repositories {
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation 'org.ow2.asm:asm:7.2'
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import java.util.ArrayList
|
||||
import java.util.TreeMap
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.objectweb.asm.Opcodes
|
||||
|
||||
public class CheckATs extends DefaultTask {
|
||||
@InputFile File inheritance
|
||||
@InputFiles File[] ats
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
def parse = { line ->
|
||||
def idx = line.indexOf('#')
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
def (modifier, cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
def key = cls + (desc.isEmpty() ? '' : ' ' + desc)
|
||||
return [modifier, cls, desc, comment, key]
|
||||
}
|
||||
def accessLevel = { access ->
|
||||
if ((access & Opcodes.ACC_PUBLIC) != 0) return 3
|
||||
if ((access & Opcodes.ACC_PROTECTED) != 0) return 2
|
||||
if ((access & Opcodes.ACC_PRIVATE) != 0) return 0
|
||||
return 1
|
||||
}
|
||||
def accessStr = { access ->
|
||||
if (access.endsWith('-f') || access.endsWith('+f'))
|
||||
return 4
|
||||
switch (access.toLowerCase()) {
|
||||
case 'public': return 3
|
||||
case 'protected': return 2
|
||||
case 'default': return 1
|
||||
case 'private': return 0
|
||||
default: return -1
|
||||
}
|
||||
}
|
||||
def json = inheritance.json()
|
||||
|
||||
ats.each { f ->
|
||||
TreeMap lines = [:]
|
||||
def group = null
|
||||
for (def line : f.readLines()) {
|
||||
if (line.isEmpty()) continue
|
||||
if (line.startsWith('#group ')) {
|
||||
def (modifier, cls, desc, comment, key) = parse.call(line.substring(7))
|
||||
|
||||
if (!desc.equals('*') && !desc.equals('*()') && !desc.equals('<init>'))
|
||||
throw new IllegalStateException('Invalid group: ' + line)
|
||||
|
||||
group = [modifier: modifier, cls: cls, desc: desc, comment: comment,
|
||||
'existing': [] as Set,
|
||||
'children': [] as TreeSet,
|
||||
group: true
|
||||
]
|
||||
if (lines.containsKey(key))
|
||||
throw new IllegalStateException('Duplicate group: ' + line)
|
||||
|
||||
lines[key] = group
|
||||
} else if (group != null) {
|
||||
if (line.startsWith('#endgroup')) {
|
||||
group = null
|
||||
} else {
|
||||
def (modifier, cls, desc, comment, key) = parse.call(line)
|
||||
group['existing'].add(key)
|
||||
}
|
||||
} else if (line.startsWith('#endgroup')) {
|
||||
throw new IllegalStateException('Invalid group ending: ' + line)
|
||||
} else if (line.startsWith('#')) {
|
||||
//Nom
|
||||
} else {
|
||||
def (modifier, cls, desc, comment, key) = parse.call(line)
|
||||
if (lines.containsKey(key)) {
|
||||
println('Duplicate: ' + line)
|
||||
continue
|
||||
}
|
||||
lines[key] = [modifier: modifier, cls: cls, desc: desc, comment: comment, group: false]
|
||||
}
|
||||
}
|
||||
|
||||
// Process Groups, this will remove any entries outside the group that is covered by the group
|
||||
for (def key : new ArrayList<>(lines.keySet())) {
|
||||
def entry = lines.get(key)
|
||||
if (entry != null && entry['group']) {
|
||||
def cls = entry['cls']
|
||||
def jcls = json.get(cls.replaceAll('\\.', '/'))
|
||||
if (jcls == null) {
|
||||
lines.remove(key)
|
||||
println('Invalid Group: ' + key)
|
||||
} else if ('*'.equals(entry['desc'])) {
|
||||
if (!jcls.containsKey('fields')) {
|
||||
lines.remove(key)
|
||||
println('Invalid Group, Class has no fields: ' + key)
|
||||
} else {
|
||||
jcls['fields'].each { field, value ->
|
||||
def fkey = cls + ' ' + field
|
||||
if (accessLevel.call(value['access']) < accessStr.call(entry['modifier'])) {
|
||||
if (lines.containsKey(fkey)) {
|
||||
lines.remove(fkey)
|
||||
} else if (!entry['existing'].contains(fkey)) {
|
||||
println('Added: ' + fkey)
|
||||
}
|
||||
entry['children'].add(fkey)
|
||||
} else if (lines.containsKey(fkey)) {
|
||||
lines.remove(fkey)
|
||||
println('Removed: ' + fkey)
|
||||
}
|
||||
}
|
||||
entry['existing'].stream().findAll{ !entry['children'].contains(it) }.each{ println('Removed: ' + it) }
|
||||
}
|
||||
} else if ('*()'.equals(entry['desc'])) {
|
||||
if (!jcls.containsKey('methods')) {
|
||||
lines.remove(key)
|
||||
println('Invalid Group, Class has no methods: ' + key)
|
||||
} else {
|
||||
jcls['methods'].each{ mtd, value ->
|
||||
if (mtd.startsWith('<clinit>'))
|
||||
return
|
||||
key = cls + ' ' + mtd.replace(' ', '')
|
||||
if (accessLevel.call(value['access']) < accessStr.call(entry['modifier'])) {
|
||||
if (lines.containsKey(key)) {
|
||||
lines.remove(key)
|
||||
} else if (!entry['existing'].contains(key)) {
|
||||
println('Added: ' + key)
|
||||
}
|
||||
entry['children'].add(key)
|
||||
} else if (lines.containsKey(key)) {
|
||||
lines.remove(key)
|
||||
println('Removed: ' + key)
|
||||
}
|
||||
}
|
||||
entry['existing'].stream().findAll{ !entry['children'].contains(it) }.each{ println('Removed: ' + it) }
|
||||
}
|
||||
} else if ('<init>'.equals(entry['desc'])) { //Make all public non-abstract subclasses
|
||||
json.each{ tcls,value ->
|
||||
if (!value.containsKey('methods') || ((value['access'] & Opcodes.ACC_ABSTRACT) != 0))
|
||||
return
|
||||
def parents = [] as Set
|
||||
def parent = tcls
|
||||
while (parent != null && json.containsKey(parent)) {
|
||||
parents.add(parent)
|
||||
def p = json[parent]
|
||||
parent = p == null ? null : p['superName']
|
||||
}
|
||||
if (parents.contains(cls.replaceAll('\\.', '/'))) {
|
||||
value['methods'].each{ mtd, v ->
|
||||
if (mtd.startsWith('<init>')) {
|
||||
def child = tcls.replaceAll('/', '\\.') + ' ' + mtd.replace(' ', '')
|
||||
if (accessLevel.call(v['access']) < 3) {
|
||||
if (lines.containsKey(child)) {
|
||||
lines.remove(child)
|
||||
} else if (!entry['existing'].contains(child)) {
|
||||
println('Added: ' + child)
|
||||
}
|
||||
entry['children'].add(child)
|
||||
} else if (lines.containsKey(child)) {
|
||||
lines.remove(child)
|
||||
println('Removed: ' + child)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
entry['existing'].stream().findAll{ !entry['children'].contains(it) }.each{ println('Removed: ' + it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process normal lines, remove invalid and remove narrowing
|
||||
for (def key : new ArrayList<>(lines.keySet())) {
|
||||
def entry = lines.get(key)
|
||||
if (entry != null && !entry['group']) {
|
||||
def cls = entry['cls']
|
||||
def jcls = json.get(cls.replaceAll('\\.', '/'))
|
||||
if (jcls == null) {
|
||||
lines.remove(key)
|
||||
println('Invalid: ' + key)
|
||||
} else if (entry['desc'] == '') {
|
||||
if (accessLevel.call(jcls['access']) >= accessStr.call(entry['modifier']) && (entry.comment == null || !entry.comment.startsWith('#force '))) {
|
||||
lines.remove(key)
|
||||
println('Invalid Narrowing: ' + key)
|
||||
}
|
||||
} else if (!entry['desc'].contains('(')) {
|
||||
if (!jcls.containsKey('fields') || !jcls['fields'].containsKey(entry['desc'])) {
|
||||
lines.remove(key)
|
||||
println('Invalid: ' + key)
|
||||
} else {
|
||||
def value = jcls['fields'][entry['desc']]
|
||||
if (accessLevel.call(value['access']) >= accessStr.call(entry['modifier']) && (entry.comment == null || !entry.comment.startsWith('#force '))) {
|
||||
lines.remove(key)
|
||||
println('Invalid Narrowing: ' + key)
|
||||
println(entry.comment)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
def jdesc = entry['desc'].replace('(', ' (')
|
||||
if (!jcls.containsKey('methods') || !jcls['methods'].containsKey(jdesc)) {
|
||||
lines.remove(key)
|
||||
println('Invalid: ' + key)
|
||||
} else {
|
||||
def value = jcls['methods'][jdesc]
|
||||
if (accessLevel.call(value['access']) >= accessStr.call(entry['modifier']) && (entry.comment == null || !entry.comment.startsWith('#force '))) {
|
||||
lines.remove(key)
|
||||
println('Invalid Narrowing: ' + key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def data = []
|
||||
lines.each { key,value ->
|
||||
if (!value.group) {
|
||||
data.add(value.modifier + ' ' + key + (value.comment == null ? '' : ' ' + value.comment))
|
||||
} else {
|
||||
data.add('#group ' + value.modifier + ' ' + key + (value.comment == null ? '' : ' ' + value.comment))
|
||||
value.children.each{ data.add(value.modifier + ' ' + it) }
|
||||
data.add('#endgroup')
|
||||
}
|
||||
}
|
||||
f.text = data.join('\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import java.util.ArrayList
|
||||
import java.util.TreeMap
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
import org.objectweb.asm.ClassReader
|
||||
import org.objectweb.asm.ClassVisitor
|
||||
import org.objectweb.asm.MethodVisitor
|
||||
import org.objectweb.asm.Opcodes
|
||||
import org.objectweb.asm.Type
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
public class CheckExcs extends DefaultTask {
|
||||
@InputFile File binary
|
||||
@InputFiles File[] excs
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
def known = []
|
||||
binary.withInputStream { i ->
|
||||
new ZipInputStream(i).withCloseable { zin ->
|
||||
def visitor = new ClassVisitor(Opcodes.ASM7) {
|
||||
private String cls
|
||||
@Override
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
this.cls = name
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
|
||||
known.add(this.cls + '.' + name + descriptor)
|
||||
super.visitMethod(access, name, descriptor, signature, exceptions)
|
||||
}
|
||||
}
|
||||
ZipEntry zein
|
||||
while ((zein = zin.nextEntry) != null) {
|
||||
if (zein.name.endsWith('.class')) {
|
||||
ClassReader reader = new ClassReader(zin)
|
||||
reader.accept(visitor, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
excs.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
|
||||
if (!line.contains('=')) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def (key, value) = line.split('=', 2)
|
||||
if (!known.contains(key)) {
|
||||
println(key)
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def (cls, desc) = key.split('\\.', 2)
|
||||
if (!desc.contains('(')) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
def name = desc.split('\\(', 2)[0]
|
||||
desc = '(' + desc.split('\\(', 2)[1]
|
||||
|
||||
def (exceptions, args) = value.contains('|') ? value.split('|', 2) : [value, '']
|
||||
|
||||
if (args.split(',').length != Type.getArgumentTypes(desc).length) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
lines.add(line)
|
||||
}
|
||||
f.text = lines.sort().join('\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.util.regex.Pattern
|
||||
|
||||
public class CheckPatches extends DefaultTask {
|
||||
@InputDirectory File patchDir
|
||||
@Input boolean autoFix = false
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
def hasS2SArtifact = [
|
||||
Paths.get("patches/minecraft/net/minecraft/client/renderer/ViewFrustum.java.patch"),
|
||||
Paths.get("patches/minecraft/net/minecraft/data/BlockModelDefinition.java.patch")
|
||||
]
|
||||
|
||||
def verified = true;
|
||||
project.fileTree(patchDir).each { patch ->
|
||||
def patchPath = project.rootDir.toPath().relativize(patch.toPath())
|
||||
verified &= verifyPatch(patch, autoFix, patchPath.toString(), hasS2SArtifact.contains(patchPath))
|
||||
}
|
||||
|
||||
if (!verified)
|
||||
throw new RuntimeException('One or more patches failed verification. Check the log for errors.')
|
||||
}
|
||||
|
||||
def verifyPatch(patch, fix, patchPath, hasS2SArtifact) {
|
||||
def hunk_start_pattern = Pattern.compile('^@@ -[0-9,]* \\+[0-9,]* @@$')
|
||||
def white_space_pattern = Pattern.compile('^[+\\-]\\s*$')
|
||||
def import_pattern = Pattern.compile('^[+\\-]\\s*import.*')
|
||||
def field_pattern = Pattern.compile('^[+\\-][\\s]*((public|protected|private)[\\s]*)?(static[\\s]*)?(final)?([^=;]*)(=.*)?;\\s*$')
|
||||
def method_pattern = Pattern.compile('^[+\\-][\\s]*((public|protected|private)[\\s]*)?(static[\\s]*)?(final)?([^(]*)[(]([^)]*)?[)]\\s*[{]\\s*$')
|
||||
def class_pattern = Pattern.compile('^[+\\-][\\s]*((public|protected|private)[\\s]*)?(static[\\s]*)?(final[\\s]*)?(class|interface)([^{]*)[{]\\s*$')
|
||||
|
||||
def accessMap = [("private"):0, (null):1, ("protected"):2, ("public"):3]
|
||||
|
||||
def hasProblem = false;
|
||||
def lines = patch.readLines()
|
||||
|
||||
def hunksStart = 0
|
||||
def onlyWhiteSpace = false
|
||||
|
||||
def didFix = false
|
||||
def newLines = []
|
||||
def whiteSpaceErrors = []
|
||||
|
||||
// First two lines are file name ++/-- and we do not care
|
||||
newLines.add(lines[0] + '\n')
|
||||
newLines.add(lines[1] + '\n')
|
||||
|
||||
int i = 2
|
||||
for (; i < lines.size(); ++i) {
|
||||
def line = lines[i]
|
||||
newLines.add(line + '\n')
|
||||
|
||||
if (hunk_start_pattern.matcher(line).find()) {
|
||||
if (onlyWhiteSpace) {
|
||||
if (fix || hasS2SArtifact) {
|
||||
logger.lifecycle("Removing white space hunk starting at line {}, file: {}", hunksStart + 1, patchPath)
|
||||
def toRemove = i - hunksStart;
|
||||
while (toRemove-- > 0)
|
||||
newLines.remove(newLines.size() - 1)
|
||||
didFix = true
|
||||
}
|
||||
else {
|
||||
logger.lifecycle("Patch contains only white space hunk starting at line {}, file: {}", hunksStart + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!whiteSpaceErrors.empty)
|
||||
hasProblem = true
|
||||
whiteSpaceErrors.each { error -> logger.lifecycle(error) }
|
||||
whiteSpaceErrors.clear()
|
||||
}
|
||||
hunksStart = i
|
||||
onlyWhiteSpace = true
|
||||
continue
|
||||
}
|
||||
|
||||
if (line.startsWithAny('+','-')) {
|
||||
def prefixChange = false
|
||||
def prevLine = lines[i - 1]
|
||||
|
||||
if (line.charAt(0) == (char)'+' && prevLine.charAt(0) == (char)'-') {
|
||||
def prevTrim = prevLine.substring(1).replaceAll("\\s", "")
|
||||
def currTrim = line.substring(1).replaceAll("\\s", "")
|
||||
|
||||
if (prevTrim.equals(currTrim)) {
|
||||
prefixChange = true
|
||||
}
|
||||
|
||||
def pMatcher = field_pattern.matcher(prevLine)
|
||||
def cMatcher = field_pattern.matcher(line)
|
||||
|
||||
if (pMatcher.find() && cMatcher.find() &&
|
||||
pMatcher.group(6) == cMatcher.group(6) && // = ...
|
||||
pMatcher.group(5) == cMatcher.group(5) && // field name
|
||||
pMatcher.group(3) == cMatcher.group(3) && // static
|
||||
(accessMap[pMatcher.group(2)] < accessMap[cMatcher.group(2)] || pMatcher.group(4) != cMatcher.group(4))) {
|
||||
logger.lifecycle("Patch contains access changes or final removal at line {}, file: {}", i + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
|
||||
pMatcher = method_pattern.matcher(prevLine)
|
||||
cMatcher = method_pattern.matcher(line)
|
||||
|
||||
if (pMatcher.find() && cMatcher.find() &&
|
||||
pMatcher.group(6) == cMatcher.group(6) && // params
|
||||
pMatcher.group(5) == cMatcher.group(5) && // <T> void name
|
||||
pMatcher.group(3) == cMatcher.group(3) && // static
|
||||
(accessMap[pMatcher.group(2)] < accessMap[cMatcher.group(2)] || pMatcher.group(4) != cMatcher.group(4))) {
|
||||
logger.lifecycle("Patch contains access changes or final removal at line {}, file: {}", i + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
|
||||
pMatcher = class_pattern.matcher(prevLine)
|
||||
cMatcher = class_pattern.matcher(line)
|
||||
|
||||
if (pMatcher.find() && cMatcher.find() &&
|
||||
pMatcher.group(6) == cMatcher.group(6) && // ClassName<> extends ...
|
||||
pMatcher.group(5) == cMatcher.group(5) && // class | interface
|
||||
pMatcher.group(3) == cMatcher.group(3) && // static
|
||||
(accessMap[pMatcher.group(2)] < accessMap[cMatcher.group(2)] || pMatcher.group(4) != cMatcher.group(4))) {
|
||||
logger.lifecycle("Patch contains access changes or final removal at line {}, file: {}", i + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
}
|
||||
|
||||
if (line.charAt(0) == (char)'-' && i + 1 < lines.size()) {
|
||||
def nextLine = lines[i + 1]
|
||||
if (nextLine.charAt(0) == (char)'+') {
|
||||
def nextTrim = nextLine.substring(1).replaceAll("\\s", "")
|
||||
def currTrim = line.substring(1).replaceAll("\\s", "")
|
||||
|
||||
if (nextTrim.equals(currTrim)) {
|
||||
prefixChange = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def isWhiteSpaceChange = white_space_pattern.matcher(line).find()
|
||||
|
||||
if (!prefixChange && !isWhiteSpaceChange) {
|
||||
onlyWhiteSpace = hasS2SArtifact && import_pattern.matcher(line).find()
|
||||
}
|
||||
else if (isWhiteSpaceChange) {
|
||||
def prevLineChange = prevLine.startsWithAny('+','-')
|
||||
def nextLineChange = i + 1 < lines.size() && lines[i + 1].startsWithAny('+','-')
|
||||
|
||||
if (!prevLineChange && !nextLineChange) {
|
||||
whiteSpaceErrors.add(String.format("Patch contains white space change in valid hunk at line %d (cannot auto fix), file: %s", i + 1, patchPath))
|
||||
}
|
||||
}
|
||||
|
||||
if (line.contains("\t")) {
|
||||
if (!fix) {
|
||||
logger.lifecycle("Patch contains tabs on line {}, file: {}", i + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
else {
|
||||
logger.lifecycle("Fixing tabs on line {}, file: {}", i + 1, patchPath)
|
||||
line = line.replaceAll('\t', ' ')
|
||||
newLines.remove(newLines.size() - 1)
|
||||
newLines.add(line + '\n')
|
||||
didFix = true
|
||||
}
|
||||
}
|
||||
|
||||
if (import_pattern.matcher(line).find() && !hasS2SArtifact) {
|
||||
logger.lifecycle("Patch contains import change on line {}, file: {}", i + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (onlyWhiteSpace) {
|
||||
if (fix || hasS2SArtifact) {
|
||||
logger.lifecycle("Removing white space hunk starting at line {}, file: {}", hunksStart + 1, patchPath)
|
||||
def toRemove = i - hunksStart;
|
||||
while (toRemove-- > 0)
|
||||
newLines.remove(newLines.size() - 1)
|
||||
didFix = true
|
||||
}
|
||||
else {
|
||||
logger.lifecycle("Patch contains only white space hunk starting at line {}, file: {}", hunksStart + 1, patchPath)
|
||||
hasProblem = true
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!whiteSpaceErrors.empty)
|
||||
hasProblem = true
|
||||
whiteSpaceErrors.each { error -> logger.lifecycle(error) }
|
||||
}
|
||||
|
||||
if (didFix) {
|
||||
if (newLines.size() <= 2) {
|
||||
logger.lifecycle("Patch is now empty removing, file: {}", patchPath)
|
||||
Files.delete(patch.toPath())
|
||||
}
|
||||
else {
|
||||
if (!hasS2SArtifact)
|
||||
logger.lifecycle("*** Updating patch file. Please run setup then genPatches again. ***")
|
||||
patch.withWriter('UTF-8') { writer ->
|
||||
newLines.each { l -> writer.write(l) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !hasProblem
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import java.util.ArrayList
|
||||
import java.util.TreeMap
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.objectweb.asm.Opcodes
|
||||
|
||||
public class CheckSAS extends DefaultTask {
|
||||
@InputFile File inheritance
|
||||
@InputFiles File[] sass
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
def json = inheritance.json()
|
||||
|
||||
sass.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
if (line[0] == '\t') return //Skip any tabed lines, those are ones we add
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
lines.add(line)
|
||||
return
|
||||
}
|
||||
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
|
||||
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
cls = cls.replaceAll('\\.', '/')
|
||||
desc = desc.replace('(', ' (')
|
||||
if (desc.isEmpty() || json[cls] == null || json[cls]['methods'] == null || json[cls]['methods'][desc] == null) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def mtd = json[cls]['methods'][desc]
|
||||
lines.add(cls + ' ' + desc.replace(' ', '') + (comment == null ? '' : ' ' + comment))
|
||||
def children = json.values().findAll{ it.methods != null && it.methods[desc] != null && it.methods[desc].override == cls}
|
||||
.collect { it.name + ' ' + desc.replace(' ', '') } as TreeSet
|
||||
children.each { lines.add('\t' + it) }
|
||||
}
|
||||
f.text = lines.join('\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.Optional
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
import java.util.zip.ZipOutputStream
|
||||
import java.net.URL
|
||||
|
||||
public class CrowdinTask extends DefaultTask {
|
||||
@Input String id = 'minecraft-forge'
|
||||
@Input @Optional String key
|
||||
@Input boolean json = true
|
||||
@OutputFile output = project.file("build/${name}/output.zip")
|
||||
@OutputFile export = project.file("build/${name}/export.json")
|
||||
|
||||
CrowdinTask() {
|
||||
outputs.upToDateWhen{ false }
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
def run() {
|
||||
if (output.exists())
|
||||
output.delete()
|
||||
|
||||
if (key == null)
|
||||
return
|
||||
|
||||
// Force an export
|
||||
new URL("https://api.crowdin.com/api/project/${id}/export?key=${key}").withInputStream { i ->
|
||||
export.withOutputStream { it << i }
|
||||
}
|
||||
|
||||
if (!export.text.contains('success')) {
|
||||
throw new RuntimeException("Crowdin export failed, see ${export} for more info")
|
||||
}
|
||||
|
||||
new URL("https://api.crowdin.com/api/project/${id}/download/all.zip?key=${key}").withInputStream { i ->
|
||||
new ZipInputStream(i).withCloseable { zin ->
|
||||
output.withOutputStream { out ->
|
||||
new ZipOutputStream(out).withCloseable { zout ->
|
||||
ZipEntry zein
|
||||
while ((zein = zin.nextEntry) != null) {
|
||||
if (zein.isDirectory()) {
|
||||
zout.putNextEntry(new ZipEntry(zein.name))
|
||||
} else {
|
||||
// 1.13+ uses json
|
||||
if (zein.name.endsWith('.json') == json) {
|
||||
ZipEntry zeout = new ZipEntry(json ? zein.name.toLowerCase() : zein.name)
|
||||
zeout.time = 1
|
||||
zout.putNextEntry(zeout)
|
||||
zout << zin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
|
||||
import java.io.File
|
||||
import java.util.HashSet
|
||||
import java.util.Set
|
||||
import java.net.URL
|
||||
|
||||
public class DownloadLibrariesTask extends DefaultTask {
|
||||
@InputFile File input
|
||||
@OutputDirectory File output = project.file("build/${name}/")
|
||||
Set<File> libraries = new HashSet<>()
|
||||
|
||||
@TaskAction
|
||||
def run() {
|
||||
Util.init()
|
||||
|
||||
def json = input.json().libraries.each { lib ->
|
||||
//TODO: Thread?
|
||||
def artifacts = [lib.downloads.artifact] + lib.downloads.get('classifiers', [:]).values()
|
||||
artifacts.each{ art ->
|
||||
def target = new File(output, art.path)
|
||||
libraries.add(target)
|
||||
if (!target.exists() || !art.sha1.equals(target.sha1())) {
|
||||
project.logger.lifecycle("Downloading ${art.url}")
|
||||
if (!target.parentFile.exists()) {
|
||||
target.parentFile.mkdirs()
|
||||
}
|
||||
new URL(art.url).withInputStream { i ->
|
||||
target.withOutputStream { it << i }
|
||||
}
|
||||
if (!art.sha1.equals(target.sha1())) {
|
||||
throw new IllegalStateException("Failed to download ${art.url} to ${target.canonicalPath} SHA Mismatch")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
|
||||
public class Util {
|
||||
static void init() {
|
||||
File.metaClass.sha1 = { ->
|
||||
MessageDigest md = MessageDigest.getInstance('SHA-1')
|
||||
delegate.eachByte 4096, {bytes, size ->
|
||||
md.update(bytes, 0, size)
|
||||
}
|
||||
return md.digest().collect {String.format "%02x", it}.join()
|
||||
}
|
||||
|
||||
File.metaClass.json = { -> new JsonSlurper().parseText(delegate.text) }
|
||||
|
||||
Date.metaClass.iso8601 = { ->
|
||||
def format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
def result = format.format(delegate)
|
||||
return result[0..21] + ':' + result[22..-1]
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] getClasspath(project, libs, artifact) {
|
||||
def ret = []
|
||||
artifactTree(project, artifact).each { key, lib ->
|
||||
libs[lib.name] = lib
|
||||
if (lib.name != artifact)
|
||||
ret.add(lib.name)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
public static def getArtifacts(project, config, classifiers) {
|
||||
def ret = [:]
|
||||
config.resolvedConfiguration.resolvedArtifacts.each {
|
||||
def art = [
|
||||
group: it.moduleVersion.id.group,
|
||||
name: it.moduleVersion.id.name,
|
||||
version: it.moduleVersion.id.version,
|
||||
classifier: it.classifier,
|
||||
extension: it.extension,
|
||||
file: it.file
|
||||
]
|
||||
def key = art.group + ':' + art.name
|
||||
def folder = "${art.group.replace('.', '/')}/${art.name}/${art.version}/"
|
||||
def filename = "${art.name}-${art.version}"
|
||||
if (art.classifier != null)
|
||||
filename += "-${art.classifier}"
|
||||
filename += ".${art.extension}"
|
||||
def path = "${folder}${filename}"
|
||||
def url = "https://libraries.minecraft.net/${path}"
|
||||
if (!checkExists(url)) {
|
||||
url = "https://files.minecraftforge.net/maven/${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'
|
||||
art.version = "${art.version}-${art.classifier}"
|
||||
art.classifier = null
|
||||
art.extension = 'jar'
|
||||
path = "${art.group.replace('.', '/')}/${art.name}/${art.version}/${art.name}-${art.version}.jar"
|
||||
}
|
||||
ret[key] = [
|
||||
name: "${art.group}:${art.name}:${art.version}" + (art.classifier == null ? '' : ":${art.classifier}") + (art.extension == 'jar' ? '' : "@${art.extension}"),
|
||||
downloads: [
|
||||
artifact: [
|
||||
path: path,
|
||||
url: url,
|
||||
sha1: sha1(art.file),
|
||||
size: art.file.length()
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
public static def iso8601Now() { new Date().iso8601() }
|
||||
|
||||
public static def sha1(file) {
|
||||
MessageDigest md = MessageDigest.getInstance('SHA-1')
|
||||
file.eachByte 4096, {bytes, size ->
|
||||
md.update(bytes, 0, size)
|
||||
}
|
||||
return md.digest().collect {String.format "%02x", it}.join()
|
||||
}
|
||||
|
||||
private static def artifactTree(project, artifact) {
|
||||
if (!project.ext.has('tree_resolver'))
|
||||
project.ext.tree_resolver = 1
|
||||
def cfg = project.configurations.create('tree_resolver_' + project.ext.tree_resolver++)
|
||||
def dep = project.dependencies.create(artifact)
|
||||
cfg.dependencies.add(dep)
|
||||
def files = cfg.resolve()
|
||||
return getArtifacts(project, cfg, true)
|
||||
}
|
||||
|
||||
private static boolean checkExists(url) {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -2,16 +2,16 @@
|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos) [](https://forgedev.flocker.tv/)
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
| Version | Support |
|
||||
| ------------- | ------------- |
|
||||
| 1.15.x | Active |
|
||||
| 1.14.x | LTS |
|
||||
| 1.16.x | Active |
|
||||
| 1.15.x | LTS |
|
||||
|
||||
* [Download]
|
||||
* [Forum]
|
||||
@@ -60,7 +60,7 @@ We require all contributors to acknowledge the [Forge Contributor
|
||||
signed it, you should be OK.
|
||||
|
||||
#### Donate
|
||||
*Forge is a large project with many collaborators working on it around the clock. Forge is and will always remain free to use and modify. However, it costs money to run such a large project as this, so please consider [becoming a patron](https://www.patreon.com/LexManos) or buying some [cool merch](https://forgedev.flocker.tv/).*
|
||||
*Forge is a large project with many collaborators working on it around the clock. Forge is and will always remain free to use and modify. However, it costs money to run such a large project as this, so please consider [becoming a patron](https://www.patreon.com/LexManos).*
|
||||
|
||||
[Download]: https://files.minecraftforge.net/
|
||||
[Forum]: https://www.minecraftforge.net/forum/
|
||||
|
||||
@@ -19,6 +19,7 @@ archivesBaseName = 'modid'
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
|
||||
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.
|
||||
// snapshot_YYYYMMDD Snapshot are built nightly.
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
# 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="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
loaderVersion="[34,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
||||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||
license="All rights reserved"
|
||||
# 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 +45,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="[31,)" #mandatory
|
||||
versionRange="[34,)" #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 +54,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.15.2]"
|
||||
versionRange="[1.16.3]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "examplemod resources",
|
||||
"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."
|
||||
"pack_format": 6,
|
||||
"_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods."
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -15,4 +15,4 @@
|
||||
+
|
||||
public void func_230430_a_(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_) {
|
||||
this.func_230446_a_(p_230430_1_);
|
||||
this.func_238472_a_(p_230430_1_, this.field_230712_o_, this.field_224229_b, this.field_230708_k_ / 2, 80, 16777215);
|
||||
func_238472_a_(p_230430_1_, this.field_230712_o_, this.field_224229_b, this.field_230708_k_ / 2, 80, 16777215);
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
public void func_192113_a(ServerPlayerEntity p_192113_1_) {
|
||||
p_192113_1_.func_195068_e(this.field_192115_b);
|
||||
- LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_216015_a(LootParameters.field_216281_a, p_192113_1_).func_216015_a(LootParameters.field_216286_f, p_192113_1_.func_233580_cy_()).func_216023_a(p_192113_1_.func_70681_au()).func_216022_a(LootParameterSets.field_216265_f);
|
||||
+ LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_216015_a(LootParameters.field_216281_a, p_192113_1_).func_216015_a(LootParameters.field_216286_f, p_192113_1_.func_233580_cy_()).func_216023_a(p_192113_1_.func_70681_au()).func_186469_a(p_192113_1_.func_184817_da()).func_216022_a(LootParameterSets.field_216265_f); // FORGE: luck to LootContext
|
||||
- LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_216015_a(LootParameters.field_216281_a, p_192113_1_).func_216015_a(LootParameters.field_237457_g_, p_192113_1_.func_213303_ch()).func_216023_a(p_192113_1_.func_70681_au()).func_216022_a(LootParameterSets.field_216265_f);
|
||||
+ LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_216015_a(LootParameters.field_216281_a, p_192113_1_).func_216015_a(LootParameters.field_237457_g_, p_192113_1_.func_213303_ch()).func_216023_a(p_192113_1_.func_70681_au()).func_186469_a(p_192113_1_.func_184817_da()).func_216022_a(LootParameterSets.field_216265_f); // FORGE: luck to LootContext
|
||||
boolean flag = false;
|
||||
|
||||
for(ResourceLocation resourcelocation : this.field_192116_c) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractBlock.java
|
||||
+++ b/net/minecraft/block/AbstractBlock.java
|
||||
@@ -59,7 +59,8 @@
|
||||
@@ -60,7 +60,8 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@@ -10,15 +10,7 @@
|
||||
protected static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
|
||||
protected final Material field_149764_J;
|
||||
protected final boolean field_235688_at_;
|
||||
@@ -71,6 +72,7 @@
|
||||
protected final float field_226887_g_;
|
||||
protected final boolean field_208621_p;
|
||||
protected final AbstractBlock.Properties field_235684_aB_;
|
||||
+
|
||||
@Nullable
|
||||
protected ResourceLocation field_220085_g;
|
||||
|
||||
@@ -86,6 +88,8 @@
|
||||
@@ -87,6 +88,8 @@
|
||||
this.field_226887_g_ = p_i241196_1_.field_226894_k_;
|
||||
this.field_208621_p = p_i241196_1_.field_208772_j;
|
||||
this.field_235684_aB_ = p_i241196_1_;
|
||||
@@ -27,16 +19,16 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -128,7 +132,7 @@
|
||||
@@ -129,7 +132,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_235695_q_() && !p_196243_1_.func_203425_a(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())) {
|
||||
+ if (p_196243_1_.hasTileEntity() && (!p_196243_1_.func_203425_a(p_196243_4_.func_177230_c()) || !p_196243_4_.hasTileEntity())) {
|
||||
p_196243_2_.func_175713_t(p_196243_3_);
|
||||
}
|
||||
|
||||
@@ -190,7 +194,7 @@
|
||||
@@ -191,7 +194,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
|
||||
@@ -45,16 +37,18 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -293,7 +297,7 @@
|
||||
@@ -294,8 +297,8 @@
|
||||
if (f == -1.0F) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
- int i = p_180647_2_.func_234569_d_(p_180647_1_) ? 30 : 100;
|
||||
- return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i;
|
||||
+ int i = net.minecraftforge.common.ForgeHooks.canHarvestBlock(p_180647_1_, p_180647_2_, p_180647_3_, p_180647_4_) ? 30 : 100;
|
||||
return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i;
|
||||
+ return p_180647_2_.getDigSpeed(p_180647_1_, p_180647_4_) / f / (float)i;
|
||||
}
|
||||
}
|
||||
@@ -320,14 +324,14 @@
|
||||
|
||||
@@ -321,14 +324,14 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -71,7 +65,7 @@
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -345,6 +349,10 @@
|
||||
@@ -346,6 +349,10 @@
|
||||
return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P());
|
||||
}
|
||||
|
||||
@@ -82,7 +76,7 @@
|
||||
public abstract static class AbstractBlockState extends StateHolder<Block, BlockState> {
|
||||
private final int field_215708_d;
|
||||
private final boolean field_215709_e;
|
||||
@@ -427,6 +435,8 @@
|
||||
@@ -428,6 +435,8 @@
|
||||
return this.field_215708_d;
|
||||
}
|
||||
|
||||
@@ -91,7 +85,7 @@
|
||||
public boolean func_196958_f() {
|
||||
return this.field_235702_f_;
|
||||
}
|
||||
@@ -435,6 +445,8 @@
|
||||
@@ -436,6 +445,8 @@
|
||||
return this.field_235704_h_;
|
||||
}
|
||||
|
||||
@@ -100,11 +94,56 @@
|
||||
public BlockState func_185907_a(Rotation p_185907_1_) {
|
||||
return this.func_177230_c().func_185499_a(this.func_230340_p_(), p_185907_1_);
|
||||
}
|
||||
@@ -786,6 +798,7 @@
|
||||
@@ -802,6 +813,9 @@
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_226895_m_ = true;
|
||||
private boolean field_235813_o_;
|
||||
+ private int harvestLevel = -1;
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
private AbstractBlock.IExtendedPositionPredicate<EntityType<?>> field_235814_p_ = (p_235832_0_, p_235832_1_, p_235832_2_, p_235832_3_) -> {
|
||||
return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.func_185906_d() < 14;
|
||||
};
|
||||
@@ -863,6 +877,8 @@
|
||||
abstractblock$properties.field_226895_m_ = p_200950_0_.field_235684_aB_.field_226895_m_;
|
||||
abstractblock$properties.field_235813_o_ = p_200950_0_.field_235684_aB_.field_235813_o_;
|
||||
abstractblock$properties.field_235806_h_ = p_200950_0_.field_235684_aB_.field_235806_h_;
|
||||
+ abstractblock$properties.harvestLevel = p_200950_0_.field_235684_aB_.harvestLevel;
|
||||
+ abstractblock$properties.harvestTool = p_200950_0_.field_235684_aB_.harvestTool;
|
||||
return abstractblock$properties;
|
||||
}
|
||||
|
||||
@@ -877,6 +893,24 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
+ public AbstractBlock.Properties harvestLevel(int harvestLevel) {
|
||||
+ this.harvestLevel = harvestLevel;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ public AbstractBlock.Properties harvestTool(net.minecraftforge.common.ToolType harvestTool) {
|
||||
+ this.harvestTool = harvestTool;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ public int getHarvestLevel() {
|
||||
+ return this.harvestLevel;
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraftforge.common.ToolType getHarvestTool() {
|
||||
+ return this.harvestTool;
|
||||
+ }
|
||||
+
|
||||
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
|
||||
this.field_200961_i = p_200941_1_;
|
||||
return this;
|
||||
@@ -933,7 +967,7 @@
|
||||
}
|
||||
|
||||
public AbstractBlock.Properties func_222379_b(Block p_222379_1_) {
|
||||
- this.field_222381_j = p_222379_1_.func_220068_i();
|
||||
+ this.lootTableSupplier = () -> p_222379_1_.delegate.get().func_220068_i();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/block/AbstractFireBlock.java
|
||||
+++ b/net/minecraft/block/AbstractFireBlock.java
|
||||
@@ -124,6 +124,7 @@
|
||||
if (!p_220082_4_.func_203425_a(p_220082_1_.func_177230_c())) {
|
||||
if (func_242649_a(p_220082_2_)) {
|
||||
Optional<PortalSize> optional = PortalSize.func_242964_a(p_220082_2_, p_220082_3_, Direction.Axis.X);
|
||||
+ optional = net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_220082_2_, p_220082_3_, optional);
|
||||
if (optional.isPresent()) {
|
||||
optional.get().func_150859_c();
|
||||
return;
|
||||
@@ -13,20 +13,20 @@
|
||||
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
RailShape railshape = p_220053_1_.func_203425_a(this) ? p_220053_1_.func_177229_b(this.func_176560_l()) : null;
|
||||
+ RailShape railShape2 = p_220053_1_.func_177230_c() == this ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null;
|
||||
+ RailShape railShape2 = p_220053_1_.func_203425_a(this) ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null;
|
||||
return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a;
|
||||
}
|
||||
|
||||
@@ -61,7 +62,7 @@
|
||||
|
||||
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
|
||||
if (!p_220069_2_.field_72995_K) {
|
||||
if (!p_220069_2_.field_72995_K && p_220069_2_.func_180495_p(p_220069_3_).func_203425_a(this)) {
|
||||
- RailShape railshape = p_220069_1_.func_177229_b(this.func_176560_l());
|
||||
+ RailShape railshape = getRailDirection(p_220069_1_, p_220069_2_, p_220069_3_, null);
|
||||
if (func_235328_a_(p_220069_3_, p_220069_2_, railshape) && !p_220069_2_.func_175623_d(p_220069_3_)) {
|
||||
if (!p_220069_6_) {
|
||||
func_220075_c(p_220069_1_, p_220069_2_, p_220069_3_);
|
||||
@@ -113,7 +114,7 @@
|
||||
if (func_235328_a_(p_220069_3_, p_220069_2_, railshape)) {
|
||||
func_220075_c(p_220069_1_, p_220069_2_, p_220069_3_);
|
||||
p_220069_2_.func_217377_a(p_220069_3_, p_220069_6_);
|
||||
@@ -110,7 +111,7 @@
|
||||
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 (!p_196243_5_) {
|
||||
super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_);
|
||||
@@ -35,7 +35,7 @@
|
||||
p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this);
|
||||
}
|
||||
|
||||
@@ -132,5 +133,20 @@
|
||||
@@ -129,5 +130,20 @@
|
||||
return blockstate.func_206870_a(this.func_176560_l(), flag ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractTopPlantBlock.java
|
||||
+++ b/net/minecraft/block/AbstractTopPlantBlock.java
|
||||
@@ -39,10 +39,11 @@
|
||||
@@ -32,10 +32,11 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
--- a/net/minecraft/block/BambooBlock.java
|
||||
+++ b/net/minecraft/block/BambooBlock.java
|
||||
@@ -101,8 +101,9 @@
|
||||
@@ -100,10 +100,11 @@
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
if (p_225542_1_.func_177229_b(field_220266_f) == 0) {
|
||||
if (p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
|
||||
- if (p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
|
||||
+ if (p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
|
||||
int i = this.func_220260_b(p_225542_2_, p_225542_3_) + 1;
|
||||
- if (i < 16) {
|
||||
+ if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9)) {
|
||||
+ if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt(3) == 0)) {
|
||||
this.func_220258_a(p_225542_1_, p_225542_2_, p_225542_3_, p_225542_4_, i);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/Block.java
|
||||
+++ b/net/minecraft/block/Block.java
|
||||
@@ -52,9 +52,10 @@
|
||||
@@ -54,9 +54,10 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -13,25 +13,34 @@
|
||||
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_) {
|
||||
return !VoxelShapes.func_197879_c(VoxelShapes.func_197868_b(), p_load_1_, IBooleanFunction.field_223236_g_);
|
||||
@@ -270,7 +271,7 @@
|
||||
@@ -151,6 +152,8 @@
|
||||
super(p_i48440_1_);
|
||||
StateContainer.Builder<Block, BlockState> builder = new StateContainer.Builder<>(this);
|
||||
this.func_206840_a(builder);
|
||||
+ this.harvestLevel = p_i48440_1_.getHarvestLevel();
|
||||
+ this.harvestTool = p_i48440_1_.getHarvestTool();
|
||||
this.field_176227_L = builder.func_235882_a_(Block::func_176223_P, BlockState::new);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b());
|
||||
}
|
||||
@@ -261,7 +264,7 @@
|
||||
}
|
||||
|
||||
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
|
||||
- if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
|
||||
+ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f) && p_180635_0_.restoringBlockSnapshots) {
|
||||
+ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f) && !p_180635_0_.restoringBlockSnapshots) {
|
||||
float f = 0.5F;
|
||||
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
@@ -282,7 +283,7 @@
|
||||
@@ -273,7 +276,7 @@
|
||||
}
|
||||
|
||||
public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
|
||||
- if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
|
||||
+ if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f) && p_180637_1_.restoringBlockSnapshots) {
|
||||
public void func_180637_b(ServerWorld p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
|
||||
- if (p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
|
||||
+ if (p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f) && !p_180637_1_.restoringBlockSnapshots) {
|
||||
while(p_180637_3_ > 0) {
|
||||
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
|
||||
p_180637_3_ -= i;
|
||||
@@ -292,6 +293,7 @@
|
||||
@@ -283,6 +286,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +48,7 @@
|
||||
public float func_149638_a() {
|
||||
return this.field_235689_au_;
|
||||
}
|
||||
@@ -341,6 +343,7 @@
|
||||
@@ -332,6 +336,7 @@
|
||||
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
|
||||
}
|
||||
|
||||
@@ -47,7 +56,7 @@
|
||||
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
@@ -372,6 +375,7 @@
|
||||
@@ -363,6 +368,7 @@
|
||||
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
|
||||
}
|
||||
|
||||
@@ -55,7 +64,7 @@
|
||||
public boolean func_149659_a(Explosion p_149659_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -391,6 +395,7 @@
|
||||
@@ -382,6 +388,7 @@
|
||||
return this.field_196275_y;
|
||||
}
|
||||
|
||||
@@ -63,7 +72,7 @@
|
||||
public SoundType func_220072_p(BlockState p_220072_1_) {
|
||||
return this.field_149762_H;
|
||||
}
|
||||
@@ -400,7 +405,7 @@
|
||||
@@ -391,7 +398,7 @@
|
||||
this.field_220086_i = Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
@@ -72,7 +81,7 @@
|
||||
}
|
||||
|
||||
public boolean func_208619_r() {
|
||||
@@ -408,7 +413,7 @@
|
||||
@@ -399,7 +406,7 @@
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@@ -81,7 +90,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -419,6 +424,83 @@
|
||||
@@ -410,6 +417,83 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -128,7 +137,7 @@
|
||||
+ } else if (net.minecraftforge.common.PlantType.CROP.equals(type)) {
|
||||
+ return state.func_203425_a(Blocks.field_150458_ak);
|
||||
+ } else if (net.minecraftforge.common.PlantType.CAVE.equals(type)) {
|
||||
+ return Block.func_220056_d(state, world, pos, Direction.UP);
|
||||
+ return state.func_224755_d(world, pos, Direction.UP);
|
||||
+ } else if (net.minecraftforge.common.PlantType.PLAINS.equals(type)) {
|
||||
+ return this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_230235_a_(this) || this.getBlock() == Blocks.field_150458_ak;
|
||||
+ } else if (net.minecraftforge.common.PlantType.WATER.equals(type)) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/block/Blocks.java
|
||||
+++ b/net/minecraft/block/Blocks.java
|
||||
@@ -26,6 +26,7 @@
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.HugeFungusConfig;
|
||||
@@ -25,6 +25,7 @@
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
|
||||
[email protected]("minecraft")
|
||||
public class Blocks {
|
||||
public static final Block field_150350_a = func_222382_a("air", new AirBlock(AbstractBlock.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e().func_235859_g_()));
|
||||
public static final Block field_150348_b = func_222382_a("stone", new Block(AbstractBlock.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_235861_h_().func_200948_a(1.5F, 6.0F)));
|
||||
@@ -120,7 +121,7 @@
|
||||
@@ -119,7 +120,7 @@
|
||||
public static final Block field_196601_az = func_222382_a("green_bed", func_235422_a_(DyeColor.GREEN));
|
||||
public static final Block field_196550_aA = func_222382_a("red_bed", func_235422_a_(DyeColor.RED));
|
||||
public static final Block field_196551_aB = func_222382_a("black_bed", func_235422_a_(DyeColor.BLACK));
|
||||
@@ -17,7 +17,7 @@
|
||||
public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(AbstractBlock.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
|
||||
public static final Block field_150320_F = func_222382_a("sticky_piston", func_235432_a_(true));
|
||||
public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(AbstractBlock.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_235861_h_().func_200943_b(4.0F)));
|
||||
@@ -938,15 +939,4 @@
|
||||
@@ -937,15 +938,4 @@
|
||||
public static void func_235419_a_() {
|
||||
Block.field_176229_d.forEach(AbstractBlock.AbstractBlockState::func_215692_c);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
-public class BushBlock extends Block {
|
||||
+public class BushBlock extends Block implements net.minecraftforge.common.IPlantable {
|
||||
protected BushBlock(AbstractBlock.Properties p_i48437_1_) {
|
||||
public BushBlock(AbstractBlock.Properties p_i48437_1_) {
|
||||
super(p_i48437_1_);
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
+public class DeadBushBlock extends BushBlock implements net.minecraftforge.common.IForgeShearable {
|
||||
protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
|
||||
|
||||
protected DeadBushBlock(AbstractBlock.Properties p_i48418_1_) {
|
||||
public DeadBushBlock(AbstractBlock.Properties p_i48418_1_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DetectorRailBlock.java
|
||||
+++ b/net/minecraft/block/DetectorRailBlock.java
|
||||
@@ -129,6 +129,8 @@
|
||||
@@ -131,6 +131,8 @@
|
||||
}
|
||||
|
||||
List<AbstractMinecartEntity> list1 = this.func_200878_a(p_180641_2_, p_180641_3_, AbstractMinecartEntity.class, EntityPredicates.field_96566_b);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@
|
||||
@@ -88,9 +88,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_) {
|
||||
@@ -100,7 +100,7 @@
|
||||
@@ -100,7 +101,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/block/FireBlock.java
|
||||
+++ b/net/minecraft/block/FireBlock.java
|
||||
@@ -76,13 +76,13 @@
|
||||
@@ -92,13 +92,13 @@
|
||||
protected BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
|
||||
BlockPos blockpos = p_196448_2_.func_177977_b();
|
||||
BlockState blockstate = p_196448_1_.func_180495_p(blockpos);
|
||||
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) {
|
||||
+ if (!this.canCatchFire(p_196448_1_, p_196448_2_, Direction.UP) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) {
|
||||
+ if (!this.canCatchFire(p_196448_1_, p_196448_2_, Direction.UP) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) {
|
||||
BlockState blockstate1 = this.func_176223_P();
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
@@ -121,7 +121,7 @@
|
||||
}
|
||||
|
||||
BlockState blockstate = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
|
||||
@@ -25,7 +25,7 @@
|
||||
int i = p_225534_1_.func_177229_b(field_176543_a);
|
||||
if (!flag && p_225534_2_.func_72896_J() && this.func_176537_d(p_225534_2_, p_225534_3_) && p_225534_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
@@ -126,7 +126,7 @@
|
||||
@@ -142,7 +142,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
return;
|
||||
}
|
||||
@@ -134,12 +134,12 @@
|
||||
@@ -150,12 +150,12 @@
|
||||
|
||||
boolean flag1 = p_225534_2_.func_180502_D(p_225534_3_);
|
||||
int k = flag1 ? -50 : 0;
|
||||
@@ -53,7 +53,7 @@
|
||||
BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable();
|
||||
|
||||
for(int l = -1; l <= 1; ++l) {
|
||||
@@ -177,15 +177,17 @@
|
||||
@@ -193,16 +193,18 @@
|
||||
return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d());
|
||||
}
|
||||
|
||||
@@ -68,14 +68,17 @@
|
||||
}
|
||||
|
||||
- private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_) {
|
||||
- int i = this.func_220274_q(p_176536_1_.func_180495_p(p_176536_2_));
|
||||
+ private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, Direction face) {
|
||||
int i = this.func_220274_q(p_176536_1_.func_180495_p(p_176536_2_));
|
||||
+ int i = p_176536_1_.func_180495_p(p_176536_2_).getFlammability(p_176536_1_, p_176536_2_, face);
|
||||
if (p_176536_4_.nextInt(p_176536_3_) < i) {
|
||||
BlockState blockstate = p_176536_1_.func_180495_p(p_176536_2_);
|
||||
@@ -197,10 +199,7 @@
|
||||
if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) {
|
||||
@@ -212,11 +214,7 @@
|
||||
p_176536_1_.func_217377_a(p_176536_2_, false);
|
||||
}
|
||||
|
||||
Block block = blockstate.func_177230_c();
|
||||
- Block block = blockstate.func_177230_c();
|
||||
- if (block instanceof TNTBlock) {
|
||||
- TNTBlock tntblock = (TNTBlock)block;
|
||||
- TNTBlock.func_196534_a(p_176536_1_, p_176536_2_);
|
||||
@@ -84,7 +87,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -212,7 +211,7 @@
|
||||
@@ -228,7 +226,7 @@
|
||||
|
||||
private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) {
|
||||
for(Direction direction : Direction.values()) {
|
||||
@@ -93,7 +96,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -228,13 +227,14 @@
|
||||
@@ -244,13 +242,14 @@
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction));
|
||||
@@ -109,7 +112,7 @@
|
||||
protected boolean func_196446_i(BlockState p_196446_1_) {
|
||||
return this.func_220275_r(p_196446_1_) > 0;
|
||||
}
|
||||
@@ -253,10 +253,23 @@
|
||||
@@ -269,10 +268,23 @@
|
||||
}
|
||||
|
||||
private void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/FlowingFluidBlock.java
|
||||
+++ b/net/minecraft/block/FlowingFluidBlock.java
|
||||
@@ -31,10 +31,11 @@
|
||||
@@ -29,10 +29,11 @@
|
||||
|
||||
public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
|
||||
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
|
||||
@@ -10,10 +10,10 @@
|
||||
public static final VoxelShape field_235510_c_ = Block.func_208617_a(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
|
||||
|
||||
+ @Deprecated // Forge: Use the constructor that takes a supplier
|
||||
protected FlowingFluidBlock(FlowingFluid p_i49014_1_, AbstractBlock.Properties p_i49014_2_) {
|
||||
public FlowingFluidBlock(FlowingFluid p_i49014_1_, AbstractBlock.Properties p_i49014_2_) {
|
||||
super(p_i49014_2_);
|
||||
this.field_204517_c = p_i49014_1_;
|
||||
@@ -47,8 +48,21 @@
|
||||
@@ -45,8 +46,21 @@
|
||||
|
||||
this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true));
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
|
||||
@@ -35,7 +35,7 @@
|
||||
public VoxelShape func_220071_b(BlockState p_220071_1_, IBlockReader p_220071_2_, BlockPos p_220071_3_, ISelectionContext p_220071_4_) {
|
||||
return p_220071_4_.func_216378_a(field_235510_c_, p_220071_3_, true) && p_220071_1_.func_177229_b(field_176367_b) == 0 && p_220071_4_.func_230426_a_(p_220071_2_.func_204610_c(p_220071_3_.func_177984_a()), this.field_204517_c) ? field_235510_c_ : VoxelShapes.func_197880_a();
|
||||
}
|
||||
@@ -71,6 +85,7 @@
|
||||
@@ -69,6 +83,7 @@
|
||||
|
||||
public FluidState func_204507_t(BlockState p_204507_1_) {
|
||||
int i = p_204507_1_.func_177229_b(field_176367_b);
|
||||
@@ -43,7 +43,7 @@
|
||||
return this.field_212565_c.get(Math.min(i, 8));
|
||||
}
|
||||
|
||||
@@ -122,13 +137,13 @@
|
||||
@@ -120,13 +135,13 @@
|
||||
BlockPos blockpos = p_204515_2_.func_177972_a(direction);
|
||||
if (p_204515_1_.func_204610_c(blockpos).func_206884_a(FluidTags.field_206959_a)) {
|
||||
Block block = p_204515_1_.func_204610_c(p_204515_2_).func_206889_d() ? Blocks.field_150343_Z : Blocks.field_150347_e;
|
||||
@@ -59,9 +59,9 @@
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
@@ -166,4 +181,23 @@
|
||||
@@ -153,4 +168,23 @@
|
||||
return Fluids.field_204541_a;
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/block/MushroomBlock.java
|
||||
+++ b/net/minecraft/block/MushroomBlock.java
|
||||
@@ -63,7 +63,7 @@
|
||||
BlockPos blockpos = p_196260_3_.func_177977_b();
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(blockpos);
|
||||
if (!blockstate.func_203425_a(Blocks.field_150391_bh) && !blockstate.func_203425_a(Blocks.field_196661_l)) {
|
||||
@@ -64,7 +64,7 @@
|
||||
if (blockstate.func_235714_a_(BlockTags.field_242171_aD)) {
|
||||
return true;
|
||||
} else {
|
||||
- return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos);
|
||||
+ return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
--- a/net/minecraft/block/NetherPortalBlock.java
|
||||
+++ b/net/minecraft/block/NetherPortalBlock.java
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
public static boolean func_176548_d(IWorld p_176548_0_, BlockPos p_176548_1_) {
|
||||
NetherPortalBlock.Size netherportalblock$size = func_201816_b(p_176548_0_, p_176548_1_);
|
||||
- if (netherportalblock$size != null) {
|
||||
+ if (netherportalblock$size != null && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_0_, p_176548_1_, netherportalblock$size)) {
|
||||
netherportalblock$size.func_150859_c();
|
||||
return true;
|
||||
} else {
|
||||
@@ -241,12 +241,12 @@
|
||||
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_203425_a(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(field_150867_a, blockpos.func_177977_b())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- return this.field_150867_a.func_180495_p(p_180120_1_.func_177967_a(p_180120_2_, i)).func_203425_a(Blocks.field_150343_Z) ? i : 0;
|
||||
+ return this.field_150867_a.func_180495_p(p_180120_1_.func_177967_a(p_180120_2_, i)).isPortalFrame(field_150867_a, p_180120_1_.func_177967_a(p_180120_2_, i)) ? i : 0;
|
||||
}
|
||||
|
||||
public int func_181100_a() {
|
||||
@@ -272,17 +272,17 @@
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
- if (!this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150863_d)).func_203425_a(Blocks.field_150343_Z)) {
|
||||
+ if (!this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150863_d)).isPortalFrame(field_150867_a, blockpos.func_177972_a(this.field_150863_d))) {
|
||||
break label56;
|
||||
}
|
||||
- } else if (i == this.field_150868_h - 1 && !this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150866_c)).func_203425_a(Blocks.field_150343_Z)) {
|
||||
+ } else if (i == this.field_150868_h - 1 && !this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150866_c)).isPortalFrame(field_150867_a, blockpos.func_177972_a(this.field_150866_c))) {
|
||||
break label56;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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_203425_a(Blocks.field_150343_Z)) {
|
||||
+ 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)).isPortalFrame(field_150867_a, this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g))) {
|
||||
this.field_150862_g = 0;
|
||||
break;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/block/OreBlock.java
|
||||
@@ -31,12 +31,10 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
public void func_220062_a(BlockState p_220062_1_, ServerWorld p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- if (EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_220062_4_) == 0) {
|
||||
- int i = this.func_220281_a(p_220062_2_.field_73012_v);
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -230,7 +233,7 @@
|
||||
@@ -234,7 +237,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- return !p_185646_0_.func_177230_c().func_235695_q_();
|
||||
+ return !p_185646_0_.hasTileEntity();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -271,7 +274,7 @@
|
||||
} else {
|
||||
return false;
|
||||
@@ -273,7 +276,7 @@
|
||||
for(int k = list2.size() - 1; k >= 0; --k) {
|
||||
BlockPos blockpos2 = list2.get(k);
|
||||
BlockState blockstate1 = p_176319_1_.func_180495_p(blockpos2);
|
||||
@@ -42,7 +42,7 @@
|
||||
func_220059_a(blockstate1, p_176319_1_, blockpos2, tileentity);
|
||||
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
|
||||
ablockstate[j++] = blockstate1;
|
||||
@@ -335,6 +338,10 @@
|
||||
@@ -337,6 +340,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/PortalSize.java
|
||||
+++ b/net/minecraft/block/PortalSize.java
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
public class PortalSize {
|
||||
private static final AbstractBlock.IPositionPredicate field_242962_a = (p_242966_0_, p_242966_1_, p_242966_2_) -> {
|
||||
- return p_242966_0_.func_203425_a(Blocks.field_150343_Z);
|
||||
+ return p_242966_0_.isPortalFrame(p_242966_1_, p_242966_2_);
|
||||
};
|
||||
private final IWorld field_150867_a;
|
||||
private final Direction.Axis field_150865_b;
|
||||
@@ -6,7 +6,7 @@
|
||||
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
|
||||
+ private final boolean isActivator; // TRUE for an Activator Rail, FALSE for Powered Rail
|
||||
|
||||
protected PoweredRailBlock(AbstractBlock.Properties p_i48349_1_) {
|
||||
public PoweredRailBlock(AbstractBlock.Properties p_i48349_1_) {
|
||||
- super(true, p_i48349_1_);
|
||||
+ this(p_i48349_1_, false);
|
||||
+ }
|
||||
@@ -35,7 +35,17 @@
|
||||
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
|
||||
} else {
|
||||
return false;
|
||||
@@ -255,4 +261,8 @@
|
||||
@@ -156,6 +162,9 @@
|
||||
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);
|
||||
+ case NORTH_SOUTH: //Forge fix: MC-196102
|
||||
+ case EAST_WEST:
|
||||
+ return p_185499_1_;
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176568_b)) {
|
||||
@@ -255,4 +264,8 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176568_b, field_176569_M);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/block/RailBlock.java
|
||||
+++ b/net/minecraft/block/RailBlock.java
|
||||
@@ -49,6 +49,9 @@
|
||||
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);
|
||||
+ case NORTH_SOUTH: //Forge fix: MC-196102
|
||||
+ case EAST_WEST:
|
||||
+ return p_185499_1_;
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176565_b)) {
|
||||
@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/block/RedstoneOreBlock.java
|
||||
@@ -71,11 +71,11 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
public void func_220062_a(BlockState p_220062_1_, ServerWorld p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- if (EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_220062_4_) == 0) {
|
||||
- int i = 1 + p_220062_2_.field_73012_v.nextInt(5);
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
+public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IForgeShearable {
|
||||
protected static final VoxelShape field_207798_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
|
||||
|
||||
protected SeaGrassBlock(AbstractBlock.Properties p_i48780_1_) {
|
||||
public SeaGrassBlock(AbstractBlock.Properties p_i48780_1_) {
|
||||
@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/block/SpawnerBlock.java
|
||||
@@ -18,10 +18,13 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
public void func_220062_a(BlockState p_220062_1_, ServerWorld p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- int i = 15 + p_220062_2_.field_73012_v.nextInt(15) + p_220062_2_.field_73012_v.nextInt(15);
|
||||
- this.func_180637_b(p_220062_2_, p_220062_3_, i);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use the other constructor that takes a Supplier
|
||||
protected StairsBlock(BlockState p_i48321_1_, AbstractBlock.Properties p_i48321_2_) {
|
||||
public StairsBlock(BlockState p_i48321_1_, AbstractBlock.Properties p_i48321_2_) {
|
||||
super(p_i48321_2_);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false)));
|
||||
this.field_150149_b = p_i48321_1_.func_177230_c();
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
+public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IForgeShearable {
|
||||
protected static final VoxelShape field_196389_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
|
||||
|
||||
protected TallGrassBlock(AbstractBlock.Properties p_i48310_1_) {
|
||||
public TallGrassBlock(AbstractBlock.Properties p_i48310_1_) {
|
||||
@@ -5,7 +5,7 @@
|
||||
return false;
|
||||
} else {
|
||||
- return p_212570_2_ instanceof PlayerEntity || p_212570_1_.func_82736_K().func_223586_b(GameRules.field_223599_b);
|
||||
+ return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_) : true;
|
||||
+ return p_212570_2_ instanceof PlayerEntity || net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/VineBlock.java
|
||||
+++ b/net/minecraft/block/VineBlock.java
|
||||
@@ -19,7 +19,7 @@
|
||||
@@ -22,7 +22,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z;
|
||||
public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a;
|
||||
public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b;
|
||||
@@ -143,14 +143,14 @@
|
||||
@@ -152,14 +152,14 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
@@ -26,7 +26,7 @@
|
||||
Direction direction3 = direction.func_176746_e();
|
||||
Direction direction4 = direction.func_176735_f();
|
||||
boolean flag = p_225542_1_.func_177229_b(func_176267_a(direction3));
|
||||
@@ -207,7 +207,7 @@
|
||||
@@ -216,7 +216,7 @@
|
||||
if (p_225542_3_.func_177956_o() > 0) {
|
||||
BlockPos blockpos1 = p_225542_3_.func_177977_b();
|
||||
BlockState blockstate = p_225542_2_.func_180495_p(blockpos1);
|
||||
@@ -35,7 +35,7 @@
|
||||
BlockState blockstate1 = blockstate.func_196958_f() ? this.func_176223_P() : blockstate;
|
||||
BlockState blockstate2 = this.func_196544_a(p_225542_1_, blockstate1, p_225542_4_);
|
||||
if (blockstate1 != blockstate2 && this.func_196540_x(blockstate2)) {
|
||||
@@ -313,4 +313,7 @@
|
||||
@@ -322,4 +322,7 @@
|
||||
public static BooleanProperty func_176267_a(Direction p_176267_0_) {
|
||||
return field_196546_A.get(p_176267_0_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -164,6 +164,7 @@
|
||||
@@ -167,6 +167,7 @@
|
||||
public boolean field_241568_aS_;
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
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) {
|
||||
@@ -507,7 +508,11 @@
|
||||
@@ -518,7 +519,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s.equals("key_" + keybinding.func_151464_g())) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,6 +559,7 @@
|
||||
@@ -565,6 +570,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
@@ -29,7 +29,7 @@
|
||||
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));
|
||||
@@ -635,7 +641,7 @@
|
||||
@@ -648,7 +654,7 @@
|
||||
printwriter.println("syncChunkWrites:" + this.field_241568_aS_);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
@@ -38,11 +38,10 @@
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -733,4 +739,22 @@
|
||||
|
||||
@@ -747,6 +753,23 @@
|
||||
p_198017_1_.func_198985_a(set);
|
||||
}
|
||||
+
|
||||
|
||||
+ private void setForgeKeybindProperties() {
|
||||
+ net.minecraftforge.client.settings.KeyConflictContext inGame = net.minecraftforge.client.settings.KeyConflictContext.IN_GAME;
|
||||
+ field_74351_w.setKeyConflictContext(inGame);
|
||||
@@ -58,6 +57,8 @@
|
||||
+ field_74323_J.setKeyConflictContext(inGame);
|
||||
+ field_151457_aa.setKeyConflictContext(inGame);
|
||||
+ field_151458_ab.setKeyConflictContext(inGame);
|
||||
+ field_186718_X.setKeyConflictContext(inGame);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
public PointOfView func_243230_g() {
|
||||
return this.field_243228_bb;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/KeyboardListener.java
|
||||
+++ b/net/minecraft/client/KeyboardListener.java
|
||||
@@ -256,7 +256,9 @@
|
||||
@@ -255,7 +255,9 @@
|
||||
}
|
||||
|
||||
INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r;
|
||||
@@ -11,7 +11,7 @@
|
||||
if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) {
|
||||
this.field_197972_a.func_228018_at_().func_198077_g();
|
||||
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.func_228018_at_().func_198113_j();
|
||||
@@ -275,6 +277,8 @@
|
||||
@@ -274,6 +276,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.func_241217_q_() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.func_241217_q_()).func_212955_f();
|
||||
@@ -294,10 +298,14 @@
|
||||
@@ -289,10 +293,14 @@
|
||||
Screen.func_231153_a_(() -> {
|
||||
if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) {
|
||||
if (p_197961_5_ == 0) {
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName());
|
||||
@@ -350,7 +358,7 @@
|
||||
@@ -345,7 +353,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,12 +368,16 @@
|
||||
@@ -355,12 +363,16 @@
|
||||
if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) {
|
||||
if (Character.charCount(p_197963_3_) == 1) {
|
||||
Screen.func_231153_a_(() -> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -358,6 +358,7 @@
|
||||
@@ -357,6 +357,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;
|
||||
@@ -370,7 +371,6 @@
|
||||
@@ -369,7 +370,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,7 +16,7 @@
|
||||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_238175_ae_ = !p_i45547_1_.field_178741_d.field_239099_d_;
|
||||
this.field_238176_af_ = !p_i45547_1_.field_178741_d.field_239100_e_;
|
||||
@@ -416,13 +416,13 @@
|
||||
@@ -415,13 +415,13 @@
|
||||
|
||||
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
|
||||
this.field_71417_B = new MouseHelper(this);
|
||||
@@ -31,7 +31,7 @@
|
||||
this.field_110448_aq.func_198983_a();
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
|
||||
@@ -463,6 +463,7 @@
|
||||
@@ -462,6 +462,7 @@
|
||||
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);
|
||||
@@ -39,7 +39,7 @@
|
||||
this.field_110451_am.func_219534_a(this.field_71452_i);
|
||||
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213272_aL);
|
||||
@@ -470,7 +471,8 @@
|
||||
@@ -469,7 +470,8 @@
|
||||
this.field_110451_am.func_219534_a(this.field_213273_aM);
|
||||
this.field_241557_ar_ = new GPUWarning();
|
||||
this.field_110451_am.func_219534_a(this.field_241557_ar_);
|
||||
@@ -49,7 +49,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()) {
|
||||
@@ -482,11 +484,6 @@
|
||||
@@ -481,11 +483,6 @@
|
||||
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();
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
ResourceLoadProgressGui.func_212970_a(this);
|
||||
List<IResourcePack> list = this.field_110448_aq.func_232623_f_();
|
||||
@@ -495,7 +492,14 @@
|
||||
@@ -494,7 +491,14 @@
|
||||
if (SharedConstants.field_206244_b) {
|
||||
this.func_213256_aB();
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
});
|
||||
}, false));
|
||||
}
|
||||
@@ -534,7 +538,7 @@
|
||||
@@ -533,7 +537,7 @@
|
||||
}
|
||||
|
||||
private void func_229988_a_(Throwable p_229988_1_) {
|
||||
@@ -86,7 +86,7 @@
|
||||
ITextComponent itextcomponent;
|
||||
if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) {
|
||||
itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_241203_a().func_195762_a());
|
||||
@@ -618,7 +622,7 @@
|
||||
@@ -621,7 +625,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_) -> {
|
||||
@@ -95,7 +95,7 @@
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -688,13 +692,13 @@
|
||||
@@ -691,13 +695,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());
|
||||
@@ -112,7 +112,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -703,6 +707,7 @@
|
||||
@@ -706,6 +710,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -791,10 +796,6 @@
|
||||
@@ -794,10 +799,6 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -131,7 +131,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_233643_dh_()) {
|
||||
@@ -805,6 +806,14 @@
|
||||
@@ -808,6 +809,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,30 +146,29 @@
|
||||
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);
|
||||
@@ -936,11 +945,13 @@
|
||||
@@ -939,11 +948,13 @@
|
||||
RenderSystem.enableCull();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b);
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b);
|
||||
this.field_71424_I.func_219895_b("gameRenderer");
|
||||
this.field_71460_t.func_195458_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i, p_195542_1_);
|
||||
this.field_71424_I.func_219895_b("toasts");
|
||||
this.field_193034_aS.func_238541_a_(new MatrixStack());
|
||||
this.field_71424_I.func_76319_b();
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickEnd(this.field_71428_T.field_194147_b);
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickEnd(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b);
|
||||
}
|
||||
|
||||
if (this.field_238174_aV_ != null) {
|
||||
@@ -1039,7 +1050,7 @@
|
||||
@@ -1042,6 +1053,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());
|
||||
+ 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();
|
||||
}
|
||||
|
||||
@@ -1227,11 +1238,21 @@
|
||||
@@ -1230,11 +1242,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();
|
||||
@@ -193,7 +192,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1250,6 +1271,8 @@
|
||||
@@ -1253,6 +1275,8 @@
|
||||
}
|
||||
|
||||
} else if (!this.field_71439_g.func_184838_M()) {
|
||||
@@ -202,7 +201,7 @@
|
||||
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());
|
||||
@@ -1257,7 +1280,7 @@
|
||||
@@ -1260,7 +1284,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -211,7 +210,7 @@
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1267,8 +1290,10 @@
|
||||
@@ -1270,8 +1294,10 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
@@ -222,7 +221,7 @@
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1283,6 +1308,11 @@
|
||||
@@ -1286,6 +1312,11 @@
|
||||
}
|
||||
|
||||
for(Hand hand : Hand.values()) {
|
||||
@@ -234,7 +233,7 @@
|
||||
ItemStack itemstack = this.field_71439_g.func_184586_b(hand);
|
||||
if (this.field_71476_x != null) {
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
@@ -1296,6 +1326,7 @@
|
||||
@@ -1299,6 +1330,7 @@
|
||||
|
||||
if (actionresulttype.func_226246_a_()) {
|
||||
if (actionresulttype.func_226247_b_()) {
|
||||
@@ -242,7 +241,7 @@
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
}
|
||||
|
||||
@@ -1308,6 +1339,7 @@
|
||||
@@ -1311,6 +1343,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_()) {
|
||||
@@ -250,7 +249,7 @@
|
||||
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);
|
||||
@@ -1323,6 +1355,9 @@
|
||||
@@ -1326,6 +1359,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +259,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_()) {
|
||||
@@ -1349,6 +1384,8 @@
|
||||
@@ -1352,6 +1388,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -269,7 +268,7 @@
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1465,6 +1502,8 @@
|
||||
@@ -1468,6 +1506,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -278,18 +277,7 @@
|
||||
}
|
||||
|
||||
private void func_184117_aA() {
|
||||
@@ -1676,6 +1715,10 @@
|
||||
this.field_71424_I.func_76320_a("waitForServer");
|
||||
|
||||
while(!this.field_71437_Z.func_71200_ad()) {
|
||||
+ if (!net.minecraftforge.fml.StartupQuery.check() || this.field_71437_Z.func_71241_aa()) {
|
||||
+ this.func_147108_a(null);
|
||||
+ return;
|
||||
+ } else if (this.field_71462_r == null) // if we're showing nothing, put the working screen back again
|
||||
worldloadprogressscreen.func_231023_e_();
|
||||
this.func_195542_b(false);
|
||||
|
||||
@@ -1696,7 +1739,12 @@
|
||||
@@ -1697,7 +1737,12 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
@@ -303,7 +291,7 @@
|
||||
this.field_71453_ak = networkmanager;
|
||||
} else {
|
||||
this.func_241559_a_(p_238195_6_, p_238195_1_, flag, () -> {
|
||||
@@ -1770,6 +1818,7 @@
|
||||
@@ -1771,6 +1816,7 @@
|
||||
}
|
||||
|
||||
public void func_71403_a(ClientWorld p_71403_1_) {
|
||||
@@ -311,7 +299,7 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1801,10 +1850,12 @@
|
||||
@@ -1802,10 +1848,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
@@ -324,7 +312,7 @@
|
||||
if (integratedserver != null) {
|
||||
this.field_71424_I.func_76320_a("waitForServer");
|
||||
|
||||
@@ -1819,6 +1870,7 @@
|
||||
@@ -1820,6 +1868,7 @@
|
||||
this.field_71456_v.func_181029_i();
|
||||
this.field_71422_O = null;
|
||||
this.field_71455_al = false;
|
||||
@@ -332,7 +320,7 @@
|
||||
this.field_213274_aO.func_216815_b();
|
||||
}
|
||||
|
||||
@@ -1849,6 +1901,7 @@
|
||||
@@ -1850,6 +1899,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_();
|
||||
@@ -340,7 +328,7 @@
|
||||
}
|
||||
|
||||
public boolean func_238216_r_() {
|
||||
@@ -1894,112 +1947,9 @@
|
||||
@@ -1895,112 +1945,9 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -456,7 +444,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2081,6 +2031,7 @@
|
||||
@@ -2090,6 +2037,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
@@ -464,16 +452,16 @@
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
|
||||
return p_229993_0_;
|
||||
@@ -2388,7 +2339,7 @@
|
||||
@@ -2397,7 +2345,7 @@
|
||||
supplier = func_228022_c_(supplier);
|
||||
}
|
||||
|
||||
- return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_6_);
|
||||
+ return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_6_, p_228011_3_.isHidden());
|
||||
- return new ResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_6_);
|
||||
+ return new ResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_6_, p_228011_3_.isHidden());
|
||||
}
|
||||
|
||||
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
|
||||
@@ -2407,6 +2358,14 @@
|
||||
@@ -2416,6 +2364,14 @@
|
||||
this.field_175617_aL.func_229355_a_(p_228020_1_);
|
||||
}
|
||||
|
||||
@@ -487,4 +475,4 @@
|
||||
+
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static final class PackManager implements AutoCloseable {
|
||||
private final ResourcePackList<ResourcePackInfo> field_238221_a_;
|
||||
private final ResourcePackList field_238221_a_;
|
||||
@@ -4,7 +4,7 @@
|
||||
this.field_148622_c = p_i50892_1_;
|
||||
this.field_148619_d = p_i50892_2_;
|
||||
this.field_217939_i = new AudioStreamManager(p_i50892_3_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundSetupEvent(this));
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
|
||||
}
|
||||
|
||||
public void func_148596_a() {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
|
||||
@@ -113,7 +113,7 @@
|
||||
@@ -114,7 +114,7 @@
|
||||
f = 1.0F;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
int i = this.func_184612_cw();
|
||||
float f1 = (float)i / 20.0F;
|
||||
if (f1 > 1.0F) {
|
||||
@@ -125,6 +125,6 @@
|
||||
@@ -126,6 +126,6 @@
|
||||
f *= 1.0F - f1 * 0.15F;
|
||||
}
|
||||
|
||||
- return f;
|
||||
- return MathHelper.func_219799_g(Minecraft.func_71410_x().field_71474_y.field_243227_aN, 1.0F, f);
|
||||
+ return net.minecraftforge.client.ForgeHooksClient.getOffsetFOV(this, f);
|
||||
}
|
||||
}
|
||||
+12
-21
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
||||
@@ -133,6 +133,7 @@
|
||||
@@ -134,6 +134,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -479,6 +480,11 @@
|
||||
@@ -457,6 +458,11 @@
|
||||
}
|
||||
|
||||
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) {
|
||||
@@ -20,7 +20,7 @@
|
||||
this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
|
||||
}
|
||||
|
||||
@@ -617,6 +623,7 @@
|
||||
@@ -595,6 +601,7 @@
|
||||
boolean flag2 = this.func_223110_ee();
|
||||
this.field_239203_ch_ = !this.field_71075_bZ.field_75100_b && !this.func_203007_ba() && this.func_213298_c(Pose.CROUCHING) && (this.func_225608_bj_() || !this.func_70608_bn() && !this.func_213298_c(Pose.STANDING));
|
||||
this.field_71158_b.func_225607_a_(this.func_228354_I_());
|
||||
@@ -28,26 +28,17 @@
|
||||
this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b);
|
||||
if (this.func_184587_cr() && !this.func_184218_aH()) {
|
||||
this.field_71158_b.field_78902_a *= 0.2F;
|
||||
@@ -631,11 +638,12 @@
|
||||
this.field_71158_b.field_78901_c = true;
|
||||
}
|
||||
@@ -667,7 +674,7 @@
|
||||
|
||||
- if (!this.field_70145_X) {
|
||||
- this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
- this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
- this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
- this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
+ net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent event = new net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent(this);
|
||||
+ if (!this.field_70145_X && !net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
|
||||
+ this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
+ this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
if (flag1) {
|
||||
@@ -985,4 +993,16 @@
|
||||
return this.field_204230_bP;
|
||||
@@ -975,4 +982,16 @@
|
||||
return super.func_241843_o(p_241843_1_);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/IngameGui.java
|
||||
+++ b/net/minecraft/client/gui/IngameGui.java
|
||||
@@ -416,6 +416,9 @@
|
||||
@@ -78,7 +78,7 @@
|
||||
protected static final ResourceLocation field_110329_b = new ResourceLocation("textures/misc/vignette.png");
|
||||
protected static final ResourceLocation field_110330_c = new ResourceLocation("textures/gui/widgets.png");
|
||||
protected static final ResourceLocation field_110328_d = new ResourceLocation("textures/misc/pumpkinblur.png");
|
||||
- protected static final ITextComponent field_243249_e = new TranslationTextComponent("demo.demoExpired");
|
||||
+ private static final ITextComponent field_243249_e = new TranslationTextComponent("demo.demoExpired");
|
||||
protected final Random field_73842_c = new Random();
|
||||
protected final Minecraft field_73839_d;
|
||||
protected final ItemRenderer field_73841_b;
|
||||
@@ -414,6 +414,9 @@
|
||||
|
||||
for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
|
||||
Effect effect = effectinstance.func_188419_a();
|
||||
@@ -10,7 +19,7 @@
|
||||
if (effectinstance.func_205348_f()) {
|
||||
int k = this.field_194811_H;
|
||||
int l = 1;
|
||||
@@ -453,6 +456,7 @@
|
||||
@@ -451,6 +454,7 @@
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
||||
func_238470_a_(p_238444_1_, j1 + 3, k1 + 3, this.func_230927_p_(), 18, 18, textureatlassprite);
|
||||
});
|
||||
@@ -18,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -577,7 +581,8 @@
|
||||
@@ -575,7 +579,8 @@
|
||||
iformattabletextcomponent.func_240699_a_(TextFormatting.ITALIC);
|
||||
}
|
||||
|
||||
@@ -28,22 +37,22 @@
|
||||
int j = (this.field_194811_H - i) / 2;
|
||||
int k = this.field_194812_I - 59;
|
||||
if (!this.field_73839_d.field_71442_b.func_78755_b()) {
|
||||
@@ -594,7 +599,13 @@
|
||||
@@ -592,7 +597,13 @@
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
func_238467_a_(p_238453_1_, j - 2, k - 2, j + i + 2, k + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
|
||||
- this.func_175179_f().func_238407_a_(p_238453_1_, iformattabletextcomponent, (float)j, (float)k, 16777215 + (l << 24));
|
||||
- this.func_175179_f().func_243246_a(p_238453_1_, iformattabletextcomponent, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ FontRenderer font = field_92016_l.func_77973_b().getFontRenderer(field_92016_l);
|
||||
+ if (font == null) {
|
||||
+ this.func_175179_f().func_238407_a_(p_238453_1_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ this.func_175179_f().func_243246_a(p_238453_1_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ } else {
|
||||
+ j = (this.field_194811_H - font.func_238414_a_(highlightTip)) / 2;
|
||||
+ font.func_238407_a_(p_238453_1_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ font.func_243246_a(p_238453_1_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ }
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
@@ -1057,7 +1068,7 @@
|
||||
@@ -1055,7 +1066,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;
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/advancements/AdvancementsScreen.java
|
||||
+++ b/net/minecraft/client/gui/advancements/AdvancementsScreen.java
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -29,6 +29,7 @@
|
||||
private final Map<Advancement, AdvancementTabGui> field_191947_i = Maps.newLinkedHashMap();
|
||||
private AdvancementTabGui field_191940_s;
|
||||
private boolean field_191944_v;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public AdvancementsScreen(ClientAdvancementManager p_i47383_1_) {
|
||||
super(NarratorChatListener.field_216868_a);
|
||||
@@ -40,7 +41,13 @@
|
||||
@@ -44,7 +45,13 @@
|
||||
} else {
|
||||
this.field_191946_h.func_194230_a(this.field_191940_s == null ? null : this.field_191940_s.func_193935_c(), true);
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
public void func_231164_f_() {
|
||||
@@ -58,7 +65,7 @@
|
||||
@@ -62,7 +69,7 @@
|
||||
int j = (this.field_230709_l_ - 140) / 2;
|
||||
|
||||
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
|
||||
@@ -32,7 +32,7 @@
|
||||
this.field_191946_h.func_194230_a(advancementtabgui.func_193935_c(), true);
|
||||
break;
|
||||
}
|
||||
@@ -82,6 +89,12 @@
|
||||
@@ -86,6 +93,12 @@
|
||||
int i = (this.field_230708_k_ - 252) / 2;
|
||||
int j = (this.field_230709_l_ - 140) / 2;
|
||||
this.func_230446_a_(p_230430_1_);
|
||||
@@ -40,12 +40,12 @@
|
||||
+ net.minecraft.util.text.ITextComponent page = new net.minecraft.util.text.StringTextComponent(String.format("%d / %d", tabPage + 1, maxPages + 1));
|
||||
+ int width = this.field_230712_o_.func_238414_a_(page);
|
||||
+ RenderSystem.disableLighting();
|
||||
+ this.field_230712_o_.func_238407_a_(p_230430_1_, page, i + (252 / 2) - (width / 2), j - 44, -1);
|
||||
+ this.field_230712_o_.func_238407_a_(p_230430_1_, page.func_241878_f(), i + (252 / 2) - (width / 2), j - 44, -1);
|
||||
+ }
|
||||
this.func_238696_c_(p_230430_1_, p_230430_2_, p_230430_3_, i, j);
|
||||
this.func_238695_a_(p_230430_1_, i, j);
|
||||
this.func_238697_d_(p_230430_1_, p_230430_2_, p_230430_3_, i, j);
|
||||
@@ -129,6 +142,7 @@
|
||||
@@ -132,6 +145,7 @@
|
||||
this.field_230706_i_.func_110434_K().func_110577_a(field_191945_g);
|
||||
|
||||
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
|
||||
@@ -53,7 +53,7 @@
|
||||
advancementtabgui.func_238683_a_(p_238695_1_, p_238695_2_, p_238695_3_, advancementtabgui == this.field_191940_s);
|
||||
}
|
||||
|
||||
@@ -136,6 +150,7 @@
|
||||
@@ -139,6 +153,7 @@
|
||||
RenderSystem.defaultBlendFunc();
|
||||
|
||||
for(AdvancementTabGui advancementtabgui1 : this.field_191947_i.values()) {
|
||||
@@ -61,7 +61,7 @@
|
||||
advancementtabgui1.func_191796_a(p_238695_2_, p_238695_3_, this.field_230707_j_);
|
||||
}
|
||||
|
||||
@@ -158,7 +173,7 @@
|
||||
@@ -161,7 +176,7 @@
|
||||
|
||||
if (this.field_191947_i.size() > 1) {
|
||||
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
@@ -40,7 +43,9 @@
|
||||
int i1 = i / 2 - l / 2;
|
||||
int j1 = j - 9;
|
||||
this.field_184059_f.field_71466_p.func_238407_a_(p_238484_1_, itextcomponent, (float)i1, (float)j1, 16777215);
|
||||
this.field_184059_f.field_71466_p.func_243246_a(p_238484_1_, itextcomponent, (float)i1, (float)j1, 16777215);
|
||||
- j += 10 + 9;
|
||||
+ }
|
||||
+ j += event.getIncrement();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
list.add(this.func_211534_a(entry));
|
||||
}
|
||||
|
||||
- for(ResourceLocation resourcelocation : this.field_175242_a.func_147114_u().func_199724_l().func_199717_a().func_199913_a(blockstate.func_177230_c())) {
|
||||
- for(ResourceLocation resourcelocation : this.field_175242_a.func_147114_u().func_199724_l().func_241835_a().func_199913_a(blockstate.func_177230_c())) {
|
||||
+ for(ResourceLocation resourcelocation : blockstate.func_177230_c().getTags()) {
|
||||
list.add("#" + resourcelocation);
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
list.add(this.func_211534_a(entry1));
|
||||
}
|
||||
|
||||
- for(ResourceLocation resourcelocation1 : this.field_175242_a.func_147114_u().func_199724_l().func_205704_c().func_199913_a(fluidstate.func_206886_c())) {
|
||||
- for(ResourceLocation resourcelocation1 : this.field_175242_a.func_147114_u().func_199724_l().func_241837_c().func_199913_a(fluidstate.func_206886_c())) {
|
||||
+ for(ResourceLocation resourcelocation1 : fluidstate.func_206886_c().getTags()) {
|
||||
list.add("#" + resourcelocation1);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
||||
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
||||
@@ -92,7 +92,7 @@
|
||||
@@ -95,7 +95,7 @@
|
||||
this.func_205702_a();
|
||||
this.field_193018_j.clear();
|
||||
|
||||
- for(RecipeBookCategories recipebookcategories : ClientRecipeBook.func_216769_b(this.field_201522_g)) {
|
||||
- for(RecipeBookCategories recipebookcategories : RecipeBookCategories.func_243236_a(this.field_201522_g.func_241850_m())) {
|
||||
+ for(RecipeBookCategories recipebookcategories : this.field_201522_g.getRecipeBookCategories()) {
|
||||
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
@@ -433,7 +433,7 @@
|
||||
|
||||
languagemanager.func_135045_a(language);
|
||||
this.field_191888_F.field_71474_y.field_74363_ab = language.getCode();
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/screen/CreateWorldScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/CreateWorldScreen.java
|
||||
@@ -542,6 +542,7 @@
|
||||
File file1 = path.toFile();
|
||||
if (this.field_243416_G == null) {
|
||||
this.field_243416_G = new ResourcePackList(new ServerPackFinder(), new FolderPackFinder(file1, IPackNameDecorator.field_232625_a_));
|
||||
+ net.minecraftforge.fml.packs.ResourcePackLoader.loadResourcePacks(this.field_243416_G, net.minecraftforge.fml.server.ServerLifecycleHooks::buildPackFinder);
|
||||
this.field_243416_G.func_198983_a();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screen/LanguageScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/LanguageScreen.java
|
||||
@@ -43,7 +43,7 @@
|
||||
@@ -45,7 +45,7 @@
|
||||
if (languagescreen$list$languageentry != null && !languagescreen$list$languageentry.field_214398_b.getCode().equals(this.field_146454_h.func_135041_c().getCode())) {
|
||||
this.field_146454_h.func_135045_a(languagescreen$list$languageentry.field_214398_b);
|
||||
this.field_228183_b_.field_74363_ab = languagescreen$list$languageentry.field_214398_b.getCode();
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
this.func_140005_i();
|
||||
}, button$itooltip))).field_230693_o_ = flag;
|
||||
}
|
||||
@@ -222,6 +228,7 @@
|
||||
@@ -229,6 +235,7 @@
|
||||
|
||||
this.field_230706_i_.func_110434_K().func_110577_a(field_194400_H);
|
||||
func_238463_a_(p_230430_1_, j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);
|
||||
@@ -42,22 +42,23 @@
|
||||
if (this.field_73975_c != null) {
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.translatef((float)(this.field_230708_k_ / 2 + 90), 70.0F, 0.0F);
|
||||
@@ -244,7 +251,13 @@
|
||||
@@ -251,7 +258,14 @@
|
||||
s = s + I18n.func_135052_a("menu.modded");
|
||||
}
|
||||
|
||||
- this.func_238476_c_(p_230430_1_, this.field_230712_o_, s, 2, this.field_230709_l_ - 10, 16777215 | l);
|
||||
- func_238476_c_(p_230430_1_, this.field_230712_o_, s, 2, this.field_230709_l_ - 10, 16777215 | l);
|
||||
+ net.minecraftforge.fml.BrandingControl.forEachLine(true, true, (brdline, brd) ->
|
||||
+ this.func_238476_c_(p_230430_1_, this.field_230712_o_, brd, 2, this.field_230709_l_ - ( 10 + brdline * (this.field_230712_o_.field_78288_b + 1)), 16777215 | l)
|
||||
+ func_238476_c_(p_230430_1_, this.field_230712_o_, brd, 2, this.field_230709_l_ - ( 10 + brdline * (this.field_230712_o_.field_78288_b + 1)), 16777215 | l)
|
||||
+ );
|
||||
+
|
||||
+ net.minecraftforge.fml.BrandingControl.forEachAboveCopyrightLine((brdline, brd) ->
|
||||
+ this.func_238476_c_(p_230430_1_, this.field_230712_o_, brd, this.field_230708_k_ - field_230712_o_.func_78256_a(brd), this.field_230709_l_ - (10 + (brdline + 1) * ( this.field_230712_o_.field_78288_b + 1)), 16777215 | l)
|
||||
+ func_238476_c_(p_230430_1_, this.field_230712_o_, brd, this.field_230708_k_ - field_230712_o_.func_78256_a(brd), this.field_230709_l_ - (10 + (brdline + 1) * ( this.field_230712_o_.field_78288_b + 1)), 16777215 | l)
|
||||
+ );
|
||||
this.func_238476_c_(p_230430_1_, this.field_230712_o_, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_230709_l_ - 10, 16777215 | l);
|
||||
+
|
||||
func_238476_c_(p_230430_1_, this.field_230712_o_, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_230709_l_ - 10, 16777215 | l);
|
||||
if (p_230430_2_ > this.field_193979_N && p_230430_2_ < this.field_193979_N + this.field_193978_M && p_230430_3_ > this.field_230709_l_ - 10 && p_230430_3_ < this.field_230709_l_) {
|
||||
func_238467_a_(p_230430_1_, this.field_193979_N, this.field_230709_l_ - 1, this.field_193979_N + this.field_193978_M, this.field_230709_l_, 16777215 | l);
|
||||
@@ -258,6 +271,7 @@
|
||||
@@ -265,6 +279,7 @@
|
||||
if (this.func_183501_a() && f1 >= 1.0F) {
|
||||
this.field_183503_M.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/client/gui/screen/OptionsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/OptionsScreen.java
|
||||
@@ -146,4 +146,12 @@
|
||||
this.func_238472_a_(p_230430_1_, this.field_230712_o_, this.field_230704_d_, this.field_230708_k_ / 2, 15, 16777215);
|
||||
func_238472_a_(p_230430_1_, this.field_230712_o_, this.field_230704_d_, this.field_230708_k_ / 2, 15, 16777215);
|
||||
super.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
|
||||
}
|
||||
+
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screen/PackLoadingManager.java
|
||||
+++ b/net/minecraft/client/gui/screen/PackLoadingManager.java
|
||||
@@ -135,6 +135,11 @@
|
||||
@@ -134,6 +134,11 @@
|
||||
public void func_230468_k_() {
|
||||
this.func_238879_a_(1);
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -230,5 +235,7 @@
|
||||
@@ -229,5 +234,7 @@
|
||||
boolean func_230469_o_();
|
||||
|
||||
boolean func_230470_p_();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/client/gui/screen/PackScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/PackScreen.java
|
||||
@@ -84,7 +84,7 @@
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
private void func_238899_a_(ResourcePackList p_238899_1_, Stream<PackLoadingManager.IPack> p_238899_2_) {
|
||||
private void func_238899_a_(net.minecraft.client.gui.widget.list.ResourcePackList p_238899_1_, Stream<PackLoadingManager.IPack> p_238899_2_) {
|
||||
p_238899_1_.func_231039_at__().clear();
|
||||
- p_238899_2_.forEach((p_238898_2_) -> {
|
||||
+ p_238899_2_.filter(PackLoadingManager.IPack::notHidden).forEach((p_238898_2_) -> {
|
||||
p_238899_1_.func_231039_at__().add(new ResourcePackList.ResourcePackEntry(this.field_230706_i_, p_238899_1_, this, p_238898_2_));
|
||||
p_238899_1_.func_231039_at__().add(new net.minecraft.client.gui.widget.list.ResourcePackList.ResourcePackEntry(this.field_230706_i_, p_238899_1_, this, p_238898_2_));
|
||||
});
|
||||
}
|
||||
@@ -4,28 +4,26 @@
|
||||
}
|
||||
|
||||
protected void func_230457_a_(MatrixStack p_230457_1_, ItemStack p_230457_2_, int p_230457_3_, int p_230457_4_) {
|
||||
- this.func_238654_b_(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_);
|
||||
- this.func_243308_b(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_);
|
||||
+ FontRenderer font = p_230457_2_.func_77973_b().getFontRenderer(p_230457_2_);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_230457_2_);
|
||||
+ this.func_238654_b_(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ this.renderToolTip(p_230457_1_, Lists.transform(this.func_231151_a_(p_230457_2_), ITextComponent::func_241878_f), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
|
||||
}
|
||||
|
||||
public List<ITextComponent> func_231151_a_(ItemStack p_231151_1_) {
|
||||
@@ -125,7 +128,11 @@
|
||||
@@ -129,6 +132,10 @@
|
||||
}
|
||||
|
||||
public void func_238654_b_(MatrixStack p_238654_1_, List<? extends ITextProperties> p_238654_2_, int p_238654_3_, int p_238654_4_) {
|
||||
- if (!p_238654_2_.isEmpty()) {
|
||||
+
|
||||
public void func_238654_b_(MatrixStack p_238654_1_, List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_) {
|
||||
+ this.renderToolTip(p_238654_1_, p_238654_2_, p_238654_3_, p_238654_4_, field_230712_o_);
|
||||
+ }
|
||||
+ public void func_238654_b_(MatrixStack p_238654_1_, List<? extends ITextProperties> p_238654_2_, int p_238654_3_, int p_238654_4_, FontRenderer font) {
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(p_238654_1_, p_238654_2_, p_238654_3_, p_238654_4_, field_230708_k_, field_230709_l_, -1, font);
|
||||
+ if (false && !p_238654_2_.isEmpty()) {
|
||||
+ public void renderToolTip(MatrixStack p_238654_1_, List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_, FontRenderer font) {
|
||||
+ //net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(p_238654_1_, p_238654_2_, p_238654_3_, p_238654_4_, field_230708_k_, field_230709_l_, -1, font);
|
||||
if (!p_238654_2_.isEmpty()) {
|
||||
int i = 0;
|
||||
|
||||
for(ITextProperties itextproperties : p_238654_2_) {
|
||||
@@ -285,9 +292,12 @@
|
||||
@@ -289,9 +296,12 @@
|
||||
}
|
||||
|
||||
public void func_231159_b_(String p_231159_1_, boolean p_231159_2_) {
|
||||
@@ -38,7 +36,7 @@
|
||||
|
||||
this.field_230706_i_.field_71439_g.func_71165_d(p_231159_1_);
|
||||
}
|
||||
@@ -298,10 +308,17 @@
|
||||
@@ -302,10 +312,17 @@
|
||||
this.field_230712_o_ = p_231158_1_.field_71466_p;
|
||||
this.field_230708_k_ = p_231158_2_;
|
||||
this.field_230709_l_ = p_231158_3_;
|
||||
@@ -56,23 +54,23 @@
|
||||
}
|
||||
|
||||
public List<? extends IGuiEventListener> func_231039_at__() {
|
||||
@@ -324,6 +341,7 @@
|
||||
@@ -328,6 +345,7 @@
|
||||
public void func_238651_a_(MatrixStack p_238651_1_, int p_238651_2_) {
|
||||
if (this.field_230706_i_.field_71441_e != null) {
|
||||
this.func_238468_a_(p_238651_1_, 0, 0, this.field_230708_k_, this.field_230709_l_, -1072689136, -804253680);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, p_238651_1_));
|
||||
} else {
|
||||
this.func_231165_f_(p_238651_2_);
|
||||
}
|
||||
@@ -342,6 +360,7 @@
|
||||
@@ -346,6 +364,7 @@
|
||||
bufferbuilder.func_225582_a_((double)this.field_230708_k_, 0.0D, 0.0D).func_225583_a_((float)this.field_230708_k_ / 32.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
|
||||
bufferbuilder.func_225582_a_(0.0D, 0.0D, 0.0D).func_225583_a_(0.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
|
||||
tessellator.func_78381_a();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, new MatrixStack()));
|
||||
}
|
||||
|
||||
public boolean func_231177_au__() {
|
||||
@@ -428,4 +447,8 @@
|
||||
@@ -432,4 +451,8 @@
|
||||
|
||||
public void func_230476_a_(List<Path> p_230476_1_) {
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screen/ServerSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/screen/ServerSelectionList.java
|
||||
@@ -302,6 +302,8 @@
|
||||
@@ -310,6 +310,8 @@
|
||||
this.field_148303_c.func_238854_b_(list1);
|
||||
}
|
||||
|
||||
|
||||
+16
-15
@@ -105,19 +105,20 @@
|
||||
this.func_184098_a(slot, k, p_231048_5_, ClickType.CLONE);
|
||||
} else {
|
||||
boolean flag1 = k != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344));
|
||||
@@ -534,19 +544,26 @@
|
||||
@@ -530,34 +540,39 @@
|
||||
}
|
||||
|
||||
public boolean func_231046_a_(int p_231046_1_, int p_231046_2_, int p_231046_3_) {
|
||||
+ InputMappings.Input mouseKey = InputMappings.func_197954_a(p_231046_1_, p_231046_2_);
|
||||
if (super.func_231046_a_(p_231046_1_, p_231046_2_, p_231046_3_)) {
|
||||
return true;
|
||||
- } else if (p_231046_1_ != 256 && !this.field_230706_i_.field_71474_y.field_151445_Q.func_197976_a(p_231046_1_, p_231046_2_)) {
|
||||
- } else if (this.field_230706_i_.field_71474_y.field_151445_Q.func_197976_a(p_231046_1_, p_231046_2_)) {
|
||||
+ } else if (this.field_230706_i_.field_71474_y.field_151445_Q.isActiveAndMatches(mouseKey)) {
|
||||
this.func_231175_as__();
|
||||
return true;
|
||||
} else {
|
||||
- this.func_195363_d(p_231046_1_, p_231046_2_);
|
||||
+ } else if (p_231046_1_ != 256 && !this.field_230706_i_.field_71474_y.field_151445_Q.isActiveAndMatches(mouseKey)) {
|
||||
+ boolean handled = false;// Forge MC-146650: Needs to return true when the key is handled.
|
||||
+ if (this.func_195363_d(p_231046_1_, p_231046_2_))
|
||||
+ handled = true;
|
||||
+ boolean handled = this.func_195363_d(p_231046_1_, p_231046_2_);// Forge MC-146650: Needs to return true when the key is handled
|
||||
if (this.field_147006_u != null && this.field_147006_u.func_75216_d()) {
|
||||
- if (this.field_230706_i_.field_71474_y.field_74322_I.func_197976_a(p_231046_1_, p_231046_2_)) {
|
||||
+ if (this.field_230706_i_.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
|
||||
@@ -129,15 +130,13 @@
|
||||
+ handled = true;
|
||||
}
|
||||
+ } else if (this.field_230706_i_.field_71474_y.field_74316_C.isActiveAndMatches(mouseKey)) {
|
||||
+ handled = true; // Forge MC-146650: Emulate MC bug, so we don't drop from hotbar when pressing drop without hovering over a item.
|
||||
+ handled = true; // Forge MC-146650: Emulate MC bug, so we don't drop from hotbar when pressing drop without hovering over a item.
|
||||
}
|
||||
|
||||
- return true;
|
||||
+ return handled;
|
||||
} else {
|
||||
this.field_230706_i_.field_71439_g.func_71053_j();
|
||||
return true;
|
||||
@@ -555,13 +572,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean func_195363_d(int p_195363_1_, int p_195363_2_) {
|
||||
if (this.field_230706_i_.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && this.field_147006_u != null) {
|
||||
@@ -153,11 +152,10 @@
|
||||
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP);
|
||||
return true;
|
||||
}
|
||||
@@ -592,4 +609,16 @@
|
||||
public T func_212873_a_() {
|
||||
@@ -589,6 +604,18 @@
|
||||
return this.field_147002_h;
|
||||
}
|
||||
+
|
||||
|
||||
+ @javax.annotation.Nullable
|
||||
+ public Slot getSlotUnderMouse() { return this.field_147006_u; }
|
||||
+ public int getGuiLeft() { return field_147003_i; }
|
||||
@@ -169,4 +167,7 @@
|
||||
+ public int getSlotColor(int index) {
|
||||
+ return slotColor;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
public void func_231175_as__() {
|
||||
this.field_230706_i_.field_71439_g.func_71053_j();
|
||||
super.func_231175_as__();
|
||||
+12
-12
@@ -9,19 +9,19 @@
|
||||
private boolean field_199506_G;
|
||||
private final Map<ResourceLocation, ITag<Item>> field_214085_w = Maps.newTreeMap();
|
||||
|
||||
@@ -233,6 +235,12 @@
|
||||
|
||||
@@ -234,6 +236,12 @@
|
||||
protected void func_231160_c_() {
|
||||
if (this.field_230706_i_.field_71442_b.func_78758_h()) {
|
||||
super.func_231160_c_();
|
||||
+ int tabCount = ItemGroup.field_78032_a.length;
|
||||
+ if (tabCount > 12) {
|
||||
+ func_230480_a_(new net.minecraft.client.gui.widget.button.Button(field_147003_i, field_147009_r - 50, 20, 20, new StringTextComponent("<"), b -> tabPage = Math.max(tabPage - 1, 0 )));
|
||||
+ func_230480_a_(new net.minecraft.client.gui.widget.button.Button(field_147003_i + field_146999_f - 20, field_147009_r - 50, 20, 20, new StringTextComponent(">"), b -> tabPage = Math.min(tabPage + 1, maxPages)));
|
||||
+ maxPages = (int) Math.ceil((tabCount - 12) / 10D);
|
||||
+ }
|
||||
super.func_231160_c_();
|
||||
this.field_230706_i_.field_195559_v.func_197967_a(true);
|
||||
this.field_147062_A = new TextFieldWidget(this.field_230712_o_, this.field_147003_i + 82, this.field_147009_r + 6, 80, 9, new TranslationTextComponent("itemGroup.search"));
|
||||
this.field_147062_A.func_146203_f(50);
|
||||
@@ -275,7 +283,7 @@
|
||||
public boolean func_231042_a_(char p_231042_1_, int p_231042_2_) {
|
||||
if (this.field_195377_F) {
|
||||
@@ -80,8 +80,8 @@
|
||||
- if (itemgroup.func_78019_g()) {
|
||||
+ if (itemgroup != null && itemgroup.func_78019_g()) {
|
||||
RenderSystem.disableBlend();
|
||||
- this.field_230712_o_.func_238421_b_(p_230451_1_, I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, 4210752);
|
||||
+ this.field_230712_o_.func_238421_b_(p_230451_1_, I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, itemgroup.getLabelColor());
|
||||
- this.field_230712_o_.func_243248_b(p_230451_1_, itemgroup.func_242392_c(), 8.0F, 6.0F, 4210752);
|
||||
+ this.field_230712_o_.func_243248_b(p_230451_1_, itemgroup.func_242392_c(), 8.0F, 6.0F, itemgroup.getLabelColor());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -154,11 +154,11 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ if (!rendered && !func_238809_a_(p_230430_1_, ItemGroup.field_78027_g, p_230430_2_, p_230430_3_))
|
||||
+ func_238809_a_(p_230430_1_, ItemGroup.field_78036_m, p_230430_2_, p_230430_3_);
|
||||
+ if (!rendered && !this.func_238809_a_(p_230430_1_, ItemGroup.field_78027_g, p_230430_2_, p_230430_3_))
|
||||
+ this.func_238809_a_(p_230430_1_, ItemGroup.field_78036_m, p_230430_2_, p_230430_3_);
|
||||
|
||||
if (this.field_147064_C != null && field_147058_w == ItemGroup.field_78036_m.func_78021_a() && this.func_195359_a(this.field_147064_C.field_75223_e, this.field_147064_C.field_75221_f, 16, 16, (double)p_230430_2_, (double)p_230430_3_)) {
|
||||
this.func_238652_a_(p_230430_1_, new TranslationTextComponent("inventory.binSlot"), p_230430_2_, p_230430_3_);
|
||||
this.func_238652_a_(p_230430_1_, field_243345_D, p_230430_2_, p_230430_3_);
|
||||
}
|
||||
|
||||
+ if (maxPages != 0) {
|
||||
@@ -166,7 +166,7 @@
|
||||
+ RenderSystem.disableLighting();
|
||||
+ this.func_230926_e_(300);
|
||||
+ this.field_230707_j_.field_77023_b = 300.0F;
|
||||
+ field_230712_o_.func_238407_a_(p_230430_1_, page, field_147003_i + (field_146999_f / 2) - (field_230712_o_.func_238414_a_(page) / 2), field_147009_r - 44, -1);
|
||||
+ field_230712_o_.func_238407_a_(p_230430_1_, page.func_241878_f(), field_147003_i + (field_146999_f / 2) - (field_230712_o_.func_238414_a_(page) / 2), field_147009_r - 44, -1);
|
||||
+ this.func_230926_e_(0);
|
||||
+ this.field_230707_j_.field_77023_b = 0.0F;
|
||||
+ }
|
||||
@@ -175,13 +175,13 @@
|
||||
this.func_230459_a_(p_230430_1_, p_230430_2_, p_230430_3_);
|
||||
}
|
||||
@@ -612,7 +670,10 @@
|
||||
list1.add(1, (new TranslationTextComponent(itemgroup.func_78024_c())).func_240699_a_(TextFormatting.BLUE));
|
||||
list1.add(1, itemgroup.func_242392_c().func_230532_e_().func_240699_a_(TextFormatting.BLUE));
|
||||
}
|
||||
|
||||
- this.func_238654_b_(p_230457_1_, list1, p_230457_3_, p_230457_4_);
|
||||
- this.func_243308_b(p_230457_1_, list1, p_230457_3_, p_230457_4_);
|
||||
+ net.minecraft.client.gui.FontRenderer font = p_230457_2_.func_77973_b().getFontRenderer(p_230457_2_);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_230457_2_);
|
||||
+ this.func_238654_b_(p_230457_1_, list1, p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ this.renderToolTip(p_230457_1_, Lists.transform(list1, ITextComponent::func_241878_f), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
|
||||
} else {
|
||||
super.func_230457_a_(p_230457_1_, p_230457_2_, p_230457_3_, p_230457_4_);
|
||||
|
||||
@@ -6,17 +6,13 @@
|
||||
this.func_230441_a_(p_230431_1_, minecraft, p_230431_2_, p_230431_3_);
|
||||
- int j = this.field_230693_o_ ? 16777215 : 10526880;
|
||||
+ int j = getFGColor();
|
||||
this.func_238472_a_(p_230431_1_, fontrenderer, this.func_230458_i_(), this.field_230690_l_ + this.field_230688_j_ / 2, this.field_230691_m_ + (this.field_230689_k_ - 8) / 2, j | MathHelper.func_76123_f(this.field_230695_q_ * 255.0F) << 24);
|
||||
func_238472_a_(p_230431_1_, fontrenderer, this.func_230458_i_(), this.field_230690_l_ + this.field_230688_j_ / 2, this.field_230691_m_ + (this.field_230689_k_ - 8) / 2, j | MathHelper.func_76123_f(this.field_230695_q_ * 255.0F) << 24);
|
||||
}
|
||||
|
||||
@@ -206,6 +206,14 @@
|
||||
@@ -206,6 +206,10 @@
|
||||
this.field_230688_j_ = p_230991_1_;
|
||||
}
|
||||
|
||||
+ public int getHeight() {
|
||||
+ return this.field_230689_k_;
|
||||
+ }
|
||||
+
|
||||
+ public void setHeight(int value) {
|
||||
+ this.field_230689_k_ = value;
|
||||
+ }
|
||||
@@ -24,7 +20,7 @@
|
||||
public void func_230986_a_(float p_230986_1_) {
|
||||
this.field_230695_q_ = p_230986_1_;
|
||||
}
|
||||
@@ -233,4 +241,17 @@
|
||||
@@ -233,4 +237,17 @@
|
||||
protected void func_230996_d_(boolean p_230996_1_) {
|
||||
this.field_230686_c_ = p_230996_1_;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
@@ -114,7 +115,7 @@
|
||||
public void func_230432_a_(MatrixStack p_230432_1_, int p_230432_2_, int p_230432_3_, int p_230432_4_, int p_230432_5_, int p_230432_6_, int p_230432_7_, int p_230432_8_, boolean p_230432_9_, float p_230432_10_) {
|
||||
boolean flag = KeyBindingList.this.field_148191_k.field_146491_f == this.field_148282_b;
|
||||
KeyBindingList.this.field_230668_b_.field_71466_p.func_238422_b_(p_230432_1_, this.field_148283_c, (float)(p_230432_4_ + 90 - KeyBindingList.this.field_148188_n), (float)(p_230432_3_ + p_230432_6_ / 2 - 9 / 2), 16777215);
|
||||
KeyBindingList.this.field_230668_b_.field_71466_p.func_243248_b(p_230432_1_, this.field_148283_c, (float)(p_230432_4_ + 90 - KeyBindingList.this.field_148188_n), (float)(p_230432_3_ + p_230432_6_ / 2 - 9 / 2), 16777215);
|
||||
- this.field_148281_e.field_230690_l_ = p_230432_4_ + 190;
|
||||
+ this.field_148281_e.field_230690_l_ = p_230432_4_ + 190 + 20;
|
||||
this.field_148281_e.field_230691_m_ = p_230432_3_;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/PlayerController.java
|
||||
+++ b/net/minecraft/client/multiplayer/PlayerController.java
|
||||
@@ -94,6 +94,7 @@
|
||||
@@ -93,6 +93,7 @@
|
||||
}
|
||||
|
||||
public boolean func_187103_a(BlockPos p_187103_1_) {
|
||||
@@ -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 {
|
||||
@@ -105,12 +106,11 @@
|
||||
@@ -104,12 +105,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;
|
||||
@@ -23,7 +23,7 @@
|
||||
if (flag) {
|
||||
block.func_176206_d(world, p_187103_1_, blockstate);
|
||||
}
|
||||
@@ -131,21 +131,25 @@
|
||||
@@ -130,21 +130,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_);
|
||||
@@ -50,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 {
|
||||
@@ -185,22 +189,24 @@
|
||||
@@ -184,22 +188,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_);
|
||||
@@ -77,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_);
|
||||
@@ -219,7 +225,8 @@
|
||||
@@ -218,7 +224,8 @@
|
||||
}
|
||||
|
||||
public float func_78757_d() {
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
|
||||
public void func_78765_e() {
|
||||
@@ -236,7 +243,7 @@
|
||||
@@ -235,7 +242,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()) {
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
return p_178893_1_.equals(this.field_178895_c) && flag;
|
||||
@@ -258,13 +265,27 @@
|
||||
@@ -257,13 +264,27 @@
|
||||
return ActionResultType.FAIL;
|
||||
} else {
|
||||
ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_);
|
||||
@@ -126,7 +126,7 @@
|
||||
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_));
|
||||
@@ -273,8 +294,8 @@
|
||||
@@ -272,8 +293,8 @@
|
||||
}
|
||||
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
@@ -136,7 +136,7 @@
|
||||
ActionResultType actionresulttype1;
|
||||
if (this.field_78779_k.func_77145_d()) {
|
||||
int i = itemstack.func_190916_E();
|
||||
@@ -302,11 +323,14 @@
|
||||
@@ -301,11 +322,14 @@
|
||||
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
|
||||
return ActionResultType.PASS;
|
||||
} else {
|
||||
@@ -151,7 +151,7 @@
|
||||
}
|
||||
|
||||
return actionresult.func_188397_a();
|
||||
@@ -335,6 +359,9 @@
|
||||
@@ -334,6 +358,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_, p_187097_1_.func_225608_bj_()));
|
||||
@@ -161,7 +161,7 @@
|
||||
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
|
||||
}
|
||||
|
||||
@@ -342,6 +369,9 @@
|
||||
@@ -341,6 +368,9 @@
|
||||
this.func_78750_j();
|
||||
Vector3d vector3d = 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_, vector3d, p_187102_1_.func_225608_bj_()));
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/network/login/ClientLoginNetHandler.java
|
||||
+++ b/net/minecraft/client/network/login/ClientLoginNetHandler.java
|
||||
@@ -98,6 +98,7 @@
|
||||
@@ -99,6 +99,7 @@
|
||||
this.field_209525_d.accept(new TranslationTextComponent("connect.joining"));
|
||||
this.field_175091_e = p_147390_1_.func_179730_a();
|
||||
this.field_147393_d.func_150723_a(ProtocolType.PLAY);
|
||||
@@ -8,7 +8,7 @@
|
||||
this.field_147393_d.func_150719_a(new ClientPlayNetHandler(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e));
|
||||
}
|
||||
|
||||
@@ -126,6 +127,7 @@
|
||||
@@ -127,6 +128,7 @@
|
||||
}
|
||||
|
||||
public void func_209521_a(SCustomPayloadLoginPacket p_209521_1_) {
|
||||
|
||||
+25
-19
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
|
||||
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
|
||||
@@ -388,6 +388,7 @@
|
||||
@@ -384,6 +384,7 @@
|
||||
|
||||
this.field_147299_f.field_184132_p.func_217737_a();
|
||||
this.field_147299_f.field_71439_g.func_70065_x();
|
||||
@@ -8,7 +8,7 @@
|
||||
int i = p_147282_1_.func_149197_c();
|
||||
this.field_147300_g.func_217408_a(i, this.field_147299_f.field_71439_g);
|
||||
this.field_147299_f.field_71439_g.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
|
||||
@@ -399,6 +400,7 @@
|
||||
@@ -395,6 +396,7 @@
|
||||
this.field_147299_f.field_71439_g.func_228355_a_(p_147282_1_.func_229743_k_());
|
||||
this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e());
|
||||
this.field_147299_f.field_71442_b.func_241675_a_(p_147282_1_.func_241786_f_());
|
||||
@@ -16,7 +16,7 @@
|
||||
this.field_147299_f.field_71474_y.func_82879_c();
|
||||
this.field_147302_e.func_179290_a(new CCustomPayloadPacket(CCustomPayloadPacket.field_210344_a, (new PacketBuffer(Unpooled.buffer())).func_180714_a(ClientBrandRetriever.getClientModName())));
|
||||
this.field_147299_f.func_213229_ar().func_216814_a();
|
||||
@@ -745,7 +747,7 @@
|
||||
@@ -734,7 +736,7 @@
|
||||
BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z"));
|
||||
TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos);
|
||||
if (tileentity != null) {
|
||||
@@ -25,18 +25,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -844,7 +846,9 @@
|
||||
@@ -815,7 +817,9 @@
|
||||
|
||||
public void func_147251_a(SChatPacket p_147251_1_) {
|
||||
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
|
||||
- this.field_147299_f.field_71456_v.func_238450_a_(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c(), p_147251_1_.func_240810_e_());
|
||||
+ net.minecraft.util.text.ITextComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c());
|
||||
+ net.minecraft.util.text.ITextComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c(), p_147251_1_.func_240810_e_());
|
||||
+ if (message == null) return;
|
||||
+ this.field_147299_f.field_71456_v.func_238450_a_(p_147251_1_.func_192590_c(), message, p_147251_1_.func_240810_e_());
|
||||
}
|
||||
|
||||
public void func_147279_a(SAnimateHandPacket p_147279_1_) {
|
||||
@@ -1034,8 +1038,10 @@
|
||||
@@ -1004,8 +1008,10 @@
|
||||
clientplayerentity1.func_233645_dx_().func_233784_a_(clientplayerentity.func_233645_dx_());
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
this.field_147300_g.func_217408_a(i, clientplayerentity1);
|
||||
clientplayerentity1.field_70177_z = -180.0F;
|
||||
clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
|
||||
@@ -1161,6 +1167,12 @@
|
||||
@@ -1131,6 +1137,12 @@
|
||||
|
||||
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
|
||||
((CommandBlockScreen)this.field_147299_f.field_71462_r).func_184075_a();
|
||||
@@ -60,15 +60,15 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1329,6 +1341,7 @@
|
||||
clientrecipebook.func_199644_c();
|
||||
@@ -1299,6 +1311,7 @@
|
||||
clientrecipebook.func_243196_a(this.field_199528_o.func_199510_b());
|
||||
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
|
||||
imutablesearchtree.func_194040_a();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(this.field_199528_o);
|
||||
}
|
||||
|
||||
public void func_200232_a(SPlayerLookPacket p_200232_1_) {
|
||||
@@ -1409,7 +1422,7 @@
|
||||
@@ -1376,7 +1389,7 @@
|
||||
PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f);
|
||||
Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d());
|
||||
if (entity instanceof LivingEntity) {
|
||||
@@ -77,15 +77,21 @@
|
||||
if (effect != null) {
|
||||
EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h());
|
||||
effectinstance.func_100012_b(p_147260_1_.func_149429_c());
|
||||
@@ -1426,6 +1439,7 @@
|
||||
}
|
||||
|
||||
this.field_147299_f.func_213253_a(SearchTreeManager.field_215360_b).func_194040_a();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(this.field_199725_m));
|
||||
}
|
||||
|
||||
public void func_175098_a(SCombatPacket p_175098_1_) {
|
||||
@@ -1909,10 +1923,12 @@
|
||||
@@ -1388,11 +1401,12 @@
|
||||
public void func_199723_a(STagsListPacket p_199723_1_) {
|
||||
PacketThreadUtil.func_218797_a(p_199723_1_, this, this.field_147299_f);
|
||||
ITagCollectionSupplier itagcollectionsupplier = p_199723_1_.func_199858_a();
|
||||
- Multimap<ResourceLocation, ResourceLocation> multimap = TagRegistryManager.func_242198_b(itagcollectionsupplier);
|
||||
+ Multimap<ResourceLocation, ResourceLocation> multimap = TagRegistryManager.validateVanillaTags(itagcollectionsupplier);
|
||||
if (!multimap.isEmpty()) {
|
||||
field_147301_d.warn("Incomplete server tags, disconnecting. Missing: {}", (Object)multimap);
|
||||
this.field_147302_e.func_150718_a(new TranslationTextComponent("multiplayer.disconnect.missing_tags"));
|
||||
} else {
|
||||
+ net.minecraftforge.common.ForgeTagHandler.resetCachedTagCollections();
|
||||
this.field_199725_m = itagcollectionsupplier;
|
||||
if (!this.field_147302_e.func_150731_c()) {
|
||||
itagcollectionsupplier.func_242212_e();
|
||||
@@ -1883,10 +1897,12 @@
|
||||
int l5 = packetbuffer.readInt();
|
||||
this.field_147299_f.field_184132_p.field_229018_q_.func_229022_a_(blockpos8, l3, s10, l5);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/client/particle/Particle.java
|
||||
+++ b/net/minecraft/client/particle/Particle.java
|
||||
@@ -208,4 +208,12 @@
|
||||
public void func_187108_a(AxisAlignedBB p_187108_1_) {
|
||||
this.field_187120_G = p_187108_1_;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Forge added method that controls if a particle should be culled to it's bounding box.
|
||||
+ * Default behaviour is culling enabled
|
||||
+ */
|
||||
+ public boolean shouldCull() {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
@@ -34,15 +34,26 @@
|
||||
return iparticlefactory == null ? null : iparticlefactory.func_199234_a(p_199927_1_, this.field_78878_a, p_199927_2_, p_199927_4_, p_199927_6_, p_199927_8_, p_199927_10_, p_199927_12_);
|
||||
}
|
||||
|
||||
@@ -315,14 +315,18 @@
|
||||
@@ -313,16 +313,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ /**@deprecated Forge: use {@link #renderParticles(MatrixStack, IRenderTypeBuffer.Impl, LightTexture, ActiveRenderInfo, float, net.minecraft.client.renderer.culling.ClippingHelper)} with ClippingHelper as additional parameter*/
|
||||
+ @Deprecated
|
||||
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_) {
|
||||
+ renderParticles(p_228345_1_, p_228345_2_, p_228345_3_, p_228345_4_, p_228345_5_, null);
|
||||
+ }
|
||||
+
|
||||
+ public void renderParticles(MatrixStack p_228345_1_, IRenderTypeBuffer.Impl p_228345_2_, LightTexture p_228345_3_, ActiveRenderInfo p_228345_4_, float p_228345_5_, @Nullable net.minecraft.client.renderer.culling.ClippingHelper clippingHelper) {
|
||||
p_228345_3_.func_205109_c();
|
||||
+ Runnable enable = () -> {
|
||||
RenderSystem.enableAlphaTest();
|
||||
RenderSystem.defaultAlphaFunc();
|
||||
RenderSystem.enableDepthTest();
|
||||
RenderSystem.enableFog();
|
||||
+ RenderSystem.activeTexture(org.lwjgl.opengl.GL13.GL_TEXTURE2);
|
||||
+ RenderSystem.enableTexture();
|
||||
+ RenderSystem.activeTexture(org.lwjgl.opengl.GL13.GL_TEXTURE0);
|
||||
+ };
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.multMatrix(p_228345_1_.func_227866_c_().func_227870_a_());
|
||||
@@ -54,7 +65,15 @@
|
||||
Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype);
|
||||
if (iterable != null) {
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -362,7 +366,7 @@
|
||||
@@ -331,6 +344,7 @@
|
||||
iparticlerendertype.func_217600_a(bufferbuilder, this.field_78877_c);
|
||||
|
||||
for(Particle particle : iterable) {
|
||||
+ if (clippingHelper != null && particle.shouldCull() && !clippingHelper.func_228957_a_(particle.func_187116_l())) continue;
|
||||
try {
|
||||
particle.func_225606_a_(bufferbuilder, p_228345_4_, p_228345_5_);
|
||||
} catch (Throwable throwable) {
|
||||
@@ -362,7 +376,7 @@
|
||||
}
|
||||
|
||||
public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) {
|
||||
@@ -63,7 +82,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_) -> {
|
||||
@@ -434,6 +438,12 @@
|
||||
@@ -434,6 +448,12 @@
|
||||
return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum());
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
- int i = WorldRenderer.func_228420_a_(p_228806_1_, p_228806_3_, p_228806_4_.func_177972_a(direction));
|
||||
- this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, i, p_228806_11_, false, p_228806_5_, p_228806_6_, list, bitset);
|
||||
+ randomIn.setSeed(rand);
|
||||
+ List<BakedQuad> list = modelIn.func_200117_a(stateIn, direction, randomIn);
|
||||
+ List<BakedQuad> list = modelIn.getQuads(stateIn, direction, randomIn, modelData);
|
||||
+ if (!list.isEmpty() && (!checkSides || Block.func_176225_a(stateIn, worldIn, posIn, direction))) {
|
||||
+ int i = WorldRenderer.func_228420_a_(worldIn, stateIn, posIn.func_177972_a(direction));
|
||||
+ this.func_228798_a_(worldIn, stateIn, posIn, i, combinedOverlayIn, false, matrixStackIn, buffer, list, bitset);
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/BufferBuilder.java
|
||||
+++ b/net/minecraft/client/renderer/BufferBuilder.java
|
||||
@@ -121,7 +121,6 @@
|
||||
|
||||
bitset.set(l);
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) {
|
||||
@@ -297,6 +296,7 @@
|
||||
@@ -297,6 +297,7 @@
|
||||
}
|
||||
|
||||
ByteBuffer bytebuffer = this.field_179001_a.slice();
|
||||
@@ -16,7 +8,7 @@
|
||||
((Buffer)this.field_179001_a).clear();
|
||||
return Pair.of(bufferbuilder$drawstate, bytebuffer);
|
||||
}
|
||||
@@ -364,4 +364,15 @@
|
||||
@@ -364,4 +365,15 @@
|
||||
this.field_179018_e = p_i225907_2_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,10 +81,3 @@
|
||||
}
|
||||
|
||||
if (this.field_187469_f < 0.1F) {
|
||||
@@ -430,6 +440,5 @@
|
||||
} else {
|
||||
this.field_187471_h = 0.0F;
|
||||
}
|
||||
-
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/FogRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/FogRenderer.java
|
||||
@@ -158,17 +158,28 @@
|
||||
@@ -156,17 +156,28 @@
|
||||
}
|
||||
|
||||
float f9 = Math.min(1.0F / field_205093_c, Math.min(1.0F / field_205094_d, 1.0F / field_205095_e));
|
||||
@@ -29,33 +29,30 @@
|
||||
RenderSystem.clearColor(field_205093_c, field_205094_d, field_205095_e, 0.0F);
|
||||
}
|
||||
|
||||
@@ -177,10 +188,18 @@
|
||||
@@ -174,10 +185,17 @@
|
||||
RenderSystem.fogDensity(0.0F);
|
||||
RenderSystem.fogMode(GlStateManager.FogMode.EXP2);
|
||||
}
|
||||
|
||||
- public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) {
|
||||
+ @Deprecated // FORGE: Pass in partialTicks
|
||||
+ public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) {
|
||||
+ setupFog(p_228372_0_, p_228372_1_, p_228372_2_, p_228372_3_, 0);
|
||||
+ }
|
||||
-
|
||||
+ @Deprecated // FORGE: Pass in partialTicks
|
||||
public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) {
|
||||
+ setupFog(p_228372_0_, p_228372_1_, p_228372_2_, p_228372_3_, 0);
|
||||
+ }
|
||||
+
|
||||
+ public static void setupFog(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_, float partialTicks) {
|
||||
+ public static void setupFog(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_, float partialTicks) {
|
||||
FluidState fluidstate = p_228372_0_.func_216771_k();
|
||||
Entity entity = p_228372_0_.func_216773_g();
|
||||
boolean flag = fluidstate.func_206886_c() != Fluids.field_204541_a;
|
||||
+ float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(p_228372_1_, p_228372_0_, partialTicks, 0.1F);
|
||||
+ if (hook >= 0) RenderSystem.fogDensity(hook);
|
||||
+ else
|
||||
if (fluidstate.func_206884_a(FluidTags.field_206959_a)) {
|
||||
float f = 1.0F;
|
||||
f = 0.05F;
|
||||
@@ -231,8 +250,8 @@
|
||||
@@ -228,6 +246,7 @@
|
||||
RenderSystem.fogEnd(f3);
|
||||
RenderSystem.fogMode(GlStateManager.FogMode.LINEAR);
|
||||
RenderSystem.setupNvFogDistance();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(p_228372_1_, p_228372_0_, partialTicks, f3);
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
public static void func_228373_b_() {
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/GameRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/GameRenderer.java
|
||||
@@ -132,6 +132,8 @@
|
||||
@@ -135,6 +135,8 @@
|
||||
this.func_175069_a(new ResourceLocation("shaders/post/spider.json"));
|
||||
} else if (p_175066_1_ instanceof EndermanEntity) {
|
||||
this.func_175069_a(new ResourceLocation("shaders/post/invert.json"));
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -307,7 +309,7 @@
|
||||
@@ -310,7 +312,7 @@
|
||||
d0 = d0 * 60.0D / 70.0D;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,7 +478,7 @@
|
||||
@@ -486,7 +488,7 @@
|
||||
}
|
||||
} else if (this.field_78531_r.field_71462_r != null) {
|
||||
try {
|
||||
@@ -27,10 +27,10 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
|
||||
@@ -589,9 +591,16 @@
|
||||
@@ -595,9 +597,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_);
|
||||
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.func_243230_g().func_243192_a(), this.field_78531_r.field_71474_y.func_243230_g().func_243193_b(), p_228378_1_);
|
||||
+
|
||||
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup cameraSetup = net.minecraftforge.client.ForgeHooksClient.onCameraSetup(this, activerenderinfo, p_228378_1_);
|
||||
+ activerenderinfo.setAnglesInternal(cameraSetup.getYaw(), cameraSetup.getPitch());
|
||||
@@ -44,7 +44,7 @@
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("hand");
|
||||
if (this.field_175074_C) {
|
||||
RenderSystem.clear(256, Minecraft.field_142025_a);
|
||||
@@ -671,4 +680,9 @@
|
||||
@@ -709,4 +718,9 @@
|
||||
public OverlayTexture func_228385_m_() {
|
||||
return this.field_228375_t_;
|
||||
}
|
||||
|
||||
@@ -18,16 +18,28 @@
|
||||
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 || flag)) {
|
||||
boolean flag1;
|
||||
@@ -132,7 +132,7 @@
|
||||
@@ -105,7 +105,8 @@
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
-
|
||||
+ if (p_229111_8_.isLayered()) { net.minecraftforge.client.ForgeHooksClient.drawItemLayered(this, p_229111_8_, p_229111_1_, p_229111_4_, p_229111_5_, p_229111_6_, p_229111_7_, flag1); }
|
||||
+ else {
|
||||
RenderType rendertype = RenderTypeLookup.func_239219_a_(p_229111_1_, flag1);
|
||||
IVertexBuilder ivertexbuilder;
|
||||
if (p_229111_1_.func_77973_b() == Items.field_151111_aL && p_229111_1_.func_77962_s()) {
|
||||
@@ -131,8 +132,9 @@
|
||||
}
|
||||
|
||||
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_239207_a_(p_229111_1_, p_229111_2_, p_229111_4_, p_229111_5_, p_229111_6_, p_229111_7_);
|
||||
+ p_229111_1_.func_77973_b().getItemStackTileEntityRenderer().func_239207_a_(p_229111_1_, p_229111_2_, p_229111_4_, p_229111_5_, p_229111_6_, p_229111_7_);
|
||||
}
|
||||
|
||||
p_229111_4_.func_227865_b_();
|
||||
@@ -172,7 +172,7 @@
|
||||
@@ -176,7 +178,7 @@
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
@@ -36,7 +48,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -263,6 +263,7 @@
|
||||
@@ -267,6 +269,7 @@
|
||||
crashreportcategory.func_189529_a("Item Type", () -> {
|
||||
return String.valueOf((Object)p_239387_2_.func_77973_b());
|
||||
});
|
||||
@@ -44,7 +56,7 @@
|
||||
crashreportcategory.func_189529_a("Item Damage", () -> {
|
||||
return String.valueOf(p_239387_2_.func_77952_i());
|
||||
});
|
||||
@@ -294,18 +295,16 @@
|
||||
@@ -298,18 +301,16 @@
|
||||
irendertypebuffer$impl.func_228461_a_();
|
||||
}
|
||||
|
||||
@@ -67,7 +79,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();
|
||||
@@ -343,4 +342,9 @@
|
||||
@@ -347,4 +348,9 @@
|
||||
public void func_195410_a(IResourceManager p_195410_1_) {
|
||||
this.field_175059_m.func_178085_b();
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/client/renderer/RenderState.java
|
||||
+++ b/net/minecraft/client/renderer/RenderState.java
|
||||
@@ -255,7 +255,7 @@
|
||||
private final float field_228574_Q_;
|
||||
|
||||
public AlphaState(float p_i225974_1_) {
|
||||
- super("alpha", () -> {
|
||||
+ super("alpha", () -> { // FORGE: fix MC-167447
|
||||
if (p_i225974_1_ > 0.0F) {
|
||||
RenderSystem.enableAlphaTest();
|
||||
RenderSystem.alphaFunc(516, p_i225974_1_);
|
||||
@@ -32,7 +32,17 @@
|
||||
public static RenderType func_239221_b_(BlockState p_239221_0_) {
|
||||
Block block = p_239221_0_.func_177230_c();
|
||||
if (block instanceof LeavesBlock) {
|
||||
@@ -317,11 +321,60 @@
|
||||
@@ -295,8 +299,7 @@
|
||||
}
|
||||
|
||||
public static RenderType func_239220_a_(BlockState p_239220_0_, boolean p_239220_1_) {
|
||||
- RenderType rendertype = func_228390_a_(p_239220_0_);
|
||||
- if (rendertype == RenderType.func_228645_f_()) {
|
||||
+ if (canRenderInLayer(p_239220_0_, RenderType.func_228645_f_())) {
|
||||
if (!Minecraft.func_238218_y_()) {
|
||||
return Atlases.func_228785_j_();
|
||||
} else {
|
||||
@@ -317,11 +320,60 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/client/renderer/ViewFrustum.java
|
||||
+++ b/net/minecraft/client/renderer/ViewFrustum.java
|
||||
@@ -8,6 +8,8 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
+import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.ChunkRender;
|
||||
+
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ViewFrustum {
|
||||
protected final WorldRenderer field_178169_a;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/WorldRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/WorldRenderer.java
|
||||
@@ -812,7 +812,7 @@
|
||||
@@ -830,7 +830,7 @@
|
||||
this.field_147595_R = true;
|
||||
BlockPos blockpos2 = chunkrenderdispatcher$chunkrender4.func_178568_j().func_177982_a(8, 8, 8);
|
||||
boolean flag1 = blockpos2.func_177951_i(blockpos) < 768.0D;
|
||||
@@ -9,7 +9,7 @@
|
||||
this.field_175009_l.add(chunkrenderdispatcher$chunkrender4);
|
||||
} else {
|
||||
this.field_72777_q.func_213239_aq().func_76320_a("build near");
|
||||
@@ -897,13 +897,13 @@
|
||||
@@ -915,13 +915,13 @@
|
||||
float f = p_228426_7_.func_205001_m();
|
||||
boolean flag1 = this.field_72777_q.field_71441_e.func_239132_a_().func_230493_a_(MathHelper.func_76128_c(d0), MathHelper.func_76128_c(d1)) || this.field_72777_q.field_71456_v.func_184046_j().func_184056_f();
|
||||
if (this.field_72777_q.field_71474_y.field_151451_c >= 4) {
|
||||
@@ -25,7 +25,7 @@
|
||||
iprofiler.func_219895_b("terrain_setup");
|
||||
this.func_228437_a_(p_228426_6_, clippinghelper, flag, this.field_228409_ai_++, this.field_72777_q.field_71439_g.func_175149_v());
|
||||
iprofiler.func_219895_b("updatechunks");
|
||||
@@ -924,7 +924,9 @@
|
||||
@@ -942,7 +942,9 @@
|
||||
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);
|
||||
@@ -35,7 +35,7 @@
|
||||
this.func_228441_a_(RenderType.func_228643_e_(), p_228426_1_, d0, d1, d2);
|
||||
if (this.field_72769_h.func_239132_a_().func_239217_c_()) {
|
||||
RenderHelper.func_237533_a_(p_228426_1_.func_227866_c_().func_227870_a_());
|
||||
@@ -994,6 +996,7 @@
|
||||
@@ -1010,6 +1012,7 @@
|
||||
List<TileEntity> list = worldrenderer$localrenderinformationcontainer.field_178036_a.func_178571_g().func_178485_b();
|
||||
if (!list.isEmpty()) {
|
||||
for(TileEntity tileentity1 : list) {
|
||||
@@ -43,7 +43,7 @@
|
||||
BlockPos blockpos3 = tileentity1.func_174877_v();
|
||||
IRenderTypeBuffer irendertypebuffer1 = irendertypebuffer$impl;
|
||||
p_228426_1_.func_227860_a_();
|
||||
@@ -1019,6 +1022,7 @@
|
||||
@@ -1035,6 +1038,7 @@
|
||||
|
||||
synchronized(this.field_181024_n) {
|
||||
for(TileEntity tileentity : this.field_181024_n) {
|
||||
@@ -51,17 +51,40 @@
|
||||
BlockPos blockpos2 = tileentity.func_174877_v();
|
||||
p_228426_1_.func_227860_a_();
|
||||
p_228426_1_.func_227861_a_((double)blockpos2.func_177958_n() - d0, (double)blockpos2.func_177956_o() - d1, (double)blockpos2.func_177952_p() - d2);
|
||||
@@ -1069,7 +1073,8 @@
|
||||
@@ -1084,10 +1088,13 @@
|
||||
iprofiler.func_219895_b("outline");
|
||||
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, p_228426_2_, p_228426_1_, irendertypebuffer$impl))
|
||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(this, p_228426_6_, raytraceresult, 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);
|
||||
}
|
||||
@@ -2056,7 +2061,12 @@
|
||||
+ } else if (raytraceresult != null && raytraceresult.func_216346_c() == RayTraceResult.Type.ENTITY) {
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(this, p_228426_6_, raytraceresult, p_228426_2_, p_228426_1_, irendertypebuffer$impl);
|
||||
}
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
@@ -1119,7 +1126,7 @@
|
||||
this.field_239224_H_.func_237506_a_(this.field_72777_q.func_147110_a());
|
||||
RenderState.field_239237_T_.func_228547_a_();
|
||||
iprofiler.func_219895_b("particles");
|
||||
- this.field_72777_q.field_71452_i.func_228345_a_(p_228426_1_, irendertypebuffer$impl, p_228426_8_, p_228426_6_, p_228426_2_);
|
||||
+ this.field_72777_q.field_71452_i.renderParticles(p_228426_1_, irendertypebuffer$impl, p_228426_8_, p_228426_6_, p_228426_2_, clippinghelper);
|
||||
RenderState.field_239237_T_.func_228549_b_();
|
||||
} else {
|
||||
iprofiler.func_219895_b("translucent");
|
||||
@@ -1129,7 +1136,7 @@
|
||||
iprofiler.func_219895_b("string");
|
||||
this.func_228441_a_(RenderType.func_241715_r_(), p_228426_1_, d0, d1, d2);
|
||||
iprofiler.func_219895_b("particles");
|
||||
- this.field_72777_q.field_71452_i.func_228345_a_(p_228426_1_, irendertypebuffer$impl, p_228426_8_, p_228426_6_, p_228426_2_);
|
||||
+ this.field_72777_q.field_71452_i.renderParticles(p_228426_1_, irendertypebuffer$impl, p_228426_8_, p_228426_6_, p_228426_2_, clippinghelper);
|
||||
}
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
@@ -2076,7 +2083,12 @@
|
||||
this.field_175008_n.func_217628_a(p_215319_1_, p_215319_2_, p_215319_3_, p_215319_4_);
|
||||
}
|
||||
|
||||
@@ -74,7 +97,7 @@
|
||||
ISound isound = this.field_147593_P.get(p_184377_2_);
|
||||
if (isound != null) {
|
||||
this.field_72777_q.func_147118_V().func_147683_b(isound);
|
||||
@@ -2064,7 +2074,7 @@
|
||||
@@ -2084,7 +2096,7 @@
|
||||
}
|
||||
|
||||
if (p_184377_1_ != null) {
|
||||
@@ -83,7 +106,7 @@
|
||||
if (musicdiscitem != null) {
|
||||
this.field_72777_q.field_71456_v.func_238451_a_(musicdiscitem.func_234801_g_());
|
||||
}
|
||||
@@ -2212,7 +2222,7 @@
|
||||
@@ -2232,7 +2244,7 @@
|
||||
break;
|
||||
case 1010:
|
||||
if (Item.func_150899_d(p_180439_4_) instanceof MusicDiscItem) {
|
||||
@@ -92,7 +115,7 @@
|
||||
} else {
|
||||
this.func_184377_a((SoundEvent)null, p_180439_3_);
|
||||
}
|
||||
@@ -2362,8 +2372,8 @@
|
||||
@@ -2382,8 +2394,8 @@
|
||||
break;
|
||||
case 2001:
|
||||
BlockState blockstate = Block.func_196257_b(p_180439_4_);
|
||||
@@ -103,7 +126,7 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -2511,7 +2521,7 @@
|
||||
@@ -2531,7 +2543,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_);
|
||||
@@ -112,7 +135,7 @@
|
||||
if (j < k) {
|
||||
j = k;
|
||||
}
|
||||
@@ -2550,6 +2560,11 @@
|
||||
@@ -2570,6 +2582,11 @@
|
||||
return this.field_239226_J_;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
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_(), 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_(), this, 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_(), this, p_225623_4_, p_225623_5_, p_225623_6_, p_225623_3_);
|
||||
+ 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_);
|
||||
|
||||
+2
-8
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/EntityRendererManager.java
|
||||
+++ b/net/minecraft/client/renderer/entity/EntityRendererManager.java
|
||||
@@ -187,13 +187,15 @@
|
||||
@@ -188,7 +188,10 @@
|
||||
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));
|
||||
@@ -11,13 +11,7 @@
|
||||
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_) {
|
||||
@@ -449,4 +451,8 @@
|
||||
@@ -450,4 +453,8 @@
|
||||
public FontRenderer func_78716_a() {
|
||||
return this.field_78736_p;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/ElytraLayer.java
|
||||
@@ -30,7 +30,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_;
|
||||
@@ -39,10 +39,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_();
|
||||
@@ -54,4 +54,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,6 @@
|
||||
--- a/net/minecraft/client/renderer/model/ModelBakery.java
|
||||
+++ b/net/minecraft/client/renderer/model/ModelBakery.java
|
||||
@@ -146,8 +146,16 @@
|
||||
@@ -146,8 +146,17 @@
|
||||
});
|
||||
|
||||
public ModelBakery(IResourceManager p_i226056_1_, BlockColors p_i226056_2_, IProfiler p_i226056_3_, int p_i226056_4_) {
|
||||
@@ -14,10 +14,11 @@
|
||||
+ }
|
||||
+
|
||||
+ protected void processLoading(IProfiler p_i226056_3_, int p_i226056_4_) {
|
||||
+ net.minecraftforge.client.model.ModelLoaderRegistry.onModelLoadingStart();
|
||||
p_i226056_3_.func_76320_a("missing_model");
|
||||
|
||||
try {
|
||||
@@ -180,12 +188,16 @@
|
||||
@@ -180,12 +189,16 @@
|
||||
|
||||
p_i226056_3_.func_219895_b("special");
|
||||
this.func_217843_a(new ModelResourceLocation("minecraft:trident_in_hand#inventory"));
|
||||
@@ -34,7 +35,7 @@
|
||||
set.stream().filter((p_229346_0_) -> {
|
||||
return !p_229346_0_.getSecond().equals(field_229321_r_);
|
||||
}).forEach((p_229330_0_) -> {
|
||||
@@ -224,6 +236,7 @@
|
||||
@@ -224,6 +237,7 @@
|
||||
try {
|
||||
ibakedmodel = this.func_217845_a(p_229350_1_, ModelRotation.X0_Y0);
|
||||
} catch (Exception exception) {
|
||||
@@ -42,7 +43,7 @@
|
||||
field_177603_c.warn("Unable to bake model: '{}': {}", p_229350_1_, exception);
|
||||
}
|
||||
|
||||
@@ -442,6 +455,13 @@
|
||||
@@ -442,6 +456,13 @@
|
||||
this.field_217848_D.addAll(p_209593_2_.func_187965_e());
|
||||
}
|
||||
|
||||
@@ -56,7 +57,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);
|
||||
@@ -456,7 +476,13 @@
|
||||
@@ -456,7 +477,13 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -70,7 +71,7 @@
|
||||
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);
|
||||
@@ -467,11 +493,11 @@
|
||||
@@ -467,11 +494,11 @@
|
||||
if (iunbakedmodel instanceof BlockModel) {
|
||||
BlockModel blockmodel = (BlockModel)iunbakedmodel;
|
||||
if (blockmodel.func_178310_f() == field_177606_o) {
|
||||
@@ -84,7 +85,7 @@
|
||||
this.field_217850_G.put(triple, ibakedmodel);
|
||||
return ibakedmodel;
|
||||
}
|
||||
@@ -524,6 +550,10 @@
|
||||
@@ -524,6 +551,10 @@
|
||||
return this.field_225367_M;
|
||||
}
|
||||
|
||||
@@ -95,7 +96,7 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static class BlockStateDefinitionException extends RuntimeException {
|
||||
public BlockStateDefinitionException(String p_i49526_1_) {
|
||||
@@ -531,6 +561,10 @@
|
||||
@@ -531,6 +562,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
--- a/net/minecraft/client/renderer/model/MultipartBakedModel.java
|
||||
+++ b/net/minecraft/client/renderer/model/MultipartBakedModel.java
|
||||
@@ -18,7 +18,7 @@
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public class MultipartBakedModel implements IBakedModel {
|
||||
+public class MultipartBakedModel implements net.minecraftforge.client.model.data.IDynamicBakedModel {
|
||||
private final List<Pair<Predicate<BlockState>, IBakedModel>> field_188626_f;
|
||||
protected final boolean field_188621_a;
|
||||
protected final boolean field_188622_b;
|
||||
@@ -27,10 +27,12 @@
|
||||
protected final ItemCameraTransforms field_188624_d;
|
||||
protected final ItemOverrideList field_188625_e;
|
||||
private final Map<BlockState, BitSet> field_210277_g = new Object2ObjectOpenCustomHashMap<>(Util.func_212443_g());
|
||||
+ private final IBakedModel defaultModel;
|
||||
|
||||
public MultipartBakedModel(List<Pair<Predicate<BlockState>, IBakedModel>> p_i48273_1_) {
|
||||
this.field_188626_f = p_i48273_1_;
|
||||
IBakedModel ibakedmodel = p_i48273_1_.iterator().next().getRight();
|
||||
+ this.defaultModel = ibakedmodel;
|
||||
this.field_188621_a = ibakedmodel.func_177555_b();
|
||||
this.field_188622_b = ibakedmodel.func_177556_c();
|
||||
this.field_230185_c_ = ibakedmodel.func_230044_c_();
|
||||
@@ -39,7 +41,8 @@
|
||||
this.field_188625_e = ibakedmodel.func_188617_f();
|
||||
}
|
||||
|
||||
- public List<BakedQuad> func_200117_a(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_) {
|
||||
+ // FORGE: Implement our overloads (here and below) so child models can have custom logic
|
||||
+ public List<BakedQuad> getQuads(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_, net.minecraftforge.client.model.data.IModelData modelData) {
|
||||
if (p_200117_1_ == null) {
|
||||
return Collections.emptyList();
|
||||
} else {
|
||||
@@ -62,7 +65,7 @@
|
||||
|
||||
for(int j = 0; j < bitset.length(); ++j) {
|
||||
if (bitset.get(j)) {
|
||||
- list.addAll(this.field_188626_f.get(j).getRight().func_200117_a(p_200117_1_, p_200117_2_, new Random(k)));
|
||||
+ list.addAll(this.field_188626_f.get(j).getRight().getQuads(p_200117_1_, p_200117_2_, new Random(k), modelData));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +77,10 @@
|
||||
return this.field_188621_a;
|
||||
}
|
||||
|
||||
+ public boolean isAmbientOcclusion(BlockState state) {
|
||||
+ return this.defaultModel.isAmbientOcclusion(state);
|
||||
+ }
|
||||
+
|
||||
public boolean func_177556_c() {
|
||||
return this.field_188622_b;
|
||||
}
|
||||
@@ -86,14 +93,24 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
public TextureAtlasSprite func_177554_e() {
|
||||
return this.field_188623_c;
|
||||
}
|
||||
|
||||
+ public TextureAtlasSprite getParticleTexture(net.minecraftforge.client.model.data.IModelData modelData) {
|
||||
+ return this.defaultModel.getParticleTexture(modelData);
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated
|
||||
public ItemCameraTransforms func_177552_f() {
|
||||
return this.field_188624_d;
|
||||
}
|
||||
|
||||
+ public IBakedModel handlePerspective(net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType transformType, com.mojang.blaze3d.matrix.MatrixStack matrixStack) {
|
||||
+ return this.defaultModel.handlePerspective(transformType, matrixStack);
|
||||
+ }
|
||||
+
|
||||
public ItemOverrideList func_188617_f() {
|
||||
return this.field_188625_e;
|
||||
}
|
||||
+43
-2
@@ -1,12 +1,53 @@
|
||||
--- a/net/minecraft/client/renderer/model/WeightedBakedModel.java
|
||||
+++ b/net/minecraft/client/renderer/model/WeightedBakedModel.java
|
||||
@@ -31,6 +31,9 @@
|
||||
@@ -12,7 +12,7 @@
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public class WeightedBakedModel implements IBakedModel {
|
||||
+public class WeightedBakedModel implements net.minecraftforge.client.model.data.IDynamicBakedModel {
|
||||
private final int field_177567_a;
|
||||
private final List<WeightedBakedModel.WeightedModel> field_177565_b;
|
||||
private final IBakedModel field_177566_c;
|
||||
@@ -23,14 +23,20 @@
|
||||
this.field_177566_c = (p_i46073_1_.get(0)).field_185281_b;
|
||||
}
|
||||
|
||||
- public List<BakedQuad> func_200117_a(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_) {
|
||||
- return (WeightedRandom.func_180166_a(this.field_177565_b, Math.abs((int)p_200117_3_.nextLong()) % this.field_177567_a)).field_185281_b.func_200117_a(p_200117_1_, p_200117_2_, p_200117_3_);
|
||||
+ // FORGE: Implement our overloads (here and below) so child models can have custom logic
|
||||
+ public List<BakedQuad> getQuads(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_, net.minecraftforge.client.model.data.IModelData modelData) {
|
||||
+ return (WeightedRandom.func_180166_a(this.field_177565_b, Math.abs((int)p_200117_3_.nextLong()) % this.field_177567_a)).field_185281_b.getQuads(p_200117_1_, p_200117_2_, p_200117_3_, modelData);
|
||||
}
|
||||
|
||||
public boolean func_177555_b() {
|
||||
return this.field_177566_c.func_177555_b();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean isAmbientOcclusion(BlockState state) { return this.field_177566_c.isAmbientOcclusion(state); }
|
||||
+ public boolean isAmbientOcclusion(BlockState state) {
|
||||
+ return this.field_177566_c.isAmbientOcclusion(state);
|
||||
+ }
|
||||
+
|
||||
public boolean func_177556_c() {
|
||||
return this.field_177566_c.func_177556_c();
|
||||
}
|
||||
@@ -47,10 +53,18 @@
|
||||
return this.field_177566_c.func_177554_e();
|
||||
}
|
||||
|
||||
+ public TextureAtlasSprite getParticleTexture(net.minecraftforge.client.model.data.IModelData modelData) {
|
||||
+ return this.field_177566_c.getParticleTexture(modelData);
|
||||
+ }
|
||||
+
|
||||
public ItemCameraTransforms func_177552_f() {
|
||||
return this.field_177566_c.func_177552_f();
|
||||
}
|
||||
|
||||
+ public IBakedModel handlePerspective(net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType transformType, com.mojang.blaze3d.matrix.MatrixStack matrixStack) {
|
||||
+ return this.field_177566_c.handlePerspective(transformType, matrixStack);
|
||||
+ }
|
||||
+
|
||||
public ItemOverrideList func_188617_f() {
|
||||
return this.field_177566_c.func_188617_f();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
+++ b/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
@@ -145,6 +145,7 @@
|
||||
@@ -157,6 +157,7 @@
|
||||
public void func_147645_c(ResourceLocation p_147645_1_) {
|
||||
Texture texture = this.func_229267_b_(p_147645_1_);
|
||||
if (texture != null) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/client/resources/ClientLanguageMap.java
|
||||
+++ b/net/minecraft/client/resources/ClientLanguageMap.java
|
||||
@@ -116,4 +116,9 @@
|
||||
return p_239500_1_;
|
||||
}
|
||||
@@ -78,4 +78,9 @@
|
||||
public IReorderingProcessor func_241870_a(ITextProperties p_241870_1_) {
|
||||
return BidiReorderer.func_243508_a(p_241870_1_, this.field_239496_d_);
|
||||
}
|
||||
+
|
||||
+
|
||||
+ @Override
|
||||
+ public Map<String, String> getLanguageData() {
|
||||
+ return field_239495_c_;
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
--- a/net/minecraft/client/resources/ClientResourcePackInfo.java
|
||||
+++ b/net/minecraft/client/resources/ClientResourcePackInfo.java
|
||||
@@ -24,13 +24,23 @@
|
||||
@Nullable
|
||||
private ResourceLocation field_195810_b;
|
||||
|
||||
+ @Deprecated
|
||||
public ClientResourcePackInfo(String p_i232485_1_, boolean p_i232485_2_, Supplier<IResourcePack> p_i232485_3_, IResourcePack p_i232485_4_, PackMetadataSection p_i232485_5_, ResourcePackInfo.Priority p_i232485_6_, IPackNameDecorator p_i232485_7_) {
|
||||
- super(p_i232485_1_, p_i232485_2_, p_i232485_3_, p_i232485_4_, p_i232485_5_, p_i232485_6_, p_i232485_7_);
|
||||
+ this(p_i232485_1_, p_i232485_2_, p_i232485_3_, p_i232485_4_, p_i232485_5_, p_i232485_6_, p_i232485_7_, false);
|
||||
+ }
|
||||
+
|
||||
+ public ClientResourcePackInfo(String p_i232485_1_, boolean p_i232485_2_, Supplier<IResourcePack> p_i232485_3_, IResourcePack p_i232485_4_, PackMetadataSection p_i232485_5_, ResourcePackInfo.Priority p_i232485_6_, IPackNameDecorator p_i232485_7_, boolean hidden) {
|
||||
+ super(p_i232485_1_, p_i232485_2_, p_i232485_3_, p_i232485_4_, p_i232485_5_, p_i232485_6_, p_i232485_7_, hidden);
|
||||
this.field_195809_a = func_239491_a_(p_i232485_4_);
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
public ClientResourcePackInfo(String p_i232486_1_, boolean p_i232486_2_, Supplier<IResourcePack> p_i232486_3_, ITextComponent p_i232486_4_, ITextComponent p_i232486_5_, PackCompatibility p_i232486_6_, ResourcePackInfo.Priority p_i232486_7_, boolean p_i232486_8_, IPackNameDecorator p_i232486_9_, @Nullable NativeImage p_i232486_10_) {
|
||||
- super(p_i232486_1_, p_i232486_2_, p_i232486_3_, p_i232486_4_, p_i232486_5_, p_i232486_6_, p_i232486_7_, p_i232486_8_, p_i232486_9_);
|
||||
+ this(p_i232486_1_, p_i232486_2_, p_i232486_3_, p_i232486_4_, p_i232486_5_, p_i232486_6_, p_i232486_7_, p_i232486_8_, p_i232486_9_, p_i232486_10_, false);
|
||||
+ }
|
||||
+
|
||||
+ public ClientResourcePackInfo(String p_i232486_1_, boolean p_i232486_2_, Supplier<IResourcePack> p_i232486_3_, ITextComponent p_i232486_4_, ITextComponent p_i232486_5_, PackCompatibility p_i232486_6_, ResourcePackInfo.Priority p_i232486_7_, boolean p_i232486_8_, IPackNameDecorator p_i232486_9_, @Nullable NativeImage p_i232486_10_, boolean hidden) {
|
||||
+ super(p_i232486_1_, p_i232486_2_, p_i232486_3_, p_i232486_4_, p_i232486_5_, p_i232486_6_, p_i232486_7_, p_i232486_8_, p_i232486_9_, hidden);
|
||||
this.field_195809_a = p_i232486_10_;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -11,22 +11,25 @@
|
||||
}
|
||||
|
||||
this.func_147607_a(9728);
|
||||
@@ -127,7 +130,10 @@
|
||||
@@ -127,7 +130,14 @@
|
||||
GlStateManager.func_227727_h_(FramebufferConstants.field_227592_a_, this.field_147616_f);
|
||||
GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, FramebufferConstants.field_227594_c_, 3553, this.field_147617_g, 0);
|
||||
if (this.field_147619_e) {
|
||||
+ if(!stencilEnabled)
|
||||
GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, FramebufferConstants.field_227595_d_, 3553, this.field_147624_h, 0);
|
||||
+ else
|
||||
+ GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, org.lwjgl.opengl.GL30.GL_DEPTH_STENCIL_ATTACHMENT, 3553, this.field_147624_h, 0);
|
||||
+ else if(net.minecraftforge.common.ForgeConfig.CLIENT.useCombinedDepthStencilAttachment.get()) {
|
||||
+ GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, org.lwjgl.opengl.GL30.GL_DEPTH_STENCIL_ATTACHMENT, 3553, this.field_147624_h, 0);
|
||||
+ } else {
|
||||
+ GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, org.lwjgl.opengl.GL30.GL_DEPTH_ATTACHMENT, 3553, this.field_147624_h, 0);
|
||||
+ GlStateManager.func_227645_a_(FramebufferConstants.field_227592_a_, org.lwjgl.opengl.GL30.GL_STENCIL_ATTACHMENT, 3553, this.field_147624_h, 0);
|
||||
+ }
|
||||
}
|
||||
|
||||
this.func_147611_b();
|
||||
@@ -280,4 +286,30 @@
|
||||
GlStateManager.func_227658_a_(i, p_216493_1_);
|
||||
@@ -281,6 +291,32 @@
|
||||
this.func_147609_e();
|
||||
}
|
||||
+
|
||||
|
||||
+
|
||||
+ /*================================ FORGE START ================================================*/
|
||||
+ private boolean stencilEnabled = false;
|
||||
@@ -52,4 +55,7 @@
|
||||
+ return this.stencilEnabled;
|
||||
+ }
|
||||
+ /*================================ FORGE END ================================================*/
|
||||
}
|
||||
+
|
||||
public int func_242996_f() {
|
||||
return this.field_147617_g;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/shader/ShaderGroup.java
|
||||
+++ b/net/minecraft/client/shader/ShaderGroup.java
|
||||
@@ -157,7 +157,8 @@
|
||||
@@ -164,7 +164,8 @@
|
||||
throw new JSONException("Render target '" + s4 + "' can't be used as depth buffer");
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
this.field_216556_l = p_i50988_2_;
|
||||
IResource iresource = null;
|
||||
|
||||
@@ -142,7 +143,8 @@
|
||||
@@ -149,7 +150,8 @@
|
||||
public static ShaderLoader func_216542_a(IResourceManager p_216542_0_, ShaderLoader.ShaderType p_216542_1_, String p_216542_2_) throws IOException {
|
||||
ShaderLoader shaderloader = p_216542_1_.func_148064_d().get(p_216542_2_);
|
||||
if (shaderloader == null) {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/world/ClientWorld.java
|
||||
+++ b/net/minecraft/client/world/ClientWorld.java
|
||||
@@ -103,6 +103,8 @@
|
||||
this.func_239136_a_(new BlockPos(8, 64, 8));
|
||||
@@ -104,6 +104,8 @@
|
||||
this.func_239136_a_(new BlockPos(8, 64, 8), 0.0F);
|
||||
this.func_72966_v();
|
||||
this.func_72947_a();
|
||||
+ //this.gatherCapabilities(dimension.initCapabilities()); //TODO
|
||||
+ this.gatherCapabilities();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
|
||||
}
|
||||
|
||||
public DimensionRenderInfo func_239132_a_() {
|
||||
@@ -185,6 +187,7 @@
|
||||
@@ -186,6 +188,7 @@
|
||||
this.func_217381_Z().func_194340_a(() -> {
|
||||
return Registry.field_212629_r.func_177774_c(p_217418_1_.func_200600_R()).toString();
|
||||
});
|
||||
@@ -17,7 +17,7 @@
|
||||
p_217418_1_.func_70071_h_();
|
||||
this.func_217381_Z().func_76319_b();
|
||||
}
|
||||
@@ -284,9 +287,11 @@
|
||||
@@ -285,9 +288,11 @@
|
||||
}
|
||||
|
||||
private void func_217424_b(int p_217424_1_, Entity p_217424_2_) {
|
||||
@@ -29,15 +29,16 @@
|
||||
}
|
||||
|
||||
public void func_217413_d(int p_217413_1_) {
|
||||
@@ -305,6 +310,7 @@
|
||||
@@ -306,6 +311,8 @@
|
||||
}
|
||||
|
||||
this.field_217431_w.remove(p_217414_1_);
|
||||
+ p_217414_1_.onRemovedFromWorld();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.EntityLeaveWorldEvent(p_217414_1_, this));
|
||||
}
|
||||
|
||||
public void func_217417_b(Chunk p_217417_1_) {
|
||||
@@ -447,6 +453,11 @@
|
||||
@@ -448,6 +455,11 @@
|
||||
}
|
||||
|
||||
public void func_184148_a(@Nullable PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) {
|
||||
@@ -49,7 +50,7 @@
|
||||
if (p_184148_1_ == this.field_73037_M.field_71439_g) {
|
||||
this.func_184134_a(p_184148_2_, p_184148_4_, p_184148_6_, p_184148_8_, p_184148_9_, p_184148_10_, p_184148_11_, false);
|
||||
}
|
||||
@@ -454,6 +465,11 @@
|
||||
@@ -455,6 +467,11 @@
|
||||
}
|
||||
|
||||
public void func_217384_a(@Nullable PlayerEntity p_217384_1_, Entity p_217384_2_, SoundEvent p_217384_3_, SoundCategory p_217384_4_, float p_217384_5_, float p_217384_6_) {
|
||||
@@ -61,3 +62,11 @@
|
||||
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_));
|
||||
}
|
||||
@@ -876,6 +893,7 @@
|
||||
}
|
||||
|
||||
public void func_239156_a_(Difficulty p_239156_1_) {
|
||||
+ net.minecraftforge.common.ForgeHooks.onDifficultyChange(p_239156_1_, this.field_239153_j_);
|
||||
this.field_239153_j_ = p_239156_1_;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
--- a/net/minecraft/command/Commands.java
|
||||
+++ b/net/minecraft/command/Commands.java
|
||||
@@ -202,6 +202,14 @@
|
||||
@@ -186,6 +186,7 @@
|
||||
if (p_i232148_1_.field_237219_d_) {
|
||||
PublishCommand.func_198581_a(this.field_197062_b);
|
||||
}
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onCommandRegister(this.field_197062_b, p_i232148_1_);
|
||||
|
||||
this.field_197062_b.findAmbiguities((p_201302_1_, p_201302_2_, p_201302_3_, p_201302_4_) -> {
|
||||
field_197061_a.warn("Ambiguity between arguments {} and {} with inputs: {}", this.field_197062_b.getPath(p_201302_2_), this.field_197062_b.getPath(p_201302_3_), p_201302_4_);
|
||||
@@ -205,6 +206,14 @@
|
||||
|
||||
try {
|
||||
try {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/command/arguments/BlockStateParser.java
|
||||
+++ b/net/minecraft/command/arguments/BlockStateParser.java
|
||||
@@ -170,7 +170,7 @@
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
private boolean func_212598_k(TagCollection<Block> p_212598_1_) {
|
||||
private boolean func_212598_k(ITagCollection<Block> p_212598_1_) {
|
||||
if (this.field_197270_l != null) {
|
||||
- return this.field_197270_l.func_177230_c().func_235695_q_();
|
||||
+ return this.field_197270_l.hasTileEntity();
|
||||
} else {
|
||||
if (this.field_199833_p != null) {
|
||||
ITag<Block> itag = p_212598_1_.func_199910_a(this.field_199833_p);
|
||||
@@ -293,7 +293,7 @@
|
||||
@@ -283,7 +283,7 @@
|
||||
p_197255_1_.suggest(String.valueOf('['));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/command/impl/LocateCommand.java
|
||||
+++ b/net/minecraft/command/impl/LocateCommand.java
|
||||
@@ -25,12 +25,19 @@
|
||||
@@ -25,11 +25,18 @@
|
||||
return p_198533_0_.func_197034_c(2);
|
||||
});
|
||||
|
||||
@@ -10,13 +10,12 @@
|
||||
return func_241053_a_(p_241056_1_.getSource(), entry.getValue());
|
||||
}));
|
||||
}
|
||||
|
||||
+ else {
|
||||
+ for (Structure<?> structureFeature : net.minecraftforge.registries.ForgeRegistries.STRUCTURE_FEATURES) {
|
||||
+ String name = structureFeature.getRegistryName().toString().replace("minecraft:", "");
|
||||
+ literalargumentbuilder = literalargumentbuilder.then(Commands.func_197057_a(name))
|
||||
+ .executes(ctx -> func_241053_a_(ctx.getSource(), structureFeature));
|
||||
+ }
|
||||
+
|
||||
+ literalargumentbuilder = literalargumentbuilder.then(Commands.func_197057_a(name)
|
||||
+ .executes(ctx -> func_241053_a_(ctx.getSource(), structureFeature)));
|
||||
+ }}
|
||||
|
||||
p_198528_0_.register(literalargumentbuilder);
|
||||
}
|
||||
|
||||
Loaded 100 of 1107 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user