mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
220cb1fd81 | ||
|
|
19abf0cb9a | ||
|
|
508d872ef3 | ||
|
|
b67c37fd6c | ||
|
|
d4a3762f21 | ||
|
|
4c7f1096e5 | ||
|
|
4ff65feb63 | ||
|
|
dbec9b3d5a | ||
|
|
28515d7c59 | ||
|
|
ca819e09f2 | ||
|
|
d28cd0352b | ||
|
|
a436118e39 | ||
|
|
9e5ecaaf75 | ||
|
|
3701ec06d0 | ||
|
|
5d0fb2967c | ||
|
|
5c88451f6f | ||
|
|
cfc53c939e | ||
|
|
3ba78225c3 | ||
|
|
d8e6181058 | ||
|
|
bb4e78da90 | ||
|
|
4dd32d6f72 | ||
|
|
68b0075fe6 | ||
|
|
f9686cf098 | ||
|
|
ca28877fd5 | ||
|
|
c18d26c7d8 | ||
|
|
241db39cea | ||
|
|
31da9a4878 | ||
|
|
0e65f20f22 | ||
|
|
d8d70e8b35 | ||
|
|
5d62261082 | ||
|
|
a72b774acf | ||
|
|
b1042f2c3c | ||
|
|
124c78b926 | ||
|
|
7332bf91d5 | ||
|
|
33307fb1bd | ||
|
|
1ef8b75cbb | ||
|
|
f4a85e5f03 | ||
|
|
7f8b30aed3 | ||
|
|
b8ea220925 | ||
|
|
1e1644f6d4 | ||
|
|
fab4ce894a | ||
|
|
f2f7ab80f6 | ||
|
|
c044f3b0c4 | ||
|
|
ebd463e92f | ||
|
|
69ba974960 | ||
|
|
dbee8a24d8 | ||
|
|
2373dab982 | ||
|
|
1ebfef5ec9 | ||
|
|
ff7a2fe4d6 | ||
|
|
862289cf56 | ||
|
|
e3068d7db2 | ||
|
|
29ad7a39de | ||
|
|
3484200f80 | ||
|
|
acaa470dea | ||
|
|
3bf6c17bb8 | ||
|
|
ca8a418364 | ||
|
|
6422310453 | ||
|
|
ebf489be8c | ||
|
|
c8967fa176 | ||
|
|
51d08ad8ab | ||
|
|
dc664ba597 | ||
|
|
8e74ba8c24 | ||
|
|
ec3e8c2039 | ||
|
|
6cbd418703 | ||
|
|
6c8342b74e | ||
|
|
c345dfb0c6 | ||
|
|
8adc546d92 | ||
|
|
25a9e477cb | ||
|
|
886de4ee43 | ||
|
|
c98abaaa42 | ||
|
|
a8bd5e7ece | ||
|
|
a328364999 | ||
|
|
94cbf72e39 | ||
|
|
8248eb6ea1 | ||
|
|
408104dbaf | ||
|
|
5978670897 | ||
|
|
01d14004a9 | ||
|
|
940bbc4e91 | ||
|
|
7070bd0340 | ||
|
|
5e9380ab85 | ||
|
|
9c759294c6 | ||
|
|
b294f4d894 | ||
|
|
ca980a56bc | ||
|
|
8482293b40 | ||
|
|
dc5a06aab4 | ||
|
|
35bd69808c | ||
|
|
4f12261080 | ||
|
|
fbdfc0f95c | ||
|
|
48735c3946 | ||
|
|
c985225d0c | ||
|
|
48ff897ed1 | ||
|
|
9db568d49d | ||
|
|
896e785994 | ||
|
|
78cdb705d4 | ||
|
|
136452840d | ||
|
|
b3631b707c | ||
|
|
f4bab8b8c1 | ||
|
|
2392a4c184 | ||
|
|
476b7056fb | ||
|
|
d510978446 | ||
|
|
583ff81dba | ||
|
|
01a862db30 | ||
|
|
dfbd61436b | ||
|
|
f03745ce45 | ||
|
|
48cf910626 | ||
|
|
0492b25335 | ||
|
|
6d9cb0a646 | ||
|
|
571ecafdbc | ||
|
|
dee844e232 | ||
|
|
07bcff5067 | ||
|
|
7fa3594c04 | ||
|
|
6fda1e968d | ||
|
|
af8074cc39 | ||
|
|
71a4828809 | ||
|
|
79ce18ac3e | ||
|
|
bb83e11a7c | ||
|
|
0f888dde49 | ||
|
|
f4215d121c | ||
|
|
60eecb98a6 | ||
|
|
3cc76a3f60 | ||
|
|
ffdeeb95b7 | ||
|
|
58335d7bc0 | ||
|
|
b0c9d7cce9 | ||
|
|
281ef5a152 | ||
|
|
9183c2fa0d | ||
|
|
389751beae | ||
|
|
2b4e3bcf54 | ||
|
|
3dce85c49f | ||
|
|
185ce79a68 | ||
|
|
f777aba227 | ||
|
|
5efa373d7f | ||
|
|
b6cd19b4ae | ||
|
|
fc5573333d | ||
|
|
55fe7c470f | ||
|
|
3ef1d6919c | ||
|
|
e1863383ff | ||
|
|
4dc34b7d5b | ||
|
|
2c8c022034 | ||
|
|
b5b43a5a36 | ||
|
|
c09fe57031 | ||
|
|
68524ddde9 | ||
|
|
55bdd4d937 | ||
|
|
3f089e3add | ||
|
|
ddb90a69d3 | ||
|
|
bdce8d0494 | ||
|
|
734a3d76aa | ||
|
|
a4aa85259e | ||
|
|
ea1c7a7339 | ||
|
|
185f7344fa | ||
|
|
26e4bf92a0 | ||
|
|
68cb017be1 | ||
|
|
68ff1afac1 | ||
|
|
0d448a5e4f | ||
|
|
d9f6659f2c | ||
|
|
bae2ee0420 | ||
|
|
799e864d93 | ||
|
|
aa38f62bae | ||
|
|
06c3e255b3 | ||
|
|
d5e20b13b9 | ||
|
|
c83d4d29e4 | ||
|
|
ee1c06085b | ||
|
|
336d53b692 | ||
|
|
95c58ba75c | ||
|
|
56857cf5e7 | ||
|
|
838998b885 | ||
|
|
a9b3b48273 | ||
|
|
a788e8a475 | ||
|
|
b7e1cc5f6b | ||
|
|
e784a7f606 | ||
|
|
3e9bc3c434 | ||
|
|
dd340b8ef2 | ||
|
|
7deb479676 | ||
|
|
1ab40e0b3f | ||
|
|
283c3d1664 | ||
|
|
5291ea7270 | ||
|
|
0c1c1b65e1 | ||
|
|
b0787e9f40 | ||
|
|
dc0eacb80f | ||
|
|
8c04651301 | ||
|
|
94621fecd1 | ||
|
|
5e392e3300 | ||
|
|
88595dd26b | ||
|
|
4323c6d845 | ||
|
|
81ec8b99ac | ||
|
|
1af7b7603d | ||
|
|
0fd8fa2211 | ||
|
|
5048739b7f | ||
|
|
44f3f9e2d0 | ||
|
|
ed1c55508f | ||
|
|
50e411b82a | ||
|
|
a8a0306f98 | ||
|
|
19b7d26bc2 | ||
|
|
c7940e70ed | ||
|
|
58ede2c80a | ||
|
|
e83e00520f | ||
|
|
9a50c208f0 | ||
|
|
7acb380ba8 | ||
|
|
48fa2f458c | ||
|
|
318fc6ffe8 | ||
|
|
b009cedc0c | ||
|
|
c6dd475610 | ||
|
|
61285a098a | ||
|
|
995a8b8d35 | ||
|
|
5d33697cb1 | ||
|
|
ae09fc6b6d | ||
|
|
cd826f7bcf | ||
|
|
283ece29e8 | ||
|
|
1918148b8e | ||
|
|
e17714583f | ||
|
|
4c05c63a04 | ||
|
|
0bdc2d04b4 | ||
|
|
57d4d60a33 | ||
|
|
731e1920d2 | ||
|
|
7411b444d3 | ||
|
|
ae3d002ac6 | ||
|
|
1bd70ac5ab | ||
|
|
c90b1732e9 | ||
|
|
fcd9582133 | ||
|
|
9d82d822db | ||
|
|
186d91c03f | ||
|
|
eec5809097 | ||
|
|
4582a29ec1 | ||
|
|
2f83234ccb | ||
|
|
bef52c945b | ||
|
|
1de4ad735b | ||
|
|
00fc29d40d | ||
|
|
27afdc8a27 | ||
|
|
eff42f6066 | ||
|
|
b99453d568 | ||
|
|
9f5ce12754 | ||
|
|
cb21e95e0b | ||
|
|
e6f032db1b | ||
|
|
86e9425638 | ||
|
|
53ac33a84c | ||
|
|
5cf2af569f | ||
|
|
a46b7cb67a | ||
|
|
3d78f30d18 | ||
|
|
ad64d383e1 | ||
|
|
0a7f5ff9fa | ||
|
|
ce28c5794d | ||
|
|
e55c7c889b | ||
|
|
0633e8218f | ||
|
|
0fdfe1fd59 | ||
|
|
2cc264645b | ||
|
|
983e0a93db | ||
|
|
d88e4fbf36 | ||
|
|
f79da3edf7 | ||
|
|
8742d74e93 | ||
|
|
ff80ab6a23 | ||
|
|
8c37d642fe | ||
|
|
06a30e9f23 | ||
|
|
650e7dc16e | ||
|
|
d41fad51c2 | ||
|
|
0463949ac3 | ||
|
|
5f0fd4b706 | ||
|
|
201c368325 | ||
|
|
3fe08f149d | ||
|
|
61bea2bfda | ||
|
|
f720140481 | ||
|
|
66a2d38ab8 | ||
|
|
bed266f310 | ||
|
|
719f08ea5e | ||
|
|
3992ea5c59 | ||
|
|
a01c1cdc3a | ||
|
|
7a8ae9f56b | ||
|
|
765efc3c72 | ||
|
|
bc23c1ddb2 | ||
|
|
87e2fcb4e5 | ||
|
|
478b7e7ccc | ||
|
|
0574db134c | ||
|
|
358211ca66 | ||
|
|
c8e5007913 | ||
|
|
943fedb073 | ||
|
|
13ae8e41ee | ||
|
|
ac8b196b8c | ||
|
|
2c3183bdae | ||
|
|
53349603e2 | ||
|
|
c284de366b | ||
|
|
e81c330694 | ||
|
|
790da699dd | ||
|
|
7915397377 | ||
|
|
b2a5d34679 | ||
|
|
73bb18e78b | ||
|
|
9701148819 | ||
|
|
f1dbc8b117 | ||
|
|
b8131e6e67 | ||
|
|
f4598a97f7 | ||
|
|
c90d42973d | ||
|
|
ff0bb8c83c | ||
|
|
e5acea60e6 | ||
|
|
216b536967 | ||
|
|
0a819da0e7 | ||
|
|
bdad2af27b | ||
|
|
60513446fa | ||
|
|
be415091cd | ||
|
|
9067dbf6a0 | ||
|
|
359be1a880 | ||
|
|
99624bf3b5 | ||
|
|
252b94a110 | ||
|
|
448d996a45 | ||
|
|
b9e5dfd286 | ||
|
|
d966746fbf | ||
|
|
89baeb3d5d | ||
|
|
89006458a2 | ||
|
|
389bc1ecea | ||
|
|
1e0437208b | ||
|
|
256bd01e0c | ||
|
|
ef7b035f02 | ||
|
|
83a0dc2ef9 | ||
|
|
c10174d50d | ||
|
|
5a3b375147 | ||
|
|
656ff25ae1 | ||
|
|
19059b054e | ||
|
|
45bc487fc0 | ||
|
|
9c74a31ca2 | ||
|
|
8c3e511538 | ||
|
|
5fb948fb35 | ||
|
|
a14c2233e0 | ||
|
|
f01b87fac7 | ||
|
|
40bdde2043 | ||
|
|
0a8a601877 | ||
|
|
002e29958e | ||
|
|
604987a005 | ||
|
|
7e3e6b1969 | ||
|
|
d821514372 | ||
|
|
37a896fe1b | ||
|
|
e1cdb2e558 | ||
|
|
c30b27fcfe | ||
|
|
9542f51cd0 | ||
|
|
a7b56f0975 | ||
|
|
ed3dc8c7d3 | ||
|
|
ed6ce87c22 | ||
|
|
4bd7427b70 | ||
|
|
0b1196db3f | ||
|
|
b25ed7ef91 | ||
|
|
dc95130526 | ||
|
|
d5ee80a70a | ||
|
|
5dc944c1c3 | ||
|
|
da22fd40bf | ||
|
|
1434419e47 | ||
|
|
3385e62aa7 | ||
|
|
40f2276e88 | ||
|
|
35cd89c00c | ||
|
|
892fea3df9 | ||
|
|
2d32929dc5 | ||
|
|
728b4857c3 | ||
|
|
9fa4641cb0 | ||
|
|
fc04a65a0f | ||
|
|
a93d7d20ee | ||
|
|
b74b72e44c | ||
|
|
850c73b73f | ||
|
|
d736e26e0c |
No files matched your search
@@ -1,4 +0,0 @@
|
||||
<!-- Thank you for reporting! -->
|
||||
|
||||
<!-- Please go to the forum first for support with crashes and issues. -->
|
||||
<!-- http://www.minecraftforge.net/forum/forum/18-support-bug-reports/ -->
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Want to request a feature?
|
||||
title: ''
|
||||
labels: Feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Please note, feature requests that are submitted as GitHub issues here are rarely implemented. -->
|
||||
<!-- If you'd like to see something in Forge, you should be ready to implement it as a PR. -->
|
||||
<!-- If you're not sure, open a Draft PR or discuss it in the Discord server. -->
|
||||
<!-- Discord: https://discord.gg/UvedJ9m -->
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: Issue report
|
||||
about: Visit the forum first for issues with crashes.
|
||||
title: ''
|
||||
labels: Triage
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Thank you for reporting! -->
|
||||
|
||||
<!-- For support with crashes and issues, please create a post on the forum instead: -->
|
||||
<!-- https://www.minecraftforge.net/forum/forum/18-support-bug-reports/ -->
|
||||
|
||||
**Minecraft Version:** {Minecraft version}
|
||||
|
||||
**Forge Version:** {Forge version. *Version number, not latest/rb*}
|
||||
|
||||
**Logs:** {Link(s) to GitHub Gist with full latest.log and/or crash report}
|
||||
|
||||
**Steps to Reproduce:**
|
||||
1. Do this
|
||||
2. Then do that
|
||||
3. ...
|
||||
|
||||
**Description of issue:**
|
||||
@@ -28,6 +28,7 @@
|
||||
/projects/**/*.launch
|
||||
/repo/
|
||||
/buildSrc
|
||||
src/generated/resources/.cache/
|
||||
|
||||
#Patch rejects
|
||||
/patches-/
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# How to install Forge: For Players
|
||||
|
||||
Go to [the Forge website](http://files.minecraftforge.net)
|
||||
and select the minecraft version you wish to get forge for from the list.
|
||||
|
||||
You can download the installer for the *Recommended Build* or the
|
||||
*Latest build* there. Latest builds may have newer features but may be
|
||||
more unstable as a result. The installer will attempt to install forge
|
||||
into your vanilla launcher environment, where you can then create a new
|
||||
profile using that version and play the game!
|
||||
|
||||
For support and questions, visit [the Support Forum](http://www.minecraftforge.net/forum/forum/18-support-bug-reports/).
|
||||
|
||||
Here is a short video from Rorax showing how to install and setup Forge:
|
||||
|
||||
[](https://www.youtube.com/watch?v=lB3ArN_-3Oc)
|
||||
|
||||
# How to install Forge: For Modders
|
||||
|
||||
[See the "Getting Started" section in the Forge Documentation](http://mcforge.readthedocs.io/en/latest/gettingstarted/).
|
||||
|
||||
# How to install Forge: For those wishing to work on Forge itself
|
||||
|
||||
If you wish to actually inspect Forge, submit PRs or otherwise work
|
||||
with Forge itself, you're in the right place!
|
||||
|
||||
[See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/).
|
||||
|
||||
## Pull requests
|
||||
|
||||
[See the "Making Changes and Pull Requests" section in the Forge documentation](http://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests).
|
||||
|
||||
### Contributor License Agreement
|
||||
We require all contributors to acknowledge the [Forge Contributor
|
||||
License Agreement](https://cla-assistant.io/MinecraftForge/MinecraftForge). Please ensure you have a valid email address
|
||||
associated with your github account to do this. If you have previously
|
||||
signed it, you should be OK.
|
||||
+302
-44
@@ -7,31 +7,44 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
|
||||
classpath 'org.ow2.asm:asm:7.1'
|
||||
classpath 'org.ow2.asm:asm-tree:7.1'
|
||||
}
|
||||
}
|
||||
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.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 net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
|
||||
import java.util.stream.Collectors
|
||||
import org.objectweb.asm.ClassReader
|
||||
|
||||
plugins {
|
||||
id 'net.minecrell.licenser' version '0.4'
|
||||
id 'org.ajoberstar.grgit' version '2.3.0'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id 'de.undercouch.download' version '3.3.0'
|
||||
id 'com.github.ben-manes.versions' version '0.20.0'
|
||||
id 'com.github.ben-manes.versions' version '0.22.0'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
@@ -45,9 +58,9 @@ ext {
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'snapshot'
|
||||
MAPPING_VERSION = '20190526-1.13.2'
|
||||
MC_VERSION = '1.14.2'
|
||||
MCP_VERSION = '20190603.175704'
|
||||
MAPPING_VERSION = '20190719-1.14.3'
|
||||
MC_VERSION = '1.14.4'
|
||||
MCP_VERSION = '20190829.143755'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -69,7 +82,7 @@ project(':clean') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'net.minecraftforge:forgespi:0.13.+'
|
||||
implementation 'net.minecraftforge:forgespi:1.1.+'
|
||||
}
|
||||
patcher {
|
||||
parent = project(':mcp')
|
||||
@@ -130,7 +143,10 @@ project(':forge') {
|
||||
srcDirs = ["$rootDir/src/main/java"]
|
||||
}
|
||||
resources {
|
||||
srcDirs = ["$rootDir/src/main/resources"]
|
||||
srcDirs = [
|
||||
"$rootDir/src/main/resources",
|
||||
"$rootDir/src/generated/resources"
|
||||
]
|
||||
}
|
||||
}
|
||||
test {
|
||||
@@ -138,12 +154,15 @@ project(':forge') {
|
||||
runtimeClasspath += sourceSets.fmllauncher.runtimeClasspath
|
||||
java {
|
||||
srcDirs = [
|
||||
//"$rootDir/src/test/java",
|
||||
//"$rootDir/src/fmllaunchertest/java"
|
||||
"$rootDir/src/test/java",
|
||||
"$rootDir/src/fmllaunchertest/java"
|
||||
]
|
||||
}
|
||||
resources {
|
||||
srcDirs = ["$rootDir/src/test/resources"]
|
||||
srcDirs = [
|
||||
"$rootDir/src/test/resources",
|
||||
"$rootDir/src/generated_test/resources"
|
||||
]
|
||||
}
|
||||
}
|
||||
userdev {
|
||||
@@ -166,17 +185,20 @@ project(':forge') {
|
||||
}
|
||||
|
||||
ext {
|
||||
SPEC_VERSION = '26.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
SPEC_VERSION = '28.1' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
|
||||
// ForgeMC is a unique identifier for every MC version we have supported.
|
||||
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
|
||||
MCP_ARTIFACT = project(':mcp').mcp.config
|
||||
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.8.5'
|
||||
VERSION_JSON = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.12:fatjar'
|
||||
}
|
||||
|
||||
def getVersion = {
|
||||
//TAG-offset-hash
|
||||
def raw = grgit.describe(longDescr: true)
|
||||
def desc = (raw == null ? '0.0-0-unknown' : grgit.describe(longDescr: true)).split('-') as List
|
||||
def raw = grgit.describe(longDescr: true, tags:true)
|
||||
def desc = (raw == null ? '0.0-0-unknown' : grgit.describe(longDescr: true, tags:true)).split('-') as List
|
||||
def hash = desc.remove(desc.size() - 1)
|
||||
def offset = desc.remove(desc.size() - 1)
|
||||
def tag = desc.join('-')
|
||||
@@ -198,6 +220,7 @@ project(':forge') {
|
||||
patchedSrc = file('src/main/java')
|
||||
srgPatches = true
|
||||
accessTransformer = file("$rootDir/src/main/resources/META-INF/accesstransformer.cfg")
|
||||
sideAnnotationStripper = file("$rootDir/src/main/resources/forge.sas")
|
||||
|
||||
runs {
|
||||
forge_client {
|
||||
@@ -217,7 +240,6 @@ project(':forge') {
|
||||
environment 'FORGE_SPEC', SPEC_VERSION
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
property 'terminal.ansi', 'true'
|
||||
property 'org.lwjgl.system.SharedLibraryExtractDirectory', 'lwjgl_dll'
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
@@ -268,6 +290,44 @@ project(':forge') {
|
||||
TestMods { sources sourceSets.test }
|
||||
}
|
||||
}
|
||||
|
||||
forge_data {
|
||||
taskName 'forge_data'
|
||||
|
||||
main 'net.minecraftforge.userdev.LaunchTesting'
|
||||
workingDirectory project.file('run')
|
||||
|
||||
environment 'target', 'fmldevdata'
|
||||
|
||||
environment 'MC_VERSION', MC_VERSION
|
||||
environment 'MCP_VERSION', MCP_VERSION
|
||||
environment 'FORGE_GROUP', project.group
|
||||
environment 'FORGE_SPEC', SPEC_VERSION
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
|
||||
source sourceSets.main
|
||||
source sourceSets.userdev
|
||||
|
||||
args '--mod', 'forge', '--all', '--output', rootProject.file('src/generated/resources/'), '--validate',
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
}
|
||||
|
||||
forge_test_data {
|
||||
parent runs.forge_data
|
||||
taskName 'forge_test_data'
|
||||
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
mods {
|
||||
tests { sources sourceSets.test }
|
||||
}
|
||||
|
||||
args '--mod', 'data_gen_test', '--all', '--output', rootProject.file('src/generated_test/resources/'), '--validate',
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,6 +362,14 @@ project(':forge') {
|
||||
'Implementation-Version': SPEC_VERSION,
|
||||
'Implementation-Vendor': 'Forge'
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/fml/mclanguageprovider/': [
|
||||
'Specification-Title': 'Mod Language Provider',
|
||||
'Specification-Vendor': 'Forge Development LLC',
|
||||
'Specification-Version': '1',
|
||||
'Implementation-Title': 'Minecraft Language Mod Provider',
|
||||
'Implementation-Version': '1',
|
||||
'Implementation-Vendor': 'Forge'
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/fml/loading/': [
|
||||
'Specification-Title': 'Launcher',
|
||||
'Specification-Vendor': 'Forge Development LLC',
|
||||
@@ -309,6 +377,14 @@ project(':forge') {
|
||||
'Implementation-Title': 'FML Launcher',
|
||||
'Implementation-Version': SPEC_VERSION,
|
||||
'Implementation-Vendor': 'Forge'
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/fml/userdev/': [
|
||||
'Specification-Title': 'Forge User Development',
|
||||
'Specification-Vendor': 'Forge Development LLC',
|
||||
'Specification-Version': SPEC_VERSION,
|
||||
'Implementation-Title': project.group,
|
||||
'Implementation-Version': project.version.substring(MC_VERSION.length() + 1),
|
||||
'Implementation-Vendor': 'Forge Development LLC'
|
||||
] as LinkedHashMap
|
||||
]
|
||||
}
|
||||
@@ -329,26 +405,31 @@ project(':forge') {
|
||||
installer 'org.ow2.asm:asm:6.2'
|
||||
installer 'org.ow2.asm:asm-commons:6.2'
|
||||
installer 'org.ow2.asm:asm-tree:6.2'
|
||||
installer 'cpw.mods:modlauncher:2.1.+'
|
||||
installer 'cpw.mods:modlauncher:4.1.+'
|
||||
installer 'cpw.mods:grossjava9hacks:1.1.+'
|
||||
installer 'net.minecraftforge:accesstransformers:0.16.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:0.9.+:service'
|
||||
installer 'net.minecraftforge:forgespi:0.13.+'
|
||||
installer 'net.minecraftforge:coremods:0.5.+'
|
||||
installer 'net.minecraftforge:accesstransformers:1.0.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:1.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:1.5.+'
|
||||
installer 'net.minecraftforge:coremods:1.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'com.electronwill.night-config:core:3.6.0'
|
||||
installer 'com.electronwill.night-config:toml:3.6.0'
|
||||
installer 'org.jline:jline:3.9.0'
|
||||
installer 'org.jline:jline:3.12.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.0'
|
||||
installer 'net.jodah:typetools:0.6.0'
|
||||
installer 'java3d:vecmath:1.5.2'
|
||||
installer 'org.apache.logging.log4j:log4j-api:2.11.2'
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.1.+'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
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"
|
||||
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
|
||||
testImplementation 'org.hamcrest:hamcrest-all:1.3' // needs advanced matching for list order
|
||||
}
|
||||
@@ -411,17 +492,38 @@ project(':forge') {
|
||||
}
|
||||
|
||||
// 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) {
|
||||
@@ -466,8 +568,128 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
|
||||
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 extractInheritance(type: ExtractInheritance, dependsOn: [genJoinedBinPatches, downloadLibraries]) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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 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 launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
|
||||
inputs.file universalJar.archivePath
|
||||
inputs.file { launcherJar.archivePath }
|
||||
ext {
|
||||
output = file('build/version.json')
|
||||
vanilla = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
@@ -520,20 +742,24 @@ project(':forge') {
|
||||
output.text = new JsonBuilder(json).toPrettyString()
|
||||
}
|
||||
}
|
||||
|
||||
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches]) {
|
||||
|
||||
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches/*, createClientSRG, createServerSRG*/]) {
|
||||
ext {
|
||||
output = file('build/install_profile.json')
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.0.3'
|
||||
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.0'
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.1.4'
|
||||
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.2'
|
||||
}
|
||||
doFirst {
|
||||
ext.BIN_PATCHER = 'net.minecraftforge:binarypatcher:' + genClientBinPatches.resolvedVersion
|
||||
ext.BIN_PATCHER = BINPATCH_TOOL.substring(0, BINPATCH_TOOL.length() - 1 - BINPATCH_TOOL.split(':')[3].length())
|
||||
}
|
||||
inputs.file applyClientBinPatches.output
|
||||
inputs.file applyServerBinPatches.output
|
||||
inputs.file genClientBinPatches.toolJar
|
||||
inputs.file launcherJson.output
|
||||
/*
|
||||
inputs.file createClientSRG.output
|
||||
inputs.file createServerSRG.output
|
||||
*/
|
||||
outputs.file output
|
||||
doLast {
|
||||
def libs = [
|
||||
@@ -554,6 +780,7 @@ project(':forge') {
|
||||
spec: 0,
|
||||
profile: project.name,
|
||||
version: launcherJson.id,
|
||||
icon: "data:image/png;base64," + new String(Base64.getEncoder().encode(Files.readAllBytes(rootProject.file("icon.ico").toPath()))),
|
||||
json: '/version.json',
|
||||
path: "${project.group}:${project.name}:${project.version}",
|
||||
logo: '/big_logo.png',
|
||||
@@ -569,16 +796,16 @@ 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}:slim${MC_VERSION == '1.14.4' ? '-stable' : ''}]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:slim${MC_VERSION == '1.14.4' ? '-stable' : ''}]"
|
||||
],
|
||||
MC_SLIM_SHA: [
|
||||
client: "'${sha1(tasks.getByName('downloadClientSlim').output)}'",
|
||||
server: "'${sha1(tasks.getByName('downloadServerSlim').output)}'"
|
||||
],
|
||||
MC_EXTRA: [
|
||||
client: "[net.minecraft:client:${MC_VERSION}:extra]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:extra]"
|
||||
client: "[net.minecraft:client:${MC_VERSION}:extra${MC_VERSION == '1.14.4' ? '-stable' : ''}]",
|
||||
server: "[net.minecraft:server:${MC_VERSION}:extra${MC_VERSION == '1.14.4' ? '-stable' : ''}]"
|
||||
],
|
||||
MC_EXTRA_SHA: [
|
||||
client: "'${sha1(tasks.getByName('downloadClientExtra').output)}'",
|
||||
@@ -588,6 +815,10 @@ project(':forge') {
|
||||
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)}'"
|
||||
],*/
|
||||
PATCHED: [
|
||||
client: "[${project.group}:${project.name}:${project.version}:client]",
|
||||
server: "[${project.group}:${project.name}:${project.version}:server]"
|
||||
@@ -595,6 +826,10 @@ project(':forge') {
|
||||
PATCHED_SHA: [
|
||||
client: "'${sha1(applyClientBinPatches.output)}'",
|
||||
server: "'${sha1(applyServerBinPatches.output)}'"
|
||||
],
|
||||
MCP_VERSION: [
|
||||
client: "'${MCP_VERSION}'",
|
||||
server: "'${MCP_VERSION}'"
|
||||
]
|
||||
],
|
||||
processors: [
|
||||
@@ -620,21 +855,19 @@ project(':forge') {
|
||||
'{MC_SLIM}': '{MC_SLIM_SHA}',
|
||||
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
|
||||
]
|
||||
], [ // SpecialSource has a bug where it won't create the nessasary directories, remove when they fix that.
|
||||
jar: INSTALLER_TOOLS,
|
||||
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
|
||||
args: [
|
||||
'--task', 'CREATE_PARENTS',
|
||||
'--target', '{MC_SRG}'
|
||||
]
|
||||
], [
|
||||
jar: 'net.md-5:SpecialSource:1.8.3',
|
||||
classpath: getClasspath(project, libs, 'net.md-5:SpecialSource:1.8.3'),
|
||||
jar: SPECIAL_SOURCE,
|
||||
classpath: getClasspath(project, libs, SPECIAL_SOURCE),
|
||||
args: [
|
||||
//'--stable', Java 9 Is borked, https://bugs.openjdk.java.net/browse/JDK-8184940 TODO: find a fix.
|
||||
'--in-jar', '{MC_SLIM}',
|
||||
'--out-jar', '{MC_SRG}',
|
||||
'--srg-in', '{MAPPINGS}'
|
||||
]/*,
|
||||
outputs: [
|
||||
'{MC_SRG}': '{MC_SRG_SHA}'
|
||||
]
|
||||
*/
|
||||
], [
|
||||
jar: BIN_PATCHER,
|
||||
classpath: getClasspath(project, libs, BIN_PATCHER),
|
||||
@@ -660,7 +893,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}${MC_VERSION == '1.14.4' ? '-stable' : ''}:${type}"
|
||||
}
|
||||
installerJson.dependsOn(name)
|
||||
installerJson.inputs.file(tasks.getByName(name).output)
|
||||
@@ -677,6 +910,7 @@ project(':forge') {
|
||||
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 ->
|
||||
@@ -686,6 +920,7 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
dependsOn checksums
|
||||
*/
|
||||
|
||||
// add crowdin locales
|
||||
from { !crowdin.state.skipped ? zipTree(crowdin.archivePath) : null}
|
||||
@@ -711,7 +946,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}/server-${MC_VERSION}-extra${MC_VERSION == '1.14.4' ? '-stable' : ''}.jar"
|
||||
|
||||
MANIFESTS.each{ pkg, values ->
|
||||
if (pkg == '/') {
|
||||
@@ -851,6 +1086,19 @@ project(':forge') {
|
||||
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
||||
environment 'FORGE_VERSION', "${project.version.substring(MC_VERSION.length() + 1)}"
|
||||
}
|
||||
|
||||
data {
|
||||
main 'net.minecraftforge.userdev.LaunchTesting'
|
||||
|
||||
environment 'target', 'fmluserdevdata'
|
||||
|
||||
environment 'MC_VERSION', "${MC_VERSION}"
|
||||
environment 'FORGE_GROUP', "${project.group}"
|
||||
environment 'MCP_VERSION', "${MCP_VERSION}"
|
||||
environment 'MOD_CLASSES', '{source_roots}'
|
||||
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
||||
environment 'FORGE_VERSION', "${project.version.substring(MC_VERSION.length() + 1)}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -908,6 +1156,16 @@ project(':forge') {
|
||||
|
||||
tasks.eclipse.dependsOn('genEclipseRuns')
|
||||
|
||||
if (project.hasProperty('UPDATE_MAPPINGS')) {
|
||||
extractRangeMap {
|
||||
sources sourceSets.test.java.srcDirs
|
||||
}
|
||||
applyRangeMap {
|
||||
sources sourceSets.test.java.srcDirs
|
||||
}
|
||||
sourceSets.test.java.srcDirs.each { extractMappedNew.addTarget it }
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,68 @@
|
||||
<img src="assets/Forge_logo.svg">
|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos) [](https://forgedev.flocker.tv/)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
| Version | Support |
|
||||
| ------------- | ------------- |
|
||||
| 1.14.x | Active |
|
||||
| 1.12.x | Legacy |
|
||||
|
||||
* [Download]
|
||||
* [Forum]
|
||||
* [Discord]
|
||||
* [Documentation]
|
||||
|
||||
#### Notes:
|
||||
- Introduced in 1.13 was a new FML, information found [here](NewFML.md).
|
||||
|
||||
# Installing Forge
|
||||
|
||||
Go to [the Forge website](https://files.minecraftforge.net)
|
||||
and select the Minecraft version you wish to get Forge for from the list.
|
||||
|
||||
You can download the installer for the *Recommended Build* or the
|
||||
*Latest build* there. Latest builds may have newer features but may be
|
||||
more unstable as a result. The installer will attempt to install Forge
|
||||
into your vanilla launcher environment, where you can then create a new
|
||||
profile using that version and play the game!
|
||||
|
||||
For support and questions, visit [the Support Forum](https://www.minecraftforge.net/forum/forum/18-support-bug-reports/).
|
||||
|
||||
[Here is a short video from Rorax showing how to install and setup Forge.](https://www.youtube.com/watch?v=lB3ArN_-3Oc)
|
||||
|
||||
# Creating Mods
|
||||
|
||||
[See the "Getting Started" section in the Forge Documentation](https://mcforge.readthedocs.io/en/latest/gettingstarted/).
|
||||
|
||||
# Contribute to Forge
|
||||
|
||||
If you wish to actually inspect Forge, submit PRs or otherwise work
|
||||
with Forge itself, you're in the right place!
|
||||
|
||||
[See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/).
|
||||
|
||||
### Pull requests
|
||||
|
||||
[See the "Making Changes and Pull Requests" section in the Forge documentation](https://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests).
|
||||
|
||||
Please read the contributing guidelines found [here](CONTRIBUTING.md) before making a pull request.
|
||||
|
||||
### Contributor License Agreement
|
||||
We require all contributors to acknowledge the [Forge Contributor
|
||||
License Agreement](https://cla-assistant.io/MinecraftForge/MinecraftForge). Please ensure you have a valid email address
|
||||
associated with your GitHub account to do this. If you have previously
|
||||
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/).*
|
||||
|
||||
[Download]: https://files.minecraftforge.net/
|
||||
[Forum]: https://www.minecraftforge.net/forum/
|
||||
[Discord]: https://discord.gg/UvedJ9m
|
||||
[Documentation]: https://mcforge.readthedocs.io
|
||||
File renamed without changes.
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
|
||||
<svg enable-background="new 164.072 372.466 294.41 46.56" version="1.1" viewBox="164.072 372.466 294.41 46.56" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#DFA86A">
|
||||
<polygon points="266.16 417.99 277.12 417.99 277.12 401.05 295.09 401.05 295.09 390.78 277.12 390.78 277.12 383.77 296.18 383.77 296.18 373.5 266.16 373.5"/>
|
||||
<path d="m337.33 378.7c-2.103-2.057-4.629-3.64-7.51-4.704-2.743-1.015-5.786-1.528-9.041-1.528l-0.356 2e-3c-3.362 0-6.503 0.556-9.338 1.651-2.857 1.106-5.357 2.707-7.434 4.761-2.073 2.052-3.714 4.559-4.877 7.45-1.158 2.876-1.748 6.104-1.748 9.59 0 3.417 0.59 6.582 1.753 9.403 1.163 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.834 1.096 5.975 1.651 9.339 1.651h0.023c3.402-0.043 6.57-0.639 9.42-1.772 2.863-1.142 5.375-2.757 7.465-4.804 2.091-2.051 3.742-4.524 4.91-7.358 1.162-2.823 1.75-5.987 1.75-9.402 0-3.487-0.588-6.705-1.748-9.568-1.168-2.874-2.82-5.371-4.913-7.425zm-4.644 16.762c0 1.96-0.302 3.782-0.896 5.413-0.587 1.607-1.42 3.011-2.479 4.167-1.05 1.147-2.335 2.065-3.821 2.728-1.479 0.656-3.164 0.99-5.008 0.99-1.84 0-3.514-0.333-4.973-0.988-1.47-0.662-2.747-1.578-3.799-2.729-1.062-1.156-1.895-2.559-2.479-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.298-3.497 0.887-5.044 0.584-1.536 1.419-2.894 2.479-4.037 1.048-1.132 2.323-2.03 3.792-2.674 1.465-0.642 3.145-0.968 4.988-0.968 1.848 0 3.539 0.326 5.025 0.971 1.481 0.643 2.766 1.541 3.812 2.671 1.062 1.143 1.896 2.501 2.479 4.036 0.589 1.548 0.889 3.245 0.889 5.044z"/>
|
||||
<path d="m376.27 395.65c1.902-2.327 2.867-5.221 2.867-8.603 0-2.614-0.508-4.84-1.506-6.613-0.997-1.762-2.354-3.188-4.035-4.234-1.603-0.995-3.445-1.705-5.482-2.114-1.938-0.388-3.969-0.583-6.037-0.583h-16.021v44.487h10.961v-17.282h2.35l9.447 17.282h13.127l-11.199-18.646c2.262-0.728 4.116-1.964 5.528-3.694zm-19.254-12.223h4.426c0.844 0 1.73 0.054 2.636 0.16 0.784 0.094 1.503 0.283 2.132 0.568 0.496 0.225 0.888 0.553 1.193 0.998 0.283 0.415 0.428 1.031 0.428 1.836 0 0.931-0.16 1.643-0.459 2.06-0.34 0.472-0.771 0.813-1.32 1.046-0.686 0.289-1.459 0.477-2.301 0.554-0.975 0.089-1.963 0.136-2.938 0.136h-3.795l-2e-3 -7.358z"/>
|
||||
<path d="m394.82 386.38c1.05-1.132 2.325-2.03 3.793-2.674 1.464-0.642 3.144-0.968 4.988-0.968 1.843 0 3.611 0.311 5.26 0.921 1.609 0.599 2.992 1.449 4.107 2.531l1.314 1.278 8.019-8.105-1.454-1.298c-2.355-2.103-5.066-3.586-8.058-4.407-2.879-0.789-5.987-1.189-9.247-1.189-3.361 0-6.503 0.556-9.339 1.651-2.856 1.106-5.355 2.707-7.431 4.761-2.074 2.052-3.716 4.559-4.88 7.45-1.158 2.876-1.746 6.104-1.746 9.59 0 3.417 0.59 6.582 1.752 9.403 1.164 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.832 1.096 5.975 1.651 9.339 1.651 6.501 0 12.475-1.432 17.751-4.25l0.979-0.522v-23.814h-19.313v10.27h8.354v6.639c-0.871 0.397-1.834 0.709-2.881 0.933-1.5 0.314-3.127 0.478-4.83 0.478-1.841 0-3.514-0.333-4.973-0.988-1.472-0.662-2.748-1.578-3.801-2.729-1.06-1.156-1.893-2.559-2.478-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.299-3.497 0.887-5.044 0.586-1.54 1.421-2.897 2.479-4.041z"/>
|
||||
<polygon points="437.69 407.72 437.69 400.36 456.41 400.36 456.41 390.09 437.69 390.09 437.69 383.77 457.44 383.77 457.44 373.5 426.72 373.5 426.72 417.99 458.48 417.99 458.48 407.72"/>
|
||||
</g>
|
||||
<path d="m243.63 379.09l-37.842-1.852 46.229-0.034v-3.727h-52.125l-1e-3 7.798v6.201c0 0.115-1.52-9.144-1.87-11.734h-4.098v13.029c0 0.123-1.753-10.888-1.939-12.264h-27.914c1.902 1.648 12.401 10.598 19.865 14.28 3.741 1.846 8.33 1.86 12.414 1.974 2.075 0.06 4.25 0.217 5.803 1.754 2.255 2.236 2.758 5.704 0.814 8.33-1.922 2.594-7.335 3.156-7.335 3.156l-4.509 5.531v6.424h10.251l0.319-6.348 8.863-6.285c-0.946 0.757-3.058 2.783-6.229 7.666-0.717 1.102-1.275 2.306-1.711 3.49 2.238-1.896 6.84-3.194 12.153-3.194 5.307 0 9.903 1.295 12.146 3.188-0.437-1.185-0.994-2.385-1.709-3.483-3.172-4.883-5.284-6.909-6.229-7.666l8.863 6.285 0.32 6.348h9.565v-6.424l-4.507-5.531s-6.675-0.425-8.423-3.156c-5.032-7.869 2.115-20.082 18.836-23.756z" fill="#1E2D41"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
+19
-1
@@ -28,7 +28,7 @@ minecraft {
|
||||
mappings channel: '@MAPPING_CHANNEL@', version: '@MAPPING_VERSION@'
|
||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
||||
|
||||
// accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg')
|
||||
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
|
||||
// Default run configurations.
|
||||
// These can be tweaked, removed, or duplicated as needed.
|
||||
@@ -64,6 +64,24 @@ minecraft {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
|
||||
// Recommended logging level for the console
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.example.examplemod;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||
modLoader="javafml" #mandatory
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||
loaderVersion="[25,)" #mandatory (24 is current forge version)
|
||||
loaderVersion="[28,)" #mandatory (28 is current forge version)
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
issueTrackerURL="http://my.issue.tracker/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
@@ -42,7 +42,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory=true #mandatory
|
||||
# The version range of the dependency
|
||||
versionRange="[25,)" #mandatory
|
||||
versionRange="[28,)" #mandatory
|
||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||
ordering="NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||
@@ -51,6 +51,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.13.2]"
|
||||
versionRange="[1.14.4]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
side="BOTH"
|
||||
@@ -11,7 +11,7 @@
|
||||
public static void populateSnooperWithOpenGL(IDataHolder p_populateSnooperWithOpenGL_0_) {
|
||||
p_populateSnooperWithOpenGL_0_.setFixedData("opengl_version", GlStateManager.getString(7938));
|
||||
p_populateSnooperWithOpenGL_0_.setFixedData("opengl_vendor", GlStateManager.getString(7936));
|
||||
@@ -909,6 +913,10 @@
|
||||
@@ -913,6 +917,10 @@
|
||||
GL13.glMultiTexCoord2f(p_glMultiTexCoord2f_0_, p_glMultiTexCoord2f_1_, p_glMultiTexCoord2f_2_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/com/mojang/blaze3d/platform/TextureUtil.java
|
||||
+++ b/com/mojang/blaze3d/platform/TextureUtil.java
|
||||
@@ -44,7 +44,10 @@
|
||||
}
|
||||
|
||||
public static void prepareImage(NativeImage.PixelFormatGLCode p_prepareImage_0_, int p_prepareImage_1_, int p_prepareImage_2_, int p_prepareImage_3_, int p_prepareImage_4_) {
|
||||
- bind(p_prepareImage_1_);
|
||||
+ synchronized (net.minecraftforge.fml.client.SplashProgress.class)
|
||||
+ {
|
||||
+ bind(p_prepareImage_1_);
|
||||
+ }
|
||||
if (p_prepareImage_2_ >= 0) {
|
||||
GlStateManager.texParameter(3553, 33085, p_prepareImage_2_);
|
||||
GlStateManager.texParameter(3553, 33082, 0);
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/advancements/AdvancementManager.java
|
||||
+++ b/net/minecraft/advancements/AdvancementManager.java
|
||||
@@ -36,7 +36,11 @@
|
||||
Map<ResourceLocation, Advancement.Builder> map = Maps.newHashMap();
|
||||
p_212853_1_.forEach((p_223387_1_, p_223387_2_) -> {
|
||||
try {
|
||||
- Advancement.Builder advancement$builder = field_192783_b.fromJson(p_223387_2_, Advancement.Builder.class);
|
||||
+ Advancement.Builder advancement$builder = net.minecraftforge.common.crafting.ConditionalAdvancement.read(field_192783_b, p_223387_1_, p_223387_2_);
|
||||
+ if (advancement$builder == null) {
|
||||
+ field_192782_a.info("Skipping loading advancement {} as it's conditions were not met", p_223387_1_);
|
||||
+ return;
|
||||
+ }
|
||||
map.put(p_223387_1_, advancement$builder);
|
||||
} catch (IllegalArgumentException | JsonParseException jsonparseexception) {
|
||||
field_192782_a.error("Parsing error loading custom advancement {}: {}", p_223387_1_, jsonparseexception.getMessage());
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/advancements/PlayerAdvancements.java
|
||||
@@ -186,6 +186,8 @@
|
||||
@@ -187,6 +187,8 @@
|
||||
}
|
||||
|
||||
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_) {
|
||||
@@ -9,8 +9,8 @@
|
||||
boolean flag = false;
|
||||
AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_);
|
||||
boolean flag1 = advancementprogress.func_192105_a();
|
||||
@@ -198,6 +200,7 @@
|
||||
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_82766_b("announceAdvancements")) {
|
||||
@@ -199,6 +201,7 @@
|
||||
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223620_w)) {
|
||||
this.field_192756_d.func_184103_al().func_148539_a(new TranslationTextComponent("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()));
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/Block.java
|
||||
+++ b/net/minecraft/block/Block.java
|
||||
@@ -74,9 +74,10 @@
|
||||
@@ -75,9 +75,10 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -13,7 +13,18 @@
|
||||
private static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
|
||||
private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() {
|
||||
public Boolean load(VoxelShape p_load_1_) {
|
||||
@@ -290,7 +291,7 @@
|
||||
@@ -246,6 +247,10 @@
|
||||
this.field_149765_K = p_i48440_1_.field_200961_i;
|
||||
this.field_208621_p = p_i48440_1_.field_208772_j;
|
||||
this.field_220085_g = p_i48440_1_.field_222381_j;
|
||||
+ this.harvestLevel = p_i48440_1_.harvestLevel;
|
||||
+ this.harvestTool = p_i48440_1_.harvestTool;
|
||||
+ final ResourceLocation lootTableCache = p_i48440_1_.field_222381_j;
|
||||
+ this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i48440_1_.lootTableSupplier != null ? p_i48440_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a());
|
||||
this.field_176227_L = builder.func_206893_a(BlockState::new);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b());
|
||||
}
|
||||
@@ -291,7 +296,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
|
||||
@@ -22,7 +33,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -302,8 +303,9 @@
|
||||
@@ -303,8 +308,9 @@
|
||||
return this.field_149789_z;
|
||||
}
|
||||
|
||||
@@ -33,7 +44,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -314,7 +316,7 @@
|
||||
@@ -315,7 +321,7 @@
|
||||
@Deprecated
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int func_220058_a(BlockState p_220058_1_, IEnviromentBlockReader p_220058_2_, BlockPos p_220058_3_) {
|
||||
@@ -42,7 +53,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -459,10 +461,9 @@
|
||||
@@ -460,10 +466,9 @@
|
||||
|
||||
@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_) {
|
||||
@@ -54,7 +65,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -471,8 +472,8 @@
|
||||
@@ -472,8 +477,8 @@
|
||||
if (f == -1.0F) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
@@ -65,25 +76,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,7 +553,7 @@
|
||||
@@ -483,8 +488,7 @@
|
||||
|
||||
public ResourceLocation func_220068_i() {
|
||||
if (this.field_220085_g == null) {
|
||||
- ResourceLocation resourcelocation = Registry.field_212618_g.func_177774_c(this);
|
||||
- this.field_220085_g = new ResourceLocation(resourcelocation.func_110624_b(), "blocks/" + resourcelocation.func_110623_a());
|
||||
+ this.field_220085_g = this.lootTableSupplier.get();
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -553,7 +557,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_82766_b("doTileDrops")) {
|
||||
+ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_82766_b("doTileDrops") && !p_180635_0_.restoringBlockSnapshots) { // do not drop items while restoring blockstates, prevents item dupe
|
||||
- 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) { // do not drop items while restoring blockstates, prevents item dupe
|
||||
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;
|
||||
@@ -564,7 +565,7 @@
|
||||
@@ -565,7 +569,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_82766_b("doTileDrops")) {
|
||||
+ if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_82766_b("doTileDrops") && !p_180637_1_.restoringBlockSnapshots) { // do not drop items while restoring blockstates, prevents item dupe
|
||||
- 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) { // do not drop items while restoring blockstates, prevents item dupe
|
||||
while(p_180637_3_ > 0) {
|
||||
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
|
||||
p_180637_3_ -= i;
|
||||
@@ -574,6 +575,7 @@
|
||||
@@ -575,6 +579,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -91,15 +112,15 @@
|
||||
public float func_149638_a() {
|
||||
return this.field_149781_w;
|
||||
}
|
||||
@@ -676,6 +678,7 @@
|
||||
@@ -677,6 +682,7 @@
|
||||
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
|
||||
return new ItemStack(this);
|
||||
@@ -690,6 +693,7 @@
|
||||
}
|
||||
@@ -690,6 +696,7 @@
|
||||
return Fluids.field_204541_a.func_207188_f();
|
||||
}
|
||||
|
||||
@@ -107,7 +128,7 @@
|
||||
public float func_208618_m() {
|
||||
return this.field_149765_K;
|
||||
}
|
||||
@@ -710,6 +714,7 @@
|
||||
@@ -710,6 +717,7 @@
|
||||
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
|
||||
}
|
||||
|
||||
@@ -115,7 +136,7 @@
|
||||
public boolean func_149659_a(Explosion p_149659_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -754,6 +759,7 @@
|
||||
@@ -754,6 +762,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +144,25 @@
|
||||
public SoundType func_220072_p(BlockState p_220072_1_) {
|
||||
return this.field_149762_H;
|
||||
}
|
||||
@@ -779,13 +785,74 @@
|
||||
@@ -763,7 +772,7 @@
|
||||
this.field_220086_i = Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
- return this.field_220086_i;
|
||||
+ return this.field_220086_i.delegate.get(); //Forge: Vanilla caches the items, update with registry replacements.
|
||||
}
|
||||
|
||||
public boolean func_208619_r() {
|
||||
@@ -771,7 +780,7 @@
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
- return "Block{" + Registry.field_212618_g.func_177774_c(this) + "}";
|
||||
+ return "Block{" + getRegistryName() + "}";
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -779,13 +788,81 @@
|
||||
}
|
||||
|
||||
public static boolean func_196252_e(Block p_196252_0_) {
|
||||
@@ -140,6 +179,8 @@
|
||||
+ protected Random RANDOM = new Random();
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private int harvestLevel;
|
||||
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Block> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, BlockTags::getGeneration, BlockTags::func_199896_a);
|
||||
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
+
|
||||
+ @Override
|
||||
+ public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) {
|
||||
@@ -189,6 +230,11 @@
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final java.util.Set<ResourceLocation> getTags() {
|
||||
+ return reverseTags.getTagNames();
|
||||
+ }
|
||||
+
|
||||
+ static {
|
||||
+ net.minecraftforge.common.ForgeHooks.setBlockToolSetter((block, tool, level) -> {
|
||||
+ block.harvestTool = tool;
|
||||
@@ -200,3 +246,47 @@
|
||||
public static enum OffsetType {
|
||||
NONE,
|
||||
XZ,
|
||||
@@ -804,6 +881,9 @@
|
||||
private float field_200961_i = 0.6F;
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_208772_j;
|
||||
+ private int harvestLevel = -1;
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
|
||||
private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
|
||||
this.field_200953_a = p_i48616_1_;
|
||||
@@ -834,6 +914,8 @@
|
||||
block$properties.field_200956_d = p_200950_0_.field_149762_H;
|
||||
block$properties.field_200961_i = p_200950_0_.func_208618_m();
|
||||
block$properties.field_208772_j = p_200950_0_.field_208621_p;
|
||||
+ block$properties.harvestLevel = p_200950_0_.harvestLevel;
|
||||
+ block$properties.harvestTool = p_200950_0_.harvestTool;
|
||||
return block$properties;
|
||||
}
|
||||
|
||||
@@ -882,13 +964,23 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
+ public Block.Properties harvestLevel(int harvestLevel) {
|
||||
+ this.harvestLevel = harvestLevel;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ public Block.Properties harvestTool(net.minecraftforge.common.ToolType harvestTool) {
|
||||
+ this.harvestTool = harvestTool;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
public Block.Properties func_222380_e() {
|
||||
this.field_222381_j = LootTables.field_186419_a;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Block.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;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
@Nullable
|
||||
private BlockState.Cache field_215707_c;
|
||||
private final int field_215708_d;
|
||||
@@ -107,10 +107,14 @@
|
||||
@@ -106,10 +106,14 @@
|
||||
return this.field_215708_d;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/CropsBlock.java
|
||||
+++ b/net/minecraft/block/CropsBlock.java
|
||||
@@ -58,12 +58,14 @@
|
||||
@@ -57,12 +57,14 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,9 +94,9 @@
|
||||
@@ -91,9 +93,9 @@
|
||||
for(int j = -1; j <= 1; ++j) {
|
||||
float f1 = 0.0F;
|
||||
BlockState blockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
|
||||
@@ -28,3 +28,12 @@
|
||||
f1 = 3.0F;
|
||||
}
|
||||
}
|
||||
@@ -129,7 +131,7 @@
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
- if (p_196262_4_ instanceof RavagerEntity && p_196262_2_.func_82736_K().func_223586_b(GameRules.field_223599_b)) {
|
||||
+ if (p_196262_4_ instanceof RavagerEntity && net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_196262_2_, p_196262_4_)) {
|
||||
p_196262_2_.func_175655_b(p_196262_3_, true);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DetectorRailBlock.java
|
||||
+++ b/net/minecraft/block/DetectorRailBlock.java
|
||||
@@ -126,6 +126,8 @@
|
||||
@@ -128,6 +128,8 @@
|
||||
|
||||
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) {
|
||||
if (p_180641_1_.func_177229_b(field_176574_M)) {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/block/FarmlandBlock.java
|
||||
+++ b/net/minecraft/block/FarmlandBlock.java
|
||||
@@ -72,7 +72,7 @@
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) {
|
||||
- if (!p_180658_1_.field_72995_K && p_180658_1_.field_73012_v.nextFloat() < p_180658_4_ - 0.5F && p_180658_3_ instanceof LivingEntity && (p_180658_3_ instanceof PlayerEntity || p_180658_1_.func_82736_K().func_82766_b("mobGriefing")) && p_180658_3_.func_213311_cf() * p_180658_3_.func_213311_cf() * p_180658_3_.func_213302_cg() > 0.512F) {
|
||||
- if (!p_180658_1_.field_72995_K && p_180658_1_.field_73012_v.nextFloat() < p_180658_4_ - 0.5F && p_180658_3_ instanceof LivingEntity && (p_180658_3_ instanceof PlayerEntity || p_180658_1_.func_82736_K().func_223586_b(GameRules.field_223599_b)) && p_180658_3_.func_213311_cf() * p_180658_3_.func_213311_cf() * p_180658_3_.func_213302_cg() > 0.512F) {
|
||||
+ if (!p_180658_1_.field_72995_K && net.minecraftforge.common.ForgeHooks.onFarmlandTrample(p_180658_1_, p_180658_2_, Blocks.field_150346_d.func_176223_P(), p_180658_4_, p_180658_3_)) { // Forge: Move logic to Entity#canTrample
|
||||
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
@@ -84,9 +84,9 @@
|
||||
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_));
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
|
||||
@@ -95,7 +95,7 @@
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/block/FireBlock.java
|
||||
+++ b/net/minecraft/block/FireBlock.java
|
||||
@@ -63,13 +63,13 @@
|
||||
@@ -64,13 +64,13 @@
|
||||
public 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) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) {
|
||||
- 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)) {
|
||||
BlockState blockstate1 = this.func_176223_P();
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,12 +90,14 @@
|
||||
@@ -91,12 +91,14 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
if (p_196267_2_.func_82736_K().func_82766_b("doFireTick")) {
|
||||
if (p_196267_2_.func_82736_K().func_223586_b(GameRules.field_223598_a)) {
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire
|
||||
if (!p_196267_1_.func_196955_c(p_196267_2_, p_196267_3_)) {
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
@@ -32,7 +32,7 @@
|
||||
int i = p_196267_1_.func_177229_b(field_176543_a);
|
||||
if (!flag && p_196267_2_.func_72896_J() && this.func_176537_d(p_196267_2_, p_196267_3_) && p_196267_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
@@ -117,7 +119,7 @@
|
||||
@@ -118,7 +120,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
return;
|
||||
}
|
||||
@@ -125,12 +127,12 @@
|
||||
@@ -126,12 +128,12 @@
|
||||
|
||||
boolean flag1 = p_196267_2_.func_180502_D(p_196267_3_);
|
||||
int k = flag1 ? -50 : 0;
|
||||
@@ -60,7 +60,7 @@
|
||||
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
|
||||
|
||||
for(int l = -1; l <= 1; ++l) {
|
||||
@@ -168,16 +170,18 @@
|
||||
@@ -169,16 +171,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());
|
||||
}
|
||||
|
||||
@@ -83,7 +83,19 @@
|
||||
if (p_176536_4_.nextInt(p_176536_3_) < i) {
|
||||
BlockState blockstate = p_176536_1_.func_180495_p(p_176536_2_);
|
||||
if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) {
|
||||
@@ -198,7 +202,7 @@
|
||||
@@ -188,18 +192,14 @@
|
||||
p_176536_1_.func_217377_a(p_176536_2_, false);
|
||||
}
|
||||
|
||||
- Block block = blockstate.func_177230_c();
|
||||
- if (block instanceof TNTBlock) {
|
||||
- TNTBlock tntblock = (TNTBlock)block;
|
||||
- TNTBlock.func_196534_a(p_176536_1_, p_176536_2_);
|
||||
- }
|
||||
+ blockstate.catchFire(p_176536_1_, p_176536_2_, face, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) {
|
||||
for(Direction direction : Direction.values()) {
|
||||
@@ -92,7 +104,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -214,13 +218,14 @@
|
||||
@@ -215,13 +215,14 @@
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction));
|
||||
@@ -108,18 +120,18 @@
|
||||
public boolean func_196446_i(BlockState p_196446_1_) {
|
||||
return this.func_220275_r(p_196446_1_) > 0;
|
||||
}
|
||||
@@ -245,8 +250,8 @@
|
||||
@@ -246,8 +247,8 @@
|
||||
|
||||
BlockPos blockpos = p_180655_3_.func_177977_b();
|
||||
BlockState blockstate = p_180655_2_.func_180495_p(blockpos);
|
||||
- if (!this.func_196446_i(blockstate) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
|
||||
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_180655_2_, blockpos, Direction.UP)) {
|
||||
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177976_e()))) {
|
||||
+ if (!this.canCatchFire(p_180655_2_, blockpos, Direction.UP) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
|
||||
+ if (this.canCatchFire(p_180655_2_, blockpos.func_177976_e(), Direction.EAST)) {
|
||||
for(int j = 0; j < 2; ++j) {
|
||||
double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * (double)0.1F;
|
||||
double d8 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -255,7 +260,7 @@
|
||||
@@ -256,7 +257,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +140,7 @@
|
||||
for(int k = 0; k < 2; ++k) {
|
||||
double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
|
||||
double d9 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -264,7 +269,7 @@
|
||||
@@ -265,7 +266,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +149,7 @@
|
||||
for(int l = 0; l < 2; ++l) {
|
||||
double d5 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
|
||||
double d10 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -273,7 +278,7 @@
|
||||
@@ -274,7 +275,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +158,7 @@
|
||||
for(int i1 = 0; i1 < 2; ++i1) {
|
||||
double d6 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
|
||||
double d11 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -282,7 +287,7 @@
|
||||
@@ -283,7 +284,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +167,7 @@
|
||||
for(int j1 = 0; j1 < 2; ++j1) {
|
||||
double d7 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
|
||||
double d12 = (double)(p_180655_3_.func_177956_o() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
|
||||
@@ -310,10 +315,23 @@
|
||||
@@ -311,10 +312,23 @@
|
||||
}
|
||||
|
||||
public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) {
|
||||
|
||||
@@ -1,11 +1,79 @@
|
||||
--- a/net/minecraft/block/FlowerPotBlock.java
|
||||
+++ b/net/minecraft/block/FlowerPotBlock.java
|
||||
@@ -21,7 +21,7 @@
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class FlowerPotBlock extends Block {
|
||||
- private static final Map<Block, Block> field_196451_b = Maps.newHashMap();
|
||||
+ private static final Map<Block, Block> field_196451_b = Maps.newHashMap(); //TODO: Delegates
|
||||
@@ -23,10 +23,37 @@
|
||||
protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D);
|
||||
private final Block field_196452_c;
|
||||
|
||||
+ private final Map<net.minecraft.util.ResourceLocation, java.util.function.Supplier<? extends Block>> fullPots;
|
||||
+ private final java.util.function.Supplier<FlowerPotBlock> emptyPot;
|
||||
+ private final java.util.function.Supplier<? extends Block> flowerDelegate;
|
||||
+
|
||||
+ @Deprecated // Mods should use the constructor below
|
||||
public FlowerPotBlock(Block p_i48395_1_, Block.Properties p_i48395_2_) {
|
||||
+ this(Blocks.field_150457_bL == null ? null : () -> (FlowerPotBlock) Blocks.field_150457_bL.delegate.get(), () -> p_i48395_1_.delegate.get(), p_i48395_2_);
|
||||
+ if (Blocks.field_150457_bL != null) {
|
||||
+ ((FlowerPotBlock)Blocks.field_150457_bL).addPlant(p_i48395_1_.getRegistryName(), () -> this);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * For mod use, eliminates the need to extend this class, and prevents modded
|
||||
+ * flower pots from altering vanilla behavior.
|
||||
+ *
|
||||
+ * @param emptyPot The empty pot for this pot, or null for self.
|
||||
+ * @param p_i48395_1_ The flower block.
|
||||
+ * @param p_i48395_2_
|
||||
+ */
|
||||
+ public FlowerPotBlock(@javax.annotation.Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, Block.Properties p_i48395_2_) {
|
||||
super(p_i48395_2_);
|
||||
- this.field_196452_c = p_i48395_1_;
|
||||
- field_196451_b.put(p_i48395_1_, this);
|
||||
+ this.field_196452_c = null; // Unused, redirected by coremod
|
||||
+ this.flowerDelegate = p_i48395_1_;
|
||||
+ if (emptyPot == null) {
|
||||
+ this.fullPots = Maps.newHashMap();
|
||||
+ this.emptyPot = null;
|
||||
+ } else {
|
||||
+ this.fullPots = java.util.Collections.emptyMap();
|
||||
+ this.emptyPot = emptyPot;
|
||||
+ }
|
||||
}
|
||||
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
@@ -40,7 +67,7 @@
|
||||
public boolean func_220051_a(BlockState p_220051_1_, World p_220051_2_, BlockPos p_220051_3_, PlayerEntity p_220051_4_, Hand p_220051_5_, BlockRayTraceResult p_220051_6_) {
|
||||
ItemStack itemstack = p_220051_4_.func_184586_b(p_220051_5_);
|
||||
Item item = itemstack.func_77973_b();
|
||||
- Block block = item instanceof BlockItem ? field_196451_b.getOrDefault(((BlockItem)item).func_179223_d(), Blocks.field_150350_a) : Blocks.field_150350_a;
|
||||
+ Block block = item instanceof BlockItem ? getEmptyPot().fullPots.getOrDefault(((BlockItem)item).func_179223_d().getRegistryName(), Blocks.field_150350_a.delegate).get() : Blocks.field_150350_a;
|
||||
boolean flag = block == Blocks.field_150350_a;
|
||||
boolean flag1 = this.field_196452_c == Blocks.field_150350_a;
|
||||
if (flag != flag1) {
|
||||
@@ -58,7 +85,7 @@
|
||||
p_220051_4_.func_71019_a(itemstack1, false);
|
||||
}
|
||||
|
||||
- p_220051_2_.func_180501_a(p_220051_3_, Blocks.field_150457_bL.func_176223_P(), 3);
|
||||
+ p_220051_2_.func_180501_a(p_220051_3_, getEmptyPot().func_176223_P(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +105,17 @@
|
||||
}
|
||||
|
||||
public Block func_220276_d() {
|
||||
- return this.field_196452_c;
|
||||
+ return flowerDelegate.get();
|
||||
}
|
||||
+
|
||||
+ public FlowerPotBlock getEmptyPot() {
|
||||
+ return emptyPot == null ? this : emptyPot.get();
|
||||
+ }
|
||||
+
|
||||
+ public void addPlant(net.minecraft.util.ResourceLocation flower, java.util.function.Supplier<? extends Block> fullPot) {
|
||||
+ if (getEmptyPot() != this) {
|
||||
+ throw new IllegalArgumentException("Cannot add plant to non-empty pot: " + this);
|
||||
+ }
|
||||
+ fullPots.put(flower, fullPot);
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
--- a/net/minecraft/block/FlowingFluidBlock.java
|
||||
+++ b/net/minecraft/block/FlowingFluidBlock.java
|
||||
@@ -30,9 +30,11 @@
|
||||
|
||||
public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
|
||||
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
|
||||
- protected final FlowingFluid field_204517_c;
|
||||
+ private final FlowingFluid field_204517_c;
|
||||
private final List<IFluidState> field_212565_c;
|
||||
|
||||
+ // Forge: Use the constructor that takes a supplier
|
||||
+ @Deprecated
|
||||
protected FlowingFluidBlock(FlowingFluid p_i49014_1_, Block.Properties p_i49014_2_) {
|
||||
super(p_i49014_2_);
|
||||
this.field_204517_c = p_i49014_1_;
|
||||
@@ -45,8 +47,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)));
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ supplier = p_i49014_1_.delegate;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @param supplier A fluid supplier such as {@link net.minecraftforge.fml.RegistryObject<Fluid>}
|
||||
+ */
|
||||
+ public FlowingFluidBlock(java.util.function.Supplier<? extends FlowingFluid> supplier, Block.Properties p_i48368_1_) {
|
||||
+ super(p_i48368_1_);
|
||||
+ this.field_204517_c = null;
|
||||
+ this.field_212565_c = Lists.newArrayList();
|
||||
+ this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
|
||||
+ this.supplier = supplier;
|
||||
+ }
|
||||
+
|
||||
public void func_196265_a(BlockState p_196265_1_, World p_196265_2_, BlockPos p_196265_3_, Random p_196265_4_) {
|
||||
p_196265_2_.func_204610_c(p_196265_3_).func_206891_b(p_196265_2_, p_196265_3_, p_196265_4_);
|
||||
}
|
||||
@@ -61,6 +76,7 @@
|
||||
|
||||
public IFluidState func_204507_t(BlockState p_204507_1_) {
|
||||
int i = p_204507_1_.func_177229_b(field_176367_b);
|
||||
+ if (!fluidStateCacheInitialized) initFluidStateCache();
|
||||
return this.field_212565_c.get(Math.min(i, 8));
|
||||
}
|
||||
|
||||
@@ -121,13 +137,13 @@
|
||||
if (flag) {
|
||||
IFluidState ifluidstate = p_204515_1_.func_204610_c(p_204515_2_);
|
||||
if (ifluidstate.func_206889_d()) {
|
||||
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150343_Z.func_176223_P());
|
||||
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150343_Z.func_176223_P()));
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ifluidstate.func_215679_a(p_204515_1_, p_204515_2_) >= 0.44444445F) {
|
||||
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150347_e.func_176223_P());
|
||||
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150347_e.func_176223_P()));
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
@@ -160,4 +176,27 @@
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ private final java.util.function.Supplier<? extends Fluid> supplier;
|
||||
+ public FlowingFluid getFluid() {
|
||||
+ return (FlowingFluid)supplier.get();
|
||||
+ }
|
||||
+
|
||||
+ private boolean fluidStateCacheInitialized = false;
|
||||
+ protected synchronized void initFluidStateCache() {
|
||||
+ if (fluidStateCacheInitialized == false)
|
||||
+ {
|
||||
+ this.field_212565_c.add(getFluid().func_207204_a(false));
|
||||
+
|
||||
+ for (int i = 1; i < 8; ++i)
|
||||
+ {
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8 - i, false));
|
||||
+ }
|
||||
+
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8, true));
|
||||
+
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/block/JigsawBlock.java
|
||||
+++ b/net/minecraft/block/JigsawBlock.java
|
||||
@@ -29,6 +29,13 @@
|
||||
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)));
|
||||
}
|
||||
|
||||
+ // FORGE: Fix jigsaw blocks not mirroring properly
|
||||
+ @Override
|
||||
+ @Deprecated
|
||||
+ public BlockState func_185471_a(BlockState state, net.minecraft.util.Mirror mirrorIn) {
|
||||
+ return state.func_206870_a(field_176387_N, mirrorIn.func_185803_b(state.func_177229_b(field_176387_N)));
|
||||
+ }
|
||||
+
|
||||
public BlockState func_196258_a(BlockItemUseContext p_196258_1_) {
|
||||
return this.func_176223_P().func_206870_a(field_176387_N, p_196258_1_.func_196000_l());
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/block/KelpTopBlock.java
|
||||
+++ b/net/minecraft/block/KelpTopBlock.java
|
||||
@@ -57,8 +57,9 @@
|
||||
} else {
|
||||
BlockPos blockpos = p_196267_3_.func_177984_a();
|
||||
BlockState blockstate = p_196267_2_.func_180495_p(blockpos);
|
||||
- if (blockstate.func_177230_c() == Blocks.field_150355_j && p_196267_1_.func_177229_b(field_203163_a) < 25 && p_196267_4_.nextDouble() < 0.14D) {
|
||||
+ if (blockstate.func_177230_c() == Blocks.field_150355_j && p_196267_1_.func_177229_b(field_203163_a) < 25 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, p_196267_4_.nextDouble() < 0.14D)) {
|
||||
p_196267_2_.func_175656_a(blockpos, p_196267_1_.func_177231_a(field_203163_a));
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/NetherPortalBlock.java
|
||||
+++ b/net/minecraft/block/NetherPortalBlock.java
|
||||
@@ -68,7 +68,7 @@
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
public boolean func_176548_d(IWorld p_176548_1_, BlockPos p_176548_2_) {
|
||||
NetherPortalBlock.Size netherportalblock$size = this.func_201816_b(p_176548_1_, p_176548_2_);
|
||||
@@ -9,3 +9,48 @@
|
||||
netherportalblock$size.func_150859_c();
|
||||
return true;
|
||||
} else {
|
||||
@@ -245,13 +245,13 @@
|
||||
int i;
|
||||
for(i = 0; i < 22; ++i) {
|
||||
BlockPos blockpos = p_180120_1_.func_177967_a(p_180120_2_, i);
|
||||
- if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || this.field_150867_a.func_180495_p(blockpos.func_177977_b()).func_177230_c() != Blocks.field_150343_Z) {
|
||||
+ if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || !this.field_150867_a.func_180495_p(blockpos.func_177977_b()).isPortalFrame(this.field_150867_a, blockpos.func_177977_b())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- Block block = this.field_150867_a.func_180495_p(p_180120_1_.func_177967_a(p_180120_2_, i)).func_177230_c();
|
||||
- return block == Blocks.field_150343_Z ? i : 0;
|
||||
+ BlockPos framePos = p_180120_1_.func_177967_a(p_180120_2_, i);
|
||||
+ return this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos) ? i : 0;
|
||||
}
|
||||
|
||||
public int func_181100_a() {
|
||||
@@ -278,13 +278,13 @@
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150863_d)).func_177230_c();
|
||||
- if (block != Blocks.field_150343_Z) {
|
||||
+ BlockPos framePos = blockpos.func_177972_a(this.field_150863_d);
|
||||
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
|
||||
break label56;
|
||||
}
|
||||
} else if (i == this.field_150868_h - 1) {
|
||||
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150866_c)).func_177230_c();
|
||||
- if (block != Blocks.field_150343_Z) {
|
||||
+ BlockPos framePos = blockpos.func_177972_a(this.field_150866_c);
|
||||
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
|
||||
break label56;
|
||||
}
|
||||
}
|
||||
@@ -292,7 +292,8 @@
|
||||
}
|
||||
|
||||
for(int j = 0; j < this.field_150868_h; ++j) {
|
||||
- if (this.field_150867_a.func_180495_p(this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g)).func_177230_c() != Blocks.field_150343_Z) {
|
||||
+ BlockPos framePos = this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g);
|
||||
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
|
||||
this.field_150862_g = 0;
|
||||
break;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/NetherWartBlock.java
|
||||
+++ b/net/minecraft/block/NetherWartBlock.java
|
||||
@@ -33,9 +33,10 @@
|
||||
@@ -31,9 +31,10 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
int i = p_196267_1_.func_177229_b(field_176486_a);
|
||||
|
||||
@@ -1,6 +1,22 @@
|
||||
--- a/net/minecraft/block/PistonBlock.java
|
||||
+++ b/net/minecraft/block/PistonBlock.java
|
||||
@@ -197,7 +197,7 @@
|
||||
@@ -166,6 +166,7 @@
|
||||
}
|
||||
|
||||
if (p_189539_4_ == 0) {
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, true)) return false;
|
||||
if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -173,6 +174,7 @@
|
||||
p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67);
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F);
|
||||
} else if (p_189539_4_ == 1 || p_189539_4_ == 2) {
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, false)) return false;
|
||||
TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction));
|
||||
if (tileentity1 instanceof PistonTileEntity) {
|
||||
((PistonTileEntity)tileentity1).func_145866_f();
|
||||
@@ -197,7 +199,7 @@
|
||||
}
|
||||
|
||||
if (!flag1) {
|
||||
@@ -9,7 +25,15 @@
|
||||
p_189539_2_.func_217377_a(p_189539_3_.func_177972_a(direction), false);
|
||||
} else {
|
||||
this.func_176319_a(p_189539_2_, p_189539_3_, direction, false);
|
||||
@@ -238,7 +238,7 @@
|
||||
@@ -210,6 +212,7 @@
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187712_dQ, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.15F + 0.6F);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPistonMovePost(p_189539_2_, p_189539_3_, direction, (p_189539_4_ == 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -238,7 +241,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -18,7 +42,7 @@
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -274,7 +274,7 @@
|
||||
@@ -274,7 +277,7 @@
|
||||
for(int j = list2.size() - 1; j >= 0; --j) {
|
||||
BlockPos blockpos2 = list2.get(j);
|
||||
BlockState blockstate = p_176319_1_.func_180495_p(blockpos2);
|
||||
@@ -27,7 +51,7 @@
|
||||
func_220059_a(blockstate, p_176319_1_, blockpos2, tileentity);
|
||||
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
|
||||
--k;
|
||||
@@ -328,6 +328,10 @@
|
||||
@@ -328,6 +331,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)));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,26 +4,43 @@
|
||||
public class PoweredRailBlock extends AbstractRailBlock {
|
||||
public static final EnumProperty<RailShape> field_176568_b = BlockStateProperties.field_208166_S;
|
||||
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
|
||||
+ private final boolean isActivator;
|
||||
+ private final boolean isActivator; // TRUE for an Activator Rail, FALSE for Powered Rail
|
||||
|
||||
protected PoweredRailBlock(Block.Properties p_i48349_1_) {
|
||||
- super(true, p_i48349_1_);
|
||||
+ this(p_i48349_1_, false);
|
||||
+ }
|
||||
+
|
||||
+ protected PoweredRailBlock(Block.Properties builder, boolean isActivator) {
|
||||
+ protected PoweredRailBlock(Block.Properties builder, boolean isPoweredRail) {
|
||||
+ super(true, builder);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false)));
|
||||
+ this.isActivator = isActivator;
|
||||
+ this.isActivator = !isPoweredRail;
|
||||
}
|
||||
|
||||
protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, BlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) {
|
||||
@@ -105,7 +111,7 @@
|
||||
RailShape railshape = blockstate.func_177229_b(field_176568_b);
|
||||
@@ -99,13 +105,13 @@
|
||||
|
||||
protected boolean func_208071_a(World p_208071_1_, BlockPos p_208071_2_, boolean p_208071_3_, int p_208071_4_, RailShape p_208071_5_) {
|
||||
BlockState blockstate = p_208071_1_.func_180495_p(p_208071_2_);
|
||||
- if (blockstate.func_177230_c() != this) {
|
||||
+ if (!(blockstate.func_177230_c() instanceof PoweredRailBlock)) {
|
||||
return false;
|
||||
} else {
|
||||
- RailShape railshape = blockstate.func_177229_b(field_176568_b);
|
||||
+ RailShape railshape = getRailDirection(blockstate, p_208071_1_, p_208071_2_, null);
|
||||
if (p_208071_5_ != RailShape.EAST_WEST || railshape != RailShape.NORTH_SOUTH && railshape != RailShape.ASCENDING_NORTH && railshape != RailShape.ASCENDING_SOUTH) {
|
||||
if (p_208071_5_ != RailShape.NORTH_SOUTH || railshape != RailShape.EAST_WEST && railshape != RailShape.ASCENDING_EAST && railshape != RailShape.ASCENDING_WEST) {
|
||||
- if (blockstate.func_177229_b(field_176569_M)) {
|
||||
+ if (!(blockstate.func_177230_c() instanceof PoweredRailBlock) || isActivator != ((PoweredRailBlock)blockstate.func_177230_c()).isActivator) {
|
||||
+ if (isActivator == ((PoweredRailBlock)blockstate.func_177230_c()).isActivator) {
|
||||
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 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176568_b, field_176569_M);
|
||||
}
|
||||
+
|
||||
+ public boolean isActivatorRail() {
|
||||
+ return isActivator;
|
||||
+ }
|
||||
}
|
||||
@@ -3,10 +3,10 @@
|
||||
@@ -124,7 +124,7 @@
|
||||
BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1);
|
||||
if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) {
|
||||
boolean flag = Block.func_220056_d(blockstate, p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
|
||||
boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
|
||||
- if (flag && func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177984_a()))) {
|
||||
+ if (flag && canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177984_a()), p_208074_1_, blockpos.func_177984_a(), null)) {
|
||||
if (func_208062_a(blockstate.func_196952_d(p_208074_1_, blockpos))) {
|
||||
if (blockstate.func_224756_o(p_208074_1_, blockpos)) {
|
||||
return RedstoneSide.UP;
|
||||
}
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/ScaffoldingBlock.java
|
||||
+++ b/net/minecraft/block/ScaffoldingBlock.java
|
||||
@@ -142,6 +142,8 @@
|
||||
return i;
|
||||
}
|
||||
|
||||
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
|
||||
+
|
||||
static {
|
||||
VoxelShape voxelshape = Block.func_208617_a(0.0D, 14.0D, 0.0D, 16.0D, 16.0D, 16.0D);
|
||||
VoxelShape voxelshape1 = Block.func_208617_a(0.0D, 0.0D, 0.0D, 2.0D, 16.0D, 2.0D);
|
||||
@@ -1,18 +0,0 @@
|
||||
--- a/net/minecraft/block/SoundType.java
|
||||
+++ b/net/minecraft/block/SoundType.java
|
||||
@@ -54,7 +54,6 @@
|
||||
return this.field_185861_n;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public SoundEvent func_185845_c() {
|
||||
return this.field_185862_o;
|
||||
}
|
||||
@@ -67,7 +66,6 @@
|
||||
return this.field_185864_q;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public SoundEvent func_185846_f() {
|
||||
return this.field_185865_r;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SpawnerBlock.java
|
||||
+++ b/net/minecraft/block/SpawnerBlock.java
|
||||
@@ -21,10 +21,13 @@
|
||||
@@ -19,10 +19,13 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World 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_);
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
|
||||
if (!func_220257_b(p_196267_1_, p_196267_2_, p_196267_3_)) {
|
||||
p_196267_2_.func_175656_a(p_196267_3_, Blocks.field_150346_d.func_176223_P());
|
||||
} else if (p_196267_2_.func_201696_r(p_196267_3_.func_177984_a()) >= 4) {
|
||||
} else {
|
||||
@@ -0,0 +1,40 @@
|
||||
--- a/net/minecraft/block/StairsBlock.java
|
||||
+++ b/net/minecraft/block/StairsBlock.java
|
||||
@@ -83,13 +83,24 @@
|
||||
return voxelshape;
|
||||
}
|
||||
|
||||
+ // Forge: Use the other constructor that takes a Supplier
|
||||
+ @Deprecated
|
||||
protected StairsBlock(BlockState p_i48321_1_, Block.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();
|
||||
this.field_150151_M = p_i48321_1_;
|
||||
+ this.stateSupplier = () -> p_i48321_1_;
|
||||
}
|
||||
|
||||
+ public StairsBlock(java.util.function.Supplier<BlockState> state, Block.Properties properties) {
|
||||
+ super(properties);
|
||||
+ 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 = Blocks.field_150350_a; // These are unused, fields are redirected
|
||||
+ this.field_150151_M = Blocks.field_150350_a.func_176223_P();
|
||||
+ this.stateSupplier = state;
|
||||
+ }
|
||||
+
|
||||
public boolean func_220074_n(BlockState p_220074_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -265,4 +276,12 @@
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ private final java.util.function.Supplier<BlockState> stateSupplier;
|
||||
+ private Block getModelBlock() {
|
||||
+ return getModelState().func_177230_c();
|
||||
+ }
|
||||
+ private BlockState getModelState() {
|
||||
+ return stateSupplier.get();
|
||||
+ }
|
||||
}
|
||||
@@ -30,3 +30,14 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -100,4 +102,10 @@
|
||||
public StemGrownBlock func_208486_d() {
|
||||
return this.field_149877_a;
|
||||
}
|
||||
+
|
||||
+ //FORGE START
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
+ return net.minecraftforge.common.PlantType.Crop;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/block/SweetBerryBushBlock.java
|
||||
+++ b/net/minecraft/block/SweetBerryBushBlock.java
|
||||
@@ -47,8 +47,9 @@
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
int i = p_196267_1_.func_177229_b(field_220125_a);
|
||||
- if (i < 3 && p_196267_4_.nextInt(5) == 0 && p_196267_2_.func_201669_a(p_196267_3_.func_177984_a(), 0) >= 9) {
|
||||
+ if (i < 3 && p_196267_2_.func_201669_a(p_196267_3_.func_177984_a(), 0) >= 9 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(5) == 0)) {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_220125_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
--- a/net/minecraft/block/TNTBlock.java
|
||||
+++ b/net/minecraft/block/TNTBlock.java
|
||||
@@ -28,10 +28,14 @@
|
||||
this.func_180632_j(this.func_176223_P().func_206870_a(field_212569_a, Boolean.valueOf(false)));
|
||||
}
|
||||
|
||||
+ public void catchFire(BlockState state, World world, BlockPos pos, @Nullable net.minecraft.util.Direction face, @Nullable LivingEntity igniter) {
|
||||
+ func_196535_a(world, pos, igniter);
|
||||
+ }
|
||||
+
|
||||
public void func_220082_b(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_) {
|
||||
if (p_220082_4_.func_177230_c() != p_220082_1_.func_177230_c()) {
|
||||
if (p_220082_2_.func_175640_z(p_220082_3_)) {
|
||||
- func_196534_a(p_220082_2_, p_220082_3_);
|
||||
+ catchFire(p_220082_1_, p_220082_2_, p_220082_3_, null, null);
|
||||
p_220082_2_.func_217377_a(p_220082_3_, false);
|
||||
}
|
||||
|
||||
@@ -40,7 +44,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_.func_175640_z(p_220069_3_)) {
|
||||
- func_196534_a(p_220069_2_, p_220069_3_);
|
||||
+ catchFire(p_220069_1_, p_220069_2_, p_220069_3_, null, null);
|
||||
p_220069_2_.func_217377_a(p_220069_3_, false);
|
||||
}
|
||||
|
||||
@@ -48,7 +52,7 @@
|
||||
|
||||
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) {
|
||||
if (!p_176208_1_.func_201670_d() && !p_176208_4_.func_184812_l_() && p_176208_3_.func_177229_b(field_212569_a)) {
|
||||
- func_196534_a(p_176208_1_, p_176208_2_);
|
||||
+ catchFire(p_176208_3_, p_176208_1_, p_176208_2_, null, null);
|
||||
}
|
||||
|
||||
super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_);
|
||||
@@ -62,10 +66,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Prefer using IForgeBlock#catchFire
|
||||
public static void func_196534_a(World p_196534_0_, BlockPos p_196534_1_) {
|
||||
func_196535_a(p_196534_0_, p_196534_1_, (LivingEntity)null);
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Prefer using IForgeBlock#catchFire
|
||||
private static void func_196535_a(World p_196535_0_, BlockPos p_196535_1_, @Nullable LivingEntity p_196535_2_) {
|
||||
if (!p_196535_0_.field_72995_K) {
|
||||
TNTEntity tntentity = new TNTEntity(p_196535_0_, (double)((float)p_196535_1_.func_177958_n() + 0.5F), (double)p_196535_1_.func_177956_o(), (double)((float)p_196535_1_.func_177952_p() + 0.5F), p_196535_2_);
|
||||
@@ -80,7 +86,7 @@
|
||||
if (item != Items.field_151033_d && item != Items.field_151059_bz) {
|
||||
return super.func_220051_a(p_220051_1_, p_220051_2_, p_220051_3_, p_220051_4_, p_220051_5_, p_220051_6_);
|
||||
} else {
|
||||
- func_196535_a(p_220051_2_, p_220051_3_, p_220051_4_);
|
||||
+ catchFire(p_220051_1_, p_220051_2_, p_220051_3_, p_220051_6_.func_216354_b(), p_220051_4_);
|
||||
p_220051_2_.func_180501_a(p_220051_3_, Blocks.field_150350_a.func_176223_P(), 11);
|
||||
if (item == Items.field_151033_d) {
|
||||
itemstack.func_222118_a(1, p_220051_4_, (p_220287_1_) -> {
|
||||
@@ -100,7 +106,7 @@
|
||||
Entity entity = abstractarrowentity.func_212360_k();
|
||||
if (abstractarrowentity.func_70027_ad()) {
|
||||
BlockPos blockpos = p_220066_3_.func_216350_a();
|
||||
- func_196535_a(p_220066_1_, blockpos, entity instanceof LivingEntity ? (LivingEntity)entity : null);
|
||||
+ catchFire(p_220066_2_, p_220066_1_, blockpos, null, entity instanceof LivingEntity ? (LivingEntity)entity : null);
|
||||
p_220066_1_.func_217377_a(blockpos, false);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
--- a/net/minecraft/block/TrapDoorBlock.java
|
||||
+++ b/net/minecraft/block/TrapDoorBlock.java
|
||||
@@ -151,4 +151,14 @@
|
||||
|
||||
@@ -153,6 +153,16 @@
|
||||
return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
|
||||
}
|
||||
+
|
||||
|
||||
+ @Override
|
||||
+ public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) {
|
||||
+ if (state.func_177229_b(field_176283_b)) {
|
||||
@@ -14,4 +13,7 @@
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
public boolean func_220067_a(BlockState p_220067_1_, IBlockReader p_220067_2_, BlockPos p_220067_3_, EntityType<?> p_220067_4_) {
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/TurtleEggBlock.java
|
||||
+++ b/net/minecraft/block/TurtleEggBlock.java
|
||||
@@ -146,7 +146,7 @@
|
||||
if (p_212570_2_ instanceof TurtleEntity) {
|
||||
return false;
|
||||
} else {
|
||||
- return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? p_212570_1_.func_82736_K().func_223586_b(GameRules.field_223599_b) : true;
|
||||
+ return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_) : true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,3 +18,10 @@
|
||||
Direction direction = Direction.func_176741_a(p_196267_4_);
|
||||
BlockPos blockpos = p_196267_3_.func_177984_a();
|
||||
if (direction.func_176740_k().func_176722_c() && !p_196267_1_.func_177229_b(func_176267_a(direction))) {
|
||||
@@ -329,4 +329,6 @@
|
||||
public static BooleanProperty func_176267_a(Direction p_176267_0_) {
|
||||
return field_196546_A.get(p_176267_0_);
|
||||
}
|
||||
+
|
||||
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -142,7 +142,7 @@
|
||||
@@ -143,7 +143,7 @@
|
||||
public final KeyBinding[] field_151456_ac = new KeyBinding[]{new KeyBinding("key.hotbar.1", 49, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 50, "key.categories.inventory"), new KeyBinding("key.hotbar.3", 51, "key.categories.inventory"), new KeyBinding("key.hotbar.4", 52, "key.categories.inventory"), new KeyBinding("key.hotbar.5", 53, "key.categories.inventory"), new KeyBinding("key.hotbar.6", 54, "key.categories.inventory"), new KeyBinding("key.hotbar.7", 55, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 56, "key.categories.inventory"), new KeyBinding("key.hotbar.9", 57, "key.categories.inventory")};
|
||||
public final KeyBinding field_193629_ap = new KeyBinding("key.saveToolbarActivator", 67, "key.categories.creative");
|
||||
public final KeyBinding field_193630_aq = new KeyBinding("key.loadToolbarActivator", 88, "key.categories.creative");
|
||||
@@ -9,7 +9,7 @@
|
||||
protected Minecraft field_74317_L;
|
||||
private final File field_74354_ai;
|
||||
public Difficulty field_74318_M = Difficulty.NORMAL;
|
||||
@@ -161,6 +161,7 @@
|
||||
@@ -162,6 +162,7 @@
|
||||
public String field_74363_ab = "en_us";
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
@@ -17,7 +17,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) {
|
||||
@@ -462,7 +463,11 @@
|
||||
@@ -467,7 +468,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s1.equals("key_" + keybinding.func_151464_g())) {
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,6 +515,7 @@
|
||||
@@ -515,6 +520,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
@@ -38,7 +38,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));
|
||||
@@ -583,7 +589,7 @@
|
||||
@@ -589,7 +595,7 @@
|
||||
printwriter.println("glDebugVerbosity:" + this.field_209231_W);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -680,6 +686,25 @@
|
||||
@@ -686,6 +692,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
Screen.wrapScreenError(() -> {
|
||||
if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) {
|
||||
if (p_197961_5_ == 0) {
|
||||
- aboolean[0] = inestedguieventhandler.keyReleased(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
- aboolean[0] = inestedguieventhandler.func_223281_a_(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyReleasedPre(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = inestedguieventhandler.keyReleased(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = inestedguieventhandler.func_223281_a_(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyReleasedPost(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -25,6 +25,22 @@
|
||||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_147129_ai = func_147122_X();
|
||||
this.field_71437_Z = null;
|
||||
@@ -423,6 +423,7 @@
|
||||
screensize = new ScreenSize(this.field_71474_y.field_92118_B, this.field_71474_y.field_92119_C, screensize.field_216496_c, screensize.field_216497_d, screensize.field_216498_e);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.join();
|
||||
LongSupplier longsupplier = GLX.initGlfw();
|
||||
if (longsupplier != null) {
|
||||
Util.field_211180_a = longsupplier;
|
||||
@@ -442,7 +443,6 @@
|
||||
|
||||
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
|
||||
this.field_71417_B = new MouseHelper(this);
|
||||
- this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i());
|
||||
this.field_195559_v = new KeyboardListener(this);
|
||||
this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i());
|
||||
GLX.init();
|
||||
@@ -451,6 +451,7 @@
|
||||
this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F);
|
||||
this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC);
|
||||
@@ -33,70 +49,59 @@
|
||||
this.field_110448_aq.func_198983_a();
|
||||
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
|
||||
|
||||
@@ -463,6 +464,7 @@
|
||||
this.field_135017_as.func_135043_a(list);
|
||||
this.field_71446_o = new TextureManager(this.field_110451_am);
|
||||
this.field_110451_am.func_219534_a(this.field_71446_o);
|
||||
+ //net.minecraftforge.fml.client.SplashProgress.drawVanillaScreen(this.textureManager);
|
||||
this.func_213226_a();
|
||||
this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az);
|
||||
this.field_71469_aa = new SaveFormat(this.field_71412_D.toPath().resolve("saves"), this.field_71412_D.toPath().resolve("backups"), this.field_184131_U);
|
||||
@@ -480,11 +482,14 @@
|
||||
|
||||
this.field_110451_am.func_219534_a(new GrassColorReloadListener());
|
||||
this.field_110451_am.func_219534_a(new FoliageColorReloadListener());
|
||||
+ try (net.minecraftforge.fml.common.progress.ProgressBar bar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Rendering Setup", 5, true)) {
|
||||
+ bar.step("GL Setup");
|
||||
this.field_195558_d.func_198076_a("Startup");
|
||||
GlStateManager.enableTexture();
|
||||
GlStateManager.shadeModel(7425);
|
||||
GlStateManager.clearDepth(1.0D);
|
||||
GlStateManager.enableDepthTest();
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.complete();
|
||||
GlStateManager.depthFunc(515);
|
||||
GlStateManager.enableAlphaTest();
|
||||
GlStateManager.alphaFunc(516, 0.1F);
|
||||
@@ -493,19 +498,24 @@
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.matrixMode(5888);
|
||||
this.field_195558_d.func_198076_a("Post startup");
|
||||
+ bar.step("Loading Texture Map");
|
||||
this.field_147128_au = new AtlasTexture("textures");
|
||||
this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I);
|
||||
this.field_71446_o.func_110580_a(AtlasTexture.field_110575_b, this.field_147128_au);
|
||||
this.field_71446_o.func_110577_a(AtlasTexture.field_110575_b);
|
||||
this.field_147128_au.func_174937_a(false, this.field_71474_y.field_151442_I > 0);
|
||||
+ bar.step("Loading Model Manager");
|
||||
this.field_175617_aL = new ModelManager(this.field_147128_au);
|
||||
this.field_110451_am.func_219534_a(this.field_175617_aL);
|
||||
this.field_184127_aH = BlockColors.func_186723_a();
|
||||
this.field_184128_aI = ItemColors.func_186729_a(this.field_184127_aH);
|
||||
+ bar.step("Loading Item Renderer");
|
||||
this.field_175621_X = new ItemRenderer(this.field_71446_o, this.field_175617_aL, this.field_184128_aI);
|
||||
this.field_175616_W = new EntityRendererManager(this.field_71446_o, this.field_175621_X, this.field_110451_am);
|
||||
this.field_175620_Y = new FirstPersonRenderer(this);
|
||||
this.field_110451_am.func_219534_a(this.field_175621_X);
|
||||
+ bar.step("Loading Entity Renderer");
|
||||
+ //net.minecraftforge.fml.client.SplashProgress.pause();
|
||||
this.field_71460_t = new GameRenderer(this, this.field_110451_am);
|
||||
this.field_110451_am.func_219534_a(this.field_71460_t);
|
||||
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_184127_aH);
|
||||
@@ -521,9 +531,13 @@
|
||||
@@ -516,12 +517,14 @@
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
GlStateManager.viewport(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ParticleFactoryRegisterEvent());
|
||||
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);
|
||||
this.field_213273_aM = new PotionSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213273_aM);
|
||||
- this.field_71456_v = new IngameGui(this);
|
||||
+ //net.minecraftforge.fml.client.SplashProgress.resume();
|
||||
+ }; // Forge: end progress bar
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.end();
|
||||
+ this.field_71456_v = new net.minecraftforge.client.ForgeIngameGui(this);
|
||||
+ this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
|
||||
this.field_184132_p = new DebugRenderer(this);
|
||||
GLX.setGlfwErrorCallback(this::func_195545_a);
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.complete();
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
this.field_195558_d.func_198077_g();
|
||||
this.field_71474_y.field_74353_u = this.field_195558_d.func_198113_j();
|
||||
@@ -646,7 +660,7 @@
|
||||
@@ -532,18 +535,20 @@
|
||||
this.field_195558_d.func_216523_b(this.field_71474_y.field_74352_v);
|
||||
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
|
||||
this.field_195558_d.func_198112_b();
|
||||
- if (this.field_71475_ae != null) {
|
||||
- this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, this.field_71475_ae, this.field_71477_af));
|
||||
- } else {
|
||||
- this.func_147108_a(new MainMenuScreen(true));
|
||||
- }
|
||||
|
||||
ResourceLoadProgressGui.func_212970_a(this);
|
||||
this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219535_a(Util.func_215072_e(), this, field_223714_G), () -> {
|
||||
if (SharedConstants.field_206244_b) {
|
||||
this.func_213256_aB();
|
||||
}
|
||||
-
|
||||
+ if (net.minecraftforge.fml.client.ClientModLoader.completeModLoading()) return; // Do not overwrite the error sceen
|
||||
+ // FORGE: Move opening initial screen to after startup and events are enabled.
|
||||
+ // Also Fixes MC-145102
|
||||
+ if (this.field_71475_ae != null) {
|
||||
+ this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, this.field_71475_ae, this.field_71477_af));
|
||||
+ } else {
|
||||
+ this.func_147108_a(new MainMenuScreen(true));
|
||||
+ }
|
||||
}, false));
|
||||
}
|
||||
|
||||
@@ -558,7 +563,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_) -> {
|
||||
- return ItemTags.func_199903_a().func_199913_a(p_213235_0_.func_77973_b()).stream();
|
||||
+ return p_213235_0_.func_77973_b().getTags().stream();
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -647,7 +652,7 @@
|
||||
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
|
||||
if (p_71377_1_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
||||
@@ -105,7 +110,7 @@
|
||||
} else if (p_71377_1_.func_147149_a(file2)) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||
System.exit(-1);
|
||||
@@ -661,6 +675,7 @@
|
||||
@@ -662,6 +667,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -113,7 +118,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -740,16 +755,20 @@
|
||||
@@ -741,16 +747,20 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -138,7 +143,7 @@
|
||||
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
this.field_71456_v.func_146158_b().func_146231_a(true);
|
||||
@@ -874,11 +893,13 @@
|
||||
@@ -875,11 +885,13 @@
|
||||
GlStateManager.enableTexture();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
@@ -152,21 +157,20 @@
|
||||
}
|
||||
|
||||
this.field_71424_I.func_219897_b();
|
||||
@@ -1146,10 +1167,10 @@
|
||||
@@ -1147,10 +1159,10 @@
|
||||
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
- if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) {
|
||||
- Direction direction = blockraytraceresult.func_216354_b();
|
||||
+ Direction direction = blockraytraceresult.func_216354_b();
|
||||
+ if (!this.field_71441_e.func_175623_d(blockpos) && this.field_71442_b.func_180512_c(blockpos, direction)) {
|
||||
+ if (!this.field_71441_e.func_175623_d(blockpos)) {
|
||||
Direction direction = blockraytraceresult.func_216354_b();
|
||||
if (this.field_71442_b.func_180512_c(blockpos, direction)) {
|
||||
- this.field_71452_i.func_180532_a(blockpos, direction);
|
||||
+ this.field_71452_i.addBlockHitEffects(blockpos, blockraytraceresult);
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1176,7 +1197,7 @@
|
||||
@@ -1177,7 +1189,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -175,7 +179,7 @@
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1186,6 +1207,7 @@
|
||||
@@ -1187,6 +1199,7 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
@@ -183,7 +187,7 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
@@ -1235,6 +1257,9 @@
|
||||
@@ -1236,6 +1249,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +197,7 @@
|
||||
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand) == ActionResultType.SUCCESS) {
|
||||
this.field_71460_t.field_78516_c.func_187460_a(hand);
|
||||
return;
|
||||
@@ -1254,6 +1279,8 @@
|
||||
@@ -1255,6 +1271,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -202,7 +206,7 @@
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1372,6 +1399,8 @@
|
||||
@@ -1373,6 +1391,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -211,15 +215,7 @@
|
||||
}
|
||||
|
||||
private void func_184117_aA() {
|
||||
@@ -1430,6 +1459,7 @@
|
||||
this.field_71439_g.func_71040_bB(Screen.hasControlDown());
|
||||
}
|
||||
}
|
||||
+ if (field_71441_e != null) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
|
||||
|
||||
boolean flag2 = this.field_71474_y.field_74343_n != ChatVisibility.HIDDEN;
|
||||
if (flag2) {
|
||||
@@ -1526,6 +1556,12 @@
|
||||
@@ -1527,6 +1547,12 @@
|
||||
this.func_147108_a(worldloadprogressscreen);
|
||||
|
||||
while(!this.field_71437_Z.func_71200_ad()) {
|
||||
@@ -232,7 +228,7 @@
|
||||
worldloadprogressscreen.tick();
|
||||
this.func_195542_b(false);
|
||||
|
||||
@@ -1546,11 +1582,17 @@
|
||||
@@ -1547,11 +1573,17 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
@@ -251,7 +247,20 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1623,6 +1665,7 @@
|
||||
@@ -1583,10 +1615,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerLogout(this.field_71442_b, this.field_71439_g);
|
||||
this.field_71442_b = null;
|
||||
NarratorChatListener.field_193643_a.func_193642_b();
|
||||
this.func_213241_c(p_213231_1_);
|
||||
if (this.field_71441_e != null) {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
|
||||
if (integratedserver != null) {
|
||||
while(!integratedserver.func_213201_w()) {
|
||||
this.func_195542_b(false);
|
||||
@@ -1624,6 +1658,7 @@
|
||||
}
|
||||
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
@@ -259,7 +268,7 @@
|
||||
}
|
||||
|
||||
public final boolean func_71355_q() {
|
||||
@@ -1648,112 +1691,8 @@
|
||||
@@ -1649,112 +1684,8 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -374,7 +383,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1825,6 +1764,7 @@
|
||||
@@ -1826,6 +1757,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
@@ -382,7 +391,7 @@
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> {
|
||||
return p_213240_0_;
|
||||
@@ -1968,6 +1908,8 @@
|
||||
@@ -1972,6 +1904,8 @@
|
||||
}
|
||||
|
||||
public MusicTicker.MusicType func_147109_W() {
|
||||
@@ -391,7 +400,7 @@
|
||||
if (this.field_71462_r instanceof WinGameScreen) {
|
||||
return MusicTicker.MusicType.CREDITS;
|
||||
} else if (this.field_71439_g == null) {
|
||||
@@ -2124,4 +2066,12 @@
|
||||
@@ -2128,4 +2062,12 @@
|
||||
public LoadingGui func_213250_au() {
|
||||
return this.field_213279_p;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
--- a/net/minecraft/client/MouseHelper.java
|
||||
+++ b/net/minecraft/client/MouseHelper.java
|
||||
@@ -77,11 +77,15 @@
|
||||
@@ -71,17 +71,22 @@
|
||||
if (!this.field_198051_p && flag) {
|
||||
this.func_198034_i();
|
||||
}
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onRawMouseClicked(p_198023_3_, p_198023_4_, p_198023_5_)) return;
|
||||
} else {
|
||||
double d0 = this.field_198040_e * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m();
|
||||
double d1 = this.field_198041_f * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n();
|
||||
int p_198023_3_f = p_198023_3_;
|
||||
if (flag) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
@@ -18,7 +25,7 @@
|
||||
}, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -105,7 +109,7 @@
|
||||
@@ -105,7 +110,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +34,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +120,9 @@
|
||||
@@ -116,7 +121,9 @@
|
||||
if (this.field_198036_a.field_71462_r != null) {
|
||||
double d1 = this.field_198040_e * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m();
|
||||
double d2 = this.field_198041_f * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n();
|
||||
@@ -38,7 +45,15 @@
|
||||
} else if (this.field_198036_a.field_71439_g != null) {
|
||||
if (this.field_200542_o != 0.0D && Math.signum(d0) != Math.signum(this.field_200542_o)) {
|
||||
this.field_200542_o = 0.0D;
|
||||
@@ -168,7 +174,9 @@
|
||||
@@ -129,6 +136,7 @@
|
||||
}
|
||||
|
||||
this.field_200542_o -= (double)f1;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onMouseScroll(this, d0)) return;
|
||||
if (this.field_198036_a.field_71439_g.func_175149_v()) {
|
||||
if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) {
|
||||
this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1));
|
||||
@@ -168,7 +176,9 @@
|
||||
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m();
|
||||
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n();
|
||||
Screen.wrapScreenError(() -> {
|
||||
@@ -49,3 +64,29 @@
|
||||
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -233,6 +243,10 @@
|
||||
return this.field_198039_d;
|
||||
}
|
||||
|
||||
+ public boolean isMiddleDown() {
|
||||
+ return this.field_198038_c;
|
||||
+ }
|
||||
+
|
||||
public double func_198024_e() {
|
||||
return this.field_198040_e;
|
||||
}
|
||||
@@ -241,6 +255,14 @@
|
||||
return this.field_198041_f;
|
||||
}
|
||||
|
||||
+ public double getXVelocity() {
|
||||
+ return this.field_198048_m;
|
||||
+ }
|
||||
+
|
||||
+ public double getYVelocity() {
|
||||
+ return this.field_198049_n;
|
||||
+ }
|
||||
+
|
||||
public void func_198021_g() {
|
||||
this.field_198043_h = true;
|
||||
}
|
||||
@@ -1,42 +1,6 @@
|
||||
--- a/net/minecraft/client/audio/SoundHandler.java
|
||||
+++ b/net/minecraft/client/audio/SoundHandler.java
|
||||
@@ -61,6 +61,7 @@
|
||||
SoundHandler.Loader soundhandler$loader = new SoundHandler.Loader();
|
||||
p_212854_2_.func_219894_a();
|
||||
|
||||
+ java.util.List<net.minecraft.util.Tuple<ResourceLocation, Runnable>> resources = new java.util.LinkedList<>();
|
||||
for(String s : p_212854_1_.func_199001_a()) {
|
||||
p_212854_2_.func_76320_a(s);
|
||||
|
||||
@@ -74,7 +75,9 @@
|
||||
p_212854_2_.func_219895_b("register");
|
||||
|
||||
for(Entry<String, SoundList> entry : map.entrySet()) {
|
||||
+ resources.add(new net.minecraft.util.Tuple<>(new ResourceLocation(s, entry.getKey()), () -> {
|
||||
soundhandler$loader.func_217944_a(new ResourceLocation(s, entry.getKey()), entry.getValue(), p_212854_1_);
|
||||
+ }));
|
||||
}
|
||||
|
||||
p_212854_2_.func_76319_b();
|
||||
@@ -91,6 +94,17 @@
|
||||
p_212854_2_.func_76319_b();
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.progress.StartupProgressManager.start("Loading sounds", resources.size(), bar -> {
|
||||
+ resources.forEach(entry -> {
|
||||
+ bar.step(entry.func_76341_a().toString());
|
||||
+ try {
|
||||
+ entry.func_76340_b().run();
|
||||
+ } catch (RuntimeException e) {
|
||||
+ field_147698_b.warn("Invalid sounds.json", e);
|
||||
+ }
|
||||
+ });
|
||||
+ });
|
||||
+
|
||||
p_212854_2_.func_219897_b();
|
||||
return soundhandler$loader;
|
||||
}
|
||||
@@ -210,6 +224,11 @@
|
||||
@@ -210,6 +210,11 @@
|
||||
this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
--- a/net/minecraft/client/gui/DisplayEffectsScreen.java
|
||||
+++ b/net/minecraft/client/gui/DisplayEffectsScreen.java
|
||||
@@ -84,6 +84,7 @@
|
||||
int i = this.field_147009_r;
|
||||
@@ -34,6 +34,7 @@
|
||||
this.field_147003_i = (this.width - this.field_146999_f) / 2;
|
||||
this.field_147045_u = false;
|
||||
} else {
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.PotionShiftEvent(this))) this.field_147003_i = (this.width - this.field_146999_f) / 2; else
|
||||
this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2;
|
||||
this.field_147045_u = true;
|
||||
}
|
||||
@@ -59,7 +60,7 @@
|
||||
j = 132 / (collection.size() - 1);
|
||||
}
|
||||
|
||||
for(EffectInstance effectinstance : p_214077_3_) {
|
||||
+ if (!effectinstance.func_188419_a().shouldRender(effectinstance)) continue;
|
||||
Effect effect = effectinstance.func_188419_a();
|
||||
blit(p_214077_1_ + 6, i + 7, this.blitOffset, 18, 18, potionspriteuploader.func_215288_a(effect));
|
||||
i += p_214077_2_;
|
||||
@@ -95,6 +96,9 @@
|
||||
- Iterable<EffectInstance> iterable = Ordering.<EffectInstance>natural().sortedCopy(collection);
|
||||
+ Iterable<EffectInstance> iterable = collection.stream().filter( effectInstance -> effectInstance.func_188419_a().shouldRender(effectInstance)).sorted().collect(java.util.stream.Collectors.toList());
|
||||
this.func_214079_a(i, j, iterable);
|
||||
this.func_214077_b(i, j, iterable);
|
||||
this.func_214078_c(i, j, iterable);
|
||||
@@ -95,6 +96,8 @@
|
||||
int i = this.field_147009_r;
|
||||
|
||||
for(EffectInstance effectinstance : p_214078_3_) {
|
||||
+ if (!effectinstance.func_188419_a().shouldRender(effectinstance)) continue;
|
||||
+ effectinstance.func_188419_a().renderInventoryEffect(effectinstance, this, p_214078_1_, i, this.blitOffset);
|
||||
+ if (!effectinstance.func_188419_a().shouldRenderInvText(effectinstance)) { i += p_214078_2_; continue; }
|
||||
String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a());
|
||||
|
||||
@@ -24,7 +24,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +593,13 @@
|
||||
@@ -572,6 +577,7 @@
|
||||
}
|
||||
|
||||
String s = itextcomponent.func_150254_d();
|
||||
+ s = this.field_92016_l.func_77973_b().getHighlightTip(this.field_92016_l, s);
|
||||
int i = (this.field_194811_H - this.func_175179_f().func_78256_a(s)) / 2;
|
||||
int j = this.field_194812_I - 59;
|
||||
if (!this.field_73839_d.field_71442_b.func_78755_b()) {
|
||||
@@ -588,7 +594,13 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
fill(i - 2, j - 2, i + this.func_175179_f().func_78256_a(s) + 2, j + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/ResourceLoadProgressGui.java
|
||||
+++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java
|
||||
@@ -79,6 +79,7 @@
|
||||
this.blit(k1, i1, 0, 0, 256, 256);
|
||||
float f3 = this.field_212975_c.func_219555_b();
|
||||
this.field_212978_f = this.field_212978_f * 0.95F + f3 * 0.050000012F;
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.renderProgressText();
|
||||
if (f < 1.0F) {
|
||||
this.func_212972_a(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, this.field_212978_f, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
--- a/net/minecraft/client/gui/ScreenManager.java
|
||||
+++ b/net/minecraft/client/gui/ScreenManager.java
|
||||
@@ -39,6 +39,10 @@
|
||||
private static final Map<ContainerType<?>, ScreenManager.IScreenFactory<?, ?>> field_216914_b = Maps.newHashMap();
|
||||
|
||||
public static <T extends Container> void func_216909_a(@Nullable ContainerType<T> p_216909_0_, Minecraft p_216909_1_, int p_216909_2_, ITextComponent p_216909_3_) {
|
||||
+ getScreenFactory(p_216909_0_, p_216909_1_, p_216909_2_, p_216909_3_).ifPresent(f -> f.func_216908_a(p_216909_3_, p_216909_0_, p_216909_1_, p_216909_2_));
|
||||
+ }
|
||||
+
|
||||
+ public static <T extends Container> java.util.Optional<IScreenFactory<T, ?>> getScreenFactory(@Nullable ContainerType<T> p_216909_0_, Minecraft p_216909_1_, int p_216909_2_, ITextComponent p_216909_3_) {
|
||||
if (p_216909_0_ == null) {
|
||||
field_216913_a.warn("Trying to open invalid screen with name: {}", (Object)p_216909_3_.getString());
|
||||
} else {
|
||||
@@ -46,9 +50,10 @@
|
||||
if (iscreenfactory == null) {
|
||||
field_216913_a.warn("Failed to create screen for menu type: {}", (Object)Registry.field_218366_G.func_177774_c(p_216909_0_));
|
||||
} else {
|
||||
- iscreenfactory.func_216908_a(p_216909_3_, p_216909_0_, p_216909_1_, p_216909_2_);
|
||||
+ return java.util.Optional.of(iscreenfactory);
|
||||
}
|
||||
}
|
||||
+ return java.util.Optional.empty();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -0,0 +1,28 @@
|
||||
--- a/net/minecraft/client/gui/overlay/DebugOverlayGui.java
|
||||
+++ b/net/minecraft/client/gui/overlay/DebugOverlayGui.java
|
||||
@@ -342,7 +342,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 : blockstate.func_177230_c().getTags()) {
|
||||
list.add("#" + resourcelocation);
|
||||
}
|
||||
}
|
||||
@@ -358,7 +358,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(ifluidstate.func_206886_c())) {
|
||||
+ for(ResourceLocation resourcelocation1 : ifluidstate.func_206886_c().getTags()) {
|
||||
list.add("#" + resourcelocation1);
|
||||
}
|
||||
}
|
||||
@@ -368,6 +368,7 @@
|
||||
list.add("");
|
||||
list.add(TextFormatting.UNDERLINE + "Targeted Entity");
|
||||
list.add(String.valueOf((Object)Registry.field_212629_r.func_177774_c(entity.func_200600_R())));
|
||||
+ entity.func_200600_R().getTags().forEach(t -> list.add("#" + t));
|
||||
}
|
||||
|
||||
return list;
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
||||
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
||||
@@ -367,7 +367,7 @@
|
||||
return true;
|
||||
} else if (this.field_191888_F.field_71474_y.field_74310_D.func_197976_a(p_keyPressed_1_, p_keyPressed_2_) && !this.field_193962_q.isFocused()) {
|
||||
this.field_199738_u = true;
|
||||
- this.field_193962_q.func_146195_b(true);
|
||||
+ this.field_193962_q.setFocused(true);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -89,7 +89,7 @@
|
||||
this.func_205702_a();
|
||||
this.field_193018_j.clear();
|
||||
|
||||
- for(RecipeBookCategories recipebookcategories : ClientRecipeBook.func_216769_b(this.field_201522_g)) {
|
||||
+ for(RecipeBookCategories recipebookcategories : this.field_201522_g.getRecipeBookCategories()) {
|
||||
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
|
||||
languagemanager.func_135045_a(language);
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/screen/AbstractCommandBlockScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/AbstractCommandBlockScreen.java
|
||||
@@ -86,7 +86,7 @@
|
||||
this.field_195239_f.func_146180_a("-");
|
||||
this.children.add(this.field_195239_f);
|
||||
this.func_212928_a(this.field_195237_a);
|
||||
- this.field_195237_a.func_146195_b(true);
|
||||
+ this.field_195237_a.setFocused(true);
|
||||
this.func_209106_o();
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
this.field_209111_t.addAll(list);
|
||||
- this.field_209112_u = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestioncontext.startPos), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.func_146200_o() - i);
|
||||
+ this.field_209112_u = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestioncontext.startPos), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.getWidth() - i);
|
||||
this.field_209113_v = i;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
i = Math.max(i, this.font.func_78256_a(suggestion.getText()));
|
||||
}
|
||||
|
||||
- int j = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestions.getRange().getStart()), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.func_146200_o() - i);
|
||||
+ int j = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestions.getRange().getStart()), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.getWidth() - i);
|
||||
this.field_209116_y = new AbstractCommandBlockScreen.SuggestionsList(j, 72, i, suggestions);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/screen/AddServerScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/AddServerScreen.java
|
||||
@@ -53,7 +53,7 @@
|
||||
protected void init() {
|
||||
this.minecraft.field_195559_v.func_197967_a(true);
|
||||
this.field_146309_g = new TextFieldWidget(this.font, this.width / 2 - 100, 66, 200, 20, I18n.func_135052_a("addServer.enterName"));
|
||||
- this.field_146309_g.func_146195_b(true);
|
||||
+ this.field_146309_g.setFocused(true);
|
||||
this.field_146309_g.func_146180_a(this.field_146311_h.field_78847_a);
|
||||
this.field_146309_g.func_212954_a(this::func_213028_a);
|
||||
this.children.add(this.field_146309_g);
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/screen/ChatScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/ChatScreen.java
|
||||
@@ -351,7 +351,7 @@
|
||||
|
||||
public void render(int p_render_1_, int p_render_2_, float p_render_3_) {
|
||||
this.setFocused(this.field_146415_a);
|
||||
- this.field_146415_a.func_146195_b(true);
|
||||
+ this.field_146415_a.setFocused(true);
|
||||
fill(2, this.height - 14, this.width - 2, this.height - 2, this.minecraft.field_71474_y.func_216839_a(Integer.MIN_VALUE));
|
||||
this.field_146415_a.render(p_render_1_, p_render_2_, p_render_3_);
|
||||
if (this.field_195139_w != null) {
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/screen/DeathScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/DeathScreen.java
|
||||
@@ -44,6 +44,7 @@
|
||||
}));
|
||||
Button button = this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 96, 200, 20, s1, (p_213020_1_) -> {
|
||||
if (this.field_213023_c) {
|
||||
+ func_213022_a(true);
|
||||
this.minecraft.func_147108_a(new MainMenuScreen());
|
||||
} else {
|
||||
ConfirmScreen confirmscreen = new ConfirmScreen(this::func_213022_a, new TranslationTextComponent("deathScreen.quit.confirm"), new StringTextComponent(""), I18n.func_135052_a("deathScreen.titleScreen"), I18n.func_135052_a("deathScreen.respawn"));
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screen/MainMenuScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/MainMenuScreen.java
|
||||
@@ -58,6 +58,7 @@
|
||||
@@ -51,6 +51,7 @@
|
||||
private final RenderSkybox field_209101_K = new RenderSkybox(field_213098_a);
|
||||
private final boolean field_213102_y;
|
||||
private long field_213103_z;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public MainMenuScreen() {
|
||||
this(false);
|
||||
@@ -108,10 +109,14 @@
|
||||
@@ -98,10 +99,14 @@
|
||||
this.field_193979_N = this.width - this.field_193978_M - 2;
|
||||
int i = 24;
|
||||
int j = this.height / 4 + 48;
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, Button.WIDGETS_LOCATION, 256, 256, (p_213090_1_) -> {
|
||||
@@ -146,6 +151,7 @@
|
||||
@@ -130,6 +135,7 @@
|
||||
if (this.func_183501_a()) {
|
||||
this.field_183503_M.init(this.minecraft, this.width, this.height);
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -156,7 +162,7 @@
|
||||
@@ -140,7 +146,7 @@
|
||||
this.addButton(new Button(this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, 200, 20, I18n.func_135052_a("menu.multiplayer"), (p_213086_1_) -> {
|
||||
this.minecraft.func_147108_a(new MultiplayerScreen(this));
|
||||
}));
|
||||
@@ -40,7 +40,7 @@
|
||||
this.func_140005_i();
|
||||
}));
|
||||
}
|
||||
@@ -220,6 +226,7 @@
|
||||
@@ -204,6 +210,7 @@
|
||||
|
||||
this.minecraft.func_110434_K().func_110577_a(field_194400_H);
|
||||
blit(j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);
|
||||
@@ -48,7 +48,7 @@
|
||||
if (this.field_73975_c != null) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translatef((float)(this.width / 2 + 90), 70.0F, 0.0F);
|
||||
@@ -238,7 +245,10 @@
|
||||
@@ -222,7 +229,13 @@
|
||||
s = s + ("release".equalsIgnoreCase(this.minecraft.func_184123_d()) ? "" : "/" + this.minecraft.func_184123_d());
|
||||
}
|
||||
|
||||
@@ -57,10 +57,13 @@
|
||||
+ this.drawString(this.font, brd, 2, this.height - ( 10 + brdline * (this.font.field_78288_b + 1)), 16777215 | l)
|
||||
+ );
|
||||
+
|
||||
+ net.minecraftforge.fml.BrandingControl.forEachAboveCopyrightLine((brdline, brd) ->
|
||||
+ this.drawString(this.font, brd, this.width - font.func_78256_a(brd), this.height - (10 + (brdline + 1) * ( this.font.field_78288_b + 1)), 16777215 | l)
|
||||
+ );
|
||||
this.drawString(this.font, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.height - 10, 16777215 | l);
|
||||
if (p_render_1_ > this.field_193979_N && p_render_1_ < this.field_193979_N + this.field_193978_M && p_render_2_ > this.height - 10 && p_render_2_ < this.height) {
|
||||
fill(this.field_193979_N, this.height - 1, this.field_193979_N + this.field_193978_M, this.height, 16777215 | l);
|
||||
@@ -258,6 +268,7 @@
|
||||
@@ -240,6 +253,7 @@
|
||||
if (this.func_183501_a() && f1 >= 1.0F) {
|
||||
this.field_183503_M.render(p_render_1_, p_render_2_, p_render_3_);
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/screen/ServerListScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/ServerListScreen.java
|
||||
@@ -37,7 +37,7 @@
|
||||
}));
|
||||
this.field_146302_g = new TextFieldWidget(this.font, this.width / 2 - 100, 116, 200, 20, I18n.func_135052_a("addServer.enterIp"));
|
||||
this.field_146302_g.func_146203_f(128);
|
||||
- this.field_146302_g.func_146195_b(true);
|
||||
+ this.field_146302_g.setFocused(true);
|
||||
this.field_146302_g.func_146180_a(this.minecraft.field_71474_y.field_74332_R);
|
||||
this.field_146302_g.func_212954_a((p_213024_1_) -> {
|
||||
this.func_195168_i();
|
||||
+2
-10
@@ -119,7 +119,7 @@
|
||||
this.field_147008_s.clear();
|
||||
(this.field_147002_h).field_148330_a.clear();
|
||||
if (p_147050_1_ == ItemGroup.field_192395_m) {
|
||||
@@ -494,19 +531,21 @@
|
||||
@@ -494,13 +531,15 @@
|
||||
}
|
||||
|
||||
if (this.field_147062_A != null) {
|
||||
@@ -127,8 +127,7 @@
|
||||
+ if (p_147050_1_.hasSearchBar()) {
|
||||
this.field_147062_A.func_146189_e(true);
|
||||
this.field_147062_A.func_146205_d(false);
|
||||
- this.field_147062_A.func_146195_b(true);
|
||||
+ this.field_147062_A.setFocused(true);
|
||||
this.field_147062_A.func_146195_b(true);
|
||||
if (i != p_147050_1_.func_78021_a()) {
|
||||
this.field_147062_A.func_146180_a("");
|
||||
}
|
||||
@@ -137,13 +136,6 @@
|
||||
|
||||
this.func_147053_i();
|
||||
} else {
|
||||
this.field_147062_A.func_146189_e(false);
|
||||
this.field_147062_A.func_146205_d(true);
|
||||
- this.field_147062_A.func_146195_b(false);
|
||||
+ this.field_147062_A.setFocused(false);
|
||||
this.field_147062_A.func_146180_a("");
|
||||
}
|
||||
}
|
||||
@@ -560,16 +599,35 @@
|
||||
this.renderBackground();
|
||||
super.render(p_render_1_, p_render_2_, p_render_3_);
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
--- a/net/minecraft/client/gui/widget/TextFieldWidget.java
|
||||
+++ b/net/minecraft/client/gui/widget/TextFieldWidget.java
|
||||
@@ -349,7 +349,7 @@
|
||||
} else {
|
||||
boolean flag = p_mouseClicked_1_ >= (double)this.x && p_mouseClicked_1_ < (double)(this.x + this.width) && p_mouseClicked_3_ >= (double)this.y && p_mouseClicked_3_ < (double)(this.y + this.height);
|
||||
if (this.field_146212_n) {
|
||||
- this.func_146195_b(flag);
|
||||
+ this.setFocused(flag);
|
||||
}
|
||||
|
||||
if (this.isFocused() && flag && p_mouseClicked_5_ == 0) {
|
||||
@@ -358,7 +358,7 @@
|
||||
i -= 4;
|
||||
}
|
||||
|
||||
- String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.func_146200_o());
|
||||
+ String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.getWidth());
|
||||
this.func_146190_e(this.field_146211_a.func_78269_a(s, i).length() + this.field_146225_q);
|
||||
return true;
|
||||
} else {
|
||||
@@ -367,7 +367,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- public void func_146195_b(boolean p_146195_1_) {
|
||||
+ public void setFocused(boolean p_146195_1_) {
|
||||
super.setFocused(p_146195_1_);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
int i = this.field_146226_p ? this.field_146222_t : this.field_146221_u;
|
||||
int j = this.field_146224_r - this.field_146225_q;
|
||||
int k = this.field_146223_s - this.field_146225_q;
|
||||
- String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.func_146200_o());
|
||||
+ String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.getWidth());
|
||||
boolean flag = j >= 0 && j <= s.length();
|
||||
boolean flag1 = this.isFocused() && this.field_146214_l / 6 % 2 == 0 && flag;
|
||||
int l = this.field_146215_m ? this.x + 4 : this.x;
|
||||
@@ -522,7 +522,7 @@
|
||||
this.field_146226_p = p_146184_1_;
|
||||
}
|
||||
|
||||
- public int func_146200_o() {
|
||||
+ public int getWidth() {
|
||||
return this.func_146181_i() ? this.width - 8 : this.width;
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@
|
||||
this.field_146225_q = i;
|
||||
}
|
||||
|
||||
- int j = this.func_146200_o();
|
||||
+ int j = this.getWidth();
|
||||
String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), j);
|
||||
int k = s.length() + this.field_146225_q;
|
||||
if (this.field_146223_s == this.field_146225_q) {
|
||||
@@ -1,10 +1,18 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientChunkProvider.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientChunkProvider.java
|
||||
@@ -72,6 +72,7 @@
|
||||
if (this.field_217256_d.func_217183_b(p_212849_1_, p_212849_2_)) {
|
||||
Chunk chunk = this.field_217256_d.func_217192_a(this.field_217256_d.func_217191_a(p_212849_1_, p_212849_2_));
|
||||
if (func_217249_a(chunk, p_212849_1_, p_212849_2_)) {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk));
|
||||
return chunk;
|
||||
@@ -61,6 +61,7 @@
|
||||
int i = this.field_217256_d.func_217191_a(p_73234_1_, p_73234_2_);
|
||||
Chunk chunk = this.field_217256_d.func_217192_a(i);
|
||||
if (func_217249_a(chunk, p_73234_1_, p_73234_2_)) {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Unload(chunk));
|
||||
this.field_217256_d.func_217190_a(i, chunk, (Chunk)null);
|
||||
}
|
||||
|
||||
@@ -113,6 +114,7 @@
|
||||
worldlightmanager.func_215566_a(SectionPos.func_218154_a(p_217250_2_, j, p_217250_3_), ChunkSection.func_222628_a(chunksection));
|
||||
}
|
||||
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk));
|
||||
return chunk;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,48 @@
|
||||
--- a/net/minecraft/client/multiplayer/PlayerController.java
|
||||
+++ b/net/minecraft/client/multiplayer/PlayerController.java
|
||||
@@ -104,6 +104,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,9 @@
|
||||
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;
|
||||
- } else if (blockstate.func_196958_f()) {
|
||||
+ } else if (blockstate.isAir(world, p_187103_1_)) {
|
||||
+ if (field_78776_a.field_71439_g.func_184614_ca().onBlockStartBreak(p_187103_1_, field_78776_a.field_71439_g)) return false;
|
||||
+
|
||||
World world = this.field_78776_a.field_71441_e;
|
||||
BlockState blockstate = world.func_180495_p(p_187103_1_);
|
||||
if (!this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b().func_195938_a(blockstate, world, p_187103_1_, this.field_78776_a.field_71439_g)) {
|
||||
@@ -112,7 +114,7 @@
|
||||
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;
|
||||
- } else if (blockstate.func_196958_f()) {
|
||||
+ } else if (blockstate.isAir(world, p_187103_1_)) {
|
||||
return false;
|
||||
} else {
|
||||
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
|
||||
@@ -209,13 +211,13 @@
|
||||
return false;
|
||||
} else {
|
||||
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
|
||||
@@ -129,21 +131,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_);
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_).isCanceled())
|
||||
func_178891_a(this.field_78776_a, this, p_180511_1_, p_180511_2_);
|
||||
this.field_78781_i = 5;
|
||||
} else if (!this.field_78778_j || !this.func_178893_a(p_180511_1_)) {
|
||||
if (this.field_78778_j) {
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.ABORT_DESTROY_BLOCK, this.field_178895_c, p_180511_2_);
|
||||
}
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_);
|
||||
|
||||
BlockState blockstate1 = 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_, blockstate1, 0.0F);
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
|
||||
boolean flag = !blockstate1.func_196958_f();
|
||||
if (flag && this.field_78770_f == 0.0F) {
|
||||
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY)
|
||||
blockstate1.func_196942_a(this.field_78776_a.field_71441_e, p_180511_1_, this.field_78776_a.field_71439_g);
|
||||
}
|
||||
|
||||
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return true;
|
||||
if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) {
|
||||
this.func_187103_a(p_180511_1_);
|
||||
} else {
|
||||
@@ -183,22 +189,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_);
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180512_1_, p_180512_2_).isCanceled())
|
||||
func_178891_a(this.field_78776_a, this, p_180512_1_, p_180512_2_);
|
||||
return true;
|
||||
} else if (this.func_178893_a(p_180512_1_)) {
|
||||
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
|
||||
@@ -34,7 +58,13 @@
|
||||
this.field_78776_a.func_147118_V().func_147682_a(new SimpleSound(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_));
|
||||
}
|
||||
|
||||
@@ -239,7 +241,8 @@
|
||||
++this.field_78780_h;
|
||||
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, blockstate, MathHelper.func_76131_a(this.field_78770_f, 0.0F, 1.0F));
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180512_1_, p_180512_2_).getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return true;
|
||||
if (this.field_78770_f >= 1.0F) {
|
||||
this.field_78778_j = false;
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
|
||||
@@ -217,7 +225,8 @@
|
||||
}
|
||||
|
||||
public float func_78757_d() {
|
||||
@@ -44,7 +74,7 @@
|
||||
}
|
||||
|
||||
public void func_78765_e() {
|
||||
@@ -256,7 +259,7 @@
|
||||
@@ -234,7 +243,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()) {
|
||||
@@ -53,7 +83,34 @@
|
||||
}
|
||||
|
||||
return p_178893_1_.equals(this.field_178895_c) && flag;
|
||||
@@ -320,11 +323,14 @@
|
||||
@@ -257,17 +266,24 @@
|
||||
return ActionResultType.FAIL;
|
||||
} else {
|
||||
ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_);
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks
|
||||
+ .onRightClickBlock(p_217292_1_, p_217292_3_, blockpos, p_217292_4_.func_216354_b());
|
||||
+ if (event.isCanceled()) {
|
||||
+ this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
+ return event.getCancellationResult();
|
||||
+ }
|
||||
if (this.field_78779_k == GameType.SPECTATOR) {
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
boolean flag = !p_217292_1_.func_184614_ca().func_190926_b() || !p_217292_1_.func_184592_cb().func_190926_b();
|
||||
- boolean flag1 = p_217292_1_.func_70093_af() && flag;
|
||||
- if (!flag1 && p_217292_2_.func_180495_p(blockpos).func_215687_a(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_)) {
|
||||
+ boolean flag1 = !(p_217292_1_.func_70093_af() && flag) || (p_217292_1_.func_184614_ca().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_) && p_217292_1_.func_184592_cb().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_));
|
||||
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY && flag1 && p_217292_2_.func_180495_p(blockpos).func_215687_a(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_)) {
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return ActionResultType.PASS;
|
||||
if (!itemstack.func_190926_b() && !p_217292_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
|
||||
ItemUseContext itemusecontext = new ItemUseContext(p_217292_1_, p_217292_3_, p_217292_4_);
|
||||
ActionResultType actionresulttype;
|
||||
@@ -298,11 +314,14 @@
|
||||
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
|
||||
return ActionResultType.PASS;
|
||||
} else {
|
||||
@@ -68,7 +125,7 @@
|
||||
}
|
||||
|
||||
return actionresult.func_188397_a();
|
||||
@@ -349,6 +355,9 @@
|
||||
@@ -327,6 +346,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_));
|
||||
@@ -78,7 +135,7 @@
|
||||
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
|
||||
}
|
||||
|
||||
@@ -356,6 +365,9 @@
|
||||
@@ -334,6 +356,9 @@
|
||||
this.func_78750_j();
|
||||
Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.field_70165_t, p_187102_2_.field_70163_u, p_187102_2_.field_70161_v);
|
||||
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d));
|
||||
|
||||
+1
-1
@@ -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));
|
||||
}
|
||||
|
||||
@@ -122,6 +123,7 @@
|
||||
@@ -126,6 +127,7 @@
|
||||
}
|
||||
|
||||
public void func_209521_a(SCustomPayloadLoginPacket p_209521_1_) {
|
||||
|
||||
+46
-9
@@ -1,6 +1,22 @@
|
||||
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
|
||||
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
|
||||
@@ -712,7 +712,7 @@
|
||||
@@ -356,6 +356,7 @@
|
||||
|
||||
this.field_147299_f.field_184132_p.func_217737_a();
|
||||
this.field_147299_f.field_71439_g.func_70065_x();
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerLogin(this.field_147299_f.field_71442_b, this.field_147299_f.field_71439_g, this.field_147299_f.func_147114_u().func_147298_b());
|
||||
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);
|
||||
@@ -366,6 +367,7 @@
|
||||
this.field_147299_f.field_71439_g.func_145769_d(i);
|
||||
this.field_147299_f.field_71439_g.func_175150_k(p_147282_1_.func_179744_h());
|
||||
this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e());
|
||||
+ net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(field_147302_e, "PLAY_TO_SERVER");
|
||||
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();
|
||||
@@ -714,7 +716,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) {
|
||||
@@ -9,7 +25,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -784,7 +784,9 @@
|
||||
@@ -790,7 +792,9 @@
|
||||
|
||||
public void func_147251_a(SChatPacket p_147251_1_) {
|
||||
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
|
||||
@@ -20,15 +36,18 @@
|
||||
}
|
||||
|
||||
public void func_147279_a(SAnimateHandPacket p_147279_1_) {
|
||||
@@ -956,6 +958,7 @@
|
||||
@@ -962,8 +966,10 @@
|
||||
this.field_147299_f.field_71439_g = clientplayerentity1;
|
||||
this.field_147299_f.field_175622_Z = clientplayerentity1;
|
||||
clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c());
|
||||
+ clientplayerentity1.updateSyncFields(clientplayerentity); // Forge: fix MC-10657
|
||||
clientplayerentity1.func_70065_x();
|
||||
clientplayerentity1.func_175158_f(s);
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerRespawn(this.field_147299_f.field_71442_b, clientplayerentity, clientplayerentity1, clientplayerentity1.field_71174_a.func_147298_b());
|
||||
this.field_147300_g.func_217408_a(i, clientplayerentity1);
|
||||
@@ -1078,6 +1081,12 @@
|
||||
clientplayerentity1.field_70177_z = -180.0F;
|
||||
clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
|
||||
@@ -1084,6 +1090,12 @@
|
||||
boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity;
|
||||
if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity) {
|
||||
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
||||
@@ -41,15 +60,15 @@
|
||||
}
|
||||
|
||||
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
|
||||
@@ -1252,6 +1261,7 @@
|
||||
@@ -1253,6 +1265,7 @@
|
||||
clientrecipebook.func_199644_c();
|
||||
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
|
||||
imutablesearchtree.func_194040_a();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(this.field_199528_o);
|
||||
}
|
||||
|
||||
public void func_200232_a(SPlayerLookPacket p_200232_1_) {
|
||||
@@ -1332,7 +1342,7 @@
|
||||
@@ -1333,7 +1346,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) {
|
||||
@@ -58,12 +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());
|
||||
@@ -1757,10 +1767,12 @@
|
||||
@@ -1353,6 +1366,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_) {
|
||||
@@ -1766,10 +1780,12 @@
|
||||
|
||||
this.field_147299_f.field_184132_p.field_217741_m.func_217692_a(pointofinterestdebugrenderer$braininfo);
|
||||
} else {
|
||||
- field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
|
||||
+ if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_147240_1_, this.field_147302_e))
|
||||
field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
|
||||
+ field_147301_d.warn("Unknown custom packet identifier: {}", (Object)resourcelocation);
|
||||
}
|
||||
} finally {
|
||||
if (packetbuffer != null) {
|
||||
@@ -71,3 +99,12 @@
|
||||
packetbuffer.release();
|
||||
}
|
||||
|
||||
@@ -1909,7 +1925,7 @@
|
||||
for(SEntityPropertiesPacket.Snapshot sentitypropertiespacket$snapshot : p_147290_1_.func_149441_d()) {
|
||||
IAttributeInstance iattributeinstance = abstractattributemap.func_111152_a(sentitypropertiespacket$snapshot.func_151409_a());
|
||||
if (iattributeinstance == null) {
|
||||
- iattributeinstance = abstractattributemap.func_111150_b(new RangedAttribute((IAttribute)null, sentitypropertiespacket$snapshot.func_151409_a(), 0.0D, Double.MIN_NORMAL, Double.MAX_VALUE));
|
||||
+ iattributeinstance = abstractattributemap.func_111150_b(new RangedAttribute((IAttribute)null, sentitypropertiespacket$snapshot.func_151409_a(), 0.0D, -Double.MAX_VALUE, Double.MAX_VALUE)); // FORGE: fix invalid value range (MC-150405)
|
||||
}
|
||||
|
||||
iattributeinstance.func_111128_a(sentitypropertiespacket$snapshot.func_151410_b());
|
||||
@@ -0,0 +1,25 @@
|
||||
--- a/net/minecraft/client/particle/DiggingParticle.java
|
||||
+++ b/net/minecraft/client/particle/DiggingParticle.java
|
||||
@@ -36,6 +36,7 @@
|
||||
}
|
||||
|
||||
public DiggingParticle func_174846_a(BlockPos p_174846_1_) {
|
||||
+ updateSprite(p_174846_1_);
|
||||
this.field_181019_az = p_174846_1_;
|
||||
if (this.field_174847_a.func_177230_c() == Blocks.field_196658_i) {
|
||||
return this;
|
||||
@@ -93,7 +94,13 @@
|
||||
public static class Factory implements IParticleFactory<BlockParticleData> {
|
||||
public Particle func_199234_a(BlockParticleData p_199234_1_, World p_199234_2_, double p_199234_3_, double p_199234_5_, double p_199234_7_, double p_199234_9_, double p_199234_11_, double p_199234_13_) {
|
||||
BlockState blockstate = p_199234_1_.func_197584_c();
|
||||
- return !blockstate.func_196958_f() && blockstate.func_177230_c() != Blocks.field_196603_bb ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l() : null;
|
||||
+ return !blockstate.func_196958_f() && blockstate.func_177230_c() != Blocks.field_196603_bb ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l().updateSprite(p_199234_1_.getPos()) : null;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ private Particle updateSprite(BlockPos pos) { //FORGE: we cannot assume that the x y z of the particles match the block pos of the block.
|
||||
+ if (pos != null) // There are cases where we are not able to obtain the correct source pos, and need to fallback to the non-model data version
|
||||
+ this.func_217567_a(Minecraft.func_71410_x().func_175602_ab().func_175023_a().getTexture(field_174847_a, field_187122_b, pos));
|
||||
+ return this;
|
||||
+ }
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
--- a/net/minecraft/client/particle/Particle.java
|
||||
+++ b/net/minecraft/client/particle/Particle.java
|
||||
@@ -156,6 +156,7 @@
|
||||
public void func_187110_a(double p_187110_1_, double p_187110_3_, double p_187110_5_) {
|
||||
double d0 = p_187110_1_;
|
||||
double d1 = p_187110_3_;
|
||||
+ double origZ = p_187110_5_;
|
||||
if (this.field_190017_n && p_187110_1_ != 0.0D || p_187110_3_ != 0.0D || p_187110_5_ != 0.0D) {
|
||||
Vec3d vec3d = Entity.func_213313_a(new Vec3d(p_187110_1_, p_187110_3_, p_187110_5_), this.func_187116_l(), this.field_187122_b, ISelectionContext.func_216377_a(), new ReuseableStream<>(Stream.empty()));
|
||||
p_187110_1_ = vec3d.field_72450_a;
|
||||
@@ -173,7 +174,7 @@
|
||||
this.field_187129_i = 0.0D;
|
||||
}
|
||||
|
||||
- if (p_187110_5_ != p_187110_5_) {
|
||||
+ if (origZ != p_187110_5_) {
|
||||
this.field_187131_k = 0.0D;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,37 @@
|
||||
--- a/net/minecraft/client/particle/ParticleManager.java
|
||||
+++ b/net/minecraft/client/particle/ParticleManager.java
|
||||
@@ -235,6 +235,7 @@
|
||||
@@ -63,7 +63,7 @@
|
||||
private final Queue<EmitterParticle> field_178933_d = Queues.newArrayDeque();
|
||||
private final TextureManager field_78877_c;
|
||||
private final Random field_78875_d = new Random();
|
||||
- private final Int2ObjectMap<IParticleFactory<?>> field_178932_g = new Int2ObjectOpenHashMap<>();
|
||||
+ private final Map<ResourceLocation, IParticleFactory<?>> field_178932_g = new java.util.HashMap<>();
|
||||
private final Queue<Particle> field_187241_h = Queues.newArrayDeque();
|
||||
private final Map<ResourceLocation, ParticleManager.AnimatedSpriteImpl> field_215242_i = Maps.newHashMap();
|
||||
private final AtlasTexture field_215243_j = new AtlasTexture("textures/particle");
|
||||
@@ -137,13 +137,13 @@
|
||||
}
|
||||
|
||||
public <T extends IParticleData> void func_199283_a(ParticleType<T> p_199283_1_, IParticleFactory<T> p_199283_2_) {
|
||||
- this.field_178932_g.put(Registry.field_212632_u.func_148757_b(p_199283_1_), p_199283_2_);
|
||||
+ this.field_178932_g.put(Registry.field_212632_u.func_177774_c(p_199283_1_), p_199283_2_);
|
||||
}
|
||||
|
||||
public <T extends IParticleData> void func_215234_a(ParticleType<T> p_215234_1_, ParticleManager.IParticleMetaFactory<T> p_215234_2_) {
|
||||
ParticleManager.AnimatedSpriteImpl particlemanager$animatedspriteimpl = new ParticleManager.AnimatedSpriteImpl();
|
||||
this.field_215242_i.put(Registry.field_212632_u.func_177774_c(p_215234_1_), particlemanager$animatedspriteimpl);
|
||||
- this.field_178932_g.put(Registry.field_212632_u.func_148757_b(p_215234_1_), p_215234_2_.create(particlemanager$animatedspriteimpl));
|
||||
+ this.field_178932_g.put(Registry.field_212632_u.func_177774_c(p_215234_1_), p_215234_2_.create(particlemanager$animatedspriteimpl));
|
||||
}
|
||||
|
||||
public CompletableFuture<Void> func_215226_a(IFutureReloadListener.IStage p_215226_1_, IResourceManager p_215226_2_, IProfiler p_215226_3_, IProfiler p_215226_4_, Executor p_215226_5_, Executor p_215226_6_) {
|
||||
@@ -230,11 +230,12 @@
|
||||
|
||||
@Nullable
|
||||
private <T extends IParticleData> Particle func_199927_b(T p_199927_1_, double p_199927_2_, double p_199927_4_, double p_199927_6_, double p_199927_8_, double p_199927_10_, double p_199927_12_) {
|
||||
- IParticleFactory<T> iparticlefactory = (IParticleFactory<T>) this.field_178932_g.get(Registry.field_212632_u.func_148757_b(p_199927_1_.func_197554_b()));
|
||||
+ IParticleFactory<T> iparticlefactory = (IParticleFactory<T>) this.field_178932_g.get(Registry.field_212632_u.func_177774_c(p_199927_1_.func_197554_b()));
|
||||
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_);
|
||||
}
|
||||
|
||||
public void func_78873_a(Particle p_78873_1_) {
|
||||
@@ -8,16 +39,26 @@
|
||||
this.field_187241_h.add(p_78873_1_);
|
||||
}
|
||||
|
||||
@@ -342,7 +343,7 @@
|
||||
@@ -306,7 +307,8 @@
|
||||
Particle.field_70554_ao = p_215233_1_.func_216785_c().field_72448_b;
|
||||
Particle.field_70555_ap = p_215233_1_.func_216785_c().field_72449_c;
|
||||
|
||||
- for(IParticleRenderType iparticlerendertype : field_215241_b) {
|
||||
+ for(IParticleRenderType iparticlerendertype : this.field_78876_b.keySet()) { // Forge: allow custom IParticleRenderType's
|
||||
+ if(iparticlerendertype == IParticleRenderType.field_217606_f) continue;
|
||||
Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype);
|
||||
if (iterable != null) {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -342,7 +344,7 @@
|
||||
}
|
||||
|
||||
public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) {
|
||||
- if (!p_180533_2_.func_196958_f()) {
|
||||
+ if (!p_180533_2_.isAir(this.field_78878_a, p_180533_1_)) {
|
||||
+ if (!p_180533_2_.isAir(this.field_78878_a, p_180533_1_) && !p_180533_2_.addDestroyEffects(this.field_78878_a, p_180533_1_, this)) {
|
||||
VoxelShape voxelshape = p_180533_2_.func_196954_c(this.field_78878_a, p_180533_1_);
|
||||
double d0 = 0.25D;
|
||||
voxelshape.func_197755_b((p_199284_3_, p_199284_5_, p_199284_7_, p_199284_9_, p_199284_11_, p_199284_13_) -> {
|
||||
@@ -414,6 +415,12 @@
|
||||
@@ -414,6 +416,12 @@
|
||||
return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java
|
||||
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
|
||||
@@ -174,4 +174,11 @@
|
||||
@@ -53,6 +53,10 @@
|
||||
this.func_216776_a(direction != null ? direction.func_185119_l() - 180.0F : 0.0F, 0.0F);
|
||||
this.func_216782_a(0.0D, 0.3D, 0.0D);
|
||||
}
|
||||
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup cameraSetup = net.minecraftforge.client.ForgeHooksClient.onCameraSetup(net.minecraft.client.Minecraft.func_71410_x().field_71460_t, this, p_216772_5_, this.field_216798_j, this.field_216797_i, 0f);
|
||||
+ this.field_216797_i = cameraSetup.getPitch();
|
||||
+ this.field_216798_j = cameraSetup.getYaw();
|
||||
+ GlStateManager.rotatef(cameraSetup.getRoll(), 0, 0, 1);
|
||||
|
||||
GlStateManager.rotatef(this.field_216797_i, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.rotatef(this.field_216798_j + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
@@ -172,4 +176,11 @@
|
||||
this.field_216791_c = null;
|
||||
this.field_216789_a = false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/client/renderer/BlockModelShapes.java
|
||||
+++ b/net/minecraft/client/renderer/BlockModelShapes.java
|
||||
@@ -24,10 +24,16 @@
|
||||
this.field_178128_c = p_i46245_1_;
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
public TextureAtlasSprite func_178122_a(BlockState p_178122_1_) {
|
||||
return this.func_178125_b(p_178122_1_).func_177554_e();
|
||||
}
|
||||
|
||||
+ public TextureAtlasSprite getTexture(BlockState state, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) {
|
||||
+ net.minecraftforge.client.model.data.IModelData data = net.minecraftforge.client.model.ModelDataManager.getModelData(world, pos);
|
||||
+ return this.func_178125_b(state).getParticleTexture(data == null ? net.minecraftforge.client.model.data.EmptyModelData.INSTANCE : data);
|
||||
+ }
|
||||
+
|
||||
public IBakedModel func_178125_b(BlockState p_178125_1_) {
|
||||
IBakedModel ibakedmodel = this.field_178129_a.get(p_178125_1_);
|
||||
if (ibakedmodel == null) {
|
||||
@@ -42,7 +42,7 @@
|
||||
if (flag1) {
|
||||
float f4 = hand == Hand.OFF_HAND ? f : 0.0F;
|
||||
float f6 = 1.0F - MathHelper.func_219799_g(p_78440_1_, this.field_187472_i, this.field_187471_h);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.MAIN_HAND, p_78440_1_, f1, f4, f6, this.field_187467_d))
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e))
|
||||
this.func_187457_a(abstractclientplayerentity, p_78440_1_, f1, Hand.OFF_HAND, f4, this.field_187468_e, f6);
|
||||
}
|
||||
|
||||
@@ -72,8 +72,9 @@
|
||||
}
|
||||
|
||||
if (blockstate.func_185901_i() != BlockRenderType.INVISIBLE) {
|
||||
- this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(blockstate));
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(field_78455_a.field_71439_g, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, blockstate, overlayPos))
|
||||
this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(blockstate));
|
||||
+ this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().getTexture(blockstate, field_78455_a.field_71441_e, overlayPos));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,10 +97,12 @@
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableBlend();
|
||||
@@ -600,6 +608,15 @@
|
||||
@@ -600,8 +608,17 @@
|
||||
this.field_187471_h = MathHelper.func_76131_a(this.field_187471_h - 0.4F, 0.0F, 1.0F);
|
||||
} else {
|
||||
float f = clientplayerentity.func_184825_o(1.0F);
|
||||
- this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
||||
- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
||||
+
|
||||
+ boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, clientplayerentity.field_71071_by.field_70461_c);
|
||||
+ boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1);
|
||||
@@ -109,6 +112,8 @@
|
||||
+ if (!requipO && !Objects.equals(this.field_187468_e, itemstack1))
|
||||
+ this.field_187468_e = itemstack1;
|
||||
+
|
||||
this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
||||
this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
||||
+ this.field_187469_f += MathHelper.func_76131_a((!requipM ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
||||
+ this.field_187471_h += MathHelper.func_76131_a((float)(!requipO ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
||||
}
|
||||
|
||||
if (this.field_187469_f < 0.1F) {
|
||||
@@ -0,0 +1,77 @@
|
||||
--- a/net/minecraft/client/renderer/FluidBlockRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/FluidBlockRenderer.java
|
||||
@@ -58,8 +58,9 @@
|
||||
|
||||
public boolean func_217638_a(IEnviromentBlockReader p_217638_1_, BlockPos p_217638_2_, BufferBuilder p_217638_3_, IFluidState p_217638_4_) {
|
||||
boolean flag = p_217638_4_.func_206884_a(FluidTags.field_206960_b);
|
||||
- TextureAtlasSprite[] atextureatlassprite = flag ? this.field_178272_a : this.field_178271_b;
|
||||
- int i = flag ? 16777215 : BiomeColors.func_217612_c(p_217638_1_, p_217638_2_);
|
||||
+ TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_217638_1_, p_217638_2_, p_217638_4_);
|
||||
+ int i = p_217638_4_.func_206886_c().getAttributes().getColor(p_217638_1_, p_217638_2_);
|
||||
+ float alpha = (float)(i >> 24 & 255) / 255.0F;
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
@@ -145,15 +146,15 @@
|
||||
float f24 = 1.0F * f;
|
||||
float f25 = 1.0F * f1;
|
||||
float f26 = 1.0F * f2;
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
if (p_217638_4_.func_205586_a(p_217638_1_, p_217638_2_.func_177984_a())) {
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,10 +169,10 @@
|
||||
float f37 = 0.5F * f;
|
||||
float f38 = 0.5F * f1;
|
||||
float f40 = 0.5F * f2;
|
||||
- p_217638_3_.func_181662_b(d0, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f31, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0, d1, d2).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f31, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f32, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f32, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f31, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0, d1, d2).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f31, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f32, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f32, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
flag7 = true;
|
||||
}
|
||||
|
||||
@@ -245,15 +246,15 @@
|
||||
float f28 = 1.0F * f27 * f;
|
||||
float f29 = 1.0F * f27 * f1;
|
||||
float f30 = 1.0F * f27 * f2;
|
||||
- p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
if (textureatlassprite2 != this.field_187501_d) {
|
||||
- p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
|
||||
@@ -655,7 +662,7 @@
|
||||
@@ -656,7 +663,7 @@
|
||||
double d2 = activerenderinfo.func_216785_c().field_72449_c;
|
||||
icamera.func_78547_a(d0, d1, d2);
|
||||
if (this.field_78531_r.field_71474_y.field_151451_c >= 4) {
|
||||
@@ -55,7 +55,7 @@
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("sky");
|
||||
GlStateManager.matrixMode(5889);
|
||||
GlStateManager.loadIdentity();
|
||||
@@ -668,14 +675,14 @@
|
||||
@@ -669,14 +676,14 @@
|
||||
GlStateManager.matrixMode(5888);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
|
||||
RenderHelper.func_74518_a();
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("terrain_setup");
|
||||
@@ -689,7 +696,9 @@
|
||||
@@ -690,7 +697,9 @@
|
||||
GlStateManager.disableAlphaTest();
|
||||
worldrenderer.func_215323_a(BlockRenderLayer.SOLID, activerenderinfo);
|
||||
GlStateManager.enableAlphaTest();
|
||||
@@ -82,7 +82,7 @@
|
||||
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174936_b(false, false);
|
||||
worldrenderer.func_215323_a(BlockRenderLayer.CUTOUT, activerenderinfo);
|
||||
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
|
||||
@@ -708,6 +717,7 @@
|
||||
@@ -709,6 +718,7 @@
|
||||
if (flag && this.field_78531_r.field_71476_x != null) {
|
||||
GlStateManager.disableAlphaTest();
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("outline");
|
||||
@@ -90,7 +90,7 @@
|
||||
worldrenderer.func_215325_a(activerenderinfo, this.field_78531_r.field_71476_x, 0);
|
||||
GlStateManager.enableAlphaTest();
|
||||
}
|
||||
@@ -724,7 +734,7 @@
|
||||
@@ -725,7 +735,7 @@
|
||||
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
|
||||
GlStateManager.disableBlend();
|
||||
this.func_180436_i();
|
||||
@@ -99,7 +99,7 @@
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("particles");
|
||||
particlemanager.func_215233_a(activerenderinfo, p_181560_1_);
|
||||
this.func_175072_h();
|
||||
@@ -738,7 +748,7 @@
|
||||
@@ -739,7 +749,7 @@
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
GlStateManager.alphaFunc(516, 0.1F);
|
||||
@@ -108,7 +108,7 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.depthMask(false);
|
||||
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
|
||||
@@ -755,6 +765,9 @@
|
||||
@@ -756,6 +766,9 @@
|
||||
this.func_215313_a(activerenderinfo, worldrenderer, p_181560_1_, d0, d1, d2);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
this.field_78531_r.func_213239_aq().func_219895_b("hand");
|
||||
if (this.field_175074_C) {
|
||||
GlStateManager.clear(256, Minecraft.field_142025_a);
|
||||
@@ -771,7 +784,7 @@
|
||||
@@ -772,7 +785,7 @@
|
||||
GlStateManager.multMatrix(Matrix4f.func_195876_a(this.func_215311_a(p_215313_1_, p_215313_3_, true), (float)this.field_78531_r.field_195558_d.func_198109_k() / (float)this.field_78531_r.field_195558_d.func_198091_l(), 0.05F, this.field_78530_s * 4.0F));
|
||||
GlStateManager.matrixMode(5888);
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -127,19 +127,19 @@
|
||||
p_215313_2_.func_195466_a(p_215313_3_, p_215313_4_, p_215313_6_, p_215313_8_);
|
||||
GlStateManager.disableFog();
|
||||
GlStateManager.popMatrix();
|
||||
@@ -857,6 +870,11 @@
|
||||
@@ -858,6 +871,11 @@
|
||||
}
|
||||
|
||||
protected void func_78474_d(float p_78474_1_) {
|
||||
+ net.minecraftforge.client.IRenderHandler renderer = this.field_78531_r.field_71441_e.func_201675_m().getWeatherRenderer();
|
||||
+ if (renderer != null) {
|
||||
+ renderer.render(p_78474_1_, this.field_78531_r.field_71441_e, field_78531_r);
|
||||
+ renderer.render(this.field_78529_t, p_78474_1_, this.field_78531_r.field_71441_e, this.field_78531_r);
|
||||
+ return;
|
||||
+ }
|
||||
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
|
||||
if (!(f <= 0.0F)) {
|
||||
this.func_180436_i();
|
||||
@@ -1089,4 +1107,9 @@
|
||||
@@ -1090,4 +1108,9 @@
|
||||
public ActiveRenderInfo func_215316_n() {
|
||||
return this.field_215317_L;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/ItemRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/ItemRenderer.java
|
||||
@@ -51,13 +51,14 @@
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
public ItemRenderer(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_) {
|
||||
this.field_175057_n = p_i46552_1_;
|
||||
@@ -9,14 +9,7 @@
|
||||
|
||||
for(Item item : Registry.field_212630_s) {
|
||||
if (!field_195411_c.contains(item)) {
|
||||
this.field_175059_m.func_199311_a(item, new ModelResourceLocation(Registry.field_212630_s.func_177774_c(item), "inventory"));
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.client.model.ModelLoader.onRegisterItems(this.field_175059_m);
|
||||
|
||||
this.field_184395_f = p_i46552_3_;
|
||||
}
|
||||
@@ -75,6 +76,10 @@
|
||||
@@ -75,6 +75,10 @@
|
||||
}
|
||||
|
||||
private void func_191967_a(IBakedModel p_191967_1_, int p_191967_2_, ItemStack p_191967_3_) {
|
||||
@@ -27,7 +20,7 @@
|
||||
Tessellator tessellator = Tessellator.func_178181_a();
|
||||
BufferBuilder bufferbuilder = tessellator.func_178180_c();
|
||||
bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_176599_b);
|
||||
@@ -98,7 +103,7 @@
|
||||
@@ -98,7 +102,7 @@
|
||||
if (p_180454_2_.func_188618_c()) {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
@@ -36,7 +29,7 @@
|
||||
} else {
|
||||
this.func_191961_a(p_180454_2_, p_180454_1_);
|
||||
if (p_180454_1_.func_77962_s()) {
|
||||
@@ -164,7 +169,7 @@
|
||||
@@ -164,7 +168,7 @@
|
||||
k = k | -16777216;
|
||||
}
|
||||
|
||||
@@ -45,7 +38,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -225,11 +230,8 @@
|
||||
@@ -225,11 +229,8 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -59,7 +52,7 @@
|
||||
|
||||
this.func_180454_a(p_184394_1_, p_184394_2_);
|
||||
GlStateManager.cullFace(GlStateManager.CullFace.BACK);
|
||||
@@ -260,7 +262,7 @@
|
||||
@@ -260,7 +261,7 @@
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.func_180452_a(p_191962_2_, p_191962_3_, p_191962_4_.func_177556_c());
|
||||
@@ -68,7 +61,7 @@
|
||||
this.func_180454_a(p_191962_1_, p_191962_4_);
|
||||
GlStateManager.disableAlphaTest();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
@@ -299,6 +301,7 @@
|
||||
@@ -299,6 +300,7 @@
|
||||
crashreportcategory.func_189529_a("Item Type", () -> {
|
||||
return String.valueOf((Object)p_184391_2_.func_77973_b());
|
||||
});
|
||||
@@ -76,7 +69,7 @@
|
||||
crashreportcategory.func_189529_a("Item Damage", () -> {
|
||||
return String.valueOf(p_184391_2_.func_77952_i());
|
||||
});
|
||||
@@ -330,9 +333,12 @@
|
||||
@@ -330,9 +332,12 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepthTest();
|
||||
@@ -90,7 +83,7 @@
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepthTest();
|
||||
GlStateManager.disableTexture();
|
||||
@@ -340,11 +346,9 @@
|
||||
@@ -340,11 +345,9 @@
|
||||
GlStateManager.disableBlend();
|
||||
Tessellator tessellator = Tessellator.func_178181_a();
|
||||
BufferBuilder bufferbuilder = tessellator.func_178180_c();
|
||||
@@ -105,7 +98,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);
|
||||
GlStateManager.enableBlend();
|
||||
@@ -383,4 +387,9 @@
|
||||
@@ -383,4 +386,9 @@
|
||||
public void func_195410_a(IResourceManager p_195410_1_) {
|
||||
this.field_175059_m.func_178085_b();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/WorldRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/WorldRenderer.java
|
||||
@@ -589,10 +589,12 @@
|
||||
@@ -592,10 +592,12 @@
|
||||
this.field_72769_h.func_217381_Z().func_219895_b("blockentities");
|
||||
RenderHelper.func_74519_b();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, p_215326_3_, -1);
|
||||
}
|
||||
}
|
||||
@@ -600,16 +602,18 @@
|
||||
@@ -603,16 +605,18 @@
|
||||
|
||||
synchronized(this.field_181024_n) {
|
||||
for(TileEntity tileentity1 : this.field_181024_n) {
|
||||
@@ -33,7 +33,7 @@
|
||||
TileEntity tileentity2 = this.field_72769_h.func_175625_s(blockpos);
|
||||
if (tileentity2 instanceof ChestTileEntity && blockstate.func_177229_b(ChestBlock.field_196314_b) == ChestType.LEFT) {
|
||||
blockpos = blockpos.func_177972_a(blockstate.func_177229_b(ChestBlock.field_176459_a).func_176746_e());
|
||||
@@ -730,7 +734,7 @@
|
||||
@@ -733,7 +737,7 @@
|
||||
for(int j = -this.field_72739_F; j <= this.field_72739_F; ++j) {
|
||||
for(int k = -this.field_72739_F; k <= this.field_72739_F; ++k) {
|
||||
ChunkRender chunkrender1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8));
|
||||
@@ -42,28 +42,28 @@
|
||||
chunkrender1.func_178577_a(p_215320_3_);
|
||||
queue.add(new WorldRenderer.LocalRenderInformationContainer(chunkrender1, (Direction)null, 0));
|
||||
}
|
||||
@@ -775,7 +779,7 @@
|
||||
@@ -778,7 +782,7 @@
|
||||
this.field_147595_R = true;
|
||||
BlockPos blockpos2 = chunkrender4.func_178568_j().func_177982_a(8, 8, 8);
|
||||
boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D;
|
||||
- if (!chunkrender4.func_188281_o() && !flag3) {
|
||||
+ if (net.minecraftforge.common.ForgeMod.alwaysSetupTerrainOffThread || !chunkrender4.func_188281_o() && !flag3) {
|
||||
+ if (net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() || !chunkrender4.func_188281_o() && !flag3) {
|
||||
this.field_175009_l.add(chunkrender4);
|
||||
} else {
|
||||
this.field_72777_q.func_213239_aq().func_76320_a("build near");
|
||||
@@ -969,6 +973,11 @@
|
||||
@@ -972,6 +976,11 @@
|
||||
}
|
||||
|
||||
public void func_195465_a(float p_195465_1_) {
|
||||
+ net.minecraftforge.client.IRenderHandler renderer = this.field_72769_h.func_201675_m().getSkyRenderer();
|
||||
+ if (renderer != null) {
|
||||
+ renderer.render(p_195465_1_, field_72769_h, field_72777_q);
|
||||
+ renderer.render(this.field_72773_u, p_195465_1_, this.field_72769_h, this.field_72777_q);
|
||||
+ return;
|
||||
+ }
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.THE_END) {
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.field_223229_c_) {
|
||||
this.func_180448_r();
|
||||
} else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
|
||||
@@ -1113,6 +1122,7 @@
|
||||
@@ -1116,6 +1125,7 @@
|
||||
}
|
||||
|
||||
public void func_195466_a(float p_195466_1_, double p_195466_2_, double p_195466_4_, double p_195466_6_) {
|
||||
@@ -71,7 +71,7 @@
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
|
||||
float f = 12.0F;
|
||||
float f1 = 4.0F;
|
||||
@@ -1488,7 +1498,11 @@
|
||||
@@ -1491,7 +1501,11 @@
|
||||
DestroyBlockProgress destroyblockprogress = iterator.next();
|
||||
BlockPos blockpos = destroyblockprogress.func_180246_b();
|
||||
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
|
||||
@@ -84,7 +84,7 @@
|
||||
double d3 = (double)blockpos.func_177958_n() - d0;
|
||||
double d4 = (double)blockpos.func_177956_o() - d1;
|
||||
double d5 = (double)blockpos.func_177952_p() - d2;
|
||||
@@ -1496,7 +1510,7 @@
|
||||
@@ -1499,7 +1513,7 @@
|
||||
iterator.remove();
|
||||
} else {
|
||||
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
|
||||
@@ -93,7 +93,7 @@
|
||||
int i = destroyblockprogress.func_73106_e();
|
||||
TextureAtlasSprite textureatlassprite = this.field_94141_F[i];
|
||||
BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab();
|
||||
@@ -1517,7 +1531,7 @@
|
||||
@@ -1520,7 +1534,7 @@
|
||||
if (p_215325_3_ == 0 && p_215325_2_.func_216346_c() == RayTraceResult.Type.BLOCK) {
|
||||
BlockPos blockpos = ((BlockRayTraceResult)p_215325_2_).func_216350_a();
|
||||
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
|
||||
@@ -102,16 +102,18 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
GlStateManager.lineWidth(Math.max(2.5F, (float)this.field_72777_q.field_195558_d.func_198109_k() / 1920.0F * 2.5F));
|
||||
@@ -1984,7 +1998,7 @@
|
||||
@@ -1994,8 +2008,8 @@
|
||||
break;
|
||||
case 2001:
|
||||
BlockState blockstate = Block.func_196257_b(p_180439_4_);
|
||||
- if (!blockstate.func_196958_f()) {
|
||||
- SoundType soundtype = blockstate.func_215695_r();
|
||||
+ if (!blockstate.isAir(this.field_72769_h, p_180439_3_)) {
|
||||
SoundType soundtype = blockstate.func_215695_r();
|
||||
+ SoundType soundtype = blockstate.getSoundType(field_72769_h, p_180439_3_, null);
|
||||
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);
|
||||
}
|
||||
@@ -2108,6 +2122,11 @@
|
||||
|
||||
@@ -2118,6 +2132,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -4,15 +4,15 @@
|
||||
private Vec3d field_217672_l = Vec3d.field_186680_a;
|
||||
|
||||
public ChunkRenderDispatcher(boolean p_i51518_1_) {
|
||||
+ this(p_i51518_1_,-1);
|
||||
+ this(p_i51518_1_, -1);
|
||||
+ }
|
||||
+
|
||||
+ public ChunkRenderDispatcher(boolean p_i51518_1_, int countRenderBuilders) {
|
||||
int i = Math.max(1, (int)((double)Runtime.getRuntime().maxMemory() * 0.3D) / 10485760 - 1);
|
||||
int j = Runtime.getRuntime().availableProcessors();
|
||||
int k = p_i51518_1_ ? j : Math.min(j, 4);
|
||||
- int l = Math.max(1, Math.min(k * 3, i));
|
||||
+ int l = countRenderBuilders < 0 ? Math.max(1, Math.min(k * 3, i)) : countRenderBuilders;
|
||||
- int l = Math.max(1, Math.min(k * 2, i));
|
||||
+ int l = countRenderBuilders < 0 ? Math.max(1, Math.min(k * 2, i)) : countRenderBuilders;
|
||||
this.field_178525_i = new ChunkRenderWorker(this, new RegionRenderCacheBuilder());
|
||||
List<RegionRenderCacheBuilder> list = Lists.newArrayListWithExpectedSize(l);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
--- a/net/minecraft/client/renderer/color/BlockColors.java
|
||||
+++ b/net/minecraft/client/renderer/color/BlockColors.java
|
||||
@@ -22,7 +22,8 @@
|
||||
@@ -27,7 +27,8 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class BlockColors {
|
||||
- private final ObjectIntIdentityMap<IBlockColor> field_186725_a = new ObjectIntIdentityMap<>(32);
|
||||
+ // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant
|
||||
+ private final java.util.Map<net.minecraftforge.registries.IRegistryDelegate<Block>, IBlockColor> field_186725_a = new java.util.HashMap<>();
|
||||
private final Map<Block, Set<IProperty<?>>> field_225311_b = Maps.newHashMap();
|
||||
|
||||
public static BlockColors func_186723_a() {
|
||||
BlockColors blockcolors = new BlockColors();
|
||||
@@ -63,11 +64,12 @@
|
||||
@@ -72,11 +73,12 @@
|
||||
blockcolors.func_186722_a((p_210228_0_, p_210228_1_, p_210228_2_, p_210228_3_) -> {
|
||||
return p_210228_1_ != null && p_210228_2_ != null ? 2129968 : 7455580;
|
||||
}, Blocks.field_196651_dG);
|
||||
@@ -24,7 +24,7 @@
|
||||
if (iblockcolor != null) {
|
||||
return iblockcolor.getColor(p_189991_1_, (IEnviromentBlockReader)null, (BlockPos)null, 0);
|
||||
} else {
|
||||
@@ -77,13 +79,13 @@
|
||||
@@ -86,13 +88,13 @@
|
||||
}
|
||||
|
||||
public int func_216860_a(BlockState p_216860_1_, @Nullable IEnviromentBlockReader p_216860_2_, @Nullable BlockPos p_216860_3_, int p_216860_4_) {
|
||||
|
||||
+1
-4
@@ -1,10 +1,7 @@
|
||||
--- a/net/minecraft/client/renderer/entity/EntityRendererManager.java
|
||||
+++ b/net/minecraft/client/renderer/entity/EntityRendererManager.java
|
||||
@@ -255,8 +255,13 @@
|
||||
this.field_178637_m = new PlayerRenderer(this);
|
||||
this.field_178636_l.put("default", this.field_178637_m);
|
||||
@@ -257,6 +257,10 @@
|
||||
this.field_178636_l.put("slim", new PlayerRenderer(this, true));
|
||||
+ net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.field_78729_o);
|
||||
}
|
||||
|
||||
+ public Map<String, PlayerRenderer> getSkinMap() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/ArmorLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/ArmorLayer.java
|
||||
@@ -55,12 +55,13 @@
|
||||
@@ -55,24 +55,25 @@
|
||||
ArmorItem armoritem = (ArmorItem)itemstack.func_77973_b();
|
||||
if (armoritem.func_185083_B_() == p_188361_9_) {
|
||||
A a = this.func_215337_a(p_188361_9_);
|
||||
@@ -11,12 +11,18 @@
|
||||
boolean flag = this.func_188363_b(p_188361_9_);
|
||||
- this.func_215333_a(this.func_177181_a(armoritem, flag));
|
||||
- if (armoritem instanceof DyeableArmorItem) {
|
||||
- int i = ((DyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
+ this.func_215333_a(this.getArmorResource(p_188361_1_, itemstack, p_188361_9_, null));
|
||||
+ if (armoritem instanceof net.minecraft.item.IDyeableArmorItem) { // Allow this for anything, not only cloth
|
||||
int i = ((DyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
+ int i = ((net.minecraft.item.IDyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
@@ -72,7 +73,7 @@
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
GlStateManager.color4f(this.field_177184_f * f, this.field_177185_g * f1, this.field_177192_h * f2, this.field_177187_e);
|
||||
a.func_78088_a(p_188361_1_, p_188361_2_, p_188361_3_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_);
|
||||
- this.func_215333_a(this.func_177178_a(armoritem, flag, "overlay"));
|
||||
+ this.func_215333_a(this.getArmorResource(p_188361_1_, itemstack, p_188361_9_, "overlay"));
|
||||
}
|
||||
|
||||
GlStateManager.color4f(this.field_177184_f, this.field_177185_g, this.field_177192_h, this.field_177187_e);
|
||||
a.func_78088_a(p_188361_1_, p_188361_2_, p_188361_3_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_);
|
||||
|
||||
@@ -10,38 +10,43 @@
|
||||
public boolean func_178309_b() {
|
||||
return this.field_178315_d != null ? this.field_178315_d.func_178309_b() : this.field_178322_i;
|
||||
}
|
||||
@@ -87,6 +90,10 @@
|
||||
return this.field_187968_k;
|
||||
}
|
||||
|
||||
+ public ItemOverrideList getOverrides(BlockModel model, Function<ResourceLocation, IUnbakedModel> modelGetter, Function<ResourceLocation, TextureAtlasSprite> spriteGetter) {
|
||||
+ return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(model, modelGetter, this.field_187968_k, spriteGetter);
|
||||
+ }
|
||||
+
|
||||
private ItemOverrideList func_217646_a(ModelBakery p_217646_1_, BlockModel p_217646_2_) {
|
||||
@@ -91,6 +94,10 @@
|
||||
return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, this.field_187968_k);
|
||||
}
|
||||
@@ -160,25 +167,26 @@
|
||||
|
||||
+ public ItemOverrideList getOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_, Function<ResourceLocation, TextureAtlasSprite> textureGetter, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, textureGetter, this.field_187968_k, format);
|
||||
+ }
|
||||
+
|
||||
public Collection<ResourceLocation> func_187965_e() {
|
||||
Set<ResourceLocation> set = Sets.newHashSet();
|
||||
|
||||
@@ -160,25 +167,33 @@
|
||||
return set1;
|
||||
}
|
||||
|
||||
- public IBakedModel func_217641_a(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_) {
|
||||
- return this.func_217644_a(p_217641_1_, this, p_217641_2_, p_217641_3_);
|
||||
- }
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public IBakedModel bake(Function<ResourceLocation, IUnbakedModel> p_217644_1_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_2_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ if (!net.minecraftforge.client.model.Attributes.moreSpecific(format, net.minecraftforge.client.model.Attributes.DEFAULT_BAKED_FORMAT))
|
||||
+ throw new IllegalArgumentException("Cannot bake vanilla model to format other than BLOCK");
|
||||
+ // FORGE: Override our interface method, binary compatible
|
||||
+ public IBakedModel bake(ModelBakery bakery, Function<ResourceLocation, TextureAtlasSprite> spriteGetter, ISprite sprite, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ if (!net.minecraftforge.client.model.Attributes.moreSpecific(format, net.minecraftforge.client.model.Attributes.DEFAULT_BAKED_FORMAT))
|
||||
+ throw new IllegalArgumentException("Cannot bake vanilla model to format other than BLOCK");
|
||||
+ return this.bake(bakery, this, spriteGetter, sprite, format);
|
||||
}
|
||||
|
||||
- public IBakedModel func_217644_a(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_) {
|
||||
+ @Deprecated
|
||||
public IBakedModel func_217644_a(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_) {
|
||||
+ return bake(p_217644_1_, p_217644_2_, p_217644_3_, p_217644_4_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ }
|
||||
+
|
||||
+ public IBakedModel bake(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
TextureAtlasSprite textureatlassprite = p_217644_3_.apply(new ResourceLocation(this.func_178308_c("particle")));
|
||||
if (this.func_178310_f() == ModelBakery.field_177616_r) {
|
||||
- return new BuiltInModel(this.func_181682_g(), this.func_217646_a(p_217644_1_, p_217644_2_), textureatlassprite);
|
||||
+ return new BuiltInModel(this.func_181682_g(), this.getOverrides(this, p_217644_1_, p_217644_3_), textureatlassprite);
|
||||
+ return new BuiltInModel(this.func_181682_g(), this.getOverrides(p_217644_1_, p_217644_2_, p_217644_3_, format), textureatlassprite);
|
||||
} else {
|
||||
- SimpleBakedModel.Builder simplebakedmodel$builder = (new SimpleBakedModel.Builder(this, this.func_217646_a(p_217644_1_, p_217644_2_))).func_177646_a(textureatlassprite);
|
||||
+ SimpleBakedModel.Builder simplebakedmodel$builder = (new SimpleBakedModel.Builder(this, this.getOverrides(this, p_217644_1_, p_217644_3_))).func_177646_a(textureatlassprite);
|
||||
+ SimpleBakedModel.Builder simplebakedmodel$builder = (new SimpleBakedModel.Builder(this, this.getOverrides(p_217644_1_, p_217644_2_, p_217644_3_, format))).func_177646_a(textureatlassprite);
|
||||
|
||||
for(BlockPart blockpart : this.func_178298_a()) {
|
||||
for(Direction direction : blockpart.field_178240_c.keySet()) {
|
||||
@@ -49,14 +54,14 @@
|
||||
TextureAtlasSprite textureatlassprite1 = p_217644_3_.apply(new ResourceLocation(this.func_178308_c(blockpartface.field_178242_d)));
|
||||
if (blockpartface.field_178244_b == null) {
|
||||
- simplebakedmodel$builder.func_177648_a(func_217645_a(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
+ simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_2_));
|
||||
+ simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
} else {
|
||||
- simplebakedmodel$builder.func_177650_a(p_217644_4_.func_188048_b().func_177523_a(blockpartface.field_178244_b), func_217645_a(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
+ simplebakedmodel$builder.func_177650_a(p_217644_2_.getState().apply(java.util.Optional.empty()).map(trsr -> trsr.rotate(direction)).orElse(direction), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_2_));
|
||||
+ simplebakedmodel$builder.func_177650_a(p_217644_4_.getState().apply(java.util.Optional.empty()).map(trsr -> trsr.rotateTransform(blockpartface.field_178244_b)).orElse(blockpartface.field_178244_b), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,6 +199,10 @@
|
||||
@@ -191,6 +206,10 @@
|
||||
return field_217647_g.func_217648_a(p_217645_0_.field_178241_a, p_217645_0_.field_178239_b, p_217645_1_, p_217645_2_, p_217645_3_, p_217645_4_, p_217645_0_.field_178237_d, p_217645_0_.field_178238_e);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -7,11 +7,11 @@
|
||||
+ @Deprecated
|
||||
public static BlockModelDefinition func_209577_a(BlockModelDefinition.ContainerHolder p_209577_0_, Reader p_209577_1_) {
|
||||
- return JSONUtils.func_193839_a(p_209577_0_.field_209575_a, p_209577_1_, BlockModelDefinition.class);
|
||||
+ return fromJson(p_209577_0_, p_209577_1_, null);
|
||||
+ return fromJson(p_209577_0_, p_209577_1_, null, null, null);
|
||||
}
|
||||
|
||||
+ public static BlockModelDefinition fromJson(BlockModelDefinition.ContainerHolder containerHolderIn, Reader readerIn, @Nullable net.minecraft.util.ResourceLocation location) {
|
||||
+ return net.minecraftforge.client.model.BlockStateLoader.load(readerIn, location, containerHolderIn.field_209575_a);
|
||||
+ public static BlockModelDefinition fromJson(BlockModelDefinition.ContainerHolder containerHolderIn, Reader readerIn, @Nullable net.minecraft.util.ResourceLocation location, @Nullable ModelBakery bakery, @Nullable java.util.function.BiConsumer<net.minecraft.util.ResourceLocation, IUnbakedModel> modelConsumer) {
|
||||
+ return net.minecraftforge.client.model.BlockStateLoader.load(readerIn, location, containerHolderIn.field_209575_a, bakery, modelConsumer);
|
||||
+ }
|
||||
+
|
||||
public BlockModelDefinition(Map<String, VariantList> p_i46572_1_, Multipart p_i46572_2_) {
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
+ }
|
||||
+
|
||||
+ private void fillVertexData(int[] p_188015_1_, int p_188015_2_, Direction p_188015_3_, BlockFaceUV p_188015_4_, float[] p_188015_5_, TextureAtlasSprite p_188015_6_, net.minecraftforge.common.model.ITransformation p_188015_7_, @Nullable BlockPartRotation p_188015_8_, boolean p_188015_9_) {
|
||||
+ Direction direction = p_188015_7_.rotate(p_188015_3_);
|
||||
+ Direction direction = p_188015_7_.rotateTransform(p_188015_3_);
|
||||
int i = p_188015_9_ ? this.func_178413_a(direction) : -1;
|
||||
FaceDirection.VertexInformation facedirection$vertexinformation = FaceDirection.func_179027_a(p_188015_3_).func_179025_a(p_188015_2_);
|
||||
Vector3f vector3f = new Vector3f(p_188015_5_[facedirection$vertexinformation.field_179184_a], p_188015_5_[facedirection$vertexinformation.field_179182_b], p_188015_5_[facedirection$vertexinformation.field_179183_c]);
|
||||
|
||||
@@ -6,13 +6,17 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public interface IBakedModel {
|
||||
+public interface IBakedModel extends net.minecraftforge.client.extensions.IForgeBakedModel {
|
||||
+
|
||||
+ /**@deprecated Forge: Use {@link net.minecraftforge.client.extensions.IForgeBakedModel#getQuads(IBlockState, EnumFacing, Random, net.minecraftforge.client.model.data.IModelData)}*/
|
||||
+ @Deprecated
|
||||
List<BakedQuad> func_200117_a(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_);
|
||||
|
||||
boolean func_177555_b();
|
||||
@@ -21,7 +23,8 @@
|
||||
@@ -19,9 +21,12 @@
|
||||
|
||||
boolean func_188618_c();
|
||||
|
||||
+ /**@deprecated Forge: Use {@link net.minecraftforge.client.extensions.IForgeBakedModel#getParticleTexture(net.minecraftforge.client.model.data.IModelData)}*/
|
||||
+ @Deprecated
|
||||
TextureAtlasSprite func_177554_e();
|
||||
|
||||
- ItemCameraTransforms func_177552_f();
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
- IBakedModel func_217641_a(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_);
|
||||
+ @Deprecated
|
||||
+ default IBakedModel func_217641_a(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_) {
|
||||
+ return bake(p_217641_1_::func_209597_a, p_217641_2_, p_217641_3_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ return bake(p_217641_1_, p_217641_2_, p_217641_3_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ }
|
||||
}
|
||||
@@ -1,25 +1,22 @@
|
||||
--- a/net/minecraft/client/renderer/model/ItemOverrideList.java
|
||||
+++ b/net/minecraft/client/renderer/model/ItemOverrideList.java
|
||||
@@ -24,10 +24,17 @@
|
||||
@@ -24,10 +24,14 @@
|
||||
this.field_209582_c = Collections.emptyList();
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Use IUnbakedModel
|
||||
+ @Deprecated //Forge: Use IUnbakedModel, add texture getter
|
||||
public ItemOverrideList(ModelBakery p_i50984_1_, BlockModel p_i50984_2_, Function<ResourceLocation, IUnbakedModel> p_i50984_3_, List<ItemOverride> p_i50984_4_) {
|
||||
+ this(p_i50984_1_, (IUnbakedModel)p_i50984_2_, p_i50984_3_, p_i50984_4_);
|
||||
+ this(p_i50984_1_, (IUnbakedModel)p_i50984_2_, p_i50984_3_, p_i50984_1_.field_177609_j::func_195424_a, p_i50984_4_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ }
|
||||
+ public ItemOverrideList(ModelBakery p_i50984_1_, IUnbakedModel p_i50984_2_, Function<ResourceLocation, IUnbakedModel> p_i50984_3_, List<ItemOverride> p_i50984_4_) {
|
||||
+ this(p_i50984_2_, p_i50984_3_, p_i50984_4_, net.minecraftforge.client.model.ModelLoader.defaultTextureGetter());
|
||||
+ }
|
||||
+ public ItemOverrideList(IUnbakedModel p_i50984_2_, Function<ResourceLocation, IUnbakedModel> p_i50984_3_, List<ItemOverride> p_i50984_4_, Function<ResourceLocation, net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter) {
|
||||
+ public ItemOverrideList(ModelBakery p_i50984_1_, IUnbakedModel p_i50984_2_, Function<ResourceLocation, IUnbakedModel> p_i50984_3_, Function<ResourceLocation, net.minecraft.client.renderer.texture.TextureAtlasSprite> textureGetter, List<ItemOverride> p_i50984_4_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
this.field_209582_c = p_i50984_4_.stream().map((p_217649_3_) -> {
|
||||
IUnbakedModel iunbakedmodel = p_i50984_3_.apply(p_217649_3_.func_188026_a());
|
||||
- return Objects.equals(iunbakedmodel, p_i50984_2_) ? null : p_i50984_1_.func_217845_a(p_217649_3_.func_188026_a(), ModelRotation.X0_Y0);
|
||||
+ return Objects.equals(iunbakedmodel, p_i50984_2_) ? null : p_i50984_3_.apply(p_217649_3_.func_188026_a()).bake(p_i50984_3_, spriteGetter, ModelRotation.X0_Y0, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ return Objects.equals(iunbakedmodel, p_i50984_2_) ? null : p_i50984_1_.getBakedModel(p_217649_3_.func_188026_a(), ModelRotation.X0_Y0, textureGetter, format);
|
||||
}).collect(Collectors.toList());
|
||||
Collections.reverse(this.field_209582_c);
|
||||
|
||||
@@ -55,4 +62,8 @@
|
||||
@@ -55,4 +59,8 @@
|
||||
|
||||
return p_209581_1_;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/model/ModelBakery.java
|
||||
+++ b/net/minecraft/client/renderer/model/ModelBakery.java
|
||||
@@ -87,7 +87,7 @@
|
||||
@@ -97,7 +97,7 @@
|
||||
private final Set<ResourceLocation> field_217848_D = Sets.newHashSet();
|
||||
private final BlockModelDefinition.ContainerHolder field_209610_F = new BlockModelDefinition.ContainerHolder();
|
||||
private final Map<ResourceLocation, IUnbakedModel> field_217849_F = Maps.newHashMap();
|
||||
@@ -8,31 +8,90 @@
|
||||
+ private final Map<Triple<ResourceLocation, net.minecraftforge.common.model.IModelState, Boolean>, IBakedModel> field_217850_G = Maps.newHashMap();
|
||||
private final Map<ResourceLocation, IUnbakedModel> field_217851_H = Maps.newHashMap();
|
||||
private final Map<ResourceLocation, IBakedModel> field_217852_I = Maps.newHashMap();
|
||||
private final AtlasTexture.SheetData field_217853_J;
|
||||
@@ -269,7 +269,7 @@
|
||||
flag = true;
|
||||
lvt_9_4_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_217839_1_) -> {
|
||||
private AtlasTexture.SheetData field_217853_J;
|
||||
@@ -107,9 +107,17 @@
|
||||
});
|
||||
|
||||
public ModelBakery(IResourceManager p_i51735_1_, AtlasTexture p_i51735_2_, BlockColors p_i51735_3_, IProfiler p_i51735_4_) {
|
||||
+ this(p_i51735_1_, p_i51735_2_, p_i51735_3_, true);
|
||||
+ processLoading(p_i51735_4_);
|
||||
+ }
|
||||
+
|
||||
+ protected ModelBakery(IResourceManager p_i51735_1_, AtlasTexture p_i51735_2_, BlockColors p_i51735_3_, boolean vanillaBakery) {
|
||||
this.field_177598_f = p_i51735_1_;
|
||||
this.field_177609_j = p_i51735_2_;
|
||||
this.field_225365_D = p_i51735_3_;
|
||||
+ }
|
||||
+
|
||||
+ protected void processLoading(IProfiler p_i51735_4_) {
|
||||
p_i51735_4_.func_76320_a("missing_model");
|
||||
|
||||
try {
|
||||
@@ -142,12 +150,19 @@
|
||||
|
||||
p_i51735_4_.func_219895_b("special");
|
||||
this.func_217843_a(new ModelResourceLocation("minecraft:trident_in_hand#inventory"));
|
||||
+ for (ResourceLocation rl : getSpecialModels()) {
|
||||
+ // Same as func_217843_a but without restricting to MRL's
|
||||
+ IUnbakedModel iunbakedmodel = this.func_209597_a(rl);
|
||||
+ this.field_217849_F.put(rl, iunbakedmodel);
|
||||
+ this.field_217851_H.put(rl, iunbakedmodel);
|
||||
+ }
|
||||
p_i51735_4_.func_219895_b("textures");
|
||||
Set<String> set = Sets.newLinkedHashSet();
|
||||
Set<ResourceLocation> set1 = this.field_217851_H.values().stream().flatMap((p_217838_2_) -> {
|
||||
return p_217838_2_.func_209559_a(this::func_209597_a, set).stream();
|
||||
}).collect(Collectors.toSet());
|
||||
set1.addAll(field_177602_b);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.gatherFluidTextures(set1);
|
||||
set.forEach((p_217833_0_) -> {
|
||||
field_177603_c.warn("Unable to resolve texture reference: {}", (Object)p_217833_0_);
|
||||
});
|
||||
@@ -288,7 +303,7 @@
|
||||
{
|
||||
lvt_13_5_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_217839_1_) -> {
|
||||
try (InputStream inputstream = p_217839_1_.func_199027_b()) {
|
||||
- Pair pair1 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
|
||||
+ Pair pair1 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
|
||||
return pair1;
|
||||
- Pair<String, BlockModelDefinition> pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
|
||||
+ Pair<String, BlockModelDefinition> pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_, this, this::func_209593_a));
|
||||
return pair2;
|
||||
} catch (Exception exception1) {
|
||||
throw new ModelBakery.BlockStateDefinitionException(String.format("Exception loading blockstate definition: '%s' in resourcepack: '%s': %s", p_217839_1_.func_199029_a(), p_217839_1_.func_199026_d(), exception1.getMessage()));
|
||||
@@ -381,7 +381,7 @@
|
||||
@@ -404,7 +419,12 @@
|
||||
|
||||
@Nullable
|
||||
public IBakedModel func_217845_a(ResourceLocation p_217845_1_, ISprite p_217845_2_) {
|
||||
- Triple<ResourceLocation, ModelRotation, Boolean> triple = Triple.of(p_217845_1_, p_217845_2_.func_188048_b(), p_217845_2_.func_188049_c());
|
||||
+ return getBakedModel(p_217845_1_, p_217845_2_, this.field_177609_j::func_195424_a, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ public IBakedModel getBakedModel(ResourceLocation p_217845_1_, ISprite p_217845_2_, java.util.function.Function<ResourceLocation, net.minecraft.client.renderer.texture.TextureAtlasSprite> textureGetter, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ Triple<ResourceLocation, net.minecraftforge.common.model.IModelState, Boolean> triple = Triple.of(p_217845_1_, p_217845_2_.getState(), p_217845_2_.func_188049_c());
|
||||
if (this.field_217850_G.containsKey(triple)) {
|
||||
return this.field_217850_G.get(triple);
|
||||
} else {
|
||||
@@ -389,7 +389,7 @@
|
||||
@@ -412,11 +432,11 @@
|
||||
if (iunbakedmodel instanceof BlockModel) {
|
||||
BlockModel blockmodel = (BlockModel)iunbakedmodel;
|
||||
if (blockmodel.func_178310_f() == field_177606_o) {
|
||||
- return field_217854_z.func_209579_a(this.field_177609_j::func_195424_a, blockmodel).func_217644_a(this, blockmodel, this.field_177609_j::func_195424_a, p_217845_2_);
|
||||
+ return field_217854_z.func_209579_a(this.field_177609_j::func_195424_a, blockmodel).bake(this::func_209597_a, this.field_177609_j::func_195424_a, p_217845_2_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ return field_217854_z.func_209579_a(textureGetter, blockmodel).func_217644_a(this, blockmodel, textureGetter, p_217845_2_);
|
||||
}
|
||||
}
|
||||
|
||||
- IBakedModel ibakedmodel = iunbakedmodel.func_217641_a(this, this.field_177609_j::func_195424_a, p_217845_2_);
|
||||
+ IBakedModel ibakedmodel = iunbakedmodel.bake(this, this.field_177609_j::func_195424_a, p_217845_2_, format);
|
||||
this.field_217850_G.put(triple, ibakedmodel);
|
||||
return ibakedmodel;
|
||||
}
|
||||
@@ -471,6 +491,10 @@
|
||||
return this.field_225367_M;
|
||||
}
|
||||
|
||||
+ public Set<ResourceLocation> getSpecialModels() {
|
||||
+ return java.util.Collections.emptySet();
|
||||
+ }
|
||||
+
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static class BlockStateDefinitionException extends RuntimeException {
|
||||
public BlockStateDefinitionException(String p_i49526_1_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/model/ModelManager.java
|
||||
+++ b/net/minecraft/client/renderer/model/ModelManager.java
|
||||
@@ -12,7 +12,7 @@
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ModelManager extends ReloadListener<ModelBakery> {
|
||||
@@ -8,21 +8,32 @@
|
||||
+ private Map<ResourceLocation, IBakedModel> field_174958_a = new java.util.HashMap<>();
|
||||
private final AtlasTexture field_174956_b;
|
||||
private final BlockModelShapes field_174957_c;
|
||||
private IBakedModel field_174955_d;
|
||||
@@ -34,9 +34,15 @@
|
||||
return this.field_174957_c;
|
||||
}
|
||||
private final BlockColors field_224743_d;
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
protected ModelBakery func_212854_a_(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
|
||||
p_212854_2_.func_219894_a();
|
||||
- ModelBakery modelbakery = new ModelBakery(p_212854_1_, this.field_174956_b, this.field_224743_d, p_212854_2_);
|
||||
+ net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_212854_1_, this.field_174956_b, this.field_224743_d, p_212854_2_);
|
||||
p_212854_2_.func_219897_b();
|
||||
return modelbakery;
|
||||
}
|
||||
@@ -55,6 +55,7 @@
|
||||
this.field_174958_a = p_212853_1_.func_217846_a();
|
||||
this.field_224744_f = p_212853_1_.func_225354_b();
|
||||
this.field_174955_d = this.field_174958_a.get(ModelBakery.field_177604_a);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, (net.minecraftforge.client.model.ModelLoader) p_212853_1_);
|
||||
p_212853_3_.func_219895_b("cache");
|
||||
this.field_174957_c.func_178124_c();
|
||||
p_212853_3_.func_76319_b();
|
||||
@@ -78,4 +79,10 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // TODO
|
||||
+ //@Override
|
||||
+ public net.minecraftforge.resource.IResourceType getResourceType() {
|
||||
+ return net.minecraftforge.resource.VanillaResourceType.MODELS;
|
||||
+ }
|
||||
+
|
||||
protected ModelBakery func_212854_a_(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
|
||||
p_212854_2_.func_219894_a();
|
||||
- ModelBakery modelbakery = new ModelBakery(p_212854_1_, this.field_174956_b, p_212854_2_);
|
||||
+ net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_212854_1_, this.field_174956_b, p_212854_2_);
|
||||
p_212854_2_.func_219897_b();
|
||||
return modelbakery;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@
|
||||
+
|
||||
+ public java.util.Optional<net.minecraftforge.common.model.TRSRTransformation> apply(java.util.Optional<? extends net.minecraftforge.common.model.IModelPart> part) { return net.minecraftforge.client.ForgeHooksClient.applyTransform(this, part); }
|
||||
+ public javax.vecmath.Matrix4f getMatrixVec() { return net.minecraftforge.common.model.TRSRTransformation.from(this).getMatrixVec(); }
|
||||
+ public Direction rotate(Direction facing) { return func_177523_a(facing); }
|
||||
+ public Direction rotateTransform(Direction facing) { return func_177523_a(facing); }
|
||||
+ public int rotate(Direction facing, int vertexIndex) { return func_177520_a(facing, vertexIndex); }
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
private final ResourceLocation field_188050_a;
|
||||
private final ModelRotation field_188051_b;
|
||||
private final boolean field_188052_c;
|
||||
@@ -30,10 +30,16 @@
|
||||
@@ -30,6 +30,7 @@
|
||||
return this.field_188050_a;
|
||||
}
|
||||
|
||||
@@ -17,12 +17,3 @@
|
||||
public ModelRotation func_188048_b() {
|
||||
return this.field_188051_b;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.model.IModelState getState() {
|
||||
+ return this.field_188051_b;
|
||||
+ }
|
||||
+
|
||||
public boolean func_188049_c() {
|
||||
return this.field_188052_c;
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
@Nullable
|
||||
- public IBakedModel func_217641_a(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_) {
|
||||
+ @Override
|
||||
+ public IBakedModel bake(Function<ResourceLocation, IUnbakedModel> p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ public IBakedModel bake(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
if (this.func_188114_a().isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
for(Variant variant : this.func_188114_a()) {
|
||||
- IBakedModel ibakedmodel = p_217641_1_.func_217845_a(variant.func_188046_a(), variant);
|
||||
+ IBakedModel ibakedmodel = p_217641_1_.apply(variant.func_188046_a()).bake(p_217641_1_, p_217641_2_, variant, format);
|
||||
+ IBakedModel ibakedmodel = p_217641_1_.getBakedModel(variant.func_188046_a(), variant, p_217641_2_, format);
|
||||
weightedbakedmodel$builder.func_177677_a(ibakedmodel, variant.func_188047_d());
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
@Nullable
|
||||
- public IBakedModel func_217641_a(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_) {
|
||||
+ @Override
|
||||
+ public IBakedModel bake(Function<ResourceLocation, IUnbakedModel> p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ public IBakedModel bake(ModelBakery p_217641_1_, Function<ResourceLocation, TextureAtlasSprite> p_217641_2_, ISprite p_217641_3_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
MultipartBakedModel.Builder multipartbakedmodel$builder = new MultipartBakedModel.Builder();
|
||||
|
||||
for(Selector selector : this.func_188136_a()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/AtlasTexture.java
|
||||
+++ b/net/minecraft/client/renderer/texture/AtlasTexture.java
|
||||
@@ -79,10 +79,12 @@
|
||||
@@ -80,6 +80,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,15 @@
|
||||
}
|
||||
|
||||
public AtlasTexture.SheetData func_215254_a(IResourceManager p_215254_1_, Iterable<ResourceLocation> p_215254_2_, IProfiler p_215254_3_) {
|
||||
Set<ResourceLocation> set = Sets.newHashSet();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(this);
|
||||
p_215254_3_.func_76320_a("preparing");
|
||||
p_215254_2_.forEach((p_215253_1_) -> {
|
||||
if (p_215253_1_ == null) {
|
||||
@@ -110,6 +112,7 @@
|
||||
@@ -92,6 +93,7 @@
|
||||
set.add(p_215253_1_);
|
||||
}
|
||||
});
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(this, set);
|
||||
int i = this.field_215265_o;
|
||||
Stitcher stitcher = new Stitcher(i, i, this.field_147636_j);
|
||||
int j = Integer.MAX_VALUE;
|
||||
@@ -111,6 +113,7 @@
|
||||
|
||||
int i1 = Math.min(j, k);
|
||||
int j1 = MathHelper.func_151239_c(i1);
|
||||
@@ -21,7 +24,7 @@
|
||||
if (j1 < this.field_147636_j) {
|
||||
field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.field_94254_c, this.field_147636_j, j1, i1);
|
||||
this.field_147636_j = j1;
|
||||
@@ -191,6 +194,7 @@
|
||||
@@ -198,6 +201,7 @@
|
||||
|
||||
label62: {
|
||||
boolean flag;
|
||||
@@ -29,15 +32,14 @@
|
||||
try {
|
||||
iresource = p_195422_1_.func_199002_a(resourcelocation);
|
||||
p_195422_2_.func_195664_a(iresource, this.field_147636_j + 1);
|
||||
@@ -267,7 +271,94 @@
|
||||
this.field_94252_e.clear();
|
||||
@@ -275,6 +279,93 @@
|
||||
this.field_94258_i.clear();
|
||||
}
|
||||
+
|
||||
|
||||
+ //===================================================================================================
|
||||
+ // Forge Start
|
||||
+ //===================================================================================================
|
||||
|
||||
+
|
||||
+ private final java.util.Deque<ResourceLocation> loadingSprites = new java.util.ArrayDeque<>();
|
||||
+ private final java.util.Set<ResourceLocation> loadedSprites = new java.util.HashSet<>();
|
||||
+
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/client/renderer/texture/NativeImage.java
|
||||
+++ b/net/minecraft/client/renderer/texture/NativeImage.java
|
||||
@@ -172,7 +172,7 @@
|
||||
public int func_195709_a(int p_195709_1_, int p_195709_2_) {
|
||||
if (this.field_211680_b != NativeImage.PixelFormat.RGBA) {
|
||||
throw new IllegalArgumentException(String.format("getPixelRGBA only works on RGBA images; have %s", this.field_211680_b));
|
||||
- } else if (p_195709_1_ <= this.field_195719_a && p_195709_2_ <= this.field_195720_b) {
|
||||
+ } else if (p_195709_1_ >= 0 && p_195709_2_ >= 0 && p_195709_1_ < this.field_195719_a && p_195709_2_ < this.field_195720_b) { //Fix MC-162953 bounds checks in `NativeImage`
|
||||
this.func_195696_g();
|
||||
return MemoryUtil.memIntBuffer(this.field_195722_d, this.field_195723_e).get(p_195709_1_ + p_195709_2_ * this.field_195719_a);
|
||||
} else {
|
||||
@@ -183,7 +183,7 @@
|
||||
public void func_195700_a(int p_195700_1_, int p_195700_2_, int p_195700_3_) {
|
||||
if (this.field_211680_b != NativeImage.PixelFormat.RGBA) {
|
||||
throw new IllegalArgumentException(String.format("getPixelRGBA only works on RGBA images; have %s", this.field_211680_b));
|
||||
- } else if (p_195700_1_ <= this.field_195719_a && p_195700_2_ <= this.field_195720_b) {
|
||||
+ } else if (p_195700_1_ >= 0 && p_195700_2_ >= 0 && p_195700_1_ < this.field_195719_a && p_195700_2_ < this.field_195720_b) { //Fix MC-162953 bounds checks in `NativeImage`
|
||||
this.func_195696_g();
|
||||
MemoryUtil.memIntBuffer(this.field_195722_d, this.field_195723_e).put(p_195700_1_ + p_195700_2_ * this.field_195719_a, p_195700_3_);
|
||||
} else {
|
||||
@@ -194,7 +194,7 @@
|
||||
public byte func_211675_e(int p_211675_1_, int p_211675_2_) {
|
||||
if (!this.field_211680_b.func_211653_r()) {
|
||||
throw new IllegalArgumentException(String.format("no luminance or alpha in %s", this.field_211680_b));
|
||||
- } else if (p_211675_1_ <= this.field_195719_a && p_211675_2_ <= this.field_195720_b) {
|
||||
+ } else if (p_211675_1_ >= 0 && p_211675_2_ >= 0 && p_211675_1_ < this.field_195719_a && p_211675_2_ < this.field_195720_b) { //Fix MC-162953 bounds checks in `NativeImage`
|
||||
return MemoryUtil.memByteBuffer(this.field_195722_d, this.field_195723_e).get((p_211675_1_ + p_211675_2_ * this.field_195719_a) * this.field_211680_b.func_211651_a() + this.field_211680_b.func_211647_v() / 8);
|
||||
} else {
|
||||
throw new IllegalArgumentException(String.format("(%s, %s) outside of image bounds (%s, %s)", p_211675_1_, p_211675_2_, this.field_195719_a, this.field_195720_b));
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
+++ b/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
@@ -13,6 +13,8 @@
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class Stitcher {
|
||||
@@ -9,29 +9,20 @@
|
||||
private static final Comparator<Stitcher.Holder> field_217797_a = Comparator.<Stitcher.Holder, Integer>comparing((p_217793_0_) -> {
|
||||
return -p_217793_0_.field_94201_d;
|
||||
}).thenComparing((p_217795_0_) -> {
|
||||
@@ -50,15 +52,21 @@
|
||||
public void func_94305_f() {
|
||||
List<Stitcher.Holder> list = Lists.newArrayList(this.field_94319_a);
|
||||
list.sort(field_217797_a);
|
||||
+ try(net.minecraftforge.fml.common.progress.ProgressBar bar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Texture stitching", list.size())) {
|
||||
@@ -54,6 +56,12 @@
|
||||
|
||||
for(Stitcher.Holder stitcher$holder : list) {
|
||||
+ bar.step(stitcher$holder.field_98151_a.func_195668_m().toString());
|
||||
if (!this.func_94310_b(stitcher$holder)) {
|
||||
+ LOGGER.info(String.format("Unable to fit: %s - size: %dx%d - Maybe try a lower resolution resourcepack?", stitcher$holder.field_98151_a.func_195668_m(), stitcher$holder.field_98151_a.func_94211_a(), stitcher$holder.field_98151_a.func_94216_b()));
|
||||
+ for (Stitcher.Holder h : list)
|
||||
+ LOGGER.info(" {}", h);
|
||||
throw new StitcherException(stitcher$holder.field_98151_a);
|
||||
}
|
||||
}
|
||||
|
||||
this.field_94318_c = MathHelper.func_151236_b(this.field_94318_c);
|
||||
this.field_94315_d = MathHelper.func_151236_b(this.field_94315_d);
|
||||
+ }; // Forge: end progress bar
|
||||
}
|
||||
|
||||
public List<TextureAtlasSprite> func_94309_g() {
|
||||
@@ -104,7 +112,7 @@
|
||||
+ LOGGER.info(new net.minecraftforge.fml.loading.AdvancedLogMessageAdapter(sb->{
|
||||
+ sb.append("Unable to fit: ").append(stitcher$holder.field_98151_a.func_195668_m());
|
||||
+ sb.append(" - size: ").append(stitcher$holder.field_98151_a.func_94211_a()).append("x").append(stitcher$holder.field_98151_a.func_94216_b());
|
||||
+ sb.append(" - Maybe try a lower resolution resourcepack?\n");
|
||||
+ list.forEach(h-> sb.append("\t").append(h).append("\n"));
|
||||
+ }));
|
||||
throw new StitcherException(stitcher$holder.field_98151_a, list.stream().map((p_225334_0_) -> {
|
||||
return p_225334_0_.field_98151_a;
|
||||
}).collect(ImmutableList.toImmutableList()));
|
||||
@@ -107,7 +115,7 @@
|
||||
boolean flag4 = flag2 && j != l;
|
||||
boolean flag;
|
||||
if (flag3 ^ flag4) {
|
||||
@@ -40,7 +31,7 @@
|
||||
} else {
|
||||
flag = flag1 && i <= j;
|
||||
}
|
||||
@@ -141,7 +149,7 @@
|
||||
@@ -144,7 +152,7 @@
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@
|
||||
private final ResourceLocation field_110984_i;
|
||||
protected final int field_130223_c;
|
||||
protected final int field_130224_d;
|
||||
@@ -104,7 +104,10 @@
|
||||
@@ -103,7 +103,10 @@
|
||||
anativeimage[k1] = this.field_195670_c[k1];
|
||||
} else {
|
||||
NativeImage nativeimage1 = anativeimage[k1 - 1];
|
||||
@@ -21,7 +21,7 @@
|
||||
int k = nativeimage.func_195702_a();
|
||||
int l = nativeimage.func_195714_b();
|
||||
|
||||
@@ -113,8 +116,11 @@
|
||||
@@ -112,8 +115,11 @@
|
||||
nativeimage.func_195700_a(i1, j1, func_195661_b(nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 1), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 1), flag));
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,6 +202,7 @@
|
||||
@@ -209,6 +215,7 @@
|
||||
|
||||
private void func_195667_a(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_) {
|
||||
for(int i = 0; i < this.field_195670_c.length; ++i) {
|
||||
@@ -42,7 +42,7 @@
|
||||
p_195667_3_[i].func_195706_a(i, this.field_110975_c >> i, this.field_110974_d >> i, p_195667_1_ >> i, p_195667_2_ >> i, this.field_130223_c >> i, this.field_130224_d >> i, this.field_195670_c.length > 1);
|
||||
}
|
||||
|
||||
@@ -451,4 +458,10 @@
|
||||
@@ -464,4 +471,10 @@
|
||||
public void func_195663_q() {
|
||||
this.func_195659_d(0);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
--- a/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
+++ b/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
public boolean func_110580_a(ResourceLocation p_110580_1_, ITickableTextureObject p_110580_2_) {
|
||||
- if (this.func_110579_a(p_110580_1_, p_110580_2_)) {
|
||||
+ if (this.func_110579_a(p_110580_1_, (ITextureObject)p_110580_2_)) { //TODO: Move to MCPConfig
|
||||
this.field_110583_b.add(p_110580_2_);
|
||||
return true;
|
||||
} else {
|
||||
@@ -125,6 +125,7 @@
|
||||
public void func_147645_c(ResourceLocation p_147645_1_) {
|
||||
ITextureObject itextureobject = this.func_110581_b(p_147645_1_);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/tileentity/PistonTileEntityRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/tileentity/PistonTileEntityRenderer.java
|
||||
@@ -67,6 +67,7 @@
|
||||
@@ -70,6 +70,7 @@
|
||||
}
|
||||
|
||||
private boolean func_188186_a(BlockPos p_188186_1_, BlockState p_188186_2_, BufferBuilder p_188186_3_, World p_188186_4_, boolean p_188186_5_) {
|
||||
|
||||
Loaded 100 of 1225 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user