mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cc76a3f60 | ||
|
|
ffdeeb95b7 | ||
|
|
58335d7bc0 | ||
|
|
b0c9d7cce9 | ||
|
|
281ef5a152 | ||
|
|
9183c2fa0d | ||
|
|
389751beae | ||
|
|
2b4e3bcf54 | ||
|
|
3dce85c49f | ||
|
|
185ce79a68 | ||
|
|
f777aba227 | ||
|
|
5efa373d7f | ||
|
|
b6cd19b4ae | ||
|
|
fc5573333d | ||
|
|
55fe7c470f | ||
|
|
3ef1d6919c | ||
|
|
e1863383ff | ||
|
|
4dc34b7d5b | ||
|
|
2c8c022034 | ||
|
|
b5b43a5a36 | ||
|
|
c09fe57031 | ||
|
|
68524ddde9 | ||
|
|
55bdd4d937 | ||
|
|
3f089e3add | ||
|
|
ddb90a69d3 | ||
|
|
bdce8d0494 | ||
|
|
734a3d76aa | ||
|
|
a4aa85259e | ||
|
|
ea1c7a7339 | ||
|
|
185f7344fa | ||
|
|
26e4bf92a0 | ||
|
|
68cb017be1 | ||
|
|
68ff1afac1 | ||
|
|
0d448a5e4f | ||
|
|
d9f6659f2c | ||
|
|
bae2ee0420 | ||
|
|
799e864d93 | ||
|
|
aa38f62bae | ||
|
|
06c3e255b3 | ||
|
|
d5e20b13b9 | ||
|
|
c83d4d29e4 | ||
|
|
ee1c06085b | ||
|
|
336d53b692 | ||
|
|
95c58ba75c | ||
|
|
56857cf5e7 | ||
|
|
838998b885 | ||
|
|
a9b3b48273 | ||
|
|
a788e8a475 | ||
|
|
b7e1cc5f6b | ||
|
|
e784a7f606 | ||
|
|
3e9bc3c434 | ||
|
|
dd340b8ef2 | ||
|
|
7deb479676 | ||
|
|
1ab40e0b3f | ||
|
|
283c3d1664 | ||
|
|
5291ea7270 | ||
|
|
0c1c1b65e1 | ||
|
|
b0787e9f40 | ||
|
|
dc0eacb80f | ||
|
|
8c04651301 | ||
|
|
94621fecd1 | ||
|
|
5e392e3300 | ||
|
|
88595dd26b | ||
|
|
4323c6d845 | ||
|
|
81ec8b99ac | ||
|
|
1af7b7603d | ||
|
|
0fd8fa2211 | ||
|
|
5048739b7f | ||
|
|
44f3f9e2d0 | ||
|
|
ed1c55508f | ||
|
|
50e411b82a | ||
|
|
a8a0306f98 | ||
|
|
19b7d26bc2 | ||
|
|
c7940e70ed | ||
|
|
58ede2c80a | ||
|
|
e83e00520f | ||
|
|
9a50c208f0 | ||
|
|
7acb380ba8 | ||
|
|
48fa2f458c | ||
|
|
318fc6ffe8 | ||
|
|
b009cedc0c | ||
|
|
c6dd475610 | ||
|
|
61285a098a | ||
|
|
995a8b8d35 | ||
|
|
5d33697cb1 | ||
|
|
ae09fc6b6d | ||
|
|
cd826f7bcf | ||
|
|
283ece29e8 | ||
|
|
1918148b8e | ||
|
|
e17714583f | ||
|
|
4c05c63a04 | ||
|
|
0bdc2d04b4 | ||
|
|
57d4d60a33 | ||
|
|
731e1920d2 | ||
|
|
7411b444d3 | ||
|
|
ae3d002ac6 | ||
|
|
1bd70ac5ab | ||
|
|
c90b1732e9 | ||
|
|
fcd9582133 | ||
|
|
9d82d822db | ||
|
|
186d91c03f | ||
|
|
eec5809097 | ||
|
|
4582a29ec1 | ||
|
|
2f83234ccb | ||
|
|
bef52c945b | ||
|
|
1de4ad735b | ||
|
|
00fc29d40d | ||
|
|
27afdc8a27 | ||
|
|
eff42f6066 | ||
|
|
b99453d568 | ||
|
|
9f5ce12754 | ||
|
|
cb21e95e0b | ||
|
|
e6f032db1b | ||
|
|
86e9425638 | ||
|
|
53ac33a84c | ||
|
|
5cf2af569f | ||
|
|
a46b7cb67a | ||
|
|
3d78f30d18 | ||
|
|
ad64d383e1 | ||
|
|
0a7f5ff9fa | ||
|
|
ce28c5794d | ||
|
|
e55c7c889b | ||
|
|
0633e8218f | ||
|
|
0fdfe1fd59 | ||
|
|
2cc264645b | ||
|
|
983e0a93db | ||
|
|
d88e4fbf36 | ||
|
|
f79da3edf7 | ||
|
|
8742d74e93 | ||
|
|
ff80ab6a23 | ||
|
|
8c37d642fe | ||
|
|
06a30e9f23 | ||
|
|
650e7dc16e | ||
|
|
d41fad51c2 | ||
|
|
0463949ac3 | ||
|
|
5f0fd4b706 | ||
|
|
201c368325 | ||
|
|
3fe08f149d | ||
|
|
61bea2bfda | ||
|
|
f720140481 | ||
|
|
66a2d38ab8 | ||
|
|
bed266f310 | ||
|
|
719f08ea5e | ||
|
|
3992ea5c59 | ||
|
|
a01c1cdc3a | ||
|
|
7a8ae9f56b | ||
|
|
765efc3c72 | ||
|
|
bc23c1ddb2 | ||
|
|
87e2fcb4e5 | ||
|
|
478b7e7ccc | ||
|
|
0574db134c | ||
|
|
358211ca66 | ||
|
|
c8e5007913 | ||
|
|
943fedb073 | ||
|
|
13ae8e41ee | ||
|
|
ac8b196b8c | ||
|
|
2c3183bdae | ||
|
|
53349603e2 | ||
|
|
c284de366b | ||
|
|
e81c330694 | ||
|
|
790da699dd | ||
|
|
7915397377 | ||
|
|
b2a5d34679 | ||
|
|
73bb18e78b | ||
|
|
9701148819 | ||
|
|
f1dbc8b117 | ||
|
|
b8131e6e67 | ||
|
|
f4598a97f7 | ||
|
|
c90d42973d | ||
|
|
ff0bb8c83c | ||
|
|
e5acea60e6 | ||
|
|
216b536967 | ||
|
|
0a819da0e7 | ||
|
|
bdad2af27b | ||
|
|
60513446fa | ||
|
|
be415091cd | ||
|
|
9067dbf6a0 | ||
|
|
359be1a880 | ||
|
|
99624bf3b5 | ||
|
|
252b94a110 | ||
|
|
448d996a45 | ||
|
|
b9e5dfd286 | ||
|
|
d966746fbf | ||
|
|
89baeb3d5d | ||
|
|
89006458a2 | ||
|
|
389bc1ecea | ||
|
|
1e0437208b | ||
|
|
256bd01e0c | ||
|
|
ef7b035f02 | ||
|
|
83a0dc2ef9 | ||
|
|
c10174d50d | ||
|
|
5a3b375147 | ||
|
|
656ff25ae1 | ||
|
|
19059b054e | ||
|
|
45bc487fc0 | ||
|
|
9c74a31ca2 | ||
|
|
8c3e511538 | ||
|
|
5fb948fb35 | ||
|
|
a14c2233e0 | ||
|
|
f01b87fac7 | ||
|
|
40bdde2043 | ||
|
|
0a8a601877 | ||
|
|
002e29958e | ||
|
|
604987a005 | ||
|
|
7e3e6b1969 | ||
|
|
d821514372 | ||
|
|
37a896fe1b | ||
|
|
e1cdb2e558 | ||
|
|
c30b27fcfe | ||
|
|
9542f51cd0 | ||
|
|
a7b56f0975 | ||
|
|
ed3dc8c7d3 | ||
|
|
ed6ce87c22 | ||
|
|
4bd7427b70 | ||
|
|
0b1196db3f | ||
|
|
b25ed7ef91 | ||
|
|
dc95130526 | ||
|
|
d5ee80a70a | ||
|
|
5dc944c1c3 | ||
|
|
da22fd40bf | ||
|
|
1434419e47 | ||
|
|
3385e62aa7 | ||
|
|
40f2276e88 | ||
|
|
35cd89c00c | ||
|
|
892fea3df9 | ||
|
|
2d32929dc5 | ||
|
|
728b4857c3 | ||
|
|
9fa4641cb0 | ||
|
|
fc04a65a0f | ||
|
|
a93d7d20ee | ||
|
|
b74b72e44c | ||
|
|
850c73b73f | ||
|
|
d736e26e0c | ||
|
|
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 |
No files matched your search
@@ -13,3 +13,4 @@
|
||||
*.pyd binary
|
||||
*.cfg text eol=lf
|
||||
*.py text eol=lf
|
||||
*.jks binary
|
||||
@@ -1,4 +0,0 @@
|
||||
<!-- Thank you for reporting! -->
|
||||
|
||||
<!-- Please go to the forum first for support with crashes and issues. -->
|
||||
<!-- http://www.minecraftforge.net/forum/forum/18-support-bug-reports/ -->
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Want to request a feature?
|
||||
title: ''
|
||||
labels: Feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Please note, feature requests that are submitted as GitHub issues here are rarely implemented. -->
|
||||
<!-- If you'd like to see something in Forge, you should be ready to implement it as a PR. -->
|
||||
<!-- If you're not sure, open a Draft PR or discuss it in the Discord server. -->
|
||||
<!-- Discord: https://discord.gg/UvedJ9m -->
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: Issue report
|
||||
about: Visit the forum first for issues with crashes.
|
||||
title: ''
|
||||
labels: Triage
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Thank you for reporting! -->
|
||||
|
||||
<!-- For support with crashes and issues, please create a post on the forum instead: -->
|
||||
<!-- https://www.minecraftforge.net/forum/forum/18-support-bug-reports/ -->
|
||||
|
||||
**Minecraft Version:** {Minecraft version}
|
||||
|
||||
**Forge Version:** {Forge version. *Version number, not latest/rb*}
|
||||
|
||||
**Logs:** {Link(s) to GitHub Gist with full latest.log and/or crash report}
|
||||
|
||||
**Steps to Reproduce:**
|
||||
1. Do this
|
||||
2. Then do that
|
||||
3. ...
|
||||
|
||||
**Description of issue:**
|
||||
+3
-5
@@ -6,15 +6,15 @@ staleLabel: Stale
|
||||
unmarkComment: false
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 1
|
||||
# Issues with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- Assigned
|
||||
|
||||
pulls:
|
||||
# Number of days of inactivity before a Pull Request becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale Pull Request is closed
|
||||
daysUntilClose: 14
|
||||
# Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- Assigned
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This pull request has been automatically marked as stale because it has not had recent
|
||||
@@ -30,8 +30,6 @@ issues:
|
||||
daysUntilStale: 180
|
||||
# Number of days of inactivity before a stale Issue is closed
|
||||
daysUntilClose: 14
|
||||
# Issues with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels: []
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had activity
|
||||
|
||||
+8
-5
@@ -19,9 +19,16 @@
|
||||
/mdk/build
|
||||
|
||||
#occupational hazards
|
||||
/projects/
|
||||
/projects/mcp/
|
||||
/projects/clean/
|
||||
/projects/forge/
|
||||
/projects/**/build/
|
||||
/projects/**/out/
|
||||
/projects/**/run/
|
||||
/projects/**/*.launch
|
||||
/repo/
|
||||
/buildSrc
|
||||
src/generated/resources/.cache/
|
||||
|
||||
#Patch rejects
|
||||
/patches-/
|
||||
@@ -29,10 +36,6 @@
|
||||
|
||||
# FML changelog
|
||||
changelog.txt
|
||||
/patches_old/
|
||||
/patches_old_bak/
|
||||
/patches/minecraft.old/
|
||||
/projects.old/
|
||||
*.py
|
||||
*.7z
|
||||
/logs/
|
||||
|
||||
@@ -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
+80
-35
@@ -1,6 +1,9 @@
|
||||
@Library('forge-shared-library')_
|
||||
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'gradlewrapper:latest'
|
||||
@@ -8,58 +11,100 @@ pipeline {
|
||||
}
|
||||
}
|
||||
environment {
|
||||
GRADLE_ARGS = --no-daemon' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
||||
GRADLE_ARGS = '--no-daemon --console=plain' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
||||
DISCORD_WEBHOOK = credentials('forge-discord-jenkins-webhook')
|
||||
DISCORD_PREFIX = "Job: Forge Branch: ${BRANCH_NAME} Build: #${BUILD_NUMBER}"
|
||||
JENKINS_HEAD = 'https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('fetch') {
|
||||
steps {
|
||||
git(url: 'https://github.com/MinecraftForge/MinecraftForge.git', changelog: true)
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
cache(maxCacheSize: 250/*MB*/, caches: [
|
||||
[$class: 'ArbitraryFileCache', excludes: 'log.txt', includes: '**/*', path: '${WORKSPACE}/projects/forge/build/extractRangeMap'] //Cache the rangemap to help speed up builds
|
||||
]){
|
||||
stage('buildandtest') {
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue build test'
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
writeChangelog(currentBuild, 'build/changelog.txt')
|
||||
archiveArtifacts artifacts: 'build/changelog.txt', fingerprint: false
|
||||
}
|
||||
stage('notify_start') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
steps {
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Started",
|
||||
successful: true,
|
||||
result: 'ABORTED', //White border
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
environment {
|
||||
FORGE_MAVEN = credentials('forge-maven-forge-user')
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
KEYSTORE = credentials('forge-jenkins-keystore-old')
|
||||
KEYSTORE_KEYPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
}
|
||||
stage('changelog') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} forge:publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
//We're testing so use the test group
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.test.forge/${MYVERSION}'
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, 'build/changelog.txt')
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
environment {
|
||||
FORGE_MAVEN = credentials('forge-maven-forge-user')
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
KEYSTORE = credentials('forge-jenkins-keystore-old')
|
||||
KEYSTORE_KEYPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.forge/${MYVERSION}'
|
||||
}
|
||||
}
|
||||
stage('test_publish_pr') { //Publish to local repo to test full process, but don't include credentials so it can't sign/publish to maven
|
||||
when {
|
||||
changeRequest()
|
||||
}
|
||||
environment {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: 'build/libs/**/*.jar', fingerprint: true
|
||||
junit 'build/test-results/*/*.xml'
|
||||
jacoco sourcePattern: '**/src/*/java'
|
||||
script {
|
||||
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true, onlyIfSuccessful: true, allowEmptyArchive: true
|
||||
//junit 'build/test-results/*/*.xml'
|
||||
//jacoco sourcePattern: '**/src/*/java'
|
||||
|
||||
if (env.CHANGE_ID == null) { // This is unset for non-PRs
|
||||
discordSend(
|
||||
title: "${DISCORD_PREFIX} Finished ${currentBuild.currentResult}",
|
||||
description: '```\n' + getChanges(currentBuild) + '\n```',
|
||||
successful: currentBuild.resultIsBetterOrEqualTo("SUCCESS"),
|
||||
result: currentBuild.currentResult,
|
||||
thumbnail: JENKINS_HEAD,
|
||||
webhookURL: DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+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
-2
@@ -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:
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# How to install Forge: For Players
|
||||
|
||||
Go to [the Forge website](http://files.minecraftforge.net)
|
||||
and select the minecraft version you wish to get forge for from the list.
|
||||
|
||||
You can download the installer for the *Recommended Build* or the
|
||||
*Latest build* there. Latest builds may have newer features but may be
|
||||
more unstable as a result. The installer will attempt to install forge
|
||||
into your vanilla launcher environment, where you can then create a new
|
||||
profile using that version and play the game!
|
||||
|
||||
For support and questions, visit [the Support Forum](http://www.minecraftforge.net/forum/forum/18-support-bug-reports/).
|
||||
|
||||
Here is a short video from Rorax showing how to install and setup Forge:
|
||||
|
||||
[](https://www.youtube.com/watch?v=lB3ArN_-3Oc)
|
||||
|
||||
# How to install Forge: For Modders
|
||||
|
||||
[See the "Getting Started" section in the Forge Documentation](http://mcforge.readthedocs.io/en/latest/gettingstarted/).
|
||||
|
||||
# How to install Forge: For those wishing to work on Forge itself
|
||||
|
||||
If you wish to actually inspect Forge, submit PRs or otherwise work
|
||||
with Forge itself, you're in the right place!
|
||||
|
||||
[See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/).
|
||||
|
||||
## Pull requests
|
||||
|
||||
[See the "Making Changes and Pull Requests" section in the Forge documentation](http://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests).
|
||||
|
||||
### Contributor License Agreement
|
||||
We require all contributors to acknowledge the [Forge Contributor
|
||||
License Agreement](https://cla-assistant.io/MinecraftForge/MinecraftForge). Please ensure you have a valid email address
|
||||
associated with your github account to do this. If you have previously
|
||||
signed it, you should be OK.
|
||||
+672
-244
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,65 @@
|
||||
<img src="assets/Forge_logo.svg">
|
||||
|
||||
MinecraftForge [](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos) [](https://forgedev.flocker.tv/)
|
||||
=============
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
| Version | Support |
|
||||
| ------------- | ------------- |
|
||||
| 1.14.x | Active (latest) |
|
||||
| 1.12.x | Active (stable) |
|
||||
|
||||
* [Download]
|
||||
* [Forum]
|
||||
* [Discord]
|
||||
* [Documentation]
|
||||
|
||||
#### Notes:
|
||||
- Introduced in 1.13 was a new FML, information found [here](NewFML.md).
|
||||
|
||||
# Installing Forge
|
||||
|
||||
Go to [the Forge website](https://files.minecraftforge.net)
|
||||
and select the Minecraft version you wish to get Forge for from the list.
|
||||
|
||||
You can download the installer for the *Recommended Build* or the
|
||||
*Latest build* there. Latest builds may have newer features but may be
|
||||
more unstable as a result. The installer will attempt to install Forge
|
||||
into your vanilla launcher environment, where you can then create a new
|
||||
profile using that version and play the game!
|
||||
|
||||
For support and questions, visit [the Support Forum](https://www.minecraftforge.net/forum/forum/18-support-bug-reports/).
|
||||
|
||||
[Here is a short video from Rorax showing how to install and setup Forge.](https://www.youtube.com/watch?v=lB3ArN_-3Oc)
|
||||
|
||||
# Creating Mods
|
||||
|
||||
[See the "Getting Started" section in the Forge Documentation](https://mcforge.readthedocs.io/en/latest/gettingstarted/).
|
||||
|
||||
# Contribute to Forge
|
||||
|
||||
If you wish to actually inspect Forge, submit PRs or otherwise work
|
||||
with Forge itself, you're in the right place!
|
||||
|
||||
[See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/).
|
||||
|
||||
### Pull requests
|
||||
|
||||
[See the "Making Changes and Pull Requests" section in the Forge documentation](https://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests).
|
||||
|
||||
Please read the contributing guidelines found [here](CONTRIBUTING.md) before making a pull request.
|
||||
|
||||
### Contributor License Agreement
|
||||
We require all contributors to acknowledge the [Forge Contributor
|
||||
License Agreement](https://cla-assistant.io/MinecraftForge/MinecraftForge). Please ensure you have a valid email address
|
||||
associated with your GitHub account to do this. If you have previously
|
||||
signed it, you should be OK.
|
||||
|
||||
#### Donate
|
||||
*Forge is a large project with many collaborators working on it around the clock. Forge is and will always remain free to use and modify. However, it costs money to run such a large project as this, so please consider [becoming a patron](https://www.patreon.com/LexManos) or buying some [cool merch](https://forgedev.flocker.tv/).*
|
||||
|
||||
[Download]: https://files.minecraftforge.net/
|
||||
[Forum]: https://www.minecraftforge.net/forum/
|
||||
[Discord]: https://discord.gg/UvedJ9m
|
||||
[Documentation]: https://mcforge.readthedocs.io
|
||||
File renamed without changes.
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
|
||||
<svg enable-background="new 164.072 372.466 294.41 46.56" version="1.1" viewBox="164.072 372.466 294.41 46.56" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#DFA86A">
|
||||
<polygon points="266.16 417.99 277.12 417.99 277.12 401.05 295.09 401.05 295.09 390.78 277.12 390.78 277.12 383.77 296.18 383.77 296.18 373.5 266.16 373.5"/>
|
||||
<path d="m337.33 378.7c-2.103-2.057-4.629-3.64-7.51-4.704-2.743-1.015-5.786-1.528-9.041-1.528l-0.356 2e-3c-3.362 0-6.503 0.556-9.338 1.651-2.857 1.106-5.357 2.707-7.434 4.761-2.073 2.052-3.714 4.559-4.877 7.45-1.158 2.876-1.748 6.104-1.748 9.59 0 3.417 0.59 6.582 1.753 9.403 1.163 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.834 1.096 5.975 1.651 9.339 1.651h0.023c3.402-0.043 6.57-0.639 9.42-1.772 2.863-1.142 5.375-2.757 7.465-4.804 2.091-2.051 3.742-4.524 4.91-7.358 1.162-2.823 1.75-5.987 1.75-9.402 0-3.487-0.588-6.705-1.748-9.568-1.168-2.874-2.82-5.371-4.913-7.425zm-4.644 16.762c0 1.96-0.302 3.782-0.896 5.413-0.587 1.607-1.42 3.011-2.479 4.167-1.05 1.147-2.335 2.065-3.821 2.728-1.479 0.656-3.164 0.99-5.008 0.99-1.84 0-3.514-0.333-4.973-0.988-1.47-0.662-2.747-1.578-3.799-2.729-1.062-1.156-1.895-2.559-2.479-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.298-3.497 0.887-5.044 0.584-1.536 1.419-2.894 2.479-4.037 1.048-1.132 2.323-2.03 3.792-2.674 1.465-0.642 3.145-0.968 4.988-0.968 1.848 0 3.539 0.326 5.025 0.971 1.481 0.643 2.766 1.541 3.812 2.671 1.062 1.143 1.896 2.501 2.479 4.036 0.589 1.548 0.889 3.245 0.889 5.044z"/>
|
||||
<path d="m376.27 395.65c1.902-2.327 2.867-5.221 2.867-8.603 0-2.614-0.508-4.84-1.506-6.613-0.997-1.762-2.354-3.188-4.035-4.234-1.603-0.995-3.445-1.705-5.482-2.114-1.938-0.388-3.969-0.583-6.037-0.583h-16.021v44.487h10.961v-17.282h2.35l9.447 17.282h13.127l-11.199-18.646c2.262-0.728 4.116-1.964 5.528-3.694zm-19.254-12.223h4.426c0.844 0 1.73 0.054 2.636 0.16 0.784 0.094 1.503 0.283 2.132 0.568 0.496 0.225 0.888 0.553 1.193 0.998 0.283 0.415 0.428 1.031 0.428 1.836 0 0.931-0.16 1.643-0.459 2.06-0.34 0.472-0.771 0.813-1.32 1.046-0.686 0.289-1.459 0.477-2.301 0.554-0.975 0.089-1.963 0.136-2.938 0.136h-3.795l-2e-3 -7.358z"/>
|
||||
<path d="m394.82 386.38c1.05-1.132 2.325-2.03 3.793-2.674 1.464-0.642 3.144-0.968 4.988-0.968 1.843 0 3.611 0.311 5.26 0.921 1.609 0.599 2.992 1.449 4.107 2.531l1.314 1.278 8.019-8.105-1.454-1.298c-2.355-2.103-5.066-3.586-8.058-4.407-2.879-0.789-5.987-1.189-9.247-1.189-3.361 0-6.503 0.556-9.339 1.651-2.856 1.106-5.355 2.707-7.431 4.761-2.074 2.052-3.716 4.559-4.88 7.45-1.158 2.876-1.746 6.104-1.746 9.59 0 3.417 0.59 6.582 1.752 9.403 1.164 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.832 1.096 5.975 1.651 9.339 1.651 6.501 0 12.475-1.432 17.751-4.25l0.979-0.522v-23.814h-19.313v10.27h8.354v6.639c-0.871 0.397-1.834 0.709-2.881 0.933-1.5 0.314-3.127 0.478-4.83 0.478-1.841 0-3.514-0.333-4.973-0.988-1.472-0.662-2.748-1.578-3.801-2.729-1.06-1.156-1.893-2.559-2.478-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.299-3.497 0.887-5.044 0.586-1.54 1.421-2.897 2.479-4.041z"/>
|
||||
<polygon points="437.69 407.72 437.69 400.36 456.41 400.36 456.41 390.09 437.69 390.09 437.69 383.77 457.44 383.77 457.44 373.5 426.72 373.5 426.72 417.99 458.48 417.99 458.48 407.72"/>
|
||||
</g>
|
||||
<path d="m243.63 379.09l-37.842-1.852 46.229-0.034v-3.727h-52.125l-1e-3 7.798v6.201c0 0.115-1.52-9.144-1.87-11.734h-4.098v13.029c0 0.123-1.753-10.888-1.939-12.264h-27.914c1.902 1.648 12.401 10.598 19.865 14.28 3.741 1.846 8.33 1.86 12.414 1.974 2.075 0.06 4.25 0.217 5.803 1.754 2.255 2.236 2.758 5.704 0.814 8.33-1.922 2.594-7.335 3.156-7.335 3.156l-4.509 5.531v6.424h10.251l0.319-6.348 8.863-6.285c-0.946 0.757-3.058 2.783-6.229 7.666-0.717 1.102-1.275 2.306-1.711 3.49 2.238-1.896 6.84-3.194 12.153-3.194 5.307 0 9.903 1.295 12.146 3.188-0.437-1.185-0.994-2.385-1.709-3.483-3.172-4.883-5.284-6.909-6.229-7.666l8.863 6.285 0.32 6.348h9.565v-6.424l-4.507-5.531s-6.675-0.425-8.423-3.156c-5.032-7.869 2.115-20.082 18.836-23.756z" fill="#1E2D41"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
+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
|
||||
=========================
|
||||
|
||||
+113
-56
@@ -1,92 +1,149 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'http://files.minecraftforge.net/maven' }
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
// This is only here while i'm activly developing FG, Remind me to remove when we publically release
|
||||
configurations {
|
||||
classpath.resolutionStrategy {
|
||||
cacheDynamicVersionsFor 10, 'seconds'
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
|
||||
repositories {
|
||||
maven { url ='file://' + file('../repo').absolutePath } //Used by Forge development testing only, you can delete this.
|
||||
}
|
||||
// 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'
|
||||
|
||||
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 {
|
||||
// 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 channel: 'snapshot', version: '20180921-1.13'
|
||||
// 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('test_at.cfg')
|
||||
// accessTransformer = file('src/main/resources/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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
|
||||
// Recommended logging level for the console
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// 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.
|
||||
minecraft 'net.minecraftforge:forge:1.13-15.24.0.0-1.13-pre'
|
||||
// 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@'
|
||||
|
||||
// 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"
|
||||
// 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
|
||||
// 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
|
||||
|
||||
// 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'
|
||||
// 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'
|
||||
|
||||
// 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'
|
||||
// These dependencies get remapped to your current MCP mappings
|
||||
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
|
||||
// for more info...
|
||||
// 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', '1.13'
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion': '1.13'
|
||||
}
|
||||
|
||||
// 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,18 +1,23 @@
|
||||
package com.example.examplemod;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.InterModComms;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLModLoadingContext;
|
||||
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;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@Mod("examplemod")
|
||||
public class ExampleMod
|
||||
@@ -21,36 +26,59 @@ public class ExampleMod
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
public ExampleMod() {
|
||||
// Register the preInit method for modloading
|
||||
FMLModLoadingContext.get().getModEventBus().addListener(this::preInit);
|
||||
// Register the init method for modloading
|
||||
FMLModLoadingContext.get().getModEventBus().addListener(this::init);
|
||||
// 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);
|
||||
|
||||
// Register ourselves for server, registry and other game events we are interested in
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
private void preInit(final FMLPreInitializationEvent event)
|
||||
private void setup(final FMLCommonSetupEvent event)
|
||||
{
|
||||
// some preinit code
|
||||
LOGGER.info("HELLO FROM PREINIT");
|
||||
}
|
||||
|
||||
private void init(final FMLInitializationEvent event)
|
||||
{
|
||||
// some example code
|
||||
LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
|
||||
// register a new block here
|
||||
LOGGER.info("HELLO from Register Block");
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,20 @@
|
||||
# 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 minecraft version (without the 1.)
|
||||
loaderVersion="[13,)" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
||||
updateJSONURL="http://myurl.me/" #optional
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||
loaderVersion="[28,)" #mandatory (28 is current forge version)
|
||||
# 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
|
||||
@@ -19,14 +27,6 @@ logoFile="examplemod.png" #optional
|
||||
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
|
||||
# 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="1.0" #mandatory
|
||||
# A display name for the mod
|
||||
displayName="Example Mod" #mandatory
|
||||
# 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
|
||||
@@ -35,7 +35,6 @@ 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
|
||||
@@ -43,7 +42,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory=true #mandatory
|
||||
# The version range of the dependency
|
||||
versionRange="[14.23.2.0,)" #mandatory
|
||||
versionRange="[28,)" #mandatory
|
||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||
ordering="NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||
@@ -52,6 +51,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.13]"
|
||||
versionRange="[1.14.4]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
side="BOTH"
|
||||
@@ -1 +0,0 @@
|
||||
public net.minecraft.block.Block field_196273_d # LOGGER
|
||||
@@ -7,7 +7,7 @@ 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
|
||||
randomScalaProperty="fishy"
|
||||
# Arbitrary key-value property pairs available to mods
|
||||
[properties]
|
||||
key="value"
|
||||
@@ -25,13 +25,16 @@ key="value"
|
||||
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
|
||||
randomExtraProperty="somevalue"
|
||||
# Arbitrary key-value pairs
|
||||
[inventorysorter.properties]
|
||||
[modproperties.inventorysorter]
|
||||
key="value"
|
||||
# A list of dependencies
|
||||
[[inventorysorter.dependencies]]
|
||||
[[dependencies.inventorysorter]]
|
||||
# the modid of the dependency
|
||||
modid="forge"
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
@@ -39,22 +42,23 @@ key="value"
|
||||
# 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
|
||||
ordering="NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||
side=BOTH
|
||||
side="BOTH"
|
||||
# Here's another dependency
|
||||
[[inventorysorter.dependencies]]
|
||||
[[dependencies.inventorysorter]]
|
||||
modid="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.12.2]"
|
||||
ordering=NONE
|
||||
side=BOTH
|
||||
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"
|
||||
# ${jarVersion} will read the Implementation-Version of the jar file
|
||||
version="${jarVersion}"
|
||||
# ${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
|
||||
|
||||
@@ -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));
|
||||
@@ -913,6 +917,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,15 @@
|
||||
--- a/net/minecraft/advancements/AdvancementManager.java
|
||||
+++ b/net/minecraft/advancements/AdvancementManager.java
|
||||
@@ -36,7 +36,11 @@
|
||||
Map<ResourceLocation, Advancement.Builder> map = Maps.newHashMap();
|
||||
p_212853_1_.forEach((p_223387_1_, p_223387_2_) -> {
|
||||
try {
|
||||
- Advancement.Builder advancement$builder = field_192783_b.fromJson(p_223387_2_, Advancement.Builder.class);
|
||||
+ Advancement.Builder advancement$builder = net.minecraftforge.common.crafting.ConditionalAdvancement.read(field_192783_b, p_223387_1_, p_223387_2_);
|
||||
+ if (advancement$builder == null) {
|
||||
+ field_192782_a.info("Skipping loading advancement {} as it's conditions were not met", p_223387_1_);
|
||||
+ return;
|
||||
+ }
|
||||
map.put(p_223387_1_, advancement$builder);
|
||||
} catch (IllegalArgumentException | JsonParseException jsonparseexception) {
|
||||
field_192782_a.error("Parsing error loading custom advancement {}: {}", p_223387_1_, jsonparseexception.getMessage());
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/advancements/AdvancementRewards.java
|
||||
+++ b/net/minecraft/advancements/AdvancementRewards.java
|
||||
@@ -41,7 +41,7 @@
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
public void func_192113_a(EntityPlayerMP p_192113_1_) {
|
||||
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_186472_a(p_192113_1_).func_204313_a(new BlockPos(p_192113_1_)).func_186471_a();
|
||||
+ LootContext lootcontext = (new LootContext.Builder(p_192113_1_.func_71121_q())).func_186472_a(p_192113_1_).func_204313_a(new BlockPos(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
|
||||
- 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) {
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/advancements/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/advancements/PlayerAdvancements.java
|
||||
@@ -187,6 +187,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();
|
||||
@@ -199,6 +201,7 @@
|
||||
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223620_w)) {
|
||||
this.field_192756_d.func_184103_al().func_148539_a(new TranslationTextComponent("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()));
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -1,15 +1,71 @@
|
||||
--- a/net/minecraft/block/Block.java
|
||||
+++ b/net/minecraft/block/Block.java
|
||||
@@ -74,7 +74,7 @@
|
||||
@@ -75,9 +75,10 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
-public class Block implements IItemProvider {
|
||||
+public class Block extends net.minecraftforge.registries.ForgeRegistryEntry<Block> implements IItemProvider, net.minecraftforge.common.extensions.IForgeBlock {
|
||||
protected static final Logger field_196273_d = LogManager.getLogger();
|
||||
private static final ResourceLocation field_176230_a = new ResourceLocation("air");
|
||||
public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> field_149771_c = new RegistryNamespacedDefaultedByKey<ResourceLocation, Block>(field_176230_a);
|
||||
@@ -502,8 +502,8 @@
|
||||
- public static final ObjectIntIdentityMap<BlockState> field_176229_d = new ObjectIntIdentityMap<>();
|
||||
+ @Deprecated //Forge: Do not use, use GameRegistry
|
||||
+ public static final ObjectIntIdentityMap<BlockState> field_176229_d = net.minecraftforge.registries.GameData.getBlockStateIDMap();
|
||||
private static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
|
||||
private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() {
|
||||
public Boolean load(VoxelShape p_load_1_) {
|
||||
@@ -246,6 +247,10 @@
|
||||
this.field_149765_K = p_i48440_1_.field_200961_i;
|
||||
this.field_208621_p = p_i48440_1_.field_208772_j;
|
||||
this.field_220085_g = p_i48440_1_.field_222381_j;
|
||||
+ this.harvestLevel = p_i48440_1_.harvestLevel;
|
||||
+ this.harvestTool = p_i48440_1_.harvestTool;
|
||||
+ final ResourceLocation lootTableCache = p_i48440_1_.field_222381_j;
|
||||
+ this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i48440_1_.lootTableSupplier != null ? p_i48440_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a());
|
||||
this.field_176227_L = builder.func_206893_a(BlockState::new);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b());
|
||||
}
|
||||
@@ -291,7 +296,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
|
||||
- return this.field_149764_J.func_76222_j() && (p_196253_2_.func_195996_i().func_190926_b() || p_196253_2_.func_195996_i().func_77973_b() != this.func_199767_j());
|
||||
+ return p_196253_1_.func_185904_a().func_76222_j() && (p_196253_2_.func_195996_i().func_190926_b() || p_196253_2_.func_195996_i().func_77973_b() != this.func_199767_j());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -303,8 +308,9 @@
|
||||
return this.field_149789_z;
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: New State sensitive version.
|
||||
public boolean func_149716_u() {
|
||||
- return this instanceof ITileEntityProvider;
|
||||
+ return hasTileEntity(func_176223_P());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -315,7 +321,7 @@
|
||||
@Deprecated
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int func_220058_a(BlockState p_220058_1_, IEnviromentBlockReader p_220058_2_, BlockPos p_220058_3_) {
|
||||
- return p_220058_2_.func_217338_b(p_220058_3_, p_220058_1_.func_185906_d());
|
||||
+ return p_220058_2_.func_217338_b(p_220058_3_, p_220058_1_.getLightValue(p_220058_2_, p_220058_3_));
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -460,10 +466,9 @@
|
||||
|
||||
@Deprecated
|
||||
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
|
||||
- if (this.func_149716_u() && p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c()) {
|
||||
+ if (p_196243_1_.hasTileEntity() && p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c()) {
|
||||
p_196243_2_.func_175713_t(p_196243_3_);
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -472,8 +477,8 @@
|
||||
if (f == -1.0F) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
@@ -20,71 +76,165 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,6 +625,7 @@
|
||||
@@ -483,8 +488,7 @@
|
||||
|
||||
public ResourceLocation func_220068_i() {
|
||||
if (this.field_220085_g == null) {
|
||||
- ResourceLocation resourcelocation = Registry.field_212618_g.func_177774_c(this);
|
||||
- this.field_220085_g = new ResourceLocation(resourcelocation.func_110624_b(), "blocks/" + resourcelocation.func_110623_a());
|
||||
+ this.field_220085_g = this.lootTableSupplier.get();
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -553,7 +557,7 @@
|
||||
}
|
||||
|
||||
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
|
||||
- if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
|
||||
+ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f) && !p_180635_0_.restoringBlockSnapshots) { // do not drop items while restoring blockstates, prevents item dupe
|
||||
float f = 0.5F;
|
||||
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
@@ -565,7 +569,7 @@
|
||||
}
|
||||
|
||||
public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
|
||||
- if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
|
||||
+ if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f) && !p_180637_1_.restoringBlockSnapshots) { // do not drop items while restoring blockstates, prevents item dupe
|
||||
while(p_180637_3_ > 0) {
|
||||
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
|
||||
p_180637_3_ -= i;
|
||||
@@ -575,6 +579,7 @@
|
||||
|
||||
}
|
||||
|
||||
+ @Deprecated //Use state sensitive version
|
||||
protected boolean func_149700_E() {
|
||||
return this.func_176223_P().func_185917_h() && !this.func_149716_u();
|
||||
+ @Deprecated //Forge: State sensitive version
|
||||
public float func_149638_a() {
|
||||
return this.field_149781_w;
|
||||
}
|
||||
@@ -755,6 +756,7 @@
|
||||
@@ -677,6 +682,7 @@
|
||||
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
|
||||
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
@@ -690,6 +696,7 @@
|
||||
return Fluids.field_204541_a.func_207188_f();
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Use more sensitive version
|
||||
public float func_208618_m() {
|
||||
return this.field_149765_K;
|
||||
}
|
||||
@@ -710,6 +717,7 @@
|
||||
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Use more sensitive version
|
||||
public boolean func_149659_a(Explosion p_149659_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -754,6 +762,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Use more sensitive version {@link IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity) }
|
||||
public SoundType func_185467_w() {
|
||||
public SoundType func_220072_p(BlockState p_220072_1_) {
|
||||
return this.field_149762_H;
|
||||
}
|
||||
@@ -1604,4 +1606,56 @@
|
||||
return Objects.hash(this.field_212164_a, this.field_212165_b, this.field_212166_c);
|
||||
@@ -763,7 +772,7 @@
|
||||
this.field_220086_i = Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
- return this.field_220086_i;
|
||||
+ return this.field_220086_i.delegate.get(); //Forge: Vanilla caches the items, update with registry replacements.
|
||||
}
|
||||
|
||||
public boolean func_208619_r() {
|
||||
@@ -771,7 +780,7 @@
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
- return "Block{" + Registry.field_212618_g.func_177774_c(this) + "}";
|
||||
+ return "Block{" + getRegistryName() + "}";
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -779,13 +788,81 @@
|
||||
}
|
||||
|
||||
public static boolean func_196252_e(Block p_196252_0_) {
|
||||
- return p_196252_0_ == Blocks.field_150348_b || p_196252_0_ == Blocks.field_196650_c || p_196252_0_ == Blocks.field_196654_e || p_196252_0_ == Blocks.field_196656_g;
|
||||
+ return net.minecraftforge.common.Tags.Blocks.STONE.func_199685_a_(p_196252_0_);
|
||||
}
|
||||
|
||||
public static boolean func_196245_f(Block p_196245_0_) {
|
||||
- return p_196245_0_ == Blocks.field_150346_d || p_196245_0_ == Blocks.field_196660_k || p_196245_0_ == Blocks.field_196661_l;
|
||||
+ return net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(p_196245_0_);
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ private ThreadLocal<IBlockState> silkCheck = new ThreadLocal<>();
|
||||
+ protected Random RANDOM = new Random();
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private int harvestLevel;
|
||||
+ protected static ThreadLocal<Boolean> captureDrops = ThreadLocal.withInitial(() -> false);
|
||||
+ protected static ThreadLocal<NonNullList<ItemStack>> capturedDrops = ThreadLocal.withInitial(NonNullList::func_191196_a);
|
||||
+ protected NonNullList<ItemStack> captureDrops(boolean start)
|
||||
+ {
|
||||
+ if (start) {
|
||||
+ captureDrops.set(true);
|
||||
+ capturedDrops.get().clear();
|
||||
+ return NonNullList.func_191196_a();
|
||||
+ } else {
|
||||
+ captureDrops.set(false);
|
||||
+ return capturedDrops.get();
|
||||
+ }
|
||||
+ }
|
||||
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Block> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, BlockTags::getGeneration, BlockTags::func_199896_a);
|
||||
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
+
|
||||
+ @Override
|
||||
+ public float getSlipperiness(IBlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) {
|
||||
+ public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) {
|
||||
+ return this.field_149765_K;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canSilkHarvest(IBlockState state, IWorldReader world, BlockPos pos, EntityPlayer player) {
|
||||
+ return this.func_149700_E() && !state.hasTileEntity();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onBlockExploded(IBlockState state, World world, BlockPos pos, Explosion explosion) {
|
||||
+ world.func_175698_g(pos);
|
||||
+ func_180652_a(world, pos, explosion);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.ToolType getHarvestTool(IBlockState state) {
|
||||
+ public net.minecraftforge.common.ToolType getHarvestTool(BlockState state) {
|
||||
+ return harvestTool; //TODO: RE-Evaluate
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getHarvestLevel(IBlockState state) {
|
||||
+ public int getHarvestLevel(BlockState state) {
|
||||
+ return harvestLevel; //TODO: RE-Evaluate
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canSustainPlant(BlockState state, IBlockReader world, BlockPos pos, Direction facing, net.minecraftforge.common.IPlantable plantable) {
|
||||
+ BlockState plant = plantable.getPlant(world, pos.func_177972_a(facing));
|
||||
+ net.minecraftforge.common.PlantType type = plantable.getPlantType(world, pos.func_177972_a(facing));
|
||||
+
|
||||
+ if (plant.func_177230_c() == Blocks.field_150434_aF)
|
||||
+ return this.getBlock() == Blocks.field_150434_aF || this.getBlock() == Blocks.field_150354_m || this.getBlock() == Blocks.field_196611_F;
|
||||
+
|
||||
+ if (plant.func_177230_c() == Blocks.field_196608_cF && this == Blocks.field_196608_cF)
|
||||
+ return true;
|
||||
+
|
||||
+ if (plantable instanceof BushBlock && ((BushBlock)plantable).func_200014_a_(state, world, pos))
|
||||
+ return true;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case Desert: return this.getBlock() == Blocks.field_150354_m || this.getBlock() == Blocks.field_150405_ch || this.getBlock() instanceof GlazedTerracottaBlock;
|
||||
+ case Nether: return this.getBlock() == Blocks.field_150425_aM;
|
||||
+ case Crop: return this.getBlock() == Blocks.field_150458_ak;
|
||||
+ case Cave: return Block.func_220056_d(state, world, pos, Direction.UP);
|
||||
+ case Plains: return this.getBlock() == Blocks.field_196658_i || Block.func_196245_f(this) || this.getBlock() == Blocks.field_150458_ak;
|
||||
+ case Water: return state.func_185904_a() == Material.field_151586_h; //&& state.getValue(BlockLiquidWrapper)
|
||||
+ case Beach:
|
||||
+ boolean isBeach = this.getBlock() == Blocks.field_196658_i || Block.func_196245_f(this) || this.getBlock() == Blocks.field_150354_m;
|
||||
+ boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_185904_a() == Material.field_151586_h ||
|
||||
+ world.func_180495_p(pos.func_177976_e()).func_185904_a() == Material.field_151586_h ||
|
||||
+ world.func_180495_p(pos.func_177978_c()).func_185904_a() == Material.field_151586_h ||
|
||||
+ world.func_180495_p(pos.func_177968_d()).func_185904_a() == Material.field_151586_h);
|
||||
+ return isBeach && hasWater;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final java.util.Set<ResourceLocation> getTags() {
|
||||
+ return reverseTags.getTagNames();
|
||||
+ }
|
||||
+
|
||||
+ static {
|
||||
+ net.minecraftforge.common.ForgeHooks.setBlockToolSetter((block, tool, level) -> {
|
||||
+ block.harvestTool = tool;
|
||||
@@ -92,4 +242,51 @@
|
||||
+ });
|
||||
+ }
|
||||
+ /* ========================================= FORGE END ======================================*/
|
||||
}
|
||||
+
|
||||
public static enum OffsetType {
|
||||
NONE,
|
||||
XZ,
|
||||
@@ -804,6 +881,9 @@
|
||||
private float field_200961_i = 0.6F;
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_208772_j;
|
||||
+ private int harvestLevel = -1;
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
|
||||
private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
|
||||
this.field_200953_a = p_i48616_1_;
|
||||
@@ -834,6 +914,8 @@
|
||||
block$properties.field_200956_d = p_200950_0_.field_149762_H;
|
||||
block$properties.field_200961_i = p_200950_0_.func_208618_m();
|
||||
block$properties.field_208772_j = p_200950_0_.field_208621_p;
|
||||
+ block$properties.harvestLevel = p_200950_0_.harvestLevel;
|
||||
+ block$properties.harvestTool = p_200950_0_.harvestTool;
|
||||
return block$properties;
|
||||
}
|
||||
|
||||
@@ -882,13 +964,23 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
+ public Block.Properties harvestLevel(int harvestLevel) {
|
||||
+ this.harvestLevel = harvestLevel;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ public Block.Properties harvestTool(net.minecraftforge.common.ToolType harvestTool) {
|
||||
+ this.harvestTool = harvestTool;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
public Block.Properties func_222380_e() {
|
||||
this.field_222381_j = LootTables.field_186419_a;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Block.Properties func_222379_b(Block p_222379_1_) {
|
||||
- this.field_222381_j = p_222379_1_.func_220068_i();
|
||||
+ this.lootTableSupplier = () -> p_222379_1_.delegate.get().func_220068_i();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/net/minecraft/block/BlockState.java
|
||||
+++ b/net/minecraft/block/BlockState.java
|
||||
@@ -51,7 +51,7 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
-public class BlockState extends StateHolder<Block, BlockState> implements IStateHolder<BlockState> {
|
||||
+public class BlockState extends StateHolder<Block, BlockState> implements IStateHolder<BlockState>, net.minecraftforge.common.extensions.IForgeBlockState {
|
||||
@Nullable
|
||||
private BlockState.Cache field_215707_c;
|
||||
private final int field_215708_d;
|
||||
@@ -106,10 +106,14 @@
|
||||
return this.field_215708_d;
|
||||
}
|
||||
|
||||
+ /** @deprecated use {@link BlockState#isAir(IBlockReader, BlockPos) */
|
||||
+ @Deprecated
|
||||
public boolean func_196958_f() {
|
||||
return this.func_177230_c().func_196261_e(this);
|
||||
}
|
||||
|
||||
+ /** @deprecated use {@link BlockState#rotate(IWorld, BlockPos, Rotation) */
|
||||
+ @Deprecated
|
||||
public MaterialColor func_185909_g(IBlockReader p_185909_1_, BlockPos p_185909_2_) {
|
||||
return this.func_177230_c().func_180659_g(this, p_185909_1_, p_185909_2_);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
--- a/net/minecraft/block/Blocks.java
|
||||
+++ b/net/minecraft/block/Blocks.java
|
||||
@@ -13,6 +13,7 @@
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
[email protected]("minecraft")
|
||||
public class Blocks {
|
||||
public static final Block field_150350_a = func_222382_a("air", new AirBlock(Block.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e()));
|
||||
public static final Block field_150348_b = func_222382_a("stone", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_200948_a(1.5F, 6.0F)));
|
||||
@@ -104,7 +105,7 @@
|
||||
public static final Block field_196601_az = func_222382_a("green_bed", new BedBlock(DyeColor.GREEN, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F)));
|
||||
public static final Block field_196550_aA = func_222382_a("red_bed", new BedBlock(DyeColor.RED, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F)));
|
||||
public static final Block field_196551_aB = func_222382_a("black_bed", new BedBlock(DyeColor.BLACK, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F)));
|
||||
- public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
|
||||
+ public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true));
|
||||
public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
|
||||
public static final Block field_150320_F = func_222382_a("sticky_piston", new PistonBlock(true, Block.Properties.func_200945_a(Material.field_76233_E).func_200943_b(0.5F)));
|
||||
public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(Block.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_200943_b(4.0F)));
|
||||
@@ -694,16 +695,4 @@
|
||||
private static Block func_222382_a(String p_222382_0_, Block p_222382_1_) {
|
||||
return Registry.func_218325_a(Registry.field_212618_g, p_222382_0_, p_222382_1_);
|
||||
}
|
||||
-
|
||||
- static {
|
||||
- for(Block block : Registry.field_212618_g) {
|
||||
- for(BlockState blockstate : block.func_176194_O().func_177619_a()) {
|
||||
- blockstate.func_215692_c();
|
||||
- Block.field_176229_d.func_195867_b(blockstate);
|
||||
- }
|
||||
-
|
||||
- block.func_220068_i();
|
||||
- }
|
||||
-
|
||||
- }
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
--- a/net/minecraft/block/BushBlock.java
|
||||
+++ b/net/minecraft/block/BushBlock.java
|
||||
@@ -7,7 +7,7 @@
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
|
||||
-public class BushBlock extends Block {
|
||||
+public class BushBlock extends Block implements net.minecraftforge.common.IPlantable {
|
||||
protected BushBlock(Block.Properties p_i48437_1_) {
|
||||
super(p_i48437_1_);
|
||||
}
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
BlockPos blockpos = p_196260_3_.func_177977_b();
|
||||
+ if (p_196260_1_.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.
|
||||
+ return p_196260_2_.func_180495_p(blockpos).canSustainPlant(p_196260_2_, blockpos, Direction.UP, this);
|
||||
return this.func_200014_a_(p_196260_2_.func_180495_p(blockpos), p_196260_2_, blockpos);
|
||||
}
|
||||
|
||||
@@ -33,4 +35,11 @@
|
||||
public boolean func_200123_i(BlockState p_200123_1_, IBlockReader p_200123_2_, BlockPos p_200123_3_) {
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
|
||||
+ BlockState state = world.func_180495_p(pos);
|
||||
+ if (state.func_177230_c() != this) return func_176223_P();
|
||||
+ return state;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
--- a/net/minecraft/block/CactusBlock.java
|
||||
+++ b/net/minecraft/block/CactusBlock.java
|
||||
@@ -19,7 +19,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class CactusBlock extends Block {
|
||||
+public class CactusBlock extends Block implements net.minecraftforge.common.IPlantable {
|
||||
public static final IntegerProperty field_176587_a = BlockStateProperties.field_208171_X;
|
||||
protected static final VoxelShape field_196400_b = Block.func_208617_a(1.0D, 0.0D, 1.0D, 15.0D, 15.0D, 15.0D);
|
||||
protected static final VoxelShape field_196401_c = Block.func_208617_a(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
|
||||
@@ -30,6 +30,7 @@
|
||||
}
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update
|
||||
if (!p_196267_1_.func_196955_c(p_196267_2_, p_196267_3_)) {
|
||||
p_196267_2_.func_175655_b(p_196267_3_, true);
|
||||
} else {
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
if (i < 3) {
|
||||
int j = p_196267_1_.func_177229_b(field_176587_a);
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
|
||||
if (j == 15) {
|
||||
p_196267_2_.func_175656_a(blockpos, this.func_176223_P());
|
||||
BlockState blockstate = p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
|
||||
@@ -50,7 +52,8 @@
|
||||
} else {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,8 +88,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
- Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c();
|
||||
- return (block == Blocks.field_150434_aF || block == Blocks.field_150354_m || block == Blocks.field_196611_F) && !p_196260_2_.func_180495_p(p_196260_3_.func_177984_a()).func_185904_a().func_76224_d();
|
||||
+ BlockState soil = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
+ return soil.canSustainPlant(p_196260_2_, p_196260_3_.func_177977_b(), Direction.UP, this) && !p_196260_2_.func_180495_p(p_196260_3_.func_177984_a()).func_185904_a().func_76224_d();
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
@@ -104,4 +107,14 @@
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
+ return net.minecraftforge.common.PlantType.Desert;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
|
||||
+ return func_176223_P();
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
--- a/net/minecraft/block/ChorusFlowerBlock.java
|
||||
+++ b/net/minecraft/block/ChorusFlowerBlock.java
|
||||
@@ -30,9 +30,9 @@
|
||||
p_196267_2_.func_175655_b(p_196267_3_, true);
|
||||
} else {
|
||||
BlockPos blockpos = p_196267_3_.func_177984_a();
|
||||
- if (p_196267_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) {
|
||||
+ if (p_196267_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < p_196267_2_.func_201675_m().getHeight()) {
|
||||
int i = p_196267_1_.func_177229_b(field_185607_a);
|
||||
- if (i < 5) {
|
||||
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
BlockState blockstate = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b());
|
||||
@@ -57,7 +57,7 @@
|
||||
if (j < 2 || j <= p_196267_4_.nextInt(flag1 ? 5 : 4)) {
|
||||
flag = true;
|
||||
}
|
||||
- } else if (blockstate.func_196958_f()) {
|
||||
+ } else if (blockstate.isAir(p_196267_2_, p_196267_3_.func_177977_b())) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
} else {
|
||||
this.func_185605_c(p_196267_2_, p_196267_3_);
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
Block block = blockstate.func_177230_c();
|
||||
if (block != this.field_196405_b && block != Blocks.field_150377_bs) {
|
||||
- if (!blockstate.func_196958_f()) {
|
||||
+ if (!blockstate.isAir(p_196260_2_, p_196260_3_.func_177977_b())) {
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = false;
|
||||
@@ -140,7 +140,7 @@
|
||||
}
|
||||
|
||||
flag = true;
|
||||
- } else if (!blockstate1.func_196958_f()) {
|
||||
+ } else if (!blockstate1.isAir(p_196260_2_, p_196260_3_.func_177972_a(direction))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/block/CocoaBlock.java
|
||||
+++ b/net/minecraft/block/CocoaBlock.java
|
||||
@@ -30,10 +30,11 @@
|
||||
}
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
- if (p_196267_2_.field_73012_v.nextInt(5) == 0) {
|
||||
+ if (true) {
|
||||
int i = p_196267_1_.func_177229_b(field_176501_a);
|
||||
- if (i < 2) {
|
||||
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_2_.field_73012_v.nextInt(5) == 0)) {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
--- a/net/minecraft/block/ComparatorBlock.java
|
||||
+++ b/net/minecraft/block/ComparatorBlock.java
|
||||
@@ -66,7 +66,7 @@
|
||||
blockstate = p_176397_1_.func_180495_p(blockpos);
|
||||
if (blockstate.func_185912_n()) {
|
||||
i = blockstate.func_185888_a(p_176397_1_, blockpos);
|
||||
- } else if (blockstate.func_196958_f()) {
|
||||
+ } else if (blockstate.isAir(p_176397_1_, blockpos)) {
|
||||
ItemFrameEntity itemframeentity = this.func_176461_a(p_176397_1_, direction, blockpos);
|
||||
if (itemframeentity != null) {
|
||||
i = itemframeentity.func_174866_q();
|
||||
@@ -152,4 +152,16 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean getWeakChanges(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onNeighborChange(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, BlockPos neighbor) {
|
||||
+ if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World && !((World)world).func_201670_d()) {
|
||||
+ state.func_215697_a((World)world, pos, world.func_180495_p(neighbor).func_177230_c(), neighbor, false);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
--- a/net/minecraft/block/CropsBlock.java
|
||||
+++ b/net/minecraft/block/CropsBlock.java
|
||||
@@ -57,12 +57,14 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_196267_2_.func_201669_a(p_196267_3_, 0) >= 9) {
|
||||
int i = this.func_185527_x(p_196267_1_);
|
||||
if (i < this.func_185526_g()) {
|
||||
float f = func_180672_a(this, p_196267_2_, p_196267_3_);
|
||||
- if (p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, this.func_185528_e(i + 1), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,9 +93,9 @@
|
||||
for(int j = -1; j <= 1; ++j) {
|
||||
float f1 = 0.0F;
|
||||
BlockState blockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
|
||||
- if (blockstate.func_177230_c() == Blocks.field_150458_ak) {
|
||||
+ if (blockstate.canSustainPlant(p_180672_1_, blockpos.func_177982_a(i, 0, j), net.minecraft.util.Direction.UP, (net.minecraftforge.common.IPlantable)p_180672_0_)) {
|
||||
f1 = 1.0F;
|
||||
- if (blockstate.func_177229_b(FarmlandBlock.field_176531_a) > 0) {
|
||||
+ if (blockstate.isFertile(p_180672_1_, blockpos.func_177982_a(i, 0, j))) {
|
||||
f1 = 3.0F;
|
||||
}
|
||||
}
|
||||
@@ -129,7 +131,7 @@
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
- if (p_196262_4_ instanceof RavagerEntity && p_196262_2_.func_82736_K().func_223586_b(GameRules.field_223599_b)) {
|
||||
+ if (p_196262_4_ instanceof RavagerEntity && net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_196262_2_, p_196262_4_)) {
|
||||
p_196262_2_.func_175655_b(p_196262_3_, true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/DeadBushBlock.java
|
||||
+++ b/net/minecraft/block/DeadBushBlock.java
|
||||
@@ -5,7 +5,7 @@
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
||||
-public class DeadBushBlock extends BushBlock {
|
||||
+public class DeadBushBlock extends BushBlock implements net.minecraftforge.common.IShearable {
|
||||
protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
|
||||
|
||||
protected DeadBushBlock(Block.Properties p_i48418_1_) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/DetectorRailBlock.java
|
||||
+++ b/net/minecraft/block/DetectorRailBlock.java
|
||||
@@ -128,6 +128,8 @@
|
||||
|
||||
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) {
|
||||
if (p_180641_1_.func_177229_b(field_176574_M)) {
|
||||
+ List<AbstractMinecartEntity> carts = this.func_200878_a(p_180641_2_, p_180641_3_, AbstractMinecartEntity.class, null);
|
||||
+ if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
|
||||
List<MinecartCommandBlockEntity> list = this.func_200878_a(p_180641_2_, p_180641_3_, MinecartCommandBlockEntity.class, (Predicate<Entity>)null);
|
||||
if (!list.isEmpty()) {
|
||||
return list.get(0).func_145822_e().func_145760_g();
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/block/DoublePlantBlock.java
|
||||
+++ b/net/minecraft/block/DoublePlantBlock.java
|
||||
@@ -39,7 +39,7 @@
|
||||
@Nullable
|
||||
public BlockState func_196258_a(BlockItemUseContext p_196258_1_) {
|
||||
BlockPos blockpos = p_196258_1_.func_195995_a();
|
||||
- return blockpos.func_177956_o() < 255 && p_196258_1_.func_195991_k().func_180495_p(blockpos.func_177984_a()).func_196953_a(p_196258_1_) ? super.func_196258_a(p_196258_1_) : null;
|
||||
+ return blockpos.func_177956_o() < p_196258_1_.func_195991_k().func_201675_m().getHeight() - 1 && p_196258_1_.func_195991_k().func_180495_p(blockpos.func_177984_a()).func_196953_a(p_196258_1_) ? super.func_196258_a(p_196258_1_) : null;
|
||||
}
|
||||
|
||||
public void func_180633_a(World p_180633_1_, BlockPos p_180633_2_, BlockState p_180633_3_, LivingEntity p_180633_4_, ItemStack p_180633_5_) {
|
||||
@@ -51,6 +51,7 @@
|
||||
return super.func_196260_a(p_196260_1_, p_196260_2_, p_196260_3_);
|
||||
} else {
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
+ if (p_196260_1_.func_177230_c() != this) return super.func_196260_a(p_196260_1_, p_196260_2_, p_196260_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.
|
||||
return blockstate.func_177230_c() == this && blockstate.func_177229_b(field_176492_b) == DoubleBlockHalf.LOWER;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/DropperBlock.java
|
||||
+++ b/net/minecraft/block/DropperBlock.java
|
||||
@@ -37,7 +37,7 @@
|
||||
p_176439_1_.func_217379_c(1001, p_176439_2_, 0);
|
||||
} else {
|
||||
ItemStack itemstack = dispensertileentity.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_, dispensertileentity, i, itemstack)) {
|
||||
Direction direction = p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a);
|
||||
IInventory iinventory = HopperTileEntity.func_195484_a(p_176439_1_, p_176439_2_.func_177972_a(direction));
|
||||
ItemStack itemstack1;
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/EnchantingTableBlock.java
|
||||
+++ b/net/minecraft/block/EnchantingTableBlock.java
|
||||
@@ -53,7 +53,7 @@
|
||||
if (p_180655_4_.nextInt(16) == 0) {
|
||||
for(int k = 0; k <= 1; ++k) {
|
||||
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);
|
||||
- if (p_180655_2_.func_180495_p(blockpos).func_177230_c() == Blocks.field_150342_X) {
|
||||
+ if (p_180655_2_.func_180495_p(blockpos).getEnchantPowerBonus(p_180655_2_, p_180655_3_) > 0) {
|
||||
if (!p_180655_2_.func_175623_d(p_180655_3_.func_177982_a(i / 2, 0, j / 2))) {
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/block/FallingBlock.java
|
||||
+++ b/net/minecraft/block/FallingBlock.java
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
private void func_176503_e(World p_176503_1_, BlockPos p_176503_2_) {
|
||||
- if (func_185759_i(p_176503_1_.func_180495_p(p_176503_2_.func_177977_b())) && p_176503_2_.func_177956_o() >= 0) {
|
||||
+ if (p_176503_1_.func_175623_d(p_176503_2_.func_177977_b()) || func_185759_i(p_176503_1_.func_180495_p(p_176503_2_.func_177977_b())) && p_176503_2_.func_177956_o() >= 0) {
|
||||
if (!p_176503_1_.field_72995_K) {
|
||||
FallingBlockEntity fallingblockentity = new FallingBlockEntity(p_176503_1_, (double)p_176503_2_.func_177958_n() + 0.5D, (double)p_176503_2_.func_177956_o(), (double)p_176503_2_.func_177952_p() + 0.5D, p_176503_1_.func_180495_p(p_176503_2_));
|
||||
this.func_149829_a(fallingblockentity);
|
||||
@@ -68,7 +68,7 @@
|
||||
public void func_180655_c(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) {
|
||||
if (p_180655_4_.nextInt(16) == 0) {
|
||||
BlockPos blockpos = p_180655_3_.func_177977_b();
|
||||
- if (func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
|
||||
+ if (p_180655_2_.func_175623_d(blockpos) || func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
|
||||
double d0 = (double)((float)p_180655_3_.func_177958_n() + p_180655_4_.nextFloat());
|
||||
double d1 = (double)p_180655_3_.func_177956_o() - 0.05D;
|
||||
double d2 = (double)((float)p_180655_3_.func_177952_p() + p_180655_4_.nextFloat());
|
||||
@@ -0,0 +1,33 @@
|
||||
--- a/net/minecraft/block/FarmlandBlock.java
|
||||
+++ b/net/minecraft/block/FarmlandBlock.java
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) {
|
||||
- if (!p_180658_1_.field_72995_K && p_180658_1_.field_73012_v.nextFloat() < p_180658_4_ - 0.5F && p_180658_3_ instanceof LivingEntity && (p_180658_3_ instanceof PlayerEntity || p_180658_1_.func_82736_K().func_223586_b(GameRules.field_223599_b)) && p_180658_3_.func_213311_cf() * p_180658_3_.func_213311_cf() * p_180658_3_.func_213302_cg() > 0.512F) {
|
||||
+ if (!p_180658_1_.field_72995_K && net.minecraftforge.common.ForgeHooks.onFarmlandTrample(p_180658_1_, p_180658_2_, Blocks.field_150346_d.func_176223_P(), p_180658_4_, p_180658_3_)) { // Forge: Move logic to Entity#canTrample
|
||||
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
|
||||
}
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_));
|
||||
}
|
||||
|
||||
- private static boolean func_176529_d(IBlockReader p_176529_0_, BlockPos p_176529_1_) {
|
||||
- Block block = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a()).func_177230_c();
|
||||
- return block instanceof CropsBlock || block instanceof StemBlock || block instanceof AttachedStemBlock;
|
||||
+ private boolean func_176529_d(IBlockReader p_176529_0_, BlockPos p_176529_1_) {
|
||||
+ BlockState state = p_176529_0_.func_180495_p(p_176529_1_.func_177984_a());
|
||||
+ return state.func_177230_c() instanceof net.minecraftforge.common.IPlantable && canSustainPlant(state, p_176529_0_, p_176529_1_, Direction.UP, (net.minecraftforge.common.IPlantable)state.func_177230_c());
|
||||
}
|
||||
|
||||
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return false;
|
||||
+ return net.minecraftforge.common.FarmlandWaterManager.hasBlockWaterTicket(p_176530_0_, p_176530_1_);
|
||||
}
|
||||
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
@@ -0,0 +1,181 @@
|
||||
--- a/net/minecraft/block/FireBlock.java
|
||||
+++ b/net/minecraft/block/FireBlock.java
|
||||
@@ -64,13 +64,13 @@
|
||||
public BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
|
||||
BlockPos blockpos = p_196448_2_.func_177977_b();
|
||||
BlockState blockstate = p_196448_1_.func_180495_p(blockpos);
|
||||
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) {
|
||||
+ if (!this.canCatchFire(p_196448_1_, p_196448_2_, Direction.UP) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) {
|
||||
BlockState blockstate1 = this.func_176223_P();
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
BooleanProperty booleanproperty = field_196449_B.get(direction);
|
||||
if (booleanproperty != null) {
|
||||
- blockstate1 = blockstate1.func_206870_a(booleanproperty, Boolean.valueOf(this.func_196446_i(p_196448_1_.func_180495_p(p_196448_2_.func_177972_a(direction)))));
|
||||
+ blockstate1 = blockstate1.func_206870_a(booleanproperty, Boolean.valueOf(this.canCatchFire(p_196448_1_, p_196448_2_.func_177972_a(direction), direction.func_176734_d())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,12 +91,14 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
if (p_196267_2_.func_82736_K().func_223586_b(GameRules.field_223598_a)) {
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire
|
||||
if (!p_196267_1_.func_196955_c(p_196267_2_, p_196267_3_)) {
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
}
|
||||
|
||||
Block block = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()).func_177230_c();
|
||||
- boolean flag = p_196267_2_.field_73011_w instanceof EndDimension && block == Blocks.field_150357_h || block == Blocks.field_150424_aL || block == Blocks.field_196814_hQ;
|
||||
+ BlockState other = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b());
|
||||
+ boolean flag = other.isFireSource(p_196267_2_, p_196267_3_.func_177977_b(), Direction.UP);
|
||||
int i = p_196267_1_.func_177229_b(field_176543_a);
|
||||
if (!flag && p_196267_2_.func_72896_J() && this.func_176537_d(p_196267_2_, p_196267_3_) && p_196267_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
@@ -118,7 +120,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (i == 15 && p_196267_4_.nextInt(4) == 0 && !this.func_196446_i(p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()))) {
|
||||
+ if (i == 15 && p_196267_4_.nextInt(4) == 0 && !this.canCatchFire(p_196267_2_, p_196267_3_.func_177977_b(), Direction.UP)) {
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
return;
|
||||
}
|
||||
@@ -126,12 +128,12 @@
|
||||
|
||||
boolean flag1 = p_196267_2_.func_180502_D(p_196267_3_);
|
||||
int k = flag1 ? -50 : 0;
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177974_f(), 300 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177976_e(), 300 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177977_b(), 250 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177984_a(), 250 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177978_c(), 300 + k, p_196267_4_, i);
|
||||
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177968_d(), 300 + k, p_196267_4_, i);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177974_f(), 300 + k, p_196267_4_, i, Direction.WEST);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177976_e(), 300 + k, p_196267_4_, i, Direction.EAST);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177977_b(), 250 + k, p_196267_4_, i, Direction.UP);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177984_a(), 250 + k, p_196267_4_, i, Direction.DOWN);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177978_c(), 300 + k, p_196267_4_, i, Direction.SOUTH);
|
||||
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177968_d(), 300 + k, p_196267_4_, i, Direction.NORTH);
|
||||
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
|
||||
|
||||
for(int l = -1; l <= 1; ++l) {
|
||||
@@ -169,16 +171,18 @@
|
||||
return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d());
|
||||
}
|
||||
|
||||
- private int func_220274_q(BlockState p_220274_1_) {
|
||||
+ @Deprecated //Forge: Use IForgeBlockState.getFlammability, Public for default implementation only.
|
||||
+ public int func_220274_q(BlockState p_220274_1_) {
|
||||
return p_220274_1_.func_196959_b(BlockStateProperties.field_208198_y) && p_220274_1_.func_177229_b(BlockStateProperties.field_208198_y) ? 0 : this.field_149848_b.getInt(p_220274_1_.func_177230_c());
|
||||
}
|
||||
|
||||
- private int func_220275_r(BlockState p_220275_1_) {
|
||||
+ @Deprecated //Forge: Use IForgeBlockState.getFireSpreadSpeed
|
||||
+ public int func_220275_r(BlockState p_220275_1_) {
|
||||
return p_220275_1_.func_196959_b(BlockStateProperties.field_208198_y) && p_220275_1_.func_177229_b(BlockStateProperties.field_208198_y) ? 0 : this.field_149849_a.getInt(p_220275_1_.func_177230_c());
|
||||
}
|
||||
|
||||
- private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_) {
|
||||
- int i = this.func_220274_q(p_176536_1_.func_180495_p(p_176536_2_));
|
||||
+ private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, Direction face) {
|
||||
+ int i = p_176536_1_.func_180495_p(p_176536_2_).getFlammability(p_176536_1_, p_176536_2_, face);
|
||||
if (p_176536_4_.nextInt(p_176536_3_) < i) {
|
||||
BlockState blockstate = p_176536_1_.func_180495_p(p_176536_2_);
|
||||
if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) {
|
||||
@@ -199,7 +203,7 @@
|
||||
|
||||
private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) {
|
||||
for(Direction direction : Direction.values()) {
|
||||
- if (this.func_196446_i(p_196447_1_.func_180495_p(p_196447_2_.func_177972_a(direction)))) {
|
||||
+ if (this.canCatchFire(p_196447_1_, p_196447_2_.func_177972_a(direction), direction.func_176734_d())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -215,13 +219,14 @@
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction));
|
||||
- i = Math.max(this.func_220275_r(blockstate), i);
|
||||
+ i = Math.max(blockstate.getFlammability(p_176538_1_, p_176538_2_.func_177972_a(direction), direction.func_176734_d()), i);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: Use canCatchFire with more context
|
||||
public boolean func_196446_i(BlockState p_196446_1_) {
|
||||
return this.func_220275_r(p_196446_1_) > 0;
|
||||
}
|
||||
@@ -246,8 +251,8 @@
|
||||
|
||||
BlockPos blockpos = p_180655_3_.func_177977_b();
|
||||
BlockState blockstate = p_180655_2_.func_180495_p(blockpos);
|
||||
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_180655_2_, blockpos, Direction.UP)) {
|
||||
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177976_e()))) {
|
||||
+ if (!this.canCatchFire(p_180655_2_, blockpos, Direction.UP) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
|
||||
+ if (this.canCatchFire(p_180655_2_, blockpos.func_177976_e(), Direction.EAST)) {
|
||||
for(int j = 0; j < 2; ++j) {
|
||||
double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * (double)0.1F;
|
||||
double d8 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -256,7 +261,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177974_f()))) {
|
||||
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177974_f(), Direction.WEST)) {
|
||||
for(int k = 0; k < 2; ++k) {
|
||||
double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
|
||||
double d9 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -265,7 +270,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177978_c()))) {
|
||||
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177978_c(), Direction.SOUTH)) {
|
||||
for(int l = 0; l < 2; ++l) {
|
||||
double d5 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
|
||||
double d10 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -274,7 +279,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177968_d()))) {
|
||||
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177968_d(), Direction.NORTH)) {
|
||||
for(int i1 = 0; i1 < 2; ++i1) {
|
||||
double d6 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
|
||||
double d11 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
|
||||
@@ -283,7 +288,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177984_a()))) {
|
||||
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177984_a(), Direction.DOWN)) {
|
||||
for(int j1 = 0; j1 < 2; ++j1) {
|
||||
double d7 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
|
||||
double d12 = (double)(p_180655_3_.func_177956_o() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
|
||||
@@ -311,10 +316,23 @@
|
||||
}
|
||||
|
||||
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_, p_180686_2_);
|
||||
this.field_149848_b.put(p_180686_1_, p_180686_3_);
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * 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(IBlockReader world, BlockPos pos, Direction face) {
|
||||
+ return world.func_180495_p(pos).isFlammable(world, pos, face);
|
||||
+ }
|
||||
+
|
||||
public static void func_149843_e() {
|
||||
FireBlock fireblock = (FireBlock)Blocks.field_150480_ab;
|
||||
fireblock.func_180686_a(Blocks.field_196662_n, 5, 20);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/FlowerPotBlock.java
|
||||
+++ b/net/minecraft/block/FlowerPotBlock.java
|
||||
@@ -19,7 +19,7 @@
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FlowerPotBlock extends Block {
|
||||
- private static final Map<Block, Block> field_196451_b = Maps.newHashMap();
|
||||
+ private static final Map<Block, Block> field_196451_b = Maps.newHashMap(); //TODO: Delegates
|
||||
protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D);
|
||||
private final Block field_196452_c;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
--- a/net/minecraft/block/FlowingFluidBlock.java
|
||||
+++ b/net/minecraft/block/FlowingFluidBlock.java
|
||||
@@ -30,9 +30,11 @@
|
||||
|
||||
public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
|
||||
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
|
||||
- protected final FlowingFluid field_204517_c;
|
||||
+ private final FlowingFluid field_204517_c;
|
||||
private final List<IFluidState> field_212565_c;
|
||||
|
||||
+ // Forge: Use the constructor that takes a supplier
|
||||
+ @Deprecated
|
||||
protected FlowingFluidBlock(FlowingFluid p_i49014_1_, Block.Properties p_i49014_2_) {
|
||||
super(p_i49014_2_);
|
||||
this.field_204517_c = p_i49014_1_;
|
||||
@@ -45,8 +47,21 @@
|
||||
|
||||
this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true));
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ supplier = p_i49014_1_.delegate;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @param supplier A fluid supplier such as {@link net.minecraftforge.fml.RegistryObject<Fluid>}
|
||||
+ */
|
||||
+ public FlowingFluidBlock(java.util.function.Supplier<? extends FlowingFluid> supplier, Block.Properties p_i48368_1_) {
|
||||
+ super(p_i48368_1_);
|
||||
+ this.field_204517_c = null;
|
||||
+ this.field_212565_c = Lists.newArrayList();
|
||||
+ this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
|
||||
+ this.supplier = supplier;
|
||||
+ }
|
||||
+
|
||||
public void func_196265_a(BlockState p_196265_1_, World p_196265_2_, BlockPos p_196265_3_, Random p_196265_4_) {
|
||||
p_196265_2_.func_204610_c(p_196265_3_).func_206891_b(p_196265_2_, p_196265_3_, p_196265_4_);
|
||||
}
|
||||
@@ -61,6 +76,7 @@
|
||||
|
||||
public IFluidState func_204507_t(BlockState p_204507_1_) {
|
||||
int i = p_204507_1_.func_177229_b(field_176367_b);
|
||||
+ if (!fluidStateCacheInitialized) initFluidStateCache();
|
||||
return this.field_212565_c.get(Math.min(i, 8));
|
||||
}
|
||||
|
||||
@@ -121,13 +137,13 @@
|
||||
if (flag) {
|
||||
IFluidState ifluidstate = p_204515_1_.func_204610_c(p_204515_2_);
|
||||
if (ifluidstate.func_206889_d()) {
|
||||
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150343_Z.func_176223_P());
|
||||
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150343_Z.func_176223_P()));
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ifluidstate.func_215679_a(p_204515_1_, p_204515_2_) >= 0.44444445F) {
|
||||
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150347_e.func_176223_P());
|
||||
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150347_e.func_176223_P()));
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
@@ -160,4 +176,22 @@
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ private final java.util.function.Supplier<? extends Fluid> supplier;
|
||||
+ public FlowingFluid getFluid() {
|
||||
+ return (FlowingFluid)supplier.get();
|
||||
+ }
|
||||
+
|
||||
+ private boolean fluidStateCacheInitialized;
|
||||
+ protected void initFluidStateCache() {
|
||||
+ this.field_212565_c.add(getFluid().func_207204_a(false));
|
||||
+
|
||||
+ for(int i = 1; i < 8; ++i) {
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8 - i, false));
|
||||
+ }
|
||||
+
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8, true));
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/block/ITileEntityProvider.java
|
||||
+++ b/net/minecraft/block/ITileEntityProvider.java
|
||||
@@ -4,6 +4,7 @@
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
||||
+@Deprecated //Forge: Do not use, use BlockState.hasTileEntity/Block.createTileEntity
|
||||
public interface ITileEntityProvider {
|
||||
@Nullable
|
||||
TileEntity func_196283_a_(IBlockReader p_196283_1_);
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/block/LadderBlock.java
|
||||
+++ b/net/minecraft/block/LadderBlock.java
|
||||
@@ -94,6 +94,11 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
public BlockRenderLayer func_180664_k() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/LeavesBlock.java
|
||||
+++ b/net/minecraft/block/LeavesBlock.java
|
||||
@@ -18,7 +18,7 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
-public class LeavesBlock extends Block {
|
||||
+public class LeavesBlock extends Block implements net.minecraftforge.common.IShearable {
|
||||
public static final IntegerProperty field_208494_a = BlockStateProperties.field_208514_aa;
|
||||
public static final BooleanProperty field_208495_b = BlockStateProperties.field_208515_s;
|
||||
protected static boolean field_196478_c;
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/MushroomBlock.java
|
||||
+++ b/net/minecraft/block/MushroomBlock.java
|
||||
@@ -62,7 +62,7 @@
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(blockpos);
|
||||
Block block = blockstate.func_177230_c();
|
||||
if (block != Blocks.field_150391_bh && block != Blocks.field_196661_l) {
|
||||
- return p_196260_2_.func_201669_a(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos);
|
||||
+ return p_196260_2_.func_201669_a(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/NetherPortalBlock.java
|
||||
+++ b/net/minecraft/block/NetherPortalBlock.java
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
public boolean func_176548_d(IWorld p_176548_1_, BlockPos p_176548_2_) {
|
||||
NetherPortalBlock.Size netherportalblock$size = this.func_201816_b(p_176548_1_, p_176548_2_);
|
||||
- if (netherportalblock$size != null) {
|
||||
+ if (netherportalblock$size != null && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_1_, p_176548_2_, netherportalblock$size)) {
|
||||
netherportalblock$size.func_150859_c();
|
||||
return true;
|
||||
} else {
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/block/NetherWartBlock.java
|
||||
+++ b/net/minecraft/block/NetherWartBlock.java
|
||||
@@ -31,9 +31,10 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
int i = p_196267_1_.func_177229_b(field_176486_a);
|
||||
- if (i < 3 && p_196267_4_.nextInt(10) == 0) {
|
||||
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(10) == 0)) {
|
||||
p_196267_1_ = p_196267_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
@@ -0,0 +1,32 @@
|
||||
--- a/net/minecraft/block/NoteBlock.java
|
||||
+++ b/net/minecraft/block/NoteBlock.java
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
private void func_196482_a(World p_196482_1_, BlockPos p_196482_2_) {
|
||||
- if (p_196482_1_.func_180495_p(p_196482_2_.func_177984_a()).func_196958_f()) {
|
||||
+ if (p_196482_1_.func_175623_d(p_196482_2_.func_177984_a())) {
|
||||
p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
if (p_220051_2_.field_72995_K) {
|
||||
return true;
|
||||
} else {
|
||||
- p_220051_1_ = p_220051_1_.func_177231_a(field_196485_c);
|
||||
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_220051_2_, p_220051_3_, p_220051_1_, p_220051_1_.func_177229_b(field_196485_c), p_220051_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
|
||||
+ if (_new == -1) return false;
|
||||
+ p_220051_1_ = (BlockState)p_220051_1_.func_206870_a(field_196485_c, _new);
|
||||
p_220051_2_.func_180501_a(p_220051_3_, p_220051_1_, 3);
|
||||
this.func_196482_a(p_220051_2_, p_220051_3_);
|
||||
p_220051_4_.func_195066_a(Stats.field_188087_U);
|
||||
@@ -75,6 +77,9 @@
|
||||
}
|
||||
|
||||
public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) {
|
||||
+ 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_1_.func_177229_b(field_196485_c), p_189539_1_.func_177229_b(field_196483_a));
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(e)) return false;
|
||||
+ p_189539_1_ = p_189539_1_.func_206870_a(field_196485_c, e.getVanillaNoteId()).func_206870_a(field_196483_a, e.getInstrument());
|
||||
int i = p_189539_1_.func_177229_b(field_196485_c);
|
||||
float f = (float)Math.pow(2.0D, (double)(i - 12) / 12.0D);
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, p_189539_1_.func_177229_b(field_196483_a).func_208088_a(), SoundCategory.RECORDS, 3.0F, f);
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/block/OreBlock.java
|
||||
+++ b/net/minecraft/block/OreBlock.java
|
||||
@@ -29,12 +29,10 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- if (EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_220062_4_) == 0) {
|
||||
- int i = this.func_220281_a(p_220062_2_.field_73012_v);
|
||||
- if (i > 0) {
|
||||
- this.func_180637_b(p_220062_2_, p_220062_3_, i);
|
||||
- }
|
||||
- }
|
||||
+ }
|
||||
|
||||
+ @Override
|
||||
+ public int getExpDrop(BlockState state, net.minecraft.world.IWorldReader reader, BlockPos pos, int fortune, int silktouch) {
|
||||
+ return silktouch == 0 ? this.func_220281_a(RANDOM) : 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
--- a/net/minecraft/block/PistonBlock.java
|
||||
+++ b/net/minecraft/block/PistonBlock.java
|
||||
@@ -166,6 +166,7 @@
|
||||
}
|
||||
|
||||
if (p_189539_4_ == 0) {
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, true)) return false;
|
||||
if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -173,6 +174,7 @@
|
||||
p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67);
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F);
|
||||
} else if (p_189539_4_ == 1 || p_189539_4_ == 2) {
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, false)) return false;
|
||||
TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction));
|
||||
if (tileentity1 instanceof PistonTileEntity) {
|
||||
((PistonTileEntity)tileentity1).func_145866_f();
|
||||
@@ -197,7 +199,7 @@
|
||||
}
|
||||
|
||||
if (!flag1) {
|
||||
- if (p_189539_4_ != 1 || blockstate.func_196958_f() || !func_185646_a(blockstate, p_189539_2_, blockpos, direction.func_176734_d(), false, direction) || blockstate.func_185905_o() != PushReaction.NORMAL && block != Blocks.field_150331_J && block != Blocks.field_150320_F) {
|
||||
+ if (p_189539_4_ != 1 || blockstate.isAir(p_189539_2_, blockpos) || !func_185646_a(blockstate, p_189539_2_, blockpos, direction.func_176734_d(), false, direction) || blockstate.func_185905_o() != PushReaction.NORMAL && block != Blocks.field_150331_J && block != Blocks.field_150320_F) {
|
||||
p_189539_2_.func_217377_a(p_189539_3_.func_177972_a(direction), false);
|
||||
} else {
|
||||
this.func_176319_a(p_189539_2_, p_189539_3_, direction, false);
|
||||
@@ -210,6 +212,7 @@
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187712_dQ, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.15F + 0.6F);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPistonMovePost(p_189539_2_, p_189539_3_, direction, (p_189539_4_ == 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -238,7 +241,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- return !block.func_149716_u();
|
||||
+ return !p_185646_0_.hasTileEntity();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -274,7 +277,7 @@
|
||||
for(int j = list2.size() - 1; j >= 0; --j) {
|
||||
BlockPos blockpos2 = list2.get(j);
|
||||
BlockState blockstate = p_176319_1_.func_180495_p(blockpos2);
|
||||
- TileEntity tileentity = blockstate.func_177230_c().func_149716_u() ? p_176319_1_.func_175625_s(blockpos2) : null;
|
||||
+ TileEntity tileentity = blockstate.hasTileEntity() ? p_176319_1_.func_175625_s(blockpos2) : null;
|
||||
func_220059_a(blockstate, p_176319_1_, blockpos2, tileentity);
|
||||
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
|
||||
--k;
|
||||
@@ -328,6 +331,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
|
||||
}
|
||||
|
||||
+ public BlockState rotate(BlockState state, net.minecraft.world.IWorld world, BlockPos pos, Rotation direction) {
|
||||
+ return state.func_177229_b(field_176320_b) ? state : super.rotate(state, world, pos, direction);
|
||||
+ }
|
||||
+
|
||||
public BlockState func_185471_a(BlockState p_185471_1_, Mirror p_185471_2_) {
|
||||
return p_185471_1_.func_185907_a(p_185471_2_.func_185800_a(p_185471_1_.func_177229_b(field_176387_N)));
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
--- a/net/minecraft/block/PoweredRailBlock.java
|
||||
+++ b/net/minecraft/block/PoweredRailBlock.java
|
||||
@@ -14,10 +14,16 @@
|
||||
public class PoweredRailBlock extends AbstractRailBlock {
|
||||
public static final EnumProperty<RailShape> field_176568_b = BlockStateProperties.field_208166_S;
|
||||
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
|
||||
+ private final boolean isActivator;
|
||||
|
||||
protected PoweredRailBlock(Block.Properties p_i48349_1_) {
|
||||
- super(true, p_i48349_1_);
|
||||
+ this(p_i48349_1_, false);
|
||||
+ }
|
||||
+
|
||||
+ protected PoweredRailBlock(Block.Properties builder, boolean isActivator) {
|
||||
+ super(true, builder);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false)));
|
||||
+ this.isActivator = isActivator;
|
||||
}
|
||||
|
||||
protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, BlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) {
|
||||
@@ -99,13 +105,13 @@
|
||||
|
||||
protected boolean func_208071_a(World p_208071_1_, BlockPos p_208071_2_, boolean p_208071_3_, int p_208071_4_, RailShape p_208071_5_) {
|
||||
BlockState blockstate = p_208071_1_.func_180495_p(p_208071_2_);
|
||||
- if (blockstate.func_177230_c() != this) {
|
||||
+ if (!(blockstate.func_177230_c() instanceof PoweredRailBlock)) {
|
||||
return false;
|
||||
} else {
|
||||
- RailShape railshape = blockstate.func_177229_b(field_176568_b);
|
||||
+ RailShape railshape = getRailDirection(blockstate, p_208071_1_, p_208071_2_, null);
|
||||
if (p_208071_5_ != RailShape.EAST_WEST || railshape != RailShape.NORTH_SOUTH && railshape != RailShape.ASCENDING_NORTH && railshape != RailShape.ASCENDING_SOUTH) {
|
||||
if (p_208071_5_ != RailShape.NORTH_SOUTH || railshape != RailShape.EAST_WEST && railshape != RailShape.ASCENDING_EAST && railshape != RailShape.ASCENDING_WEST) {
|
||||
- if (blockstate.func_177229_b(field_176569_M)) {
|
||||
+ if (isActivator == ((PoweredRailBlock)blockstate.func_177230_c()).isActivator) {
|
||||
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
|
||||
} else {
|
||||
return false;
|
||||
@@ -0,0 +1,57 @@
|
||||
--- a/net/minecraft/block/RailState.java
|
||||
+++ b/net/minecraft/block/RailState.java
|
||||
@@ -15,14 +15,16 @@
|
||||
private BlockState field_196923_d;
|
||||
private final boolean field_208513_e;
|
||||
private final List<BlockPos> field_196924_e = Lists.newArrayList();
|
||||
+ private final boolean canMakeSlopes;
|
||||
|
||||
public RailState(World p_i47755_1_, BlockPos p_i47755_2_, BlockState p_i47755_3_) {
|
||||
this.field_196920_a = p_i47755_1_;
|
||||
this.field_196921_b = p_i47755_2_;
|
||||
this.field_196923_d = p_i47755_3_;
|
||||
this.field_196922_c = (AbstractRailBlock)p_i47755_3_.func_177230_c();
|
||||
- RailShape railshape = p_i47755_3_.func_177229_b(this.field_196922_c.func_176560_l());
|
||||
- this.field_208513_e = this.field_196922_c.func_208490_b();
|
||||
+ RailShape railshape = this.field_196922_c.getRailDirection(field_196923_d, p_i47755_1_, p_i47755_2_, null);
|
||||
+ this.field_208513_e = !this.field_196922_c.isFlexibleRail(field_196923_d, p_i47755_1_, p_i47755_2_);
|
||||
+ this.canMakeSlopes = this.field_196922_c.canMakeSlopes(field_196923_d, p_i47755_1_, p_i47755_2_);
|
||||
this.func_208509_a(railshape);
|
||||
}
|
||||
|
||||
@@ -178,7 +180,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (railshape == RailShape.NORTH_SOUTH) {
|
||||
+ if (railshape == RailShape.NORTH_SOUTH && canMakeSlopes) {
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_NORTH;
|
||||
}
|
||||
@@ -188,7 +190,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (railshape == RailShape.EAST_WEST) {
|
||||
+ if (railshape == RailShape.EAST_WEST && canMakeSlopes) {
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos3.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_EAST;
|
||||
}
|
||||
@@ -298,7 +300,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (railshape == RailShape.NORTH_SOUTH) {
|
||||
+ if (railshape == RailShape.NORTH_SOUTH && canMakeSlopes) {
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_NORTH;
|
||||
}
|
||||
@@ -308,7 +310,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (railshape == RailShape.EAST_WEST) {
|
||||
+ if (railshape == RailShape.EAST_WEST && canMakeSlopes) {
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos3.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_EAST;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
--- a/net/minecraft/block/RedstoneDiodeBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneDiodeBlock.java
|
||||
@@ -65,7 +65,7 @@
|
||||
if (p_220069_1_.func_196955_c(p_220069_2_, p_220069_3_)) {
|
||||
this.func_176398_g(p_220069_2_, p_220069_3_, p_220069_1_);
|
||||
} else {
|
||||
- TileEntity tileentity = this.func_149716_u() ? p_220069_2_.func_175625_s(p_220069_3_) : null;
|
||||
+ TileEntity tileentity = p_220069_1_.hasTileEntity() ? p_220069_2_.func_175625_s(p_220069_3_) : null;
|
||||
func_220059_a(p_220069_1_, p_220069_2_, p_220069_3_, tileentity);
|
||||
p_220069_2_.func_217377_a(p_220069_3_, false);
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
protected void func_176400_h(World p_176400_1_, BlockPos p_176400_2_, BlockState p_176400_3_) {
|
||||
Direction direction = p_176400_3_.func_177229_b(field_185512_D);
|
||||
BlockPos blockpos = p_176400_2_.func_177972_a(direction.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(direction.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, direction);
|
||||
}
|
||||
@@ -171,7 +173,6 @@
|
||||
protected boolean func_185545_A(BlockState p_185545_1_) {
|
||||
return p_185545_1_.func_185897_m();
|
||||
}
|
||||
-
|
||||
protected int func_176408_a(IBlockReader p_176408_1_, BlockPos p_176408_2_, BlockState p_176408_3_) {
|
||||
return 15;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/block/RedstoneOreBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneOreBlock.java
|
||||
@@ -61,11 +61,11 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- if (EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_220062_4_) == 0) {
|
||||
- int i = 1 + p_220062_2_.field_73012_v.nextInt(5);
|
||||
- this.func_180637_b(p_220062_2_, p_220062_3_, i);
|
||||
- }
|
||||
+ }
|
||||
|
||||
+ @Override
|
||||
+ public int getExpDrop(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, int fortune, int silktouch) {
|
||||
+ return silktouch == 0 ? 1 + RANDOM.nextInt(5) : 0;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -0,0 +1,60 @@
|
||||
--- a/net/minecraft/block/RedstoneWireBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneWireBlock.java
|
||||
@@ -124,7 +124,7 @@
|
||||
BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1);
|
||||
if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) {
|
||||
boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
|
||||
- if (flag && func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177984_a()))) {
|
||||
+ if (flag && canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177984_a()), p_208074_1_, blockpos.func_177984_a(), null)) {
|
||||
if (blockstate.func_224756_o(p_208074_1_, blockpos)) {
|
||||
return RedstoneSide.UP;
|
||||
}
|
||||
@@ -133,7 +133,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return !func_176343_a(blockstate, p_208074_3_) && (blockstate.func_215686_e(p_208074_1_, blockpos) || !func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177977_b()))) ? RedstoneSide.NONE : RedstoneSide.SIDE;
|
||||
+ return !canConnectTo(blockstate, p_208074_1_, blockpos, p_208074_3_) && (blockstate.func_215686_e(p_208074_1_, blockpos) || !canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177977_b()), p_208074_1_, blockpos.func_177977_b(), null)) ? RedstoneSide.NONE : RedstoneSide.SIDE;
|
||||
}
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
@@ -318,26 +318,18 @@
|
||||
boolean flag = blockstate.func_215686_e(p_176339_1_, blockpos);
|
||||
BlockPos blockpos1 = p_176339_2_.func_177984_a();
|
||||
boolean flag1 = p_176339_1_.func_180495_p(blockpos1).func_215686_e(p_176339_1_, blockpos1);
|
||||
- if (!flag1 && flag && func_176340_e(p_176339_1_, blockpos.func_177984_a())) {
|
||||
+ if (!flag1 && flag && canConnectTo(p_176339_1_.func_180495_p(blockpos.func_177984_a()), p_176339_1_, blockpos.func_177984_a(), null)) {
|
||||
return true;
|
||||
- } else if (func_176343_a(blockstate, p_176339_3_)) {
|
||||
+ } else if (canConnectTo(blockstate, p_176339_1_, blockpos, p_176339_3_)) {
|
||||
return true;
|
||||
} else if (blockstate.func_177230_c() == Blocks.field_196633_cV && blockstate.func_177229_b(RedstoneDiodeBlock.field_196348_c) && blockstate.func_177229_b(RedstoneDiodeBlock.field_185512_D) == p_176339_3_) {
|
||||
return true;
|
||||
} else {
|
||||
- return !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b());
|
||||
+ return !flag && canConnectTo(p_176339_1_.func_180495_p(blockpos.func_177977_b()), p_176339_1_, blockpos.func_177977_b(), null);
|
||||
}
|
||||
}
|
||||
|
||||
- protected static boolean func_176340_e(IBlockReader p_176340_0_, BlockPos p_176340_1_) {
|
||||
- return func_176346_d(p_176340_0_.func_180495_p(p_176340_1_));
|
||||
- }
|
||||
-
|
||||
- protected static boolean func_176346_d(BlockState p_176346_0_) {
|
||||
- return func_176343_a(p_176346_0_, (Direction)null);
|
||||
- }
|
||||
-
|
||||
- protected static boolean func_176343_a(BlockState p_176343_0_, @Nullable Direction p_176343_1_) {
|
||||
+ protected static boolean canConnectTo(BlockState p_176343_0_, IBlockReader world, BlockPos pos, @Nullable Direction p_176343_1_) {
|
||||
Block block = p_176343_0_.func_177230_c();
|
||||
if (block == Blocks.field_150488_af) {
|
||||
return true;
|
||||
@@ -347,7 +339,7 @@
|
||||
} else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) {
|
||||
return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N);
|
||||
} else {
|
||||
- return p_176343_0_.func_185897_m() && p_176343_1_ != null;
|
||||
+ return p_176343_0_.canConnectRedstone(world, pos, p_176343_1_) && p_176343_1_ != null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/block/SaplingBlock.java
|
||||
+++ b/net/minecraft/block/SaplingBlock.java
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_196267_2_.func_201696_r(p_196267_3_.func_177984_a()) >= 9 && p_196267_4_.nextInt(7) == 0) {
|
||||
this.func_176478_d(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_);
|
||||
}
|
||||
@@ -39,6 +40,7 @@
|
||||
if (p_176478_3_.func_177229_b(field_176479_b) == 0) {
|
||||
p_176478_1_.func_180501_a(p_176478_2_, p_176478_3_.func_177231_a(field_176479_b), 4);
|
||||
} else {
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_176478_1_, p_176478_4_, p_176478_2_)) return;
|
||||
this.field_196387_c.func_196935_a(p_176478_1_, p_176478_2_, p_176478_3_, p_176478_4_);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/ScaffoldingBlock.java
|
||||
+++ b/net/minecraft/block/ScaffoldingBlock.java
|
||||
@@ -142,6 +142,8 @@
|
||||
return i;
|
||||
}
|
||||
|
||||
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
|
||||
+
|
||||
static {
|
||||
VoxelShape voxelshape = Block.func_208617_a(0.0D, 14.0D, 0.0D, 16.0D, 16.0D, 16.0D);
|
||||
VoxelShape voxelshape1 = Block.func_208617_a(0.0D, 0.0D, 0.0D, 2.0D, 16.0D, 2.0D);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/SeaGrassBlock.java
|
||||
+++ b/net/minecraft/block/SeaGrassBlock.java
|
||||
@@ -16,7 +16,7 @@
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer {
|
||||
+public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IShearable {
|
||||
protected static final VoxelShape field_207798_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
|
||||
|
||||
protected SeaGrassBlock(Block.Properties p_i48780_1_) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/ShearableDoublePlantBlock.java
|
||||
+++ b/net/minecraft/block/ShearableDoublePlantBlock.java
|
||||
@@ -4,7 +4,7 @@
|
||||
import net.minecraft.state.EnumProperty;
|
||||
import net.minecraft.state.properties.DoubleBlockHalf;
|
||||
|
||||
-public class ShearableDoublePlantBlock extends DoublePlantBlock {
|
||||
+public class ShearableDoublePlantBlock extends DoublePlantBlock implements net.minecraftforge.common.IShearable {
|
||||
public static final EnumProperty<DoubleBlockHalf> field_208063_b = DoublePlantBlock.field_176492_b;
|
||||
|
||||
public ShearableDoublePlantBlock(Block.Properties p_i49975_1_) {
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/block/SpawnerBlock.java
|
||||
+++ b/net/minecraft/block/SpawnerBlock.java
|
||||
@@ -19,10 +19,13 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- int i = 15 + p_220062_2_.field_73012_v.nextInt(15) + p_220062_2_.field_73012_v.nextInt(15);
|
||||
- this.func_180637_b(p_220062_2_, p_220062_3_, i);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public int getExpDrop(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, int fortune, int silktouch) {
|
||||
+ return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15);
|
||||
+ }
|
||||
+
|
||||
public BlockRenderType func_149645_b(BlockState p_149645_1_) {
|
||||
return BlockRenderType.MODEL;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/block/SpreadableSnowyDirtBlock.java
|
||||
+++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
if (!p_196267_2_.field_72995_K) {
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
|
||||
if (!func_220257_b(p_196267_1_, p_196267_2_, p_196267_3_)) {
|
||||
p_196267_2_.func_175656_a(p_196267_3_, Blocks.field_150346_d.func_176223_P());
|
||||
} else {
|
||||
@@ -0,0 +1,43 @@
|
||||
--- a/net/minecraft/block/StemBlock.java
|
||||
+++ b/net/minecraft/block/StemBlock.java
|
||||
@@ -39,22 +39,24 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
|
||||
if (p_196267_2_.func_201669_a(p_196267_3_, 0) >= 9) {
|
||||
float f = CropsBlock.func_180672_a(this, p_196267_2_, p_196267_3_);
|
||||
- if (p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0) {
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
|
||||
int i = p_196267_1_.func_177229_b(field_176484_a);
|
||||
if (i < 7) {
|
||||
- p_196267_1_ = p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1));
|
||||
- p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
|
||||
+ p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2);
|
||||
} else {
|
||||
Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_196267_4_);
|
||||
BlockPos blockpos = p_196267_3_.func_177972_a(direction);
|
||||
- Block block = p_196267_2_.func_180495_p(blockpos.func_177977_b()).func_177230_c();
|
||||
- if (p_196267_2_.func_180495_p(blockpos).func_196958_f() && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
|
||||
+ BlockState soil = p_196267_2_.func_180495_p(blockpos.func_177977_b());
|
||||
+ Block block = soil.func_177230_c();
|
||||
+ if (p_196267_2_.func_180495_p(blockpos).isAir(p_196267_2_, blockpos) && (soil.canSustainPlant(p_196267_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
|
||||
p_196267_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P());
|
||||
p_196267_2_.func_175656_a(p_196267_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction));
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -100,4 +102,10 @@
|
||||
public StemGrownBlock func_208486_d() {
|
||||
return this.field_149877_a;
|
||||
}
|
||||
+
|
||||
+ //FORGE START
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
+ return net.minecraftforge.common.PlantType.Crop;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
--- a/net/minecraft/block/SugarCaneBlock.java
|
||||
+++ b/net/minecraft/block/SugarCaneBlock.java
|
||||
@@ -16,7 +16,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class SugarCaneBlock extends Block {
|
||||
+public class SugarCaneBlock extends Block implements net.minecraftforge.common.IPlantable {
|
||||
public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X;
|
||||
protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D);
|
||||
|
||||
@@ -40,12 +40,15 @@
|
||||
|
||||
if (i < 3) {
|
||||
int j = p_196267_1_.func_177229_b(field_176355_a);
|
||||
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, true)) {
|
||||
if (j == 15) {
|
||||
p_196267_2_.func_175656_a(p_196267_3_.func_177984_a(), this.func_176223_P());
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4);
|
||||
} else {
|
||||
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +63,8 @@
|
||||
}
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
+ BlockState soil = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
+ if (soil.canSustainPlant(p_196260_2_, p_196260_3_.func_177977_b(), Direction.UP, this)) return true;
|
||||
Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c();
|
||||
if (block == this) {
|
||||
return true;
|
||||
@@ -87,4 +92,14 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176355_a);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
+ return net.minecraftforge.common.PlantType.Beach;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
|
||||
+ return func_176223_P();
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/TallGrassBlock.java
|
||||
+++ b/net/minecraft/block/TallGrassBlock.java
|
||||
@@ -7,7 +7,7 @@
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class TallGrassBlock extends BushBlock implements IGrowable {
|
||||
+public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IShearable {
|
||||
protected static final VoxelShape field_196389_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
|
||||
|
||||
protected TallGrassBlock(Block.Properties p_i48310_1_) {
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/block/TrapDoorBlock.java
|
||||
+++ b/net/minecraft/block/TrapDoorBlock.java
|
||||
@@ -153,6 +153,16 @@
|
||||
return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) {
|
||||
+ if (state.func_177229_b(field_176283_b)) {
|
||||
+ BlockState down = world.func_180495_p(pos.func_177977_b());
|
||||
+ if (down.func_177230_c() == net.minecraft.block.Blocks.field_150468_ap)
|
||||
+ return down.func_177229_b(LadderBlock.field_176382_a) == state.func_177229_b(field_185512_D);
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
public boolean func_220067_a(BlockState p_220067_1_, IBlockReader p_220067_2_, BlockPos p_220067_3_, EntityType<?> p_220067_4_) {
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/TurtleEggBlock.java
|
||||
+++ b/net/minecraft/block/TurtleEggBlock.java
|
||||
@@ -146,7 +146,7 @@
|
||||
if (p_212570_2_ instanceof TurtleEntity) {
|
||||
return false;
|
||||
} else {
|
||||
- return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? p_212570_1_.func_82736_K().func_223586_b(GameRules.field_223599_b) : true;
|
||||
+ return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_) : true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
--- a/net/minecraft/block/VineBlock.java
|
||||
+++ b/net/minecraft/block/VineBlock.java
|
||||
@@ -20,7 +20,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class VineBlock extends Block {
|
||||
+public class VineBlock extends Block implements net.minecraftforge.common.IShearable {
|
||||
public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z;
|
||||
public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a;
|
||||
public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b;
|
||||
@@ -154,7 +154,7 @@
|
||||
p_196267_2_.func_217377_a(p_196267_3_, false);
|
||||
}
|
||||
|
||||
- } else if (p_196267_2_.field_73012_v.nextInt(4) == 0) {
|
||||
+ } else if (p_196267_2_.field_73012_v.nextInt(4) == 0 && p_196267_2_.isAreaLoaded(p_196267_3_, 4)) { // Forge: check area to prevent loading unloaded chunks
|
||||
Direction direction = Direction.func_176741_a(p_196267_4_);
|
||||
BlockPos blockpos = p_196267_3_.func_177984_a();
|
||||
if (direction.func_176740_k().func_176722_c() && !p_196267_1_.func_177229_b(func_176267_a(direction))) {
|
||||
@@ -329,4 +329,6 @@
|
||||
public static BooleanProperty func_176267_a(Direction p_176267_0_) {
|
||||
return field_196546_A.get(p_176267_0_);
|
||||
}
|
||||
+
|
||||
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/block/WebBlock.java
|
||||
+++ b/net/minecraft/block/WebBlock.java
|
||||
@@ -6,7 +6,7 @@
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class WebBlock extends Block {
|
||||
+public class WebBlock extends Block implements net.minecraftforge.common.IShearable {
|
||||
public WebBlock(Block.Properties p_i48296_1_) {
|
||||
super(p_i48296_1_);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/block/state/IBlockState.java
|
||||
+++ b/net/minecraft/block/state/IBlockState.java
|
||||
@@ -30,7 +30,7 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
-public interface IBlockState extends IStateHolder<IBlockState> {
|
||||
+public interface IBlockState extends IStateHolder<IBlockState>, net.minecraftforge.common.extensions.IForgeBlockState {
|
||||
ThreadLocal<Object2ByteMap<IBlockState>> field_208776_a = ThreadLocal.<Object2ByteMap<IBlockState>>withInitial(() -> {
|
||||
Object2ByteOpenHashMap<IBlockState> object2byteopenhashmap = new Object2ByteOpenHashMap<IBlockState>();
|
||||
object2byteopenhashmap.defaultReturnValue((byte)127);
|
||||
@@ -0,0 +1,53 @@
|
||||
--- a/net/minecraft/block/state/PistonBlockStructureHelper.java
|
||||
+++ b/net/minecraft/block/state/PistonBlockStructureHelper.java
|
||||
@@ -52,7 +52,7 @@
|
||||
} else {
|
||||
for(int i = 0; i < this.field_177258_e.size(); ++i) {
|
||||
BlockPos blockpos = this.field_177258_e.get(i);
|
||||
- if (this.field_177261_a.func_180495_p(blockpos).func_177230_c() == Blocks.field_180399_cE && !this.func_177250_b(blockpos)) {
|
||||
+ if (this.field_177261_a.func_180495_p(blockpos).isStickyBlock() && !this.func_177250_b(blockpos)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -63,8 +63,7 @@
|
||||
|
||||
private boolean func_177251_a(BlockPos p_177251_1_, Direction p_177251_2_) {
|
||||
BlockState blockstate = this.field_177261_a.func_180495_p(p_177251_1_);
|
||||
- Block block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f()) {
|
||||
+ if (field_177261_a.func_175623_d(p_177251_1_)) {
|
||||
return true;
|
||||
} else if (!PistonBlock.func_185646_a(blockstate, this.field_177261_a, p_177251_1_, this.field_177257_d, false, p_177251_2_)) {
|
||||
return true;
|
||||
@@ -77,11 +76,10 @@
|
||||
if (i + this.field_177258_e.size() > 12) {
|
||||
return false;
|
||||
} else {
|
||||
- while(block == Blocks.field_180399_cE) {
|
||||
+ while(blockstate.isStickyBlock()) {
|
||||
BlockPos blockpos = p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), i);
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos);
|
||||
- block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f() || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
|
||||
+ if (blockstate.isAir(this.field_177261_a, blockpos) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@
|
||||
|
||||
for(int l = 0; l <= k + i1; ++l) {
|
||||
BlockPos blockpos2 = this.field_177258_e.get(l);
|
||||
- if (this.field_177261_a.func_180495_p(blockpos2).func_177230_c() == Blocks.field_180399_cE && !this.func_177250_b(blockpos2)) {
|
||||
+ if (this.field_177261_a.func_180495_p(blockpos2).isStickyBlock() && !this.func_177250_b(blockpos2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +115,7 @@
|
||||
}
|
||||
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos1);
|
||||
- if (blockstate.func_196958_f()) {
|
||||
+ if (blockstate.isAir(field_177261_a, blockpos1)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/block/trees/JungleTree.java
|
||||
+++ b/net/minecraft/block/trees/JungleTree.java
|
||||
@@ -11,11 +11,11 @@
|
||||
public class JungleTree extends BigTree {
|
||||
@Nullable
|
||||
protected AbstractTreeFeature<NoFeatureConfig> func_196936_b(Random p_196936_1_) {
|
||||
- return new TreeFeature(NoFeatureConfig::func_214639_a, true, 4 + p_196936_1_.nextInt(7), Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P(), false);
|
||||
+ return new TreeFeature(NoFeatureConfig::func_214639_a, true, 4 + p_196936_1_.nextInt(7), Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P(), false).setSapling((net.minecraft.block.SaplingBlock)Blocks.field_196678_w);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected AbstractTreeFeature<NoFeatureConfig> func_196938_a(Random p_196938_1_) {
|
||||
- return new MegaJungleFeature(NoFeatureConfig::func_214639_a, true, 10, 20, Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P());
|
||||
+ return new MegaJungleFeature(NoFeatureConfig::func_214639_a, true, 10, 20, Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P()).setSapling((net.minecraft.block.SaplingBlock)Blocks.field_196678_w);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -143,7 +143,7 @@
|
||||
public final KeyBinding[] field_151456_ac = new KeyBinding[]{new KeyBinding("key.hotbar.1", 49, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 50, "key.categories.inventory"), new KeyBinding("key.hotbar.3", 51, "key.categories.inventory"), new KeyBinding("key.hotbar.4", 52, "key.categories.inventory"), new KeyBinding("key.hotbar.5", 53, "key.categories.inventory"), new KeyBinding("key.hotbar.6", 54, "key.categories.inventory"), new KeyBinding("key.hotbar.7", 55, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 56, "key.categories.inventory"), new KeyBinding("key.hotbar.9", 57, "key.categories.inventory")};
|
||||
public final KeyBinding field_193629_ap = new KeyBinding("key.saveToolbarActivator", 67, "key.categories.creative");
|
||||
public final KeyBinding field_193630_aq = new KeyBinding("key.loadToolbarActivator", 88, "key.categories.creative");
|
||||
- public final KeyBinding[] field_74324_K = ArrayUtils.addAll(new KeyBinding[]{this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac);
|
||||
+ public KeyBinding[] field_74324_K = ArrayUtils.addAll(new KeyBinding[]{this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac);
|
||||
protected Minecraft field_74317_L;
|
||||
private final File field_74354_ai;
|
||||
public Difficulty field_74318_M = Difficulty.NORMAL;
|
||||
@@ -162,6 +162,7 @@
|
||||
public String field_74363_ab = "en_us";
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
+ setForgeKeybindProperties();
|
||||
this.field_74317_L = p_i46326_1_;
|
||||
this.field_74354_ai = new File(p_i46326_2_, "options.txt");
|
||||
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
|
||||
@@ -467,7 +468,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s1.equals("key_" + keybinding.func_151464_g())) {
|
||||
- keybinding.func_197979_b(InputMappings.func_197955_a(s2));
|
||||
+ if (s2.indexOf(':') != -1) {
|
||||
+ String[] pts = s2.split(":");
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(pts[1]), InputMappings.func_197955_a(pts[0]));
|
||||
+ } else
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,6 +520,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
+ if (net.minecraftforge.fml.client.ClientModLoader.isLoading()) return; //Don't save settings before mods add keybindigns and the like to prevent them from being deleted.
|
||||
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
|
||||
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
|
||||
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
|
||||
@@ -589,7 +595,7 @@
|
||||
printwriter.println("glDebugVerbosity:" + this.field_209231_W);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
- printwriter.println("key_" + keybinding.func_151464_g() + ":" + keybinding.func_197982_m());
|
||||
+ printwriter.println("key_" + keybinding.func_151464_g() + ":" + keybinding.func_197982_m() + (keybinding.getKeyModifier() != net.minecraftforge.client.settings.KeyModifier.NONE ? ":" + keybinding.getKeyModifier() : ""));
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -686,6 +692,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (net.minecraftforge.fml.client.ClientModLoader.isLoading()) return; //Don't save settings before mods add keybindigns and the like to prevent them from being deleted.
|
||||
p_198017_1_.func_198985_a(set);
|
||||
}
|
||||
+
|
||||
+ private void setForgeKeybindProperties() {
|
||||
+ net.minecraftforge.client.settings.KeyConflictContext inGame = net.minecraftforge.client.settings.KeyConflictContext.IN_GAME;
|
||||
+ field_74351_w.setKeyConflictContext(inGame);
|
||||
+ field_74370_x.setKeyConflictContext(inGame);
|
||||
+ field_74368_y.setKeyConflictContext(inGame);
|
||||
+ field_74366_z.setKeyConflictContext(inGame);
|
||||
+ field_74314_A.setKeyConflictContext(inGame);
|
||||
+ field_74311_E.setKeyConflictContext(inGame);
|
||||
+ field_151444_V.setKeyConflictContext(inGame);
|
||||
+ field_74312_F.setKeyConflictContext(inGame);
|
||||
+ field_74310_D.setKeyConflictContext(inGame);
|
||||
+ field_74321_H.setKeyConflictContext(inGame);
|
||||
+ field_74323_J.setKeyConflictContext(inGame);
|
||||
+ field_151457_aa.setKeyConflictContext(inGame);
|
||||
+ field_151458_ab.setKeyConflictContext(inGame);
|
||||
+ field_186718_X.setKeyConflictContext(inGame);
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
--- a/net/minecraft/client/KeyboardListener.java
|
||||
+++ b/net/minecraft/client/KeyboardListener.java
|
||||
@@ -252,7 +252,9 @@
|
||||
}
|
||||
|
||||
INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r;
|
||||
- if (p_197961_5_ == 1 && (!(this.field_197972_a.field_71462_r instanceof ControlsScreen) || ((ControlsScreen)inestedguieventhandler).field_152177_g <= Util.func_211177_b() - 20L)) {
|
||||
+
|
||||
+ if ((!(this.field_197972_a.field_71462_r instanceof ControlsScreen) || ((ControlsScreen)inestedguieventhandler).field_152177_g <= Util.func_211177_b() - 20L)) {
|
||||
+ if (p_197961_5_ == 1) {
|
||||
if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) {
|
||||
this.field_197972_a.field_195558_d.func_198077_g();
|
||||
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.field_195558_d.func_198113_j();
|
||||
@@ -271,6 +273,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
+ } else if (p_197961_5_ == 0 /*GLFW_RELEASE*/ && this.field_197972_a.field_71462_r instanceof ControlsScreen)
|
||||
+ ((ControlsScreen)this.field_197972_a.field_71462_r).field_146491_f = null; //Forge: Unset pure modifiers.
|
||||
}
|
||||
|
||||
boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.getFocused() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.getFocused()).func_212955_f();
|
||||
@@ -290,10 +294,14 @@
|
||||
Screen.wrapScreenError(() -> {
|
||||
if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) {
|
||||
if (p_197961_5_ == 0) {
|
||||
- aboolean[0] = inestedguieventhandler.func_223281_a_(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyReleasedPre(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = inestedguieventhandler.func_223281_a_(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyReleasedPost(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
}
|
||||
} else {
|
||||
- aboolean[0] = inestedguieventhandler.keyPressed(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyPressedPre(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = inestedguieventhandler.keyPressed(p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyPressedPost(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName());
|
||||
@@ -354,7 +362,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.client.ForgeHooksClient.fireKeyInput(p_197961_3_, p_197961_4_, p_197961_5_, p_197961_6_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,12 +372,16 @@
|
||||
if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) {
|
||||
if (Character.charCount(p_197963_3_) == 1) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
- iguieventlistener.charTyped((char)p_197963_3_, p_197963_4_);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPre(this.field_197972_a.field_71462_r, (char)p_197963_3_, p_197963_4_)) return;
|
||||
+ if (iguieventlistener.charTyped((char)p_197963_3_, p_197963_4_)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPost(this.field_197972_a.field_71462_r, (char)p_197963_3_, p_197963_4_);
|
||||
}, "charTyped event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
} else {
|
||||
for(char c0 : Character.toChars(p_197963_3_)) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
- iguieventlistener.charTyped(c0, p_197963_4_);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPre(this.field_197972_a.field_71462_r, c0, p_197963_4_)) return;
|
||||
+ if (iguieventlistener.charTyped(c0, p_197963_4_)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPost(this.field_197972_a.field_71462_r, c0, p_197963_4_);
|
||||
}, "charTyped event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -1,43 +1,389 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -405,6 +405,7 @@
|
||||
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
|
||||
this.field_110451_am.func_199006_a(this.field_135017_as);
|
||||
@@ -316,6 +316,7 @@
|
||||
super("Client");
|
||||
this.field_195556_O = p_i45547_1_.field_178743_b;
|
||||
field_71432_P = this;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.invalidateLog4jThreadCache();
|
||||
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
|
||||
this.field_110446_Y = p_i45547_1_.field_178744_c.field_178759_c;
|
||||
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
|
||||
@@ -333,7 +334,7 @@
|
||||
supplier = p_213262_2_;
|
||||
}
|
||||
|
||||
- return new ClientResourcePackInfo(p_213262_0_, p_213262_1_, supplier, p_213262_3_, p_213262_4_, p_213262_5_);
|
||||
+ return new ClientResourcePackInfo(p_213262_0_, p_213262_1_, supplier, p_213262_3_, p_213262_4_, p_213262_5_, p_213262_3_.isHidden());
|
||||
});
|
||||
this.field_110448_aq.func_198982_a(this.field_195554_ax);
|
||||
this.field_110448_aq.func_198982_a(new FolderPackFinder(this.field_130070_K));
|
||||
@@ -341,7 +342,6 @@
|
||||
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
|
||||
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
||||
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
|
||||
- field_147123_G.debug("(Session ID is {})", (Object)this.field_71449_j.func_111286_b());
|
||||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_147129_ai = func_147122_X();
|
||||
this.field_71437_Z = null;
|
||||
@@ -442,7 +442,6 @@
|
||||
|
||||
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
|
||||
this.field_71417_B = new MouseHelper(this);
|
||||
- this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i());
|
||||
this.field_195559_v = new KeyboardListener(this);
|
||||
this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i());
|
||||
GLX.init();
|
||||
@@ -451,6 +450,7 @@
|
||||
this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F);
|
||||
this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC);
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.begin(this, this.field_110448_aq, this.field_110451_am, this.field_195554_ax);
|
||||
this.func_110436_a();
|
||||
this.field_71446_o = new TextureManager(this.field_110451_am);
|
||||
this.field_110451_am.func_199006_a(this.field_71446_o);
|
||||
@@ -461,6 +462,7 @@
|
||||
this.field_110451_am.func_199006_a(this.field_193995_ae);
|
||||
GlStateManager.func_179083_b(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.end();
|
||||
this.field_71456_v = new GuiIngame(this);
|
||||
if (this.field_71475_ae != null) {
|
||||
this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
|
||||
@@ -470,6 +472,7 @@
|
||||
this.field_110448_aq.func_198983_a();
|
||||
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
|
||||
|
||||
@@ -516,12 +516,14 @@
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
GlStateManager.viewport(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ParticleFactoryRegisterEvent());
|
||||
this.field_110451_am.func_219534_a(this.field_71452_i);
|
||||
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213272_aL);
|
||||
this.field_213273_aM = new PotionSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213273_aM);
|
||||
- this.field_71456_v = new IngameGui(this);
|
||||
+ this.field_71456_v = new net.minecraftforge.client.ForgeIngameGui(this);
|
||||
+ this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
|
||||
this.field_184132_p = new DebugRenderer(this);
|
||||
GLFW.glfwSetErrorCallback(this::func_195545_a).free();
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.complete();
|
||||
GLX.setGlfwErrorCallback(this::func_195545_a);
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
this.field_195558_d.func_198077_g();
|
||||
@@ -543,7 +545,7 @@
|
||||
if (SharedConstants.field_206244_b) {
|
||||
this.func_213256_aB();
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.fml.client.ClientModLoader.complete();
|
||||
}, false));
|
||||
}
|
||||
|
||||
@@ -558,7 +560,7 @@
|
||||
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
|
||||
});
|
||||
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
|
||||
- return ItemTags.func_199903_a().func_199913_a(p_213235_0_.func_77973_b()).stream();
|
||||
+ return p_213235_0_.func_77973_b().getTags().stream();
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -647,7 +649,7 @@
|
||||
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
|
||||
if (p_71377_1_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
||||
- System.exit(-1);
|
||||
+ net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-1);
|
||||
} else if (p_71377_1_.func_147149_a(file2)) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||
System.exit(-1);
|
||||
@@ -662,6 +664,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use selective refreshResources method in FMLClientHandler
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -741,16 +744,20 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
- if (this.field_71462_r != null) {
|
||||
- this.field_71462_r.removed();
|
||||
- }
|
||||
-
|
||||
if (p_147108_1_ == null && this.field_71441_e == null) {
|
||||
p_147108_1_ = new MainMenuScreen();
|
||||
} else if (p_147108_1_ == null && this.field_71439_g.func_110143_aJ() <= 0.0F) {
|
||||
p_147108_1_ = new DeathScreen((ITextComponent)null, this.field_71441_e.func_72912_H().func_76093_s());
|
||||
}
|
||||
@@ -485,7 +488,7 @@
|
||||
});
|
||||
List<String> list = Lists.<String>newArrayList();
|
||||
GLFWErrorCallback glfwerrorcallback = GLFW.glfwSetErrorCallback((p_211100_1_, p_211100_2_) -> {
|
||||
- list.add(String.format("GLFW error during init: [0x%X]%s", p_211100_1_, p_211100_2_));
|
||||
+ list.add(String.format("GLFW error during init: [0x%X] %s", p_211100_1_, GLFWErrorCallback.getDescription(p_211100_2_)));
|
||||
});
|
||||
if (!GLFW.glfwInit()) {
|
||||
throw new IllegalStateException("Failed to initialize GLFW, errors: " + Joiner.on(",").join(list));
|
||||
@@ -1392,6 +1395,7 @@
|
||||
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
|
||||
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null, (p_209507_0_) -> {
|
||||
|
||||
+ Screen old = this.field_71462_r;
|
||||
+ net.minecraftforge.client.event.GuiOpenEvent event = new net.minecraftforge.client.event.GuiOpenEvent(p_147108_1_);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
|
||||
+
|
||||
+ p_147108_1_ = event.getGui();
|
||||
+ if (old != null && p_147108_1_ != old)
|
||||
+ old.removed();
|
||||
+
|
||||
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
this.field_71456_v.func_146158_b().func_146231_a(true);
|
||||
@@ -875,11 +882,13 @@
|
||||
GlStateManager.enableTexture();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b);
|
||||
this.field_71424_I.func_219895_b("gameRenderer");
|
||||
this.field_71460_t.func_195458_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i, p_195542_1_);
|
||||
this.field_71424_I.func_219895_b("toasts");
|
||||
this.field_193034_aS.func_195625_a();
|
||||
this.field_71424_I.func_76319_b();
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickEnd(this.field_71428_T.field_194147_b);
|
||||
}
|
||||
|
||||
this.field_71424_I.func_219897_b();
|
||||
@@ -1147,10 +1156,10 @@
|
||||
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
- if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) {
|
||||
+ if (!this.field_71441_e.func_175623_d(blockpos)) {
|
||||
Direction direction = blockraytraceresult.func_216354_b();
|
||||
if (this.field_71442_b.func_180512_c(blockpos, direction)) {
|
||||
- this.field_71452_i.func_180532_a(blockpos, direction);
|
||||
+ this.field_71452_i.addBlockHitEffects(blockpos, blockraytraceresult);
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1177,7 +1186,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
- if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) {
|
||||
+ if (!this.field_71441_e.func_180495_p(blockpos).isAir(field_71441_e, blockpos)) {
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1187,6 +1196,7 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyLeftClick(this.field_71439_g);
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
@@ -1236,6 +1246,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.func_216346_c() == RayTraceResult.Type.MISS))
|
||||
+ net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, hand);
|
||||
+
|
||||
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand) == ActionResultType.SUCCESS) {
|
||||
this.field_71460_t.field_78516_c.func_187460_a(hand);
|
||||
return;
|
||||
@@ -1255,6 +1268,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onPreClientTick();
|
||||
+
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1373,6 +1388,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
+
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onPostClientTick();
|
||||
}
|
||||
|
||||
private void func_184117_aA() {
|
||||
@@ -1527,6 +1544,12 @@
|
||||
this.func_147108_a(worldloadprogressscreen);
|
||||
|
||||
while(!this.field_71437_Z.func_71200_ad()) {
|
||||
+ if (!net.minecraftforge.fml.StartupQuery.check() || this.field_71437_Z.func_71241_aa()) {
|
||||
+ this.func_147108_a(null);
|
||||
+ return;
|
||||
+ } else if (this.field_71462_r == null) // if we're showing nothing, put the working screen back again
|
||||
+ this.func_147108_a(worldloadprogressscreen);
|
||||
+
|
||||
worldloadprogressscreen.tick();
|
||||
this.func_195542_b(false);
|
||||
|
||||
@@ -1547,11 +1570,17 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> {
|
||||
}));
|
||||
+ net.minecraftforge.fml.network.NetworkHooks.registerClientLoginChannel(networkmanager);
|
||||
networkmanager.func_179290_a(new CPacketHandshake(socketaddress.toString(), 0, EnumConnectionState.LOGIN));
|
||||
networkmanager.func_179290_a(new CPacketLoginStart(this.func_110432_I().func_148256_e()));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
- networkmanager.func_179290_a(new CLoginStartPacket(this.func_110432_I().func_148256_e()));
|
||||
+ com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e();
|
||||
+ if (!this.func_110432_I().hasCachedProperties()) {
|
||||
+ gameProfile = field_152355_az.fillProfileProperties(gameProfile, true); //Forge: Fill profile properties upon game load. Fixes MC-52974.
|
||||
+ this.func_110432_I().setProperties(gameProfile.getProperties());
|
||||
+ }
|
||||
+ networkmanager.func_179290_a(new CLoginStartPacket(gameProfile));
|
||||
this.field_71453_ak = networkmanager;
|
||||
}
|
||||
|
||||
public void func_71403_a(ClientWorld p_71403_1_) {
|
||||
+ if (field_71441_e != null) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1583,10 +1612,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerLogout(this.field_71442_b, this.field_71439_g);
|
||||
this.field_71442_b = null;
|
||||
NarratorChatListener.field_193643_a.func_193642_b();
|
||||
this.func_213241_c(p_213231_1_);
|
||||
if (this.field_71441_e != null) {
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
|
||||
if (integratedserver != null) {
|
||||
while(!integratedserver.func_213201_w()) {
|
||||
this.func_195542_b(false);
|
||||
@@ -1624,6 +1655,7 @@
|
||||
}
|
||||
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
+ net.minecraftforge.client.MinecraftForgeClient.clearRenderCache();
|
||||
}
|
||||
|
||||
public final boolean func_71355_q() {
|
||||
@@ -1649,112 +1681,8 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
- boolean flag = this.field_71439_g.field_71075_bZ.field_75098_d;
|
||||
- TileEntity tileentity = null;
|
||||
- RayTraceResult.Type raytraceresult$type = this.field_71476_x.func_216346_c();
|
||||
- ItemStack itemstack;
|
||||
- if (raytraceresult$type == RayTraceResult.Type.BLOCK) {
|
||||
- BlockPos blockpos = ((BlockRayTraceResult)this.field_71476_x).func_216350_a();
|
||||
- BlockState blockstate = this.field_71441_e.func_180495_p(blockpos);
|
||||
- Block block = blockstate.func_177230_c();
|
||||
- if (blockstate.func_196958_f()) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- itemstack = block.func_185473_a(this.field_71441_e, blockpos, blockstate);
|
||||
- if (itemstack.func_190926_b()) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (flag && Screen.hasControlDown() && block.func_149716_u()) {
|
||||
- tileentity = this.field_71441_e.func_175625_s(blockpos);
|
||||
- }
|
||||
- } else {
|
||||
- if (raytraceresult$type != RayTraceResult.Type.ENTITY || !flag) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- Entity entity = ((EntityRayTraceResult)this.field_71476_x).func_216348_a();
|
||||
- if (entity instanceof PaintingEntity) {
|
||||
- itemstack = new ItemStack(Items.field_151159_an);
|
||||
- } else if (entity instanceof LeashKnotEntity) {
|
||||
- itemstack = new ItemStack(Items.field_151058_ca);
|
||||
- } else if (entity instanceof ItemFrameEntity) {
|
||||
- ItemFrameEntity itemframeentity = (ItemFrameEntity)entity;
|
||||
- ItemStack itemstack1 = itemframeentity.func_82335_i();
|
||||
- if (itemstack1.func_190926_b()) {
|
||||
- itemstack = new ItemStack(Items.field_151160_bD);
|
||||
- } else {
|
||||
- itemstack = itemstack1.func_77946_l();
|
||||
- }
|
||||
- } else if (entity instanceof AbstractMinecartEntity) {
|
||||
- AbstractMinecartEntity abstractminecartentity = (AbstractMinecartEntity)entity;
|
||||
- Item item;
|
||||
- switch(abstractminecartentity.func_184264_v()) {
|
||||
- case FURNACE:
|
||||
- item = Items.field_151109_aJ;
|
||||
- break;
|
||||
- case CHEST:
|
||||
- item = Items.field_151108_aI;
|
||||
- break;
|
||||
- case TNT:
|
||||
- item = Items.field_151142_bV;
|
||||
- break;
|
||||
- case HOPPER:
|
||||
- item = Items.field_151140_bW;
|
||||
- break;
|
||||
- case COMMAND_BLOCK:
|
||||
- item = Items.field_151095_cc;
|
||||
- break;
|
||||
- default:
|
||||
- item = Items.field_151143_au;
|
||||
- }
|
||||
-
|
||||
- itemstack = new ItemStack(item);
|
||||
- } else if (entity instanceof BoatEntity) {
|
||||
- itemstack = new ItemStack(((BoatEntity)entity).func_184455_j());
|
||||
- } else if (entity instanceof ArmorStandEntity) {
|
||||
- itemstack = new ItemStack(Items.field_179565_cj);
|
||||
- } else if (entity instanceof EnderCrystalEntity) {
|
||||
- itemstack = new ItemStack(Items.field_185158_cP);
|
||||
- } else {
|
||||
- SpawnEggItem spawneggitem = SpawnEggItem.func_200889_b(entity.func_200600_R());
|
||||
- if (spawneggitem == null) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- itemstack = new ItemStack(spawneggitem);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (itemstack.func_190926_b()) {
|
||||
- String s = "";
|
||||
- if (raytraceresult$type == RayTraceResult.Type.BLOCK) {
|
||||
- s = Registry.field_212618_g.func_177774_c(this.field_71441_e.func_180495_p(((BlockRayTraceResult)this.field_71476_x).func_216350_a()).func_177230_c()).toString();
|
||||
- } else if (raytraceresult$type == RayTraceResult.Type.ENTITY) {
|
||||
- s = Registry.field_212629_r.func_177774_c(((EntityRayTraceResult)this.field_71476_x).func_216348_a().func_200600_R()).toString();
|
||||
- }
|
||||
-
|
||||
- field_147123_G.warn("Picking on: [{}] {} gave null item", raytraceresult$type, s);
|
||||
- } else {
|
||||
- PlayerInventory playerinventory = this.field_71439_g.field_71071_by;
|
||||
- if (tileentity != null) {
|
||||
- this.func_184119_a(itemstack, tileentity);
|
||||
- }
|
||||
-
|
||||
- int i = playerinventory.func_184429_b(itemstack);
|
||||
- if (flag) {
|
||||
- playerinventory.func_184434_a(itemstack);
|
||||
- this.field_71442_b.func_78761_a(this.field_71439_g.func_184586_b(Hand.MAIN_HAND), 36 + playerinventory.field_70461_c);
|
||||
- } else if (i != -1) {
|
||||
- if (PlayerInventory.func_184435_e(i)) {
|
||||
- playerinventory.field_70461_c = i;
|
||||
- } else {
|
||||
- this.field_71442_b.func_187100_a(i);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- }
|
||||
+ net.minecraftforge.common.ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e);
|
||||
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1826,6 +1754,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use selective scheduleResourceRefresh method in FMLClientHandler
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> {
|
||||
return p_213240_0_;
|
||||
@@ -1972,6 +1901,8 @@
|
||||
}
|
||||
|
||||
public MusicTicker.MusicType func_147109_W() {
|
||||
+ MusicTicker.MusicType type = this.field_71441_e == null || this.field_71441_e.field_73011_w == null ? null : this.field_71441_e.field_73011_w.getMusicType();
|
||||
+ if (type != null) return type;
|
||||
if (this.field_71462_r instanceof WinGameScreen) {
|
||||
return MusicTicker.MusicType.CREDITS;
|
||||
} else if (this.field_71439_g == null) {
|
||||
@@ -2128,4 +2059,12 @@
|
||||
public LoadingGui func_213250_au() {
|
||||
return this.field_213279_p;
|
||||
}
|
||||
+
|
||||
+ public ItemColors getItemColors() {
|
||||
+ return this.field_184128_aI;
|
||||
+ }
|
||||
+
|
||||
+ public SearchTreeManager getSearchTreeManager() {
|
||||
+ return this.field_193995_ae;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
--- a/net/minecraft/client/MouseHelper.java
|
||||
+++ b/net/minecraft/client/MouseHelper.java
|
||||
@@ -77,11 +77,15 @@
|
||||
int p_198023_3_f = p_198023_3_;
|
||||
if (flag) {
|
||||
Screen.wrapScreenError(() -> {
|
||||
- aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, p_198023_3_f);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPre(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPost(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
}, "mouseClicked event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
|
||||
} else {
|
||||
Screen.wrapScreenError(() -> {
|
||||
- aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, p_198023_3_f);
|
||||
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPre(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, p_198023_3_f);
|
||||
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPost(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f);
|
||||
}, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -105,7 +109,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.client.ForgeHooksClient.fireMouseInput(p_198023_3_, p_198023_4_, p_198023_5_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +120,9 @@
|
||||
if (this.field_198036_a.field_71462_r != null) {
|
||||
double d1 = this.field_198040_e * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m();
|
||||
double d2 = this.field_198041_f * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n();
|
||||
- this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPre(this, this.field_198036_a.field_71462_r, d0)) return;
|
||||
+ if (this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPost(this, this.field_198036_a.field_71462_r, d0);
|
||||
} else if (this.field_198036_a.field_71439_g != null) {
|
||||
if (this.field_200542_o != 0.0D && Math.signum(d0) != Math.signum(this.field_200542_o)) {
|
||||
this.field_200542_o = 0.0D;
|
||||
@@ -129,6 +135,7 @@
|
||||
}
|
||||
|
||||
this.field_200542_o -= (double)f1;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onMouseScroll(this, d0)) return;
|
||||
if (this.field_198036_a.field_71439_g.func_175149_v()) {
|
||||
if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) {
|
||||
this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1));
|
||||
@@ -168,7 +175,9 @@
|
||||
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m();
|
||||
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n();
|
||||
Screen.wrapScreenError(() -> {
|
||||
- iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3);
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPre(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3)) return;
|
||||
+ if (iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3)) return;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPost(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3);
|
||||
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -233,6 +242,10 @@
|
||||
return this.field_198039_d;
|
||||
}
|
||||
|
||||
+ public boolean isMiddleDown() {
|
||||
+ return this.field_198038_c;
|
||||
+ }
|
||||
+
|
||||
public double func_198024_e() {
|
||||
return this.field_198040_e;
|
||||
}
|
||||
@@ -241,6 +254,14 @@
|
||||
return this.field_198041_f;
|
||||
}
|
||||
|
||||
+ public double getXVelocity() {
|
||||
+ return this.field_198048_m;
|
||||
+ }
|
||||
+
|
||||
+ public double getYVelocity() {
|
||||
+ return this.field_198049_n;
|
||||
+ }
|
||||
+
|
||||
public void func_198021_g() {
|
||||
this.field_198043_h = true;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
--- a/net/minecraft/client/audio/SoundEngine.java
|
||||
+++ b/net/minecraft/client/audio/SoundEngine.java
|
||||
@@ -53,6 +53,7 @@
|
||||
this.field_148622_c = p_i50892_1_;
|
||||
this.field_148619_d = p_i50892_2_;
|
||||
this.field_217939_i = new AudioStreamManager(p_i50892_3_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundSetupEvent(this));
|
||||
}
|
||||
|
||||
public void func_148596_a() {
|
||||
@@ -68,6 +69,7 @@
|
||||
|
||||
this.func_148613_b();
|
||||
this.func_148608_i();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
|
||||
}
|
||||
|
||||
private synchronized void func_148608_i() {
|
||||
@@ -246,6 +248,8 @@
|
||||
|
||||
public void func_148611_c(ISound p_148611_1_) {
|
||||
if (this.field_148617_f) {
|
||||
+ p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_);
|
||||
+ if (p_148611_1_ == null) return;
|
||||
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
|
||||
ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
|
||||
if (soundeventaccessor == null) {
|
||||
@@ -300,11 +304,13 @@
|
||||
p_217930_7_.func_216420_a(vec3d);
|
||||
p_217930_7_.func_216432_b(flag);
|
||||
});
|
||||
+ final ISound isound = p_148611_1_;
|
||||
if (!sound.func_188723_h()) {
|
||||
this.field_217939_i.func_217909_a(sound.func_188721_b()).thenAccept((p_217934_1_) -> {
|
||||
channelmanager$entry.func_217888_a((p_217925_1_) -> {
|
||||
p_217925_1_.func_216429_a(p_217934_1_);
|
||||
p_217925_1_.func_216438_c();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlaySoundSourceEvent(this, isound, p_217925_1_));
|
||||
});
|
||||
});
|
||||
} else {
|
||||
@@ -312,6 +318,7 @@
|
||||
channelmanager$entry.func_217888_a((p_217935_1_) -> {
|
||||
p_217935_1_.func_216433_a(p_217928_1_);
|
||||
p_217935_1_.func_216438_c();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlayStreamingSourceEvent(this, isound, p_217935_1_));
|
||||
});
|
||||
});
|
||||
}
|
||||
Loaded 100 of 1907 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user