mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5987d917b8 | ||
|
|
738abbb360 | ||
|
|
1558362583 | ||
|
|
5b67354e24 | ||
|
|
dec91dec68 | ||
|
|
1933d05e36 | ||
|
|
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.
|
||||
+308
-51
@@ -7,31 +7,44 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
|
||||
classpath 'org.ow2.asm:asm:7.2'
|
||||
classpath 'org.ow2.asm:asm-tree:7.2'
|
||||
}
|
||||
}
|
||||
import groovy.json.JsonSlurper
|
||||
import groovy.json.JsonBuilder
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.LinkedHashMap
|
||||
import java.util.TreeSet
|
||||
import java.util.stream.Collectors
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
import java.util.zip.ZipOutputStream
|
||||
import java.security.MessageDigest
|
||||
import java.net.URL
|
||||
import net.minecraftforge.gradle.common.task.ArchiveChecksum
|
||||
import net.minecraftforge.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.15.1'
|
||||
MCP_VERSION = '20191217.105819'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -69,7 +82,7 @@ project(':clean') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'net.minecraftforge:forgespi:0.13.+'
|
||||
implementation 'net.minecraftforge:forgespi:2.0.+'
|
||||
}
|
||||
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 = '29.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
|
||||
// ForgeMC is a unique identifier for every MC version we have supported.
|
||||
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
|
||||
MCP_ARTIFACT = project(':mcp').mcp.config
|
||||
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.8.5'
|
||||
VERSION_JSON = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.7:fatjar'
|
||||
}
|
||||
|
||||
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
|
||||
]
|
||||
}
|
||||
@@ -326,29 +402,33 @@ project(':forge') {
|
||||
fmllauncherImplementation.extendsFrom(installer)
|
||||
}
|
||||
dependencies {
|
||||
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 'org.ow2.asm:asm:7.2'
|
||||
installer 'org.ow2.asm:asm-commons:7.2'
|
||||
installer 'org.ow2.asm:asm-tree:7.2'
|
||||
installer 'cpw.mods:modlauncher:5.0.+'
|
||||
installer 'cpw.mods:grossjava9hacks:1.1.+'
|
||||
installer 'net.minecraftforge:accesstransformers: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:2.0.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:2.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:2.0.+'
|
||||
installer 'net.minecraftforge:coremods:2.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 'com.electronwill.night-config:core:3.6.2'
|
||||
installer 'com.electronwill.night-config:toml:3.6.2'
|
||||
installer 'org.jline:jline:3.12.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.0'
|
||||
installer 'net.jodah:typetools:0.6.0'
|
||||
installer 'java3d:vecmath:1.5.2'
|
||||
installer 'net.jodah:typetools:0.6.1'
|
||||
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 +491,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 +567,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 +741,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 +779,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 +795,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 +814,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 +825,10 @@ project(':forge') {
|
||||
PATCHED_SHA: [
|
||||
client: "'${sha1(applyClientBinPatches.output)}'",
|
||||
server: "'${sha1(applyServerBinPatches.output)}'"
|
||||
],
|
||||
MCP_VERSION: [
|
||||
client: "'${MCP_VERSION}'",
|
||||
server: "'${MCP_VERSION}'"
|
||||
]
|
||||
],
|
||||
processors: [
|
||||
@@ -620,21 +854,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 +892,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 +909,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 +919,7 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
dependsOn checksums
|
||||
*/
|
||||
|
||||
// add crowdin locales
|
||||
from { !crowdin.state.skipped ? zipTree(crowdin.archivePath) : null}
|
||||
@@ -711,7 +945,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 +1085,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 +1155,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="[30,)" #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="[30,)" #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.15.1]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
side="BOTH"
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "examplemod resources",
|
||||
"pack_format": 4,
|
||||
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
|
||||
"pack_format": 5,
|
||||
"_comment": "A pack_format of 5 requires json lang files and some texture changes from 1.15. Note: we require v5 pack meta for all mods."
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
--- a/com/mojang/blaze3d/platform/GLX.java
|
||||
+++ b/com/mojang/blaze3d/platform/GLX.java
|
||||
@@ -115,6 +115,10 @@
|
||||
p_212906_0_.put(1286, "Operation on incomplete framebuffer");
|
||||
});
|
||||
|
||||
+ /* Stores the last values sent into glMultiTexCoord2f */
|
||||
+ public static float lastBrightnessX = 0.0f;
|
||||
+ public static float lastBrightnessY = 0.0f;
|
||||
+
|
||||
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 @@
|
||||
GL13.glMultiTexCoord2f(p_glMultiTexCoord2f_0_, p_glMultiTexCoord2f_1_, p_glMultiTexCoord2f_2_);
|
||||
}
|
||||
|
||||
+ if (p_glMultiTexCoord2f_0_ == GL_TEXTURE1) {
|
||||
+ lastBrightnessX = p_glMultiTexCoord2f_1_;
|
||||
+ lastBrightnessY = p_glMultiTexCoord2f_2_;
|
||||
+ }
|
||||
}
|
||||
|
||||
public static void glBlendFuncSeparate(int p_glBlendFuncSeparate_0_, int p_glBlendFuncSeparate_1_, int p_glBlendFuncSeparate_2_, int p_glBlendFuncSeparate_3_) {
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -578,10 +578,17 @@
|
||||
GL13.glClientActiveTexture(p_227747_0_);
|
||||
}
|
||||
|
||||
+ /* Stores the last values sent into glMultiTexCoord2f */
|
||||
+ public static float lastBrightnessX = 0.0f;
|
||||
+ public static float lastBrightnessY = 0.0f;
|
||||
@Deprecated
|
||||
public static void func_227640_a_(int p_227640_0_, float p_227640_1_, float p_227640_2_) {
|
||||
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
|
||||
GL13.glMultiTexCoord2f(p_227640_0_, p_227640_1_, p_227640_2_);
|
||||
+ if (p_227640_0_ == GL13.GL_TEXTURE1) {
|
||||
+ lastBrightnessX = p_227640_1_;
|
||||
+ lastBrightnessY = p_227640_2_;
|
||||
+ }
|
||||
}
|
||||
|
||||
public static void func_227706_d_(int p_227706_0_, int p_227706_1_, int p_227706_2_, int p_227706_3_) {
|
||||
@@ -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,11 @@
|
||||
--- a/com/mojang/blaze3d/vertex/IVertexBuilder.java
|
||||
+++ b/com/mojang/blaze3d/vertex/IVertexBuilder.java
|
||||
@@ -17,7 +17,7 @@
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public interface IVertexBuilder {
|
||||
+public interface IVertexBuilder extends net.minecraftforge.client.extensions.IForgeVertexBuilder {
|
||||
Logger field_227884_f_ = LogManager.getLogger();
|
||||
|
||||
IVertexBuilder func_225582_a_(double p_225582_1_, double p_225582_3_, double p_225582_5_);
|
||||
@@ -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/advancements/criterion/ItemPredicate.java
|
||||
+++ b/net/minecraft/advancements/criterion/ItemPredicate.java
|
||||
@@ -25,6 +25,8 @@
|
||||
@@ -26,6 +26,8 @@
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class ItemPredicate {
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final ItemPredicate field_192495_a = new ItemPredicate();
|
||||
@Nullable
|
||||
private final Tag<Item> field_200018_b;
|
||||
@@ -93,6 +95,11 @@
|
||||
@@ -105,6 +107,11 @@
|
||||
public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) {
|
||||
if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) {
|
||||
JsonObject jsonobject = JSONUtils.func_151210_l(p_192492_0_, "item");
|
||||
@@ -21,7 +21,7 @@
|
||||
MinMaxBounds.IntBound minmaxbounds$intbound = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("count"));
|
||||
MinMaxBounds.IntBound minmaxbounds$intbound1 = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("durability"));
|
||||
if (jsonobject.has("data")) {
|
||||
@@ -181,6 +188,14 @@
|
||||
@@ -204,6 +211,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
+
|
||||
public static class Builder {
|
||||
private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
|
||||
@Nullable
|
||||
private final List<EnchantmentPredicate> field_226657_b_ = Lists.newArrayList();
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractRailBlock.java
|
||||
+++ b/net/minecraft/block/AbstractRailBlock.java
|
||||
@@ -35,7 +35,7 @@
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
@@ -9,7 +9,7 @@
|
||||
return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
|
||||
if (!p_220069_2_.field_72995_K) {
|
||||
@@ -27,8 +27,8 @@
|
||||
p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this);
|
||||
}
|
||||
|
||||
@@ -127,5 +127,66 @@
|
||||
}
|
||||
@@ -134,5 +134,66 @@
|
||||
return blockstate.func_206870_a(this.func_176560_l(), flag ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH);
|
||||
}
|
||||
|
||||
+ //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
--- a/net/minecraft/block/BedBlock.java
|
||||
+++ b/net/minecraft/block/BedBlock.java
|
||||
@@ -85,7 +85,9 @@
|
||||
@@ -88,7 +88,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (p_220051_2_.field_73011_w.func_76567_e() && p_220051_2_.func_180494_b(p_220051_3_) != Biomes.field_76778_j) {
|
||||
+ net.minecraftforge.common.extensions.IForgeDimension.SleepResult sleepResult = p_220051_2_.field_73011_w.canSleepAt(p_220051_4_, p_220051_3_);
|
||||
- if (p_225533_2_.field_73011_w.func_76567_e() && p_225533_2_.func_226691_t_(p_225533_3_) != Biomes.field_76778_j) {
|
||||
+ net.minecraftforge.common.extensions.IForgeDimension.SleepResult sleepResult = p_225533_2_.field_73011_w.canSleepAt(p_225533_4_, p_225533_3_);
|
||||
+ if (sleepResult != net.minecraftforge.common.extensions.IForgeDimension.SleepResult.BED_EXPLODES) {
|
||||
+ if (sleepResult == net.minecraftforge.common.extensions.IForgeDimension.SleepResult.DENY) return true;
|
||||
if (p_220051_1_.func_177229_b(field_176471_b)) {
|
||||
p_220051_4_.func_146105_b(new TranslationTextComponent("block.minecraft.bed.occupied"), true);
|
||||
return true;
|
||||
+ if (sleepResult == net.minecraftforge.common.extensions.IForgeDimension.SleepResult.DENY) return ActionResultType.SUCCESS;
|
||||
if (p_225533_1_.func_177229_b(field_176471_b)) {
|
||||
if (!this.func_226861_a_(p_225533_2_, p_225533_3_)) {
|
||||
p_225533_4_.func_146105_b(new TranslationTextComponent("block.minecraft.bed.occupied"), true);
|
||||
@@ -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_149781_w = p_i48440_1_.field_200958_f;
|
||||
this.field_149782_v = p_i48440_1_.field_200959_g;
|
||||
this.field_149789_z = p_i48440_1_.field_200960_h;
|
||||
+ 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_149765_K = p_i48440_1_.field_200961_i;
|
||||
this.field_226886_f_ = p_i48440_1_.field_226893_j_;
|
||||
this.field_226887_g_ = p_i48440_1_.field_226894_k_;
|
||||
@@ -297,7 +302,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
|
||||
@@ -22,7 +33,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -302,8 +303,9 @@
|
||||
@@ -314,8 +319,9 @@
|
||||
return this.field_149789_z;
|
||||
}
|
||||
|
||||
@@ -33,16 +44,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -314,7 +316,7 @@
|
||||
@Deprecated
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int func_220058_a(BlockState p_220058_1_, IEnviromentBlockReader p_220058_2_, BlockPos p_220058_3_) {
|
||||
- return p_220058_2_.func_217338_b(p_220058_3_, p_220058_1_.func_185906_d());
|
||||
+ return p_220058_2_.func_217338_b(p_220058_3_, p_220058_1_.getLightValue(p_220058_2_, p_220058_3_));
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -459,10 +461,9 @@
|
||||
@@ -471,10 +477,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 +56,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -471,8 +472,8 @@
|
||||
@@ -483,8 +488,8 @@
|
||||
if (f == -1.0F) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
@@ -65,25 +67,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,7 +553,7 @@
|
||||
@@ -494,8 +499,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;
|
||||
@@ -555,7 +559,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 @@
|
||||
@@ -567,7 +571,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 @@
|
||||
@@ -577,6 +581,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -91,15 +103,15 @@
|
||||
public float func_149638_a() {
|
||||
return this.field_149781_w;
|
||||
}
|
||||
@@ -676,6 +678,7 @@
|
||||
@@ -675,6 +680,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 @@
|
||||
}
|
||||
@@ -688,6 +694,7 @@
|
||||
return Fluids.field_204541_a.func_207188_f();
|
||||
}
|
||||
|
||||
@@ -107,7 +119,7 @@
|
||||
public float func_208618_m() {
|
||||
return this.field_149765_K;
|
||||
}
|
||||
@@ -710,6 +714,7 @@
|
||||
@@ -716,6 +723,7 @@
|
||||
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
|
||||
}
|
||||
|
||||
@@ -115,7 +127,7 @@
|
||||
public boolean func_149659_a(Explosion p_149659_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -754,6 +759,7 @@
|
||||
@@ -760,6 +768,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,23 +135,33 @@
|
||||
public SoundType func_220072_p(BlockState p_220072_1_) {
|
||||
return this.field_149762_H;
|
||||
}
|
||||
@@ -779,13 +785,74 @@
|
||||
@@ -769,7 +778,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 static boolean func_196252_e(Block p_196252_0_) {
|
||||
- return p_196252_0_ == Blocks.field_150348_b || p_196252_0_ == Blocks.field_196650_c || p_196252_0_ == Blocks.field_196654_e || p_196252_0_ == Blocks.field_196656_g;
|
||||
+ return net.minecraftforge.common.Tags.Blocks.STONE.func_199685_a_(p_196252_0_);
|
||||
public boolean func_208619_r() {
|
||||
@@ -777,13 +786,81 @@
|
||||
}
|
||||
|
||||
public static boolean func_196245_f(Block p_196245_0_) {
|
||||
- return p_196245_0_ == Blocks.field_150346_d || p_196245_0_ == Blocks.field_196660_k || p_196245_0_ == Blocks.field_196661_l;
|
||||
+ return net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(p_196245_0_);
|
||||
public String toString() {
|
||||
- return "Block{" + Registry.field_212618_g.func_177774_c(this) + "}";
|
||||
+ return "Block{" + getRegistryName() + "}";
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void func_190948_a(ItemStack p_190948_1_, @Nullable IBlockReader p_190948_2_, List<ITextComponent> p_190948_3_, ITooltipFlag p_190948_4_) {
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ 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) {
|
||||
@@ -176,10 +198,10 @@
|
||||
+ case Nether: return this.getBlock() == Blocks.field_150425_aM;
|
||||
+ case Crop: return this.getBlock() == Blocks.field_150458_ak;
|
||||
+ case Cave: return Block.func_220056_d(state, world, pos, Direction.UP);
|
||||
+ case Plains: return this.getBlock() == Blocks.field_196658_i || Block.func_196245_f(this) || this.getBlock() == Blocks.field_150458_ak;
|
||||
+ case Plains: return this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(this) || this.getBlock() == Blocks.field_150458_ak;
|
||||
+ case Water: return state.func_185904_a() == Material.field_151586_h; //&& state.getValue(BlockLiquidWrapper)
|
||||
+ case Beach:
|
||||
+ boolean isBeach = this.getBlock() == Blocks.field_196658_i || Block.func_196245_f(this) || this.getBlock() == Blocks.field_150354_m;
|
||||
+ boolean isBeach = this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(this) || this.getBlock() == Blocks.field_150354_m;
|
||||
+ boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_185904_a() == Material.field_151586_h ||
|
||||
+ world.func_180495_p(pos.func_177976_e()).func_185904_a() == Material.field_151586_h ||
|
||||
+ world.func_180495_p(pos.func_177978_c()).func_185904_a() == Material.field_151586_h ||
|
||||
@@ -189,6 +211,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 +227,47 @@
|
||||
public static enum OffsetType {
|
||||
NONE,
|
||||
XZ,
|
||||
@@ -805,6 +882,9 @@
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_226895_m_ = true;
|
||||
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_;
|
||||
@@ -837,6 +917,8 @@
|
||||
block$properties.field_226893_j_ = p_200950_0_.func_226891_m_();
|
||||
block$properties.field_208772_j = p_200950_0_.field_208621_p;
|
||||
block$properties.field_226895_m_ = p_200950_0_.field_226888_j_;
|
||||
+ block$properties.harvestLevel = p_200950_0_.harvestLevel;
|
||||
+ block$properties.harvestTool = p_200950_0_.harvestTool;
|
||||
return block$properties;
|
||||
}
|
||||
|
||||
@@ -901,13 +983,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,23 +1,23 @@
|
||||
--- a/net/minecraft/block/Blocks.java
|
||||
+++ b/net/minecraft/block/Blocks.java
|
||||
@@ -13,6 +13,7 @@
|
||||
import net.minecraft.potion.Effects;
|
||||
@@ -14,6 +14,7 @@
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
[email protected]("minecraft")
|
||||
public class Blocks {
|
||||
public static final Block field_150350_a = func_222382_a("air", new AirBlock(Block.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e()));
|
||||
public static final Block field_150348_b = func_222382_a("stone", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_200948_a(1.5F, 6.0F)));
|
||||
@@ -104,7 +105,7 @@
|
||||
public static final Block field_196601_az = func_222382_a("green_bed", new BedBlock(DyeColor.GREEN, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F)));
|
||||
public static final Block field_196550_aA = func_222382_a("red_bed", new BedBlock(DyeColor.RED, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F)));
|
||||
public static final Block field_196551_aB = func_222382_a("black_bed", new BedBlock(DyeColor.BLACK, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F)));
|
||||
@@ -105,7 +106,7 @@
|
||||
public static final Block field_196601_az = func_222382_a("green_bed", new BedBlock(DyeColor.GREEN, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
|
||||
public static final Block field_196550_aA = func_222382_a("red_bed", new BedBlock(DyeColor.RED, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
|
||||
public static final Block field_196551_aB = func_222382_a("black_bed", new BedBlock(DyeColor.BLACK, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
|
||||
- public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
|
||||
+ public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true));
|
||||
public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
|
||||
public static final Block field_150320_F = func_222382_a("sticky_piston", new PistonBlock(true, Block.Properties.func_200945_a(Material.field_76233_E).func_200943_b(0.5F)));
|
||||
public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(Block.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_200943_b(4.0F)));
|
||||
@@ -694,16 +695,4 @@
|
||||
@@ -701,16 +702,4 @@
|
||||
private static Block func_222382_a(String p_222382_0_, Block p_222382_1_) {
|
||||
return Registry.func_218325_a(Registry.field_212618_g, p_222382_0_, p_222382_1_);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
}
|
||||
|
||||
@@ -33,4 +35,11 @@
|
||||
public boolean func_200123_i(BlockState p_200123_1_, IBlockReader p_200123_2_, BlockPos p_200123_3_) {
|
||||
return true;
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return p_196266_4_ == PathType.AIR && !this.field_196274_w ? true : super.func_196266_a(p_196266_1_, p_196266_2_, p_196266_3_, p_196266_4_);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/block/CactusBlock.java
|
||||
+++ b/net/minecraft/block/CactusBlock.java
|
||||
@@ -19,7 +19,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
-public class CactusBlock extends Block {
|
||||
+public class CactusBlock extends Block implements net.minecraftforge.common.IPlantable {
|
||||
@@ -12,30 +12,30 @@
|
||||
@@ -30,6 +30,7 @@
|
||||
}
|
||||
|
||||
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_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update
|
||||
if (!p_196267_1_.func_196955_c(p_196267_2_, p_196267_3_)) {
|
||||
p_196267_2_.func_175655_b(p_196267_3_, true);
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update
|
||||
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
|
||||
p_225534_2_.func_175655_b(p_225534_3_, true);
|
||||
} else {
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
if (i < 3) {
|
||||
int j = p_196267_1_.func_177229_b(field_176587_a);
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
|
||||
int j = p_225534_1_.func_177229_b(field_176587_a);
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, true)) {
|
||||
if (j == 15) {
|
||||
p_196267_2_.func_175656_a(blockpos, this.func_176223_P());
|
||||
BlockState blockstate = p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
|
||||
p_225534_2_.func_175656_a(blockpos, this.func_176223_P());
|
||||
BlockState blockstate = p_225534_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
|
||||
@@ -50,7 +52,8 @@
|
||||
} else {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
|
||||
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,8 +88,8 @@
|
||||
@@ -81,8 +84,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
@@ -104,4 +107,14 @@
|
||||
@@ -96,4 +99,14 @@
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/CampfireBlock.java
|
||||
+++ b/net/minecraft/block/CampfireBlock.java
|
||||
@@ -187,7 +187,7 @@
|
||||
boolean flag = p_220066_4_ instanceof AbstractFireballEntity || p_220066_4_ instanceof AbstractArrowEntity && p_220066_4_.func_70027_ad();
|
||||
if (flag) {
|
||||
Entity entity = this.func_226913_a_(p_220066_4_);
|
||||
- boolean flag1 = entity == null || entity instanceof PlayerEntity || p_220066_1_.func_82736_K().func_223586_b(GameRules.field_223599_b);
|
||||
+ boolean flag1 = entity == null || entity instanceof PlayerEntity || net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_220066_1_, entity);
|
||||
if (flag1 && !p_220066_2_.func_177229_b(field_220101_b) && !p_220066_2_.func_177229_b(field_220103_d)) {
|
||||
BlockPos blockpos = p_220066_3_.func_216350_a();
|
||||
p_220066_1_.func_180501_a(blockpos, p_220066_2_.func_206870_a(BlockStateProperties.field_208190_q, Boolean.valueOf(true)), 11);
|
||||
@@ -1,36 +1,36 @@
|
||||
--- a/net/minecraft/block/ChorusFlowerBlock.java
|
||||
+++ b/net/minecraft/block/ChorusFlowerBlock.java
|
||||
@@ -30,9 +30,9 @@
|
||||
p_196267_2_.func_175655_b(p_196267_3_, true);
|
||||
@@ -29,9 +29,9 @@
|
||||
p_225534_2_.func_175655_b(p_225534_3_, true);
|
||||
} else {
|
||||
BlockPos blockpos = p_196267_3_.func_177984_a();
|
||||
- if (p_196267_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) {
|
||||
+ if (p_196267_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < p_196267_2_.func_201675_m().getHeight()) {
|
||||
int i = p_196267_1_.func_177229_b(field_185607_a);
|
||||
BlockPos blockpos = p_225534_3_.func_177984_a();
|
||||
- if (p_225534_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) {
|
||||
+ if (p_225534_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < p_225534_2_.func_201675_m().getHeight()) {
|
||||
int i = p_225534_1_.func_177229_b(field_185607_a);
|
||||
- if (i < 5) {
|
||||
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
|
||||
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, true)) {
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
BlockState blockstate = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b());
|
||||
@@ -57,7 +57,7 @@
|
||||
if (j < 2 || j <= p_196267_4_.nextInt(flag1 ? 5 : 4)) {
|
||||
BlockState blockstate = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
|
||||
@@ -56,7 +56,7 @@
|
||||
if (j < 2 || j <= p_225534_4_.nextInt(flag1 ? 5 : 4)) {
|
||||
flag = true;
|
||||
}
|
||||
- } else if (blockstate.func_196958_f()) {
|
||||
+ } else if (blockstate.isAir(p_196267_2_, p_196267_3_.func_177977_b())) {
|
||||
+ } else if (blockstate.isAir(p_225534_2_, p_225534_3_.func_177977_b())) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
@@ -88,7 +88,7 @@
|
||||
} else {
|
||||
this.func_185605_c(p_196267_2_, p_196267_3_);
|
||||
this.func_185605_c(p_225534_2_, p_225534_3_);
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@
|
||||
@@ -126,7 +126,7 @@
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
Block block = blockstate.func_177230_c();
|
||||
if (block != this.field_196405_b && block != Blocks.field_150377_bs) {
|
||||
@@ -39,7 +39,7 @@
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = false;
|
||||
@@ -140,7 +140,7 @@
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
|
||||
flag = true;
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
@@ -30,10 +30,11 @@
|
||||
}
|
||||
|
||||
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_.field_73012_v.nextInt(5) == 0) {
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
- if (p_225534_2_.field_73012_v.nextInt(5) == 0) {
|
||||
+ if (true) {
|
||||
int i = p_196267_1_.func_177229_b(field_176501_a);
|
||||
int i = p_225534_1_.func_177229_b(field_176501_a);
|
||||
- if (i < 2) {
|
||||
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_2_.field_73012_v.nextInt(5) == 0)) {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_2_.field_73012_v.nextInt(5) == 0)) {
|
||||
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/ComparatorBlock.java
|
||||
+++ b/net/minecraft/block/ComparatorBlock.java
|
||||
@@ -66,7 +66,7 @@
|
||||
@@ -71,7 +71,7 @@
|
||||
blockstate = p_176397_1_.func_180495_p(blockpos);
|
||||
if (blockstate.func_185912_n()) {
|
||||
i = blockstate.func_185888_a(p_176397_1_, blockpos);
|
||||
@@ -9,7 +9,7 @@
|
||||
ItemFrameEntity itemframeentity = this.func_176461_a(p_176397_1_, direction, blockpos);
|
||||
if (itemframeentity != null) {
|
||||
i = itemframeentity.func_174866_q();
|
||||
@@ -152,4 +152,16 @@
|
||||
@@ -157,4 +157,16 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c);
|
||||
}
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
+++ b/net/minecraft/block/CropsBlock.java
|
||||
@@ -58,12 +58,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_);
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_196267_2_.func_201669_a(p_196267_3_, 0) >= 9) {
|
||||
int i = this.func_185527_x(p_196267_1_);
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_225534_2_.func_226659_b_(p_225534_3_, 0) >= 9) {
|
||||
int i = this.func_185527_x(p_225534_1_);
|
||||
if (i < this.func_185526_g()) {
|
||||
float f = func_180672_a(this, p_196267_2_, p_196267_3_);
|
||||
- if (p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, this.func_185528_e(i + 1), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
float f = func_180672_a(this, p_225534_2_, p_225534_3_);
|
||||
- if (p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
|
||||
p_225534_2_.func_180501_a(p_225534_3_, this.func_185528_e(i + 1), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,3 +28,12 @@
|
||||
f1 = 3.0F;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +132,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_225521_a_(p_196262_3_, true, p_196262_4_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DetectorRailBlock.java
|
||||
+++ b/net/minecraft/block/DetectorRailBlock.java
|
||||
@@ -126,6 +126,8 @@
|
||||
@@ -129,6 +129,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,6 +1,6 @@
|
||||
--- a/net/minecraft/block/EnchantingTableBlock.java
|
||||
+++ b/net/minecraft/block/EnchantingTableBlock.java
|
||||
@@ -53,7 +53,7 @@
|
||||
@@ -54,7 +54,7 @@
|
||||
if (p_180655_4_.nextInt(16) == 0) {
|
||||
for(int k = 0; k <= 1; ++k) {
|
||||
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
--- a/net/minecraft/block/FallingBlock.java
|
||||
+++ b/net/minecraft/block/FallingBlock.java
|
||||
@@ -35,7 +35,7 @@
|
||||
@@ -29,7 +29,7 @@
|
||||
}
|
||||
|
||||
private void func_176503_e(World p_176503_1_, BlockPos p_176503_2_) {
|
||||
- if (func_185759_i(p_176503_1_.func_180495_p(p_176503_2_.func_177977_b())) && p_176503_2_.func_177956_o() >= 0) {
|
||||
+ if (p_176503_1_.func_175623_d(p_176503_2_.func_177977_b()) || func_185759_i(p_176503_1_.func_180495_p(p_176503_2_.func_177977_b())) && p_176503_2_.func_177956_o() >= 0) {
|
||||
if (!p_176503_1_.field_72995_K) {
|
||||
FallingBlockEntity fallingblockentity = new FallingBlockEntity(p_176503_1_, (double)p_176503_2_.func_177958_n() + 0.5D, (double)p_176503_2_.func_177956_o(), (double)p_176503_2_.func_177952_p() + 0.5D, p_176503_1_.func_180495_p(p_176503_2_));
|
||||
this.func_149829_a(fallingblockentity);
|
||||
@@ -68,7 +68,7 @@
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
- if (func_185759_i(p_225534_2_.func_180495_p(p_225534_3_.func_177977_b())) && p_225534_3_.func_177956_o() >= 0) {
|
||||
+ if (p_225534_2_.func_175623_d(p_225534_3_.func_177977_b()) || func_185759_i(p_225534_2_.func_180495_p(p_225534_3_.func_177977_b())) && p_225534_3_.func_177956_o() >= 0) {
|
||||
FallingBlockEntity fallingblockentity = new FallingBlockEntity(p_225534_2_, (double)p_225534_3_.func_177958_n() + 0.5D, (double)p_225534_3_.func_177956_o(), (double)p_225534_3_.func_177952_p() + 0.5D, p_225534_2_.func_180495_p(p_225534_3_));
|
||||
this.func_149829_a(fallingblockentity);
|
||||
p_225534_2_.func_217376_c(fallingblockentity);
|
||||
@@ -59,7 +59,7 @@
|
||||
public void func_180655_c(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) {
|
||||
if (p_180655_4_.nextInt(16) == 0) {
|
||||
BlockPos blockpos = p_180655_3_.func_177977_b();
|
||||
- if (func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
|
||||
+ if (p_180655_2_.func_175623_d(blockpos) || func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
|
||||
double d0 = (double)((float)p_180655_3_.func_177958_n() + p_180655_4_.nextFloat());
|
||||
double d0 = (double)p_180655_3_.func_177958_n() + (double)p_180655_4_.nextFloat();
|
||||
double d1 = (double)p_180655_3_.func_177956_o() - 0.05D;
|
||||
double d2 = (double)((float)p_180655_3_.func_177952_p() + p_180655_4_.nextFloat());
|
||||
double d2 = (double)p_180655_3_.func_177952_p() + (double)p_180655_4_.nextFloat();
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/block/FarmlandBlock.java
|
||||
+++ b/net/minecraft/block/FarmlandBlock.java
|
||||
@@ -72,7 +72,7 @@
|
||||
@@ -76,7 +76,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 @@
|
||||
@@ -87,9 +87,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 @@
|
||||
@@ -99,7 +99,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,51 +16,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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_.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);
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
if (p_225534_2_.func_82736_K().func_223586_b(GameRules.field_223598_a)) {
|
||||
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire
|
||||
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
}
|
||||
|
||||
Block block = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()).func_177230_c();
|
||||
- boolean flag = p_196267_2_.field_73011_w instanceof EndDimension && block == Blocks.field_150357_h || block == Blocks.field_150424_aL || block == Blocks.field_196814_hQ;
|
||||
+ BlockState other = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b());
|
||||
+ boolean flag = other.isFireSource(p_196267_2_, p_196267_3_.func_177977_b(), Direction.UP);
|
||||
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 @@
|
||||
Block block = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b()).func_177230_c();
|
||||
- boolean flag = p_225534_2_.field_73011_w instanceof EndDimension && block == Blocks.field_150357_h || block == Blocks.field_150424_aL || block == Blocks.field_196814_hQ;
|
||||
+ BlockState other = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
|
||||
+ boolean flag = other.isFireSource(p_225534_2_, p_225534_3_.func_177977_b(), Direction.UP);
|
||||
int i = p_225534_1_.func_177229_b(field_176543_a);
|
||||
if (!flag && p_225534_2_.func_72896_J() && this.func_176537_d(p_225534_2_, p_225534_3_) && p_225534_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
@@ -118,7 +120,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (i == 15 && p_196267_4_.nextInt(4) == 0 && !this.func_196446_i(p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()))) {
|
||||
+ if (i == 15 && p_196267_4_.nextInt(4) == 0 && !this.canCatchFire(p_196267_2_, p_196267_3_.func_177977_b(), Direction.UP)) {
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
- if (i == 15 && p_225534_4_.nextInt(4) == 0 && !this.func_196446_i(p_225534_2_.func_180495_p(p_225534_3_.func_177977_b()))) {
|
||||
+ if (i == 15 && p_225534_4_.nextInt(4) == 0 && !this.canCatchFire(p_225534_2_, p_225534_3_.func_177977_b(), Direction.UP)) {
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
return;
|
||||
}
|
||||
@@ -125,12 +127,12 @@
|
||||
@@ -126,12 +128,12 @@
|
||||
|
||||
boolean flag1 = p_196267_2_.func_180502_D(p_196267_3_);
|
||||
boolean flag1 = p_225534_2_.func_180502_D(p_225534_3_);
|
||||
int k = flag1 ? -50 : 0;
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177974_f(), 300 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177976_e(), 300 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177977_b(), 250 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177984_a(), 250 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177978_c(), 300 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177968_d(), 300 + k, p_196267_4_, i);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177974_f(), 300 + k, p_196267_4_, i, Direction.WEST);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177976_e(), 300 + k, p_196267_4_, i, Direction.EAST);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177977_b(), 250 + k, p_196267_4_, i, Direction.UP);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177984_a(), 250 + k, p_196267_4_, i, Direction.DOWN);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177978_c(), 300 + k, p_196267_4_, i, Direction.SOUTH);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177968_d(), 300 + k, p_196267_4_, i, Direction.NORTH);
|
||||
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
|
||||
- this.func_176536_a(p_225534_2_, p_225534_3_.func_177974_f(), 300 + k, p_225534_4_, i);
|
||||
- this.func_176536_a(p_225534_2_, p_225534_3_.func_177976_e(), 300 + k, p_225534_4_, i);
|
||||
- this.func_176536_a(p_225534_2_, p_225534_3_.func_177977_b(), 250 + k, p_225534_4_, i);
|
||||
- this.func_176536_a(p_225534_2_, p_225534_3_.func_177984_a(), 250 + k, p_225534_4_, i);
|
||||
- this.func_176536_a(p_225534_2_, p_225534_3_.func_177978_c(), 300 + k, p_225534_4_, i);
|
||||
- this.func_176536_a(p_225534_2_, p_225534_3_.func_177968_d(), 300 + k, p_225534_4_, i);
|
||||
+ this.tryCatchFire(p_225534_2_, p_225534_3_.func_177974_f(), 300 + k, p_225534_4_, i, Direction.WEST);
|
||||
+ this.tryCatchFire(p_225534_2_, p_225534_3_.func_177976_e(), 300 + k, p_225534_4_, i, Direction.EAST);
|
||||
+ this.tryCatchFire(p_225534_2_, p_225534_3_.func_177977_b(), 250 + k, p_225534_4_, i, Direction.UP);
|
||||
+ this.tryCatchFire(p_225534_2_, p_225534_3_.func_177984_a(), 250 + k, p_225534_4_, i, Direction.DOWN);
|
||||
+ this.tryCatchFire(p_225534_2_, p_225534_3_.func_177978_c(), 300 + k, p_225534_4_, i, Direction.SOUTH);
|
||||
+ this.tryCatchFire(p_225534_2_, p_225534_3_.func_177968_d(), 300 + k, p_225534_4_, i, Direction.NORTH);
|
||||
BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable();
|
||||
|
||||
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 @@
|
||||
@@ -307,10 +308,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 ActionResultType func_225533_a_(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) {
|
||||
ItemStack itemstack = p_225533_4_.func_184586_b(p_225533_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_225533_4_.func_71019_a(itemstack1, false);
|
||||
}
|
||||
|
||||
- p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150457_bL.func_176223_P(), 3);
|
||||
+ p_225533_2_.func_180501_a(p_225533_3_, getEmptyPot().func_176223_P(), 3);
|
||||
}
|
||||
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -76,6 +103,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,85 @@
|
||||
--- a/net/minecraft/block/FlowingFluidBlock.java
|
||||
+++ b/net/minecraft/block/FlowingFluidBlock.java
|
||||
@@ -31,9 +31,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_;
|
||||
@@ -46,8 +48,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_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
p_225542_2_.func_204610_c(p_225542_3_).func_206891_b(p_225542_2_, p_225542_3_, p_225542_4_);
|
||||
}
|
||||
@@ -62,6 +77,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));
|
||||
}
|
||||
|
||||
@@ -122,13 +138,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;
|
||||
}
|
||||
@@ -161,4 +177,23 @@
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+ // 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
|
||||
@@ -30,6 +30,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
|
||||
@@ -52,8 +52,9 @@
|
||||
} else {
|
||||
BlockPos blockpos = p_225534_3_.func_177984_a();
|
||||
BlockState blockstate = p_225534_2_.func_180495_p(blockpos);
|
||||
- if (blockstate.func_177230_c() == Blocks.field_150355_j && p_225534_1_.func_177229_b(field_203163_a) < 25 && p_225534_4_.nextDouble() < 0.14D) {
|
||||
+ if (blockstate.func_177230_c() == Blocks.field_150355_j && p_225534_1_.func_177229_b(field_203163_a) < 25 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, p_225534_4_.nextDouble() < 0.14D)) {
|
||||
p_225534_2_.func_175656_a(blockpos, p_225534_1_.func_177231_a(field_203163_a));
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, blockpos, p_225534_1_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/LadderBlock.java
|
||||
+++ b/net/minecraft/block/LadderBlock.java
|
||||
@@ -94,6 +94,11 @@
|
||||
@@ -93,6 +93,11 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
public BlockRenderLayer func_180664_k() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
public BlockState func_185499_a(BlockState p_185499_1_, Rotation p_185499_2_) {
|
||||
return p_185499_1_.func_206870_a(field_176382_a, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176382_a)));
|
||||
}
|
||||
@@ -8,4 +8,4 @@
|
||||
+public class LeavesBlock extends Block implements net.minecraftforge.common.IShearable {
|
||||
public static final IntegerProperty field_208494_a = BlockStateProperties.field_208514_aa;
|
||||
public static final BooleanProperty field_208495_b = BlockStateProperties.field_208515_s;
|
||||
protected static boolean field_196478_c;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/block/MushroomBlock.java
|
||||
+++ b/net/minecraft/block/MushroomBlock.java
|
||||
@@ -62,7 +62,7 @@
|
||||
@@ -64,7 +64,7 @@
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(blockpos);
|
||||
Block block = blockstate.func_177230_c();
|
||||
if (block != Blocks.field_150391_bh && block != Blocks.field_196661_l) {
|
||||
- return p_196260_2_.func_201669_a(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos);
|
||||
+ return p_196260_2_.func_201669_a(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this);
|
||||
- return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos);
|
||||
+ return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
@@ -1,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_);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--- 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);
|
||||
- if (i < 3 && p_196267_4_.nextInt(10) == 0) {
|
||||
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(10) == 0)) {
|
||||
p_196267_1_ = p_196267_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
int i = p_225534_1_.func_177229_b(field_176486_a);
|
||||
- if (i < 3 && p_225534_4_.nextInt(10) == 0) {
|
||||
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(10) == 0)) {
|
||||
p_225534_1_ = p_225534_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
|
||||
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_, 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/NoteBlock.java
|
||||
+++ b/net/minecraft/block/NoteBlock.java
|
||||
@@ -49,7 +49,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
private void func_196482_a(World p_196482_1_, BlockPos p_196482_2_) {
|
||||
@@ -9,18 +9,17 @@
|
||||
p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
if (p_220051_2_.field_72995_K) {
|
||||
return true;
|
||||
@@ -60,6 +60,9 @@
|
||||
if (p_225533_2_.field_72995_K) {
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
- p_220051_1_ = p_220051_1_.func_177231_a(field_196485_c);
|
||||
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_220051_2_, p_220051_3_, p_220051_1_, p_220051_1_.func_177229_b(field_196485_c), p_220051_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
|
||||
+ if (_new == -1) return false;
|
||||
+ p_220051_1_ = (BlockState)p_220051_1_.func_206870_a(field_196485_c, _new);
|
||||
p_220051_2_.func_180501_a(p_220051_3_, p_220051_1_, 3);
|
||||
this.func_196482_a(p_220051_2_, p_220051_3_);
|
||||
p_220051_4_.func_195066_a(Stats.field_188087_U);
|
||||
@@ -75,6 +77,9 @@
|
||||
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_225533_2_, p_225533_3_, p_225533_1_, p_225533_1_.func_177229_b(field_196485_c), p_225533_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
|
||||
+ if (_new == -1) return ActionResultType.FAIL;
|
||||
+ p_225533_1_ = (BlockState)p_225533_1_.func_206870_a(field_196485_c, _new);
|
||||
p_225533_1_ = p_225533_1_.func_177231_a(field_196485_c);
|
||||
p_225533_2_.func_180501_a(p_225533_3_, p_225533_1_, 3);
|
||||
this.func_196482_a(p_225533_2_, p_225533_3_);
|
||||
@@ -76,6 +79,9 @@
|
||||
}
|
||||
|
||||
public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) {
|
||||
|
||||
@@ -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,16 +42,16 @@
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -274,7 +274,7 @@
|
||||
@@ -276,7 +279,7 @@
|
||||
for(int j = list2.size() - 1; j >= 0; --j) {
|
||||
BlockPos blockpos2 = list2.get(j);
|
||||
BlockState blockstate = p_176319_1_.func_180495_p(blockpos2);
|
||||
- TileEntity tileentity = blockstate.func_177230_c().func_149716_u() ? p_176319_1_.func_175625_s(blockpos2) : null;
|
||||
+ TileEntity tileentity = blockstate.hasTileEntity() ? p_176319_1_.func_175625_s(blockpos2) : null;
|
||||
func_220059_a(blockstate, p_176319_1_, blockpos2, tileentity);
|
||||
BlockState blockstate1 = p_176319_1_.func_180495_p(blockpos2);
|
||||
- TileEntity tileentity = blockstate1.func_177230_c().func_149716_u() ? p_176319_1_.func_175625_s(blockpos2) : null;
|
||||
+ TileEntity tileentity = blockstate1.hasTileEntity() ? p_176319_1_.func_175625_s(blockpos2) : null;
|
||||
func_220059_a(blockstate1, 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 @@
|
||||
@@ -340,6 +343,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
--- a/net/minecraft/block/PistonBlockStructureHelper.java
|
||||
+++ b/net/minecraft/block/PistonBlockStructureHelper.java
|
||||
@@ -48,7 +48,7 @@
|
||||
} else {
|
||||
for(int i = 0; i < this.field_177258_e.size(); ++i) {
|
||||
BlockPos blockpos = this.field_177258_e.get(i);
|
||||
- if (func_227029_a_(this.field_177261_a.func_180495_p(blockpos).func_177230_c()) && !this.func_177250_b(blockpos)) {
|
||||
+ if (this.field_177261_a.func_180495_p(blockpos).isStickyBlock() && !this.func_177250_b(blockpos)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -57,24 +57,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private static boolean func_227029_a_(Block p_227029_0_) {
|
||||
- return p_227029_0_ == Blocks.field_180399_cE || p_227029_0_ == Blocks.field_226907_mc_;
|
||||
- }
|
||||
-
|
||||
- private static boolean func_227030_a_(Block p_227030_0_, Block p_227030_1_) {
|
||||
- if (p_227030_0_ == Blocks.field_226907_mc_ && p_227030_1_ == Blocks.field_180399_cE) {
|
||||
- return false;
|
||||
- } else if (p_227030_0_ == Blocks.field_180399_cE && p_227030_1_ == Blocks.field_226907_mc_) {
|
||||
- return false;
|
||||
- } else {
|
||||
- return func_227029_a_(p_227030_0_) || func_227029_a_(p_227030_1_);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private boolean func_177251_a(BlockPos p_177251_1_, Direction p_177251_2_) {
|
||||
BlockState blockstate = this.field_177261_a.func_180495_p(p_177251_1_);
|
||||
- Block block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f()) {
|
||||
+ if (field_177261_a.func_175623_d(p_177251_1_)) {
|
||||
return true;
|
||||
} else if (!PistonBlock.func_185646_a(blockstate, this.field_177261_a, p_177251_1_, this.field_177257_d, false, p_177251_2_)) {
|
||||
return true;
|
||||
@@ -87,12 +72,12 @@
|
||||
if (i + this.field_177258_e.size() > 12) {
|
||||
return false;
|
||||
} else {
|
||||
- while(func_227029_a_(block)) {
|
||||
+ BlockState oldState;
|
||||
+ while(blockstate.isStickyBlock()) {
|
||||
BlockPos blockpos = p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), i);
|
||||
- Block block1 = block;
|
||||
+ oldState = blockstate;
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos);
|
||||
- block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f() || !func_227030_a_(block1, block) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
|
||||
+ if (blockstate.isAir(this.field_177261_a, blockpos) || !oldState.canStickTo(blockstate) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -119,7 +104,7 @@
|
||||
|
||||
for(int k = 0; k <= j + l; ++k) {
|
||||
BlockPos blockpos2 = this.field_177258_e.get(k);
|
||||
- if (func_227029_a_(this.field_177261_a.func_180495_p(blockpos2).func_177230_c()) && !this.func_177250_b(blockpos2)) {
|
||||
+ if (this.field_177261_a.func_180495_p(blockpos2).isStickyBlock() && !this.func_177250_b(blockpos2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +113,7 @@
|
||||
}
|
||||
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos1);
|
||||
- if (blockstate.func_196958_f()) {
|
||||
+ if (blockstate.isAir(field_177261_a, blockpos1)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -173,7 +158,7 @@
|
||||
if (direction.func_176740_k() != this.field_177257_d.func_176740_k()) {
|
||||
BlockPos blockpos = p_177250_1_.func_177972_a(direction);
|
||||
BlockState blockstate1 = this.field_177261_a.func_180495_p(blockpos);
|
||||
- if (func_227030_a_(blockstate1.func_177230_c(), blockstate.func_177230_c()) && !this.func_177251_a(blockpos, direction)) {
|
||||
+ if (blockstate1.canStickTo(blockstate) && !this.func_177251_a(blockpos, direction)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -18,12 +18,20 @@
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -37,7 +37,7 @@
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos3.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_EAST;
|
||||
}
|
||||
@@ -298,7 +300,7 @@
|
||||
@@ -304,7 +306,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_NORTH;
|
||||
}
|
||||
@@ -308,7 +310,7 @@
|
||||
@@ -314,7 +316,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/RedstoneOreBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneOreBlock.java
|
||||
@@ -61,11 +61,11 @@
|
||||
@@ -68,11 +68,11 @@
|
||||
|
||||
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_);
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/block/RedstoneWireBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneWireBlock.java
|
||||
@@ -124,7 +124,7 @@
|
||||
@@ -123,7 +123,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 @@
|
||||
@@ -132,7 +132,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
@@ -318,26 +318,18 @@
|
||||
@@ -315,26 +315,18 @@
|
||||
boolean flag = blockstate.func_215686_e(p_176339_1_, blockpos);
|
||||
BlockPos blockpos1 = p_176339_2_.func_177984_a();
|
||||
boolean flag1 = p_176339_1_.func_180495_p(blockpos1).func_215686_e(p_176339_1_, blockpos1);
|
||||
@@ -49,7 +49,7 @@
|
||||
Block block = p_176343_0_.func_177230_c();
|
||||
if (block == Blocks.field_150488_af) {
|
||||
return true;
|
||||
@@ -347,7 +339,7 @@
|
||||
@@ -344,7 +336,7 @@
|
||||
} else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) {
|
||||
return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N);
|
||||
} else {
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
+++ b/net/minecraft/block/SaplingBlock.java
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
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_);
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_196267_2_.func_201696_r(p_196267_3_.func_177984_a()) >= 9 && p_196267_4_.nextInt(7) == 0) {
|
||||
this.func_176478_d(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_);
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_225534_2_.func_201696_r(p_225534_3_.func_177984_a()) >= 9 && p_225534_4_.nextInt(7) == 0) {
|
||||
this.func_226942_a_(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_);
|
||||
}
|
||||
@@ -39,6 +40,7 @@
|
||||
if (p_176478_3_.func_177229_b(field_176479_b) == 0) {
|
||||
p_176478_1_.func_180501_a(p_176478_2_, p_176478_3_.func_177231_a(field_176479_b), 4);
|
||||
if (p_226942_3_.func_177229_b(field_176479_b) == 0) {
|
||||
p_226942_1_.func_180501_a(p_226942_2_, p_226942_3_.func_177231_a(field_176479_b), 4);
|
||||
} else {
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_176478_1_, p_176478_4_, p_176478_2_)) return;
|
||||
this.field_196387_c.func_196935_a(p_176478_1_, p_176478_2_, p_176478_3_, p_176478_4_);
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_226942_1_, p_226942_4_, p_226942_2_)) return;
|
||||
this.field_196387_c.func_225545_a_(p_226942_1_, p_226942_1_.func_72863_F().func_201711_g(), p_226942_2_, p_226942_3_, p_226942_4_);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/ScaffoldingBlock.java
|
||||
+++ b/net/minecraft/block/ScaffoldingBlock.java
|
||||
@@ -138,6 +138,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,8 +1,8 @@
|
||||
--- a/net/minecraft/block/SeaGrassBlock.java
|
||||
+++ b/net/minecraft/block/SeaGrassBlock.java
|
||||
@@ -16,7 +16,7 @@
|
||||
import net.minecraft.world.IWorld;
|
||||
@@ -17,7 +17,7 @@
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
-public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer {
|
||||
+public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IShearable {
|
||||
|
||||
@@ -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 @@
|
||||
@@ -18,10 +18,13 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
+++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
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_.field_72995_K) {
|
||||
+ 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) {
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
if (!func_220257_b(p_225534_1_, p_225534_2_, p_225534_3_)) {
|
||||
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
|
||||
p_225534_2_.func_175656_a(p_225534_3_, Blocks.field_150346_d.func_176223_P());
|
||||
} else {
|
||||
if (p_225534_2_.func_201696_r(p_225534_3_.func_177984_a()) >= 9) {
|
||||
@@ -0,0 +1,40 @@
|
||||
--- a/net/minecraft/block/StairsBlock.java
|
||||
+++ b/net/minecraft/block/StairsBlock.java
|
||||
@@ -84,13 +84,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;
|
||||
}
|
||||
@@ -262,4 +273,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();
|
||||
+ }
|
||||
}
|
||||
@@ -1,32 +1,43 @@
|
||||
--- a/net/minecraft/block/StemBlock.java
|
||||
+++ b/net/minecraft/block/StemBlock.java
|
||||
@@ -39,22 +39,24 @@
|
||||
@@ -40,22 +40,24 @@
|
||||
|
||||
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_);
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_196267_2_.func_201669_a(p_196267_3_, 0) >= 9) {
|
||||
float f = CropsBlock.func_180672_a(this, p_196267_2_, p_196267_3_);
|
||||
- if (p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
|
||||
int i = p_196267_1_.func_177229_b(field_176484_a);
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_225534_2_.func_226659_b_(p_225534_3_, 0) >= 9) {
|
||||
float f = CropsBlock.func_180672_a(this, p_225534_2_, p_225534_3_);
|
||||
- if (p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
|
||||
int i = p_225534_1_.func_177229_b(field_176484_a);
|
||||
if (i < 7) {
|
||||
- p_196267_1_ = p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1));
|
||||
- p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
|
||||
+ p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2);
|
||||
- p_225534_1_ = p_225534_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1));
|
||||
- p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_, 2);
|
||||
+ p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2);
|
||||
} else {
|
||||
Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_196267_4_);
|
||||
BlockPos blockpos = p_196267_3_.func_177972_a(direction);
|
||||
- Block block = p_196267_2_.func_180495_p(blockpos.func_177977_b()).func_177230_c();
|
||||
- if (p_196267_2_.func_180495_p(blockpos).func_196958_f() && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
|
||||
+ BlockState soil = p_196267_2_.func_180495_p(blockpos.func_177977_b());
|
||||
Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_225534_4_);
|
||||
BlockPos blockpos = p_225534_3_.func_177972_a(direction);
|
||||
- Block block = p_225534_2_.func_180495_p(blockpos.func_177977_b()).func_177230_c();
|
||||
- if (p_225534_2_.func_180495_p(blockpos).func_196958_f() && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
|
||||
+ BlockState soil = p_225534_2_.func_180495_p(blockpos.func_177977_b());
|
||||
+ Block block = soil.func_177230_c();
|
||||
+ if (p_196267_2_.func_180495_p(blockpos).isAir(p_196267_2_, blockpos) && (soil.canSustainPlant(p_196267_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
|
||||
p_196267_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P());
|
||||
p_196267_2_.func_175656_a(p_196267_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction));
|
||||
+ if (p_225534_2_.func_175623_d(blockpos) && (soil.canSustainPlant(p_225534_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
|
||||
p_225534_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P());
|
||||
p_225534_2_.func_175656_a(p_225534_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction));
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,4 +103,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;
|
||||
+ }
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
--- a/net/minecraft/block/SugarCaneBlock.java
|
||||
+++ b/net/minecraft/block/SugarCaneBlock.java
|
||||
@@ -16,7 +16,7 @@
|
||||
@@ -15,7 +15,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
-public class SugarCaneBlock extends Block {
|
||||
+public class SugarCaneBlock extends Block implements net.minecraftforge.common.IPlantable {
|
||||
public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X;
|
||||
protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D);
|
||||
|
||||
@@ -40,12 +40,15 @@
|
||||
@@ -39,12 +39,15 @@
|
||||
|
||||
if (i < 3) {
|
||||
int j = p_196267_1_.func_177229_b(field_176355_a);
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, true)) {
|
||||
int j = p_225534_1_.func_177229_b(field_176355_a);
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, true)) {
|
||||
if (j == 15) {
|
||||
p_196267_2_.func_175656_a(p_196267_3_.func_177984_a(), this.func_176223_P());
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4);
|
||||
p_225534_2_.func_175656_a(p_225534_3_.func_177984_a(), this.func_176223_P());
|
||||
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4);
|
||||
} else {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4);
|
||||
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +63,8 @@
|
||||
@@ -59,6 +62,8 @@
|
||||
}
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
@@ -34,7 +34,7 @@
|
||||
Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c();
|
||||
if (block == this) {
|
||||
return true;
|
||||
@@ -87,4 +92,14 @@
|
||||
@@ -82,4 +87,14 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176355_a);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/block/SweetBerryBushBlock.java
|
||||
+++ b/net/minecraft/block/SweetBerryBushBlock.java
|
||||
@@ -49,8 +49,9 @@
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
|
||||
int i = p_225534_1_.func_177229_b(field_220125_a);
|
||||
- if (i < 3 && p_225534_4_.nextInt(5) == 0 && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9) {
|
||||
+ if (i < 3 && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(5) == 0)) {
|
||||
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_220125_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
--- a/net/minecraft/block/TNTBlock.java
|
||||
+++ b/net/minecraft/block/TNTBlock.java
|
||||
@@ -29,10 +29,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);
|
||||
}
|
||||
|
||||
@@ -41,7 +45,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);
|
||||
}
|
||||
|
||||
@@ -49,7 +53,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_);
|
||||
@@ -63,10 +67,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)p_196535_1_.func_177958_n() + 0.5D, (double)p_196535_1_.func_177956_o(), (double)p_196535_1_.func_177952_p() + 0.5D, p_196535_2_);
|
||||
@@ -81,7 +87,7 @@
|
||||
if (item != Items.field_151033_d && item != Items.field_151059_bz) {
|
||||
return super.func_225533_a_(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_4_, p_225533_5_, p_225533_6_);
|
||||
} else {
|
||||
- func_196535_a(p_225533_2_, p_225533_3_, p_225533_4_);
|
||||
+ catchFire(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_6_.func_216354_b(), p_225533_4_);
|
||||
p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150350_a.func_176223_P(), 11);
|
||||
if (!p_225533_4_.func_184812_l_()) {
|
||||
if (item == Items.field_151033_d) {
|
||||
@@ -103,7 +109,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,8 +1,8 @@
|
||||
--- a/net/minecraft/block/TallGrassBlock.java
|
||||
+++ b/net/minecraft/block/TallGrassBlock.java
|
||||
@@ -7,7 +7,7 @@
|
||||
import net.minecraft.world.IBlockReader;
|
||||
@@ -8,7 +8,7 @@
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
-public class TallGrassBlock extends BushBlock implements IGrowable {
|
||||
+public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IShearable {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
--- a/net/minecraft/block/TrapDoorBlock.java
|
||||
+++ b/net/minecraft/block/TrapDoorBlock.java
|
||||
@@ -151,4 +151,14 @@
|
||||
|
||||
@@ -149,6 +149,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
|
||||
@@ -141,7 +141,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,46 @@
|
||||
--- a/net/minecraft/block/VineBlock.java
|
||||
+++ b/net/minecraft/block/VineBlock.java
|
||||
@@ -20,7 +20,7 @@
|
||||
@@ -19,7 +19,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
-public class VineBlock extends Block {
|
||||
+public class VineBlock extends Block implements net.minecraftforge.common.IShearable {
|
||||
public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z;
|
||||
public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a;
|
||||
public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b;
|
||||
@@ -154,7 +154,7 @@
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
}
|
||||
@@ -152,14 +152,14 @@
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
}
|
||||
|
||||
- } else if (p_196267_2_.field_73012_v.nextInt(4) == 0) {
|
||||
+ } else if (p_196267_2_.field_73012_v.nextInt(4) == 0 && p_196267_2_.isAreaLoaded(p_196267_3_, 4)) { // Forge: check area to prevent loading unloaded chunks
|
||||
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))) {
|
||||
- } else if (p_225534_2_.field_73012_v.nextInt(4) == 0) {
|
||||
+ } else if (p_225534_2_.field_73012_v.nextInt(4) == 0 && p_225534_2_.isAreaLoaded(p_225534_3_, 4)) { // Forge: check area to prevent loading unloaded chunks
|
||||
Direction direction = Direction.func_176741_a(p_225534_4_);
|
||||
BlockPos blockpos = p_225534_3_.func_177984_a();
|
||||
if (direction.func_176740_k().func_176722_c() && !p_225534_1_.func_177229_b(func_176267_a(direction))) {
|
||||
if (this.func_196539_a(p_225534_2_, p_225534_3_)) {
|
||||
BlockPos blockpos4 = p_225534_3_.func_177972_a(direction);
|
||||
BlockState blockstate5 = p_225534_2_.func_180495_p(blockpos4);
|
||||
- if (blockstate5.func_196958_f()) {
|
||||
+ if (blockstate5.isAir(p_225534_2_, blockpos4)) {
|
||||
Direction direction3 = direction.func_176746_e();
|
||||
Direction direction4 = direction.func_176735_f();
|
||||
boolean flag = p_225534_1_.func_177229_b(func_176267_a(direction3));
|
||||
@@ -216,8 +216,8 @@
|
||||
if (p_225534_3_.func_177956_o() > 0) {
|
||||
BlockPos blockpos1 = p_225534_3_.func_177977_b();
|
||||
BlockState blockstate1 = p_225534_2_.func_180495_p(blockpos1);
|
||||
- if (blockstate1.func_196958_f() || blockstate1.func_177230_c() == this) {
|
||||
- BlockState blockstate2 = blockstate1.func_196958_f() ? this.func_176223_P() : blockstate1;
|
||||
+ if (blockstate1.isAir(p_225534_2_, blockpos1) || blockstate1.func_177230_c() == this) {
|
||||
+ BlockState blockstate2 = blockstate1.isAir(p_225534_2_, blockpos1) ? this.func_176223_P() : blockstate1;
|
||||
BlockState blockstate3 = this.func_196544_a(p_225534_1_, blockstate2, p_225534_4_);
|
||||
if (blockstate2 != blockstate3 && this.func_196540_x(blockstate3)) {
|
||||
p_225534_2_.func_180501_a(blockpos1, blockstate3, 2);
|
||||
@@ -322,4 +322,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/block/WebBlock.java
|
||||
+++ b/net/minecraft/block/WebBlock.java
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -5,7 +5,7 @@
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
--- a/net/minecraft/block/state/PistonBlockStructureHelper.java
|
||||
+++ b/net/minecraft/block/state/PistonBlockStructureHelper.java
|
||||
@@ -52,7 +52,7 @@
|
||||
} else {
|
||||
for(int i = 0; i < this.field_177258_e.size(); ++i) {
|
||||
BlockPos blockpos = this.field_177258_e.get(i);
|
||||
- if (this.field_177261_a.func_180495_p(blockpos).func_177230_c() == Blocks.field_180399_cE && !this.func_177250_b(blockpos)) {
|
||||
+ if (this.field_177261_a.func_180495_p(blockpos).isStickyBlock() && !this.func_177250_b(blockpos)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -63,8 +63,7 @@
|
||||
|
||||
private boolean func_177251_a(BlockPos p_177251_1_, Direction p_177251_2_) {
|
||||
BlockState blockstate = this.field_177261_a.func_180495_p(p_177251_1_);
|
||||
- Block block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f()) {
|
||||
+ if (field_177261_a.func_175623_d(p_177251_1_)) {
|
||||
return true;
|
||||
} else if (!PistonBlock.func_185646_a(blockstate, this.field_177261_a, p_177251_1_, this.field_177257_d, false, p_177251_2_)) {
|
||||
return true;
|
||||
@@ -77,11 +76,10 @@
|
||||
if (i + this.field_177258_e.size() > 12) {
|
||||
return false;
|
||||
} else {
|
||||
- while(block == Blocks.field_180399_cE) {
|
||||
+ while(blockstate.isStickyBlock()) {
|
||||
BlockPos blockpos = p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), i);
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos);
|
||||
- block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f() || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
|
||||
+ if (blockstate.isAir(this.field_177261_a, blockpos) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@
|
||||
|
||||
for(int l = 0; l <= k + i1; ++l) {
|
||||
BlockPos blockpos2 = this.field_177258_e.get(l);
|
||||
- if (this.field_177261_a.func_180495_p(blockpos2).func_177230_c() == Blocks.field_180399_cE && !this.func_177250_b(blockpos2)) {
|
||||
+ if (this.field_177261_a.func_180495_p(blockpos2).isStickyBlock() && !this.func_177250_b(blockpos2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +115,7 @@
|
||||
}
|
||||
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos1);
|
||||
- if (blockstate.func_196958_f()) {
|
||||
+ if (blockstate.isAir(field_177261_a, blockpos1)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
--- a/net/minecraft/block/trees/JungleTree.java
|
||||
+++ b/net/minecraft/block/trees/JungleTree.java
|
||||
@@ -11,11 +11,11 @@
|
||||
@@ -12,7 +12,7 @@
|
||||
public class JungleTree extends BigTree {
|
||||
@Nullable
|
||||
protected AbstractTreeFeature<NoFeatureConfig> func_196936_b(Random p_196936_1_) {
|
||||
- return new TreeFeature(NoFeatureConfig::func_214639_a, true, 4 + p_196936_1_.nextInt(7), Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P(), false);
|
||||
+ return new TreeFeature(NoFeatureConfig::func_214639_a, true, 4 + p_196936_1_.nextInt(7), Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P(), false).setSapling((net.minecraft.block.SaplingBlock)Blocks.field_196678_w);
|
||||
protected ConfiguredFeature<TreeFeatureConfig, ?> func_225546_b_(Random p_225546_1_) {
|
||||
- return (new TreeFeature(TreeFeatureConfig::func_227338_a_)).func_225566_b_(DefaultBiomeFeatures.field_226808_c_);
|
||||
+ return (new TreeFeature(TreeFeatureConfig::deserializeJungle)).func_225566_b_(DefaultBiomeFeatures.field_226808_c_);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected AbstractTreeFeature<NoFeatureConfig> func_196938_a(Random p_196938_1_) {
|
||||
- return new MegaJungleFeature(NoFeatureConfig::func_214639_a, true, 10, 20, Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P());
|
||||
+ return new MegaJungleFeature(NoFeatureConfig::func_214639_a, true, 10, 20, Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P()).setSapling((net.minecraft.block.SaplingBlock)Blocks.field_196678_w);
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,6 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -142,7 +142,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");
|
||||
- public final KeyBinding[] field_74324_K = ArrayUtils.addAll(new KeyBinding[]{this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac);
|
||||
+ public KeyBinding[] field_74324_K = ArrayUtils.addAll(new KeyBinding[]{this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac);
|
||||
protected Minecraft field_74317_L;
|
||||
private final File field_74354_ai;
|
||||
public Difficulty field_74318_M = Difficulty.NORMAL;
|
||||
@@ -161,6 +161,7 @@
|
||||
@@ -170,6 +170,7 @@
|
||||
public String field_74363_ab = "en_us";
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
@@ -17,20 +8,20 @@
|
||||
this.field_74317_L = p_i46326_1_;
|
||||
this.field_74354_ai = new File(p_i46326_2_, "options.txt");
|
||||
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
|
||||
@@ -462,7 +463,11 @@
|
||||
@@ -485,7 +486,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s1.equals("key_" + keybinding.func_151464_g())) {
|
||||
- keybinding.func_197979_b(InputMappings.func_197955_a(s2));
|
||||
+ if (s2.indexOf(':') != -1) {
|
||||
+ String[] pts = s2.split(":");
|
||||
if (s.equals("key_" + keybinding.func_151464_g())) {
|
||||
- keybinding.func_197979_b(InputMappings.func_197955_a(s1));
|
||||
+ if (s.indexOf(':') != -1) {
|
||||
+ String[] pts = s.split(":");
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(pts[1]), InputMappings.func_197955_a(pts[0]));
|
||||
+ } else
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s2));
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,6 +515,7 @@
|
||||
@@ -533,6 +538,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
@@ -38,7 +29,7 @@
|
||||
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
|
||||
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
|
||||
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
|
||||
@@ -583,7 +589,7 @@
|
||||
@@ -609,7 +615,7 @@
|
||||
printwriter.println("glDebugVerbosity:" + this.field_209231_W);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
@@ -47,7 +38,7 @@
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -680,6 +686,25 @@
|
||||
@@ -706,6 +712,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +53,7 @@
|
||||
+ field_74368_y.setKeyConflictContext(inGame);
|
||||
+ field_74366_z.setKeyConflictContext(inGame);
|
||||
+ field_74314_A.setKeyConflictContext(inGame);
|
||||
+ field_74311_E.setKeyConflictContext(inGame);
|
||||
+ field_228046_af_.setKeyConflictContext(inGame);
|
||||
+ field_151444_V.setKeyConflictContext(inGame);
|
||||
+ field_74312_F.setKeyConflictContext(inGame);
|
||||
+ field_74310_D.setKeyConflictContext(inGame);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/KeyboardListener.java
|
||||
+++ b/net/minecraft/client/KeyboardListener.java
|
||||
@@ -252,7 +252,9 @@
|
||||
@@ -251,7 +251,9 @@
|
||||
}
|
||||
|
||||
INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r;
|
||||
@@ -9,9 +9,9 @@
|
||||
+ if ((!(this.field_197972_a.field_71462_r instanceof ControlsScreen) || ((ControlsScreen)inestedguieventhandler).field_152177_g <= Util.func_211177_b() - 20L)) {
|
||||
+ if (p_197961_5_ == 1) {
|
||||
if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) {
|
||||
this.field_197972_a.field_195558_d.func_198077_g();
|
||||
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.field_195558_d.func_198113_j();
|
||||
@@ -271,6 +273,8 @@
|
||||
this.field_197972_a.func_228018_at_().func_198077_g();
|
||||
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.func_228018_at_().func_198113_j();
|
||||
@@ -270,6 +272,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -20,13 +20,13 @@
|
||||
}
|
||||
|
||||
boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.getFocused() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.getFocused()).func_212955_f();
|
||||
@@ -290,10 +294,14 @@
|
||||
@@ -289,10 +293,14 @@
|
||||
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 {
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName());
|
||||
@@ -354,7 +362,7 @@
|
||||
@@ -353,7 +361,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,12 +372,16 @@
|
||||
@@ -363,12 +371,16 @@
|
||||
if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) {
|
||||
if (Character.charCount(p_197963_3_) == 1) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -316,6 +316,7 @@
|
||||
@@ -321,6 +321,7 @@
|
||||
public Minecraft(GameConfiguration p_i45547_1_) {
|
||||
super("Client");
|
||||
this.field_195556_O = p_i45547_1_.field_178743_b;
|
||||
field_71432_P = this;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.invalidateLog4jThreadCache();
|
||||
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
|
||||
this.field_110446_Y = p_i45547_1_.field_178744_c.field_178759_c;
|
||||
File file1 = p_i45547_1_.field_178744_c.field_178759_c;
|
||||
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
|
||||
@@ -333,7 +334,7 @@
|
||||
supplier = p_213262_2_;
|
||||
}
|
||||
|
||||
- return new ClientResourcePackInfo(p_213262_0_, p_213262_1_, supplier, p_213262_3_, p_213262_4_, p_213262_5_);
|
||||
+ return new ClientResourcePackInfo(p_213262_0_, p_213262_1_, supplier, p_213262_3_, p_213262_4_, p_213262_5_, p_213262_3_.isHidden());
|
||||
});
|
||||
this.field_110448_aq.func_198982_a(this.field_195554_ax);
|
||||
this.field_110448_aq.func_198982_a(new FolderPackFinder(this.field_130070_K));
|
||||
@@ -341,7 +342,6 @@
|
||||
@@ -335,7 +336,6 @@
|
||||
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
|
||||
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
||||
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
|
||||
@@ -25,87 +16,105 @@
|
||||
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;
|
||||
@@ -451,6 +451,7 @@
|
||||
@@ -367,6 +367,7 @@
|
||||
screensize = p_i45547_1_.field_178743_b;
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.join();
|
||||
Util.field_211180_a = RenderSystem.initBackendSystem();
|
||||
this.field_195557_T = new VirtualScreen(this);
|
||||
this.field_195558_d = this.field_195557_T.func_217626_a(screensize, this.field_71474_y.field_198019_u, "Minecraft " + SharedConstants.func_215069_a().getName());
|
||||
@@ -382,7 +383,6 @@
|
||||
|
||||
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());
|
||||
RenderSystem.initRenderer(this.field_71474_y.field_209231_W, false);
|
||||
@@ -390,6 +390,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);
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.begin(this, this.field_110448_aq, this.field_110451_am, this.field_195554_ax);
|
||||
this.field_110448_aq.func_198983_a();
|
||||
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
|
||||
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
|
||||
this.field_110451_am.func_219534_a(this.field_135017_as);
|
||||
@@ -433,12 +434,14 @@
|
||||
this.func_193986_ar();
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
+ 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);
|
||||
+ this.field_71456_v = new net.minecraftforge.client.gui.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);
|
||||
RenderSystem.setErrorCallback(this::func_195545_a);
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
@@ -450,12 +453,11 @@
|
||||
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
|
||||
this.field_195558_d.func_227801_c_();
|
||||
this.func_213226_a();
|
||||
- if (s != null) {
|
||||
- this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, s, i));
|
||||
- } else {
|
||||
- this.func_147108_a(new MainMenuScreen(true));
|
||||
- }
|
||||
|
||||
@@ -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 @@
|
||||
+ //Final needed so we can move into lambda below.
|
||||
+ final String autoServerName = s;
|
||||
+ final int autoServerPort = i;
|
||||
+
|
||||
ResourceLoadProgressGui.func_212970_a(this);
|
||||
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
|
||||
this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219537_a(Util.func_215072_e(), this, field_223714_G, list), (p_229990_2_) -> {
|
||||
@@ -465,6 +467,14 @@
|
||||
this.func_213256_aB();
|
||||
}
|
||||
|
||||
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 @@
|
||||
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_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 @@
|
||||
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());
|
||||
+ if (net.minecraftforge.fml.client.ClientModLoader.completeModLoading()) return; // Do not overwrite the error screen
|
||||
+ // FORGE: Move opening initial screen to after startup and events are enabled.
|
||||
+ // Also Fixes MC-145102
|
||||
+ if (autoServerName != null) {
|
||||
+ this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, autoServerName, autoServerPort));
|
||||
+ } else {
|
||||
+ this.func_147108_a(new MainMenuScreen(true));
|
||||
+ }
|
||||
});
|
||||
}, false));
|
||||
}
|
||||
@@ -545,7 +555,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();
|
||||
|
||||
@@ -633,13 +643,13 @@
|
||||
Bootstrap.func_179870_a(p_71377_0_.func_71502_e());
|
||||
if (p_71377_0_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f());
|
||||
- System.exit(-1);
|
||||
+ net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-1);
|
||||
} else if (p_71377_1_.func_147149_a(file2)) {
|
||||
} else if (p_71377_0_.func_147149_a(file2)) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||
System.exit(-1);
|
||||
@@ -661,6 +675,7 @@
|
||||
- System.exit(-1);
|
||||
+ net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-1);
|
||||
} else {
|
||||
Bootstrap.func_179870_a("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
||||
- System.exit(-2);
|
||||
+ net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -648,6 +658,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -113,7 +122,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -740,16 +755,20 @@
|
||||
@@ -726,10 +737,6 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -124,7 +133,8 @@
|
||||
if (p_147108_1_ == null && this.field_71441_e == null) {
|
||||
p_147108_1_ = new MainMenuScreen();
|
||||
} else if (p_147108_1_ == null && this.field_71439_g.func_110143_aJ() <= 0.0F) {
|
||||
p_147108_1_ = new DeathScreen((ITextComponent)null, this.field_71441_e.func_72912_H().func_76093_s());
|
||||
@@ -740,6 +747,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ Screen old = this.field_71462_r;
|
||||
@@ -138,8 +148,8 @@
|
||||
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 @@
|
||||
GlStateManager.enableTexture();
|
||||
@@ -862,11 +877,13 @@
|
||||
RenderSystem.enableTexture();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b);
|
||||
@@ -152,30 +162,29 @@
|
||||
}
|
||||
|
||||
this.field_71424_I.func_219897_b();
|
||||
@@ -1146,10 +1167,10 @@
|
||||
@@ -1121,10 +1138,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 @@
|
||||
@@ -1151,7 +1168,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
- if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) {
|
||||
+ if (!this.field_71441_e.func_180495_p(blockpos).isAir(field_71441_e, blockpos)) {
|
||||
+ if (!this.field_71441_e.func_175623_d(blockpos)) {
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1186,6 +1207,7 @@
|
||||
@@ -1161,6 +1178,7 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
@@ -183,17 +192,17 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
@@ -1235,6 +1257,9 @@
|
||||
@@ -1217,6 +1235,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.func_216346_c() == RayTraceResult.Type.MISS))
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, hand);
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, hand);
|
||||
+
|
||||
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 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand);
|
||||
if (actionresulttype2.func_226246_a_()) {
|
||||
@@ -1243,6 +1264,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -202,7 +211,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 @@
|
||||
@@ -1360,6 +1383,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 +220,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 @@
|
||||
@@ -1514,6 +1539,12 @@
|
||||
this.func_147108_a(worldloadprogressscreen);
|
||||
|
||||
while(!this.field_71437_Z.func_71200_ad()) {
|
||||
@@ -232,8 +233,8 @@
|
||||
worldloadprogressscreen.tick();
|
||||
this.func_195542_b(false);
|
||||
|
||||
@@ -1546,11 +1582,17 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> {
|
||||
@@ -1534,11 +1565,17 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
- networkmanager.func_179290_a(new CLoginStartPacket(this.func_110432_I().func_148256_e()));
|
||||
@@ -251,15 +252,28 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1623,6 +1665,7 @@
|
||||
}
|
||||
|
||||
@@ -1570,10 +1607,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);
|
||||
@@ -1605,6 +1644,7 @@
|
||||
this.field_71438_f.func_72732_a(p_213257_1_);
|
||||
this.field_71452_i.func_78870_a(p_213257_1_);
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
+ net.minecraftforge.client.MinecraftForgeClient.clearRenderCache();
|
||||
}
|
||||
|
||||
public final boolean func_71355_q() {
|
||||
@@ -1648,112 +1691,8 @@
|
||||
@@ -1630,112 +1670,8 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -374,15 +388,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1825,6 +1764,7 @@
|
||||
@@ -1817,6 +1753,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use selective scheduleResourceRefresh method in FMLClientHandler
|
||||
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 @@
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
|
||||
return p_229993_0_;
|
||||
@@ -1944,6 +1881,8 @@
|
||||
}
|
||||
|
||||
public MusicTicker.MusicType func_147109_W() {
|
||||
@@ -391,9 +405,18 @@
|
||||
if (this.field_71462_r instanceof WinGameScreen) {
|
||||
return MusicTicker.MusicType.CREDITS;
|
||||
} else if (this.field_71439_g == null) {
|
||||
@@ -2124,4 +2066,12 @@
|
||||
public LoadingGui func_213250_au() {
|
||||
return this.field_213279_p;
|
||||
@@ -2120,7 +2059,7 @@
|
||||
supplier = func_228022_c_(supplier);
|
||||
}
|
||||
|
||||
- return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_);
|
||||
+ return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_3_.isHidden());
|
||||
}
|
||||
|
||||
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
|
||||
@@ -2138,4 +2077,12 @@
|
||||
public void func_228020_b_(int p_228020_1_) {
|
||||
this.field_175617_aL.func_229355_a_(p_228020_1_);
|
||||
}
|
||||
+
|
||||
+ public ItemColors getItemColors() {
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
--- a/net/minecraft/client/MouseHelper.java
|
||||
+++ b/net/minecraft/client/MouseHelper.java
|
||||
@@ -77,11 +77,15 @@
|
||||
int p_198023_3_f = p_198023_3_;
|
||||
@@ -72,16 +72,21 @@
|
||||
if (!this.field_198051_p && flag) {
|
||||
this.func_198034_i();
|
||||
}
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onRawMouseClicked(p_198023_3_, p_198023_4_, p_198023_5_)) return;
|
||||
} else {
|
||||
double d0 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
|
||||
double d1 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
if (flag) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
- aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, p_198023_3_f);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPre(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPost(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
- aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPre(this.field_198036_a.field_71462_r, d0, d1, i);
|
||||
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, i);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPost(this.field_198036_a.field_71462_r, d0, d1, i);
|
||||
}, "mouseClicked event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
|
||||
} else {
|
||||
Screen.wrapScreenError(() -> {
|
||||
- aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, p_198023_3_f);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPre(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPost(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
- aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, i);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPre(this.field_198036_a.field_71462_r, d0, d1, i);
|
||||
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, i);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPost(this.field_198036_a.field_71462_r, d0, d1, i);
|
||||
}, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -105,7 +109,7 @@
|
||||
@@ -105,7 +110,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,10 +33,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
double d1 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
|
||||
double d2 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
- this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPre(this, this.field_198036_a.field_71462_r, d0)) return;
|
||||
+ if (this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0)) return;
|
||||
@@ -38,14 +44,48 @@
|
||||
} 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 @@
|
||||
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();
|
||||
@@ -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));
|
||||
@@ -180,7 +188,9 @@
|
||||
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
|
||||
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
Screen.wrapScreenError(() -> {
|
||||
- iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPre(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3)) return;
|
||||
+ if (iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPost(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPre(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3)) return;
|
||||
+ if (iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPost(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3);
|
||||
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -245,6 +255,10 @@
|
||||
return this.field_198039_d;
|
||||
}
|
||||
|
||||
+ public boolean isMiddleDown() {
|
||||
+ return this.field_198038_c;
|
||||
+ }
|
||||
+
|
||||
public double func_198024_e() {
|
||||
return this.field_198040_e;
|
||||
}
|
||||
@@ -253,6 +267,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,6 +1,6 @@
|
||||
--- a/net/minecraft/client/audio/SoundEngine.java
|
||||
+++ b/net/minecraft/client/audio/SoundEngine.java
|
||||
@@ -53,6 +53,7 @@
|
||||
@@ -55,6 +55,7 @@
|
||||
this.field_148622_c = p_i50892_1_;
|
||||
this.field_148619_d = p_i50892_2_;
|
||||
this.field_217939_i = new AudioStreamManager(p_i50892_3_);
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
public void func_148596_a() {
|
||||
@@ -68,6 +69,7 @@
|
||||
@@ -70,6 +71,7 @@
|
||||
|
||||
this.func_148613_b();
|
||||
this.func_148608_i();
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
|
||||
private synchronized void func_148608_i() {
|
||||
@@ -246,6 +248,8 @@
|
||||
@@ -251,6 +253,8 @@
|
||||
|
||||
public void func_148611_c(ISound p_148611_1_) {
|
||||
if (this.field_148617_f) {
|
||||
@@ -25,7 +25,7 @@
|
||||
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
|
||||
ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
|
||||
if (soundeventaccessor == null) {
|
||||
@@ -300,11 +304,13 @@
|
||||
@@ -305,11 +309,13 @@
|
||||
p_217930_7_.func_216420_a(vec3d);
|
||||
p_217930_7_.func_216432_b(flag);
|
||||
});
|
||||
@@ -39,7 +39,7 @@
|
||||
});
|
||||
});
|
||||
} else {
|
||||
@@ -312,6 +318,7 @@
|
||||
@@ -317,6 +323,7 @@
|
||||
channelmanager$entry.func_217888_a((p_217935_1_) -> {
|
||||
p_217935_1_.func_216433_a(p_217928_1_);
|
||||
p_217935_1_.func_216438_c();
|
||||
|
||||
@@ -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 @@
|
||||
@@ -214,6 +214,11 @@
|
||||
this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
|
||||
@@ -116,7 +116,7 @@
|
||||
@@ -115,7 +115,7 @@
|
||||
f = 1.0F;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
int i = this.func_184612_cw();
|
||||
float f1 = (float)i / 20.0F;
|
||||
if (f1 > 1.0F) {
|
||||
@@ -128,6 +128,6 @@
|
||||
@@ -127,6 +127,6 @@
|
||||
f *= 1.0F - f1 * 0.15F;
|
||||
}
|
||||
|
||||
|
||||
+24
-21
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
||||
@@ -130,6 +130,7 @@
|
||||
@@ -134,6 +134,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -449,6 +450,11 @@
|
||||
@@ -458,6 +459,11 @@
|
||||
}
|
||||
|
||||
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) {
|
||||
@@ -17,33 +17,36 @@
|
||||
+ p_184185_1_ = event.getSound();
|
||||
+ p_184185_2_ = event.getVolume();
|
||||
+ p_184185_3_ = event.getPitch();
|
||||
this.field_70170_p.func_184134_a(this.field_70165_t, this.field_70163_u, this.field_70161_v, p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
|
||||
this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
|
||||
}
|
||||
|
||||
@@ -591,6 +597,7 @@
|
||||
@@ -599,6 +605,7 @@
|
||||
boolean flag1 = this.field_71158_b.field_228350_h_;
|
||||
boolean flag2 = this.func_223110_ee();
|
||||
boolean flag3 = this.func_213287_bg() || this.func_213300_bk();
|
||||
this.field_71158_b.func_217607_a(flag3, this.func_175149_v());
|
||||
this.field_71158_b.func_225607_a_(this.func_228354_I_());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.field_71158_b);
|
||||
this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b);
|
||||
if (this.func_184587_cr() && !this.func_184218_aH()) {
|
||||
this.field_71158_b.field_78902_a *= 0.2F;
|
||||
@@ -607,10 +614,14 @@
|
||||
|
||||
if (!this.field_70145_X) {
|
||||
AxisAlignedBB axisalignedbb = this.func_174813_aQ();
|
||||
+ net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent event = new net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent(this, axisalignedbb);
|
||||
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
|
||||
+ axisalignedbb = event.getEntityBoundingBox();
|
||||
this.func_213282_i(this.field_70165_t - (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v + (double)this.func_213311_cf() * 0.35D);
|
||||
this.func_213282_i(this.field_70165_t - (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v - (double)this.func_213311_cf() * 0.35D);
|
||||
this.func_213282_i(this.field_70165_t + (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v - (double)this.func_213311_cf() * 0.35D);
|
||||
this.func_213282_i(this.field_70165_t + (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v + (double)this.func_213311_cf() * 0.35D);
|
||||
+ }
|
||||
@@ -613,11 +620,12 @@
|
||||
this.field_71158_b.field_78901_c = true;
|
||||
}
|
||||
|
||||
boolean flag7 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c;
|
||||
@@ -950,4 +961,16 @@
|
||||
- if (!this.field_70145_X) {
|
||||
- this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
- this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
- this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
- this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
+ net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent event = new net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent(this);
|
||||
+ if (!this.field_70145_X && !net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
|
||||
+ this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
+ this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
|
||||
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
|
||||
}
|
||||
|
||||
boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c;
|
||||
@@ -961,4 +969,16 @@
|
||||
return this.field_204230_bP;
|
||||
}
|
||||
}
|
||||
@@ -55,7 +58,7 @@
|
||||
+ this.field_175164_bL = old.field_175164_bL;
|
||||
+ this.field_175165_bM = old.field_175165_bM;
|
||||
+ this.field_184841_cd = old.field_184841_cd;
|
||||
+ this.field_175170_bN = old.field_175170_bN;
|
||||
+ this.field_228351_cj_ = old.field_228351_cj_;
|
||||
+ this.field_175171_bO = old.field_175171_bO;
|
||||
+ this.field_175168_bP = old.field_175168_bP;
|
||||
+ }
|
||||
|
||||
@@ -1,20 +1,28 @@
|
||||
--- 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;
|
||||
}
|
||||
@@ -58,7 +59,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.shouldRender()).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; }
|
||||
+ effectinstance.renderInventoryEffect(this, p_214078_1_, i, this.getBlitOffset());
|
||||
+ if (!effectinstance.shouldRenderInvText()) { i += p_214078_2_; continue; }
|
||||
String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a());
|
||||
if (effectinstance.func_76458_c() >= 1 && effectinstance.func_76458_c() <= 9) {
|
||||
s = s + ' ' + I18n.func_135052_a("enchantment.level." + (effectinstance.func_76458_c() + 1));
|
||||
@@ -1,32 +1,34 @@
|
||||
--- a/net/minecraft/client/gui/IngameGui.java
|
||||
+++ b/net/minecraft/client/gui/IngameGui.java
|
||||
@@ -408,6 +408,9 @@
|
||||
@@ -406,6 +406,9 @@
|
||||
|
||||
for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
|
||||
Effect effect = effectinstance.func_188419_a();
|
||||
+ if (!effect.shouldRenderHUD(effectinstance)) continue;
|
||||
+ if (!effectinstance.shouldRenderHUD()) continue;
|
||||
+ // Rebind in case previous renderHUDEffect changed texture
|
||||
+ this.field_73839_d.func_110434_K().func_110577_a(ContainerScreen.field_147001_a);
|
||||
if (effectinstance.func_205348_f()) {
|
||||
int k = this.field_194811_H;
|
||||
int l = 1;
|
||||
@@ -439,11 +442,13 @@
|
||||
float f_f = f;
|
||||
int k_f = k;
|
||||
int l_f = l;
|
||||
+
|
||||
TextureAtlasSprite textureatlassprite = potionspriteuploader.func_215288_a(effect);
|
||||
list.add(() -> {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, f_f);
|
||||
blit(k_f + 3, l_f + 3, this.blitOffset, 18, 18, textureatlassprite);
|
||||
@@ -443,6 +446,7 @@
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
||||
blit(j1 + 3, k1 + 3, this.getBlitOffset(), 18, 18, textureatlassprite);
|
||||
});
|
||||
+ effect.renderHUDEffect(effectinstance, this, k, l, this.blitOffset, f);
|
||||
+ effectinstance.renderHUDEffect(this, k, l, this.getBlitOffset(), f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +593,13 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
@@ -568,6 +572,7 @@
|
||||
}
|
||||
|
||||
String s = itextcomponent.func_150254_d();
|
||||
+ s = this.field_92016_l.getHighlightTip(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()) {
|
||||
@@ -584,7 +589,13 @@
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
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));
|
||||
+ FontRenderer font = field_92016_l.func_77973_b().getFontRenderer(field_92016_l);
|
||||
+ if (font == null) {
|
||||
@@ -35,6 +37,6 @@
|
||||
+ i = (this.field_194811_H - font.func_78256_a(s)) / 2;
|
||||
+ font.func_175063_a(s, (float)i, (float)j, 16777215 + (k << 24));
|
||||
+ }
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/MapItemRenderer.java
|
||||
+++ b/net/minecraft/client/gui/MapItemRenderer.java
|
||||
@@ -118,6 +118,7 @@
|
||||
@@ -114,6 +114,7 @@
|
||||
|
||||
for(MapDecoration mapdecoration : this.field_148242_b.field_76203_h.values()) {
|
||||
if (!p_148237_1_ || mapdecoration.func_191180_f()) {
|
||||
if (!p_228089_3_ || mapdecoration.func_191180_f()) {
|
||||
+ if (mapdecoration.render(k)) { k++; continue; }
|
||||
MapItemRenderer.this.field_148251_b.func_110577_a(MapItemRenderer.field_148253_a);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translatef(0.0F + (float)mapdecoration.func_176112_b() / 2.0F + 64.0F, 0.0F + (float)mapdecoration.func_176113_c() / 2.0F + 64.0F, -0.02F);
|
||||
p_228089_1_.func_227860_a_();
|
||||
p_228089_1_.func_227861_a_((double)(0.0F + (float)mapdecoration.func_176112_b() / 2.0F + 64.0F), (double)(0.0F + (float)mapdecoration.func_176113_c() / 2.0F + 64.0F), (double)-0.02F);
|
||||
p_228089_1_.func_227863_a_(Vector3f.field_229183_f_.func_229187_a_((float)(mapdecoration.func_176111_d() * 360) / 16.0F));
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/ResourceLoadProgressGui.java
|
||||
+++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java
|
||||
@@ -81,6 +81,7 @@
|
||||
this.blit(k1, i1, 0, 0, 256, 256);
|
||||
float f3 = this.field_212975_c.func_219555_b();
|
||||
this.field_212978_f = MathHelper.func_76131_a(this.field_212978_f * 0.95F + f3 * 0.050000012F, 0.0F, 1.0F);
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.renderProgressText();
|
||||
if (f < 1.0F) {
|
||||
this.func_228181_a_(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
|
||||
}
|
||||
@@ -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
|
||||
@@ -1,24 +1,24 @@
|
||||
--- a/net/minecraft/client/gui/SlotGui.java
|
||||
+++ b/net/minecraft/client/gui/SlotGui.java
|
||||
@@ -154,15 +154,8 @@
|
||||
GlStateManager.disableFog();
|
||||
@@ -153,15 +153,8 @@
|
||||
this.capYPosition();
|
||||
Tessellator tessellator = Tessellator.func_178181_a();
|
||||
BufferBuilder bufferbuilder = tessellator.func_178180_c();
|
||||
- this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION);
|
||||
- GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
- RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
- float f = 32.0F;
|
||||
- bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i);
|
||||
- bufferbuilder.func_181662_b((double)this.x0, (double)this.y1, 0.0D).func_187315_a((double)((float)this.x0 / 32.0F), (double)((float)(this.y1 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_181662_b((double)this.x1, (double)this.y1, 0.0D).func_187315_a((double)((float)this.x1 / 32.0F), (double)((float)(this.y1 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_181662_b((double)this.x1, (double)this.y0, 0.0D).func_187315_a((double)((float)this.x1 / 32.0F), (double)((float)(this.y0 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_181662_b((double)this.x0, (double)this.y0, 0.0D).func_187315_a((double)((float)this.x0 / 32.0F), (double)((float)(this.y0 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_225582_a_((double)this.x0, (double)this.y1, 0.0D).func_225583_a_((float)this.x0 / 32.0F, (float)(this.y1 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_225582_a_((double)this.x1, (double)this.y1, 0.0D).func_225583_a_((float)this.x1 / 32.0F, (float)(this.y1 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_225582_a_((double)this.x1, (double)this.y0, 0.0D).func_225583_a_((float)this.x1 / 32.0F, (float)(this.y0 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
- bufferbuilder.func_225582_a_((double)this.x0, (double)this.y0, 0.0D).func_225583_a_((float)this.x0 / 32.0F, (float)(this.y0 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
- tessellator.func_78381_a();
|
||||
+ // Forge: background rendering moved into separate method.
|
||||
+ this.drawContainerBackground(tessellator);
|
||||
int k = this.x0 + this.width / 2 - this.getRowWidth() / 2 + 2;
|
||||
int l = this.y0 + 4 - (int)this.yo;
|
||||
if (this.renderHeader) {
|
||||
@@ -402,4 +395,17 @@
|
||||
@@ -401,4 +394,17 @@
|
||||
public int getItemHeight() {
|
||||
return this.itemHeight;
|
||||
}
|
||||
@@ -26,13 +26,13 @@
|
||||
+ protected void drawContainerBackground(Tessellator tessellator) {
|
||||
+ BufferBuilder buffer = tessellator.func_178180_c();
|
||||
+ this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION);
|
||||
+ GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ float scale = 32.0F;
|
||||
+ buffer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
|
||||
+ buffer.func_181662_b((double)this.x0, (double)this.y1, 0.0D).func_187315_a(this.x0 / scale, (this.y1 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_181662_b((double)this.x1, (double)this.y1, 0.0D).func_187315_a(this.x1 / scale, (this.y1 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_181662_b((double)this.x1, (double)this.y0, 0.0D).func_187315_a(this.x1 / scale, (this.y0 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_181662_b((double)this.x0, (double)this.y0, 0.0D).func_187315_a(this.x0 / scale, (this.y0 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_225582_a_((double)this.x0, (double)this.y1, 0.0D).func_225583_a_(this.x0 / scale, (this.y1 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_225582_a_((double)this.x1, (double)this.y1, 0.0D).func_225583_a_(this.x1 / scale, (this.y1 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_225582_a_((double)this.x1, (double)this.y0, 0.0D).func_225583_a_(this.x1 / scale, (this.y0 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
+ buffer.func_225582_a_((double)this.x0, (double)this.y0, 0.0D).func_225583_a_(this.x0 / scale, (this.y0 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
|
||||
+ tessellator.func_78381_a();
|
||||
+ }
|
||||
}
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
public Advancement func_193935_c() {
|
||||
return this.field_191805_h;
|
||||
}
|
||||
@@ -136,8 +146,8 @@
|
||||
@@ -150,8 +160,8 @@
|
||||
return null;
|
||||
} else {
|
||||
for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) {
|
||||
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/advancements/AdvancementsScreen.java
|
||||
+++ b/net/minecraft/client/gui/advancements/AdvancementsScreen.java
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -24,6 +24,7 @@
|
||||
private final Map<Advancement, AdvancementTabGui> field_191947_i = Maps.newLinkedHashMap();
|
||||
private AdvancementTabGui field_191940_s;
|
||||
private boolean field_191944_v;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public AdvancementsScreen(ClientAdvancementManager p_i47383_1_) {
|
||||
super(NarratorChatListener.field_216868_a);
|
||||
@@ -40,7 +41,13 @@
|
||||
@@ -39,7 +40,13 @@
|
||||
} else {
|
||||
this.field_191946_h.func_194230_a(this.field_191940_s == null ? null : this.field_191940_s.func_193935_c(), true);
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
public void removed() {
|
||||
@@ -58,7 +65,7 @@
|
||||
@@ -57,7 +64,7 @@
|
||||
int j = (this.height - 140) / 2;
|
||||
|
||||
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
|
||||
@@ -32,20 +32,20 @@
|
||||
this.field_191946_h.func_194230_a(advancementtabgui.func_193935_c(), true);
|
||||
break;
|
||||
}
|
||||
@@ -83,6 +90,12 @@
|
||||
@@ -82,6 +89,12 @@
|
||||
int j = (this.height - 140) / 2;
|
||||
this.renderBackground();
|
||||
this.func_191936_c(p_render_1_, p_render_2_, i, j);
|
||||
+ if (maxPages != 0) {
|
||||
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
|
||||
+ int width = this.font.func_78256_a(page);
|
||||
+ GlStateManager.disableLighting();
|
||||
+ RenderSystem.disableLighting();
|
||||
+ this.font.func_175063_a(page, i + (252 / 2) - (width / 2), j - 44, -1);
|
||||
+ }
|
||||
this.func_191934_b(i, j);
|
||||
this.func_191937_d(p_render_1_, p_render_2_, i, j);
|
||||
}
|
||||
@@ -131,6 +144,7 @@
|
||||
@@ -128,6 +141,7 @@
|
||||
this.minecraft.func_110434_K().func_110577_a(field_191945_g);
|
||||
|
||||
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
|
||||
@@ -53,15 +53,15 @@
|
||||
advancementtabgui.func_191798_a(p_191934_1_, p_191934_2_, advancementtabgui == this.field_191940_s);
|
||||
}
|
||||
|
||||
@@ -139,6 +153,7 @@
|
||||
RenderHelper.func_74520_c();
|
||||
@@ -135,6 +149,7 @@
|
||||
RenderSystem.defaultBlendFunc();
|
||||
|
||||
for(AdvancementTabGui advancementtabgui1 : this.field_191947_i.values()) {
|
||||
+ if (advancementtabgui1.getPage() == tabPage)
|
||||
advancementtabgui1.func_191796_a(p_191934_1_, p_191934_2_, this.itemRenderer);
|
||||
}
|
||||
|
||||
@@ -161,7 +176,7 @@
|
||||
@@ -157,7 +172,7 @@
|
||||
|
||||
if (this.field_191947_i.size() > 1) {
|
||||
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
for(ClientBossInfo clientbossinfo : this.field_184060_g.values()) {
|
||||
int k = i / 2 - 91;
|
||||
+ net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo event =
|
||||
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(this.field_184059_f.field_195558_d, clientbossinfo, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(this.field_184059_f.func_228018_at_(), clientbossinfo, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b);
|
||||
+ if (!event.isCanceled()) {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.field_184059_f.func_110434_K().func_110577_a(field_184058_a);
|
||||
this.func_184052_a(k, j, clientbossinfo);
|
||||
@@ -38,7 +41,9 @@
|
||||
@@ -17,7 +17,7 @@
|
||||
- j += 10 + 9;
|
||||
+ }
|
||||
+ j += event.getIncrement();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPost(this.field_184059_f.field_195558_d);
|
||||
if (j >= this.field_184059_f.field_195558_d.func_198087_p() / 3) {
|
||||
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPost(this.field_184059_f.func_228018_at_());
|
||||
if (j >= this.field_184059_f.func_228018_at_().func_198087_p() / 3) {
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
--- a/net/minecraft/client/gui/overlay/DebugOverlayGui.java
|
||||
+++ b/net/minecraft/client/gui/overlay/DebugOverlayGui.java
|
||||
@@ -357,7 +357,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);
|
||||
}
|
||||
}
|
||||
@@ -373,7 +373,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);
|
||||
}
|
||||
}
|
||||
@@ -383,6 +383,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,15 +1,15 @@
|
||||
--- 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;
|
||||
@@ -421,7 +421,7 @@
|
||||
@@ -88,7 +88,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));
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@
|
||||
|
||||
languagemanager.func_135045_a(language);
|
||||
this.field_191888_F.field_71474_y.field_74363_ab = language.getCode();
|
||||
|
||||
-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) {
|
||||
@@ -1,23 +1,23 @@
|
||||
--- a/net/minecraft/client/gui/screen/ControlsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/ControlsScreen.java
|
||||
@@ -37,7 +37,7 @@
|
||||
@@ -32,7 +32,7 @@
|
||||
this.children.add(this.field_146494_r);
|
||||
this.field_146493_s = this.addButton(new Button(this.width / 2 - 155, this.height - 29, 150, 20, I18n.func_135052_a("controls.resetAll"), (p_213125_1_) -> {
|
||||
for(KeyBinding keybinding : this.minecraft.field_71474_y.field_74324_K) {
|
||||
for(KeyBinding keybinding : this.field_228183_b_.field_74324_K) {
|
||||
- keybinding.func_197979_b(keybinding.func_197977_i());
|
||||
+ keybinding.setToDefault();
|
||||
}
|
||||
|
||||
KeyBinding.func_74508_b();
|
||||
@@ -61,11 +61,14 @@
|
||||
@@ -56,11 +56,14 @@
|
||||
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) {
|
||||
if (this.field_146491_f != null) {
|
||||
if (p_keyPressed_1_ == 256) {
|
||||
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.field_197958_a);
|
||||
this.field_146497_i.func_198014_a(this.field_146491_f, InputMappings.field_197958_a);
|
||||
this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.field_197958_a);
|
||||
} else {
|
||||
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
|
||||
this.field_146497_i.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
|
||||
this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
|
||||
}
|
||||
|
||||
+ if (!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.field_146491_f.getKey()))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/client/gui/screen/CreateWorldScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/CreateWorldScreen.java
|
||||
@@ -137,14 +137,7 @@
|
||||
}));
|
||||
@@ -145,14 +145,7 @@
|
||||
});
|
||||
this.field_146320_D.visible = false;
|
||||
this.field_146322_F = this.addButton(new Button(this.width / 2 + 5, 120, 150, 20, I18n.func_135052_a("selectWorld.customizeType"), (p_214314_1_) -> {
|
||||
- if (WorldType.field_77139_a[this.field_146331_K] == WorldType.field_77138_c) {
|
||||
@@ -16,11 +16,12 @@
|
||||
}));
|
||||
this.field_146322_F.visible = false;
|
||||
this.field_146321_E = this.addButton(new Button(this.width / 2 - 155, 151, 150, 20, I18n.func_135052_a("selectWorld.allowCommands"), (p_214315_1_) -> {
|
||||
@@ -223,6 +216,7 @@
|
||||
i = (long)s.hashCode();
|
||||
@@ -240,6 +233,8 @@
|
||||
}
|
||||
}
|
||||
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
|
||||
|
||||
WorldSettings worldsettings = new WorldSettings(i, GameType.func_77142_a(this.field_146342_r), this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]);
|
||||
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
|
||||
+
|
||||
WorldSettings worldsettings = new WorldSettings(i, this.field_228197_f_.field_228218_f_, this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]);
|
||||
worldsettings.func_205390_a(Dynamic.convert(NBTDynamicOps.field_210820_a, JsonOps.INSTANCE, this.field_146334_a));
|
||||
if (this.field_146338_v && !this.field_146337_w) {
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/screen/DeathScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/DeathScreen.java
|
||||
@@ -34,6 +34,7 @@
|
||||
}));
|
||||
Button button = this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 96, 200, 20, I18n.func_135052_a("deathScreen.titleScreen"), (p_213020_1_) -> {
|
||||
if (this.field_213023_c) {
|
||||
+ func_213022_a(true);
|
||||
this.func_228177_a_();
|
||||
} 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/EnchantmentScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/EnchantmentScreen.java
|
||||
@@ -146,7 +146,7 @@
|
||||
@@ -155,7 +155,7 @@
|
||||
String s1 = EnchantmentNameParts.func_178176_a().func_148334_a(this.font, i2);
|
||||
FontRenderer fontrenderer = this.minecraft.func_211500_ak().func_211504_a(Minecraft.field_71464_q);
|
||||
int j2 = 6839882;
|
||||
@@ -9,7 +9,7 @@
|
||||
this.blit(j1, j + 14 + 19 * i1, 0, 185, 108, 19);
|
||||
this.blit(j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16);
|
||||
fontrenderer.func_78279_b(s1, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1);
|
||||
@@ -186,10 +186,12 @@
|
||||
@@ -195,10 +195,12 @@
|
||||
Enchantment enchantment = Enchantment.func_185262_c((this.field_147002_h).field_185001_h[j]);
|
||||
int l = (this.field_147002_h).field_185002_i[j];
|
||||
int i1 = j + 1;
|
||||
|
||||
Loaded 100 of 1489 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user