mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d97f47141e | ||
|
|
a7df63e1a1 | ||
|
|
d3e8804dbf | ||
|
|
c509cac02b | ||
|
|
4b5bf760ec | ||
|
|
c57c6213ea | ||
|
|
fb30820e2b | ||
|
|
61b612c88a | ||
|
|
d3edc9dcdc | ||
|
|
ba2485b807 | ||
|
|
60c6635af5 | ||
|
|
9c5134fb6b | ||
|
|
eae0858de6 | ||
|
|
d7949d5316 | ||
|
|
8c44d6d4cb | ||
|
|
049fae5c65 | ||
|
|
41f8459a41 | ||
|
|
5cd82f16f2 | ||
|
|
444ba7a7d5 | ||
|
|
dcd5f1d711 | ||
|
|
18ce494cba | ||
|
|
9e39570d49 | ||
|
|
6a1337aa92 | ||
|
|
605c4a0adf | ||
|
|
7c90d9f3e8 | ||
|
|
01a0674490 | ||
|
|
e482793f69 | ||
|
|
de14670d4d | ||
|
|
9209c3cbfe | ||
|
|
a7204b5cd3 | ||
|
|
616416569b | ||
|
|
cab1b9716c | ||
|
|
bda3f1b7c6 | ||
|
|
416bf9e3bf | ||
|
|
102e0095a7 | ||
|
|
1fcfd54584 | ||
|
|
441a9c9024 | ||
|
|
f68fdcf703 | ||
|
|
d8137f7bcf | ||
|
|
42c27b8845 | ||
|
|
8408539f1c | ||
|
|
1f0467b864 | ||
|
|
1aae18d4bc | ||
|
|
45902676fd | ||
|
|
931105123e | ||
|
|
cf35019d07 | ||
|
|
c636f6edd6 | ||
|
|
58b28569e2 | ||
|
|
73bb013b25 | ||
|
|
d6da893c0c | ||
|
|
47a7d8e2b7 | ||
|
|
cb0cf2f04f | ||
|
|
a4cf5951ca | ||
|
|
822dce47cd | ||
|
|
2ea475ad31 | ||
|
|
eed92ba07c | ||
|
|
a86317efc8 | ||
|
|
ca973f053f | ||
|
|
119e4a6924 | ||
|
|
aef224221f | ||
|
|
18d0f7ba0d | ||
|
|
dd9077d52d | ||
|
|
01cb2117cc | ||
|
|
574f890e58 | ||
|
|
e70cc4fcae | ||
|
|
d02da21a7a | ||
|
|
817546e4c8 | ||
|
|
1a7e05a3da | ||
|
|
f19fed0853 | ||
|
|
06f67f7696 | ||
|
|
501f1dc8dc | ||
|
|
8b5a5ecd74 | ||
|
|
cb3ff19801 | ||
|
|
f30d7bc845 | ||
|
|
c0aa4c8517 | ||
|
|
e868739675 | ||
|
|
991682956d | ||
|
|
e168d8e593 | ||
|
|
273b1b110a | ||
|
|
bbc92fa51c | ||
|
|
8515b9dd10 | ||
|
|
a56f894e39 | ||
|
|
592b957b77 | ||
|
|
65cfef1b2e | ||
|
|
914fe91db5 | ||
|
|
0c19ccc11a | ||
|
|
3560e47a77 | ||
|
|
c33cd678f0 | ||
|
|
a67cce2f91 | ||
|
|
72bc39d831 | ||
|
|
abf010ac48 | ||
|
|
2baa05ace9 | ||
|
|
fa708f93ee | ||
|
|
a0a3f9dbfb | ||
|
|
bda875166a | ||
|
|
e376172312 | ||
|
|
d20b1f271e | ||
|
|
67da3182c1 | ||
|
|
1280dea111 | ||
|
|
3920b7aaa3 | ||
|
|
52890edfac | ||
|
|
ed3aea0980 | ||
|
|
3f70fd49ff | ||
|
|
7496e3dbdf | ||
|
|
7c401e9a35 | ||
|
|
a02bec7ebe | ||
|
|
254c1d1531 | ||
|
|
971de3e1d0 | ||
|
|
7d2c8fa6ef | ||
|
|
ac210a3201 | ||
|
|
a79975b3ea | ||
|
|
aa7380acc6 | ||
|
|
cdbd842494 | ||
|
|
323fdb014d | ||
|
|
3f735b715b | ||
|
|
4ecb04ed9f | ||
|
|
e0361047f7 | ||
|
|
37016ca77f | ||
|
|
98ef5049f4 | ||
|
|
98a470d813 | ||
|
|
944d760855 | ||
|
|
e0e999da0d | ||
|
|
2f486f2bdd | ||
|
|
7e4101b3ad | ||
|
|
d8d30e1f82 | ||
|
|
36470f69ad | ||
|
|
5fa732d223 | ||
|
|
5e7279b0a2 | ||
|
|
4764136d47 | ||
|
|
10a06157aa | ||
|
|
d7ba9a50df | ||
|
|
18400e8457 | ||
|
|
f5375783c6 | ||
|
|
8045e48952 | ||
|
|
be18bdee88 | ||
|
|
1e34f331da | ||
|
|
d99a55a7d1 | ||
|
|
0141a959eb | ||
|
|
d04c849a23 | ||
|
|
329e04b068 | ||
|
|
d0c7a496f7 | ||
|
|
ff6fa31b1d | ||
|
|
554952e02a | ||
|
|
00845d5252 | ||
|
|
7113f4400c | ||
|
|
7292b63052 | ||
|
|
7cfc5c3316 | ||
|
|
1d0c67d67b | ||
|
|
47e6b34d2b | ||
|
|
3003e33074 | ||
|
|
7bd7b059c4 | ||
|
|
230d69b772 | ||
|
|
cbfa572acb | ||
|
|
8f5a2be6fd | ||
|
|
45f5f0904a | ||
|
|
6db8b3c26d | ||
|
|
b4ccafe718 | ||
|
|
3c73dc2d0b | ||
|
|
58494f8878 | ||
|
|
cb70702ab5 | ||
|
|
7f1ea578d6 | ||
|
|
dd7e7fc122 | ||
|
|
0bcc60fbe3 | ||
|
|
7766eed754 | ||
|
|
5fa02f53d9 | ||
|
|
176e331fc4 | ||
|
|
d846f23e80 | ||
|
|
af717ad788 | ||
|
|
2a4e05c982 | ||
|
|
c219416bb8 | ||
|
|
8d1ff45c71 | ||
|
|
245d0b6282 | ||
|
|
bbdf52e038 | ||
|
|
237f9dec5a | ||
|
|
d6dc438859 | ||
|
|
1469df26db | ||
|
|
b7f6fbcfcb | ||
|
|
329f26ee20 | ||
|
|
57cd8324dc | ||
|
|
8aafbb9441 | ||
|
|
e4c2d0a779 | ||
|
|
59a213bdaa | ||
|
|
4b564b91bf | ||
|
|
4abfedea68 | ||
|
|
7d971a3262 | ||
|
|
b4474a4882 | ||
|
|
d1ac90bb3e | ||
|
|
785d9b8deb | ||
|
|
ab92801740 | ||
|
|
1d6536a53b | ||
|
|
60315d079b | ||
|
|
1a833a9267 | ||
|
|
70be790b2a | ||
|
|
2e2c57dbd1 | ||
|
|
3fa507d6d1 | ||
|
|
e47fa70279 | ||
|
|
e248503b0a | ||
|
|
3f2c66dca5 | ||
|
|
bd1769b11f | ||
|
|
af98088d04 | ||
|
|
aa076695b9 | ||
|
|
869964cb2f | ||
|
|
579c3ecc0e | ||
|
|
63b2ad36e1 | ||
|
|
ae01194a5e | ||
|
|
3c006c4ca4 | ||
|
|
738d54ff4c | ||
|
|
044bb1c395 | ||
|
|
180f16161c | ||
|
|
7f9e8d059b | ||
|
|
36ccb3bbfe | ||
|
|
1e6f3fc893 | ||
|
|
b4d0ee9b3b | ||
|
|
3e516e54b2 | ||
|
|
3baa00decb | ||
|
|
09a96670e6 | ||
|
|
78455ac3c0 | ||
|
|
2ec74e5c22 | ||
|
|
9d56309a05 | ||
|
|
4139504202 | ||
|
|
2f547c8c56 | ||
|
|
ca72710937 | ||
|
|
9a1688599a | ||
|
|
d6c3df32d6 | ||
|
|
28c0ffe333 | ||
|
|
586c24f9d6 | ||
|
|
31c0a70f8e | ||
|
|
64a92530d9 | ||
|
|
4441935a4a | ||
|
|
f1feac76b3 | ||
|
|
d9c4446ccc | ||
|
|
f83500db11 | ||
|
|
fd02d81e73 | ||
|
|
0d379fdd6b | ||
|
|
f6fd800242 | ||
|
|
c25214aaf4 | ||
|
|
c6afb2be3f | ||
|
|
13501a8b05 | ||
|
|
dae5994e9d | ||
|
|
b28a418bd9 | ||
|
|
64f69cf5c9 | ||
|
|
8084ca43b9 | ||
|
|
2e5f25d8ae | ||
|
|
04b0d24678 | ||
|
|
153e7a1806 | ||
|
|
065ebd748a | ||
|
|
79c17cb542 | ||
|
|
9245975955 | ||
|
|
6ea19ec8bf | ||
|
|
b527bf8ab3 | ||
|
|
0b1b3c68fa | ||
|
|
d930c8ae8b | ||
|
|
053c5300ed | ||
|
|
e8ae18efda | ||
|
|
39965c55ac | ||
|
|
f87dca2ad4 | ||
|
|
3e02903d19 | ||
|
|
febae7f8f2 | ||
|
|
71dd5c9f4d | ||
|
|
aa91af865d | ||
|
|
9119e395d4 | ||
|
|
68433924c7 | ||
|
|
87b67cb45a | ||
|
|
77dd9eb883 | ||
|
|
e000fd2f8f | ||
|
|
e4d20a80ed | ||
|
|
36866fed10 | ||
|
|
55691fce4e | ||
|
|
d2a3b5bed8 | ||
|
|
6365674a2a | ||
|
|
7a02ccc3a8 | ||
|
|
2918864248 | ||
|
|
9fbfe2b98e | ||
|
|
b40e2cc59e | ||
|
|
3eac9c536b | ||
|
|
ad32b01d85 | ||
|
|
da33233762 | ||
|
|
c2a7fe4019 | ||
|
|
0067d3edce | ||
|
|
ebf038231e | ||
|
|
f767b7096c | ||
|
|
161227b1de | ||
|
|
8e43dfa7a6 | ||
|
|
0a11ffb827 | ||
|
|
3c55b46ca0 | ||
|
|
7d21e5d328 | ||
|
|
043069dc8a | ||
|
|
ea26434987 | ||
|
|
9ee34f57f5 | ||
|
|
d539dc12a1 | ||
|
|
c578cae676 | ||
|
|
8b74b32909 | ||
|
|
1d1133123b | ||
|
|
0bdafb976e | ||
|
|
13f9418201 | ||
|
|
a771a3ea06 | ||
|
|
39633eef4f | ||
|
|
1f11ac76fa | ||
|
|
2e1456517a | ||
|
|
4db208332e | ||
|
|
659091c565 | ||
|
|
c8c54113d0 | ||
|
|
69f8e57cea | ||
|
|
06a6fac23a | ||
|
|
fa939a890c | ||
|
|
2c8ab76240 | ||
|
|
7a651b8c1f | ||
|
|
d04df43b27 | ||
|
|
d3c9db906f | ||
|
|
f6e2c5c1f0 | ||
|
|
cc682fd786 | ||
|
|
6643997304 | ||
|
|
7b867d0069 | ||
|
|
a15c4dc9b0 | ||
|
|
7c11fe1022 | ||
|
|
66f816971f | ||
|
|
98c6d5a5f6 | ||
|
|
0b2a98f956 | ||
|
|
c01b336095 | ||
|
|
040cc4bf16 | ||
|
|
eefc4d3e84 | ||
|
|
c3c979f11a | ||
|
|
276d0c49c1 | ||
|
|
7c840dce35 | ||
|
|
2bee5f7ac6 | ||
|
|
60524f0f3e | ||
|
|
1170772a4f | ||
|
|
f4d2d1a24b | ||
|
|
ff2e35c243 | ||
|
|
0d1a2f2af3 | ||
|
|
3b029ba031 | ||
|
|
cd21f7b927 | ||
|
|
755eff7415 | ||
|
|
0d3f28bd52 | ||
|
|
56a3926b86 | ||
|
|
220bf8730a | ||
|
|
118eac8f39 | ||
|
|
99452a8b45 | ||
|
|
eb42614288 | ||
|
|
5238eca241 | ||
|
|
94af6c7f9d | ||
|
|
f2b54acd67 | ||
|
|
497bc10d0a | ||
|
|
c1bb5cb250 | ||
|
|
51910fe83b | ||
|
|
958bbf6c9a | ||
|
|
e98951ee65 | ||
|
|
3765d912a5 | ||
|
|
849bc00b46 | ||
|
|
f3715c3e2e | ||
|
|
985a48f02e | ||
|
|
4e196a445a | ||
|
|
36d2e67b07 | ||
|
|
34568a0a74 | ||
|
|
f7acc73282 | ||
|
|
60926ad6ea | ||
|
|
f734e614e4 | ||
|
|
997a15c0f2 | ||
|
|
1b40618f02 | ||
|
|
58c78560fa | ||
|
|
1d1ec57909 | ||
|
|
fd9c83b65f | ||
|
|
6baddc7e26 | ||
|
|
e9580877b4 | ||
|
|
440649bb95 | ||
|
|
48846bc0ba | ||
|
|
558e1d2fb0 | ||
|
|
0b26047ea8 | ||
|
|
7f5a57f4af | ||
|
|
dc12cda505 | ||
|
|
b4cf6f7f36 | ||
|
|
f2f04407a4 | ||
|
|
8a11e3bac4 | ||
|
|
4879b0611a | ||
|
|
d11a67499d | ||
|
|
b3b8c78527 | ||
|
|
0bfa76251d | ||
|
|
a992a4325b | ||
|
|
c1225f3876 | ||
|
|
152836c907 | ||
|
|
e47a4ea514 | ||
|
|
52b6da1759 | ||
|
|
f13465012b | ||
|
|
b7b5dd5bea | ||
|
|
7265900c62 | ||
|
|
7a77298a60 | ||
|
|
0177e7558e | ||
|
|
719ea50d1a | ||
|
|
bbf1ea41b8 | ||
|
|
eb22f42fea | ||
|
|
dd32e74e34 | ||
|
|
e1b4a150c3 | ||
|
|
76d912c0ba | ||
|
|
a3c8e04ee6 | ||
|
|
bf9158172f | ||
|
|
b687180e12 | ||
|
|
47a11b9a7e | ||
|
|
b6ddb0a7cf | ||
|
|
acb7acd661 | ||
|
|
7c0d94ce9c | ||
|
|
763b3e806e | ||
|
|
b5264cacf0 | ||
|
|
f1552ef20d | ||
|
|
de7eeed916 | ||
|
|
93eabce1bc | ||
|
|
e693dd4923 | ||
|
|
7f9acac469 | ||
|
|
506d5b18de | ||
|
|
5110796591 | ||
|
|
eafeba9fed | ||
|
|
b7a1676b15 | ||
|
|
72b63e7b36 | ||
|
|
fe3fcef7a9 | ||
|
|
714b09ddcb | ||
|
|
1f65388118 | ||
|
|
64c8f67939 | ||
|
|
20fea3f49d | ||
|
|
2997448073 | ||
|
|
f7b35b968b | ||
|
|
74703e2a60 | ||
|
|
9d41c173df | ||
|
|
43ed744d46 | ||
|
|
e199e78a4f | ||
|
|
1c9b5fae5e | ||
|
|
2b23eb96fb | ||
|
|
bdcc7d966f | ||
|
|
ca765b857b | ||
|
|
978d0ff2e3 | ||
|
|
129870dbe8 | ||
|
|
d5e04dbcb5 | ||
|
|
c6e7bbe18b | ||
|
|
4630741c7c | ||
|
|
0b11b0e6bb | ||
|
|
39307856b5 | ||
|
|
2b4f7b1a86 | ||
|
|
e8329ad2c2 | ||
|
|
486d5afa68 | ||
|
|
6485a48d79 | ||
|
|
fe12687ec1 | ||
|
|
0024d9d283 | ||
|
|
b8d305b869 | ||
|
|
015ac2547e | ||
|
|
b54bd33332 | ||
|
|
bb9eca96a8 | ||
|
|
dec65732ce | ||
|
|
09e2aeaec4 | ||
|
|
94e1a8e0a4 | ||
|
|
5ed03945a0 | ||
|
|
d08f8e1a78 | ||
|
|
c191851ec0 | ||
|
|
a0e217b1dc | ||
|
|
e2a17ac31b | ||
|
|
cdfa7caaeb | ||
|
|
0cd21ebe7e | ||
|
|
b25f92b0c0 | ||
|
|
86d10d355f | ||
|
|
c4cf950863 | ||
|
|
6814cbf0df | ||
|
|
02c31cc867 | ||
|
|
03d19f2e70 | ||
|
|
abacf8e141 | ||
|
|
9f2c7c881c | ||
|
|
afead63381 | ||
|
|
231dfeee31 | ||
|
|
c77d00efe4 | ||
|
|
e3a931bf96 | ||
|
|
c59caa4b92 | ||
|
|
b4c23aba8e | ||
|
|
3f743887e7 | ||
|
|
dbf649225a | ||
|
|
949a62a0da | ||
|
|
a0cef07a0b | ||
|
|
f72a7e02e3 | ||
|
|
bec9214d0c | ||
|
|
f95da817c4 | ||
|
|
a4f2802306 | ||
|
|
334d925972 | ||
|
|
f851b37aa0 | ||
|
|
dde7dccef1 | ||
|
|
eac693e785 | ||
|
|
12869710de | ||
|
|
2798080f60 | ||
|
|
ff6fa2cfaf | ||
|
|
f818cc8f71 | ||
|
|
d7e9217695 | ||
|
|
b50b768852 | ||
|
|
330db1a54d | ||
|
|
77c3310711 | ||
|
|
6e99f84e91 | ||
|
|
689ebd8036 | ||
|
|
506b51f189 | ||
|
|
4636365e30 | ||
|
|
d0ab0e166c | ||
|
|
06b16aaa19 | ||
|
|
baa9dfe55a | ||
|
|
1b1ee6f0b8 | ||
|
|
f279a07586 | ||
|
|
3b78e97ad8 | ||
|
|
f942eb184a | ||
|
|
c1f0e1b68f | ||
|
|
5b05e103f4 | ||
|
|
7e5bd4ecdb | ||
|
|
c38d2e48cd | ||
|
|
66b6150027 | ||
|
|
9f8a9196d8 | ||
|
|
ceabad3253 | ||
|
|
14ac77e444 | ||
|
|
d23850ff98 | ||
|
|
3e4f3ff142 |
No files matched your search
@@ -13,3 +13,4 @@
|
||||
*.pyd binary
|
||||
*.cfg text eol=lf
|
||||
*.py text eol=lf
|
||||
*.jks binary
|
||||
+17
-6
@@ -1,7 +1,8 @@
|
||||
#eclipse
|
||||
/bin
|
||||
/.settings
|
||||
/.classpath
|
||||
**/bin
|
||||
**/.settings
|
||||
**/.classpath
|
||||
*.project
|
||||
|
||||
#In case people make their workspace in the repo
|
||||
/eclipse/
|
||||
@@ -14,9 +15,17 @@
|
||||
#gradle
|
||||
/build
|
||||
/.gradle
|
||||
/mdk/.gradle
|
||||
/mdk/build
|
||||
|
||||
#occupational hazards
|
||||
/projects/
|
||||
/projects/mcp/
|
||||
/projects/clean/
|
||||
/projects/forge/
|
||||
/projects/**/build/
|
||||
/projects/**/out/
|
||||
/projects/**/run/
|
||||
/projects/**/*.launch
|
||||
/repo/
|
||||
/buildSrc
|
||||
|
||||
@@ -26,7 +35,9 @@
|
||||
|
||||
# FML changelog
|
||||
changelog.txt
|
||||
/patches_old/
|
||||
/patches_old_bak/
|
||||
*.py
|
||||
*.7z
|
||||
/logs/
|
||||
|
||||
gradle.properties
|
||||
!/mdk/gradle.properties
|
||||
@@ -28,3 +28,11 @@ script:
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
# skip building travis on 1.13+ - it doesn't work there
|
||||
branches:
|
||||
except:
|
||||
- 1.13-pre
|
||||
- 1.13.x
|
||||
- 1.14.x
|
||||
- /^noci-.*$/
|
||||
+1
-1
@@ -10,7 +10,7 @@ alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptian
|
||||
of me taking over the project, who knows what Minecraft modding would be today.
|
||||
|
||||
Secondly, someone who has worked with me, and developed some of the core features
|
||||
that allow modding to he as functional, and as simple as it is, cpw. For developing
|
||||
that allow modding to be as functional, and as simple as it is, cpw. For developing
|
||||
FML, which stabelized the client and server modding ecosystem. As well as the base
|
||||
loading system that allows us to modify Minecraft's code as elegently as possible.
|
||||
|
||||
|
||||
Vendored
+8
-10
@@ -39,13 +39,11 @@ pipeline {
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('ciWriteBuildNumber') {
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue ciWriteBuildNumber'
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
script {
|
||||
env.MYGROUP = sh(returnStdout: true, script: './gradlew properties -q | grep "group:" | awk \'{print $2}\'').trim()
|
||||
env.MYARTIFACT = sh(returnStdout: true, script: './gradlew properties -q | grep "name:" | awk \'{print $2}\'').trim()
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +54,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, 'build/changelog_new.txt')
|
||||
writeChangelog(currentBuild, 'build/changelog.txt')
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
@@ -73,8 +71,8 @@ pipeline {
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} uploadArchives -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/${MYGROUP}.${MYARTIFACT}/${MYVERSION}'
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.forge/${MYVERSION}'
|
||||
}
|
||||
}
|
||||
stage('test_publish_pr') { //Publish to local repo to test full process, but don't include credentials so it can't sign/publish to maven
|
||||
@@ -85,14 +83,14 @@ pipeline {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} uploadArchives -PcrowdinKey=${CROWDIN}'
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
//archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true, onlyIfSuccessful: true, allowEmptyArchive: true
|
||||
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true, onlyIfSuccessful: true, allowEmptyArchive: true
|
||||
//junit 'build/test-results/*/*.xml'
|
||||
//jacoco sourcePattern: '**/src/*/java'
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
SoundSystem CodecIBXM Class License:
|
||||
|
||||
You are free to use this class for any purpose, commercial or otherwise.
|
||||
You may modify this class or source code, and distribute it any way you
|
||||
like, provided the following conditions are met:
|
||||
|
||||
1) You may not falsely claim to be the author of this class or any
|
||||
unmodified portion of it.
|
||||
2) You may not copyright this class or a modified version of it and then
|
||||
sue me for copyright infringement.
|
||||
3) If you modify the source code, you must clearly document the changes
|
||||
made before redistributing the modified source code, so other users know
|
||||
it is not the original code.
|
||||
4) You are not required to give me credit for this class in any derived
|
||||
work, but if you do, you must also mention my website:
|
||||
http://www.paulscode.com
|
||||
5) I the author will not be responsible for any damages (physical,
|
||||
financial, or otherwise) caused by the use if this class or any
|
||||
portion of it.
|
||||
6) I the author do not guarantee, warrant, or make any representations,
|
||||
either expressed or implied, regarding the use of this class or any
|
||||
portion of it.
|
||||
|
||||
Author: Paul Lamb
|
||||
http://www.paulscode.com
|
||||
|
||||
|
||||
This software is based on or using the IBXM library available from
|
||||
http://www.geocities.com/sunet2000/
|
||||
|
||||
|
||||
IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Minecraft Forge
|
||||
Copyright (c) 2016-2018.
|
||||
Copyright (c) 2016-2019.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
+2
-8
@@ -3,8 +3,8 @@ parts herein are licensed under the terms of the LGPL 2.1 found
|
||||
here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and
|
||||
copied below.
|
||||
|
||||
Homepage: http://MinecraftForge.net/
|
||||
http://github.com/MinecraftForge/MinecraftForge
|
||||
Homepage: http://minecraftforge.net/
|
||||
https://github.com/MinecraftForge/MinecraftForge
|
||||
|
||||
|
||||
A note on authorship:
|
||||
@@ -57,12 +57,6 @@ This software contains a partial repackaging of javaxdelta, a BSD licensed progr
|
||||
binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/
|
||||
authored by genman, heikok, pivot.
|
||||
The only changes are to replace some Trove collection types with standard Java collections, and repackaged.
|
||||
|
||||
This software contains potions of Paulscodee IBXM library, a BSD liceensed library for
|
||||
loading and playing IBXM formated auto. No modifications havee beeen made. The associated
|
||||
licenses can be found along side this one, or at
|
||||
https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/LICENSE-Paulscode%20IBXM%20Library.txt
|
||||
https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/LICENSE-Paulscode%20SoundSystem%20CodecIBXM.txt
|
||||
=========================================================================
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
# FML
|
||||
|
||||
Entrypoint : ```FMLServiceProvider.onLoad```
|
||||
|
||||
- Verify environment
|
||||
-- Check all libraries are present: ```accesstransformer```, ```coremod```, ```deobfuscator```
|
||||
-- Check versions are suitable: ```modlauncher```, ```accesstransformer```, ```coremod```, ```deobfuscator```
|
||||
- Find deobfuscated and patched MC
|
||||
-- If not found, trigger job to generate that (loaded later at FMLLaunchProvider.launch)
|
||||
|
||||
Injected arguments:
|
||||
|
||||
- ```mods``` : CSV list of mod files to load
|
||||
- ```modlist``` : JSON formatted list of mod files in a maven-like repository format
|
||||
|
||||
Entrypoint : ```FMLServiceProvider.initializer```
|
||||
- Setup paths
|
||||
-- ```mods``` folder
|
||||
-- ```config``` folder
|
||||
- FML config file read (JSON?)
|
||||
- Trigger initial loading
|
||||
|
||||
Entrypoint : ```FMLLaunchProvider.launch```
|
||||
- Launches the patched and deobfuscated game
|
||||
- - If that wasn't found it'll be generated from the vanilla jar and patch/deobf files (see above)
|
||||
- Possible we'll use an alternative launch for the development environment
|
||||
|
||||
(A goal is that we pre-generate this JAR during forge installation or modpack installation)
|
||||
|
||||
## Loading
|
||||
|
||||
- First we discover all mods
|
||||
- - IModLocator instances present in system are found and queried to compile a master list of all mod artifacts of the three types
|
||||
- LANGPROVIDERs are added to the supported language system : IModLanguageProvider
|
||||
- The MODS from the list have their META-INF/mods.json file queried for mod instances to load
|
||||
- - MODS are cross-referenced for their language being available
|
||||
- - MODS are cross-referenced for their libraries being available
|
||||
- - MODS are cross-referenced for their MOD dependencies being available
|
||||
- - MODS with META-INF/coremods.json specification are loaded into the COREMOD system
|
||||
- - MODS with META-INF/accesstransformer.json are loaded into the ACCESSTRANSFORMER system
|
||||
- - MODS are enqueued to the background loading system
|
||||
- FMLLaunchProvider will be triggered from the ModLauncher to start the game
|
||||
|
||||
## Game loading
|
||||
|
||||
- Events triggered from loadGame will launch various phases of modloading as before
|
||||
-- Deprecation of old "FML" events in favour of Forge events
|
||||
-- If a mod hasn't completed scanning there might be a pause waiting for it to complete before loading (testing indicates this should be a very rare occurrence and isn't worse than existing status quo where all scanning and loading is on-thread)
|
||||
|
||||
### ```IModLocator```
|
||||
|
||||
Finds mods from various sources of various types
|
||||
manifest is queried for type: FMLModType
|
||||
|
||||
- MOD : this file will be scanned as a mod. This is default if nothing is present
|
||||
- LIBRARY : this file will be added to the classpath and no further processing is done
|
||||
- LANGPROVIDER : this file will be loaded as a language provider
|
||||
|
||||
#### ```ModsFolderLocator```
|
||||
|
||||
- scans for jar files from mods folder
|
||||
-- able to load all types
|
||||
-- loads in all environments
|
||||
-- maybe able to do runtime name transformation for dev time?
|
||||
|
||||
Standard mechanism to find and load mods
|
||||
|
||||
#### ```ExplodedDirectoryLocator```
|
||||
|
||||
- loads a directory as a mod
|
||||
-- only able to load mods
|
||||
-- should only load in dev env
|
||||
|
||||
Intended as a mechanism to allow development of mods easily by pointing at a compiled output directory
|
||||
|
||||
#### ```ArgumentModsLocator``` : NYI
|
||||
|
||||
- loads mods from the arguments on the command line
|
||||
-- able to load all types
|
||||
-- loads in all environments
|
||||
|
||||
### ```IModLanguageProvider```
|
||||
|
||||
Provides mod and language provider services
|
||||
|
||||
- Provides a means to transform a Mod File (from the IModLocator) into a list of modcontainer objects based on mods.json
|
||||
- Scanning work will be done in background threads
|
||||
- Language providers can be provided as JARs via the modlocator for ease of distribution
|
||||
|
||||
#### ```FMLModLanguageProvider```
|
||||
|
||||
This is the standard Java @Mod implementation provider
|
||||
|
||||
- provided by default (always supported)
|
||||
- All scanning for @Mod will be done in the background thread
|
||||
|
||||
#### ```ScalaModLanguageProvider```
|
||||
|
||||
This is the scala language provider. It'll be provided separately as a JAR mod download.
|
||||
|
||||
- API contract will need definition
|
||||
|
||||
Other languages? Kotlin? Alternative Scala versions? Javascript?
|
||||
|
||||
## Coremods
|
||||
|
||||
Coremods are now forcefully separated into _injection_ and _runtime_ phases.
|
||||
|
||||
### Injection
|
||||
|
||||
Injection is the act of intercepting the loading of a class and modifying the inbound class with alterations such as additions, replacements and deletions
|
||||
|
||||
Injections will be written using Javascript. Two functions are required: a function providing the list of injection sites, and the function to transform the injection site.
|
||||
|
||||
All injection sites will need to be pre-specified by the coremod in their metadata. Lookup services should be provided in the Javascript API.
|
||||
|
||||
Javascript API for common coremod injection tasks needs to be developed, to allow common best-practice tooling for these complex tasks.
|
||||
|
||||
Runtime coremod code (code that has been injected) is Java as usual.
|
||||
|
||||
## Background loading thread
|
||||
|
||||
Early in loading, a background thread is triggered which will perform scanning tasks for common resources, such as @Mod instances and other annotations. This thread will also be responsible for loading any cached resources, either those defined at build time or pre-computed from previous runs. It may also be tasked with writing those precomputed resources.
|
||||
|
||||
There will be a IPreLoaderJobProvider that will allow extension of the scope of these tasks
|
||||
|
||||
|
||||
+996
-422
File diff suppressed because it is too large.
Load diff
Vendored
BIN
Binary file not shown.
+1
-2
@@ -1,6 +1,5 @@
|
||||
#Mon Sep 14 12:28:28 PDT 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -6,47 +6,6 @@
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
@@ -90,7 +89,7 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
@@ -114,6 +113,7 @@ fi
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
@@ -154,11 +154,19 @@ if $cygwin ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+4
-10
@@ -8,14 +8,14 @@
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -46,10 +46,9 @@ echo location of your Java installation.
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
@@ -60,11 +59,6 @@ set _SKIP=2
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
@@ -1,430 +0,0 @@
|
||||
|
||||
Build 2838:
|
||||
bs2609: Fix vanilla handling of options file (MC-117449, MC-151173) (#5725)
|
||||
|
||||
Build 2837:
|
||||
clienthax: Update EnumHelper to be compatible with Eclipse's OpenJ9 JVM. (#5712)
|
||||
|
||||
Build 2836:
|
||||
tterrag:
|
||||
Revert "Invalidate tile entities that are queued for removal (#5512)"
|
||||
This reverts commit 75788f63eea6c33ccef7e5cbcab27ad9ad2c2a04.
|
||||
This solution is invalid as TEs are free to modify the world
|
||||
tileEntities list, usually indirectly via chunkloading, from inside
|
||||
invalidate().
|
||||
This happens in vanilla, in TileEntityChest#invalidate, where it calls
|
||||
checkForAdjacentChests(), which has the potential to load neighboring
|
||||
chunks and cause a CME.
|
||||
A more sophisticated solution is needed.
|
||||
|
||||
Build 2835:
|
||||
bs2609: Fix some vertex format changes not being handled correctly (#5368)
|
||||
|
||||
Build 2834:
|
||||
bs2609:
|
||||
Transform vertex normals as well as positions when generating quads
|
||||
(#5242)
|
||||
|
||||
Build 2833:
|
||||
rseifert.phone: Fix for SidedInvWrapper isItemValid using wrong slot (#5642)
|
||||
|
||||
Build 2832:
|
||||
bs2609: Invalidate tile entities that are queued for removal (#5512)
|
||||
|
||||
Build 2831:
|
||||
lclc98: Added Wool to OreDictionary (#5414)
|
||||
|
||||
Build 2830:
|
||||
CreativeMD: Fixed boat not taking care of block-liquid hooks (#5086)
|
||||
|
||||
Build 2829:
|
||||
bs2609: Add Forge dimension-changing hooks to spectator handling code (#5212)
|
||||
|
||||
Build 2828:
|
||||
ichttt:
|
||||
Minor performace improvement when building chunks and rendering blocks
|
||||
(#5286)
|
||||
|
||||
Build 2827:
|
||||
bs2609: Catch json parsing errors from constants/factories files (#5258)
|
||||
|
||||
Build 2826:
|
||||
bs2609: Allow custom DataSerializers to be registered safely (#5245)
|
||||
|
||||
Build 2825:
|
||||
cpw:
|
||||
Try and make 1.13 mods more obviously wrong in 1.12..
|
||||
Signed-off-by: cpw <[email protected]>
|
||||
|
||||
Build 2824:
|
||||
tterrag: Fix #5651 Re-add canPlaceBlockOnSide check in World#mayPlace
|
||||
|
||||
Build 2823:
|
||||
Pokechu022:
|
||||
Fail fast when null is used with setTag instead of crashing in
|
||||
writeEntry (#5257)
|
||||
|
||||
Build 2822:
|
||||
tterrag: Fix block placement not checking for player collision
|
||||
|
||||
Build 2821:
|
||||
wynprice999: Added more Constants (#5323)
|
||||
|
||||
Build 2820:
|
||||
python0429: [1.12.2] Add a few events pertaining to villages (#5302)
|
||||
|
||||
Build 2819:
|
||||
Tyler Hancock: [1.12] Fix special spawn event not firing in many cases. (#5389)
|
||||
|
||||
Build 2818:
|
||||
bs2609: Only prompt for missing registries on local worlds (#5348)
|
||||
|
||||
Build 2817:
|
||||
ckrier.3000: Add EntityPlaceEvent (#5057)
|
||||
|
||||
Build 2816:
|
||||
bs2609: Generalise EnumRarity to an interface (#5182)
|
||||
|
||||
Build 2815:
|
||||
bs2609: Apply access-level changes to inner class attributes (#5468)
|
||||
|
||||
Build 2814:
|
||||
bs2609: Fix small logic error in ItemTextureQuadConverter (#5463)
|
||||
|
||||
Build 2813:
|
||||
bs2609: Better support for custom bows (#5209)
|
||||
|
||||
Build 2812:
|
||||
CovertJaguar: Remove FluidStack amount from hashcode calculation (#5272)
|
||||
molecularphylo:
|
||||
Fixed incorrect string representation of string list config property
|
||||
default values in their comments.
|
||||
bs2609:
|
||||
Improve tracking of used dimension IDs (#5249)
|
||||
Closes #5378 Large dimension IDs bloat level.data
|
||||
|
||||
Build 2811:
|
||||
bs2609:
|
||||
Fix up torch placement logic to handle more vanilla special-casing
|
||||
(#5426)
|
||||
|
||||
Build 2810:
|
||||
LexManos: Written size does not include int bytes.
|
||||
|
||||
Build 2809:
|
||||
LexManos:
|
||||
Extend Region files to support >1MB per chunk. If the 'sector count' is
|
||||
255, ask the compressed data header for the proper length.
|
||||
|
||||
Build 2808:
|
||||
tterrag1098: Add default impl to IConfigElement#getValidValuesDisplay
|
||||
|
||||
Build 2807:
|
||||
tterrag: Simplify custom item rendering by removing GL emissivity hacks
|
||||
|
||||
Build 2806:
|
||||
tterrag: Support diffuse lighting flag in item rendering
|
||||
|
||||
Build 2805:
|
||||
bs2609:
|
||||
Add a hook to allow continuously using items through stack changes
|
||||
(#4834)
|
||||
* Add a hook to allow continuously using items through stack changes
|
||||
|
||||
* Update licences
|
||||
|
||||
Build 2804:
|
||||
oOMitchOo:
|
||||
Added an additional constructor to every implementation of IFluidBlock.
|
||||
It is now possible to create a fluid block with a Fluid, Material and
|
||||
MapColor, so that the Material's MapColor isn't used for the blocks
|
||||
MapColor. (#5293)
|
||||
|
||||
Build 2803:
|
||||
bs2609: Add redirects to PotionEffect to respect registry replacement (#5213)
|
||||
|
||||
Build 2802:
|
||||
alexiy.ov:
|
||||
Add an annotation for @Config elements which will automatically create a
|
||||
slider control (#5026)
|
||||
|
||||
Build 2801:
|
||||
bs2609: Fix small logic error in emissive item rendering code (#5320)
|
||||
|
||||
Build 2800:
|
||||
molecularphylo:
|
||||
Allow config GUI cycling button elements generated from enums to display
|
||||
toString return values, rather than actual values. (#5125)
|
||||
|
||||
Build 2799:
|
||||
bs2609: Fix incorrect indexing in mipmap generation code (#5201)
|
||||
|
||||
Build 2798:
|
||||
bs2609:
|
||||
Ensure slave maps are cleaned up when handling registry overrides
|
||||
(#5250)
|
||||
|
||||
Build 2797:
|
||||
d_scalzi: Fix issue with --modListFile. (#5316)
|
||||
|
||||
Build 2796:
|
||||
LexManos:
|
||||
Fix potential issues with the Minecraft FakePlayer lingering around
|
||||
after world unloads.
|
||||
|
||||
Build 2795:
|
||||
tterrag: Fix potion remove event not always firing, add expiry event
|
||||
|
||||
Build 2794:
|
||||
tterrag: Clean up CraftingHelper constants loading API
|
||||
|
||||
Build 2793:
|
||||
tterrag: Fix crash from CraftingHelper due to FileSystem being closed early
|
||||
|
||||
Build 2792:
|
||||
tterrag:
|
||||
added PotionHooks, closes #3867, #4375 (#4614)
|
||||
* solved merge confilct
|
||||
|
||||
* improved var names & removed tabs
|
||||
|
||||
* Added spaces around !=
|
||||
|
||||
* fixed typo
|
||||
|
||||
Build 2791:
|
||||
tterrag:
|
||||
Add a hook for farmland watering (#4891)
|
||||
* Add a FarmlandWaterCheckEvent to allow mods to override when Farmland
|
||||
is watered or not
|
||||
|
||||
* revert 1.12.2 json
|
||||
|
||||
* Move the farmland patch to a ticket based instead of a event based
|
||||
system
|
||||
|
||||
* Minor changes
|
||||
|
||||
* Faster isValid checks, faster validation/invalidation if the state did
|
||||
not change, expand test mod to include a test for the validation system
|
||||
|
||||
* remove isValid boolean flag, we can express it with the tick counter
|
||||
|
||||
* Fix test mod resource warnings
|
||||
|
||||
* Remove tick timeout, add a javadoc note to invalidate on chunk unload,
|
||||
cleaned up test mod
|
||||
|
||||
* Allow mods to provide custom handling to determine if a pos is valid
|
||||
or not
|
||||
|
||||
* Make SimpleTicket more simple, make register public so custom tickets
|
||||
can be registered
|
||||
|
||||
* Fixes for review
|
||||
|
||||
* Add missing license headers
|
||||
|
||||
* Use a weak hash set
|
||||
|
||||
* Split up the map into smaller chunk based maps
|
||||
|
||||
* Add missing license headers
|
||||
|
||||
* Make MultiTicketManager more universal for custom implementations,
|
||||
cleanup imports
|
||||
|
||||
Build 2790:
|
||||
tterrag:
|
||||
Add methods to allow loading json constants outside of _constants
|
||||
(#4975)
|
||||
* add interface methods for loading json constants from an arbitary file
|
||||
|
||||
|
||||
* use try-with-resources
|
||||
|
||||
* don't make modders create jsoncontext, clean up resource use
|
||||
|
||||
* very minor cleanup
|
||||
|
||||
Build 2789:
|
||||
tterrag:
|
||||
Compute ASMDataTable submaps parallel, speeds up contructing mods
|
||||
(#5246)
|
||||
* Compute submaps parallel, speeds up contructing mods by a lot
|
||||
|
||||
* Use stream API better
|
||||
|
||||
Build 2788:
|
||||
mezz: Add logging for data manager key registration errors (#5129)
|
||||
|
||||
Build 2787:
|
||||
mezz: Improve support for custom block path types (#5203)
|
||||
|
||||
Build 2786:
|
||||
mezz: Fix missing comments in configs created with annotations (#5189)
|
||||
|
||||
Build 2785:
|
||||
mezz: Allow items to control the rate of repair from mending (#5102)
|
||||
|
||||
Build 2784:
|
||||
mezz: Improve exception handling from server starting events (#5226)
|
||||
|
||||
Build 2783:
|
||||
mezz: Improve context provided by potion icon rendering hooks (#5111)
|
||||
|
||||
Build 2782:
|
||||
mezz: Fix an ObjectHolderRef internal error message (#5214)
|
||||
|
||||
Build 2781:
|
||||
mezz: Implement rendering for item models with emissive quads (#5047)
|
||||
|
||||
Build 2780:
|
||||
mezz: Clean up logged mod states (#5227)
|
||||
mezz: Fix minor issue in getFilledPercentage for Fluid rendering (#5206)
|
||||
|
||||
Build 2779:
|
||||
mezz: Improve reflection helper methods (#4853)
|
||||
mezz: Fix inaccurate main thread name shown in client log (#5078)
|
||||
|
||||
Build 2778:
|
||||
mezz: Fix Baked Item models with transformations (#5241)
|
||||
|
||||
Build 2777:
|
||||
mezz:
|
||||
Re-add some missing villager profession patches (#5200)
|
||||
* Fix zombie villagers only spawning with vanilla professions
|
||||
* Fix spawning modded villagers that do not have their own building
|
||||
mezz: Fix missing string parameters in some log messages (#5210)
|
||||
mezz: Stop firing LivingSetAttackTargetEvent for setRevengeTarget (#5217)
|
||||
mezz: Prevent RecipeBook from crashing on empty modded ingredients (#5234)
|
||||
|
||||
Build 2776:
|
||||
mezz: Fix the bed position given to the SleepingTimeCheck event (#5107)
|
||||
|
||||
Build 2775:
|
||||
LexManos: Fix some null returns from defaulted registries (#5235)
|
||||
|
||||
Build 2774:
|
||||
LexManos:
|
||||
Only remove synthetic lambda methods referenced in body of SideOnly
|
||||
methods (#5127)
|
||||
|
||||
Build 2773:
|
||||
LexManos:
|
||||
A different approach to my changes in
|
||||
https://github.com/MinecraftForge/MinecraftForge/commit/8ace535995522bec0557d4217e0d98b3dc76cf1e
|
||||
to fix #5207
|
||||
LexManos: Fix patches from #5160 setting rotation as well as position (#5233)
|
||||
LexManos: Use HTTPS for files website.
|
||||
|
||||
Build 2772:
|
||||
tterrag: Make Forge-provided default transforms accessible to custom models
|
||||
tterrag:
|
||||
Make Forge blockstate variants correctly inherit AO setting from vanilla
|
||||
models (#5190)
|
||||
* Make Forge blockstate variants correctly inherit AO setting
|
||||
|
||||
* Move variant format checks into variant, check for added properties
|
||||
|
||||
* Small code cleanup
|
||||
tterrag: fixed visual bug with guislider
|
||||
tterrag:
|
||||
Allow IModel to express itself as a vanilla parent (#5195)
|
||||
* Fix errors caused by fancy missing model being non-vanilla parent
|
||||
|
||||
* Switch instanceof checks to a default IModel method
|
||||
|
||||
* Small code tweaks
|
||||
|
||||
Build 2771:
|
||||
tterrag: Add CreativeTabs#getLabelColor
|
||||
|
||||
Build 2770:
|
||||
tterrag:
|
||||
Allow providing a BufferedImage for banner render generation (#5041)
|
||||
* Adds an Event to allow providing a BufferedImage for the banner render
|
||||
generation (cached)
|
||||
textures, since banners don't use an atlas.
|
||||
implementation.
|
||||
|
||||
* Missed some copyright; might as well absolut text match, I guess
|
||||
|
||||
* Remove unneeded patch change
|
||||
|
||||
* Fix event variable access convention
|
||||
|
||||
* Formatting fix
|
||||
|
||||
* Improve event handling registration
|
||||
|
||||
* Import cleanup
|
||||
|
||||
* Replace event approach with Supplier approach
|
||||
|
||||
* Better name for test mod (now that it's no longer an event); adds
|
||||
ENABLE flag
|
||||
|
||||
* Moves MC code into
|
||||
net.minecraftforge.client.MinecraftForgeClient.getImageLayer to simplify
|
||||
patch
|
||||
|
||||
* Generalize naming
|
||||
|
||||
Build 2769:
|
||||
mezz: Fix Mesa biome entry tags in the BiomeDictionary (#5177)
|
||||
|
||||
Build 2768:
|
||||
LexManos: Bump version number for RB.
|
||||
|
||||
Build 2767:
|
||||
LexManos:
|
||||
Change biome spawn list entries to use factory method where possible
|
||||
(#5075)
|
||||
LexManos: Prevent some texture loading errors from crashing the game (#5121)
|
||||
LexManos: Patch PotionHelper to use registry delegates (#5142)
|
||||
LexManos: Add a notification event for handling game rule changes (#5152)
|
||||
|
||||
Build 2766:
|
||||
LexManos:
|
||||
Change universal bucket support to use fluid names instead of instances
|
||||
(#5031)
|
||||
|
||||
Build 2765:
|
||||
LexManos: Fix NPE on clientside entities constructed with null world (#5170)
|
||||
|
||||
Build 2764:
|
||||
tterrag: Fix patches from #5160 running on the client and causing stutter
|
||||
|
||||
Build 2763:
|
||||
LexManos:
|
||||
Class transformer optimizations (#5159)
|
||||
* Filter packages for deobf transformation
|
||||
* Only serialize transformed class with TerminalTransformer if bytecode
|
||||
changed
|
||||
|
||||
Build 2762:
|
||||
github: Update github stale so issues can be Assigned
|
||||
|
||||
Build 2761:
|
||||
LexManos:
|
||||
Fix MC-136995 - Chunk loading and unloading issue with entities placed
|
||||
in exact positions. (#5160)
|
||||
Scatter gun patches to improve entity tracking and position tracking.
|
||||
Provided by Aikar through the Paper project, this commit of patches
|
||||
combines the following patches:
|
||||
|
||||
https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch
|
||||
|
||||
https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0315-Always-process-chunk-registration-after-moving.patch
|
||||
|
||||
https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0335-Ensure-chunks-are-always-loaded-on-hard-position-set.patch
|
||||
|
||||
https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0378-Sync-Player-Position-to-Vehicles.patch
|
||||
|
||||
Build 2760:
|
||||
LexManos: Fix --mods and --modListFile arguments not making it past LaunchWrapper.
|
||||
|
||||
Build 2759:
|
||||
LexManos: Remove BlamingTransformer (#5115)
|
||||
|
||||
+12
-21
@@ -19,35 +19,26 @@ http://mcforge.readthedocs.io/en/latest/gettingstarted/
|
||||
|
||||
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
|
||||
|
||||
Step 2: Once you have a command window up in the folder that the downloaded material was placed, type:
|
||||
Step 2: You're left with a choice.
|
||||
If you prefer to use Eclipse:
|
||||
1. Run the following command: "gradlew genEclipseRuns" (./gradlew genEclipseRuns if you are on Mac/Linux)
|
||||
2. Open Eclipse, Import > Existing Gradle Project > Select Folder
|
||||
or run "gradlew eclipse" to generate the project.
|
||||
(Current Issue)
|
||||
4. Open Project > Run/Debug Settings > Edit runClient and runServer > Environment
|
||||
5. Edit MOD_CLASSES to show [modid]%%[Path]; 2 times rather then the generated 4.
|
||||
|
||||
Windows: "gradlew setupDecompWorkspace"
|
||||
Linux/Mac OS: "./gradlew setupDecompWorkspace"
|
||||
|
||||
Step 3: After all that finished, you're left with a choice.
|
||||
For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux)
|
||||
|
||||
If you prefer to use IntelliJ, steps are a little different.
|
||||
If you prefer to use IntelliJ:
|
||||
1. Open IDEA, and import project.
|
||||
2. Select your build.gradle file and have it import.
|
||||
3. Once it's finished you must close IntelliJ and run the following command:
|
||||
|
||||
"gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux)
|
||||
|
||||
Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project)
|
||||
3. Run the following command: "gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux)
|
||||
4. Refresh the Gradle Project in IDEA if required.
|
||||
|
||||
If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again.
|
||||
|
||||
Should it still not work,
|
||||
Refer to #ForgeGradle on EsperNet for more information about the gradle environment.
|
||||
|
||||
Tip:
|
||||
If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following:
|
||||
"setupDevWorkspace": Will patch, deobfuscate, and gather required assets to run minecraft, but will not generate human readable source code.
|
||||
"setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work.
|
||||
|
||||
Tip:
|
||||
When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE.
|
||||
or the Forge Project Discord discord.gg/UvedJ9m
|
||||
|
||||
Forge source installation
|
||||
=========================
|
||||
|
||||
+105
-51
@@ -1,77 +1,131 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = "https://files.minecraftforge.net/maven" }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = '1.0'
|
||||
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'modid'
|
||||
|
||||
version = "1.0"
|
||||
group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "modid"
|
||||
|
||||
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
compileJava {
|
||||
sourceCompatibility = targetCompatibility = '1.8'
|
||||
}
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
|
||||
minecraft {
|
||||
version = "@VERSION@"
|
||||
runDir = "run"
|
||||
|
||||
// the mappings can be changed at any time, and must be in the following format.
|
||||
// snapshot_YYYYMMDD snapshot are built nightly.
|
||||
// stable_# stables are built at the discretion of the MCP team.
|
||||
// The mappings can be changed at any time, and must be in the following format.
|
||||
// snapshot_YYYYMMDD Snapshot are built nightly.
|
||||
// stable_# Stables are built at the discretion of the MCP team.
|
||||
// Use non-default mappings at your own risk. they may not always work.
|
||||
// simply re-run your setup task after changing the mappings to update your workspace.
|
||||
mappings = "@MAPPINGS@"
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
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')
|
||||
|
||||
// Default run configurations.
|
||||
// These can be tweaked, removed, or duplicated as needed.
|
||||
runs {
|
||||
client {
|
||||
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'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
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'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// you may put jars on which you depend on in ./libs
|
||||
// or you may define them like so..
|
||||
//compile "some.group:artifact:version:classifier"
|
||||
//compile "some.group:artifact:version"
|
||||
|
||||
// real examples
|
||||
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
||||
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||
minecraft '@FORGE_GROUP@:@FORGE_NAME@:@FORGE_VERSION@'
|
||||
|
||||
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
|
||||
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
// You may put jars on which you depend on in ./libs or you may define them like so..
|
||||
// compile "some.group:artifact:version:classifier"
|
||||
// compile "some.group:artifact:version"
|
||||
|
||||
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
|
||||
// except that these dependencies get remapped to your current MCP mappings
|
||||
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
// Real examples
|
||||
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
||||
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
||||
|
||||
// for more info...
|
||||
// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
|
||||
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
|
||||
// These dependencies get remapped to your current MCP mappings
|
||||
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
|
||||
// For more info...
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
|
||||
}
|
||||
|
||||
processResources {
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else except the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
// Example for how to get properties into the manifest for reading by the runtime..
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"Specification-Title": "examplemod",
|
||||
"Specification-Vendor": "examplemodsareus",
|
||||
"Specification-Version": "1", // We are version 1 of ourselves
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${version}",
|
||||
"Implementation-Vendor" :"examplemodsareus",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish task
|
||||
// we define a custom artifact that is sourced from the reobfJar output task
|
||||
// and then declare that to be published
|
||||
// Note you'll need to add a repository here
|
||||
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
||||
def reobfArtifact = artifacts.add('default', reobfFile) {
|
||||
type 'jar'
|
||||
builtBy 'reobfJar'
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact reobfArtifact
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
Binary file not shown.
-4
@@ -1,4 +0,0 @@
|
||||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
version=1
|
||||
eclipse.preferences.version=1
|
||||
refresh.enabled=true
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
#Sun Jun 05 19:03:53 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.debug.ui.UseContextualLaunch=false
|
||||
Console.highWaterMark=88000
|
||||
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
|
||||
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.jdt.ui.JavaPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
|
||||
StringVariablePreferencePage=130,107,107,86,
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.epp.usagedata.gathering.enabled=false
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
#Sun Sep 18 16:44:39 NZST 2011
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
#Sun Jun 05 18:58:05 CEST 2011
|
||||
spacesForTabs=true
|
||||
eclipse.preferences.version=1
|
||||
overviewRuler_migration=migrated_3.1
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
IMPORT_FILES_AND_FOLDERS_MODE=prompt
|
||||
IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt
|
||||
SAVE_ALL_BEFORE_BUILD=true
|
||||
eclipse.preferences.version=1
|
||||
tipsAndTricks=true
|
||||
platformState=1287081747687
|
||||
quickStart=false
|
||||
PROBLEMS_FILTERS_MIGRATE=true
|
||||
@@ -1,3 +0,0 @@
|
||||
#Sun Jun 05 18:50:08 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
showIntro=false
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/MDKExample"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStart"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MDKExample"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}/run"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/MDKExample"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStartServer"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MDKExample"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}/run"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchHistory>
|
||||
<launchGroup id="org.eclipse.ui.externaltools.launchGroup">
|
||||
<mruHistory/>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.profile">
|
||||
<mruHistory/>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">
|
||||
<mruHistory>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Client"/> "/>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Server"/> "/>
|
||||
</mruHistory>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.run">
|
||||
<mruHistory>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Client"/> "/>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Server"/> "/>
|
||||
</mruHistory>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
</launchHistory>
|
||||
@@ -20,3 +20,6 @@ build
|
||||
# other
|
||||
eclipse
|
||||
run
|
||||
|
||||
# Files from Forge MDK
|
||||
forge*changelog.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
@@ -1,31 +1,84 @@
|
||||
package com.example.examplemod;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.InterModComms;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(modid = ExampleMod.MODID, name = ExampleMod.NAME, version = ExampleMod.VERSION)
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@Mod("examplemod")
|
||||
public class ExampleMod
|
||||
{
|
||||
public static final String MODID = "examplemod";
|
||||
public static final String NAME = "Example Mod";
|
||||
public static final String VERSION = "1.0";
|
||||
// Directly reference a log4j logger.
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
private static Logger logger;
|
||||
public ExampleMod() {
|
||||
// Register the setup method for modloading
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
|
||||
// Register the enqueueIMC method for modloading
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
|
||||
// Register the processIMC method for modloading
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
|
||||
// Register the doClientStuff method for modloading
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
logger = event.getModLog();
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
private void setup(final FMLCommonSetupEvent event)
|
||||
{
|
||||
// some example code
|
||||
logger.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
|
||||
// some preinit code
|
||||
LOGGER.info("HELLO FROM PREINIT");
|
||||
LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
|
||||
}
|
||||
|
||||
private void doClientStuff(final FMLClientSetupEvent event) {
|
||||
// do something that can only be done on the client
|
||||
LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings);
|
||||
}
|
||||
|
||||
private void enqueueIMC(final InterModEnqueueEvent event)
|
||||
{
|
||||
// some example code to dispatch IMC to another mod
|
||||
InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
|
||||
}
|
||||
|
||||
private void processIMC(final InterModProcessEvent event)
|
||||
{
|
||||
// some example code to receive and process InterModComms from other mods
|
||||
LOGGER.info("Got IMC {}", event.getIMCStream().
|
||||
map(m->m.getMessageSupplier().get()).
|
||||
collect(Collectors.toList()));
|
||||
}
|
||||
// You can use SubscribeEvent and let the Event Bus discover methods to call
|
||||
@SubscribeEvent
|
||||
public void onServerStarting(FMLServerStartingEvent event) {
|
||||
// do something when the server starts
|
||||
LOGGER.info("HELLO from server starting");
|
||||
}
|
||||
|
||||
// You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
|
||||
// Event bus for receiving Registry Events)
|
||||
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
|
||||
public static class RegistryEvents {
|
||||
@SubscribeEvent
|
||||
public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
|
||||
// register a new block here
|
||||
LOGGER.info("HELLO from Register Block");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
# This is an example mods.toml file. It contains the data relating to the loading mods.
|
||||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
||||
# The overall format is standard TOML format, v0.5.0.
|
||||
# Note that there are a couple of TOML lists in this file.
|
||||
# Find more information on toml format here: https://github.com/toml-lang/toml
|
||||
# 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)
|
||||
# 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
|
||||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId="examplemod" #mandatory
|
||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||
version="${file.jarVersion}" #mandatory
|
||||
# A display name for the mod
|
||||
displayName="Example Mod" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
||||
updateJSONURL="http://myurl.me/" #optional
|
||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||
displayURL="http://example.com/" #optional
|
||||
# A file name (in the root of the mod JAR) containing a logo for display
|
||||
logoFile="examplemod.png" #optional
|
||||
# A text field displayed in the mod UI
|
||||
credits="Thanks for this example mod goes to Java" #optional
|
||||
# A text field displayed in the mod UI
|
||||
authors="Love, Cheese and small house plants" #optional
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
description='''
|
||||
This is a long form description of the mod. You can write whatever you want here
|
||||
|
||||
Have some lorem ipsum.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
'''
|
||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||
[[dependencies.examplemod]] #optional
|
||||
# the modid of the dependency
|
||||
modId="forge" #mandatory
|
||||
# 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
|
||||
# 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
|
||||
side="BOTH"
|
||||
# Here's another dependency
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.13.2]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
@@ -1,16 +0,0 @@
|
||||
[
|
||||
{
|
||||
"modid": "examplemod",
|
||||
"name": "Example Mod",
|
||||
"description": "Example placeholder mod.",
|
||||
"version": "${version}",
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
"authorList": ["ExampleDude"],
|
||||
"credits": "The Forge and FML guys, for making this example",
|
||||
"logoFile": "",
|
||||
"screenshots": [],
|
||||
"dependencies": []
|
||||
}
|
||||
]
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "examplemod resources",
|
||||
"pack_format": 3,
|
||||
"_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)."
|
||||
"pack_format": 4,
|
||||
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
# The name of the mod loader type to load
|
||||
modLoader="javafml"
|
||||
# A version range to match for said mod loader
|
||||
loaderVersion="[2.0,)"
|
||||
# A URL to query for updates
|
||||
updateJSONURL="http://myurl.me/"
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
issueTrackerURL="http://my.issue.tracker/"
|
||||
# Extra mod loader property
|
||||
randomScalaProperty="fishy"
|
||||
# Arbitrary key-value property pairs available to mods
|
||||
[properties]
|
||||
key="value"
|
||||
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
[[mods]]
|
||||
# The modid of the mod
|
||||
modId="inventorysorter"
|
||||
# The version number of the mod
|
||||
version="1.1"
|
||||
# A display name for the mod
|
||||
displayName="Inventory Sorter"
|
||||
# The description text for the mod (multi line!)
|
||||
description='''
|
||||
This is my mod, there may be
|
||||
others, but this one is mine
|
||||
'''
|
||||
# Override the default resourcelocation namespace with this instead
|
||||
# Currently not implemented
|
||||
namespace="invsorter"
|
||||
# A random extra property for a mod loader
|
||||
randomExtraProperty="somevalue"
|
||||
# Arbitrary key-value pairs
|
||||
[modproperties.inventorysorter]
|
||||
key="value"
|
||||
# A list of dependencies
|
||||
[[dependencies.inventorysorter]]
|
||||
# the modid of the dependency
|
||||
modid="forge"
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory=true
|
||||
# The version range of the dependency
|
||||
versionRange="[14.23.2.0,)"
|
||||
# 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
|
||||
side="BOTH"
|
||||
# Here's another dependency
|
||||
[[dependencies.inventorysorter]]
|
||||
modid="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.12.2]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
# Here's another mod in this jar
|
||||
[[mods]]
|
||||
# Note that other mod types may want to add additional key-value pairs in here
|
||||
modId="inventorysortertoo"
|
||||
# ${file.jarVersion} will read the Implementation-Version of the jar file
|
||||
version="${file.jarVersion}"
|
||||
displayName="Inventory Sorter as well"
|
||||
description='''
|
||||
This is also my mod, there may be
|
||||
others, but this one is mine
|
||||
'''
|
||||
@@ -0,0 +1,24 @@
|
||||
--- 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,14 @@
|
||||
--- 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);
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/advancements/AdvancementManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/advancements/AdvancementManager.java
|
||||
@@ -66,6 +66,7 @@
|
||||
field_192784_c.func_192087_a();
|
||||
Map<ResourceLocation, Advancement.Builder> map = this.func_192781_c();
|
||||
this.func_192777_a(map);
|
||||
+ this.field_193768_e |= net.minecraftforge.common.ForgeHooks.loadAdvancements(map);
|
||||
field_192784_c.func_192083_a(map);
|
||||
|
||||
for (Advancement advancement : field_192784_c.func_192088_b())
|
||||
@@ -1,11 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/advancements/AdvancementRewards.java
|
||||
+++ ../src-work/minecraft/net/minecraft/advancements/AdvancementRewards.java
|
||||
@@ -49,7 +49,7 @@
|
||||
public void func_192113_a(final EntityPlayerMP p_192113_1_)
|
||||
{
|
||||
p_192113_1_.func_71023_q(this.field_192115_b);
|
||||
- LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_186472_a(p_192113_1_).func_186471_a();
|
||||
+ LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_186472_a(p_192113_1_).func_186470_a(p_192113_1_).func_186469_a(p_192113_1_.func_184817_da()).func_186471_a(); // Forge: add player & luck to LootContext
|
||||
boolean flag = false;
|
||||
--- a/net/minecraft/advancements/AdvancementRewards.java
|
||||
+++ b/net/minecraft/advancements/AdvancementRewards.java
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
for (ResourceLocation resourcelocation : this.field_192116_c)
|
||||
public void func_192113_a(ServerPlayerEntity p_192113_1_) {
|
||||
p_192113_1_.func_195068_e(this.field_192115_b);
|
||||
- LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_216015_a(LootParameters.field_216281_a, p_192113_1_).func_216015_a(LootParameters.field_216286_f, new BlockPos(p_192113_1_)).func_216023_a(p_192113_1_.func_70681_au()).func_216022_a(LootParameterSets.field_216265_f);
|
||||
+ LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_216015_a(LootParameters.field_216281_a, p_192113_1_).func_216015_a(LootParameters.field_216286_f, new BlockPos(p_192113_1_)).func_216023_a(p_192113_1_.func_70681_au()).func_186469_a(p_192113_1_.func_184817_da()).func_216022_a(LootParameterSets.field_216265_f); // FORGE: luck to LootContext
|
||||
boolean flag = false;
|
||||
|
||||
for(ResourceLocation resourcelocation : this.field_192116_c) {
|
||||
@@ -1,13 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/advancements/DisplayInfo.java
|
||||
+++ ../src-work/minecraft/net/minecraft/advancements/DisplayInfo.java
|
||||
@@ -132,7 +132,9 @@
|
||||
{
|
||||
Item item = JsonUtils.func_188180_i(p_193221_0_, "item");
|
||||
int i = JsonUtils.func_151208_a(p_193221_0_, "data", 0);
|
||||
- return new ItemStack(item, 1, i);
|
||||
+ ItemStack ret = new ItemStack(item, 1, i);
|
||||
+ ret.func_77982_d(net.minecraftforge.common.util.JsonUtils.readNBT(p_193221_0_, "nbt"));
|
||||
+ return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
--- ../src-base/minecraft/net/minecraft/advancements/PlayerAdvancements.java
|
||||
+++ ../src-work/minecraft/net/minecraft/advancements/PlayerAdvancements.java
|
||||
@@ -196,6 +196,9 @@
|
||||
--- a/net/minecraft/advancements/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/advancements/PlayerAdvancements.java
|
||||
@@ -186,6 +186,8 @@
|
||||
}
|
||||
|
||||
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_)
|
||||
{
|
||||
+ // Forge: don't grant advancements for fake players
|
||||
+ if (this.field_192762_j instanceof net.minecraftforge.common.util.FakePlayer) return false;
|
||||
+
|
||||
boolean flag = false;
|
||||
AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_);
|
||||
boolean flag1 = advancementprogress.func_192105_a();
|
||||
@@ -214,6 +217,8 @@
|
||||
{
|
||||
this.field_192756_d.func_184103_al().func_148539_a(new TextComponentTranslation("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), new Object[] {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_);
|
||||
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_) {
|
||||
+ // Forge: don't grant advancements for fake players
|
||||
+ if (this.field_192762_j instanceof net.minecraftforge.common.util.FakePlayer) return false;
|
||||
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")) {
|
||||
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,16 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java
|
||||
+++ ../src-work/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java
|
||||
@@ -104,6 +104,13 @@
|
||||
if (p_192492_0_ != null && !p_192492_0_.isJsonNull())
|
||||
{
|
||||
JsonObject jsonobject = JsonUtils.func_151210_l(p_192492_0_, "item");
|
||||
+ if (jsonobject.has("type"))
|
||||
+ {
|
||||
+ final ResourceLocation rl = new ResourceLocation(JsonUtils.func_151200_h(jsonobject, "type"));
|
||||
+ final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> map = net.minecraftforge.advancements.critereon.ItemPredicates.getPredicates();
|
||||
+ if (map.containsKey(rl)) return map.get(rl).apply(jsonobject);
|
||||
+ else throw new JsonSyntaxException("There is no ItemPredicate of type "+rl);
|
||||
+ }
|
||||
MinMaxBounds minmaxbounds = MinMaxBounds.func_192515_a(jsonobject.get("count"));
|
||||
MinMaxBounds minmaxbounds1 = MinMaxBounds.func_192515_a(jsonobject.get("durability"));
|
||||
Integer integer = jsonobject.has("data") ? JsonUtils.func_151203_m(jsonobject, "data") : null;
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/net/minecraft/advancements/criterion/ItemPredicate.java
|
||||
+++ b/net/minecraft/advancements/criterion/ItemPredicate.java
|
||||
@@ -25,6 +25,8 @@
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class ItemPredicate {
|
||||
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> custom_predicates = new java.util.HashMap<>();
|
||||
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> unmod_predicates = java.util.Collections.unmodifiableMap(custom_predicates);
|
||||
public static final ItemPredicate field_192495_a = new ItemPredicate();
|
||||
@Nullable
|
||||
private final Tag<Item> field_200018_b;
|
||||
@@ -93,6 +95,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");
|
||||
+ if (jsonobject.has("type")) {
|
||||
+ final ResourceLocation rl = new ResourceLocation(JSONUtils.func_151200_h(jsonobject, "type"));
|
||||
+ if (custom_predicates.containsKey(rl)) return custom_predicates.get(rl).apply(jsonobject);
|
||||
+ else throw new JsonSyntaxException("There is no ItemPredicate of type "+rl);
|
||||
+ }
|
||||
MinMaxBounds.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 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ public static void register(ResourceLocation name, java.util.function.Function<JsonObject, ItemPredicate> deserializer) {
|
||||
+ custom_predicates.put(name, deserializer);
|
||||
+ }
|
||||
+
|
||||
+ public static Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> getPredicates() {
|
||||
+ return unmod_predicates;
|
||||
+ }
|
||||
+
|
||||
public static class Builder {
|
||||
private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
|
||||
@Nullable
|
||||
@@ -0,0 +1,96 @@
|
||||
--- a/net/minecraft/block/AbstractRailBlock.java
|
||||
+++ b/net/minecraft/block/AbstractRailBlock.java
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
- RailShape railshape = p_220053_1_.func_177230_c() == this ? p_220053_1_.func_177229_b(this.func_176560_l()) : null;
|
||||
+ RailShape railshape = p_220053_1_.func_177230_c() == this ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null;
|
||||
return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,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) {
|
||||
- RailShape railshape = p_220069_1_.func_177229_b(this.func_176560_l());
|
||||
+ RailShape railshape = getRailDirection(p_220069_1_, p_220069_2_, p_220069_3_, null);
|
||||
boolean flag = false;
|
||||
BlockPos blockpos = p_220069_3_.func_177977_b();
|
||||
if (!func_220064_c(p_220069_2_, blockpos)) {
|
||||
@@ -115,7 +115,7 @@
|
||||
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
|
||||
if (!p_196243_5_) {
|
||||
super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_);
|
||||
- if (p_196243_1_.func_177229_b(this.func_176560_l()).func_208092_c()) {
|
||||
+ if (getRailDirection(p_196243_1_, p_196243_2_, p_196243_3_, null).func_208092_c()) {
|
||||
p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this);
|
||||
}
|
||||
|
||||
@@ -127,5 +127,66 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability
|
||||
public abstract IProperty<RailShape> func_176560_l();
|
||||
+
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ /**
|
||||
+ * Return true if the rail can make corners.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @return True if the rail can make corners.
|
||||
+ */
|
||||
+ public boolean isFlexibleRail(BlockState state, IBlockReader world, BlockPos pos)
|
||||
+ {
|
||||
+ return !this.field_196277_c;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns true if the rail can make up and down slopes.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @return True if the rail can make slopes.
|
||||
+ */
|
||||
+ public boolean canMakeSlopes(BlockState state, IBlockReader world, BlockPos pos) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Return the rail's direction.
|
||||
+ * Can be used to make the cart think the rail is a different shape,
|
||||
+ * for example when making diamond junctions or switches.
|
||||
+ * The cart parameter will often be null unless it it called from EntityMinecart.
|
||||
+ *
|
||||
+ * @param world The world.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @param state The BlockState
|
||||
+ * @param cart The cart asking for the metadata, null if it is not called by EntityMinecart.
|
||||
+ * @return The direction.
|
||||
+ */
|
||||
+ public RailShape getRailDirection(BlockState state, IBlockReader world, BlockPos pos, @javax.annotation.Nullable net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) {
|
||||
+ return state.func_177229_b(func_176560_l());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the max speed of the rail at the specified position.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail, may be null.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @return The max speed of the current rail.
|
||||
+ */
|
||||
+ public float getRailMaxSpeed(BlockState state, World world, BlockPos pos, net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) {
|
||||
+ return 0.4f;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This function is called by any minecart that passes over this rail.
|
||||
+ * It is called once per update tick that the minecart is on the rail.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail.
|
||||
+ * @param pos Block's position in world
|
||||
+ */
|
||||
+ public void onMinecartPass(BlockState state, World world, BlockPos pos, net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) { }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/block/BedBlock.java
|
||||
+++ b/net/minecraft/block/BedBlock.java
|
||||
@@ -85,7 +85,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 (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;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,43 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockBanner.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockBanner.java
|
||||
@@ -90,16 +90,9 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
- ItemStack itemstack = this.func_185549_e(p_180653_1_, p_180653_2_);
|
||||
-
|
||||
- if (itemstack.func_190926_b())
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- func_180635_a(p_180653_1_, p_180653_2_, itemstack);
|
||||
- }
|
||||
}
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
@@ -126,6 +119,23 @@
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ TileEntity te = world.func_175625_s(pos);
|
||||
+
|
||||
+ if (te instanceof TileEntityBanner)
|
||||
+ {
|
||||
+ TileEntityBanner tileentitybanner = (TileEntityBanner)te;
|
||||
+ ItemStack itemstack = tileentitybanner.func_190615_l();
|
||||
+ drops.add(itemstack);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ drops.add(new ItemStack(Items.field_179564_cE, 1, 0));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public static class BlockBannerHanging extends BlockBanner
|
||||
{
|
||||
protected static final AxisAlignedBB field_185551_d = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 0.78125D, 1.0D);
|
||||
@@ -1,14 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockBed.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockBed.java
|
||||
@@ -84,8 +84,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (p_180639_1_.field_73011_w.func_76567_e() && p_180639_1_.func_180494_b(p_180639_2_) != Biomes.field_76778_j)
|
||||
+ net.minecraft.world.WorldProvider.WorldSleepResult sleepResult = p_180639_1_.field_73011_w.canSleepAt(p_180639_4_, p_180639_2_);
|
||||
+ if (sleepResult != net.minecraft.world.WorldProvider.WorldSleepResult.BED_EXPLODES)
|
||||
{
|
||||
+ if (sleepResult == net.minecraft.world.WorldProvider.WorldSleepResult.DENY) return true;
|
||||
if (((Boolean)p_180639_3_.func_177229_b(field_176471_b)).booleanValue())
|
||||
{
|
||||
EntityPlayer entityplayer = this.func_176470_e(p_180639_1_, p_180639_2_);
|
||||
@@ -1,70 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockBush.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockBush.java
|
||||
@@ -17,7 +17,7 @@
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
-public class BlockBush extends Block
|
||||
+public class BlockBush extends Block implements net.minecraftforge.common.IPlantable
|
||||
{
|
||||
protected static final AxisAlignedBB field_185515_b = new AxisAlignedBB(0.30000001192092896D, 0.0D, 0.30000001192092896D, 0.699999988079071D, 0.6000000238418579D, 0.699999988079071D);
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
- return super.func_176196_c(p_176196_1_, p_176196_2_) && this.func_185514_i(p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()));
|
||||
+ IBlockState soil = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
||||
+ return super.func_176196_c(p_176196_1_, p_176196_2_) && soil.func_177230_c().canSustainPlant(soil, p_176196_1_, p_176196_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
|
||||
}
|
||||
|
||||
protected boolean func_185514_i(IBlockState p_185514_1_)
|
||||
@@ -70,6 +71,11 @@
|
||||
|
||||
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||
{
|
||||
+ if (p_180671_3_.func_177230_c() == this) //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
||||
+ {
|
||||
+ IBlockState soil = p_180671_1_.func_180495_p(p_180671_2_.func_177977_b());
|
||||
+ return soil.func_177230_c().canSustainPlant(soil, p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
|
||||
+ }
|
||||
return this.func_185514_i(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()));
|
||||
}
|
||||
|
||||
@@ -94,6 +100,36 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ if (this == Blocks.field_150464_aj) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||
+ if (this == Blocks.field_150459_bM) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||
+ if (this == Blocks.field_150469_bN) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||
+ if (this == Blocks.field_185773_cZ) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||
+ if (this == Blocks.field_150394_bc) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||
+ if (this == Blocks.field_150393_bb) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||
+ if (this == Blocks.field_150330_I) return net.minecraftforge.common.EnumPlantType.Desert;
|
||||
+ if (this == Blocks.field_150392_bi) return net.minecraftforge.common.EnumPlantType.Water;
|
||||
+ if (this == Blocks.field_150337_Q) return net.minecraftforge.common.EnumPlantType.Cave;
|
||||
+ if (this == Blocks.field_150338_P) return net.minecraftforge.common.EnumPlantType.Cave;
|
||||
+ if (this == Blocks.field_150388_bm) return net.minecraftforge.common.EnumPlantType.Nether;
|
||||
+ if (this == Blocks.field_150345_g) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||
+ if (this == Blocks.field_150329_H) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||
+ if (this == Blocks.field_150398_cm) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||
+ if (this == Blocks.field_150328_O) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||
+ if (this == Blocks.field_150327_N) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||
+ return net.minecraftforge.common.EnumPlantType.Plains;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ if (state.func_177230_c() != this) return func_176223_P();
|
||||
+ return state;
|
||||
+ }
|
||||
+
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BlockRenderLayer func_180664_k()
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockButton.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockButton.java
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
if (p_181088_2_ == EnumFacing.UP)
|
||||
{
|
||||
- return block == Blocks.field_150438_bZ || !func_193384_b(block) && flag;
|
||||
+ return iblockstate.func_185896_q() || !func_193384_b(block) && flag;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1,67 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java
|
||||
@@ -20,7 +20,7 @@
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
-public class BlockCactus extends Block
|
||||
+public class BlockCactus extends Block implements net.minecraftforge.common.IPlantable
|
||||
{
|
||||
public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15);
|
||||
protected static final AxisAlignedBB field_185593_b = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D);
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
|
||||
{
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update
|
||||
BlockPos blockpos = p_180650_2_.func_177984_a();
|
||||
|
||||
if (p_180650_1_.func_175623_d(blockpos))
|
||||
@@ -51,6 +52,8 @@
|
||||
{
|
||||
int j = ((Integer)p_180650_3_.func_177229_b(field_176587_a)).intValue();
|
||||
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, blockpos, p_180650_3_, true))
|
||||
+ {
|
||||
if (j == 15)
|
||||
{
|
||||
p_180650_1_.func_175656_a(blockpos, this.func_176223_P());
|
||||
@@ -62,6 +65,8 @@
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176587_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,8 +117,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
- Block block = p_176586_1_.func_180495_p(p_176586_2_.func_177977_b()).func_177230_c();
|
||||
- return block == Blocks.field_150434_aF || block == Blocks.field_150354_m && !p_176586_1_.func_180495_p(p_176586_2_.func_177984_a()).func_185904_a().func_76224_d();
|
||||
+ IBlockState state = p_176586_1_.func_180495_p(p_176586_2_.func_177977_b());
|
||||
+ return state.func_177230_c().canSustainPlant(state, p_176586_1_, p_176586_2_.func_177977_b(), EnumFacing.UP, this) && !p_176586_1_.func_180495_p(p_176586_2_.func_177984_a()).func_185904_a().func_76224_d();
|
||||
}
|
||||
|
||||
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
|
||||
@@ -137,6 +142,18 @@
|
||||
return ((Integer)p_176201_1_.func_177229_b(field_176587_a)).intValue();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return net.minecraftforge.common.EnumPlantType.Desert;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return func_176223_P();
|
||||
+ }
|
||||
+
|
||||
protected BlockStateContainer func_180661_e()
|
||||
{
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176587_a});
|
||||
@@ -1,31 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockChest.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
|
||||
@@ -470,7 +470,7 @@
|
||||
|
||||
if (block == this)
|
||||
{
|
||||
- if (this.func_176457_m(p_189418_1_, blockpos))
|
||||
+ if (!p_189418_3_ && this.func_176457_m(p_189418_1_, blockpos)) // Forge: fix MC-99321
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -538,7 +538,7 @@
|
||||
|
||||
private boolean func_176456_n(World p_176456_1_, BlockPos p_176456_2_)
|
||||
{
|
||||
- return p_176456_1_.func_180495_p(p_176456_2_.func_177984_a()).func_185915_l();
|
||||
+ return p_176456_1_.func_180495_p(p_176456_2_.func_177984_a()).doesSideBlockChestOpening(p_176456_1_, p_176456_2_.func_177984_a(), EnumFacing.DOWN);
|
||||
}
|
||||
|
||||
private boolean func_176453_o(World p_176453_1_, BlockPos p_176453_2_)
|
||||
@@ -608,4 +608,10 @@
|
||||
BASIC,
|
||||
TRAP;
|
||||
}
|
||||
+
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ return !func_176454_e(world, pos) && super.rotateBlock(world, pos, axis);
|
||||
+ }
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockChorusFlower.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockChorusFlower.java
|
||||
@@ -55,7 +55,7 @@
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_185607_a)).intValue();
|
||||
|
||||
- if (i < 5 && p_180650_4_.nextInt(1) == 0)
|
||||
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, blockpos, p_180650_3_, p_180650_4_.nextInt(1) == 0))
|
||||
{
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
@@ -144,6 +144,7 @@
|
||||
{
|
||||
this.func_185605_c(p_180650_1_, p_180650_2_);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java
|
||||
@@ -44,13 +44,14 @@
|
||||
{
|
||||
this.func_176500_f(p_180650_1_, p_180650_2_, p_180650_3_);
|
||||
}
|
||||
- else if (p_180650_1_.field_73012_v.nextInt(5) == 0)
|
||||
+ else
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176501_a)).intValue();
|
||||
|
||||
- if (i < 2)
|
||||
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt(5) == 0))
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176501_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,7 +133,14 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
- int i = ((Integer)p_180653_3_.func_177229_b(field_176501_a)).intValue();
|
||||
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ int i = ((Integer)state.func_177229_b(field_176501_a)).intValue();
|
||||
int j = 1;
|
||||
|
||||
if (i >= 2)
|
||||
@@ -142,7 +150,7 @@
|
||||
|
||||
for (int k = 0; k < j; ++k)
|
||||
{
|
||||
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||
+ drops.add(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockCrops.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java
|
||||
@@ -70,6 +70,7 @@
|
||||
{
|
||||
super.func_180650_b(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_);
|
||||
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) >= 9)
|
||||
{
|
||||
int i = this.func_185527_x(p_180650_3_);
|
||||
@@ -78,9 +79,10 @@
|
||||
{
|
||||
float f = func_180672_a(this, p_180650_1_, p_180650_2_);
|
||||
|
||||
- if (p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0)
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0))
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, this.func_185528_e(i + 1), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,11 +118,11 @@
|
||||
float f1 = 0.0F;
|
||||
IBlockState iblockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
|
||||
|
||||
- if (iblockstate.func_177230_c() == Blocks.field_150458_ak)
|
||||
+ if (iblockstate.func_177230_c().canSustainPlant(iblockstate, p_180672_1_, blockpos.func_177982_a(i, 0, j), net.minecraft.util.EnumFacing.UP, (net.minecraftforge.common.IPlantable)p_180672_0_))
|
||||
{
|
||||
f1 = 1.0F;
|
||||
|
||||
- if (((Integer)iblockstate.func_177229_b(BlockFarmland.field_176531_a)).intValue() > 0)
|
||||
+ if (iblockstate.func_177230_c().isFertile(p_180672_1_, blockpos.func_177982_a(i, 0, j)))
|
||||
{
|
||||
f1 = 3.0F;
|
||||
}
|
||||
@@ -161,7 +163,8 @@
|
||||
|
||||
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||
{
|
||||
- return (p_180671_1_.func_175699_k(p_180671_2_) >= 8 || p_180671_1_.func_175678_i(p_180671_2_)) && this.func_185514_i(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()));
|
||||
+ IBlockState soil = p_180671_1_.func_180495_p(p_180671_2_.func_177977_b());
|
||||
+ return (p_180671_1_.func_175699_k(p_180671_2_) >= 8 || p_180671_1_.func_175678_i(p_180671_2_)) && soil.func_177230_c().canSustainPlant(soil, p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
|
||||
}
|
||||
|
||||
protected Item func_149866_i()
|
||||
@@ -174,11 +177,32 @@
|
||||
return Items.field_151015_O;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ super.getDrops(drops, world, pos, state, 0);
|
||||
+ int age = func_185527_x(state);
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+
|
||||
+ if (age >= func_185526_g())
|
||||
+ {
|
||||
+ int k = 3 + fortune;
|
||||
+
|
||||
+ for (int i = 0; i < 3 + fortune; ++i)
|
||||
+ {
|
||||
+ if (rand.nextInt(2 * func_185526_g()) <= age)
|
||||
+ {
|
||||
+ drops.add(new ItemStack(this.func_149866_i(), 1, 0));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
- super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, 0);
|
||||
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
|
||||
- if (!p_180653_1_.field_72995_K)
|
||||
+ if (false && !p_180653_1_.field_72995_K) // Forge: NOP all this.
|
||||
{
|
||||
int i = this.func_185527_x(p_180653_3_);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDeadBush.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDeadBush.java
|
||||
@@ -17,7 +17,7 @@
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class BlockDeadBush extends BlockBush
|
||||
+public class BlockDeadBush extends BlockBush implements net.minecraftforge.common.IShearable
|
||||
{
|
||||
protected static final AxisAlignedBB field_185516_a = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D);
|
||||
|
||||
@@ -68,4 +68,11 @@
|
||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ @Override public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; }
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ return java.util.Arrays.asList(new ItemStack(Blocks.field_150330_I));
|
||||
+ }
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDoor.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
|
||||
@@ -203,7 +203,7 @@
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
- if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).func_185896_q())
|
||||
+ if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).isSideSolid(p_189540_2_, p_189540_3_.func_177977_b(), EnumFacing.UP))
|
||||
{
|
||||
p_189540_2_.func_175698_g(p_189540_3_);
|
||||
flag1 = true;
|
||||
@@ -247,13 +247,14 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
- if (p_176196_2_.func_177956_o() >= 255)
|
||||
+ if (p_176196_2_.func_177956_o() >= p_176196_1_.func_72800_K() - 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
- return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a());
|
||||
+ IBlockState state = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
||||
+ return (state.func_185896_q() || state.func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID) && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDoublePlant.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDoublePlant.java
|
||||
@@ -24,7 +24,7 @@
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class BlockDoublePlant extends BlockBush implements IGrowable
|
||||
+public class BlockDoublePlant extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable
|
||||
{
|
||||
public static final PropertyEnum<BlockDoublePlant.EnumPlantType> field_176493_a = PropertyEnum.<BlockDoublePlant.EnumPlantType>func_177709_a("variant", BlockDoublePlant.EnumPlantType.class);
|
||||
public static final PropertyEnum<BlockDoublePlant.EnumBlockHalf> field_176492_b = PropertyEnum.<BlockDoublePlant.EnumBlockHalf>func_177709_a("half", BlockDoublePlant.EnumBlockHalf.class);
|
||||
@@ -87,6 +87,8 @@
|
||||
Block block = (Block)(flag ? this : p_176475_1_.func_180495_p(blockpos).func_177230_c());
|
||||
Block block1 = (Block)(flag ? p_176475_1_.func_180495_p(blockpos1).func_177230_c() : this);
|
||||
|
||||
+ if (!flag) this.func_176226_b(p_176475_1_, p_176475_2_, p_176475_3_, 0); //Forge move above the setting to air.
|
||||
+
|
||||
if (block == this)
|
||||
{
|
||||
p_176475_1_.func_180501_a(blockpos, Blocks.field_150350_a.func_176223_P(), 2);
|
||||
@@ -95,17 +97,13 @@
|
||||
if (block1 == this)
|
||||
{
|
||||
p_176475_1_.func_180501_a(blockpos1, Blocks.field_150350_a.func_176223_P(), 3);
|
||||
-
|
||||
- if (!flag)
|
||||
- {
|
||||
- this.func_176226_b(p_176475_1_, blockpos1, p_176475_3_, 0);
|
||||
- }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||
{
|
||||
+ if (p_180671_3_.func_177230_c() != this) return super.func_180671_f(p_180671_1_, p_180671_2_, p_180671_3_); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
||||
if (p_180671_3_.func_177229_b(field_176492_b) == BlockDoublePlant.EnumBlockHalf.UPPER)
|
||||
{
|
||||
return p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c() == this;
|
||||
@@ -160,7 +158,6 @@
|
||||
|
||||
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
|
||||
{
|
||||
- if (p_180657_1_.field_72995_K || p_180657_6_.func_77973_b() != Items.field_151097_aZ || p_180657_4_.func_177229_b(field_176492_b) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.func_176489_b(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_))
|
||||
{
|
||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
|
||||
}
|
||||
@@ -220,8 +217,6 @@
|
||||
else
|
||||
{
|
||||
p_176489_4_.func_71029_a(StatList.func_188055_a(this));
|
||||
- int i = (blockdoubleplant$enumplanttype == BlockDoublePlant.EnumPlantType.GRASS ? BlockTallGrass.EnumType.GRASS : BlockTallGrass.EnumType.FERN).func_177044_a();
|
||||
- func_180635_a(p_176489_1_, p_176489_2_, new ItemStack(Blocks.field_150329_H, 2, i));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -290,6 +285,24 @@
|
||||
return Block.EnumOffsetType.XZ;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ EnumPlantType type = (EnumPlantType)state.func_177229_b(field_176493_a);
|
||||
+ return state.func_177229_b(field_176492_b) == EnumBlockHalf.LOWER && (type == EnumPlantType.FERN || type == EnumPlantType.GRASS);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
+ EnumPlantType type = (EnumPlantType)world.func_180495_p(pos).func_177229_b(field_176493_a);
|
||||
+ if (type == EnumPlantType.FERN) ret.add(new ItemStack(Blocks.field_150329_H, 2, BlockTallGrass.EnumType.FERN.func_177044_a()));
|
||||
+ if (type == EnumPlantType.GRASS) ret.add(new ItemStack(Blocks.field_150329_H, 2, BlockTallGrass.EnumType.GRASS.func_177044_a()));
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
public static enum EnumBlockHalf implements IStringSerializable
|
||||
{
|
||||
UPPER,
|
||||
@@ -1,29 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDragonEgg.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDragonEgg.java
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
private void func_180683_d(World p_180683_1_, BlockPos p_180683_2_)
|
||||
{
|
||||
- if (BlockFalling.func_185759_i(p_180683_1_.func_180495_p(p_180683_2_.func_177977_b())) && p_180683_2_.func_177956_o() >= 0)
|
||||
+ if (p_180683_1_.func_175623_d(p_180683_2_.func_177977_b()) && BlockFalling.func_185759_i(p_180683_1_.func_180495_p(p_180683_2_.func_177977_b())) && p_180683_2_.func_177956_o() >= 0)
|
||||
{
|
||||
int i = 32;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
p_180683_1_.func_175698_g(p_180683_2_);
|
||||
BlockPos blockpos;
|
||||
|
||||
- for (blockpos = p_180683_2_; BlockFalling.func_185759_i(p_180683_1_.func_180495_p(blockpos)) && blockpos.func_177956_o() > 0; blockpos = blockpos.func_177977_b())
|
||||
+ for (blockpos = p_180683_2_; p_180683_1_.func_175623_d(blockpos) && BlockFalling.func_185759_i(p_180683_1_.func_180495_p(blockpos)) && blockpos.func_177956_o() > 0; blockpos = blockpos.func_177977_b())
|
||||
{
|
||||
;
|
||||
}
|
||||
@@ -95,7 +95,7 @@
|
||||
{
|
||||
BlockPos blockpos = p_180684_2_.func_177982_a(p_180684_1_.field_73012_v.nextInt(16) - p_180684_1_.field_73012_v.nextInt(16), p_180684_1_.field_73012_v.nextInt(8) - p_180684_1_.field_73012_v.nextInt(8), p_180684_1_.field_73012_v.nextInt(16) - p_180684_1_.field_73012_v.nextInt(16));
|
||||
|
||||
- if (p_180684_1_.func_180495_p(blockpos).func_177230_c().field_149764_J == Material.field_151579_a)
|
||||
+ if (p_180684_1_.func_175623_d(blockpos))
|
||||
{
|
||||
if (p_180684_1_.field_72995_K)
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDropper.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDropper.java
|
||||
@@ -43,7 +43,7 @@
|
||||
{
|
||||
ItemStack itemstack = tileentitydispenser.func_70301_a(i);
|
||||
|
||||
- if (!itemstack.func_190926_b())
|
||||
+ if (!itemstack.func_190926_b() && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack))
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a);
|
||||
BlockPos blockpos = p_176439_2_.func_177972_a(enumfacing);
|
||||
@@ -1,60 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDynamicLiquid.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDynamicLiquid.java
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
|
||||
{
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, this.func_185698_b(p_180650_1_))) return; // Forge: avoid loading unloaded chunks
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176367_b)).intValue();
|
||||
int j = 1;
|
||||
|
||||
@@ -67,7 +68,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.field_149815_a >= 2 && this.field_149764_J == Material.field_151586_h)
|
||||
+ if (this.field_149815_a >= 2 && net.minecraftforge.event.ForgeEventFactory.canCreateFluidSource(p_180650_1_, p_180650_2_, p_180650_3_, this.field_149764_J == Material.field_151586_h))
|
||||
{
|
||||
IBlockState iblockstate = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b());
|
||||
|
||||
@@ -118,7 +119,7 @@
|
||||
{
|
||||
if (this.field_149764_J == Material.field_151587_i && p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).func_185904_a() == Material.field_151586_h)
|
||||
{
|
||||
- p_180650_1_.func_175656_a(p_180650_2_.func_177977_b(), Blocks.field_150348_b.func_176223_P());
|
||||
+ p_180650_1_.func_175656_a(p_180650_2_.func_177977_b(), net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_180650_1_, p_180650_2_.func_177977_b(), p_180650_2_, Blocks.field_150348_b.func_176223_P()));
|
||||
this.func_180688_d(p_180650_1_, p_180650_2_.func_177977_b());
|
||||
return;
|
||||
}
|
||||
@@ -166,6 +167,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ if (p_176375_3_.func_177230_c() != Blocks.field_150431_aC) //Forge: Vanilla has a 'bug' where snowballs don't drop like every other block. So special case because ewww...
|
||||
p_176375_3_.func_177230_c().func_176226_b(p_176375_1_, p_176375_2_, p_176375_3_, 0);
|
||||
}
|
||||
}
|
||||
@@ -187,7 +189,7 @@
|
||||
|
||||
if (!this.func_176372_g(p_176374_1_, blockpos, iblockstate) && (iblockstate.func_185904_a() != this.field_149764_J || ((Integer)iblockstate.func_177229_b(field_176367_b)).intValue() > 0))
|
||||
{
|
||||
- if (!this.func_176372_g(p_176374_1_, blockpos.func_177977_b(), iblockstate))
|
||||
+ if (!this.func_176372_g(p_176374_1_, blockpos.func_177977_b(), p_176374_1_.func_180495_p(blockpos.func_177977_b())))
|
||||
{
|
||||
return p_176374_3_;
|
||||
}
|
||||
@@ -254,11 +256,12 @@
|
||||
|
||||
private boolean func_176372_g(World p_176372_1_, BlockPos p_176372_2_, IBlockState p_176372_3_)
|
||||
{
|
||||
- Block block = p_176372_1_.func_180495_p(p_176372_2_).func_177230_c();
|
||||
+ Block block = p_176372_3_.func_177230_c(); //Forge: state must be valid for position
|
||||
+ Material mat = p_176372_3_.func_185904_a();
|
||||
|
||||
if (!(block instanceof BlockDoor) && block != Blocks.field_150472_an && block != Blocks.field_150468_ap && block != Blocks.field_150436_aH)
|
||||
{
|
||||
- return block.field_149764_J != Material.field_151567_E && block.field_149764_J != Material.field_189963_J ? block.field_149764_J.func_76230_c() : true;
|
||||
+ return mat != Material.field_151567_E && mat != Material.field_189963_J ? mat.func_76230_c() : true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockEnchantmentTable.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockEnchantmentTable.java
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);
|
||||
|
||||
- if (p_180655_2_.func_180495_p(blockpos).func_177230_c() == Blocks.field_150342_X)
|
||||
+ if (net.minecraftforge.common.ForgeHooks.getEnchantPower(p_180655_2_, blockpos) > 0)
|
||||
{
|
||||
if (!p_180655_2_.func_175623_d(p_180655_3_.func_177982_a(i / 2, 0, j / 2)))
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockEnderChest.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockEnderChest.java
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
|
||||
{
|
||||
- if (p_180639_1_.func_180495_p(p_180639_2_.func_177984_a()).func_185915_l())
|
||||
+ if (p_180639_1_.func_180495_p(p_180639_2_.func_177984_a()).doesSideBlockChestOpening(p_180639_1_, p_180639_2_.func_177984_a(), EnumFacing.DOWN))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockFalling.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFalling.java
|
||||
@@ -47,7 +47,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)
|
||||
{
|
||||
int i = 32;
|
||||
|
||||
@@ -62,17 +62,18 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ IBlockState state = p_176503_1_.func_180495_p(p_176503_2_);
|
||||
p_176503_1_.func_175698_g(p_176503_2_);
|
||||
BlockPos blockpos;
|
||||
|
||||
- for (blockpos = p_176503_2_.func_177977_b(); func_185759_i(p_176503_1_.func_180495_p(blockpos)) && blockpos.func_177956_o() > 0; blockpos = blockpos.func_177977_b())
|
||||
+ for (blockpos = p_176503_2_.func_177977_b(); (p_176503_1_.func_175623_d(blockpos) || func_185759_i(p_176503_1_.func_180495_p(blockpos))) && blockpos.func_177956_o() > 0; blockpos = blockpos.func_177977_b())
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
if (blockpos.func_177956_o() > 0)
|
||||
{
|
||||
- p_176503_1_.func_175656_a(blockpos.func_177984_a(), this.func_176223_P());
|
||||
+ p_176503_1_.func_175656_a(blockpos.func_177984_a(), state); //Forge: Fix loss of state information during world gen.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java
|
||||
@@ -72,7 +72,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 EntityLivingBase && (p_180658_3_ instanceof EntityPlayer || p_180658_1_.func_82736_K().func_82766_b("mobGriefing")) && p_180658_3_.field_70130_N * p_180658_3_.field_70130_N * p_180658_3_.field_70131_O > 0.512F)
|
||||
+ if (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_190970_b(p_180658_1_, p_180658_2_);
|
||||
}
|
||||
@@ -95,7 +95,7 @@
|
||||
private boolean func_176529_d(World p_176529_1_, BlockPos p_176529_2_)
|
||||
{
|
||||
Block block = p_176529_1_.func_180495_p(p_176529_2_.func_177984_a()).func_177230_c();
|
||||
- return block instanceof BlockCrops || block instanceof BlockStem;
|
||||
+ return block instanceof net.minecraftforge.common.IPlantable && canSustainPlant(p_176529_1_.func_180495_p(p_176529_2_), p_176529_1_, p_176529_2_, net.minecraft.util.EnumFacing.UP, (net.minecraftforge.common.IPlantable)block);
|
||||
}
|
||||
|
||||
private boolean func_176530_e(World p_176530_1_, BlockPos p_176530_2_)
|
||||
@@ -108,7 +108,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return false;
|
||||
+ return net.minecraftforge.common.FarmlandWaterManager.hasBlockWaterTicket(p_176530_1_, p_176530_2_);
|
||||
}
|
||||
|
||||
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_)
|
||||
@@ -1,38 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockFence.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFence.java
|
||||
@@ -165,7 +165,10 @@
|
||||
|
||||
public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_)
|
||||
{
|
||||
- return p_176221_1_.func_177226_a(field_176526_a, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177978_c(), EnumFacing.SOUTH))).func_177226_a(field_176525_b, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177974_f(), EnumFacing.WEST))).func_177226_a(field_176527_M, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177968_d(), EnumFacing.NORTH))).func_177226_a(field_176528_N, Boolean.valueOf(this.func_176524_e(p_176221_2_, p_176221_3_.func_177976_e(), EnumFacing.EAST)));
|
||||
+ return p_176221_1_.func_177226_a(field_176526_a, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH))
|
||||
+ .func_177226_a(field_176525_b, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST))
|
||||
+ .func_177226_a(field_176527_M, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH))
|
||||
+ .func_177226_a(field_176528_N, canFenceConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST));
|
||||
}
|
||||
|
||||
public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_)
|
||||
@@ -201,6 +204,23 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176526_a, field_176525_b, field_176528_N, field_176527_M});
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START ======================================== */
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
|
||||
+ {
|
||||
+ return func_176524_e(world, pos.func_177972_a(facing), facing.func_176734_d());
|
||||
+ }
|
||||
+
|
||||
+ private boolean canFenceConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
|
||||
+ {
|
||||
+ BlockPos other = pos.func_177972_a(facing);
|
||||
+ Block block = world.func_180495_p(other).func_177230_c();
|
||||
+ return block.canBeConnectedTo(world, other, facing.func_176734_d()) || func_176524_e(world, other, facing.func_176734_d());
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE END ======================================== */
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN ? BlockFaceShape.MIDDLE_POLE : BlockFaceShape.CENTER;
|
||||
@@ -1,35 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockFenceGate.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFenceGate.java
|
||||
@@ -59,7 +59,7 @@
|
||||
{
|
||||
EnumFacing.Axis enumfacing$axis = ((EnumFacing)p_176221_1_.func_177229_b(field_185512_D)).func_176740_k();
|
||||
|
||||
- if (enumfacing$axis == EnumFacing.Axis.Z && (p_176221_2_.func_180495_p(p_176221_3_.func_177976_e()).func_177230_c() == Blocks.field_150463_bK || p_176221_2_.func_180495_p(p_176221_3_.func_177974_f()).func_177230_c() == Blocks.field_150463_bK) || enumfacing$axis == EnumFacing.Axis.X && (p_176221_2_.func_180495_p(p_176221_3_.func_177978_c()).func_177230_c() == Blocks.field_150463_bK || p_176221_2_.func_180495_p(p_176221_3_.func_177968_d()).func_177230_c() == Blocks.field_150463_bK))
|
||||
+ if (enumfacing$axis == EnumFacing.Axis.Z && (p_176221_2_.func_180495_p(p_176221_3_.func_177976_e()).func_177230_c() instanceof BlockWall || p_176221_2_.func_180495_p(p_176221_3_.func_177974_f()).func_177230_c() instanceof BlockWall) || enumfacing$axis == EnumFacing.Axis.X && (p_176221_2_.func_180495_p(p_176221_3_.func_177978_c()).func_177230_c() instanceof BlockWall || p_176221_2_.func_180495_p(p_176221_3_.func_177968_d()).func_177230_c() instanceof BlockWall))
|
||||
{
|
||||
p_176221_1_ = p_176221_1_.func_177226_a(field_176467_M, Boolean.valueOf(true));
|
||||
}
|
||||
@@ -192,6 +192,23 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_185512_D, field_176466_a, field_176465_b, field_176467_M});
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START ======================================== */
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ if (state.func_177230_c() instanceof BlockFenceGate &&
|
||||
+ state.func_193401_d(world, pos, facing) == BlockFaceShape.MIDDLE_POLE)
|
||||
+ {
|
||||
+ Block connector = world.func_180495_p(pos.func_177972_a(facing)).func_177230_c();
|
||||
+ return connector instanceof BlockFence || connector instanceof BlockWall;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE END ======================================== */
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
if (p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN)
|
||||
@@ -1,218 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockFire.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFire.java
|
||||
@@ -39,7 +39,15 @@
|
||||
|
||||
public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_)
|
||||
{
|
||||
- return !p_176221_2_.func_180495_p(p_176221_3_.func_177977_b()).func_185896_q() && !Blocks.field_150480_ab.func_176535_e(p_176221_2_, p_176221_3_.func_177977_b()) ? p_176221_1_.func_177226_a(field_176545_N, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177978_c()))).func_177226_a(field_176546_O, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177974_f()))).func_177226_a(field_176541_P, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177968_d()))).func_177226_a(field_176539_Q, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177976_e()))).func_177226_a(field_176542_R, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177984_a()))) : this.func_176223_P();
|
||||
+ if (!p_176221_2_.func_180495_p(p_176221_3_.func_177977_b()).isSideSolid(p_176221_2_, p_176221_3_.func_177977_b(), EnumFacing.UP) && !Blocks.field_150480_ab.canCatchFire(p_176221_2_, p_176221_3_.func_177977_b(), EnumFacing.UP))
|
||||
+ {
|
||||
+ return p_176221_1_.func_177226_a(field_176545_N, this.canCatchFire(p_176221_2_, p_176221_3_.func_177978_c(), EnumFacing.SOUTH))
|
||||
+ .func_177226_a(field_176546_O, this.canCatchFire(p_176221_2_, p_176221_3_.func_177974_f(), EnumFacing.WEST))
|
||||
+ .func_177226_a(field_176541_P, this.canCatchFire(p_176221_2_, p_176221_3_.func_177968_d(), EnumFacing.NORTH))
|
||||
+ .func_177226_a(field_176539_Q, this.canCatchFire(p_176221_2_, p_176221_3_.func_177976_e(), EnumFacing.EAST))
|
||||
+ .func_177226_a(field_176542_R, this.canCatchFire(p_176221_2_, p_176221_3_.func_177984_a(), EnumFacing.DOWN));
|
||||
+ }
|
||||
+ return this.func_176223_P();
|
||||
}
|
||||
|
||||
protected BlockFire()
|
||||
@@ -92,6 +100,7 @@
|
||||
|
||||
public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_)
|
||||
{
|
||||
+ if (p_180686_1_ == Blocks.field_150350_a) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
|
||||
this.field_149849_a.put(p_180686_1_, Integer.valueOf(p_180686_2_));
|
||||
this.field_149848_b.put(p_180686_1_, Integer.valueOf(p_180686_3_));
|
||||
}
|
||||
@@ -126,19 +135,15 @@
|
||||
{
|
||||
if (p_180650_1_.func_82736_K().func_82766_b("doFireTick"))
|
||||
{
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire
|
||||
if (!this.func_176196_c(p_180650_1_, p_180650_2_))
|
||||
{
|
||||
p_180650_1_.func_175698_g(p_180650_2_);
|
||||
}
|
||||
|
||||
Block block = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).func_177230_c();
|
||||
- boolean flag = block == Blocks.field_150424_aL || block == Blocks.field_189877_df;
|
||||
+ boolean flag = block.isFireSource(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP);
|
||||
|
||||
- if (p_180650_1_.field_73011_w instanceof WorldProviderEnd && block == Blocks.field_150357_h)
|
||||
- {
|
||||
- flag = true;
|
||||
- }
|
||||
-
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176543_a)).intValue();
|
||||
|
||||
if (!flag && p_180650_1_.func_72896_J() && this.func_176537_d(p_180650_1_, p_180650_2_) && p_180650_4_.nextFloat() < 0.2F + (float)i * 0.03F)
|
||||
@@ -159,7 +164,7 @@
|
||||
{
|
||||
if (!this.func_176533_e(p_180650_1_, p_180650_2_))
|
||||
{
|
||||
- if (!p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).func_185896_q() || i > 3)
|
||||
+ if (!p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).isSideSolid(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP) || i > 3)
|
||||
{
|
||||
p_180650_1_.func_175698_g(p_180650_2_);
|
||||
}
|
||||
@@ -167,7 +172,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (!this.func_176535_e(p_180650_1_, p_180650_2_.func_177977_b()) && i == 15 && p_180650_4_.nextInt(4) == 0)
|
||||
+ if (!this.canCatchFire(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP) && i == 15 && p_180650_4_.nextInt(4) == 0)
|
||||
{
|
||||
p_180650_1_.func_175698_g(p_180650_2_);
|
||||
return;
|
||||
@@ -182,12 +187,12 @@
|
||||
j = -50;
|
||||
}
|
||||
|
||||
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177974_f(), 300 + j, p_180650_4_, i);
|
||||
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177976_e(), 300 + j, p_180650_4_, i);
|
||||
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177977_b(), 250 + j, p_180650_4_, i);
|
||||
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177984_a(), 250 + j, p_180650_4_, i);
|
||||
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177978_c(), 300 + j, p_180650_4_, i);
|
||||
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177968_d(), 300 + j, p_180650_4_, i);
|
||||
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177974_f(), 300 + j, p_180650_4_, i, EnumFacing.WEST);
|
||||
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177976_e(), 300 + j, p_180650_4_, i, EnumFacing.EAST);
|
||||
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177977_b(), 250 + j, p_180650_4_, i, EnumFacing.UP);
|
||||
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177984_a(), 250 + j, p_180650_4_, i, EnumFacing.DOWN);
|
||||
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177978_c(), 300 + j, p_180650_4_, i, EnumFacing.SOUTH);
|
||||
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177968_d(), 300 + j, p_180650_4_, i, EnumFacing.NORTH);
|
||||
|
||||
for (int k = -1; k <= 1; ++k)
|
||||
{
|
||||
@@ -246,22 +251,30 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+ @Deprecated // Use Block.getFlammability
|
||||
public int func_176532_c(Block p_176532_1_)
|
||||
{
|
||||
Integer integer = this.field_149848_b.get(p_176532_1_);
|
||||
return integer == null ? 0 : integer.intValue();
|
||||
}
|
||||
|
||||
+ @Deprecated // Use Block.getFireSpreadSpeed
|
||||
public int func_176534_d(Block p_176534_1_)
|
||||
{
|
||||
Integer integer = this.field_149849_a.get(p_176534_1_);
|
||||
return integer == null ? 0 : integer.intValue();
|
||||
}
|
||||
|
||||
+ @Deprecated // Use tryCatchFire with face below
|
||||
private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_)
|
||||
{
|
||||
- int i = this.func_176532_c(p_176536_1_.func_180495_p(p_176536_2_).func_177230_c());
|
||||
+ this.tryCatchFire(p_176536_1_, p_176536_2_, p_176536_3_, p_176536_4_, p_176536_5_, EnumFacing.UP);
|
||||
+ }
|
||||
|
||||
+ private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, EnumFacing face)
|
||||
+ {
|
||||
+ int i = p_176536_1_.func_180495_p(p_176536_2_).func_177230_c().getFlammability(p_176536_1_, p_176536_2_, face);
|
||||
+
|
||||
if (p_176536_4_.nextInt(p_176536_3_) < i)
|
||||
{
|
||||
IBlockState iblockstate = p_176536_1_.func_180495_p(p_176536_2_);
|
||||
@@ -293,7 +306,7 @@
|
||||
{
|
||||
for (EnumFacing enumfacing : EnumFacing.values())
|
||||
{
|
||||
- if (this.func_176535_e(p_176533_1_, p_176533_2_.func_177972_a(enumfacing)))
|
||||
+ if (this.canCatchFire(p_176533_1_, p_176533_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -314,7 +327,7 @@
|
||||
|
||||
for (EnumFacing enumfacing : EnumFacing.values())
|
||||
{
|
||||
- i = Math.max(this.func_176534_d(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c()), i);
|
||||
+ i = Math.max(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c().getFireSpreadSpeed(p_176538_1_, p_176538_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()), i);
|
||||
}
|
||||
|
||||
return i;
|
||||
@@ -326,9 +339,10 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+ @Deprecated // Use canCatchFire with face sensitive version below
|
||||
public boolean func_176535_e(IBlockAccess p_176535_1_, BlockPos p_176535_2_)
|
||||
{
|
||||
- return this.func_176534_d(p_176535_1_.func_180495_p(p_176535_2_).func_177230_c()) > 0;
|
||||
+ return canCatchFire(p_176535_1_, p_176535_2_, EnumFacing.UP);
|
||||
}
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
@@ -372,9 +386,9 @@
|
||||
p_180655_2_.func_184134_a((double)((float)p_180655_3_.func_177958_n() + 0.5F), (double)((float)p_180655_3_.func_177956_o() + 0.5F), (double)((float)p_180655_3_.func_177952_p() + 0.5F), SoundEvents.field_187643_bs, SoundCategory.BLOCKS, 1.0F + p_180655_4_.nextFloat(), p_180655_4_.nextFloat() * 0.7F + 0.3F, false);
|
||||
}
|
||||
|
||||
- if (!p_180655_2_.func_180495_p(p_180655_3_.func_177977_b()).func_185896_q() && !Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177977_b()))
|
||||
+ if (!p_180655_2_.func_180495_p(p_180655_3_.func_177977_b()).isSideSolid(p_180655_2_, p_180655_3_.func_177977_b(), EnumFacing.UP) && !Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177977_b(), EnumFacing.UP))
|
||||
{
|
||||
- if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177976_e()))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177976_e(), EnumFacing.EAST))
|
||||
{
|
||||
for (int j = 0; j < 2; ++j)
|
||||
{
|
||||
@@ -385,7 +399,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177974_f()))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177974_f(), EnumFacing.WEST))
|
||||
{
|
||||
for (int k = 0; k < 2; ++k)
|
||||
{
|
||||
@@ -396,7 +410,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177978_c()))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177978_c(), EnumFacing.SOUTH))
|
||||
{
|
||||
for (int l = 0; l < 2; ++l)
|
||||
{
|
||||
@@ -407,7 +421,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177968_d()))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177968_d(), EnumFacing.NORTH))
|
||||
{
|
||||
for (int i1 = 0; i1 < 2; ++i1)
|
||||
{
|
||||
@@ -418,7 +432,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177984_a()))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177984_a(), EnumFacing.DOWN))
|
||||
{
|
||||
for (int j1 = 0; j1 < 2; ++j1)
|
||||
{
|
||||
@@ -462,6 +476,21 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176543_a, field_176545_N, field_176546_O, field_176541_P, field_176539_Q, field_176542_R});
|
||||
}
|
||||
|
||||
+ /*================================= Forge Start ======================================*/
|
||||
+ /**
|
||||
+ * Side sensitive version that calls the block function.
|
||||
+ *
|
||||
+ * @param world The current world
|
||||
+ * @param pos Block position
|
||||
+ * @param face The side the fire is coming from
|
||||
+ * @return True if the face can catch fire.
|
||||
+ */
|
||||
+ public boolean canCatchFire(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
+ {
|
||||
+ return world.func_180495_p(pos).func_177230_c().isFlammable(world, pos, face);
|
||||
+ }
|
||||
+ /*================================= Forge Start ======================================*/
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
@@ -1,64 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockFlowerPot.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFlowerPot.java
|
||||
@@ -152,12 +152,14 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
- return super.func_176196_c(p_176196_1_, p_176196_2_) && p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q();
|
||||
+ IBlockState downState = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
||||
+ return super.func_176196_c(p_176196_1_, p_176196_2_) && (downState.func_185896_q() || downState.func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID);
|
||||
}
|
||||
|
||||
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_)
|
||||
{
|
||||
- if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).func_185896_q())
|
||||
+ IBlockState downState = p_189540_2_.func_180495_p(p_189540_3_.func_177977_b());
|
||||
+ if (!downState.func_185896_q() && downState.func_193401_d(p_189540_2_, p_189540_3_.func_177977_b(), EnumFacing.UP) != BlockFaceShape.SOLID)
|
||||
{
|
||||
this.func_176226_b(p_189540_2_, p_189540_3_, p_189540_1_, 0);
|
||||
p_189540_2_.func_175698_g(p_189540_3_);
|
||||
@@ -166,13 +168,6 @@
|
||||
|
||||
public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_)
|
||||
{
|
||||
- TileEntityFlowerPot tileentityflowerpot = this.func_176442_d(p_180663_1_, p_180663_2_);
|
||||
-
|
||||
- if (tileentityflowerpot != null && tileentityflowerpot.func_145965_a() != null)
|
||||
- {
|
||||
- func_180635_a(p_180663_1_, p_180663_2_, new ItemStack(tileentityflowerpot.func_145965_a(), 1, tileentityflowerpot.func_145966_b()));
|
||||
- }
|
||||
-
|
||||
super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||
}
|
||||
|
||||
@@ -398,6 +393,30 @@
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
|
||||
+
|
||||
+ /*============================FORGE START=====================================*/
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ TileEntityFlowerPot te = world.func_175625_s(pos) instanceof TileEntityFlowerPot ? (TileEntityFlowerPot)world.func_175625_s(pos) : null;
|
||||
+ if (te != null && te.func_145965_a() != null)
|
||||
+ drops.add(new ItemStack(te.func_145965_a(), 1, te.func_145966_b()));
|
||||
+ }
|
||||
+ @Override
|
||||
+ public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
+ {
|
||||
+ if (willHarvest) return true; //If it will harvest, delay deletion of the block until after getDrops
|
||||
+ return super.removedByPlayer(state, world, pos, player, willHarvest);
|
||||
+ }
|
||||
+ @Override
|
||||
+ public void func_180657_a(World world, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack tool)
|
||||
+ {
|
||||
+ super.func_180657_a(world, player, pos, state, te, tool);
|
||||
+ world.func_175698_g(pos);
|
||||
+ }
|
||||
+ /*===========================FORGE END==========================================*/
|
||||
+
|
||||
public static enum EnumFlowerType implements IStringSerializable
|
||||
{
|
||||
EMPTY("empty"),
|
||||
@@ -1,42 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockGrass.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
|
||||
@@ -38,7 +38,8 @@
|
||||
{
|
||||
if (!p_180650_1_.field_72995_K)
|
||||
{
|
||||
- if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).func_185891_c() > 2)
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
|
||||
+ if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).getLightOpacity(p_180650_1_, p_180650_2_.func_177984_a()) > 2)
|
||||
{
|
||||
p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P());
|
||||
}
|
||||
@@ -58,7 +59,7 @@
|
||||
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos.func_177984_a());
|
||||
IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos);
|
||||
|
||||
- if (iblockstate1.func_177230_c() == Blocks.field_150346_d && iblockstate1.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && iblockstate.func_185891_c() <= 2)
|
||||
+ if (iblockstate1.func_177230_c() == Blocks.field_150346_d && iblockstate1.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && iblockstate.getLightOpacity(p_180650_1_, p_180650_2_.func_177984_a()) <= 2)
|
||||
{
|
||||
p_180650_1_.func_175656_a(blockpos, Blocks.field_150349_c.func_176223_P());
|
||||
}
|
||||
@@ -96,18 +97,11 @@
|
||||
{
|
||||
if (j >= i / 16)
|
||||
{
|
||||
- if (p_176474_1_.func_180495_p(blockpos1).func_177230_c().field_149764_J == Material.field_151579_a)
|
||||
+ if (p_176474_1_.func_175623_d(blockpos1))
|
||||
{
|
||||
if (p_176474_2_.nextInt(8) == 0)
|
||||
{
|
||||
- BlockFlower.EnumFlowerType blockflower$enumflowertype = p_176474_1_.func_180494_b(blockpos1).func_180623_a(p_176474_2_, blockpos1);
|
||||
- BlockFlower blockflower = blockflower$enumflowertype.func_176964_a().func_180346_a();
|
||||
- IBlockState iblockstate = blockflower.func_176223_P().func_177226_a(blockflower.func_176494_l(), blockflower$enumflowertype);
|
||||
-
|
||||
- if (blockflower.func_180671_f(p_176474_1_, blockpos1, iblockstate))
|
||||
- {
|
||||
- p_176474_1_.func_180501_a(blockpos1, iblockstate, 3);
|
||||
- }
|
||||
+ p_176474_1_.func_180494_b(blockpos1).plantFlower(p_176474_1_, p_176474_2_, blockpos1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockHugeMushroom.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockHugeMushroom.java
|
||||
@@ -222,6 +222,20 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176380_a});
|
||||
}
|
||||
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ for (IProperty prop : (java.util.Set<IProperty<?>>)state.func_177228_b().keySet())
|
||||
+ {
|
||||
+ if (prop.func_177701_a().equals("variant"))
|
||||
+ {
|
||||
+ world.func_175656_a(pos, state.func_177231_a(prop));
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
public static enum EnumType implements IStringSerializable
|
||||
{
|
||||
NORTH_WEST(1, "north_west"),
|
||||
@@ -1,29 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockIce.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockIce.java
|
||||
@@ -41,9 +41,14 @@
|
||||
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
|
||||
p_180657_2_.func_71020_j(0.005F);
|
||||
|
||||
- if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0)
|
||||
+ if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_) && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0)
|
||||
{
|
||||
- func_180635_a(p_180657_1_, p_180657_3_, this.func_180643_i(p_180657_4_));
|
||||
+ java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||
+ items.add(this.func_180643_i(p_180657_4_));
|
||||
+
|
||||
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_4_, 0, 1.0f, true, p_180657_2_);
|
||||
+ for (ItemStack is : items)
|
||||
+ func_180635_a(p_180657_1_, p_180657_3_, is);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -54,7 +59,9 @@
|
||||
}
|
||||
|
||||
int i = EnchantmentHelper.func_77506_a(Enchantments.field_185308_t, p_180657_6_);
|
||||
+ harvesters.set(p_180657_2_);
|
||||
this.func_176226_b(p_180657_1_, p_180657_3_, p_180657_4_, i);
|
||||
+ harvesters.set(null);
|
||||
Material material = p_180657_1_.func_180495_p(p_180657_3_.func_177977_b()).func_185904_a();
|
||||
|
||||
if (material.func_76230_c() || material.func_76224_d())
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockLadder.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java
|
||||
@@ -158,6 +158,8 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176382_a});
|
||||
}
|
||||
|
||||
+ @Override public boolean isLadder(IBlockState state, IBlockAccess world, BlockPos pos, EntityLivingBase entity) { return true; }
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
@@ -1,139 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockLeaves.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLeaves.java
|
||||
@@ -17,7 +17,7 @@
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
-public abstract class BlockLeaves extends Block
|
||||
+public abstract class BlockLeaves extends Block implements net.minecraftforge.common.IShearable
|
||||
{
|
||||
public static final PropertyBool field_176237_a = PropertyBool.func_177716_a("decayable");
|
||||
public static final PropertyBool field_176236_b = PropertyBool.func_177716_a("check_decay");
|
||||
@@ -53,9 +53,9 @@
|
||||
BlockPos blockpos = p_180663_2_.func_177982_a(j1, k1, l1);
|
||||
IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos);
|
||||
|
||||
- if (iblockstate.func_185904_a() == Material.field_151584_j && !((Boolean)iblockstate.func_177229_b(field_176236_b)).booleanValue())
|
||||
+ if (iblockstate.func_177230_c().isLeaves(iblockstate, p_180663_1_, blockpos))
|
||||
{
|
||||
- p_180663_1_.func_180501_a(blockpos, iblockstate.func_177226_a(field_176236_b, Boolean.valueOf(true)), 4);
|
||||
+ iblockstate.func_177230_c().beginLeavesDecay(iblockstate, p_180663_1_, blockpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,8 @@
|
||||
this.field_150128_a = new int[32768];
|
||||
}
|
||||
|
||||
- if (p_180650_1_.func_175707_a(new BlockPos(k - 5, l - 5, i1 - 5), new BlockPos(k + 5, l + 5, i1 + 5)))
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, 1)) return; // Forge: prevent decaying leaves from updating neighbors and loading unloaded chunks
|
||||
+ if (p_180650_1_.func_175697_a(p_180650_2_, 6)) // Forge: extend range from 5 to 6 to account for neighbor checks in world.markAndNotifyBlock -> world.updateObservingBlocksAt
|
||||
{
|
||||
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
|
||||
|
||||
@@ -96,9 +97,9 @@
|
||||
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2));
|
||||
Block block = iblockstate.func_177230_c();
|
||||
|
||||
- if (block != Blocks.field_150364_r && block != Blocks.field_150363_s)
|
||||
+ if (!block.canSustainLeaves(iblockstate, p_180650_1_, blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)))
|
||||
{
|
||||
- if (iblockstate.func_185904_a() == Material.field_151584_j)
|
||||
+ if (block.isLeaves(iblockstate, p_180650_1_, blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)))
|
||||
{
|
||||
this.field_150128_a[(i2 + 16) * 1024 + (j2 + 16) * 32 + k2 + 16] = -2;
|
||||
}
|
||||
@@ -205,40 +206,7 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
- if (!p_180653_1_.field_72995_K)
|
||||
- {
|
||||
- int i = this.func_176232_d(p_180653_3_);
|
||||
-
|
||||
- if (p_180653_5_ > 0)
|
||||
- {
|
||||
- i -= 2 << p_180653_5_;
|
||||
-
|
||||
- if (i < 10)
|
||||
- {
|
||||
- i = 10;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (p_180653_1_.field_73012_v.nextInt(i) == 0)
|
||||
- {
|
||||
- Item item = this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_);
|
||||
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item, 1, this.func_180651_a(p_180653_3_)));
|
||||
- }
|
||||
-
|
||||
- i = 200;
|
||||
-
|
||||
- if (p_180653_5_ > 0)
|
||||
- {
|
||||
- i -= 10 << p_180653_5_;
|
||||
-
|
||||
- if (i < 40)
|
||||
- {
|
||||
- i = 40;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- this.func_176234_a(p_180653_1_, p_180653_2_, p_180653_3_, i);
|
||||
- }
|
||||
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
}
|
||||
|
||||
protected void func_176234_a(World p_176234_1_, BlockPos p_176234_2_, IBlockState p_176234_3_, int p_176234_4_)
|
||||
@@ -274,6 +242,51 @@
|
||||
|
||||
public abstract BlockPlanks.EnumType func_176233_b(int p_176233_1_);
|
||||
|
||||
+ @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; }
|
||||
+ @Override public boolean isLeaves(IBlockState state, IBlockAccess world, BlockPos pos){ return true; }
|
||||
+
|
||||
+ @Override
|
||||
+ public void beginLeavesDecay(IBlockState state, World world, BlockPos pos)
|
||||
+ {
|
||||
+ if (!(Boolean)state.func_177229_b(field_176236_b))
|
||||
+ {
|
||||
+ world.func_180501_a(pos, state.func_177226_a(field_176236_b, true), 4);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+ int chance = this.func_176232_d(state);
|
||||
+
|
||||
+ if (fortune > 0)
|
||||
+ {
|
||||
+ chance -= 2 << fortune;
|
||||
+ if (chance < 10) chance = 10;
|
||||
+ }
|
||||
+
|
||||
+ if (rand.nextInt(chance) == 0)
|
||||
+ {
|
||||
+ ItemStack drop = new ItemStack(func_180660_a(state, rand, fortune), 1, func_180651_a(state));
|
||||
+ if (!drop.func_190926_b())
|
||||
+ drops.add(drop);
|
||||
+ }
|
||||
+
|
||||
+ chance = 200;
|
||||
+ if (fortune > 0)
|
||||
+ {
|
||||
+ chance -= 10 << fortune;
|
||||
+ if (chance < 40) chance = 40;
|
||||
+ }
|
||||
+
|
||||
+ this.captureDrops(true);
|
||||
+ if (world instanceof World)
|
||||
+ this.func_176234_a((World)world, pos, state, chance); // Dammet mojang
|
||||
+ drops.addAll(this.captureDrops(false));
|
||||
+ }
|
||||
+
|
||||
+
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean func_176225_a(IBlockState p_176225_1_, IBlockAccess p_176225_2_, BlockPos p_176225_3_, EnumFacing p_176225_4_)
|
||||
{
|
||||
@@ -1,59 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockLiquid.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLiquid.java
|
||||
@@ -284,14 +284,14 @@
|
||||
|
||||
if (integer.intValue() == 0)
|
||||
{
|
||||
- p_176365_1_.func_175656_a(p_176365_2_, Blocks.field_150343_Z.func_176223_P());
|
||||
+ p_176365_1_.func_175656_a(p_176365_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_176365_1_, p_176365_2_, p_176365_2_, Blocks.field_150343_Z.func_176223_P()));
|
||||
this.func_180688_d(p_176365_1_, p_176365_2_);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (integer.intValue() <= 4)
|
||||
{
|
||||
- p_176365_1_.func_175656_a(p_176365_2_, Blocks.field_150347_e.func_176223_P());
|
||||
+ p_176365_1_.func_175656_a(p_176365_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_176365_1_, p_176365_2_, p_176365_2_, Blocks.field_150347_e.func_176223_P()));
|
||||
this.func_180688_d(p_176365_1_, p_176365_2_);
|
||||
return true;
|
||||
}
|
||||
@@ -448,8 +448,39 @@
|
||||
return (float)p_190972_2_.func_177956_o() + func_190973_f(p_190972_0_, p_190972_1_, p_190972_2_);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public float getBlockLiquidHeight(World world, BlockPos pos, IBlockState state, Material material)
|
||||
+ {
|
||||
+ return BlockLiquid.func_190973_f(state, world, pos);
|
||||
+ }
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ @SideOnly (Side.CLIENT)
|
||||
+ public Vec3d getFogColor(World world, BlockPos pos, IBlockState state, Entity entity, Vec3d originalColor, float partialTicks)
|
||||
+ {
|
||||
+ Vec3d viewport = net.minecraft.client.renderer.ActiveRenderInfo.func_178806_a(entity, partialTicks);
|
||||
+
|
||||
+ if (state.func_185904_a().func_76224_d())
|
||||
+ {
|
||||
+ float height = 0.0F;
|
||||
+ if (state.func_177230_c() instanceof BlockLiquid)
|
||||
+ {
|
||||
+ height = func_149801_b(state.func_177229_b(field_176367_b)) - 0.11111111F;
|
||||
+ }
|
||||
+ float f1 = (float) (pos.func_177956_o() + 1) - height;
|
||||
+ if (viewport.field_72448_b > (double)f1)
|
||||
+ {
|
||||
+ BlockPos upPos = pos.func_177984_a();
|
||||
+ IBlockState upState = world.func_180495_p(upPos);
|
||||
+ return upState.func_177230_c().getFogColor(world, upPos, upState, entity, originalColor, partialTicks);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return super.getFogColor(world, pos, state, entity, originalColor, partialTicks);
|
||||
+ }
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockLog.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLog.java
|
||||
@@ -34,9 +34,9 @@
|
||||
{
|
||||
IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos);
|
||||
|
||||
- if (iblockstate.func_185904_a() == Material.field_151584_j && !((Boolean)iblockstate.func_177229_b(BlockLeaves.field_176236_b)).booleanValue())
|
||||
+ if (iblockstate.func_177230_c().isLeaves(iblockstate, p_180663_1_, blockpos))
|
||||
{
|
||||
- p_180663_1_.func_180501_a(blockpos, iblockstate.func_177226_a(BlockLeaves.field_176236_b, Boolean.valueOf(true)), 4);
|
||||
+ iblockstate.func_177230_c().beginLeavesDecay(iblockstate, p_180663_1_, blockpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ @Override public boolean canSustainLeaves(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; }
|
||||
+ @Override public boolean isWood(net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; }
|
||||
+
|
||||
public static enum EnumAxis implements IStringSerializable
|
||||
{
|
||||
X("x"),
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java
|
||||
@@ -40,10 +40,14 @@
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
- int i = 15 + p_180653_1_.field_73012_v.nextInt(15) + p_180653_1_.field_73012_v.nextInt(15);
|
||||
- this.func_180637_b(p_180653_1_, p_180653_2_, i);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public int getExpDrop(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15);
|
||||
+ }
|
||||
+
|
||||
public boolean func_149662_c(IBlockState p_149662_1_)
|
||||
{
|
||||
return false;
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockMushroom.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMushroom.java
|
||||
@@ -89,7 +89,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- return p_180671_1_.func_175699_k(p_180671_2_) < 13 && this.func_185514_i(iblockstate);
|
||||
+ return p_180671_1_.func_175699_k(p_180671_2_) < 13 && iblockstate.func_177230_c().canSustainPlant(iblockstate, p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1,21 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
|
||||
@@ -39,7 +39,8 @@
|
||||
{
|
||||
if (!p_180650_1_.field_72995_K)
|
||||
{
|
||||
- if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).func_185891_c() > 2)
|
||||
+ if (!p_180650_1_.func_175697_a(p_180650_2_, 2)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
|
||||
+ if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).getLightOpacity(p_180650_1_, p_180650_2_.func_177984_a()) > 2)
|
||||
{
|
||||
p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P().func_177226_a(BlockDirt.field_176386_a, BlockDirt.DirtType.DIRT));
|
||||
}
|
||||
@@ -53,7 +54,7 @@
|
||||
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos);
|
||||
IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos.func_177984_a());
|
||||
|
||||
- if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && iblockstate1.func_185891_c() <= 2)
|
||||
+ if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && iblockstate1.getLightOpacity(p_180650_1_, blockpos.func_177984_a()) <= 2)
|
||||
{
|
||||
p_180650_1_.func_175656_a(blockpos, this.func_176223_P());
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockNetherWart.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
|
||||
@@ -42,25 +42,28 @@
|
||||
|
||||
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||
{
|
||||
- return this.func_185514_i(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()));
|
||||
+ return super.func_180671_f(p_180671_1_, p_180671_2_, p_180671_3_);
|
||||
}
|
||||
|
||||
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176486_a)).intValue();
|
||||
|
||||
- if (i < 3 && p_180650_4_.nextInt(10) == 0)
|
||||
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt(10) == 0))
|
||||
{
|
||||
- p_180650_3_ = p_180650_3_.func_177226_a(field_176486_a, Integer.valueOf(i + 1));
|
||||
- p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_, 2);
|
||||
+ IBlockState newState = p_180650_3_.func_177226_a(field_176486_a, Integer.valueOf(i + 1));
|
||||
+ p_180650_1_.func_180501_a(p_180650_2_, newState, 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, newState);
|
||||
}
|
||||
|
||||
super.func_180650_b(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_);
|
||||
}
|
||||
|
||||
+ @SuppressWarnings("unused")
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
- if (!p_180653_1_.field_72995_K)
|
||||
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
+ if (false && !p_180653_1_.field_72995_K)
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
@@ -106,6 +109,23 @@
|
||||
return ((Integer)p_176201_1_.func_177229_b(field_176486_a)).intValue();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+ int count = 1;
|
||||
+
|
||||
+ if (((Integer)state.func_177229_b(field_176486_a)) >= 3)
|
||||
+ {
|
||||
+ count = 2 + rand.nextInt(3) + (fortune > 0 ? rand.nextInt(fortune + 1) : 0);
|
||||
+ }
|
||||
+
|
||||
+ for (int i = 0; i < count; i++)
|
||||
+ {
|
||||
+ drops.add(new ItemStack(Items.field_151075_bm));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
protected BlockStateContainer func_180661_e()
|
||||
{
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176486_a});
|
||||
@@ -1,13 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockNewLeaf.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockNewLeaf.java
|
||||
@@ -106,4 +106,10 @@
|
||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public NonNullList<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ return NonNullList.func_191197_a(1, new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176240_P).func_176839_a() - 4));
|
||||
+ }
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockNote.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockNote.java
|
||||
@@ -63,7 +63,9 @@
|
||||
if (tileentity instanceof TileEntityNote)
|
||||
{
|
||||
TileEntityNote tileentitynote = (TileEntityNote)tileentity;
|
||||
+ int old = tileentitynote.field_145879_a;
|
||||
tileentitynote.func_145877_a();
|
||||
+ if (old == tileentitynote.field_145879_a) return false;
|
||||
tileentitynote.func_175108_a(p_180639_1_, p_180639_2_);
|
||||
p_180639_4_.func_71029_a(StatList.field_188087_U);
|
||||
}
|
||||
@@ -103,6 +105,10 @@
|
||||
|
||||
public boolean func_189539_a(IBlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_)
|
||||
{
|
||||
+ net.minecraftforge.event.world.NoteBlockEvent.Play e = new net.minecraftforge.event.world.NoteBlockEvent.Play(p_189539_2_, p_189539_3_, p_189539_1_, p_189539_5_, p_189539_4_);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(e)) return false;
|
||||
+ p_189539_4_ = e.getInstrument().ordinal();
|
||||
+ p_189539_5_ = e.getVanillaNoteId();
|
||||
float f = (float)Math.pow(2.0D, (double)(p_189539_5_ - 12) / 12.0D);
|
||||
p_189539_2_.func_184133_a((EntityPlayer)null, p_189539_3_, this.func_185576_e(p_189539_4_), SoundCategory.RECORDS, 3.0F, f);
|
||||
p_189539_2_.func_175688_a(EnumParticleTypes.NOTE, (double)p_189539_3_.func_177958_n() + 0.5D, (double)p_189539_3_.func_177956_o() + 1.2D, (double)p_189539_3_.func_177952_p() + 0.5D, (double)p_189539_5_ / 24.0D, 0.0D, 0.0D);
|
||||
@@ -1,15 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockObserver.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockObserver.java
|
||||
@@ -145,4 +145,12 @@
|
||||
{
|
||||
return this.func_176223_P().func_177226_a(field_176387_N, EnumFacing.func_82600_a(p_176203_1_ & 7));
|
||||
}
|
||||
+
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ @Override
|
||||
+ public void observedNeighborChange(IBlockState observerState, World world, BlockPos observerPos, Block changedBlock, BlockPos changedBlockPos)
|
||||
+ {
|
||||
+ func_190962_b(observerState, world, observerPos, changedBlock, changedBlockPos);
|
||||
+ }
|
||||
+ /* ========================================= FORGE END ======================================*/
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
|
||||
@@ -101,11 +101,16 @@
|
||||
if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
|
||||
{
|
||||
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
|
||||
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176239_P)).func_176839_a()));
|
||||
}
|
||||
else
|
||||
{
|
||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public NonNullList<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ return NonNullList.func_191197_a(1, new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176239_P).func_176839_a()));
|
||||
+ }
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockOre.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockOre.java
|
||||
@@ -78,34 +78,39 @@
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
-
|
||||
- if (this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_) != Item.func_150898_a(this))
|
||||
+ }
|
||||
+ @Override
|
||||
+ public int getExpDrop(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+ if (this.func_180660_a(state, rand, fortune) != Item.func_150898_a(this))
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (this == Blocks.field_150365_q)
|
||||
{
|
||||
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 0, 2);
|
||||
+ i = MathHelper.func_76136_a(rand, 0, 2);
|
||||
}
|
||||
else if (this == Blocks.field_150482_ag)
|
||||
{
|
||||
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 3, 7);
|
||||
+ i = MathHelper.func_76136_a(rand, 3, 7);
|
||||
}
|
||||
else if (this == Blocks.field_150412_bA)
|
||||
{
|
||||
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 3, 7);
|
||||
+ i = MathHelper.func_76136_a(rand, 3, 7);
|
||||
}
|
||||
else if (this == Blocks.field_150369_x)
|
||||
{
|
||||
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 2, 5);
|
||||
+ i = MathHelper.func_76136_a(rand, 2, 5);
|
||||
}
|
||||
else if (this == Blocks.field_150449_bY)
|
||||
{
|
||||
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 2, 5);
|
||||
+ i = MathHelper.func_76136_a(rand, 2, 5);
|
||||
}
|
||||
|
||||
- this.func_180637_b(p_180653_1_, p_180653_2_, i);
|
||||
+ return i;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_)
|
||||
@@ -1,39 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockPane.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPane.java
|
||||
@@ -112,7 +112,10 @@
|
||||
|
||||
public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_)
|
||||
{
|
||||
- return p_176221_1_.func_177226_a(field_176241_b, Boolean.valueOf(this.func_193393_b(p_176221_2_, p_176221_2_.func_180495_p(p_176221_3_.func_177978_c()), p_176221_3_.func_177978_c(), EnumFacing.SOUTH))).func_177226_a(field_176243_N, Boolean.valueOf(this.func_193393_b(p_176221_2_, p_176221_2_.func_180495_p(p_176221_3_.func_177968_d()), p_176221_3_.func_177968_d(), EnumFacing.NORTH))).func_177226_a(field_176244_O, Boolean.valueOf(this.func_193393_b(p_176221_2_, p_176221_2_.func_180495_p(p_176221_3_.func_177976_e()), p_176221_3_.func_177976_e(), EnumFacing.EAST))).func_177226_a(field_176242_M, Boolean.valueOf(this.func_193393_b(p_176221_2_, p_176221_2_.func_180495_p(p_176221_3_.func_177974_f()), p_176221_3_.func_177974_f(), EnumFacing.WEST)));
|
||||
+ return p_176221_1_.func_177226_a(field_176241_b, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH))
|
||||
+ .func_177226_a(field_176243_N, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH))
|
||||
+ .func_177226_a(field_176244_O, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST))
|
||||
+ .func_177226_a(field_176242_M, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST));
|
||||
}
|
||||
|
||||
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||
@@ -197,6 +200,24 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176241_b, field_176242_M, field_176244_O, field_176243_N});
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START ======================================== */
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
|
||||
+ {
|
||||
+ BlockPos offset = pos.func_177972_a(facing);
|
||||
+ return func_193393_b(world, world.func_180495_p(offset), offset, facing.func_176734_d());
|
||||
+ }
|
||||
+
|
||||
+ public boolean canPaneConnectTo(IBlockAccess world, BlockPos pos, EnumFacing dir)
|
||||
+ {
|
||||
+ BlockPos other = pos.func_177972_a(dir);
|
||||
+ IBlockState state = world.func_180495_p(other);
|
||||
+ return state.func_177230_c().canBeConnectedTo(world, other, dir.func_176734_d()) || func_193393_b(world, state, other, dir.func_176734_d());
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE END ======================================== */
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return p_193383_4_ != EnumFacing.UP && p_193383_4_ != EnumFacing.DOWN ? BlockFaceShape.MIDDLE_POLE_THIN : BlockFaceShape.CENTER_SMALL;
|
||||
@@ -1,45 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java
|
||||
@@ -241,7 +241,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (!flag1 && iblockstate.func_185904_a() != Material.field_151579_a && func_185646_a(iblockstate, p_189539_2_, blockpos, enumfacing.func_176734_d(), false, enumfacing) && (iblockstate.func_185905_o() == EnumPushReaction.NORMAL || block == Blocks.field_150331_J || block == Blocks.field_150320_F))
|
||||
+ if (!flag1 && !iblockstate.func_177230_c().isAir(iblockstate, p_189539_2_, blockpos) && func_185646_a(iblockstate, p_189539_2_, blockpos, enumfacing.func_176734_d(), false, enumfacing) && (iblockstate.func_185905_o() == EnumPushReaction.NORMAL || block == Blocks.field_150331_J || block == Blocks.field_150320_F))
|
||||
{
|
||||
this.func_176319_a(p_189539_2_, p_189539_3_, enumfacing, false);
|
||||
}
|
||||
@@ -307,7 +307,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- return !block.func_149716_u();
|
||||
+ return !block.hasTileEntity(p_185646_0_);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -353,7 +353,9 @@
|
||||
{
|
||||
BlockPos blockpos1 = list2.get(j);
|
||||
IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos1);
|
||||
- iblockstate.func_177230_c().func_176226_b(p_176319_1_, blockpos1, iblockstate, 0);
|
||||
+ // Forge: With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
|
||||
+ float chance = iblockstate.func_177230_c() instanceof BlockSnow ? -1.0f : 1.0f;
|
||||
+ iblockstate.func_177230_c().func_180653_a(p_176319_1_, blockpos1, iblockstate, chance, 0);
|
||||
p_176319_1_.func_180501_a(blockpos1, Blocks.field_150350_a.func_176223_P(), 4);
|
||||
--k;
|
||||
aiblockstate[k] = iblockstate;
|
||||
@@ -434,6 +436,13 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176387_N, field_176320_b});
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ return !state.func_177229_b(field_176320_b) && super.rotateBlock(world, pos, axis);
|
||||
+ }
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
p_193383_2_ = this.func_176221_a(p_193383_2_, p_193383_1_, p_193383_3_);
|
||||
@@ -1,37 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockPistonMoving.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonMoving.java
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
- if (!p_180653_1_.field_72995_K)
|
||||
+ if (false && !p_180653_1_.field_72995_K) // Forge: Noop this out
|
||||
{
|
||||
TileEntityPiston tileentitypiston = this.func_185589_c(p_180653_1_, p_180653_2_);
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
iblockstate.func_177230_c().func_176226_b(p_180653_1_, p_180653_2_, iblockstate, 0);
|
||||
}
|
||||
}
|
||||
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, 1, p_180653_5_); // mimic vanilla behavior from above and ignore chance
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -210,6 +211,17 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176426_a, field_176425_b});
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ TileEntityPiston tileentitypiston = this.func_185589_c(world, pos);
|
||||
+ if (tileentitypiston != null)
|
||||
+ {
|
||||
+ IBlockState pushed = tileentitypiston.func_174927_b();
|
||||
+ drops.addAll(pushed.func_177230_c().getDrops(world, pos, pushed, fortune)); // use the old method until it gets removed, for backward compatibility
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
@@ -1,20 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockPortal.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPortal.java
|
||||
@@ -111,7 +111,7 @@
|
||||
{
|
||||
BlockPortal.Size blockportal$size = new BlockPortal.Size(p_176548_1_, p_176548_2_, EnumFacing.Axis.X);
|
||||
|
||||
- if (blockportal$size.func_150860_b() && blockportal$size.field_150864_e == 0)
|
||||
+ if (blockportal$size.func_150860_b() && blockportal$size.field_150864_e == 0 && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_1_, p_176548_2_, blockportal$size))
|
||||
{
|
||||
blockportal$size.func_150859_c();
|
||||
return true;
|
||||
@@ -120,7 +120,7 @@
|
||||
{
|
||||
BlockPortal.Size blockportal$size1 = new BlockPortal.Size(p_176548_1_, p_176548_2_, EnumFacing.Axis.Z);
|
||||
|
||||
- if (blockportal$size1.func_150860_b() && blockportal$size1.field_150864_e == 0)
|
||||
+ if (blockportal$size1.func_150860_b() && blockportal$size1.field_150864_e == 0 && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_1_, p_176548_2_, blockportal$size1))
|
||||
{
|
||||
blockportal$size1.func_150859_c();
|
||||
return true;
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockPotato.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPotato.java
|
||||
@@ -27,7 +27,7 @@
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
|
||||
- if (!p_180653_1_.field_72995_K)
|
||||
+ if (false && !p_180653_1_.field_72995_K) //Forge: Moved to getDrops
|
||||
{
|
||||
if (this.func_185525_y(p_180653_3_) && p_180653_1_.field_73012_v.nextInt(50) == 0)
|
||||
{
|
||||
@@ -40,4 +40,12 @@
|
||||
{
|
||||
return field_185534_a[((Integer)p_185496_1_.func_177229_b(this.func_185524_e())).intValue()];
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ if (this.func_185525_y(state) && RANDOM.nextInt(50) == 0)
|
||||
+ drops.add(new ItemStack(Items.field_151170_bI));
|
||||
+ }
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockPumpkin.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
- return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().field_149764_J.func_76222_j() && p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q();
|
||||
+ return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().func_176200_f(p_176196_1_, p_176196_2_) && p_176196_1_.isSideSolid(p_176196_2_.func_177977_b(), EnumFacing.UP);
|
||||
}
|
||||
|
||||
public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_)
|
||||
@@ -1,29 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockQuartz.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockQuartz.java
|
||||
@@ -108,6 +108,26 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176335_a});
|
||||
}
|
||||
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ for (IProperty prop : state.func_177228_b().keySet())
|
||||
+ {
|
||||
+ if (prop.func_177701_a().equals("variant") && prop.func_177699_b() == EnumType.class)
|
||||
+ {
|
||||
+ EnumType current = (EnumType)state.func_177229_b(prop);
|
||||
+ EnumType next = current == EnumType.LINES_X ? EnumType.LINES_Y :
|
||||
+ current == EnumType.LINES_Y ? EnumType.LINES_Z :
|
||||
+ current == EnumType.LINES_Z ? EnumType.LINES_X : current;
|
||||
+ if (next == current)
|
||||
+ return false;
|
||||
+ world.func_175656_a(pos, state.func_177226_a(prop, next));
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
public static enum EnumType implements IStringSerializable
|
||||
{
|
||||
DEFAULT(0, "default", "default"),
|
||||
@@ -1,237 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java
|
||||
@@ -34,7 +34,7 @@
|
||||
public static boolean func_176563_d(IBlockState p_176563_0_)
|
||||
{
|
||||
Block block = p_176563_0_.func_177230_c();
|
||||
- return block == Blocks.field_150448_aq || block == Blocks.field_150318_D || block == Blocks.field_150319_E || block == Blocks.field_150408_cc;
|
||||
+ return block instanceof BlockRailBase;
|
||||
}
|
||||
|
||||
protected BlockRailBase(boolean p_i45389_1_)
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
public AxisAlignedBB func_185496_a(IBlockState p_185496_1_, IBlockAccess p_185496_2_, BlockPos p_185496_3_)
|
||||
{
|
||||
- BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = p_185496_1_.func_177230_c() == this ? (BlockRailBase.EnumRailDirection)p_185496_1_.func_177229_b(this.func_176560_l()) : null;
|
||||
+ BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = p_185496_1_.func_177230_c() == this ? getRailDirection(p_185496_2_, p_185496_3_, p_185496_1_, null) : null;
|
||||
return blockrailbase$enumraildirection != null && blockrailbase$enumraildirection.func_177018_c() ? field_190959_b : field_185590_a;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
- return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q();
|
||||
+ return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).isSideSolid(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP);
|
||||
}
|
||||
|
||||
public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_)
|
||||
@@ -93,32 +93,33 @@
|
||||
{
|
||||
if (!p_189540_2_.field_72995_K)
|
||||
{
|
||||
- BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)p_189540_1_.func_177229_b(this.func_176560_l());
|
||||
+ final IBlockState currentState = p_189540_2_.func_180495_p(p_189540_3_);
|
||||
+ BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = getRailDirection(p_189540_2_, p_189540_3_, currentState.func_177230_c() == this ? currentState : p_189540_1_, null);
|
||||
boolean flag = false;
|
||||
|
||||
- if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).func_185896_q())
|
||||
+ if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).isSideSolid(p_189540_2_, p_189540_3_.func_177977_b(), EnumFacing.UP))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_EAST && !p_189540_2_.func_180495_p(p_189540_3_.func_177974_f()).func_185896_q())
|
||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_EAST && !p_189540_2_.func_180495_p(p_189540_3_.func_177974_f()).isSideSolid(p_189540_2_, p_189540_3_.func_177974_f(), EnumFacing.UP))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- else if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_WEST && !p_189540_2_.func_180495_p(p_189540_3_.func_177976_e()).func_185896_q())
|
||||
+ else if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_WEST && !p_189540_2_.func_180495_p(p_189540_3_.func_177976_e()).isSideSolid(p_189540_2_, p_189540_3_.func_177976_e(), EnumFacing.UP))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- else if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_NORTH && !p_189540_2_.func_180495_p(p_189540_3_.func_177978_c()).func_185896_q())
|
||||
+ else if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_NORTH && !p_189540_2_.func_180495_p(p_189540_3_.func_177978_c()).isSideSolid(p_189540_2_, p_189540_3_.func_177978_c(), EnumFacing.UP))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- else if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_SOUTH && !p_189540_2_.func_180495_p(p_189540_3_.func_177968_d()).func_185896_q())
|
||||
+ else if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.ASCENDING_SOUTH && !p_189540_2_.func_180495_p(p_189540_3_.func_177968_d()).isSideSolid(p_189540_2_, p_189540_3_.func_177968_d(), EnumFacing.UP))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (flag && !p_189540_2_.func_175623_d(p_189540_3_))
|
||||
+ if (flag && !currentState.func_177230_c().isAir(currentState, p_189540_2_, p_189540_3_))
|
||||
{
|
||||
this.func_176226_b(p_189540_2_, p_189540_3_, p_189540_1_, 0);
|
||||
p_189540_2_.func_175698_g(p_189540_3_);
|
||||
@@ -154,7 +155,7 @@
|
||||
{
|
||||
super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||
|
||||
- if (((BlockRailBase.EnumRailDirection)p_180663_3_.func_177229_b(this.func_176560_l())).func_177018_c())
|
||||
+ if (getRailDirection(p_180663_1_, p_180663_2_, p_180663_3_, null).func_177018_c())
|
||||
{
|
||||
p_180663_1_.func_175685_c(p_180663_2_.func_177984_a(), this, false);
|
||||
}
|
||||
@@ -166,8 +167,101 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability
|
||||
public abstract IProperty<BlockRailBase.EnumRailDirection> func_176560_l();
|
||||
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ /**
|
||||
+ * Return true if the rail can make corners.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @return True if the rail can make corners.
|
||||
+ */
|
||||
+ public boolean isFlexibleRail(IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return !this.field_150053_a;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns true if the rail can make up and down slopes.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @return True if the rail can make slopes.
|
||||
+ */
|
||||
+ public boolean canMakeSlopes(IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Return the rail's direction.
|
||||
+ * Can be used to make the cart think the rail is a different shape,
|
||||
+ * for example when making diamond junctions or switches.
|
||||
+ * The cart parameter will often be null unless it it called from EntityMinecart.
|
||||
+ *
|
||||
+ * @param world The world.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @param state The BlockState
|
||||
+ * @param cart The cart asking for the metadata, null if it is not called by EntityMinecart.
|
||||
+ * @return The direction.
|
||||
+ */
|
||||
+ public EnumRailDirection getRailDirection(IBlockAccess world, BlockPos pos, IBlockState state, @javax.annotation.Nullable net.minecraft.entity.item.EntityMinecart cart)
|
||||
+ {
|
||||
+ return state.func_177229_b(func_176560_l());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the max speed of the rail at the specified position.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail, may be null.
|
||||
+ * @param pos Block's position in world
|
||||
+ * @return The max speed of the current rail.
|
||||
+ */
|
||||
+ public float getRailMaxSpeed(World world, net.minecraft.entity.item.EntityMinecart cart, BlockPos pos)
|
||||
+ {
|
||||
+ return 0.4f;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This function is called by any minecart that passes over this rail.
|
||||
+ * It is called once per update tick that the minecart is on the rail.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail.
|
||||
+ * @param pos Block's position in world
|
||||
+ */
|
||||
+ public void onMinecartPass(World world, net.minecraft.entity.item.EntityMinecart cart, BlockPos pos)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Rotate the block. For vanilla blocks this rotates around the axis passed in (generally, it should be the "face" that was hit).
|
||||
+ * Note: for mod blocks, this is up to the block and modder to decide. It is not mandated that it be a rotation around the
|
||||
+ * face, but could be a rotation to orient *to* that face, or a visiting of possible rotations.
|
||||
+ * The method should return true if the rotation was successful though.
|
||||
+ *
|
||||
+ * @param world The world
|
||||
+ * @param pos Block position in world
|
||||
+ * @param axis The axis to rotate around
|
||||
+ * @return True if the rotation was successful, False if the rotation failed, or is not possible
|
||||
+ */
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ for (IProperty prop : state.func_177228_b().keySet())
|
||||
+ {
|
||||
+ if (prop.func_177701_a().equals("shape"))
|
||||
+ {
|
||||
+ world.func_175656_a(pos, state.func_177231_a(prop));
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE END =====================================*/
|
||||
+
|
||||
public static enum EnumRailDirection implements IStringSerializable
|
||||
{
|
||||
NORTH_SOUTH(0, "north_south"),
|
||||
@@ -238,6 +332,7 @@
|
||||
private IBlockState field_180366_e;
|
||||
private final boolean field_150656_f;
|
||||
private final List<BlockPos> field_150657_g = Lists.<BlockPos>newArrayList();
|
||||
+ private final boolean canMakeSlopes;
|
||||
|
||||
public Rail(World p_i45739_2_, BlockPos p_i45739_3_, IBlockState p_i45739_4_)
|
||||
{
|
||||
@@ -245,8 +340,9 @@
|
||||
this.field_180367_c = p_i45739_3_;
|
||||
this.field_180366_e = p_i45739_4_;
|
||||
this.field_180365_d = (BlockRailBase)p_i45739_4_.func_177230_c();
|
||||
- BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)p_i45739_4_.func_177229_b(this.field_180365_d.func_176560_l());
|
||||
- this.field_150656_f = this.field_180365_d.field_150053_a;
|
||||
+ BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = field_180365_d.getRailDirection(p_i45739_2_, p_i45739_3_, p_i45739_4_, null);
|
||||
+ this.field_150656_f = !this.field_180365_d.isFlexibleRail(p_i45739_2_, p_i45739_3_);
|
||||
+ this.canMakeSlopes = this.field_180365_d.canMakeSlopes(p_i45739_2_, p_i45739_3_);
|
||||
this.func_180360_a(blockrailbase$enumraildirection);
|
||||
}
|
||||
|
||||
@@ -438,7 +534,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a()))
|
||||
{
|
||||
@@ -451,7 +547,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a()))
|
||||
{
|
||||
@@ -594,7 +690,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a()))
|
||||
{
|
||||
@@ -607,7 +703,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a()))
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRailDetector.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRailDetector.java
|
||||
@@ -163,6 +163,8 @@
|
||||
{
|
||||
if (((Boolean)p_180641_1_.func_177229_b(field_176574_M)).booleanValue())
|
||||
{
|
||||
+ List<EntityMinecart> carts = this.func_176571_a(p_180641_2_, p_180641_3_, EntityMinecart.class);
|
||||
+ if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
|
||||
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>func_176571_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class);
|
||||
|
||||
if (!list.isEmpty())
|
||||
@@ -1,29 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRailPowered.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRailPowered.java
|
||||
@@ -23,9 +23,17 @@
|
||||
});
|
||||
public static final PropertyBool field_176569_M = PropertyBool.func_177716_a("powered");
|
||||
|
||||
+ private final boolean isActivator;
|
||||
+
|
||||
protected BlockRailPowered()
|
||||
{
|
||||
+ this(false);
|
||||
+ }
|
||||
+
|
||||
+ protected BlockRailPowered(boolean isActivator)
|
||||
+ {
|
||||
super(true);
|
||||
+ this.isActivator = isActivator;
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_177226_a(field_176568_b, BlockRailBase.EnumRailDirection.NORTH_SOUTH).func_177226_a(field_176569_M, Boolean.valueOf(false)));
|
||||
}
|
||||
|
||||
@@ -146,7 +154,7 @@
|
||||
{
|
||||
IBlockState iblockstate = p_176567_1_.func_180495_p(p_176567_2_);
|
||||
|
||||
- if (iblockstate.func_177230_c() != this)
|
||||
+ if (!(iblockstate.func_177230_c() instanceof BlockRailPowered) || isActivator != ((BlockRailPowered)iblockstate.func_177230_c()).isActivator)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
||||
@@ -319,6 +319,21 @@
|
||||
return this.func_176223_P().func_177226_a(field_185512_D, p_180642_8_.func_174811_aO().func_176734_d()).func_177226_a(field_176464_a, Boolean.valueOf(false)).func_177226_a(field_176463_b, BlockRedstoneComparator.Mode.COMPARE);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
|
||||
+ {
|
||||
+ if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World && !((World) world).field_72995_K)
|
||||
+ {
|
||||
+ func_189540_a(world.func_180495_p(pos), (World)world, pos, world.func_180495_p(neighbor).func_177230_c(), neighbor);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean getWeakChanges(IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
public static enum Mode implements IStringSerializable
|
||||
{
|
||||
COMPARE("compare"),
|
||||
@@ -1,54 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneDiode.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneDiode.java
|
||||
@@ -39,12 +39,14 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
- return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() ? super.func_176196_c(p_176196_1_, p_176196_2_) : false;
|
||||
+ IBlockState downState = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
||||
+ return (downState.func_185896_q() || downState.func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID) ? super.func_176196_c(p_176196_1_, p_176196_2_) : false;
|
||||
}
|
||||
|
||||
public boolean func_176409_d(World p_176409_1_, BlockPos p_176409_2_)
|
||||
{
|
||||
- return p_176409_1_.func_180495_p(p_176409_2_.func_177977_b()).func_185896_q();
|
||||
+ IBlockState downState = p_176409_1_.func_180495_p(p_176409_2_.func_177977_b());
|
||||
+ return downState.func_185896_q() || downState.func_193401_d(p_176409_1_, p_176409_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID;
|
||||
}
|
||||
|
||||
public void func_180645_a(World p_180645_1_, BlockPos p_180645_2_, IBlockState p_180645_3_, Random p_180645_4_)
|
||||
@@ -227,6 +229,8 @@
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)p_176400_3_.func_177229_b(field_185512_D);
|
||||
BlockPos blockpos = p_176400_2_.func_177972_a(enumfacing.func_176734_d());
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d()), false).isCanceled())
|
||||
+ return;
|
||||
p_176400_1_.func_190524_a(blockpos, this, p_176400_2_);
|
||||
p_176400_1_.func_175695_a(blockpos, this, enumfacing);
|
||||
}
|
||||
@@ -307,6 +311,25 @@
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ @Override
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ if (super.rotateBlock(world, pos, axis))
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ state = func_180675_k(state);
|
||||
+ world.func_175656_a(pos, state);
|
||||
+
|
||||
+ if (func_176404_e(world, pos, state))
|
||||
+ {
|
||||
+ world.func_175684_a(pos, this, 1);
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
{
|
||||
return p_193383_4_ == EnumFacing.DOWN ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED;
|
||||
@@ -1,22 +0,0 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
||||
@@ -92,12 +92,16 @@
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
+ }
|
||||
|
||||
- if (this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_) != Item.func_150898_a(this))
|
||||
+ @Override
|
||||
+ public int getExpDrop(IBlockState state, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ if (this.func_180660_a(state, RANDOM, fortune) != Item.func_150898_a(this))
|
||||
{
|
||||
- int i = 1 + p_180653_1_.field_73012_v.nextInt(5);
|
||||
- this.func_180637_b(p_180653_1_, p_180653_2_, i);
|
||||
+ return 1 + RANDOM.nextInt(5);
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
Loaded 100 of 2155 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user