Compare commits
1245
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5bfc2fa22 | ||
|
|
bb76819589 | ||
|
|
b746d9df0b | ||
|
|
4803421326 | ||
|
|
8dc76e7152 | ||
|
|
c17ef64339 | ||
|
|
15b2aa1d30 | ||
|
|
07ef2bbab9 | ||
|
|
fabd859878 | ||
|
|
bdfa1f6864 | ||
|
|
dae475b636 | ||
|
|
71a367ec84 | ||
|
|
5403894bd4 | ||
|
|
d4630f1223 | ||
|
|
346b9b8d2d | ||
|
|
77afb9aa78 | ||
|
|
4c39ea20c4 | ||
|
|
e4e24f3335 | ||
|
|
c54c062e6f | ||
|
|
ae060b31f0 | ||
|
|
bb4fb5334e | ||
|
|
4806ce5cd5 | ||
|
|
2a4ba00d9f | ||
|
|
e73d39671d | ||
|
|
2206b9a5f2 | ||
|
|
b0d7153f50 | ||
|
|
1cc86be2b8 | ||
|
|
416a733048 | ||
|
|
747cac4f91 | ||
|
|
d0645d92b0 | ||
|
|
3b35456b3f | ||
|
|
7e601ad916 | ||
|
|
cbd578c7b5 | ||
|
|
e5bf173f6a | ||
|
|
ef0670c2b7 | ||
|
|
5a362b8759 | ||
|
|
65633e373c | ||
|
|
7045b2ad2d | ||
|
|
e2dd1d514c | ||
|
|
b0603dab45 | ||
|
|
6c35392880 | ||
|
|
b8aeecb520 | ||
|
|
71a4ef8d06 | ||
|
|
f863bb71b0 | ||
|
|
d7d2f88893 | ||
|
|
dc74c6f19e | ||
|
|
2331dad0a0 | ||
|
|
4601dc901b | ||
|
|
5265287323 | ||
|
|
bd55e322d8 | ||
|
|
c60e47fa58 | ||
|
|
ab9a3db5ba | ||
|
|
172c7dc7e7 | ||
|
|
c0a3d51ab3 | ||
|
|
da7138233f | ||
|
|
c2294d7067 | ||
|
|
ae80a251fc | ||
|
|
4bc80b8a44 | ||
|
|
0f90942b1a | ||
|
|
1e035f374b | ||
|
|
27e4ddcd06 | ||
|
|
9039c3923c | ||
|
|
47f2071350 | ||
|
|
5ab678947f | ||
|
|
64828f3a60 | ||
|
|
9953384d89 | ||
|
|
da9d110d5b | ||
|
|
0cc7bd4857 | ||
|
|
78fd8f931b | ||
|
|
5f6a79668c | ||
|
|
cb2ab7d225 | ||
|
|
d38624bdd8 | ||
|
|
afb5b13056 | ||
|
|
7e789e8376 | ||
|
|
f4741f22e8 | ||
|
|
5f0932b6c8 | ||
|
|
4190ee7439 | ||
|
|
280b497783 | ||
|
|
cd9e697b52 | ||
|
|
a63013cf48 | ||
|
|
5b53cb404d | ||
|
|
cf956ac8d2 | ||
|
|
9bc147178d | ||
|
|
bf8405fcdd | ||
|
|
bb32b05498 | ||
|
|
6051dac82b | ||
|
|
edabff8a35 | ||
|
|
eef40b78c2 | ||
|
|
aee6f7abe1 | ||
|
|
860d948731 | ||
|
|
f2412609a1 | ||
|
|
751e9bd125 | ||
|
|
915637df5c | ||
|
|
817550c520 | ||
|
|
8dc42fadfa | ||
|
|
f8e2a671eb | ||
|
|
55475f05d5 | ||
|
|
c28d89d625 | ||
|
|
85bfdc09bc | ||
|
|
d0dcd7d251 | ||
|
|
57eab3e312 | ||
|
|
21cc763352 | ||
|
|
f9f964d4d2 | ||
|
|
01dd50fb3a | ||
|
|
fdef6d392b | ||
|
|
878da16a6b | ||
|
|
37b9630f6a | ||
|
|
8c5b837e05 | ||
|
|
de6173b061 | ||
|
|
6735c60738 | ||
|
|
d8b66dd93d | ||
|
|
4e01ede950 | ||
|
|
daf31133b5 | ||
|
|
11d708d831 | ||
|
|
575c1c4f89 | ||
|
|
34804890e8 | ||
|
|
bc4a705ce4 | ||
|
|
4e2291e206 | ||
|
|
7b13d936de | ||
|
|
be886cf4e7 | ||
|
|
13f48d8320 | ||
|
|
c60af44a94 | ||
|
|
661839e033 | ||
|
|
52fb26524e | ||
|
|
1ef4c0e7ff | ||
|
|
6da7b9e888 | ||
|
|
59b79c8bbb | ||
|
|
9d1c91d083 | ||
|
|
2e6eafb7e8 | ||
|
|
94ea770212 | ||
|
|
e47f79acd9 | ||
|
|
bcbd10804f | ||
|
|
0af4e84eff | ||
|
|
17dbf74ccf | ||
|
|
6483ecb8a2 | ||
|
|
00ef8bdcb0 | ||
|
|
99f4bb29ba | ||
|
|
fcb6c72bc9 | ||
|
|
42a1901d3b | ||
|
|
93b435dbab | ||
|
|
c6aa61ee18 | ||
|
|
ce0a041947 | ||
|
|
a6df4c8cdc | ||
|
|
92131adaf2 | ||
|
|
d19be64b15 | ||
|
|
85c870e9c7 | ||
|
|
a5d742637a | ||
|
|
16d7d73bd5 | ||
|
|
1de01302d4 | ||
|
|
5c0930dfad | ||
|
|
52a05907c7 | ||
|
|
7ee4835074 | ||
|
|
c5c125079c | ||
|
|
f273e6e6c1 | ||
|
|
ad9c58e103 | ||
|
|
147b7961fe | ||
|
|
dfedf79a2f | ||
|
|
40a960db45 | ||
|
|
580a610550 | ||
|
|
13308806ac | ||
|
|
1523212d4e | ||
|
|
8ba3073343 | ||
|
|
1a1d0cf01a | ||
|
|
9f1fa0b4f8 | ||
|
|
fe2f3d4693 | ||
|
|
1196ab5505 | ||
|
|
d576cfc234 | ||
|
|
49eae0d5fb | ||
|
|
40211a0ba0 | ||
|
|
99b1bf9b0f | ||
|
|
6288adb001 | ||
|
|
e35f199344 | ||
|
|
9e35192360 | ||
|
|
29bf7beba9 | ||
|
|
f8f230a0d0 | ||
|
|
4d87302672 | ||
|
|
02bca1e655 | ||
|
|
12ed021051 | ||
|
|
fe7b741545 | ||
|
|
3cb16c9d91 | ||
|
|
b6305644f9 | ||
|
|
348c855096 | ||
|
|
bcf52fe5fd | ||
|
|
09718757bf | ||
|
|
7d67d3f4f4 | ||
|
|
7162ff0404 | ||
|
|
20507b45cf | ||
|
|
98af0e0d3b | ||
|
|
2946dbb832 | ||
|
|
b14d336442 | ||
|
|
be2edeac2b | ||
|
|
cf03bed519 | ||
|
|
ba1ee87e70 | ||
|
|
61136fe43b | ||
|
|
dcd81a8867 | ||
|
|
e92607cd21 | ||
|
|
683ce2062e | ||
|
|
e4efb590e4 | ||
|
|
2e76d3f1e2 | ||
|
|
b711764991 | ||
|
|
62e3bcdc3b | ||
|
|
9ecf77e884 | ||
|
|
35ef2932be | ||
|
|
a911f4a167 | ||
|
|
f1a11a6e3f | ||
|
|
75e3409cec | ||
|
|
6daedd74c9 | ||
|
|
1d341dfda3 | ||
|
|
3d7b5708ef | ||
|
|
16d2c9defe | ||
|
|
2a95ad1df3 | ||
|
|
e9c58f5451 | ||
|
|
3b316215d7 | ||
|
|
8e569ba62a | ||
|
|
ecf4d9715e | ||
|
|
47258a7118 | ||
|
|
6df21e61af | ||
|
|
3518974270 | ||
|
|
e19f48475d | ||
|
|
0a8fd78e37 | ||
|
|
bb124f4021 | ||
|
|
918ca965d9 | ||
|
|
6fb86bb20a | ||
|
|
0f011a31b1 | ||
|
|
9c83387157 | ||
|
|
b06e0b0317 | ||
|
|
afbb0d88dd | ||
|
|
227caac7f0 | ||
|
|
6a315742d9 | ||
|
|
7616ebccd8 | ||
|
|
35e01d7a80 | ||
|
|
fe142cdcd5 | ||
|
|
d67e55d367 | ||
|
|
9047541397 | ||
|
|
fc05430719 | ||
|
|
b2375286c9 | ||
|
|
7d4cce94ae | ||
|
|
89bf08158b | ||
|
|
26f7b4c72e | ||
|
|
80de05ff33 | ||
|
|
457d03534d | ||
|
|
5d19e2b332 | ||
|
|
5a6011c08c | ||
|
|
dd87f9fe83 | ||
|
|
4baf9ab44d | ||
|
|
d52e2d241d | ||
|
|
1dc142534d | ||
|
|
cb79de80c4 | ||
|
|
6456b5dea8 | ||
|
|
cbf64163ba | ||
|
|
4db250389e | ||
|
|
0bb4d1d660 | ||
|
|
2810f50ca2 | ||
|
|
f5177aa121 | ||
|
|
1f8b53733f | ||
|
|
09b625eccf | ||
|
|
6bfc6db99e | ||
|
|
af125d26a9 | ||
|
|
aa37f7250d | ||
|
|
5e262c1691 | ||
|
|
f677393a88 | ||
|
|
8851d25a4d | ||
|
|
a400929816 | ||
|
|
7c04a31c9f | ||
|
|
dc5af4848a | ||
|
|
9d63c814c2 | ||
|
|
f1649d702b | ||
|
|
9e92fed7a2 | ||
|
|
152e82ceec | ||
|
|
6b27267fb7 | ||
|
|
3585434382 | ||
|
|
d280061a1a | ||
|
|
e080b20c45 | ||
|
|
d0028b77c7 | ||
|
|
2ef589c820 | ||
|
|
d348cb88a9 | ||
|
|
14a48cda40 | ||
|
|
260c3bbec0 | ||
|
|
c13f9fd06a | ||
|
|
3b9db2b194 | ||
|
|
755a7753af | ||
|
|
aebbdc9e9a | ||
|
|
4430e96e1b | ||
|
|
b16c0ae023 | ||
|
|
57c75a4b67 | ||
|
|
7cd4f2c15f | ||
|
|
fb768404aa | ||
|
|
709f0f2919 | ||
|
|
69ffbec34a | ||
|
|
e7e1ab56ca | ||
|
|
ba3c29b92e | ||
|
|
ea00be3aaa | ||
|
|
b410fe8697 | ||
|
|
e3c8a8eef1 | ||
|
|
f9c7f2a5c1 | ||
|
|
6d7a438fad | ||
|
|
355b1cbaf6 | ||
|
|
7b03141498 | ||
|
|
e17eb6be0c | ||
|
|
41bc31b79b | ||
|
|
b7ab22dee1 | ||
|
|
8f56db871b | ||
|
|
f33611cbc3 | ||
|
|
dd6d1842bb | ||
|
|
9c76642f99 | ||
|
|
01c4820450 | ||
|
|
627cc64eea | ||
|
|
20ec62255d | ||
|
|
1bc02e6b23 | ||
|
|
9b1ee0d87d | ||
|
|
acdd6d35ad | ||
|
|
4514c71a7f | ||
|
|
e8297c4cca | ||
|
|
540deb7ef7 | ||
|
|
2f50b87277 | ||
|
|
81d94483a2 | ||
|
|
1cb2bf466f | ||
|
|
78feecb12f | ||
|
|
1ed64f8270 | ||
|
|
593faf4fc3 | ||
|
|
5bcb2ff9e4 | ||
|
|
d61175421d | ||
|
|
9c450388e1 | ||
|
|
c5a10665b8 | ||
|
|
5c82955733 | ||
|
|
2aaf4369b6 | ||
|
|
1348e44173 | ||
|
|
13a23951d7 | ||
|
|
951e7ddc44 | ||
|
|
0a53f1d10d | ||
|
|
d1a72eac31 | ||
|
|
4ff58c4c48 | ||
|
|
e945cfe1c5 | ||
|
|
61fe23cd08 | ||
|
|
971a7a5511 | ||
|
|
b09eaf2e8d | ||
|
|
7632de5134 | ||
|
|
1ba1be7d26 | ||
|
|
426f9924a5 | ||
|
|
925c3b9d2b | ||
|
|
a8e6a93aec | ||
|
|
5d91bef46f | ||
|
|
0e825274e5 | ||
|
|
21f125f3c2 | ||
|
|
3db475838f | ||
|
|
e0021b15b6 | ||
|
|
805a97444a | ||
|
|
10f5879992 | ||
|
|
953e6e9918 | ||
|
|
012c527671 | ||
|
|
691d452643 | ||
|
|
ff251e42b6 | ||
|
|
b483da4e02 | ||
|
|
227c94ae21 | ||
|
|
2f0891ed81 | ||
|
|
509ea2fd17 | ||
|
|
e01ddf4627 | ||
|
|
25621248d3 | ||
|
|
e08e6679fc | ||
|
|
789a267e93 | ||
|
|
a7b8d9574e | ||
|
|
dd8c70a851 | ||
|
|
374d9c85ba | ||
|
|
ad4c524c2f | ||
|
|
e2da65c689 | ||
|
|
5167856bb8 | ||
|
|
5b2c43edaf | ||
|
|
94444cebc3 | ||
|
|
5625051564 | ||
|
|
956b3d1c4e | ||
|
|
fcedb49fea | ||
|
|
2fdb2e9dcd | ||
|
|
32711191cd | ||
|
|
e4b38b4f8c | ||
|
|
a8cb8e6745 | ||
|
|
ba1b0162fa | ||
|
|
dae906ba45 | ||
|
|
8fd3a67138 | ||
|
|
be1078f5f2 | ||
|
|
b4bc512cac | ||
|
|
64c9ee6584 | ||
|
|
44017487a8 | ||
|
|
8c3018a4b1 | ||
|
|
57dd822393 | ||
|
|
2e82fd2d2c | ||
|
|
66a97cc929 | ||
|
|
0e7361704a | ||
|
|
75655ec1d3 | ||
|
|
52ae4ad466 | ||
|
|
d5ffc573dc | ||
|
|
4829fbf6bd | ||
|
|
78216fef26 | ||
|
|
e619744fbd | ||
|
|
534ab86010 | ||
|
|
1b8ab116ed | ||
|
|
ec55c11fc0 | ||
|
|
95719832bf | ||
|
|
81bfda8710 | ||
|
|
fb530743e5 | ||
|
|
bf5852a615 | ||
|
|
11b4ac7c65 | ||
|
|
9ab644ed29 | ||
|
|
7c9240f4a6 | ||
|
|
1798e949e5 | ||
|
|
4a97ba3ea8 | ||
|
|
f97aff74b6 | ||
|
|
098bd39092 | ||
|
|
ab0d24aa6f | ||
|
|
dd941cc40a | ||
|
|
1187544fb0 | ||
|
|
1c3c47ab0b | ||
|
|
7d7f123e98 | ||
|
|
1cecc24cad | ||
|
|
70dfa467e7 | ||
|
|
306d0dfdf0 | ||
|
|
83b6b26d39 | ||
|
|
b1b5d4c1e4 | ||
|
|
4d7cef3418 | ||
|
|
77a5779e24 | ||
|
|
4e6a2a13a3 | ||
|
|
042f15ffbd | ||
|
|
7e44684a1f | ||
|
|
5a5c3a4a24 | ||
|
|
df3b6544f7 | ||
|
|
0a1be9ae87 | ||
|
|
58c7ea3193 | ||
|
|
67d414a927 | ||
|
|
227544cfc7 | ||
|
|
100d75a11c | ||
|
|
438863c4c5 | ||
|
|
0246a9da86 | ||
|
|
3234b20ee4 | ||
|
|
50bdfc3e2c | ||
|
|
f774787a39 | ||
|
|
694b120d0b | ||
|
|
f82bea6940 | ||
|
|
dcbd99de4a | ||
|
|
66165f712a | ||
|
|
645a677122 | ||
|
|
e1462a9253 | ||
|
|
5a5035be96 | ||
|
|
5512af798f | ||
|
|
73a863b337 | ||
|
|
aa36ae6576 | ||
|
|
3a47518b4b | ||
|
|
7e91a2c3ab | ||
|
|
9aea24002a | ||
|
|
aa3b356834 | ||
|
|
5fee9c62da | ||
|
|
681c01336b | ||
|
|
f1f01a1622 | ||
|
|
968bdeb46f | ||
|
|
e71c1df54c | ||
|
|
7ea403902b | ||
|
|
75af62b298 | ||
|
|
2a39276794 | ||
|
|
d08e8d1afa | ||
|
|
a8db527449 | ||
|
|
3c8a7fe1a4 | ||
|
|
dd11ef8441 | ||
|
|
44c3dd0d4c | ||
|
|
2df5bba16a | ||
|
|
b653276565 | ||
|
|
4efd24b336 | ||
|
|
00b949f1bb | ||
|
|
967f98aa81 | ||
|
|
05ed6a6ff5 | ||
|
|
ceeb8c14ee | ||
|
|
506f1651e5 | ||
|
|
a6ceda12c5 | ||
|
|
ef96a69e84 | ||
|
|
2cd8c461af | ||
|
|
b57b24d549 | ||
|
|
9fd77108e3 | ||
|
|
77fcb29607 | ||
|
|
3b45454190 | ||
|
|
8b23018575 | ||
|
|
aa929d6666 | ||
|
|
05e5865da3 | ||
|
|
b4f04ff4b3 | ||
|
|
8b35adca88 | ||
|
|
9fd5b3cfbd | ||
|
|
99ae7bbc97 | ||
|
|
34a2917dcc | ||
|
|
1595e4afc0 | ||
|
|
2288e13816 | ||
|
|
5a503d7db4 | ||
|
|
ffe31a1cd0 | ||
|
|
70ff1ec079 | ||
|
|
2773dc4847 | ||
|
|
c6e9579688 | ||
|
|
0e02aa5b8e | ||
|
|
1d0fcb5aaf | ||
|
|
821081d646 | ||
|
|
90ae1dc573 | ||
|
|
7bd22b1835 | ||
|
|
f250ec0a2e | ||
|
|
a594d182e4 | ||
|
|
8b558d9e0b | ||
|
|
f7124df56b | ||
|
|
20889d04d8 | ||
|
|
b0ef3ca25a | ||
|
|
70b0e84476 | ||
|
|
62ed302bf4 | ||
|
|
2fa5e0e0df | ||
|
|
4d20922b79 | ||
|
|
8d91b859cb | ||
|
|
be8ac7acc3 | ||
|
|
b89e6a0195 | ||
|
|
8c8b227547 | ||
|
|
7eec21e80d | ||
|
|
b45d9b6c97 | ||
|
|
aa8d38d3db | ||
|
|
1f5db50424 | ||
|
|
dd49fba8c5 | ||
|
|
dd31654684 | ||
|
|
b99d071a36 | ||
|
|
1d3fc0ee68 | ||
|
|
897ece48d5 | ||
|
|
5ae4758c8b | ||
|
|
97afc9a00c | ||
|
|
b2e5587a2e | ||
|
|
95aa440473 | ||
|
|
19eefe9321 | ||
|
|
812701d901 | ||
|
|
76c2f16f57 | ||
|
|
77c763b5ef | ||
|
|
19105a9019 | ||
|
|
9cd0201535 | ||
|
|
0409a68f50 | ||
|
|
081146c56e | ||
|
|
d64be7e10a | ||
|
|
a0fad76fb6 | ||
|
|
0a1b133c28 | ||
|
|
8b1d26df0b | ||
|
|
2118196dd5 | ||
|
|
bab07e0ff9 | ||
|
|
666bc4dbb2 | ||
|
|
cf60574a2f | ||
|
|
2df432f6af | ||
|
|
e0d9d6028c | ||
|
|
f4ddd4ac24 | ||
|
|
38428c0d6c | ||
|
|
c0268ca86e | ||
|
|
250e78c42a | ||
|
|
4ea696ffe4 | ||
|
|
3b1c85b3a2 | ||
|
|
d23825aa56 | ||
|
|
126f6d7dc1 | ||
|
|
7bbe6820c2 | ||
|
|
090775eff4 | ||
|
|
4514f41ffa | ||
|
|
b4b820851f | ||
|
|
b9f7098723 | ||
|
|
21c9a7c79d | ||
|
|
b3e072a625 | ||
|
|
bf8552f0f0 | ||
|
|
13992b17c7 | ||
|
|
152f4feff3 | ||
|
|
a7f6633362 | ||
|
|
fb762cf368 | ||
|
|
8dfb85c173 | ||
|
|
de8220c3bc | ||
|
|
61b85e4cbf | ||
|
|
f8ee0a06c5 | ||
|
|
d9111ccec2 | ||
|
|
106dbae220 | ||
|
|
167961e744 | ||
|
|
fbc2a55cde | ||
|
|
e1c0033552 | ||
|
|
ec4c712efa | ||
|
|
d8c298007f | ||
|
|
c84a3b541c | ||
|
|
dc684c60d1 | ||
|
|
752f957e12 | ||
|
|
60f3bd8d0c | ||
|
|
1f8e7a7b09 | ||
|
|
f873bcee24 | ||
|
|
7240d9d81c | ||
|
|
5a5412ca70 | ||
|
|
5e7cd0784b | ||
|
|
b090c65fe0 | ||
|
|
e339ec27b4 | ||
|
|
3555a7776e | ||
|
|
7df472527f | ||
|
|
d41636f445 | ||
|
|
c1aefeecc6 | ||
|
|
56b5b7d452 | ||
|
|
0008fa17e9 | ||
|
|
04dad71064 | ||
|
|
a835ad1076 | ||
|
|
b420038799 | ||
|
|
fb511c698e | ||
|
|
5bd7f4e8ae | ||
|
|
0b6701da5a | ||
|
|
4bc15f13aa | ||
|
|
5d834b1b71 | ||
|
|
ee9b820fbe | ||
|
|
097284d06b | ||
|
|
512fd08eca | ||
|
|
730882fca9 | ||
|
|
ffe310a8e1 | ||
|
|
188cff20c7 | ||
|
|
5fca3ae47b | ||
|
|
f5693896c5 | ||
|
|
df633e5ffa | ||
|
|
38b3182a90 | ||
|
|
66f7b672ed | ||
|
|
038f8d915e | ||
|
|
5442bffab5 | ||
|
|
184a943ad4 | ||
|
|
547f09dfa0 | ||
|
|
69d1d0a4f4 | ||
|
|
a308c7c8d7 | ||
|
|
0d3ce2d704 | ||
|
|
3c04f9f668 | ||
|
|
6a34750160 | ||
|
|
6d4e235784 | ||
|
|
4140de28eb | ||
|
|
a399f23903 | ||
|
|
14c03366ed | ||
|
|
33b36cde31 | ||
|
|
52b49fbcc8 | ||
|
|
8731266275 | ||
|
|
ba163e10bb | ||
|
|
ed2ea4538e | ||
|
|
083bd9e75c | ||
|
|
27e29ccaf2 | ||
|
|
0bc9aeef26 | ||
|
|
ec05cb8b38 | ||
|
|
0b7552272a | ||
|
|
2055809b1e | ||
|
|
8a37f93925 | ||
|
|
7fbb8278e7 | ||
|
|
79e2cb620e | ||
|
|
906df69f05 | ||
|
|
bd5867a96f | ||
|
|
88d76d9fe5 | ||
|
|
79c1ce1844 | ||
|
|
4f13be937e | ||
|
|
b8f2101c36 | ||
|
|
54fbd0cf0c | ||
|
|
ac647513b2 | ||
|
|
5d8e53d78d | ||
|
|
0513374b1f | ||
|
|
3181470ad7 | ||
|
|
a47e11d464 | ||
|
|
06e69c8991 | ||
|
|
8e6554a80a | ||
|
|
0fcf3e347f | ||
|
|
27d2ed84f4 | ||
|
|
efd91e52a6 | ||
|
|
a31dc90741 | ||
|
|
ed85aac53c | ||
|
|
7e2b682e54 | ||
|
|
d9e659a618 | ||
|
|
716b868b08 | ||
|
|
672c07728f | ||
|
|
84f6e6e0b1 | ||
|
|
9d6f2cced7 | ||
|
|
9c917fef08 | ||
|
|
b0c9b9c4d8 | ||
|
|
23fe1166d4 | ||
|
|
347bbe3897 | ||
|
|
b0e3ca43b8 | ||
|
|
841ab4134d | ||
|
|
1b8cdc6d82 | ||
|
|
6649a171dc | ||
|
|
ac4ee06c01 | ||
|
|
9774a52d11 | ||
|
|
ca50b87947 | ||
|
|
a7ae966530 | ||
|
|
4e10fadfdc | ||
|
|
41bee55b53 | ||
|
|
f0bd0cca8f | ||
|
|
26e90b9ffb | ||
|
|
535dca56c2 | ||
|
|
4fd3ac00b4 | ||
|
|
dff591d292 | ||
|
|
377733d44c | ||
|
|
3004717b0e | ||
|
|
5e7b65a9a9 | ||
|
|
2a90732677 | ||
|
|
6de7a1f052 | ||
|
|
d408381c77 | ||
|
|
3de408ee3e | ||
|
|
a9201d4a7d | ||
|
|
b14958485d | ||
|
|
d3ffa62b7f | ||
|
|
980cff9f29 | ||
|
|
66cb880754 | ||
|
|
9bf4855524 | ||
|
|
7d2e5c33ea | ||
|
|
591521e697 | ||
|
|
b3b340617e | ||
|
|
0ad09de75b | ||
|
|
5a9afbee65 | ||
|
|
d8d59e0cde | ||
|
|
f17519338b | ||
|
|
3fc93581bb | ||
|
|
2faa3b2f44 | ||
|
|
bebcc9cc93 | ||
|
|
fa8a407072 | ||
|
|
218d33ccb1 | ||
|
|
0688f212f5 | ||
|
|
11c39637de | ||
|
|
f041f48458 | ||
|
|
7e48f66c05 | ||
|
|
711f82e01e | ||
|
|
ac554ad46d | ||
|
|
b98d20a8ac | ||
|
|
447f9a1e16 | ||
|
|
6c02dbcfa1 | ||
|
|
a61d58d467 | ||
|
|
cdb6ba8ef1 | ||
|
|
39532a1f8c | ||
|
|
4fd58a1b8f | ||
|
|
7f1a154d15 | ||
|
|
8748ae16ac | ||
|
|
2df1dace32 | ||
|
|
b56e92f3d4 | ||
|
|
cc29d2b7d5 | ||
|
|
1b67e02385 | ||
|
|
f2512b1238 | ||
|
|
ab2a85a35f | ||
|
|
5729b294ee | ||
|
|
eee55d019f | ||
|
|
89ad61fd00 | ||
|
|
9e51f94941 | ||
|
|
ac3a5471c8 | ||
|
|
2a6a5fef59 | ||
|
|
21d91ce634 | ||
|
|
716dfd8698 | ||
|
|
816ea9ecd5 | ||
|
|
54c5ecb4e4 | ||
|
|
0e43d3c103 | ||
|
|
9d8d38d137 | ||
|
|
b13c7dbe36 | ||
|
|
7ae2c671c6 | ||
|
|
7401313e16 | ||
|
|
6fcca46674 | ||
|
|
5632210f10 | ||
|
|
156675c773 | ||
|
|
0db72ac19e | ||
|
|
59fe7ccc3b | ||
|
|
544ce20e01 | ||
|
|
18c201b838 | ||
|
|
faa7aa266a | ||
|
|
310b47bb96 | ||
|
|
b8c454c2ba | ||
|
|
4cfd9e25fa | ||
|
|
3e0eb4a1ba | ||
|
|
fa6013d83b | ||
|
|
8c058f88a6 | ||
|
|
4ea67abd46 | ||
|
|
937a67a651 | ||
|
|
3fdd0948b7 | ||
|
|
25e44bc63b | ||
|
|
812ccb96a4 | ||
|
|
44ee092878 | ||
|
|
fbe3c00675 | ||
|
|
8f7ac62905 | ||
|
|
f9397e108e | ||
|
|
69a971a35c | ||
|
|
05308fc299 | ||
|
|
7f2d5315fd | ||
|
|
61c9c07e95 | ||
|
|
82a801201e | ||
|
|
0f3e324152 | ||
|
|
ba673a3b78 | ||
|
|
52ff3b7382 | ||
|
|
0f4d328fc1 | ||
|
|
aed7dcab98 | ||
|
|
4491ac05d1 | ||
|
|
9d6e7e3df0 | ||
|
|
c4a1cd137a | ||
|
|
37b3891032 | ||
|
|
6e31f385e3 | ||
|
|
1a03cc9b60 | ||
|
|
306b203c2d | ||
|
|
e16263c39f | ||
|
|
a3c4dc95e3 | ||
|
|
f187fd696a | ||
|
|
d93c6f91f7 | ||
|
|
3e90a19183 | ||
|
|
d964c15e15 | ||
|
|
7e3d5b569d | ||
|
|
8ce62b3492 | ||
|
|
4ad6022ee3 | ||
|
|
83767f9544 | ||
|
|
d99d84a8aa | ||
|
|
8454786c8d | ||
|
|
75c22d545f | ||
|
|
aeb3f376a2 | ||
|
|
d02bb811de | ||
|
|
dd571d89f2 | ||
|
|
06cae13223 | ||
|
|
a771940776 | ||
|
|
53d8edd756 | ||
|
|
b3ea907b77 | ||
|
|
20af7a753c | ||
|
|
a390119b04 | ||
|
|
b7e148a107 | ||
|
|
af97400701 | ||
|
|
711dbd74ea | ||
|
|
e2552eea24 | ||
|
|
0b1b1fe067 | ||
|
|
55b1a8740d | ||
|
|
f933c35700 | ||
|
|
c82766d436 | ||
|
|
f037f08035 | ||
|
|
5731f346e2 | ||
|
|
f85d423535 | ||
|
|
91b5de66bf | ||
|
|
81f4405e26 | ||
|
|
9bac3894e1 | ||
|
|
68e23db25d | ||
|
|
80bd01527f | ||
|
|
2f19f0fb7b | ||
|
|
548504381f | ||
|
|
f1fc1b30be | ||
|
|
ba8512a0d8 | ||
|
|
c38f96b0e5 | ||
|
|
6a4974b1b9 | ||
|
|
ff77f82539 | ||
|
|
464cc81633 | ||
|
|
4c53acedce | ||
|
|
882ea0a430 | ||
|
|
e856d17ec5 | ||
|
|
19ac9d43ce | ||
|
|
1bc278b125 | ||
|
|
44e68c301a | ||
|
|
cc81668863 | ||
|
|
f6fae41cdf | ||
|
|
00dac83d67 | ||
|
|
8b28f9f564 | ||
|
|
478a971a7b | ||
|
|
813cfbf2b0 | ||
|
|
7e9da43b33 | ||
|
|
2997fd6459 | ||
|
|
43d110e9a9 | ||
|
|
bcdf1f96b8 | ||
|
|
c5c2a5fe13 | ||
|
|
62b96c520f | ||
|
|
867eb9054b | ||
|
|
7c6411b930 | ||
|
|
d2ef0622c9 | ||
|
|
31ad90b018 | ||
|
|
a244281287 | ||
|
|
10e6143499 | ||
|
|
e85e1ec4a6 | ||
|
|
3062eb208d | ||
|
|
68aea43526 | ||
|
|
2641c02193 | ||
|
|
ed790385ed | ||
|
|
8d3759d4a5 | ||
|
|
d01f6b2fd2 | ||
|
|
ca9001a936 | ||
|
|
820f999ba4 | ||
|
|
04a25c2813 | ||
|
|
768befec89 | ||
|
|
b984f66d13 | ||
|
|
9c580566b9 | ||
|
|
f4c7639986 | ||
|
|
bab31b6f55 | ||
|
|
653f0432b5 | ||
|
|
ccf158a817 | ||
|
|
b8da9ac51a | ||
|
|
457e2c8a5a | ||
|
|
45900385cd | ||
|
|
345b5c1c4c | ||
|
|
6da0d8cc91 | ||
|
|
2debcaff9d | ||
|
|
c9907c650f | ||
|
|
ec4ada852e | ||
|
|
f6ea3736a7 | ||
|
|
e9eec78fc7 | ||
|
|
ec9f7e3850 | ||
|
|
6a87d141f3 | ||
|
|
b673721d77 | ||
|
|
690b1cd321 | ||
|
|
25f7c68e6b | ||
|
|
ce0e78c103 | ||
|
|
1444b3632e | ||
|
|
bb1351cb8d | ||
|
|
c95db4fcaa | ||
|
|
b7338094a5 | ||
|
|
1df7e21459 | ||
|
|
11044315fd | ||
|
|
e0a245d2ea | ||
|
|
051855997e | ||
|
|
961782982b | ||
|
|
4d9e824a44 | ||
|
|
22227ccf26 | ||
|
|
71ae391eb3 | ||
|
|
90095cd7c4 | ||
|
|
fc5c0dae7f | ||
|
|
e832328b7e | ||
|
|
4e654f2a3a | ||
|
|
1de0dc8828 | ||
|
|
21afc0a2e2 | ||
|
|
a403a8d085 | ||
|
|
2d9d0d8b1d | ||
|
|
5be858e9b7 | ||
|
|
cc4614854a | ||
|
|
9079c90d22 | ||
|
|
1d7d7e92f2 | ||
|
|
309ebc13fc | ||
|
|
8244815161 | ||
|
|
906f906089 | ||
|
|
0225537fd1 | ||
|
|
487555b627 | ||
|
|
d6a3c0c239 | ||
|
|
862d00478e | ||
|
|
5cfd92b240 | ||
|
|
f2350fe0d1 | ||
|
|
d07c487d4d | ||
|
|
2eeed9e6fa | ||
|
|
9cac5b6f4f | ||
|
|
eb41348d39 | ||
|
|
ffccfd5488 | ||
|
|
598a1cb947 | ||
|
|
dd6ce09922 | ||
|
|
7cdf804392 | ||
|
|
380c4d2313 | ||
|
|
ef057bba7d | ||
|
|
00c14f2e7b | ||
|
|
f2c45ed1d3 | ||
|
|
abc49bf069 | ||
|
|
f4c7d373e4 | ||
|
|
a6b6ecdd22 | ||
|
|
fc53ff5a71 | ||
|
|
c5f68ff9be | ||
|
|
a033033b7a | ||
|
|
3af1346520 | ||
|
|
908b8141c9 | ||
|
|
3b078f822a | ||
|
|
9e886c4310 | ||
|
|
862299b6a6 | ||
|
|
4445d23544 | ||
|
|
3263470312 | ||
|
|
f061e76e1f | ||
|
|
46d462b83e | ||
|
|
8fe90dede7 | ||
|
|
526795bacd | ||
|
|
37db2d7e4c | ||
|
|
a7f1dc6a07 | ||
|
|
5436d44bf2 | ||
|
|
1207162055 | ||
|
|
241d8e26fb | ||
|
|
8e75001cb8 | ||
|
|
3d31e45e7e | ||
|
|
acf838f535 | ||
|
|
182e79bce1 | ||
|
|
d8456ee65b | ||
|
|
bbee11fb0e | ||
|
|
06361fa662 | ||
|
|
a774fbaca8 | ||
|
|
bd38e0318a | ||
|
|
a2035440cf | ||
|
|
e709245b55 | ||
|
|
45d1486fec | ||
|
|
710dced8b7 | ||
|
|
00fd87a10f | ||
|
|
b6001403e9 | ||
|
|
9ec7dfcbc4 | ||
|
|
88419b2075 | ||
|
|
41ffa0cf8c | ||
|
|
de620b8480 | ||
|
|
05fe15e0fc | ||
|
|
55ffcb1111 | ||
|
|
09d6dfb0df | ||
|
|
99a641690a | ||
|
|
d361a7f609 | ||
|
|
e6034867ba | ||
|
|
cd110a8995 | ||
|
|
ab1afb0ed8 | ||
|
|
62b220a87f | ||
|
|
80e1a45959 | ||
|
|
a0931f4864 | ||
|
|
0052e2db39 | ||
|
|
6ad63fba30 | ||
|
|
89d51d5f29 | ||
|
|
b21eb4d9a4 | ||
|
|
60218cd207 | ||
|
|
880fef77ab | ||
|
|
ce5c8dd379 | ||
|
|
bbc03d8116 | ||
|
|
8870d22bc7 | ||
|
|
9c4bb0df0e | ||
|
|
54a23403da | ||
|
|
850b736e14 | ||
|
|
681bbff110 | ||
|
|
d0ebfbbd15 | ||
|
|
e3bc4c4107 | ||
|
|
71c84c8132 | ||
|
|
3ea95efdeb | ||
|
|
4939f87118 | ||
|
|
351923d17e | ||
|
|
d95341e44a | ||
|
|
1964b22439 | ||
|
|
9a66f2b2e1 | ||
|
|
a07d526698 | ||
|
|
7ccefdcd6c | ||
|
|
7f85940143 | ||
|
|
37df12143c | ||
|
|
31699ae9a8 | ||
|
|
cde5587e58 | ||
|
|
4b58a85158 | ||
|
|
e6a521514e | ||
|
|
2fa2d32ceb | ||
|
|
bf6e803c6c | ||
|
|
99bae594c8 | ||
|
|
581fb30a4c | ||
|
|
97c01206bc | ||
|
|
cbe62d91fb | ||
|
|
69b52b4d8e | ||
|
|
9c04729de1 | ||
|
|
534659e97e | ||
|
|
934cd77da8 | ||
|
|
9e171ef8ff | ||
|
|
c5d168cef9 | ||
|
|
8bc5be8ba7 | ||
|
|
7f856a1d1f | ||
|
|
87ce7c7209 | ||
|
|
294347bee2 | ||
|
|
b3c81089ae | ||
|
|
3841722fe1 | ||
|
|
0cc3a7ec6b | ||
|
|
b333831b70 | ||
|
|
4643b0d959 | ||
|
|
ed130f1170 | ||
|
|
7f7d05a21c | ||
|
|
1ed50dade8 | ||
|
|
fe53b0e76f | ||
|
|
bd2fd615ce | ||
|
|
b03f255532 | ||
|
|
1831240d1c | ||
|
|
b700460999 | ||
|
|
a4a08b7342 | ||
|
|
d405ff1255 | ||
|
|
ad2cf68a7f | ||
|
|
51bef80755 | ||
|
|
11645e3268 | ||
|
|
76da4bc683 | ||
|
|
24dc2bfc50 | ||
|
|
581b101180 | ||
|
|
c57d1aa245 | ||
|
|
e66037960b | ||
|
|
52619e7a21 | ||
|
|
484d6bfb4e | ||
|
|
25013d9970 | ||
|
|
9eb0b38157 | ||
|
|
684319f9c6 | ||
|
|
27cabc19a0 | ||
|
|
d9df6bc5e6 | ||
|
|
e9e0bc168d | ||
|
|
98e6d20ebd | ||
|
|
f7dd304b1f | ||
|
|
8d94596e30 | ||
|
|
b48d737759 | ||
|
|
4a98986e28 | ||
|
|
68c3297947 | ||
|
|
8e41ef4cc5 | ||
|
|
42e88a8b7b | ||
|
|
1c956abfbc | ||
|
|
eeb6afc435 | ||
|
|
cc693ce82b | ||
|
|
106c67a811 | ||
|
|
f61ebdce91 | ||
|
|
3e20d3a275 | ||
|
|
5e73c555bc | ||
|
|
94807a1d2e | ||
|
|
ebf97bdfdd | ||
|
|
848a3960f6 | ||
|
|
0ef59845bf | ||
|
|
f9fdedf2d7 | ||
|
|
93a848c4b9 | ||
|
|
c151c956e0 | ||
|
|
8657cd91d7 | ||
|
|
78fcb8e766 | ||
|
|
17275ffd68 | ||
|
|
c0e4697dbd | ||
|
|
e84621a9d8 | ||
|
|
8c8862f3a8 | ||
|
|
a0ffb57745 | ||
|
|
f28caff927 | ||
|
|
ec196207c2 | ||
|
|
a80d31b1bd | ||
|
|
07b956e3a3 | ||
|
|
f1c5f0198c | ||
|
|
e46276eb71 | ||
|
|
570cfb44d6 | ||
|
|
a58e29db99 | ||
|
|
25a99b12e8 | ||
|
|
a93acc4275 | ||
|
|
8379027ee0 | ||
|
|
19a620213f | ||
|
|
7eaff48d7c | ||
|
|
b2a6d575dd | ||
|
|
259bc76026 | ||
|
|
ae001ae6ee | ||
|
|
1fa48d140c | ||
|
|
509876d26f | ||
|
|
692db0c81d | ||
|
|
816bacc2c3 | ||
|
|
58e120b77c | ||
|
|
983377b55a | ||
|
|
1281f4f552 | ||
|
|
0ae58c09a1 | ||
|
|
3484ae987a | ||
|
|
e56e53f83a | ||
|
|
5e978d3a3d | ||
|
|
e4ab50de34 | ||
|
|
2951732742 | ||
|
|
b2ffb1b02d | ||
|
|
2c3ccb80f0 | ||
|
|
3c0d6aaed9 | ||
|
|
8221b085f9 | ||
|
|
c081104395 | ||
|
|
88d28d6bdd | ||
|
|
a401585cfa | ||
|
|
d1f507fc0e | ||
|
|
0d6a0c3b28 | ||
|
|
dc621507f5 | ||
|
|
f483b38596 | ||
|
|
4fdda9e583 | ||
|
|
c215ce1858 | ||
|
|
e035fd7034 | ||
|
|
61768e08e7 | ||
|
|
1cda66e395 | ||
|
|
ff7b9b0380 | ||
|
|
4adca3d7a3 | ||
|
|
49f9f6f2cd | ||
|
|
e7e1c8a832 | ||
|
|
1e7dd72f15 | ||
|
|
b4c9e7e5d4 | ||
|
|
d11a58802a | ||
|
|
45e01a2a78 | ||
|
|
086ca616d8 | ||
|
|
5385b21fd3 | ||
|
|
8c007d90a5 | ||
|
|
47b2c186d7 | ||
|
|
0b952981e6 | ||
|
|
e3140fb70e | ||
|
|
ff26d54ee0 | ||
|
|
de04cbced5 | ||
|
|
f1820dc80a | ||
|
|
7e15d977ec | ||
|
|
dc3ef2ae0f | ||
|
|
0fadaed078 | ||
|
|
7c2dc4b342 | ||
|
|
82f9280ae4 | ||
|
|
28abbaa7bd | ||
|
|
dd16335e40 | ||
|
|
3434a6fc66 | ||
|
|
166761f29f | ||
|
|
bcbe5dcd78 | ||
|
|
b42a1da873 | ||
|
|
abfb6b219b | ||
|
|
9051fc347c | ||
|
|
f17622cc3d | ||
|
|
7606e6da39 | ||
|
|
8d8eb3bdf6 | ||
|
|
2f92d4e00e | ||
|
|
f9edc4b1cd | ||
|
|
930a24f965 | ||
|
|
ff72782888 | ||
|
|
d0476837a5 | ||
|
|
9223f05a40 | ||
|
|
6577db6dd6 | ||
|
|
6c4c13df44 | ||
|
|
9227a9648c | ||
|
|
b277feb448 | ||
|
|
3b94cc3546 | ||
|
|
ada77b3a3b | ||
|
|
6bafacfb14 | ||
|
|
b1f94a84e8 | ||
|
|
772d430cd1 | ||
|
|
896e29bba7 | ||
|
|
d1dbe0020d | ||
|
|
0addaa1cf2 | ||
|
|
c833571526 | ||
|
|
a2b6275487 | ||
|
|
f10b36d7fc | ||
|
|
9bc67abccf | ||
|
|
ff2946e04b | ||
|
|
d3f1bc04b4 | ||
|
|
b32a34c71d | ||
|
|
03541446b2 | ||
|
|
c2b70338fc | ||
|
|
1d028f3853 | ||
|
|
05148728de | ||
|
|
deb02722b2 | ||
|
|
6b272a65e7 | ||
|
|
5999d669ac | ||
|
|
67f1688c30 | ||
|
|
b8f9558745 | ||
|
|
a364b7e88b | ||
|
|
0dee538a62 | ||
|
|
6c4efc92be | ||
|
|
13b92ad487 | ||
|
|
855a8196cf | ||
|
|
9546b9c587 | ||
|
|
cd61b5d98e | ||
|
|
6bf2ebf200 | ||
|
|
25dc4afafa | ||
|
|
46be245976 | ||
|
|
cc78c7f5f5 | ||
|
|
29e137669e | ||
|
|
2053d6ace7 | ||
|
|
fc12258f24 | ||
|
|
c7a463a736 | ||
|
|
723c05e7fe | ||
|
|
5513f8a795 | ||
|
|
bdbdca8a56 | ||
|
|
ad99d4568b | ||
|
|
6e9a238a8c | ||
|
|
7a59fd38d4 | ||
|
|
9d9fcf7e62 | ||
|
|
1a33343012 | ||
|
|
a30aad98f7 | ||
|
|
c3f3edea07 | ||
|
|
b89fff0490 | ||
|
|
dfac4f9df2 | ||
|
|
fad3fa9bde | ||
|
|
2a9a9c4cf0 | ||
|
|
2efd9bb99f | ||
|
|
d7fc0c5ab2 | ||
|
|
603b32976b | ||
|
|
9b56221762 | ||
|
|
8e8d6aeeb0 | ||
|
|
2a1ace0cf2 | ||
|
|
931781c220 | ||
|
|
9271ee7643 | ||
|
|
8e061ce9c8 | ||
|
|
5cbd5352b4 | ||
|
|
37bee09e3d | ||
|
|
ffa4115239 | ||
|
|
40872ece07 | ||
|
|
3766afadd5 | ||
|
|
977a729eb0 | ||
|
|
8bda1f72a5 | ||
|
|
2184fbca00 | ||
|
|
9993eb9d16 |
No files matched your search
@@ -29,6 +29,8 @@ ij_java_names_count_to_use_import_on_demand = 999999
|
||||
ij_java_imports_layout = *,|,$*
|
||||
ij_java_generate_final_locals = true
|
||||
ij_java_generate_final_parameters = true
|
||||
ij_java_method_parameters_new_line_after_left_paren = true
|
||||
ij_java_method_parameters_right_paren_on_new_line = true
|
||||
|
||||
[test-plugin/**/*.java]
|
||||
ij_java_use_fq_class_names = false
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
labels: ["status: needs triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for filling out a feature request for Paper! Please be as detailed as possible so that we may consider and review the request easier.
|
||||
We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
|
||||
Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: Please give some context for this request. Why do you want it added?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like.
|
||||
description: A clear and concise description of what you want.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered.
|
||||
description: List any alternatives you might have tried to get the feature you want.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: Add any other context or screenshots about the feature request below.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this feature request, please search our issue tracker to ensure your feature has not
|
||||
already been requested.
|
||||
@@ -1,77 +0,0 @@
|
||||
name: Behavior Bug or Plugin Incompatibility
|
||||
description: Report issues with plugin incompatbility or other behavior related issues.
|
||||
labels: [ "status: needs triage", "type: bug" ]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: What you expected to see.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Observed/Actual behavior
|
||||
description: What you actually saw.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps/models to reproduce
|
||||
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Plugin and Datapack List
|
||||
description: |
|
||||
All plugins and datapacks running on your server.
|
||||
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Paper version
|
||||
description: |
|
||||
Run `/version` on your server and **paste** the full, unmodified output here.
|
||||
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
|
||||
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
|
||||
<details>
|
||||
<summary>Example</summary>
|
||||
|
||||
```
|
||||
> version
|
||||
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
|
||||
[20:34:42 INFO]: Checking version, please wait...
|
||||
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
|
||||
[20:34:42 INFO]: You are running the latest version
|
||||
```
|
||||
|
||||
</details>
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: |
|
||||
Please include other helpful information below.
|
||||
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. You searched for and ensured there isn't already an open issue regarding this.
|
||||
3. Your version of Minecraft is supported by Paper.
|
||||
|
||||
If you think you have a bug but are not sure, feel free to ask the `#paper-help` channel of our
|
||||
[Discord](https://discord.gg/papermc).
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
name: "🐛 Bug or Incompatibility"
|
||||
description: Report issues related to unexpected behavior or vanilla/plugin incompatibility.
|
||||
type: "Bug"
|
||||
labels:
|
||||
- "status: needs triage"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are using the latest version of Paper, available on our [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. You have searched to confirm there isn’t [an existing open issue](https://github.com/PaperMC/Paper/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug) on this topic.
|
||||
3. Your version of Minecraft is supported by Paper.
|
||||
|
||||
If you're unsure whether you've encountered a bug, feel free to ask in the `#paper-help` channel on our
|
||||
[Discord](https://discord.gg/papermc).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: What you expected to see.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Observed/Actual behavior
|
||||
description: What you actually saw.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps/models to reproduce
|
||||
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Plugin and Datapack List
|
||||
description: |
|
||||
All plugins and datapacks running on your server.
|
||||
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Paper version
|
||||
description: |
|
||||
Run `/version` on your server and **paste** the full, unmodified output here.
|
||||
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
|
||||
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
|
||||
<details>
|
||||
<summary>Example</summary>
|
||||
|
||||
```
|
||||
> version
|
||||
[20:34:42 INFO]: Checking version, please wait...
|
||||
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
|
||||
[20:34:42 INFO]: You are running the latest version
|
||||
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
|
||||
```
|
||||
|
||||
</details>
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: |
|
||||
Please include other helpful information below.
|
||||
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: PaperMC Discord
|
||||
url: https://discord.gg/papermc
|
||||
about: If you are having issues with timings or have other minor issues, come ask us on our Discord server!
|
||||
- name: Exploit Report
|
||||
- name: "❗Exploits"
|
||||
url: https://discord.gg/papermc
|
||||
about: |
|
||||
Due to GitHub not currently allowing private issues, exploit reports are currently handled via our Discord.
|
||||
To report an exploit, see the #paper-exploit-report channel.
|
||||
Since GitHub doesn’t currently support private issues, exploit reports are managed through our Discord.
|
||||
To report an exploit, please visit the #paper-exploit-report channel.
|
||||
- name: "🗨 Questions"
|
||||
url: https://discord.gg/papermc
|
||||
about: If you have questions or need help with any minor issues, feel free to ask us on our Discord server!
|
||||
@@ -0,0 +1,78 @@
|
||||
name: "💥 Crash or Stacktrace"
|
||||
description: Report any server crashes or alarming stack traces.
|
||||
type: "Bug"
|
||||
labels:
|
||||
- "status: needs triage"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. Your version of Minecraft is supported by Paper.
|
||||
|
||||
If your server crash log contains `DO NOT REPORT THIS TO PAPER`, please ask in our
|
||||
[Discord](https://discord.gg/papermc) before opening this issue. These messages are informing you of server
|
||||
lag and providing debug information.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Stack trace
|
||||
description: |
|
||||
We need all of the stack trace! Do not cut off parts of it. Please do not use attachments.
|
||||
If you prefer, you can use a paste site like https://mclo.gs.
|
||||
value: |
|
||||
```
|
||||
paste your stack trace or a mclo.gs link here!
|
||||
```
|
||||
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Plugin and Datapack List
|
||||
description: |
|
||||
All plugins and datapacks running on your server.
|
||||
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actions to reproduce (if known)
|
||||
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue. Anything helps!
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Paper version
|
||||
description: |
|
||||
Run `/version` on your server and **paste** the full, unmodified output here.
|
||||
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
|
||||
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
|
||||
<details>
|
||||
<summary>Example</summary>
|
||||
|
||||
```
|
||||
> version
|
||||
[20:34:42 INFO]: Checking version, please wait...
|
||||
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
|
||||
[20:34:42 INFO]: You are running the latest version
|
||||
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
|
||||
```
|
||||
|
||||
</details>
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: |
|
||||
Please include other helpful information below, if any.
|
||||
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
|
||||
validations:
|
||||
required: false
|
||||
@@ -1,44 +0,0 @@
|
||||
name: Feature Request
|
||||
description: Suggest an idea for Paper
|
||||
labels: [ "status: needs triage", "type: feature" ]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for filling out a feature request for Paper! Please be as detailed as possible so that we may consider and review the request easier.
|
||||
We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
|
||||
Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: Please give some context for this request. Why do you want it added?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like.
|
||||
description: A clear and concise description of what you want.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered.
|
||||
description: List any alternatives you might have tried to get the feature you want.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: Add any other context or screenshots about the feature request below.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this feature request, please search our issue tracker to ensure your feature has not
|
||||
already been requested.
|
||||
@@ -0,0 +1,53 @@
|
||||
name: "💡 New Feature"
|
||||
description: Propose a new idea for Paper.
|
||||
type: "Feature"
|
||||
labels:
|
||||
- "status: needs triage"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for submitting a feature request for Paper! Please be as detailed as possible to help us review and consider your request effectively.
|
||||
Before submitting, please ensure the following:
|
||||
|
||||
1. You are using a supported version of Paper.
|
||||
2. The feature you’re requesting isn’t already included in the version you’re using.
|
||||
3. You’ve searched for and confirmed there isn’t already [an open request](https://github.com/PaperMC/Paper/issues?q=is%3Aissue%20is%3Aopen%20type%3AFeature) for this feature.
|
||||
- If a similar request exists, feel free to add any additional details you think are helpful.
|
||||
|
||||
If you have any questions, feel free to ask in the `#paper-help` or `#paper-dev` channels on our [Discord](https://discord.gg/papermc).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: Please provide some context for this request. Why do you want it added?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like.
|
||||
description: A clear and concise description of what you want.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered.
|
||||
description: List any alternatives you might have tried to get the feature you want.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: Add any other context or screenshots about the feature request below.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this feature request, please search our issue tracker to ensure your feature has not
|
||||
already been requested.
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
name: Performance Problem
|
||||
description: Report performance related problems or other areas of concern
|
||||
labels: [ "status: needs triage", "type: performance" ]
|
||||
name: "🐌 Performance Problem"
|
||||
description: Report any performance issues.
|
||||
type: "Bug"
|
||||
labels:
|
||||
- "scope: performance"
|
||||
- "status: needs triage"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. You searched for and ensured there isn't already [an open issue](https://github.com/PaperMC/Paper/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug) regarding this.
|
||||
3. Your version of Minecraft is supported by Paper.
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
@@ -10,9 +22,12 @@ body:
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Timings or Profile link
|
||||
description: We ask that all timings/profiles are a link, not a screenshot. Screenshots inhibit our ability to figure out the real cause of the issue.
|
||||
placeholder: "Example: https://timings.aikar.co/?id=6b48586fbbdd48e585ca0ebb07c59dd0"
|
||||
label: Spark Profile
|
||||
description: |
|
||||
Please provide all profiles as links rather than screenshots. Screenshots limit our ability to investigate the root cause of the issue.
|
||||
|
||||
For more information, see our [profiling documentation](https://docs.papermc.io/paper/profiling).
|
||||
placeholder: "Example: https://spark.lucko.me/XsN0hxGfsi"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -35,10 +50,10 @@ body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Server config files
|
||||
description: We need bukkit.yml, spigot.yml, paper-global.yml, paper-world-defaults.yml and server.properties. If you use per-world Paper configs, make sure to include them. You can paste it below or use a paste site like https://paste.gg.
|
||||
description: We need bukkit.yml, spigot.yml, paper-global.yml, paper-world-defaults.yml and server.properties. If you use per-world Paper configs, make sure to include them. You can paste it below or use a paste site like https://mclo.gs.
|
||||
value: |
|
||||
```
|
||||
Paste configs or paste.gg link here!
|
||||
Paste configs or mclo.gs link here!
|
||||
```
|
||||
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
|
||||
validations:
|
||||
@@ -56,10 +71,10 @@ body:
|
||||
|
||||
```
|
||||
> version
|
||||
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
|
||||
[20:34:42 INFO]: Checking version, please wait...
|
||||
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
|
||||
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
|
||||
[20:34:42 INFO]: You are running the latest version
|
||||
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -74,11 +89,3 @@ body:
|
||||
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
|
||||
validations:
|
||||
required: false
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. You searched for and ensured there isn't already an open issue regarding this.
|
||||
3. Your version of Minecraft is supported by Paper.
|
||||
@@ -1,76 +0,0 @@
|
||||
name: Server crash or Stacktrace
|
||||
description: Report server crashes or scary stacktraces
|
||||
labels: [ "status: needs triage" ]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Stack trace
|
||||
description: |
|
||||
We need all of the stack trace! Do not cut off parts of it. Please do not use attachments.
|
||||
If you prefer, you can use a paste site like https://paste.gg.
|
||||
value: |
|
||||
```
|
||||
paste your stack trace or a paste.gg link here!
|
||||
```
|
||||
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Plugin and Datapack List
|
||||
description: |
|
||||
All plugins and datapacks running on your server.
|
||||
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actions to reproduce (if known)
|
||||
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue. Anything helps!
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Paper version
|
||||
description: |
|
||||
Run `/version` on your server and **paste** the full, unmodified output here.
|
||||
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
|
||||
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
|
||||
<details>
|
||||
<summary>Example</summary>
|
||||
|
||||
```
|
||||
> version
|
||||
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
|
||||
[20:34:42 INFO]: Checking version, please wait...
|
||||
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
|
||||
[20:34:42 INFO]: You are running the latest version
|
||||
```
|
||||
|
||||
</details>
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Other
|
||||
description: |
|
||||
Please include other helpful information below, if any.
|
||||
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. Your version of Minecraft is supported by Paper.
|
||||
|
||||
If your server crash log contains `DO NOT REPORT THIS TO PAPER`, please ask in our
|
||||
[Discord](https://discord.gg/papermc) before opening this issue. These messages are informing you of server
|
||||
lag and providing debug information.
|
||||
+43
-16
@@ -21,31 +21,39 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [17]
|
||||
java: [21]
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- if: ${{ github.event_name == 'push' }}
|
||||
uses: actions/checkout@v4
|
||||
- if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v3.11.0
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'temurin'
|
||||
distribution: 'zulu'
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Configure Build
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
id: determine
|
||||
env:
|
||||
REF_NAME: "${{ github.ref_name }}"
|
||||
REF_TYPE: "${{ github.ref_type }}"
|
||||
EVENT: "${{ toJSON(github.event) }}"
|
||||
EVENT_TYPE: "${{ github.event_name }}"
|
||||
with:
|
||||
script: |
|
||||
const {owner, repo} = context.repo;
|
||||
const event_name = "${{ github.event_name }}";
|
||||
const event = ${{ toJSON(github.event) }};
|
||||
const ref_type = "${{ github.ref_type }}";
|
||||
const ref_name = "${{ github.ref_name }}";
|
||||
const event_name = `${process.env.EVENT_TYPE}`;
|
||||
const event = JSON.parse(`${process.env.EVENT}`);
|
||||
const ref_type = `${process.env.REF_TYPE}`;
|
||||
const ref_name = `${process.env.REF_NAME}`;
|
||||
const result = {
|
||||
action: "build"
|
||||
};
|
||||
@@ -71,19 +79,38 @@ jobs:
|
||||
- name: Apply Patches
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com"
|
||||
git config --global user.name "Github Actions"
|
||||
git config --global user.name "GitHub Actions"
|
||||
./gradlew applyPatches --stacktrace
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build --stacktrace
|
||||
|
||||
- name: Upload Test Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Test Results (${{ matrix.java }})
|
||||
path: |
|
||||
**/build/test-results/test/TEST-*.xml
|
||||
|
||||
- name: Create Paperclip Jar
|
||||
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
|
||||
run: ./gradlew createReobfPaperclipJar --stacktrace
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
||||
|
||||
- name: Upload Paperclip Jar
|
||||
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
|
||||
path: build/libs/paper-paperclip-*-reobf.jar
|
||||
path: build/libs/paper-paperclip-*-mojmap.jar
|
||||
event_file:
|
||||
name: "Event File"
|
||||
# Only run on PRs if the source branch is on someone else's repo
|
||||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Event File
|
||||
path: ${{ github.event_path }}
|
||||
@@ -6,9 +6,22 @@ on:
|
||||
|
||||
jobs:
|
||||
run:
|
||||
if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'master' }}
|
||||
if: |
|
||||
github.repository != github.event.pull_request.head.repo.full_name &&
|
||||
(
|
||||
github.head_ref == 'master' ||
|
||||
github.event.pull_request.head.repo.owner.type != 'User'
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
id: "master_branch"
|
||||
if: github.head_ref == 'master'
|
||||
with:
|
||||
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
|
||||
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
id: "org_account"
|
||||
if: github.event.pull_request.head.repo.owner.type != 'User' && steps.master_branch.outcome == 'skipped'
|
||||
with:
|
||||
comment: "Please do not open pull requests from non-user accounts like organizations. Create a fork on a user account instead."
|
||||
@@ -17,7 +17,15 @@ jobs:
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
- uses: actions/github-script@v7
|
||||
env:
|
||||
BRANCH_NAME: "${{ github.event.workflow_run.head_branch }}"
|
||||
PR_OWNER: "${{ github.event.workflow_run.head_repository.owner.login }}"
|
||||
PR_SHA: "${{ github.event.workflow_run.head_sha }}"
|
||||
RUN_ID: "${{ github.event.workflow_run.id }}"
|
||||
REPO_ID: "${{ github.event.repository.id }}"
|
||||
EVENT_TYPE: "${{ github.event.workflow_run.event}}"
|
||||
PULL_REQUESTS: "${{ toJSON(github.event.workflow_run.pull_requests) }}"
|
||||
with:
|
||||
# This snippet is public-domain, taken from
|
||||
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
|
||||
@@ -37,17 +45,17 @@ jobs:
|
||||
}
|
||||
|
||||
const { owner, repo } = context.repo;
|
||||
const run_id = ${{ github.event.workflow_run.id }};
|
||||
const repo_id = ${{ github.event.repository.id }};
|
||||
const run_id = `${process.env.RUN_ID}`;
|
||||
const repo_id = `${process.env.REPO_ID}`;
|
||||
|
||||
let pulls = [];
|
||||
const event_type = "${{ github.event.workflow_run.event}}";
|
||||
const event_type = `${process.env.EVENT_TYPE}`;
|
||||
if (event_type === "push") { // if push, it's from the same repo which means `pull_requests` is populated
|
||||
pulls = ${{ toJSON(github.event.workflow_run.pull_requests) }};
|
||||
pulls = JSON.parse(`${process.env.PULL_REQUESTS}`);
|
||||
} else {
|
||||
const pr_branch = "${{ github.event.workflow_run.head_branch }}";
|
||||
const pr_sha = "${{ github.event.workflow_run.head_sha }}";
|
||||
const pr_owner = "${{ github.event.workflow_run.head_repository.owner.login }}";
|
||||
const pr_branch = `${process.env.BRANCH_NAME}`;
|
||||
const pr_sha = `${process.env.PR_SHA}`;
|
||||
const pr_owner = `${process.env.PR_OWNER}`;
|
||||
const { data } = await github.rest.pulls.list({ owner, repo, head: `${pr_owner}:${pr_branch}`, state: "open" });
|
||||
core.debug(JSON.stringify(data, null, 2));
|
||||
pulls = data.filter((pr) => pr.head.sha === pr_sha && pr.labels.find((l) => l.name === "build-pr-jar"));
|
||||
|
||||
@@ -33,25 +33,23 @@ jobs:
|
||||
column-field: Status
|
||||
label-to-column-map: |
|
||||
{
|
||||
"status: needs triage": "🕑 Needs Triage",
|
||||
"resolution: awaiting response": "⌛ Awaiting Response",
|
||||
"resolution: cannot reproduce": "Invalid",
|
||||
"resolution: duplicate": "Invalid",
|
||||
"resolution: incomplete": "Invalid",
|
||||
"resolution: invalid": "Invalid",
|
||||
"resolution: superseded": "Invalid",
|
||||
"resolution: unsupported": "Invalid",
|
||||
"resolution: won't fix": "Invalid",
|
||||
"resolution: works as intended": "Invalid",
|
||||
"status: accepted": "✅ Accepted",
|
||||
"status: unlikely": "✅ Accepted",
|
||||
"status: in progress": "Needs Work",
|
||||
"status: rebase required": "Needs Work",
|
||||
"status: blocked": "Needs Work",
|
||||
"status: defer upstream": "Needs Work",
|
||||
"status: in progress": "Needs Work",
|
||||
"status: input wanted": "Needs Work",
|
||||
"we must go deeper": "Needs Work",
|
||||
"has rough edges": "Needs Work",
|
||||
"status: waiting on reporter": "⌛ Waiting for Reporter",
|
||||
"resolution: works-as-intended": "Invalid",
|
||||
"resolution: invalid": "Invalid",
|
||||
"resolution: wontfix": "Invalid",
|
||||
"resolution: duplicate": "Invalid",
|
||||
"resolution: cannot reproduce": "Invalid",
|
||||
"resolution: unsupported": "Invalid",
|
||||
"resolution: incomplete": "Invalid",
|
||||
"resolution: superseded": "Invalid"
|
||||
"status: needs triage": "🕑 Needs Triage",
|
||||
"status: rebase required": "Needs Work",
|
||||
"status: unlikely": "✅ Accepted"
|
||||
}
|
||||
|
||||
- uses: PaperMC/update-projects-action@v0.2.0
|
||||
@@ -65,14 +63,14 @@ jobs:
|
||||
# include "status: needs triage" below to catch any closed issues without setting a resolution
|
||||
label-to-column-map: |
|
||||
{
|
||||
"status: accepted": "Done",
|
||||
"status: needs triage": "Invalid",
|
||||
"resolution: works-as-intended": "Invalid",
|
||||
"resolution: invalid": "Invalid",
|
||||
"resolution: wontfix": "Invalid",
|
||||
"resolution: duplicate": "Invalid",
|
||||
"resolution: cannot reproduce": "Invalid",
|
||||
"resolution: unsupported": "Invalid",
|
||||
"resolution: duplicate": "Invalid",
|
||||
"resolution: incomplete": "Invalid",
|
||||
"resolution: superseded": "Invalid"
|
||||
"resolution: invalid": "Invalid",
|
||||
"resolution: superseded": "Invalid",
|
||||
"resolution: unsupported": "Invalid",
|
||||
"resolution: won't fix": "Invalid",
|
||||
"resolution: works as intended": "Invalid",
|
||||
"status: accepted": "Done",
|
||||
"status: needs triage": "Invalid"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Test Results
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [ "Build Paper" ]
|
||||
types:
|
||||
- completed
|
||||
permissions: { }
|
||||
|
||||
jobs:
|
||||
test-results:
|
||||
name: Test Results
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.workflow_run.conclusion != 'skipped'
|
||||
permissions:
|
||||
checks: write
|
||||
# for downloading test result artifacts
|
||||
actions: read
|
||||
steps:
|
||||
- name: Download and Extract Artifacts
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
path: artifacts
|
||||
- name: Publish Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
commit: ${{ github.event.workflow_run.head_sha }}
|
||||
event_file: artifacts/Event File/event.json
|
||||
event_name: ${{ github.event.workflow_run.event }}
|
||||
files: "artifacts/**/*.xml"
|
||||
comment_mode: off
|
||||
@@ -61,6 +61,7 @@ out/
|
||||
|
||||
# other stuff
|
||||
run/
|
||||
logs/
|
||||
|
||||
Paper-Server
|
||||
Paper-API
|
||||
|
||||
+58
-23
@@ -27,12 +27,12 @@ which can be obtained in (most) package managers such as `apt` (Debian / Ubuntu;
|
||||
you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
|
||||
|
||||
- `git` (package `git` everywhere);
|
||||
- A Java 17 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
|
||||
- A Java 21 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
|
||||
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
|
||||
- Paper requires JDK 17 to build, however, makes use of Gradle's
|
||||
- Paper requires JDK 21 to build, however, makes use of Gradle's
|
||||
[Toolchains](https://docs.gradle.org/current/userguide/toolchains.html)
|
||||
feature to allow building with only JRE 11 or later installed. (Gradle will
|
||||
automatically provision JDK 17 for compilation if it cannot find an existing
|
||||
automatically provision JDK 21 for compilation if it cannot find an existing
|
||||
install).
|
||||
|
||||
If you're on Windows, check
|
||||
@@ -42,11 +42,11 @@ If you're compiling with Docker, you can use Adoptium's
|
||||
[`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin/) images like so:
|
||||
|
||||
```console
|
||||
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:17.0.1_12-jdk bash
|
||||
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:21.0.3_9-jdk bash
|
||||
Pulling image...
|
||||
|
||||
root@abcdefg1234:/# javac -version
|
||||
javac 17.0.1
|
||||
javac 21.0.3
|
||||
```
|
||||
|
||||
## Understanding Patches
|
||||
@@ -56,7 +56,6 @@ split into different directories which target certain parts of the code. These
|
||||
directories are:
|
||||
|
||||
- `Paper-API` - Modifications to `Spigot-API`/`Bukkit`;
|
||||
- `Paper-MojangAPI` - An API for [Mojang's Brigadier](https://github.com/Mojang/brigadier);
|
||||
- `Paper-Server` - Modifications to `Spigot`/`CraftBukkit`.
|
||||
|
||||
Because the entire structure is based on patches and git, a basic understanding
|
||||
@@ -67,7 +66,7 @@ Assuming you have already forked the repository:
|
||||
|
||||
1. Clone your fork to your local machine;
|
||||
2. Type `./gradlew applyPatches` in a terminal to apply the changes from upstream.
|
||||
On Windows, leave out the `./` at the beginning for all `gradlew` commands;
|
||||
On Windows, replace the `./` with `.\` at the beginning for all `gradlew` commands;
|
||||
3. cd into `Paper-Server` for server changes, and `Paper-API` for API changes.
|
||||
<!--You can also run `./paper server` or `./paper api` for these same directories
|
||||
respectively.
|
||||
@@ -97,7 +96,9 @@ Your commit will be converted into a patch that you can then PR into Paper.
|
||||
|
||||
## Modifying Patches
|
||||
|
||||
Modifying previous patches is a bit more complex:
|
||||
Modifying previous patches is a bit more complex.
|
||||
Similar to adding patches, the methods to modify a patch are applied inside
|
||||
the `Paper-Server` and/or `Paper-API` folders.
|
||||
|
||||
### Method 1
|
||||
|
||||
@@ -184,6 +185,8 @@ These steps assume the `origin` remote is your fork of this repository and `upst
|
||||
1. Checkout feature/fix branch and rebase on master: `git checkout patch-branch && git rebase master`.
|
||||
1. Apply updated patches: `./gradlew applyPatches`.
|
||||
1. If there are conflicts, fix them.
|
||||
* If there are conflicts within `Paper-API`, after fixing them run `./gradlew rebuildApiPatches` before re-running `./gradlew applyPatches`.
|
||||
* The API patches are applied first, so if there are conflicts in the API patches, the server patches will not be applied.
|
||||
1. If your PR creates new patches instead of modifying existing ones, in both the `Paper-Server` and `Paper-API` directories, ensure your newly-created patch is the last commit by either:
|
||||
* Renaming the patch file with a large 4-digit number in front (e.g. 9999-Patch-to-add-some-new-stuff.patch), and re-applying patches.
|
||||
* Running `git rebase --interactive base` and moving the commits to the end.
|
||||
@@ -204,29 +207,31 @@ when making and submitting changes.
|
||||
|
||||
## Formatting
|
||||
|
||||
All modifications to non-Paper files should be marked.
|
||||
All modifications to non-Paper files should be marked. The one exception to this is
|
||||
when modifying javadoc comments, which should not have these markers.
|
||||
|
||||
- Multi-line changes start with `// Paper start` and end with `// Paper end`;
|
||||
- You can put a comment with an explanation if it isn't obvious, like this:
|
||||
`// Paper start - reason`.
|
||||
- The comments should generally be about the reason the change was made, what
|
||||
it was before, or what the change is.
|
||||
- Multi-line messages should start with `// Paper start` and use `/* Multi
|
||||
line message here */` for the message itself.
|
||||
- One-line changes should have `// Paper` or `// Paper - reason`.
|
||||
- You need to add a comment with a short and identifiable description of the patch:
|
||||
`// Paper start - <COMMIT DESCRIPTION>`
|
||||
- The comments should generally be about the reason the change was made, what
|
||||
it was before, or what the change is.
|
||||
- After the general commit description, you can add additional information either
|
||||
after a `;` or in the next line.
|
||||
- Multi-line changes start with `// Paper start - <COMMIT DESCRIPTION>` and end
|
||||
with `// Paper end - <COMMIT DESCRIPTION>`.
|
||||
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
|
||||
|
||||
Here's an example of how to mark changes by Paper:
|
||||
|
||||
```java
|
||||
entity.getWorld().dontbeStupid(); // Paper - was beStupid() which is bad
|
||||
entity.getWorld().dontBeStupid(); // Paper - Was beStupid(), which is bad
|
||||
entity.getFriends().forEach(Entity::explode);
|
||||
entity.a();
|
||||
entity.b();
|
||||
// Paper start - use plugin-set spawn
|
||||
entity.updateFriends();
|
||||
|
||||
// Paper start - Use plugin-set spawn
|
||||
// entity.getWorld().explode(entity.getWorld().getSpawn());
|
||||
Location spawnLocation = ((CraftWorld)entity.getWorld()).getSpawnLocation();
|
||||
entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ()));
|
||||
// Paper end
|
||||
// Paper end - Use plugin-set spawn
|
||||
```
|
||||
|
||||
We generally follow the usual Java style (aka. Oracle style), or what is programmed
|
||||
@@ -235,6 +240,36 @@ into most IDEs and formatters by default. There are a few notes, however:
|
||||
There are exceptions, especially in Spigot-related files
|
||||
- When in doubt or the code around your change is in a clearly different style,
|
||||
use the same style as the surrounding code.
|
||||
- Usage of the `var` keyword is heavily discouraged, as it makes reading patch files
|
||||
a lot harder and can lead to confusion during updates due to changed return types.
|
||||
The only exception to this is if a line would otherwise be way too long/filled with
|
||||
hard to parse generics in a case where the base type itself is already obvious
|
||||
|
||||
### Imports
|
||||
When adding new imports to a class in a file not created by the current patch, use the fully qualified class name
|
||||
instead of adding a new import to the top of the file. If you are using a type a significant number of times, you
|
||||
can add an import with a comment. However, if its only used a couple of times, the FQN is preferred to prevent future
|
||||
patch conflicts in the import section of the file.
|
||||
|
||||
### Nullability annotations
|
||||
|
||||
We are in the process of switching nullability annotation libraries, so you might need to use one or the other:
|
||||
|
||||
**For classes we add**: Fields, method parameters and return types that are nullable should be marked via the
|
||||
`@Nullable` annotation from `org.jspecify.annotations`. Whenever you create a new class, add `@NullMarked`, meaning types
|
||||
are assumed to be non-null by default. For less obvious placing such as on generics or arrays, see the [JSpecify docs](https://jspecify.dev/docs/user-guide/).
|
||||
|
||||
**For classes added by upstream**: Keep using both `@Nullable` and `@NotNull` from `org.jetbrains.annotations`. These
|
||||
will be replaced later.
|
||||
|
||||
```java
|
||||
import org.bukkit.event.Event;
|
||||
// don't add import here, use FQN like below
|
||||
|
||||
public class SomeEvent extends Event {
|
||||
public final org.bukkit.Location newLocation; // Paper - add location
|
||||
}
|
||||
```
|
||||
|
||||
## Access Transformers
|
||||
Sometimes, vanilla or CraftBukkit code already contains a field, method, or type you want to access
|
||||
@@ -302,7 +337,7 @@ Subject: [PATCH] revert serverside behavior of keepalives
|
||||
This patch intends to bump up the time that a client has to reply to the
|
||||
server back to 30 seconds as per pre 1.12.2, which allowed clients
|
||||
more than enough time to reply potentially allowing them to be less
|
||||
tempermental due to lag spikes on the network thread, e.g. that caused
|
||||
temperamental due to lag spikes on the network thread, e.g. that caused
|
||||
by plugins that are interacting with netty.
|
||||
|
||||
We also add a system property to allow people to tweak how long the server
|
||||
|
||||
+3
-1
@@ -43,7 +43,7 @@ ysl3000 <yannicklamprecht@live.de>
|
||||
Machine_Maker <machine@machinemaker.me>
|
||||
Ivan Pekov <ivan@mrivanplays.com>
|
||||
Camotoy <20743703+Camotoy@users.noreply.github.com>
|
||||
Bjarne Koll <lynxplay101@gmail.com>
|
||||
Bjarne Koll <git@lynxplay.dev>
|
||||
MeFisto94 <MeFisto94@users.noreply.github.com>
|
||||
Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
LemonCaramel <admin@caramel.moe>
|
||||
@@ -63,4 +63,6 @@ Ollie <69084614+olijeffers0n@users.noreply.github.com>
|
||||
Oliwier Miodun <naczs@blueflow.pl>
|
||||
aerulion <aerulion@gmail.com>
|
||||
Lukas Planz <lukas.planz@web.de>
|
||||
granny <contact@granny.dev>
|
||||
mja00 <me@mja00.dev>
|
||||
```
|
||||
@@ -1,36 +0,0 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":paper-api"))
|
||||
api("com.mojang:brigadier:1.0.18")
|
||||
|
||||
compileOnly("it.unimi.dsi:fastutil:8.5.6")
|
||||
compileOnly("org.jetbrains:annotations:23.0.0")
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.2")
|
||||
}
|
||||
|
||||
configure<PublishingExtension> {
|
||||
publications.create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
|
||||
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
||||
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
||||
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||
classpath.from(configurations.compileClasspath)
|
||||
}
|
||||
tasks.check {
|
||||
dependsOn(scanJar)
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.destroystokyo.paper.brigadier;
|
||||
|
||||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.suggestion.SuggestionProvider;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Brigadier {@link Command}, {@link SuggestionProvider}, and permission checker for Bukkit {@link Command}s.
|
||||
*
|
||||
* @param <S> command source type
|
||||
*/
|
||||
public interface BukkitBrigadierCommand <S extends BukkitBrigadierCommandSource> extends Command<S>, Predicate<S>, SuggestionProvider<S> {
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
package com.destroystokyo.paper.brigadier;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface BukkitBrigadierCommandSource {
|
||||
|
||||
@Nullable
|
||||
Entity getBukkitEntity();
|
||||
|
||||
@Nullable
|
||||
World getBukkitWorld();
|
||||
|
||||
@Nullable
|
||||
Location getBukkitLocation();
|
||||
|
||||
CommandSender getBukkitSender();
|
||||
}
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
package com.destroystokyo.paper.event.brigadier;
|
||||
|
||||
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
|
||||
import com.mojang.brigadier.tree.RootCommandNode;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands.
|
||||
* You may manipulate this CommandNode to change what the client sees.
|
||||
*
|
||||
* <p>This event may fire on login, world change, and permission rebuilds, by plugin request, and potentially future means.</p>
|
||||
*
|
||||
* <p>This event will fire before {@link org.bukkit.event.player.PlayerCommandSendEvent}, so no filtering has been done by
|
||||
* other plugins yet.</p>
|
||||
*
|
||||
* <p>WARNING: This event will potentially (and most likely) fire twice! Once for Async, and once again for Sync.
|
||||
* It is important that you check event.isAsynchronous() and event.hasFiredAsync() to ensure you only act once.
|
||||
* If for some reason we are unable to send this asynchronously in the future, only the sync method will fire.</p>
|
||||
*
|
||||
* <p>Your logic should look like this:
|
||||
* {@code if (event.isAsynchronous() || !event.hasFiredAsync()) { // do stuff }}</p>
|
||||
*
|
||||
* <p>If your logic is not safe to run asynchronously, only react to the synchronous version.</p>
|
||||
*
|
||||
* <p>This is a draft/experimental API and is subject to change.</p>
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSource> extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final RootCommandNode<S> node;
|
||||
private final boolean hasFiredAsync;
|
||||
|
||||
public AsyncPlayerSendCommandsEvent(Player player, RootCommandNode<S> node, boolean hasFiredAsync) {
|
||||
super(player, !Bukkit.isPrimaryThread());
|
||||
this.node = node;
|
||||
this.hasFiredAsync = hasFiredAsync;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the full Root Command Node being sent to the client, which is mutable.
|
||||
*
|
||||
* @return the root command node
|
||||
*/
|
||||
public RootCommandNode<S> getCommandNode() {
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets if this event has already fired asynchronously.
|
||||
*
|
||||
* @return whether this event has already fired asynchronously
|
||||
*/
|
||||
public boolean hasFiredAsync() {
|
||||
return hasFiredAsync;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
package com.destroystokyo.paper.event.brigadier;
|
||||
|
||||
import com.mojang.brigadier.suggestion.Suggestions;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Called when sending {@link Suggestions} to the client. Will be called asynchronously if a plugin
|
||||
* marks the {@link com.destroystokyo.paper.event.server.AsyncTabCompleteEvent} event handled asynchronously,
|
||||
* otherwise called synchronously.
|
||||
*/
|
||||
public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
|
||||
private Suggestions suggestions;
|
||||
private final String buffer;
|
||||
|
||||
public AsyncPlayerSendSuggestionsEvent(Player player, Suggestions suggestions, String buffer) {
|
||||
super(player, !Bukkit.isPrimaryThread());
|
||||
this.suggestions = suggestions;
|
||||
this.buffer = buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the input buffer sent to request these suggestions.
|
||||
*
|
||||
* @return the input buffer
|
||||
*/
|
||||
public String getBuffer() {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the suggestions to be sent to client.
|
||||
*
|
||||
* @return the suggestions
|
||||
*/
|
||||
public Suggestions getSuggestions() {
|
||||
return suggestions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the suggestions to be sent to client.
|
||||
*
|
||||
* @param suggestions suggestions
|
||||
*/
|
||||
public void setSuggestions(Suggestions suggestions) {
|
||||
this.suggestions = suggestions;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels sending suggestions to the client.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
-168
@@ -1,168 +0,0 @@
|
||||
package com.destroystokyo.paper.event.brigadier;
|
||||
|
||||
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommand;
|
||||
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
|
||||
import com.mojang.brigadier.tree.ArgumentCommandNode;
|
||||
import com.mojang.brigadier.tree.LiteralCommandNode;
|
||||
import com.mojang.brigadier.tree.RootCommandNode;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.server.ServerEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Fired anytime the server synchronizes Bukkit commands to Brigadier.
|
||||
*
|
||||
* <p>Allows a plugin to control the command node structure for its commands.
|
||||
* This is done at Plugin Enable time after commands have been registered, but may also
|
||||
* run at a later point in the server lifetime due to plugins, a server reload, etc.</p>
|
||||
*
|
||||
* <p>This is a draft/experimental API and is subject to change.</p>
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public class CommandRegisteredEvent<S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final String commandLabel;
|
||||
private final Command command;
|
||||
private final BukkitBrigadierCommand<S> brigadierCommand;
|
||||
private final RootCommandNode<S> root;
|
||||
private final ArgumentCommandNode<S, String> defaultArgs;
|
||||
private LiteralCommandNode<S> literal;
|
||||
private boolean rawCommand = false;
|
||||
private boolean cancelled = false;
|
||||
|
||||
public CommandRegisteredEvent(String commandLabel, BukkitBrigadierCommand<S> brigadierCommand, Command command, RootCommandNode<S> root, LiteralCommandNode<S> literal, ArgumentCommandNode<S, String> defaultArgs) {
|
||||
this.commandLabel = commandLabel;
|
||||
this.brigadierCommand = brigadierCommand;
|
||||
this.command = command;
|
||||
this.root = root;
|
||||
this.literal = literal;
|
||||
this.defaultArgs = defaultArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the command label of the {@link Command} being registered.
|
||||
*
|
||||
* @return the command label
|
||||
*/
|
||||
public String getCommandLabel() {
|
||||
return this.commandLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link BukkitBrigadierCommand} for the {@link Command} being registered. This can be used
|
||||
* as the {@link com.mojang.brigadier.Command command executor} or
|
||||
* {@link com.mojang.brigadier.suggestion.SuggestionProvider} of a {@link com.mojang.brigadier.tree.CommandNode}
|
||||
* to delegate to the {@link Command} being registered.
|
||||
*
|
||||
* @return the {@link BukkitBrigadierCommand}
|
||||
*/
|
||||
public BukkitBrigadierCommand<S> getBrigadierCommand() {
|
||||
return this.brigadierCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link Command} being registered.
|
||||
*
|
||||
* @return the {@link Command}
|
||||
*/
|
||||
public Command getCommand() {
|
||||
return this.command;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link RootCommandNode} which is being registered to.
|
||||
*
|
||||
* @return the {@link RootCommandNode}
|
||||
*/
|
||||
public RootCommandNode<S> getRoot() {
|
||||
return this.root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Bukkit APIs default arguments node (greedy string), for if
|
||||
* you wish to reuse it.
|
||||
*
|
||||
* @return default arguments node
|
||||
*/
|
||||
public ArgumentCommandNode<S, String> getDefaultArgs() {
|
||||
return this.defaultArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link LiteralCommandNode} to be registered for the {@link Command}.
|
||||
*
|
||||
* @return the {@link LiteralCommandNode}
|
||||
*/
|
||||
public LiteralCommandNode<S> getLiteral() {
|
||||
return this.literal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link LiteralCommandNode} used to register this command. The default literal is mutable, so
|
||||
* this is primarily if you want to completely replace the object.
|
||||
*
|
||||
* @param literal new node
|
||||
*/
|
||||
public void setLiteral(LiteralCommandNode<S> literal) {
|
||||
this.literal = literal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this command should is treated as "raw".
|
||||
*
|
||||
* @see #setRawCommand(boolean)
|
||||
* @return whether this command is treated as "raw"
|
||||
*/
|
||||
public boolean isRawCommand() {
|
||||
return this.rawCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether this command should be treated as "raw".
|
||||
*
|
||||
* <p>A "raw" command will only use the node provided by this event for
|
||||
* sending the command tree to the client. For execution purposes, the default
|
||||
* greedy string execution of a standard Bukkit {@link Command} is used.</p>
|
||||
*
|
||||
* <p>On older versions of Paper, this was the default and only behavior of this
|
||||
* event.</p>
|
||||
*
|
||||
* @param rawCommand whether this command should be treated as "raw"
|
||||
*/
|
||||
public void setRawCommand(final boolean rawCommand) {
|
||||
this.rawCommand = rawCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels registering this command to Brigadier, but will remain in Bukkit Command Map. Can be used to hide a
|
||||
* command from all players.
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package io.papermc.paper.brigadier;
|
||||
|
||||
import com.mojang.brigadier.Message;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.ComponentLike;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* Helper methods to bridge the gaps between Brigadier and Paper-MojangAPI.
|
||||
*/
|
||||
public final class PaperBrigadier {
|
||||
private PaperBrigadier() {
|
||||
throw new RuntimeException("PaperBrigadier is not to be instantiated!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Brigadier {@link Message} from a {@link ComponentLike}.
|
||||
*
|
||||
* <p>Mostly useful for creating rich suggestion tooltips in combination with other Paper-MojangAPI APIs.</p>
|
||||
*
|
||||
* @param componentLike The {@link ComponentLike} to use for the {@link Message} contents
|
||||
* @return A new Brigadier {@link Message}
|
||||
*/
|
||||
public static @NonNull Message message(final @NonNull ComponentLike componentLike) {
|
||||
return PaperBrigadierProvider.instance().message(componentLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link Component} from a Brigadier {@link Message}.
|
||||
*
|
||||
* <p>If the {@link Message} was created from a {@link Component}, it will simply be
|
||||
* converted back, otherwise a new {@link TextComponent} will be created with the
|
||||
* content of {@link Message#getString()}</p>
|
||||
*
|
||||
* @param message The {@link Message} to create a {@link Component} from
|
||||
* @return The created {@link Component}
|
||||
*/
|
||||
public static @NonNull Component componentFromMessage(final @NonNull Message message) {
|
||||
return PaperBrigadierProvider.instance().componentFromMessage(message);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package io.papermc.paper.brigadier;
|
||||
|
||||
import com.mojang.brigadier.Message;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.ComponentLike;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
interface PaperBrigadierProvider {
|
||||
final class Holder {
|
||||
private static @MonotonicNonNull PaperBrigadierProvider INSTANCE;
|
||||
}
|
||||
|
||||
static @NonNull PaperBrigadierProvider instance() {
|
||||
return requireNonNull(Holder.INSTANCE, "PaperBrigadierProvider has not yet been initialized!");
|
||||
}
|
||||
|
||||
static void initialize(final @NonNull PaperBrigadierProvider instance) {
|
||||
if (Holder.INSTANCE != null) {
|
||||
throw new IllegalStateException("PaperBrigadierProvider has already been initialized!");
|
||||
}
|
||||
Holder.INSTANCE = instance;
|
||||
}
|
||||
|
||||
@NonNull Message message(@NonNull ComponentLike componentLike);
|
||||
|
||||
@NonNull Component componentFromMessage(@NonNull Message message);
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
> [!CAUTION]
|
||||
> **This branch will be deleted soon, please replace usage of it with the new `main` branch**.
|
||||
>
|
||||
> If you need history from before 1.21.4, please use the archive repo: https://github.com/PaperMC/Paper-archive
|
||||
|
||||
Paper [](https://github.com/PaperMC/Paper/actions)
|
||||
[](https://discord.gg/papermc)
|
||||
[](https://github.com/sponsors/PaperMC)
|
||||
@@ -8,7 +13,7 @@ The most widely used, high-performance Minecraft server that aims to fix gamepla
|
||||
|
||||
|
||||
**Support and Project Discussion:**
|
||||
- [Our forums](https://forums.papermc.io/), [Discord](https://discord.gg/papermc), or [IRC](https://webchat.esper.net/?channels=paper)
|
||||
- [Our forums](https://forums.papermc.io/) or [Discord](https://discord.gg/papermc)
|
||||
|
||||
How To (Server Admins)
|
||||
------
|
||||
@@ -40,7 +45,7 @@ How To (Plugin Developers)
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
@@ -53,19 +58,19 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
```
|
||||
|
||||
How To (Compiling Jar From Source)
|
||||
------
|
||||
To compile Paper, you need JDK 17 and an internet connection.
|
||||
To compile Paper, you need JDK 21 and an internet connection.
|
||||
|
||||
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createReobfBundlerJar` from your terminal. You can find the compiled jar in the project root's `build/libs` directory.
|
||||
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createMojmapBundlerJar` from your terminal. You can find the compiled jar in the project root's `build/libs` directory.
|
||||
|
||||
To get a full list of tasks, run `./gradlew tasks`.
|
||||
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
We generally only fully support the latest version, the same applies to exploits such as server crashes and item
|
||||
duplication bugs. In the transition period during larger Minecraft updates, we may still backport important fixes to the
|
||||
last minor or major release.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
For any issues that are NOT duplication bugs, server/client crashes, or otherwise serious exploits, please open an issue
|
||||
through the [Issues tab](https://github.com/PaperMC/Paper/issues).
|
||||
For exploits, please [join our Discord](https://discord.gg/papermc) and see the [#paper-exploit-report channel](https://discord.com/channels/289587909051416579/1208749386348101682) for
|
||||
further instructions.
|
||||
@@ -14,15 +14,15 @@ tiny 2 0 mojang+yarn spigot
|
||||
|
||||
# CraftBukkit changes type
|
||||
c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer
|
||||
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData K
|
||||
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData L
|
||||
|
||||
c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk
|
||||
f Lnet/minecraft/server/level/ServerLevel; level r
|
||||
|
||||
# See mappings-patch.tiny
|
||||
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
|
||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager F
|
||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager G
|
||||
|
||||
# Paper changes type
|
||||
c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials
|
||||
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId e
|
||||
# The method is made public by Spigot, which then causes accidental overrides
|
||||
c net/minecraft/world/entity/Entity net/minecraft/world/entity/Entity
|
||||
m ()Z isInRain isInRain0
|
||||
+172
-30
@@ -1,11 +1,17 @@
|
||||
import io.papermc.paperweight.PaperweightException
|
||||
import io.papermc.paperweight.tasks.BaseTask
|
||||
import io.papermc.paperweight.util.*
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.nio.file.Path
|
||||
import java.util.regex.Pattern
|
||||
import kotlin.io.path.*
|
||||
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.core") version "1.5.10"
|
||||
id("io.papermc.paperweight.core") version "1.7.7"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -14,7 +20,7 @@ allprojects {
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +30,8 @@ val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||
subprojects {
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(17)
|
||||
options.release = 21
|
||||
options.isFork = true
|
||||
}
|
||||
tasks.withType<Javadoc> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
@@ -61,31 +68,31 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("net.fabricmc:yarn:1.20.2+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.10:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
|
||||
paramMappings("net.fabricmc:yarn:1.21.4+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
|
||||
decompiler("org.vineflower:vineflower:1.10.1")
|
||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
}
|
||||
|
||||
paperweight {
|
||||
minecraftVersion.set(providers.gradleProperty("mcVersion"))
|
||||
serverProject.set(project(":paper-server"))
|
||||
minecraftVersion = providers.gradleProperty("mcVersion")
|
||||
serverProject = project(":paper-server")
|
||||
|
||||
paramMappingsRepo.set(paperMavenPublicUrl)
|
||||
remapRepo.set(paperMavenPublicUrl)
|
||||
decompileRepo.set(paperMavenPublicUrl)
|
||||
paramMappingsRepo = paperMavenPublicUrl
|
||||
remapRepo = paperMavenPublicUrl
|
||||
decompileRepo = paperMavenPublicUrl
|
||||
|
||||
craftBukkit {
|
||||
fernFlowerJar.set(layout.file(spigotDecompiler.elements.map { it.single().asFile }))
|
||||
fernFlowerJar = layout.file(spigotDecompiler.elements.map { it.single().asFile })
|
||||
}
|
||||
|
||||
paper {
|
||||
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||
spigotServerPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
||||
spigotApiPatchDir = layout.projectDirectory.dir("patches/api")
|
||||
spigotServerPatchDir = layout.projectDirectory.dir("patches/server")
|
||||
|
||||
mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny"))
|
||||
reobfMappingsPatch.set(layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny"))
|
||||
mappingsPatch = layout.projectDirectory.file("build-data/mappings-patch.tiny")
|
||||
reobfMappingsPatch = layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny")
|
||||
|
||||
reobfPackagesToFix.addAll(
|
||||
"co.aikar.timings",
|
||||
@@ -102,8 +109,7 @@ paperweight {
|
||||
}
|
||||
|
||||
tasks.generateDevelopmentBundle {
|
||||
apiCoordinates.set("io.papermc.paper:paper-api")
|
||||
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
||||
apiCoordinates = "io.papermc.paper:paper-api"
|
||||
libraryRepositories.addAll(
|
||||
"https://repo.maven.apache.org/maven2/",
|
||||
paperMavenPublicUrl,
|
||||
@@ -131,16 +137,6 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
// Uncomment while updating for a new Minecraft version
|
||||
/*
|
||||
tasks.collectAtsFromPatches {
|
||||
extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
|
||||
}
|
||||
tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches> {
|
||||
filterPatches.set(false)
|
||||
}
|
||||
*/
|
||||
|
||||
tasks.register("printMinecraftVersion") {
|
||||
doLast {
|
||||
println(providers.gradleProperty("mcVersion").get().trim())
|
||||
@@ -152,3 +148,149 @@ tasks.register("printPaperVersion") {
|
||||
println(project.version)
|
||||
}
|
||||
}
|
||||
|
||||
// see gradle.properties
|
||||
if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) {
|
||||
tasks.collectAtsFromPatches {
|
||||
val dir = layout.projectDirectory.dir("patches/unapplied/server")
|
||||
if (dir.path.isDirectory()) {
|
||||
extraPatchDir = dir
|
||||
}
|
||||
}
|
||||
tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches>().configureEach {
|
||||
filterPatches = false
|
||||
}
|
||||
tasks.register("continueServerUpdate", RebasePatches::class) {
|
||||
description = "Moves the next X patches from unapplied to applied, and applies them. X being the number of patches that apply cleanly, plus the terminal failure if any."
|
||||
projectDir = project.projectDir
|
||||
appliedPatches = file("patches/server")
|
||||
unappliedPatches = file("patches/unapplied/server")
|
||||
applyTaskName = "applyServerPatches"
|
||||
patchedDir = "Paper-Server"
|
||||
}
|
||||
}
|
||||
|
||||
@UntrackedTask(because = "Does not make sense to track state")
|
||||
abstract class RebasePatches : BaseTask() {
|
||||
@get:Internal
|
||||
abstract val projectDir: DirectoryProperty
|
||||
|
||||
@get:InputFiles
|
||||
abstract val appliedPatches: DirectoryProperty
|
||||
|
||||
@get:InputFiles
|
||||
abstract val unappliedPatches: DirectoryProperty
|
||||
|
||||
@get:Input
|
||||
abstract val applyTaskName: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val patchedDir: Property<String>
|
||||
|
||||
private fun unapplied(): List<Path> =
|
||||
unappliedPatches.path.listDirectoryEntries("*.patch").sortedBy { it.name }
|
||||
|
||||
private fun appliedLoc(patch: Path): Path = appliedPatches.path.resolve(unappliedPatches.path.relativize(patch))
|
||||
|
||||
companion object {
|
||||
val regex = Pattern.compile("Patch failed at ([0-9]{4}) (.*)")
|
||||
val continuationRegex = Pattern.compile("^\\s{1}.+\$")
|
||||
const val subjectPrefix = "Subject: [PATCH] "
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
fun run() {
|
||||
val patchedDirPath = projectDir.path.resolve(patchedDir.get())
|
||||
if (patchedDirPath.isDirectory()) {
|
||||
val status = Git(patchedDirPath)("status").getText()
|
||||
if (status.contains("You are in the middle of an am session.")) {
|
||||
throw PaperweightException("Cannot continue update when $patchedDirPath is in the middle of an am session.")
|
||||
}
|
||||
}
|
||||
|
||||
val unapplied = unapplied()
|
||||
for (patch in unapplied) {
|
||||
patch.copyTo(appliedLoc(patch))
|
||||
}
|
||||
|
||||
val out = ByteArrayOutputStream()
|
||||
val proc = ProcessBuilder()
|
||||
.directory(projectDir.path)
|
||||
.command("./gradlew", applyTaskName.get())
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
|
||||
val f = redirect(proc.inputStream, out)
|
||||
|
||||
val exit = proc.waitFor()
|
||||
f.get()
|
||||
|
||||
if (exit != 0) {
|
||||
val outStr = String(out.toByteArray())
|
||||
val matcher = regex.matcher(outStr)
|
||||
if (!matcher.find()) error("Could not determine failure point")
|
||||
val failedSubjectFragment = matcher.group(2)
|
||||
val failed = unapplied.single { p ->
|
||||
p.useLines { lines ->
|
||||
val collect = mutableListOf<String>()
|
||||
for (line in lines) {
|
||||
if (line.startsWith(subjectPrefix)) {
|
||||
collect += line
|
||||
} else if (collect.size == 1) {
|
||||
if (continuationRegex.matcher(line).matches()) {
|
||||
collect += line
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
val subjectLine = collect.joinToString("").substringAfter(subjectPrefix)
|
||||
subjectLine.startsWith(failedSubjectFragment)
|
||||
}
|
||||
}
|
||||
|
||||
// delete successful & failure point from unapplied patches dir
|
||||
for (path in unapplied) {
|
||||
path.deleteIfExists()
|
||||
if (path == failed) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// delete failed from patches dir
|
||||
var started = false
|
||||
for (path in unapplied) {
|
||||
if (path == failed) {
|
||||
started = true
|
||||
continue
|
||||
}
|
||||
if (started) {
|
||||
appliedLoc(path).deleteIfExists()
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the build file before resetting the AM session in case it has compilation errors
|
||||
patchedDirPath.resolve("build.gradle.kts").deleteIfExists()
|
||||
// Apply again to reset the am session (so it ends on the failed patch, to allow us to rebuild after fixing it)
|
||||
val apply2 = ProcessBuilder()
|
||||
.directory(projectDir.path)
|
||||
.command("./gradlew", applyTaskName.get())
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
|
||||
val f1 = redirect(apply2.inputStream, System.out)
|
||||
apply2.waitFor()
|
||||
f1.get()
|
||||
|
||||
logger.lifecycle(outStr)
|
||||
logger.lifecycle("Patch failed at $failed; See Git output above.")
|
||||
} else {
|
||||
unapplied.forEach { it.deleteIfExists() }
|
||||
logger.lifecycle("All patches applied!")
|
||||
}
|
||||
|
||||
val git = Git(projectDir.path)
|
||||
git("add", appliedPatches.path.toString() + "/*").runSilently()
|
||||
git("add", unappliedPatches.path.toString() + "/*").runSilently()
|
||||
}
|
||||
}
|
||||
+5
-2
@@ -1,6 +1,9 @@
|
||||
group=io.papermc.paper
|
||||
version=1.20.2-R0.1-SNAPSHOT
|
||||
mcVersion=1.20.2
|
||||
version=1.21.4-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.4
|
||||
|
||||
# Set to true while updating Minecraft version
|
||||
updatingMinecraft=false
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,8 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
Vendored
+12
-10
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
||||
@@ -1,28 +1,37 @@
|
||||
import org.spongepowered.gradle.vanilla.repository.MinecraftPlatform
|
||||
import io.papermc.paperweight.PaperweightSourceGeneratorHelper
|
||||
import io.papermc.paperweight.extension.PaperweightSourceGeneratorExt
|
||||
import io.papermc.paperweight.util.defaultJavaLauncher
|
||||
|
||||
plugins {
|
||||
java
|
||||
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version(property("mcVersion").toString())
|
||||
platform(MinecraftPlatform.SERVER)
|
||||
plugins.apply(PaperweightSourceGeneratorHelper::class)
|
||||
|
||||
runs {
|
||||
server("generate") {
|
||||
mainClass("io.papermc.generator.Main")
|
||||
accessWideners(projectDir.toPath().resolve("wideners.at"))
|
||||
args(projectDir.toPath().resolve("generated").toString())
|
||||
}
|
||||
}
|
||||
extensions.configure(PaperweightSourceGeneratorExt::class) {
|
||||
atFile.set(projectDir.toPath().resolve("wideners.at").toFile())
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.squareup:javapoet:1.13.0")
|
||||
implementation(project(":paper-api"))
|
||||
implementation("io.github.classgraph:classgraph:4.8.47")
|
||||
implementation("org.jetbrains:annotations:24.1.0")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
tasks.register<JavaExec>("generate") {
|
||||
dependsOn(tasks.check)
|
||||
mainClass.set("io.papermc.generator.Main")
|
||||
classpath(sourceSets.main.map { it.runtimeClasspath })
|
||||
args(projectDir.toPath().resolve("generated").toString())
|
||||
javaLauncher = javaToolchains.defaultJavaLauncher(project)
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
group = "io.papermc.paper"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
package com.destroystokyo.paper.entity.ai;
|
||||
|
||||
import com.destroystokyo.paper.entity.RangedEntity;
|
||||
import io.papermc.paper.entity.SchoolableFish;
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.AbstractHorse;
|
||||
import org.bukkit.entity.AbstractSkeleton;
|
||||
import org.bukkit.entity.AbstractVillager;
|
||||
import org.bukkit.entity.Animals;
|
||||
import org.bukkit.entity.Bee;
|
||||
import org.bukkit.entity.Blaze;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.Dolphin;
|
||||
import org.bukkit.entity.Drowned;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.entity.Evoker;
|
||||
import org.bukkit.entity.Fish;
|
||||
import org.bukkit.entity.Fox;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.entity.Guardian;
|
||||
import org.bukkit.entity.Illager;
|
||||
import org.bukkit.entity.Illusioner;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.Llama;
|
||||
import org.bukkit.entity.Mob;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Ocelot;
|
||||
import org.bukkit.entity.Panda;
|
||||
import org.bukkit.entity.Parrot;
|
||||
import org.bukkit.entity.Phantom;
|
||||
import org.bukkit.entity.PolarBear;
|
||||
import org.bukkit.entity.PufferFish;
|
||||
import org.bukkit.entity.Rabbit;
|
||||
import org.bukkit.entity.Raider;
|
||||
import org.bukkit.entity.Shulker;
|
||||
import org.bukkit.entity.Silverfish;
|
||||
import org.bukkit.entity.SkeletonHorse;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.entity.Spellcaster;
|
||||
import org.bukkit.entity.Spider;
|
||||
import org.bukkit.entity.Squid;
|
||||
import org.bukkit.entity.Strider;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.Turtle;
|
||||
import org.bukkit.entity.Vex;
|
||||
import org.bukkit.entity.Vindicator;
|
||||
import org.bukkit.entity.WanderingTrader;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for Mob Goals.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
|
||||
|
||||
GoalKey<AbstractHorse> RUN_AROUND_LIKE_CRAZY = create("run_around_like_crazy", AbstractHorse.class);
|
||||
|
||||
GoalKey<AbstractSkeleton> ABSTRACT_SKELETON_MELEE = create("abstract_skeleton_melee", AbstractSkeleton.class);
|
||||
|
||||
GoalKey<AbstractVillager> LOOK_AT_TRADING_PLAYER = create("look_at_trading_player", AbstractVillager.class);
|
||||
|
||||
GoalKey<AbstractVillager> TRADE_WITH_PLAYER = create("trade_with_player", AbstractVillager.class);
|
||||
|
||||
GoalKey<Animals> BREED = create("breed", Animals.class);
|
||||
|
||||
GoalKey<Animals> FOLLOW_PARENT = create("follow_parent", Animals.class);
|
||||
|
||||
GoalKey<Bee> BEE_ATTACK = create("bee_attack", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_BECOME_ANGRY = create("bee_become_angry", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_ENTER_HIVE = create("bee_enter_hive", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_GO_TO_HIVE = create("bee_go_to_hive", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_GO_TO_KNOWN_FLOWER = create("bee_go_to_known_flower", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_GROW_CROP = create("bee_grow_crop", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_HURT_BY_OTHER = create("bee_hurt_by_other", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_LOCATE_HIVE = create("bee_locate_hive", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_POLLINATE = create("bee_pollinate", Bee.class);
|
||||
|
||||
GoalKey<Bee> BEE_WANDER = create("bee_wander", Bee.class);
|
||||
|
||||
GoalKey<Bee> VALIDATE_FLOWER = create("validate_flower", Bee.class);
|
||||
|
||||
GoalKey<Bee> VALIDATE_HIVE = create("validate_hive", Bee.class);
|
||||
|
||||
GoalKey<Blaze> BLAZE_ATTACK = create("blaze_attack", Blaze.class);
|
||||
|
||||
GoalKey<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class);
|
||||
|
||||
GoalKey<Cat> CAT_LIE_ON_BED = create("cat_lie_on_bed", Cat.class);
|
||||
|
||||
GoalKey<Cat> CAT_RELAX_ON_OWNER = create("cat_relax_on_owner", Cat.class);
|
||||
|
||||
GoalKey<Cat> CAT_SIT_ON_BLOCK = create("cat_sit_on_block", Cat.class);
|
||||
|
||||
GoalKey<Cat> CAT_TEMPT = create("cat_tempt", Cat.class);
|
||||
|
||||
GoalKey<Creature> AVOID_ENTITY = create("avoid_entity", Creature.class);
|
||||
|
||||
GoalKey<Creature> BREATH_AIR = create("breath_air", Creature.class);
|
||||
|
||||
GoalKey<Creature> DROWNED_GO_TO_WATER = create("drowned_go_to_water", Creature.class);
|
||||
|
||||
GoalKey<Creature> FLEE_SUN = create("flee_sun", Creature.class);
|
||||
|
||||
GoalKey<Creature> FOLLOW_BOAT = create("follow_boat", Creature.class);
|
||||
|
||||
GoalKey<Creature> GOLEM_RANDOM_STROLL_IN_VILLAGE = create("golem_random_stroll_in_village", Creature.class);
|
||||
|
||||
GoalKey<Creature> HURT_BY = create("hurt_by", Creature.class);
|
||||
|
||||
GoalKey<Creature> MELEE_ATTACK = create("melee_attack", Creature.class);
|
||||
|
||||
GoalKey<Creature> MOVE_BACK_TO_VILLAGE = create("move_back_to_village", Creature.class);
|
||||
|
||||
GoalKey<Creature> MOVE_THROUGH_VILLAGE = create("move_through_village", Creature.class);
|
||||
|
||||
GoalKey<Creature> MOVE_TOWARDS = create("move_towards", Creature.class);
|
||||
|
||||
GoalKey<Creature> MOVE_TOWARDS_RESTRICTION = create("move_towards_restriction", Creature.class);
|
||||
|
||||
GoalKey<Creature> PANIC = create("panic", Creature.class);
|
||||
|
||||
GoalKey<Creature> PARROT_WANDER = create("parrot_wander", Creature.class);
|
||||
|
||||
GoalKey<Creature> RANDOM_STROLL = create("random_stroll", Creature.class);
|
||||
|
||||
GoalKey<Creature> RANDOM_SWIMMING = create("random_swimming", Creature.class);
|
||||
|
||||
GoalKey<Creature> REMOVE_BLOCK = create("remove_block", Creature.class);
|
||||
|
||||
GoalKey<Creature> RESTRICT_SUN = create("restrict_sun", Creature.class);
|
||||
|
||||
GoalKey<Creature> STROLL_THROUGH_VILLAGE = create("stroll_through_village", Creature.class);
|
||||
|
||||
GoalKey<Creature> TEMPT = create("tempt", Creature.class);
|
||||
|
||||
GoalKey<Creature> TRY_FIND_WATER = create("try_find_water", Creature.class);
|
||||
|
||||
GoalKey<Creature> WATER_AVOIDING_RANDOM_FLYING = create("water_avoiding_random_flying", Creature.class);
|
||||
|
||||
GoalKey<Creature> WATER_AVOIDING_RANDOM_STROLL = create("water_avoiding_random_stroll", Creature.class);
|
||||
|
||||
GoalKey<Creeper> SWELL = create("swell", Creeper.class);
|
||||
|
||||
GoalKey<Dolphin> DOLPHIN_JUMP = create("dolphin_jump", Dolphin.class);
|
||||
|
||||
GoalKey<Dolphin> DOLPHIN_SWIM_TO_TREASURE = create("dolphin_swim_to_treasure", Dolphin.class);
|
||||
|
||||
GoalKey<Dolphin> DOLPHIN_SWIM_WITH_PLAYER = create("dolphin_swim_with_player", Dolphin.class);
|
||||
|
||||
GoalKey<Dolphin> PLAY_WITH_ITEMS = create("play_with_items", Dolphin.class);
|
||||
|
||||
GoalKey<Drowned> DROWNED_ATTACK = create("drowned_attack", Drowned.class);
|
||||
|
||||
GoalKey<Drowned> DROWNED_GO_TO_BEACH = create("drowned_go_to_beach", Drowned.class);
|
||||
|
||||
GoalKey<Drowned> DROWNED_SWIM_UP = create("drowned_swim_up", Drowned.class);
|
||||
|
||||
GoalKey<Enderman> ENDERMAN_FREEZE_WHEN_LOOKED_AT = create("enderman_freeze_when_looked_at", Enderman.class);
|
||||
|
||||
GoalKey<Enderman> ENDERMAN_LEAVE_BLOCK = create("enderman_leave_block", Enderman.class);
|
||||
|
||||
GoalKey<Enderman> ENDERMAN_LOOK_FOR_PLAYER = create("enderman_look_for_player", Enderman.class);
|
||||
|
||||
GoalKey<Enderman> ENDERMAN_TAKE_BLOCK = create("enderman_take_block", Enderman.class);
|
||||
|
||||
GoalKey<Evoker> EVOKER_ATTACK_SPELL = create("evoker_attack_spell", Evoker.class);
|
||||
|
||||
GoalKey<Evoker> EVOKER_CASTING_SPELL = create("evoker_casting_spell", Evoker.class);
|
||||
|
||||
GoalKey<Evoker> EVOKER_SUMMON_SPELL = create("evoker_summon_spell", Evoker.class);
|
||||
|
||||
GoalKey<Evoker> EVOKER_WOLOLO_SPELL = create("evoker_wololo_spell", Evoker.class);
|
||||
|
||||
GoalKey<Fish> FISH_SWIM = create("fish_swim", Fish.class);
|
||||
|
||||
GoalKey<Fox> DEFEND_TRUSTED = create("defend_trusted", Fox.class);
|
||||
|
||||
GoalKey<Fox> FACEPLANT = create("faceplant", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_BREED = create("fox_breed", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_EAT_BERRIES = create("fox_eat_berries", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_FLOAT = create("fox_float", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_FOLLOW_PARENT = create("fox_follow_parent", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_LOOK_AT_PLAYER = create("fox_look_at_player", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_MELEE_ATTACK = create("fox_melee_attack", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_PANIC = create("fox_panic", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_POUNCE = create("fox_pounce", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_SEARCH_FOR_ITEMS = create("fox_search_for_items", Fox.class);
|
||||
|
||||
GoalKey<Fox> FOX_STROLL_THROUGH_VILLAGE = create("fox_stroll_through_village", Fox.class);
|
||||
|
||||
GoalKey<Fox> PERCH_AND_SEARCH = create("perch_and_search", Fox.class);
|
||||
|
||||
GoalKey<Fox> SEEK_SHELTER = create("seek_shelter", Fox.class);
|
||||
|
||||
GoalKey<Fox> SLEEP = create("sleep", Fox.class);
|
||||
|
||||
GoalKey<Fox> STALK_PREY = create("stalk_prey", Fox.class);
|
||||
|
||||
GoalKey<Ghast> GHAST_LOOK = create("ghast_look", Ghast.class);
|
||||
|
||||
GoalKey<Ghast> GHAST_SHOOT_FIREBALL = create("ghast_shoot_fireball", Ghast.class);
|
||||
|
||||
GoalKey<Ghast> RANDOM_FLOAT_AROUND = create("random_float_around", Ghast.class);
|
||||
|
||||
GoalKey<Guardian> GUARDIAN_ATTACK = create("guardian_attack", Guardian.class);
|
||||
|
||||
GoalKey<Illager> HOLD_GROUND_ATTACK = create("hold_ground_attack", Illager.class);
|
||||
|
||||
GoalKey<Illager> RAIDER_OPEN_DOOR = create("raider_open_door", Illager.class);
|
||||
|
||||
GoalKey<Illusioner> ILLUSIONER_BLINDNESS_SPELL = create("illusioner_blindness_spell", Illusioner.class);
|
||||
|
||||
GoalKey<Illusioner> ILLUSIONER_MIRROR_SPELL = create("illusioner_mirror_spell", Illusioner.class);
|
||||
|
||||
GoalKey<IronGolem> DEFEND_VILLAGE = create("defend_village", IronGolem.class);
|
||||
|
||||
GoalKey<IronGolem> OFFER_FLOWER = create("offer_flower", IronGolem.class);
|
||||
|
||||
GoalKey<Llama> LLAMA_ATTACK_WOLF = create("llama_attack_wolf", Llama.class);
|
||||
|
||||
GoalKey<Llama> LLAMA_FOLLOW_CARAVAN = create("llama_follow_caravan", Llama.class);
|
||||
|
||||
GoalKey<Llama> LLAMA_HURT_BY = create("llama_hurt_by", Llama.class);
|
||||
|
||||
GoalKey<Llama> TRADER_LLAMA_DEFEND_WANDERING_TRADER = create("trader_llama_defend_wandering_trader", Llama.class);
|
||||
|
||||
GoalKey<Mob> BREAK_DOOR = create("break_door", Mob.class);
|
||||
|
||||
GoalKey<Mob> CLIMB_ON_TOP_OF_POWDER_SNOW = create("climb_on_top_of_powder_snow", Mob.class);
|
||||
|
||||
GoalKey<Mob> EAT_BLOCK = create("eat_block", Mob.class);
|
||||
|
||||
GoalKey<Mob> FLOAT = create("float", Mob.class);
|
||||
|
||||
GoalKey<Mob> FOLLOW_MOB = create("follow_mob", Mob.class);
|
||||
|
||||
GoalKey<Mob> INTERACT = create("interact", Mob.class);
|
||||
|
||||
GoalKey<Mob> LEAP_AT = create("leap_at", Mob.class);
|
||||
|
||||
GoalKey<Mob> LOOK_AT_PLAYER = create("look_at_player", Mob.class);
|
||||
|
||||
GoalKey<Mob> NEAREST_ATTACKABLE = create("nearest_attackable", Mob.class);
|
||||
|
||||
GoalKey<Mob> OCELOT_ATTACK = create("ocelot_attack", Mob.class);
|
||||
|
||||
GoalKey<Mob> OPEN_DOOR = create("open_door", Mob.class);
|
||||
|
||||
GoalKey<Mob> RANDOM_LOOK_AROUND = create("random_look_around", Mob.class);
|
||||
|
||||
GoalKey<Mob> RESET_UNIVERSAL_ANGER = create("reset_universal_anger", Mob.class);
|
||||
|
||||
GoalKey<Mob> USE_ITEM = create("use_item", Mob.class);
|
||||
|
||||
GoalKey<Mob> VINDICATOR_BREAK_DOOR = create("vindicator_break_door", Mob.class);
|
||||
|
||||
GoalKey<Monster> RANGED_BOW_ATTACK = create("ranged_bow_attack", Monster.class);
|
||||
|
||||
GoalKey<Monster> RANGED_CROSSBOW_ATTACK = create("ranged_crossbow_attack", Monster.class);
|
||||
|
||||
GoalKey<Ocelot> OCELOT_AVOID_ENTITY = create("ocelot_avoid_entity", Ocelot.class);
|
||||
|
||||
GoalKey<Ocelot> OCELOT_TEMPT = create("ocelot_tempt", Ocelot.class);
|
||||
|
||||
GoalKey<Panda> PANDA_ATTACK = create("panda_attack", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_AVOID = create("panda_avoid", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_BREED = create("panda_breed", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_HURT_BY = create("panda_hurt_by", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_LIE_ON_BACK = create("panda_lie_on_back", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_LOOK_AT_PLAYER = create("panda_look_at_player", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_PANIC = create("panda_panic", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_ROLL = create("panda_roll", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_SIT = create("panda_sit", Panda.class);
|
||||
|
||||
GoalKey<Panda> PANDA_SNEEZE = create("panda_sneeze", Panda.class);
|
||||
|
||||
GoalKey<Parrot> LAND_ON_OWNERS_SHOULDER = create("land_on_owners_shoulder", Parrot.class);
|
||||
|
||||
GoalKey<Phantom> PHANTOM_ATTACK_PLAYER = create("phantom_attack_player", Phantom.class);
|
||||
|
||||
GoalKey<Phantom> PHANTOM_ATTACK_STRATEGY = create("phantom_attack_strategy", Phantom.class);
|
||||
|
||||
GoalKey<Phantom> PHANTOM_CIRCLE_AROUND_ANCHOR = create("phantom_circle_around_anchor", Phantom.class);
|
||||
|
||||
GoalKey<Phantom> PHANTOM_SWEEP_ATTACK = create("phantom_sweep_attack", Phantom.class);
|
||||
|
||||
GoalKey<PolarBear> POLAR_BEAR_ATTACK_PLAYERS = create("polar_bear_attack_players", PolarBear.class);
|
||||
|
||||
GoalKey<PolarBear> POLAR_BEAR_HURT_BY = create("polar_bear_hurt_by", PolarBear.class);
|
||||
|
||||
GoalKey<PolarBear> POLAR_BEAR_MELEE_ATTACK = create("polar_bear_melee_attack", PolarBear.class);
|
||||
|
||||
GoalKey<PufferFish> PUFFERFISH_PUFF = create("pufferfish_puff", PufferFish.class);
|
||||
|
||||
GoalKey<Rabbit> RABBIT_AVOID_ENTITY = create("rabbit_avoid_entity", Rabbit.class);
|
||||
|
||||
GoalKey<Rabbit> RABBIT_PANIC = create("rabbit_panic", Rabbit.class);
|
||||
|
||||
GoalKey<Rabbit> RAID_GARDEN = create("raid_garden", Rabbit.class);
|
||||
|
||||
GoalKey<Raider> LONG_DISTANCE_PATROL = create("long_distance_patrol", Raider.class);
|
||||
|
||||
GoalKey<Raider> NEAREST_ATTACKABLE_WITCH = create("nearest_attackable_witch", Raider.class);
|
||||
|
||||
GoalKey<Raider> NEAREST_HEALABLE_RAIDER = create("nearest_healable_raider", Raider.class);
|
||||
|
||||
GoalKey<Raider> OBTAIN_RAID_LEADER_BANNER = create("obtain_raid_leader_banner", Raider.class);
|
||||
|
||||
GoalKey<Raider> PATHFIND_TO_RAID = create("pathfind_to_raid", Raider.class);
|
||||
|
||||
GoalKey<Raider> RAIDER_CELEBRATION = create("raider_celebration", Raider.class);
|
||||
|
||||
GoalKey<Raider> RAIDER_MOVE_THROUGH_VILLAGE = create("raider_move_through_village", Raider.class);
|
||||
|
||||
GoalKey<RangedEntity> DROWNED_TRIDENT_ATTACK = create("drowned_trident_attack", RangedEntity.class);
|
||||
|
||||
GoalKey<RangedEntity> RANGED_ATTACK = create("ranged_attack", RangedEntity.class);
|
||||
|
||||
GoalKey<SchoolableFish> FOLLOW_FLOCK_LEADER = create("follow_flock_leader", SchoolableFish.class);
|
||||
|
||||
GoalKey<Shulker> SHULKER_ATTACK = create("shulker_attack", Shulker.class);
|
||||
|
||||
GoalKey<Shulker> SHULKER_DEFENSE_ATTACK = create("shulker_defense_attack", Shulker.class);
|
||||
|
||||
GoalKey<Shulker> SHULKER_NEAREST_ATTACK = create("shulker_nearest_attack", Shulker.class);
|
||||
|
||||
GoalKey<Shulker> SHULKER_PEEK = create("shulker_peek", Shulker.class);
|
||||
|
||||
GoalKey<Silverfish> SILVERFISH_MERGE_WITH_STONE = create("silverfish_merge_with_stone", Silverfish.class);
|
||||
|
||||
GoalKey<Silverfish> SILVERFISH_WAKE_UP_FRIENDS = create("silverfish_wake_up_friends", Silverfish.class);
|
||||
|
||||
GoalKey<SkeletonHorse> SKELETON_TRAP = create("skeleton_trap", SkeletonHorse.class);
|
||||
|
||||
GoalKey<Slime> SLIME_ATTACK = create("slime_attack", Slime.class);
|
||||
|
||||
GoalKey<Slime> SLIME_FLOAT = create("slime_float", Slime.class);
|
||||
|
||||
GoalKey<Slime> SLIME_KEEP_ON_JUMPING = create("slime_keep_on_jumping", Slime.class);
|
||||
|
||||
GoalKey<Slime> SLIME_RANDOM_DIRECTION = create("slime_random_direction", Slime.class);
|
||||
|
||||
GoalKey<Spellcaster> SPELLCASTER_CASTING_SPELL = create("spellcaster_casting_spell", Spellcaster.class);
|
||||
|
||||
GoalKey<Spider> SPIDER = create("spider", Spider.class);
|
||||
|
||||
GoalKey<Spider> SPIDER_ATTACK = create("spider_attack", Spider.class);
|
||||
|
||||
GoalKey<Squid> SQUID_FLEE = create("squid_flee", Squid.class);
|
||||
|
||||
GoalKey<Squid> SQUID_RANDOM_MOVEMENT = create("squid_random_movement", Squid.class);
|
||||
|
||||
GoalKey<Strider> STRIDER_GO_TO_LAVA = create("strider_go_to_lava", Strider.class);
|
||||
|
||||
GoalKey<Tameable> FOLLOW_OWNER = create("follow_owner", Tameable.class);
|
||||
|
||||
GoalKey<Tameable> NON_TAME_RANDOM = create("non_tame_random", Tameable.class);
|
||||
|
||||
GoalKey<Tameable> OWNER_HURT = create("owner_hurt", Tameable.class);
|
||||
|
||||
GoalKey<Tameable> OWNER_HURT_BY = create("owner_hurt_by", Tameable.class);
|
||||
|
||||
GoalKey<Tameable> SIT_WHEN_ORDERED_TO = create("sit_when_ordered_to", Tameable.class);
|
||||
|
||||
GoalKey<Tameable> TAMABLE_ANIMAL_PANIC = create("tamable_animal_panic", Tameable.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_BREED = create("turtle_breed", Turtle.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_GO_HOME = create("turtle_go_home", Turtle.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_GO_TO_WATER = create("turtle_go_to_water", Turtle.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_LAY_EGG = create("turtle_lay_egg", Turtle.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_PANIC = create("turtle_panic", Turtle.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_RANDOM_STROLL = create("turtle_random_stroll", Turtle.class);
|
||||
|
||||
GoalKey<Turtle> TURTLE_TRAVEL = create("turtle_travel", Turtle.class);
|
||||
|
||||
GoalKey<Vex> VEX_CHARGE_ATTACK = create("vex_charge_attack", Vex.class);
|
||||
|
||||
GoalKey<Vex> VEX_COPY_OWNER = create("vex_copy_owner", Vex.class);
|
||||
|
||||
GoalKey<Vex> VEX_RANDOM_MOVE = create("vex_random_move", Vex.class);
|
||||
|
||||
GoalKey<Vindicator> VINDICATOR_JOHNNY_ATTACK = create("vindicator_johnny_attack", Vindicator.class);
|
||||
|
||||
GoalKey<WanderingTrader> WANDER_TO_POSITION = create("wander_to_position", WanderingTrader.class);
|
||||
|
||||
GoalKey<Wither> WITHER_DO_NOTHING = create("wither_do_nothing", Wither.class);
|
||||
|
||||
GoalKey<Wolf> BEG = create("beg", Wolf.class);
|
||||
|
||||
GoalKey<Wolf> WOLF_AVOID_ENTITY = create("wolf_avoid_entity", Wolf.class);
|
||||
|
||||
GoalKey<Zombie> ZOMBIE_ATTACK = create("zombie_attack", Zombie.class);
|
||||
|
||||
GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);
|
||||
|
||||
private static <T extends Mob> GoalKey<T> create(final String key, final Class<T> type) {
|
||||
return GoalKey.of(type, NamespacedKey.minecraft(key));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#ATTRIBUTE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class AttributeKeys {
|
||||
/**
|
||||
* {@code minecraft:armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> ARMOR = create(key("armor"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:armor_toughness}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> ARMOR_TOUGHNESS = create(key("armor_toughness"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:attack_damage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> ATTACK_DAMAGE = create(key("attack_damage"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:attack_knockback}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> ATTACK_KNOCKBACK = create(key("attack_knockback"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:attack_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> ATTACK_SPEED = create(key("attack_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:block_break_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> BLOCK_BREAK_SPEED = create(key("block_break_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:block_interaction_range}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> BLOCK_INTERACTION_RANGE = create(key("block_interaction_range"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:burning_time}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> BURNING_TIME = create(key("burning_time"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:entity_interaction_range}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> ENTITY_INTERACTION_RANGE = create(key("entity_interaction_range"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:explosion_knockback_resistance}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> EXPLOSION_KNOCKBACK_RESISTANCE = create(key("explosion_knockback_resistance"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fall_damage_multiplier}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> FALL_DAMAGE_MULTIPLIER = create(key("fall_damage_multiplier"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flying_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> FLYING_SPEED = create(key("flying_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:follow_range}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> FOLLOW_RANGE = create(key("follow_range"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:gravity}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> GRAVITY = create(key("gravity"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:jump_strength}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> JUMP_STRENGTH = create(key("jump_strength"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:knockback_resistance}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> KNOCKBACK_RESISTANCE = create(key("knockback_resistance"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:luck}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> LUCK = create(key("luck"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:max_absorption}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> MAX_ABSORPTION = create(key("max_absorption"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:max_health}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> MAX_HEALTH = create(key("max_health"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mining_efficiency}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> MINING_EFFICIENCY = create(key("mining_efficiency"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:movement_efficiency}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> MOVEMENT_EFFICIENCY = create(key("movement_efficiency"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:movement_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> MOVEMENT_SPEED = create(key("movement_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:oxygen_bonus}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> OXYGEN_BONUS = create(key("oxygen_bonus"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:safe_fall_distance}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> SAFE_FALL_DISTANCE = create(key("safe_fall_distance"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:scale}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> SCALE = create(key("scale"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sneaking_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> SNEAKING_SPEED = create(key("sneaking_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:spawn_reinforcements}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> SPAWN_REINFORCEMENTS = create(key("spawn_reinforcements"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:step_height}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> STEP_HEIGHT = create(key("step_height"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:submerged_mining_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> SUBMERGED_MINING_SPEED = create(key("submerged_mining_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sweeping_damage_ratio}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> SWEEPING_DAMAGE_RATIO = create(key("sweeping_damage_ratio"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:tempt_range}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> TEMPT_RANGE = create(key("tempt_range"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:water_movement_efficiency}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Attribute> WATER_MOVEMENT_EFFICIENCY = create(key("water_movement_efficiency"));
|
||||
|
||||
private AttributeKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<Attribute> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.ATTRIBUTE, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,344 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.block.banner.PatternType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class BannerPatternKeys {
|
||||
/**
|
||||
* {@code minecraft:base}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> BASE = create(key("base"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:border}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> BORDER = create(key("border"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bricks}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> BRICKS = create(key("bricks"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:circle}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> CIRCLE = create(key("circle"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creeper}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> CREEPER = create(key("creeper"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cross}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> CROSS = create(key("cross"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:curly_border}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> CURLY_BORDER = create(key("curly_border"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:diagonal_left}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> DIAGONAL_LEFT = create(key("diagonal_left"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:diagonal_right}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> DIAGONAL_RIGHT = create(key("diagonal_right"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:diagonal_up_left}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> DIAGONAL_UP_LEFT = create(key("diagonal_up_left"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:diagonal_up_right}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> DIAGONAL_UP_RIGHT = create(key("diagonal_up_right"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> FLOW = create(key("flow"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flower}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> FLOWER = create(key("flower"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:globe}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> GLOBE = create(key("globe"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:gradient}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> GRADIENT = create(key("gradient"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:gradient_up}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> GRADIENT_UP = create(key("gradient_up"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:guster}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> GUSTER = create(key("guster"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:half_horizontal}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> HALF_HORIZONTAL = create(key("half_horizontal"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:half_horizontal_bottom}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> HALF_HORIZONTAL_BOTTOM = create(key("half_horizontal_bottom"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:half_vertical}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> HALF_VERTICAL = create(key("half_vertical"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:half_vertical_right}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> HALF_VERTICAL_RIGHT = create(key("half_vertical_right"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mojang}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> MOJANG = create(key("mojang"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:piglin}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> PIGLIN = create(key("piglin"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:rhombus}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> RHOMBUS = create(key("rhombus"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:skull}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> SKULL = create(key("skull"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:small_stripes}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> SMALL_STRIPES = create(key("small_stripes"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:square_bottom_left}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> SQUARE_BOTTOM_LEFT = create(key("square_bottom_left"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:square_bottom_right}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> SQUARE_BOTTOM_RIGHT = create(key("square_bottom_right"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:square_top_left}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> SQUARE_TOP_LEFT = create(key("square_top_left"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:square_top_right}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> SQUARE_TOP_RIGHT = create(key("square_top_right"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:straight_cross}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRAIGHT_CROSS = create(key("straight_cross"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_bottom}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_BOTTOM = create(key("stripe_bottom"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_center}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_CENTER = create(key("stripe_center"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_downleft}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_DOWNLEFT = create(key("stripe_downleft"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_downright}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_DOWNRIGHT = create(key("stripe_downright"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_left}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_LEFT = create(key("stripe_left"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_middle}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_MIDDLE = create(key("stripe_middle"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_right}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_RIGHT = create(key("stripe_right"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripe_top}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> STRIPE_TOP = create(key("stripe_top"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:triangle_bottom}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> TRIANGLE_BOTTOM = create(key("triangle_bottom"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:triangle_top}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> TRIANGLE_TOP = create(key("triangle_top"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:triangles_bottom}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> TRIANGLES_BOTTOM = create(key("triangles_bottom"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:triangles_top}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PatternType> TRIANGLES_TOP = create(key("triangles_top"));
|
||||
|
||||
private BannerPatternKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<PatternType> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.BANNER_PATTERN, key);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#BIOME}.
|
||||
@@ -23,7 +23,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.20.2")
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class BiomeKeys {
|
||||
/**
|
||||
@@ -299,6 +300,13 @@ public final class BiomeKeys {
|
||||
*/
|
||||
public static final TypedKey<Biome> OLD_GROWTH_SPRUCE_TAIGA = create(key("old_growth_spruce_taiga"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_garden}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Biome> PALE_GARDEN = create(key("pale_garden"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:plains}
|
||||
*
|
||||
@@ -478,13 +486,13 @@ public final class BiomeKeys {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link Biome} in a registry.
|
||||
* Creates a key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static @NotNull TypedKey<Biome> create(final @NotNull Key key) {
|
||||
public static TypedKey<Biome> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.BIOME, key);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,113 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class CatVariantKeys {
|
||||
/**
|
||||
* {@code minecraft:all_black}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> ALL_BLACK = create(key("all_black"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:black}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> BLACK = create(key("black"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:british_shorthair}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> BRITISH_SHORTHAIR = create(key("british_shorthair"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:calico}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> CALICO = create(key("calico"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:jellie}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> JELLIE = create(key("jellie"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:persian}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> PERSIAN = create(key("persian"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ragdoll}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> RAGDOLL = create(key("ragdoll"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:red}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> RED = create(key("red"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:siamese}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> SIAMESE = create(key("siamese"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:tabby}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> TABBY = create(key("tabby"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:white}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Cat.Type> WHITE = create(key("white"));
|
||||
|
||||
private CatVariantKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<Cat.Type> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.CAT_VARIANT, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,386 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.damage.DamageType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class DamageTypeKeys {
|
||||
/**
|
||||
* {@code minecraft:arrow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> ARROW = create(key("arrow"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bad_respawn_point}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> BAD_RESPAWN_POINT = create(key("bad_respawn_point"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cactus}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> CACTUS = create(key("cactus"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:campfire}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> CAMPFIRE = create(key("campfire"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cramming}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> CRAMMING = create(key("cramming"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:dragon_breath}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> DRAGON_BREATH = create(key("dragon_breath"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:drown}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> DROWN = create(key("drown"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:dry_out}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> DRY_OUT = create(key("dry_out"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ender_pearl}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> ENDER_PEARL = create(key("ender_pearl"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:explosion}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> EXPLOSION = create(key("explosion"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fall}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FALL = create(key("fall"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:falling_anvil}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FALLING_ANVIL = create(key("falling_anvil"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:falling_block}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FALLING_BLOCK = create(key("falling_block"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:falling_stalactite}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FALLING_STALACTITE = create(key("falling_stalactite"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fireball}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FIREBALL = create(key("fireball"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fireworks}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FIREWORKS = create(key("fireworks"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fly_into_wall}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FLY_INTO_WALL = create(key("fly_into_wall"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:freeze}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> FREEZE = create(key("freeze"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> GENERIC = create(key("generic"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_kill}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> GENERIC_KILL = create(key("generic_kill"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:hot_floor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> HOT_FLOOR = create(key("hot_floor"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:in_fire}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> IN_FIRE = create(key("in_fire"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:in_wall}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> IN_WALL = create(key("in_wall"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:indirect_magic}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> INDIRECT_MAGIC = create(key("indirect_magic"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lava}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> LAVA = create(key("lava"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lightning_bolt}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> LIGHTNING_BOLT = create(key("lightning_bolt"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mace_smash}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> MACE_SMASH = create(key("mace_smash"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:magic}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> MAGIC = create(key("magic"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mob_attack}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> MOB_ATTACK = create(key("mob_attack"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mob_attack_no_aggro}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> MOB_ATTACK_NO_AGGRO = create(key("mob_attack_no_aggro"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mob_projectile}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> MOB_PROJECTILE = create(key("mob_projectile"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:on_fire}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> ON_FIRE = create(key("on_fire"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:out_of_world}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> OUT_OF_WORLD = create(key("out_of_world"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:outside_border}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> OUTSIDE_BORDER = create(key("outside_border"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:player_attack}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> PLAYER_ATTACK = create(key("player_attack"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:player_explosion}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> PLAYER_EXPLOSION = create(key("player_explosion"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sonic_boom}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> SONIC_BOOM = create(key("sonic_boom"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:spit}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> SPIT = create(key("spit"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stalagmite}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> STALAGMITE = create(key("stalagmite"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:starve}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> STARVE = create(key("starve"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sting}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> STING = create(key("sting"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sweet_berry_bush}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> SWEET_BERRY_BUSH = create(key("sweet_berry_bush"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:thorns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> THORNS = create(key("thorns"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:thrown}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> THROWN = create(key("thrown"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:trident}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> TRIDENT = create(key("trident"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unattributed_fireball}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> UNATTRIBUTED_FIREBALL = create(key("unattributed_fireball"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wind_charge}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> WIND_CHARGE = create(key("wind_charge"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wither}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> WITHER = create(key("wither"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wither_skull}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> WITHER_SKULL = create(key("wither_skull"));
|
||||
|
||||
private DamageTypeKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link DamageType} in the registry {@code minecraft:damage_type}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<DamageType> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.DAMAGE_TYPE, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class EnchantmentKeys {
|
||||
/**
|
||||
* {@code minecraft:aqua_affinity}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> AQUA_AFFINITY = create(key("aqua_affinity"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bane_of_arthropods}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> BANE_OF_ARTHROPODS = create(key("bane_of_arthropods"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:binding_curse}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> BINDING_CURSE = create(key("binding_curse"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:blast_protection}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> BLAST_PROTECTION = create(key("blast_protection"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:breach}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> BREACH = create(key("breach"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:channeling}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> CHANNELING = create(key("channeling"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:density}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> DENSITY = create(key("density"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:depth_strider}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> DEPTH_STRIDER = create(key("depth_strider"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:efficiency}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> EFFICIENCY = create(key("efficiency"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:feather_falling}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> FEATHER_FALLING = create(key("feather_falling"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fire_aspect}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> FIRE_ASPECT = create(key("fire_aspect"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fire_protection}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> FIRE_PROTECTION = create(key("fire_protection"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flame}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> FLAME = create(key("flame"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fortune}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> FORTUNE = create(key("fortune"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:frost_walker}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> FROST_WALKER = create(key("frost_walker"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:impaling}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> IMPALING = create(key("impaling"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:infinity}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> INFINITY = create(key("infinity"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:knockback}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> KNOCKBACK = create(key("knockback"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:looting}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> LOOTING = create(key("looting"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:loyalty}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> LOYALTY = create(key("loyalty"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:luck_of_the_sea}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> LUCK_OF_THE_SEA = create(key("luck_of_the_sea"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lure}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> LURE = create(key("lure"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mending}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> MENDING = create(key("mending"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:multishot}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> MULTISHOT = create(key("multishot"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:piercing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> PIERCING = create(key("piercing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:power}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> POWER = create(key("power"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:projectile_protection}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> PROJECTILE_PROTECTION = create(key("projectile_protection"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:protection}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> PROTECTION = create(key("protection"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:punch}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> PUNCH = create(key("punch"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:quick_charge}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> QUICK_CHARGE = create(key("quick_charge"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:respiration}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> RESPIRATION = create(key("respiration"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:riptide}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> RIPTIDE = create(key("riptide"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sharpness}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> SHARPNESS = create(key("sharpness"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:silk_touch}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> SILK_TOUCH = create(key("silk_touch"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:smite}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> SMITE = create(key("smite"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:soul_speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> SOUL_SPEED = create(key("soul_speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sweeping_edge}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> SWEEPING_EDGE = create(key("sweeping_edge"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:swift_sneak}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> SWIFT_SNEAK = create(key("swift_sneak"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:thorns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> THORNS = create(key("thorns"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unbreaking}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> UNBREAKING = create(key("unbreaking"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:vanishing_curse}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> VANISHING_CURSE = create(key("vanishing_curse"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wind_burst}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Enchantment> WIND_BURST = create(key("wind_burst"));
|
||||
|
||||
private EnchantmentKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<Enchantment> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.ENCHANTMENT, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.Fluid;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#FLUID}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class FluidKeys {
|
||||
/**
|
||||
* {@code minecraft:empty}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Fluid> EMPTY = create(key("empty"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flowing_lava}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Fluid> FLOWING_LAVA = create(key("flowing_lava"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flowing_water}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Fluid> FLOWING_WATER = create(key("flowing_water"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lava}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Fluid> LAVA = create(key("lava"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:water}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Fluid> WATER = create(key("water"));
|
||||
|
||||
private FluidKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<Fluid> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.FLUID, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.entity.Frog;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#FROG_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class FrogVariantKeys {
|
||||
/**
|
||||
* {@code minecraft:cold}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Frog.Variant> COLD = create(key("cold"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:temperate}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Frog.Variant> TEMPERATE = create(key("temperate"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:warm}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Frog.Variant> WARM = create(key("warm"));
|
||||
|
||||
private FrogVariantKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<Frog.Variant> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.FROG_VARIANT, key);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.GameEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
|
||||
@@ -23,7 +23,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.20.2")
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class GameEventKeys {
|
||||
/**
|
||||
@@ -124,6 +125,13 @@ public final class GameEventKeys {
|
||||
*/
|
||||
public static final TypedKey<GameEvent> ELYTRA_GLIDE = create(key("elytra_glide"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:entity_action}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> ENTITY_ACTION = create(key("entity_action"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:entity_damage}
|
||||
*
|
||||
@@ -166,13 +174,6 @@ public final class GameEventKeys {
|
||||
*/
|
||||
public static final TypedKey<GameEvent> ENTITY_PLACE = create(key("entity_place"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:entity_action}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> ENTITY_ACTION = create(key("entity_action"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:equip}
|
||||
*
|
||||
@@ -285,62 +286,6 @@ public final class GameEventKeys {
|
||||
*/
|
||||
public static final TypedKey<GameEvent> PROJECTILE_SHOOT = create(key("projectile_shoot"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sculk_sensor_tendrils_clicking}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SCULK_SENSOR_TENDRILS_CLICKING = create(key("sculk_sensor_tendrils_clicking"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shear}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SHEAR = create(key("shear"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shriek}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SHRIEK = create(key("shriek"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:splash}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SPLASH = create(key("splash"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:step}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> STEP = create(key("step"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:swim}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SWIM = create(key("swim"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:teleport}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> TELEPORT = create(key("teleport"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unequip}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> UNEQUIP = create(key("unequip"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:resonate_1}
|
||||
*
|
||||
@@ -446,17 +391,73 @@ public final class GameEventKeys {
|
||||
*/
|
||||
public static final TypedKey<GameEvent> RESONATE_15 = create(key("resonate_15"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sculk_sensor_tendrils_clicking}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SCULK_SENSOR_TENDRILS_CLICKING = create(key("sculk_sensor_tendrils_clicking"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shear}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SHEAR = create(key("shear"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shriek}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SHRIEK = create(key("shriek"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:splash}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SPLASH = create(key("splash"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:step}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> STEP = create(key("step"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:swim}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> SWIM = create(key("swim"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:teleport}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> TELEPORT = create(key("teleport"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unequip}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<GameEvent> UNEQUIP = create(key("unequip"));
|
||||
|
||||
private GameEventKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link GameEvent} in a registry.
|
||||
* Creates a key for {@link GameEvent} in the registry {@code minecraft:game_event}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static @NotNull TypedKey<GameEvent> create(final @NotNull Key key) {
|
||||
public static TypedKey<GameEvent> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.GAME_EVENT, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.MusicInstrument;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class InstrumentKeys {
|
||||
/**
|
||||
* {@code minecraft:admire_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> ADMIRE_GOAT_HORN = create(key("admire_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:call_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> CALL_GOAT_HORN = create(key("call_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:dream_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> DREAM_GOAT_HORN = create(key("dream_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:feel_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> FEEL_GOAT_HORN = create(key("feel_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ponder_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> PONDER_GOAT_HORN = create(key("ponder_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:seek_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> SEEK_GOAT_HORN = create(key("seek_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sing_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> SING_GOAT_HORN = create(key("sing_goat_horn"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:yearn_goat_horn}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MusicInstrument> YEARN_GOAT_HORN = create(key("yearn_goat_horn"));
|
||||
|
||||
private InstrumentKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<MusicInstrument> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.INSTRUMENT, key);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,176 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.JukeboxSong;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#JUKEBOX_SONG}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class JukeboxSongKeys {
|
||||
/**
|
||||
* {@code minecraft:11}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> ELEVEN = create(key("11"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:13}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> THIRTEEN = create(key("13"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:5}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> FIVE = create(key("5"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:blocks}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> BLOCKS = create(key("blocks"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cat}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> CAT = create(key("cat"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:chirp}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> CHIRP = create(key("chirp"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creator}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> CREATOR = create(key("creator"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creator_music_box}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> CREATOR_MUSIC_BOX = create(key("creator_music_box"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:far}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> FAR = create(key("far"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mall}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> MALL = create(key("mall"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mellohi}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> MELLOHI = create(key("mellohi"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:otherside}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> OTHERSIDE = create(key("otherside"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pigstep}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> PIGSTEP = create(key("pigstep"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:precipice}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> PRECIPICE = create(key("precipice"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:relic}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> RELIC = create(key("relic"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stal}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> STAL = create(key("stal"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:strad}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> STRAD = create(key("strad"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wait}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> WAIT = create(key("wait"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ward}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<JukeboxSong> WARD = create(key("ward"));
|
||||
|
||||
private JukeboxSongKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<JukeboxSong> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.JUKEBOX_SONG, key);
|
||||
}
|
||||
}
|
||||
+281
@@ -0,0 +1,281 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.map.MapCursor;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#MAP_DECORATION_TYPE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class MapDecorationTypeKeys {
|
||||
/**
|
||||
* {@code minecraft:banner_black}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_BLACK = create(key("banner_black"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_blue}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_BLUE = create(key("banner_blue"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_brown}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_BROWN = create(key("banner_brown"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_cyan}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_CYAN = create(key("banner_cyan"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_gray}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_GRAY = create(key("banner_gray"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_green}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_GREEN = create(key("banner_green"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_light_blue}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_LIGHT_BLUE = create(key("banner_light_blue"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_light_gray}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_LIGHT_GRAY = create(key("banner_light_gray"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_lime}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_LIME = create(key("banner_lime"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_magenta}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_MAGENTA = create(key("banner_magenta"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_orange}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_ORANGE = create(key("banner_orange"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_pink}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_PINK = create(key("banner_pink"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_purple}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_PURPLE = create(key("banner_purple"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_red}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_RED = create(key("banner_red"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_white}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_WHITE = create(key("banner_white"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:banner_yellow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BANNER_YELLOW = create(key("banner_yellow"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:blue_marker}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> BLUE_MARKER = create(key("blue_marker"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:frame}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> FRAME = create(key("frame"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:jungle_temple}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> JUNGLE_TEMPLE = create(key("jungle_temple"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mansion}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> MANSION = create(key("mansion"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:monument}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> MONUMENT = create(key("monument"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:player}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> PLAYER = create(key("player"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:player_off_limits}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> PLAYER_OFF_LIMITS = create(key("player_off_limits"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:player_off_map}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> PLAYER_OFF_MAP = create(key("player_off_map"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:red_marker}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> RED_MARKER = create(key("red_marker"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:red_x}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> RED_X = create(key("red_x"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:swamp_hut}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> SWAMP_HUT = create(key("swamp_hut"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:target_point}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> TARGET_POINT = create(key("target_point"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:target_x}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> TARGET_X = create(key("target_x"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:trial_chambers}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> TRIAL_CHAMBERS = create(key("trial_chambers"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_desert}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> VILLAGE_DESERT = create(key("village_desert"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_plains}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> VILLAGE_PLAINS = create(key("village_plains"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_savanna}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> VILLAGE_SAVANNA = create(key("village_savanna"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_snowy}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> VILLAGE_SNOWY = create(key("village_snowy"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_taiga}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MapCursor.Type> VILLAGE_TAIGA = create(key("village_taiga"));
|
||||
|
||||
private MapDecorationTypeKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<MapCursor.Type> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.MAP_DECORATION_TYPE, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.inventory.MenuType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#MENU}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class MenuTypeKeys {
|
||||
/**
|
||||
* {@code minecraft:anvil}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> ANVIL = create(key("anvil"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:beacon}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> BEACON = create(key("beacon"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:blast_furnace}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> BLAST_FURNACE = create(key("blast_furnace"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:brewing_stand}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> BREWING_STAND = create(key("brewing_stand"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cartography_table}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> CARTOGRAPHY_TABLE = create(key("cartography_table"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:crafter_3x3}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> CRAFTER_3X3 = create(key("crafter_3x3"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:crafting}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> CRAFTING = create(key("crafting"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:enchantment}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> ENCHANTMENT = create(key("enchantment"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:furnace}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> FURNACE = create(key("furnace"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_3x3}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_3X3 = create(key("generic_3x3"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_9x1}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_9X1 = create(key("generic_9x1"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_9x2}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_9X2 = create(key("generic_9x2"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_9x3}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_9X3 = create(key("generic_9x3"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_9x4}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_9X4 = create(key("generic_9x4"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_9x5}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_9X5 = create(key("generic_9x5"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:generic_9x6}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GENERIC_9X6 = create(key("generic_9x6"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:grindstone}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> GRINDSTONE = create(key("grindstone"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:hopper}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> HOPPER = create(key("hopper"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lectern}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> LECTERN = create(key("lectern"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:loom}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> LOOM = create(key("loom"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:merchant}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> MERCHANT = create(key("merchant"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shulker_box}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> SHULKER_BOX = create(key("shulker_box"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:smithing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> SMITHING = create(key("smithing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:smoker}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> SMOKER = create(key("smoker"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stonecutter}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<MenuType> STONECUTTER = create(key("stonecutter"));
|
||||
|
||||
private MenuTypeKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<MenuType> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.MENU, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#MOB_EFFECT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class MobEffectKeys {
|
||||
/**
|
||||
* {@code minecraft:absorption}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> ABSORPTION = create(key("absorption"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bad_omen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> BAD_OMEN = create(key("bad_omen"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:blindness}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> BLINDNESS = create(key("blindness"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:conduit_power}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> CONDUIT_POWER = create(key("conduit_power"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:darkness}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> DARKNESS = create(key("darkness"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:dolphins_grace}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> DOLPHINS_GRACE = create(key("dolphins_grace"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fire_resistance}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> FIRE_RESISTANCE = create(key("fire_resistance"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:glowing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> GLOWING = create(key("glowing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:haste}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> HASTE = create(key("haste"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:health_boost}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> HEALTH_BOOST = create(key("health_boost"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:hero_of_the_village}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> HERO_OF_THE_VILLAGE = create(key("hero_of_the_village"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:hunger}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> HUNGER = create(key("hunger"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:infested}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> INFESTED = create(key("infested"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:instant_damage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> INSTANT_DAMAGE = create(key("instant_damage"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:instant_health}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> INSTANT_HEALTH = create(key("instant_health"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:invisibility}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> INVISIBILITY = create(key("invisibility"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:jump_boost}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> JUMP_BOOST = create(key("jump_boost"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:levitation}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> LEVITATION = create(key("levitation"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:luck}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> LUCK = create(key("luck"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mining_fatigue}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> MINING_FATIGUE = create(key("mining_fatigue"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:nausea}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> NAUSEA = create(key("nausea"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:night_vision}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> NIGHT_VISION = create(key("night_vision"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:oozing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> OOZING = create(key("oozing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:poison}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> POISON = create(key("poison"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:raid_omen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> RAID_OMEN = create(key("raid_omen"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:regeneration}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> REGENERATION = create(key("regeneration"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:resistance}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> RESISTANCE = create(key("resistance"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:saturation}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> SATURATION = create(key("saturation"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:slow_falling}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> SLOW_FALLING = create(key("slow_falling"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:slowness}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> SLOWNESS = create(key("slowness"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:speed}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> SPEED = create(key("speed"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:strength}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> STRENGTH = create(key("strength"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:trial_omen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> TRIAL_OMEN = create(key("trial_omen"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unluck}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> UNLUCK = create(key("unluck"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:water_breathing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> WATER_BREATHING = create(key("water_breathing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:weakness}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> WEAKNESS = create(key("weakness"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:weaving}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> WEAVING = create(key("weaving"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wind_charged}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> WIND_CHARGED = create(key("wind_charged"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wither}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<PotionEffectType> WITHER = create(key("wither"));
|
||||
|
||||
private MobEffectKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<PotionEffectType> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.MOB_EFFECT, key);
|
||||
}
|
||||
}
|
||||
+393
@@ -0,0 +1,393 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.Art;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class PaintingVariantKeys {
|
||||
/**
|
||||
* {@code minecraft:alban}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> ALBAN = create(key("alban"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:aztec}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> AZTEC = create(key("aztec"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:aztec2}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> AZTEC2 = create(key("aztec2"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:backyard}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BACKYARD = create(key("backyard"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:baroque}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BAROQUE = create(key("baroque"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bomb}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BOMB = create(key("bomb"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bouquet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BOUQUET = create(key("bouquet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:burning_skull}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BURNING_SKULL = create(key("burning_skull"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bust}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BUST = create(key("bust"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cavebird}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> CAVEBIRD = create(key("cavebird"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:changing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> CHANGING = create(key("changing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cotan}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> COTAN = create(key("cotan"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:courbet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> COURBET = create(key("courbet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creebet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> CREEBET = create(key("creebet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:donkey_kong}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> DONKEY_KONG = create(key("donkey_kong"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:earth}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> EARTH = create(key("earth"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:endboss}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> ENDBOSS = create(key("endboss"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fern}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FERN = create(key("fern"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fighters}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FIGHTERS = create(key("fighters"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:finding}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FINDING = create(key("finding"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fire}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FIRE = create(key("fire"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:graham}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> GRAHAM = create(key("graham"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:humble}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> HUMBLE = create(key("humble"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:kebab}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> KEBAB = create(key("kebab"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lowmist}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> LOWMIST = create(key("lowmist"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:match}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> MATCH = create(key("match"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:meditative}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> MEDITATIVE = create(key("meditative"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:orb}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> ORB = create(key("orb"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:owlemons}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> OWLEMONS = create(key("owlemons"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:passage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PASSAGE = create(key("passage"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pigscene}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PIGSCENE = create(key("pigscene"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:plant}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PLANT = create(key("plant"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pointer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> POINTER = create(key("pointer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pond}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> POND = create(key("pond"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pool}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> POOL = create(key("pool"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:prairie_ride}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PRAIRIE_RIDE = create(key("prairie_ride"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sea}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SEA = create(key("sea"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:skeleton}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SKELETON = create(key("skeleton"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:skull_and_roses}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SKULL_AND_ROSES = create(key("skull_and_roses"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> STAGE = create(key("stage"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sunflowers}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SUNFLOWERS = create(key("sunflowers"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sunset}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SUNSET = create(key("sunset"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:tides}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> TIDES = create(key("tides"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unpacked}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> UNPACKED = create(key("unpacked"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:void}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> VOID = create(key("void"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wanderer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WANDERER = create(key("wanderer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wasteland}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WASTELAND = create(key("wasteland"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:water}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WATER = create(key("water"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wind}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WIND = create(key("wind"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wither}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WITHER = create(key("wither"));
|
||||
|
||||
private PaintingVariantKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link Art} in the registry {@code minecraft:painting_variant}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<Art> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.PAINTING_VARIANT, key);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,281 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.generator.structure.Structure;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class StructureKeys {
|
||||
/**
|
||||
* {@code minecraft:ancient_city}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> ANCIENT_CITY = create(key("ancient_city"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bastion_remnant}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> BASTION_REMNANT = create(key("bastion_remnant"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:buried_treasure}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> BURIED_TREASURE = create(key("buried_treasure"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:desert_pyramid}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> DESERT_PYRAMID = create(key("desert_pyramid"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:end_city}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> END_CITY = create(key("end_city"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fortress}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> FORTRESS = create(key("fortress"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:igloo}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> IGLOO = create(key("igloo"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:jungle_pyramid}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> JUNGLE_PYRAMID = create(key("jungle_pyramid"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mansion}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> MANSION = create(key("mansion"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mineshaft}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> MINESHAFT = create(key("mineshaft"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mineshaft_mesa}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> MINESHAFT_MESA = create(key("mineshaft_mesa"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:monument}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> MONUMENT = create(key("monument"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:nether_fossil}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> NETHER_FOSSIL = create(key("nether_fossil"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ocean_ruin_cold}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> OCEAN_RUIN_COLD = create(key("ocean_ruin_cold"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ocean_ruin_warm}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> OCEAN_RUIN_WARM = create(key("ocean_ruin_warm"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pillager_outpost}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> PILLAGER_OUTPOST = create(key("pillager_outpost"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL = create(key("ruined_portal"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal_desert}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL_DESERT = create(key("ruined_portal_desert"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal_jungle}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL_JUNGLE = create(key("ruined_portal_jungle"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal_mountain}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL_MOUNTAIN = create(key("ruined_portal_mountain"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal_nether}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL_NETHER = create(key("ruined_portal_nether"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal_ocean}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL_OCEAN = create(key("ruined_portal_ocean"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ruined_portal_swamp}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> RUINED_PORTAL_SWAMP = create(key("ruined_portal_swamp"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shipwreck}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> SHIPWRECK = create(key("shipwreck"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shipwreck_beached}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> SHIPWRECK_BEACHED = create(key("shipwreck_beached"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stronghold}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> STRONGHOLD = create(key("stronghold"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:swamp_hut}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> SWAMP_HUT = create(key("swamp_hut"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:trail_ruins}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> TRAIL_RUINS = create(key("trail_ruins"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:trial_chambers}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> TRIAL_CHAMBERS = create(key("trial_chambers"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_desert}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> VILLAGE_DESERT = create(key("village_desert"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_plains}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> VILLAGE_PLAINS = create(key("village_plains"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_savanna}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> VILLAGE_SAVANNA = create(key("village_savanna"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_snowy}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> VILLAGE_SNOWY = create(key("village_snowy"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:village_taiga}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Structure> VILLAGE_TAIGA = create(key("village_taiga"));
|
||||
|
||||
private StructureKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<Structure> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.STRUCTURE, key);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.generator.structure.StructureType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#STRUCTURE_TYPE}.
|
||||
@@ -23,7 +23,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.20.2")
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class StructureTypeKeys {
|
||||
/**
|
||||
@@ -141,7 +142,7 @@ public final class StructureTypeKeys {
|
||||
private StructureTypeKeys() {
|
||||
}
|
||||
|
||||
private static @NotNull TypedKey<StructureType> create(final @NotNull Key key) {
|
||||
private static TypedKey<StructureType> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.STRUCTURE_TYPE, key);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#TRIM_MATERIAL}.
|
||||
@@ -23,7 +23,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.20.2")
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class TrimMaterialKeys {
|
||||
/**
|
||||
@@ -96,17 +97,24 @@ public final class TrimMaterialKeys {
|
||||
*/
|
||||
public static final TypedKey<TrimMaterial> REDSTONE = create(key("redstone"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:resin}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<TrimMaterial> RESIN = create(key("resin"));
|
||||
|
||||
private TrimMaterialKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link TrimMaterial} in a registry.
|
||||
* Creates a key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static @NotNull TypedKey<TrimMaterial> create(final @NotNull Key key) {
|
||||
public static TypedKey<TrimMaterial> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.TRIM_MATERIAL, key);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#TRIM_PATTERN}.
|
||||
@@ -23,9 +23,17 @@ import org.jetbrains.annotations.NotNull;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.20.2")
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class TrimPatternKeys {
|
||||
/**
|
||||
* {@code minecraft:bolt}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<TrimPattern> BOLT = create(key("bolt"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:coast}
|
||||
*
|
||||
@@ -47,6 +55,13 @@ public final class TrimPatternKeys {
|
||||
*/
|
||||
public static final TypedKey<TrimPattern> EYE = create(key("eye"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:flow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<TrimPattern> FLOW = create(key("flow"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:host}
|
||||
*
|
||||
@@ -142,13 +157,13 @@ public final class TrimPatternKeys {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link TrimPattern} in a registry.
|
||||
* Creates a key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static @NotNull TypedKey<TrimPattern> create(final @NotNull Key key) {
|
||||
public static TypedKey<TrimPattern> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.TRIM_PATTERN, key);
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#VILLAGER_PROFESSION}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class VillagerProfessionKeys {
|
||||
/**
|
||||
* {@code minecraft:armorer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> ARMORER = create(key("armorer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:butcher}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> BUTCHER = create(key("butcher"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cartographer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> CARTOGRAPHER = create(key("cartographer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cleric}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> CLERIC = create(key("cleric"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:farmer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> FARMER = create(key("farmer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fisherman}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> FISHERMAN = create(key("fisherman"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fletcher}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> FLETCHER = create(key("fletcher"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:leatherworker}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> LEATHERWORKER = create(key("leatherworker"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:librarian}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> LIBRARIAN = create(key("librarian"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mason}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> MASON = create(key("mason"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:nitwit}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> NITWIT = create(key("nitwit"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:none}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> NONE = create(key("none"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:shepherd}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> SHEPHERD = create(key("shepherd"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:toolsmith}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> TOOLSMITH = create(key("toolsmith"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:weaponsmith}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Profession> WEAPONSMITH = create(key("weaponsmith"));
|
||||
|
||||
private VillagerProfessionKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<Villager.Profession> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.VILLAGER_PROFESSION, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#VILLAGER_TYPE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class VillagerTypeKeys {
|
||||
/**
|
||||
* {@code minecraft:desert}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> DESERT = create(key("desert"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:jungle}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> JUNGLE = create(key("jungle"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:plains}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> PLAINS = create(key("plains"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:savanna}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> SAVANNA = create(key("savanna"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:snow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> SNOW = create(key("snow"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:swamp}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> SWAMP = create(key("swamp"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:taiga}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Villager.Type> TAIGA = create(key("taiga"));
|
||||
|
||||
private VillagerTypeKeys() {
|
||||
}
|
||||
|
||||
private static TypedKey<Villager.Type> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.VILLAGER_TYPE, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#WOLF_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class WolfVariantKeys {
|
||||
/**
|
||||
* {@code minecraft:ashen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> ASHEN = create(key("ashen"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:black}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> BLACK = create(key("black"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:chestnut}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> CHESTNUT = create(key("chestnut"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> PALE = create(key("pale"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:rusty}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> RUSTY = create(key("rusty"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:snowy}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> SNOWY = create(key("snowy"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:spotted}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> SPOTTED = create(key("spotted"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:striped}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> STRIPED = create(key("striped"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:woods}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Wolf.Variant> WOODS = create(key("woods"));
|
||||
|
||||
private WolfVariantKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TypedKey<Wolf.Variant> create(final Key key) {
|
||||
return TypedKey.create(RegistryKey.WOLF_VARIANT, key);
|
||||
}
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.block.banner.PatternType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class BannerPatternTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:no_item_required}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> NO_ITEM_REQUIRED = create(key("no_item_required"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/bordure_indented}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_BORDURE_INDENTED = create(key("pattern_item/bordure_indented"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/creeper}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_CREEPER = create(key("pattern_item/creeper"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/field_masoned}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_FIELD_MASONED = create(key("pattern_item/field_masoned"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/flow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_FLOW = create(key("pattern_item/flow"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/flower}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_FLOWER = create(key("pattern_item/flower"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/globe}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_GLOBE = create(key("pattern_item/globe"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/guster}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_GUSTER = create(key("pattern_item/guster"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/mojang}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_MOJANG = create(key("pattern_item/mojang"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/piglin}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_PIGLIN = create(key("pattern_item/piglin"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pattern_item/skull}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<PatternType> PATTERN_ITEM_SKULL = create(key("pattern_item/skull"));
|
||||
|
||||
private BannerPatternTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<PatternType> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.BANNER_PATTERN, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,533 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#BIOME}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class BiomeTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:allows_surface_slime_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> ALLOWS_SURFACE_SLIME_SPAWNS = create(key("allows_surface_slime_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:allows_tropical_fish_spawns_at_any_height}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> ALLOWS_TROPICAL_FISH_SPAWNS_AT_ANY_HEIGHT = create(key("allows_tropical_fish_spawns_at_any_height"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_closer_water_fog}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_CLOSER_WATER_FOG = create(key("has_closer_water_fog"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ancient_city}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_ANCIENT_CITY = create(key("has_structure/ancient_city"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/bastion_remnant}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_BASTION_REMNANT = create(key("has_structure/bastion_remnant"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/buried_treasure}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_BURIED_TREASURE = create(key("has_structure/buried_treasure"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/desert_pyramid}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_DESERT_PYRAMID = create(key("has_structure/desert_pyramid"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/end_city}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_END_CITY = create(key("has_structure/end_city"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/igloo}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_IGLOO = create(key("has_structure/igloo"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/jungle_temple}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_JUNGLE_TEMPLE = create(key("has_structure/jungle_temple"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/mineshaft}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_MINESHAFT = create(key("has_structure/mineshaft"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/mineshaft_mesa}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_MINESHAFT_MESA = create(key("has_structure/mineshaft_mesa"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/nether_fortress}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_NETHER_FORTRESS = create(key("has_structure/nether_fortress"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/nether_fossil}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_NETHER_FOSSIL = create(key("has_structure/nether_fossil"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ocean_monument}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_OCEAN_MONUMENT = create(key("has_structure/ocean_monument"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ocean_ruin_cold}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_OCEAN_RUIN_COLD = create(key("has_structure/ocean_ruin_cold"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ocean_ruin_warm}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_OCEAN_RUIN_WARM = create(key("has_structure/ocean_ruin_warm"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/pillager_outpost}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_PILLAGER_OUTPOST = create(key("has_structure/pillager_outpost"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_desert}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_DESERT = create(key("has_structure/ruined_portal_desert"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_jungle}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_JUNGLE = create(key("has_structure/ruined_portal_jungle"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_mountain}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_MOUNTAIN = create(key("has_structure/ruined_portal_mountain"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_nether}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_NETHER = create(key("has_structure/ruined_portal_nether"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_ocean}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_OCEAN = create(key("has_structure/ruined_portal_ocean"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_standard}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_STANDARD = create(key("has_structure/ruined_portal_standard"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/ruined_portal_swamp}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_SWAMP = create(key("has_structure/ruined_portal_swamp"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/shipwreck}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_SHIPWRECK = create(key("has_structure/shipwreck"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/shipwreck_beached}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_SHIPWRECK_BEACHED = create(key("has_structure/shipwreck_beached"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/stronghold}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_STRONGHOLD = create(key("has_structure/stronghold"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/swamp_hut}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_SWAMP_HUT = create(key("has_structure/swamp_hut"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/trail_ruins}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_TRAIL_RUINS = create(key("has_structure/trail_ruins"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/trial_chambers}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_TRIAL_CHAMBERS = create(key("has_structure/trial_chambers"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/village_desert}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_DESERT = create(key("has_structure/village_desert"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/village_plains}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_PLAINS = create(key("has_structure/village_plains"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/village_savanna}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_SAVANNA = create(key("has_structure/village_savanna"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/village_snowy}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_SNOWY = create(key("has_structure/village_snowy"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/village_taiga}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_TAIGA = create(key("has_structure/village_taiga"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:has_structure/woodland_mansion}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> HAS_STRUCTURE_WOODLAND_MANSION = create(key("has_structure/woodland_mansion"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:increased_fire_burnout}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> INCREASED_FIRE_BURNOUT = create(key("increased_fire_burnout"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_badlands}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_BADLANDS = create(key("is_badlands"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_beach}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_BEACH = create(key("is_beach"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_deep_ocean}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_DEEP_OCEAN = create(key("is_deep_ocean"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_end}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_END = create(key("is_end"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_forest}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_FOREST = create(key("is_forest"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_hill}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_HILL = create(key("is_hill"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_jungle}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_JUNGLE = create(key("is_jungle"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_mountain}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_MOUNTAIN = create(key("is_mountain"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_nether}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_NETHER = create(key("is_nether"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_ocean}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_OCEAN = create(key("is_ocean"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_overworld}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_OVERWORLD = create(key("is_overworld"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_river}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_RIVER = create(key("is_river"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_savanna}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_SAVANNA = create(key("is_savanna"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_taiga}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> IS_TAIGA = create(key("is_taiga"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:mineshaft_blocking}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> MINESHAFT_BLOCKING = create(key("mineshaft_blocking"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:more_frequent_drowned_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> MORE_FREQUENT_DROWNED_SPAWNS = create(key("more_frequent_drowned_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:plays_underwater_music}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> PLAYS_UNDERWATER_MUSIC = create(key("plays_underwater_music"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:polar_bears_spawn_on_alternate_blocks}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> POLAR_BEARS_SPAWN_ON_ALTERNATE_BLOCKS = create(key("polar_bears_spawn_on_alternate_blocks"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:produces_corals_from_bonemeal}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> PRODUCES_CORALS_FROM_BONEMEAL = create(key("produces_corals_from_bonemeal"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:reduce_water_ambient_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> REDUCE_WATER_AMBIENT_SPAWNS = create(key("reduce_water_ambient_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:required_ocean_monument_surrounding}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> REQUIRED_OCEAN_MONUMENT_SURROUNDING = create(key("required_ocean_monument_surrounding"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:snow_golem_melts}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> SNOW_GOLEM_MELTS = create(key("snow_golem_melts"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:spawns_cold_variant_frogs}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FROGS = create(key("spawns_cold_variant_frogs"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:spawns_gold_rabbits}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> SPAWNS_GOLD_RABBITS = create(key("spawns_gold_rabbits"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:spawns_snow_foxes}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> SPAWNS_SNOW_FOXES = create(key("spawns_snow_foxes"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:spawns_warm_variant_frogs}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> SPAWNS_WARM_VARIANT_FROGS = create(key("spawns_warm_variant_frogs"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:spawns_white_rabbits}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> SPAWNS_WHITE_RABBITS = create(key("spawns_white_rabbits"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:stronghold_biased_to}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> STRONGHOLD_BIASED_TO = create(key("stronghold_biased_to"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:water_on_map_outlines}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> WATER_ON_MAP_OUTLINES = create(key("water_on_map_outlines"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:without_patrol_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> WITHOUT_PATROL_SPAWNS = create(key("without_patrol_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:without_wandering_trader_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> WITHOUT_WANDERING_TRADER_SPAWNS = create(key("without_wandering_trader_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:without_zombie_sieges}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Biome> WITHOUT_ZOMBIE_SIEGES = create(key("without_zombie_sieges"));
|
||||
|
||||
private BiomeTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<Biome> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.BIOME, key);
|
||||
}
|
||||
}
|
||||
+1345
File diff suppressed because it is too large.
Load diff
+57
@@ -0,0 +1,57 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class CatVariantTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:default_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Cat.Type> DEFAULT_SPAWNS = create(key("default_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:full_moon_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Cat.Type> FULL_MOON_SPAWNS = create(key("full_moon_spawns"));
|
||||
|
||||
private CatVariantTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<Cat.Type> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.CAT_VARIANT, key);
|
||||
}
|
||||
}
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.damage.DamageType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class DamageTypeTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:always_hurts_ender_dragons}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> ALWAYS_HURTS_ENDER_DRAGONS = create(key("always_hurts_ender_dragons"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:always_kills_armor_stands}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> ALWAYS_KILLS_ARMOR_STANDS = create(key("always_kills_armor_stands"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:always_most_significant_fall}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> ALWAYS_MOST_SIGNIFICANT_FALL = create(key("always_most_significant_fall"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:always_triggers_silverfish}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> ALWAYS_TRIGGERS_SILVERFISH = create(key("always_triggers_silverfish"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:avoids_guardian_thorns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> AVOIDS_GUARDIAN_THORNS = create(key("avoids_guardian_thorns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:burn_from_stepping}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BURN_FROM_STEPPING = create(key("burn_from_stepping"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:burns_armor_stands}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BURNS_ARMOR_STANDS = create(key("burns_armor_stands"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_ARMOR = create(key("bypasses_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_effects}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_EFFECTS = create(key("bypasses_effects"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_enchantments}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_ENCHANTMENTS = create(key("bypasses_enchantments"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_invulnerability}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_INVULNERABILITY = create(key("bypasses_invulnerability"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_resistance}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_RESISTANCE = create(key("bypasses_resistance"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_shield}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_SHIELD = create(key("bypasses_shield"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bypasses_wolf_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> BYPASSES_WOLF_ARMOR = create(key("bypasses_wolf_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:can_break_armor_stand}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> CAN_BREAK_ARMOR_STAND = create(key("can_break_armor_stand"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:damages_helmet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> DAMAGES_HELMET = create(key("damages_helmet"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:ignites_armor_stands}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IGNITES_ARMOR_STANDS = create(key("ignites_armor_stands"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_drowning}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_DROWNING = create(key("is_drowning"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_explosion}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_EXPLOSION = create(key("is_explosion"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_fall}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_FALL = create(key("is_fall"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_fire}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_FIRE = create(key("is_fire"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_freezing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_FREEZING = create(key("is_freezing"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_lightning}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_LIGHTNING = create(key("is_lightning"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_player_attack}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_PLAYER_ATTACK = create(key("is_player_attack"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:is_projectile}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> IS_PROJECTILE = create(key("is_projectile"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:mace_smash}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> MACE_SMASH = create(key("mace_smash"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:no_anger}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> NO_ANGER = create(key("no_anger"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:no_impact}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> NO_IMPACT = create(key("no_impact"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:no_knockback}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> NO_KNOCKBACK = create(key("no_knockback"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:panic_causes}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> PANIC_CAUSES = create(key("panic_causes"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:panic_environmental_causes}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> PANIC_ENVIRONMENTAL_CAUSES = create(key("panic_environmental_causes"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:witch_resistant_to}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> WITCH_RESISTANT_TO = create(key("witch_resistant_to"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:wither_immune_to}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<DamageType> WITHER_IMMUNE_TO = create(key("wither_immune_to"));
|
||||
|
||||
private DamageTypeTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link DamageType} in the registry {@code minecraft:damage_type}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<DamageType> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.DAMAGE_TYPE, key);
|
||||
}
|
||||
}
|
||||
+324
@@ -0,0 +1,324 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class EnchantmentTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:curse}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> CURSE = create(key("curse"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:double_trade_price}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> DOUBLE_TRADE_PRICE = create(key("double_trade_price"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_ARMOR = create(key("exclusive_set/armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/boots}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_BOOTS = create(key("exclusive_set/boots"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/bow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_BOW = create(key("exclusive_set/bow"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/crossbow}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_CROSSBOW = create(key("exclusive_set/crossbow"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/damage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_DAMAGE = create(key("exclusive_set/damage"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/mining}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_MINING = create(key("exclusive_set/mining"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:exclusive_set/riptide}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> EXCLUSIVE_SET_RIPTIDE = create(key("exclusive_set/riptide"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:in_enchanting_table}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> IN_ENCHANTING_TABLE = create(key("in_enchanting_table"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:non_treasure}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> NON_TREASURE = create(key("non_treasure"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_mob_spawn_equipment}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> ON_MOB_SPAWN_EQUIPMENT = create(key("on_mob_spawn_equipment"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_random_loot}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> ON_RANDOM_LOOT = create(key("on_random_loot"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_traded_equipment}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> ON_TRADED_EQUIPMENT = create(key("on_traded_equipment"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:prevents_bee_spawns_when_mining}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> PREVENTS_BEE_SPAWNS_WHEN_MINING = create(key("prevents_bee_spawns_when_mining"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:prevents_decorated_pot_shattering}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> PREVENTS_DECORATED_POT_SHATTERING = create(key("prevents_decorated_pot_shattering"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:prevents_ice_melting}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> PREVENTS_ICE_MELTING = create(key("prevents_ice_melting"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:prevents_infested_spawns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> PREVENTS_INFESTED_SPAWNS = create(key("prevents_infested_spawns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:smelts_loot}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> SMELTS_LOOT = create(key("smelts_loot"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:tooltip_order}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> TOOLTIP_ORDER = create(key("tooltip_order"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:tradeable}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> TRADEABLE = create(key("tradeable"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/desert_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_DESERT_COMMON = create(key("trades/desert_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/desert_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_DESERT_SPECIAL = create(key("trades/desert_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/jungle_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_JUNGLE_COMMON = create(key("trades/jungle_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/jungle_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_JUNGLE_SPECIAL = create(key("trades/jungle_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/plains_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_PLAINS_COMMON = create(key("trades/plains_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/plains_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_PLAINS_SPECIAL = create(key("trades/plains_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/savanna_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_SAVANNA_COMMON = create(key("trades/savanna_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/savanna_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_SAVANNA_SPECIAL = create(key("trades/savanna_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/snow_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_SNOW_COMMON = create(key("trades/snow_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/snow_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_SNOW_SPECIAL = create(key("trades/snow_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/swamp_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_SWAMP_COMMON = create(key("trades/swamp_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/swamp_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_SWAMP_SPECIAL = create(key("trades/swamp_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/taiga_common}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_TAIGA_COMMON = create(key("trades/taiga_common"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:trades/taiga_special}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Enchantment> TRADES_TAIGA_SPECIAL = create(key("trades/taiga_special"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:treasure}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Enchantment> TREASURE = create(key("treasure"));
|
||||
|
||||
private EnchantmentTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<Enchantment> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.ENCHANTMENT, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.Fluid;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#FLUID}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class FluidTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:lava}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Fluid> LAVA = create(key("lava"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:water}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Fluid> WATER = create(key("water"));
|
||||
|
||||
private FluidTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link Fluid} in the registry {@code minecraft:fluid}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<Fluid> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.FLUID, key);
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.GameEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class GameEventTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:allay_can_listen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<GameEvent> ALLAY_CAN_LISTEN = create(key("allay_can_listen"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:ignore_vibrations_sneaking}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<GameEvent> IGNORE_VIBRATIONS_SNEAKING = create(key("ignore_vibrations_sneaking"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:shrieker_can_listen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<GameEvent> SHRIEKER_CAN_LISTEN = create(key("shrieker_can_listen"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:vibrations}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<GameEvent> VIBRATIONS = create(key("vibrations"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:warden_can_listen}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<GameEvent> WARDEN_CAN_LISTEN = create(key("warden_can_listen"));
|
||||
|
||||
private GameEventTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link GameEvent} in the registry {@code minecraft:game_event}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<GameEvent> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.GAME_EVENT, key);
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.MusicInstrument;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class InstrumentTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:goat_horns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<MusicInstrument> GOAT_HORNS = create(key("goat_horns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:regular_goat_horns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<MusicInstrument> REGULAR_GOAT_HORNS = create(key("regular_goat_horns"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:screaming_goat_horns}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<MusicInstrument> SCREAMING_GOAT_HORNS = create(key("screaming_goat_horns"));
|
||||
|
||||
private InstrumentTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<MusicInstrument> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.INSTRUMENT, key);
|
||||
}
|
||||
}
|
||||
+1254
File diff suppressed because it is too large.
Load diff
+50
@@ -0,0 +1,50 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.Art;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class PaintingVariantTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:placeable}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Art> PLACEABLE = create(key("placeable"));
|
||||
|
||||
private PaintingVariantTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link Art} in the registry {@code minecraft:painting_variant}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<Art> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.PAINTING_VARIANT, key);
|
||||
}
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package io.papermc.paper.registry.keys.tags;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.generator.structure.Structure;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.4")
|
||||
@NullMarked
|
||||
@ApiStatus.Experimental
|
||||
public final class StructureTagKeys {
|
||||
/**
|
||||
* {@code #minecraft:cats_spawn_as_black}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> CATS_SPAWN_AS_BLACK = create(key("cats_spawn_as_black"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:cats_spawn_in}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> CATS_SPAWN_IN = create(key("cats_spawn_in"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:dolphin_located}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> DOLPHIN_LOCATED = create(key("dolphin_located"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:eye_of_ender_located}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> EYE_OF_ENDER_LOCATED = create(key("eye_of_ender_located"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:mineshaft}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> MINESHAFT = create(key("mineshaft"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:ocean_ruin}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> OCEAN_RUIN = create(key("ocean_ruin"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_desert_village_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_DESERT_VILLAGE_MAPS = create(key("on_desert_village_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_jungle_explorer_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_JUNGLE_EXPLORER_MAPS = create(key("on_jungle_explorer_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_ocean_explorer_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> ON_OCEAN_EXPLORER_MAPS = create(key("on_ocean_explorer_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_plains_village_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_PLAINS_VILLAGE_MAPS = create(key("on_plains_village_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_savanna_village_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_SAVANNA_VILLAGE_MAPS = create(key("on_savanna_village_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_snowy_village_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_SNOWY_VILLAGE_MAPS = create(key("on_snowy_village_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_swamp_explorer_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_SWAMP_EXPLORER_MAPS = create(key("on_swamp_explorer_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_taiga_village_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
|
||||
public static final TagKey<Structure> ON_TAIGA_VILLAGE_MAPS = create(key("on_taiga_village_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_treasure_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> ON_TREASURE_MAPS = create(key("on_treasure_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_trial_chambers_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> ON_TRIAL_CHAMBERS_MAPS = create(key("on_trial_chambers_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:on_woodland_explorer_maps}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> ON_WOODLAND_EXPLORER_MAPS = create(key("on_woodland_explorer_maps"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:ruined_portal}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> RUINED_PORTAL = create(key("ruined_portal"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:shipwreck}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> SHIPWRECK = create(key("shipwreck"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:village}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<Structure> VILLAGE = create(key("village"));
|
||||
|
||||
private StructureTagKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
|
||||
*
|
||||
* @param key the tag key's key
|
||||
* @return a new tag key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static TagKey<Structure> create(final Key key) {
|
||||
return TagKey.create(RegistryKey.STRUCTURE, key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package io.papermc.generator;
|
||||
|
||||
import io.papermc.generator.types.GeneratedKeyType;
|
||||
import io.papermc.generator.types.GeneratedTagKeyType;
|
||||
import io.papermc.generator.types.SourceGenerator;
|
||||
import io.papermc.generator.types.goal.MobGoalGenerator;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import org.bukkit.Art;
|
||||
import org.bukkit.Fluid;
|
||||
import org.bukkit.GameEvent;
|
||||
import org.bukkit.JukeboxSong;
|
||||
import org.bukkit.MusicInstrument;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.BlockType;
|
||||
import org.bukkit.block.banner.PatternType;
|
||||
import org.bukkit.damage.DamageType;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.bukkit.entity.Frog;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.generator.structure.Structure;
|
||||
import org.bukkit.generator.structure.StructureType;
|
||||
import org.bukkit.inventory.ItemType;
|
||||
import org.bukkit.inventory.MenuType;
|
||||
import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
import org.bukkit.map.MapCursor;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public interface Generators {
|
||||
|
||||
SourceGenerator[] API = {
|
||||
// built-ins
|
||||
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, true),
|
||||
simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false),
|
||||
simpleKey("MobEffectKeys", PotionEffectType.class, Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, false),
|
||||
simpleKey("BlockTypeKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK, false),
|
||||
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false),
|
||||
simpleKey("CatVariantKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, false),
|
||||
simpleKey("FrogVariantKeys", Frog.Variant.class, Registries.FROG_VARIANT, RegistryKey.FROG_VARIANT, false),
|
||||
simpleKey("VillagerProfessionKeys", Villager.Profession.class, Registries.VILLAGER_PROFESSION, RegistryKey.VILLAGER_PROFESSION, false),
|
||||
simpleKey("VillagerTypeKeys", Villager.Type.class, Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, false),
|
||||
simpleKey("MapDecorationTypeKeys", MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, false),
|
||||
simpleKey("MenuTypeKeys", MenuType.class, Registries.MENU, RegistryKey.MENU, false),
|
||||
simpleKey("AttributeKeys", Attribute.class, Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, false),
|
||||
simpleKey("FluidKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID, false),
|
||||
simpleKey("SoundEventKeys", Sound.class, Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, false),
|
||||
|
||||
// data-driven
|
||||
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
|
||||
simpleKey("StructureKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE, true),
|
||||
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
|
||||
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
|
||||
simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true),
|
||||
simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true),
|
||||
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, true),
|
||||
simpleKey("JukeboxSongKeys", JukeboxSong.class, Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, true),
|
||||
simpleKey("BannerPatternKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, true),
|
||||
simpleKey("PaintingVariantKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, true),
|
||||
simpleKey("InstrumentKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT, true),
|
||||
|
||||
// tags
|
||||
simpleTagKey("GameEventTagKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT),
|
||||
simpleTagKey("BlockTypeTagKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK),
|
||||
simpleTagKey("ItemTypeTagKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM),
|
||||
simpleTagKey("CatVariantTagKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT),
|
||||
simpleTagKey("FluidTagKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID),
|
||||
|
||||
simpleTagKey("BiomeTagKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME),
|
||||
simpleTagKey("StructureTagKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE),
|
||||
simpleTagKey("DamageTypeTagKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE),
|
||||
simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT),
|
||||
simpleTagKey("BannerPatternTagKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN),
|
||||
simpleTagKey("PaintingVariantTagKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT),
|
||||
simpleTagKey("InstrumentTagKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT),
|
||||
new MobGoalGenerator("VanillaGoal", "com.destroystokyo.paper.entity.ai")
|
||||
};
|
||||
|
||||
private static <T, A> SourceGenerator simpleKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
||||
return new GeneratedKeyType<>(className, apiType, "io.papermc.paper.registry.keys", registryKey, apiRegistryKey, publicCreateKeyMethod);
|
||||
}
|
||||
|
||||
private static <T, A> SourceGenerator simpleTagKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey) {
|
||||
return new GeneratedTagKeyType<>(className, apiType, "io.papermc.paper.registry.keys.tags", registryKey, apiRegistryKey, true);
|
||||
}
|
||||
}
|
||||
@@ -1,77 +1,87 @@
|
||||
package io.papermc.generator;
|
||||
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import io.papermc.generator.types.GeneratedKeyType;
|
||||
import io.papermc.generator.types.SourceGenerator;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.generator.utils.TagCollector;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
import net.kyori.adventure.key.Keyed;
|
||||
import java.util.Map;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.LayeredRegistryAccess;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.RegistryDataLoader;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.Bootstrap;
|
||||
import net.minecraft.server.RegistryLayer;
|
||||
import net.minecraft.server.WorldLoader;
|
||||
import net.minecraft.server.ReloadableServerResources;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraft.server.packs.repository.Pack;
|
||||
import net.minecraft.server.packs.repository.PackRepository;
|
||||
import net.minecraft.server.packs.repository.ServerPacksSource;
|
||||
import net.minecraft.server.packs.resources.MultiPackResourceManager;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.tags.TagLoader;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import org.apache.commons.io.file.PathUtils;
|
||||
import org.bukkit.GameEvent;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.generator.structure.StructureType;
|
||||
import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public final class Main {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final RegistryAccess.Frozen REGISTRY_ACCESS;
|
||||
public static final Map<TagKey<?>, String> EXPERIMENTAL_TAGS;
|
||||
|
||||
static {
|
||||
SharedConstants.tryDetectVersion();
|
||||
Bootstrap.bootStrap();
|
||||
Bootstrap.validate();
|
||||
|
||||
final PackRepository resourceRepository = ServerPacksSource.createVanillaTrustedRepository();
|
||||
resourceRepository.reload();
|
||||
final MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
|
||||
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
||||
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||
final List<Registry.PendingTags<?>> pendingTags = TagLoader.loadTagsForExistingRegistries(resourceManager, layers.getLayer(RegistryLayer.STATIC));
|
||||
final List<HolderLookup.RegistryLookup<?>> worldGenLayer = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLDGEN), pendingTags);
|
||||
final RegistryAccess.Frozen frozenWorldgenRegistries = RegistryDataLoader.load(resourceManager, worldGenLayer, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||
layers = layers.replaceFrom(RegistryLayer.WORLDGEN, frozenWorldgenRegistries);
|
||||
REGISTRY_ACCESS = layers.compositeAccess().freeze();
|
||||
}
|
||||
|
||||
private static final List<SourceGenerator> GENERATORS = List.of(
|
||||
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, true),
|
||||
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
|
||||
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
|
||||
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
|
||||
simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false)
|
||||
);
|
||||
|
||||
private static <T, A> SourceGenerator simpleKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
||||
return new GeneratedKeyType<>(className, apiType, "io.papermc.paper.registry.keys", registryKey, apiRegistryKey, publicCreateKeyMethod);
|
||||
final ReloadableServerResources reloadableServerResources = ReloadableServerResources.loadResources(
|
||||
resourceManager,
|
||||
layers,
|
||||
pendingTags,
|
||||
FeatureFlags.VANILLA_SET,
|
||||
Commands.CommandSelection.DEDICATED,
|
||||
0,
|
||||
MoreExecutors.directExecutor(),
|
||||
MoreExecutors.directExecutor()
|
||||
).join();
|
||||
reloadableServerResources.updateStaticRegistryTags();
|
||||
EXPERIMENTAL_TAGS = TagCollector.grabExperimental(resourceManager);
|
||||
}
|
||||
|
||||
private Main() {
|
||||
}
|
||||
|
||||
public static void main(final String[] args) {
|
||||
final Path output = Paths.get(args[0]);
|
||||
LOGGER.info("Running API generators...");
|
||||
generate(Paths.get(args[0]), Generators.API);
|
||||
// LOGGER.info("Running Server generators...");
|
||||
// generate(Paths.get(args[1]), Generators.SERVER);
|
||||
}
|
||||
|
||||
private static void generate(Path output, SourceGenerator[] generators) {
|
||||
try {
|
||||
if (Files.exists(output)) {
|
||||
PathUtils.deleteDirectory(output);
|
||||
}
|
||||
Files.createDirectories(output);
|
||||
|
||||
for (final SourceGenerator generator : GENERATORS) {
|
||||
for (final SourceGenerator generator : generators) {
|
||||
generator.writeToFile(output);
|
||||
}
|
||||
|
||||
@@ -80,6 +90,4 @@ public final class Main {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package io.papermc.generator.types;
|
||||
|
||||
import com.squareup.javapoet.AnnotationSpec;
|
||||
import java.util.List;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class Annotations {
|
||||
|
||||
public static final List<AnnotationSpec> EXPERIMENTAL_ANNOTATIONS = List.of(
|
||||
AnnotationSpec.builder(ApiStatus.Experimental.class).build(),
|
||||
AnnotationSpec.builder(MinecraftExperimental.class)
|
||||
.addMember("value", "$S", "update 1.20")
|
||||
.build()
|
||||
);
|
||||
|
||||
@ApiStatus.Experimental
|
||||
public static final AnnotationSpec EXPERIMENTAL_API_ANNOTATION = AnnotationSpec.builder(ApiStatus.Experimental.class).build();
|
||||
public static final AnnotationSpec NOT_NULL = AnnotationSpec.builder(NotNull.class).build();
|
||||
|
||||
private Annotations() {
|
||||
}
|
||||
}
|
||||
+88
-86
@@ -1,6 +1,6 @@
|
||||
package io.papermc.generator.types;
|
||||
|
||||
import com.squareup.javapoet.AnnotationSpec;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
import com.squareup.javapoet.MethodSpec;
|
||||
@@ -9,35 +9,39 @@ import com.squareup.javapoet.ParameterizedTypeName;
|
||||
import com.squareup.javapoet.TypeName;
|
||||
import com.squareup.javapoet.TypeSpec;
|
||||
import io.papermc.generator.Main;
|
||||
import io.papermc.generator.utils.Annotations;
|
||||
import io.papermc.generator.utils.CollectingContext;
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.generator.utils.Formatting;
|
||||
import io.papermc.generator.utils.Javadocs;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.lang.model.SourceVersion;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistrySetBuilder;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.data.registries.VanillaRegistries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.flag.FeatureElement;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
|
||||
import static com.squareup.javapoet.TypeSpec.classBuilder;
|
||||
import static io.papermc.generator.types.Annotations.EXPERIMENTAL_ANNOTATIONS;
|
||||
import static io.papermc.generator.types.Annotations.EXPERIMENTAL_API_ANNOTATION;
|
||||
import static io.papermc.generator.types.Annotations.NOT_NULL;
|
||||
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
|
||||
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static javax.lang.model.element.Modifier.FINAL;
|
||||
import static javax.lang.model.element.Modifier.PRIVATE;
|
||||
@@ -45,13 +49,12 @@ import static javax.lang.model.element.Modifier.PUBLIC;
|
||||
import static javax.lang.model.element.Modifier.STATIC;
|
||||
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public class GeneratedKeyType<T, A> implements SourceGenerator {
|
||||
public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
||||
|
||||
// don't exist anymore
|
||||
// private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = UpdateOneTwentyRegistries.BUILDER.entries.stream()
|
||||
// .collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap));
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = Collections.emptyMap();
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> VANILLA_REGISTRY_ENTRIES = VanillaRegistries.BUILDER.entries.stream()
|
||||
.collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap));
|
||||
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = Map.of(); // Update for Experimental API
|
||||
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
|
||||
static {
|
||||
final Map<RegistryKey<?>, String> map = new HashMap<>();
|
||||
@@ -68,138 +71,137 @@ public class GeneratedKeyType<T, A> implements SourceGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
private static final AnnotationSpec SUPPRESS_WARNINGS = AnnotationSpec.builder(SuppressWarnings.class)
|
||||
.addMember("value", "$S", "unused")
|
||||
.addMember("value", "$S", "SpellCheckingInspection")
|
||||
.build();
|
||||
private static final AnnotationSpec GENERATED_FROM = AnnotationSpec.builder(GeneratedFrom.class)
|
||||
.addMember("value", "$S", SharedConstants.getCurrentVersion().getName())
|
||||
.build();
|
||||
private static final String TYPE_JAVADOC = """
|
||||
Vanilla keys for {@link $T#$L}.
|
||||
|
||||
@apiNote The fields provided here are a direct representation of
|
||||
what is available from the vanilla game source. They may be
|
||||
changed (including removals) on any Minecraft version
|
||||
bump, so cross-version compatibility is not provided on the
|
||||
same level as it is on most of the other API.
|
||||
""";
|
||||
private static final String FIELD_JAVADOC = """
|
||||
{@code $L}
|
||||
|
||||
@apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
""";
|
||||
private static final String CREATE_JAVADOC = """
|
||||
Creates a key for {@link $T} in a registry.
|
||||
Creates a key for {@link $T} in the registry {@code $L}.
|
||||
|
||||
@param key the value's key in the registry
|
||||
@return a new typed key
|
||||
""";
|
||||
|
||||
private final String keysClassName;
|
||||
private final Class<A> apiType;
|
||||
private final String pkg;
|
||||
private final ResourceKey<? extends Registry<T>> registryKey;
|
||||
private final RegistryKey<A> apiRegistryKey;
|
||||
private final boolean publicCreateKeyMethod;
|
||||
|
||||
public GeneratedKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
||||
this.keysClassName = keysClassName;
|
||||
super(keysClassName, pkg);
|
||||
this.apiType = apiType;
|
||||
this.pkg = pkg;
|
||||
this.registryKey = registryKey;
|
||||
this.apiRegistryKey = apiRegistryKey;
|
||||
this.publicCreateKeyMethod = publicCreateKeyMethod;
|
||||
}
|
||||
|
||||
private MethodSpec.Builder createMethod(final TypeName returnType) {
|
||||
final TypeName keyType = TypeName.get(Key.class).annotated(NOT_NULL);
|
||||
final TypeName keyType = TypeName.get(Key.class);
|
||||
|
||||
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
|
||||
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
|
||||
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
|
||||
.addParameter(keyParam)
|
||||
.addCode("return $T.create($T.$L, $N);", TypedKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
|
||||
.returns(returnType.annotated(NOT_NULL));
|
||||
.returns(returnType);
|
||||
if (this.publicCreateKeyMethod) {
|
||||
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
|
||||
create.addJavadoc(CREATE_JAVADOC, this.apiType);
|
||||
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
|
||||
}
|
||||
return create;
|
||||
}
|
||||
|
||||
private TypeSpec.Builder keyHolderType() {
|
||||
return classBuilder(this.keysClassName)
|
||||
return classBuilder(this.className)
|
||||
.addModifiers(PUBLIC, FINAL)
|
||||
.addJavadoc(TYPE_JAVADOC, RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
|
||||
.addAnnotation(SUPPRESS_WARNINGS).addAnnotation(GENERATED_FROM)
|
||||
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
|
||||
.addAnnotations(Annotations.CLASS_HEADER)
|
||||
.addMethod(MethodSpec.constructorBuilder()
|
||||
.addModifiers(PRIVATE)
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
protected TypeSpec createTypeSpec() {
|
||||
@Deprecated
|
||||
private static final Map<String, String> JUKEBOX_SONG_NAMES = Map.of(
|
||||
"5", "FIVE",
|
||||
"11", "ELEVEN",
|
||||
"13", "THIRTEEN"
|
||||
);
|
||||
|
||||
@Override
|
||||
protected TypeSpec getTypeSpec() {
|
||||
final TypeName typedKey = ParameterizedTypeName.get(TypedKey.class, this.apiType);
|
||||
|
||||
final TypeSpec.Builder typeBuilder = this.keyHolderType();
|
||||
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
|
||||
final MethodSpec.Builder createMethod = this.createMethod(typedKey);
|
||||
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.registryOrThrow(this.registryKey);
|
||||
final List<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry);
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
|
||||
final Set<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry);
|
||||
|
||||
boolean allExperimental = true;
|
||||
for (final T value : registry) {
|
||||
final ResourceKey<T> key = registry.getResourceKey(value).orElseThrow();
|
||||
for (final Holder.Reference<T> reference : registry.listElements().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) {
|
||||
final ResourceKey<T> key = reference.key();
|
||||
final String keyPath = key.location().getPath();
|
||||
final String fieldName = keyPath.toUpperCase(Locale.ENGLISH).replaceAll("[.-/]", "_"); // replace invalid field name chars
|
||||
String fieldName = Formatting.formatKeyAsField(keyPath);
|
||||
if (!SourceVersion.isIdentifier(fieldName) && this.registryKey.equals(Registries.JUKEBOX_SONG) && JUKEBOX_SONG_NAMES.containsKey(fieldName)) {
|
||||
fieldName = JUKEBOX_SONG_NAMES.get(fieldName);
|
||||
}
|
||||
|
||||
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
|
||||
.initializer("$N(key($S))", createMethod.build(), keyPath)
|
||||
.addJavadoc(FIELD_JAVADOC, key.location().toString());
|
||||
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString());
|
||||
if (experimental.contains(key)) {
|
||||
fieldBuilder.addAnnotations(EXPERIMENTAL_ANNOTATIONS);
|
||||
fieldBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
||||
} else {
|
||||
allExperimental = false;
|
||||
}
|
||||
typeBuilder.addField(fieldBuilder.build());
|
||||
}
|
||||
if (allExperimental) {
|
||||
typeBuilder.addAnnotations(EXPERIMENTAL_ANNOTATIONS);
|
||||
createMethod.addAnnotations(EXPERIMENTAL_ANNOTATIONS);
|
||||
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
||||
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
||||
} else {
|
||||
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
|
||||
}
|
||||
return typeBuilder.addMethod(createMethod.build()).build();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) {
|
||||
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> registryBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) EXPERIMENTAL_REGISTRY_ENTRIES.get(this.registryKey);
|
||||
if (registryBootstrap == null) {
|
||||
return Collections.emptyList();
|
||||
// todo at some point this should be per feature data pack not all merged
|
||||
private Set<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) {
|
||||
if (FeatureElement.FILTERED_REGISTRIES.contains(registry.key())) {
|
||||
return this.collectExperimentalKeysBuiltIn(registry);
|
||||
} else {
|
||||
return this.collectExperimentalKeysDataDriven(registry);
|
||||
}
|
||||
}
|
||||
|
||||
private Set<ResourceKey<T>> collectExperimentalKeysBuiltIn(final Registry<T> registry) {
|
||||
final HolderLookup.RegistryLookup<T> filteredLookup = registry.filterElements(v -> {
|
||||
return v instanceof final FeatureElement featureElement && FeatureFlags.isExperimental(featureElement.requiredFeatures()); // Update for Experimental API
|
||||
});
|
||||
return filteredLookup.listElementIds().collect(Collectors.toUnmodifiableSet());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Set<ResourceKey<T>> collectExperimentalKeysDataDriven(final Registry<T> registry) {
|
||||
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> experimentalBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) EXPERIMENTAL_REGISTRY_ENTRIES.get(this.registryKey);
|
||||
if (experimentalBootstrap == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
final Set<ResourceKey<T>> experimental = Collections.newSetFromMap(new IdentityHashMap<>());
|
||||
final CollectingContext<T> experimentalCollector = new CollectingContext<>(experimental, registry);
|
||||
experimentalBootstrap.run(experimentalCollector);
|
||||
|
||||
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> vanillaBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) VANILLA_REGISTRY_ENTRIES.get(this.registryKey);
|
||||
if (vanillaBootstrap != null) {
|
||||
final Set<ResourceKey<T>> vanilla = Collections.newSetFromMap(new IdentityHashMap<>());
|
||||
final CollectingContext<T> vanillaCollector = new CollectingContext<>(vanilla, registry);
|
||||
vanillaBootstrap.run(vanillaCollector);
|
||||
return Sets.difference(experimental, vanilla);
|
||||
}
|
||||
final List<ResourceKey<T>> experimental = new ArrayList<>();
|
||||
final CollectingContext<T> context = new CollectingContext<>(experimental, registry);
|
||||
registryBootstrap.run(context);
|
||||
return experimental;
|
||||
}
|
||||
|
||||
protected JavaFile createFile() {
|
||||
return JavaFile.builder(this.pkg, this.createTypeSpec())
|
||||
.skipJavaLangImports(true)
|
||||
.addStaticImport(Key.class, "key")
|
||||
.indent(" ")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String outputString() {
|
||||
return this.createFile().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToFile(final Path parent) throws IOException {
|
||||
final Path pkgDir = parent.resolve(this.pkg.replace('.', '/'));
|
||||
Files.createDirectories(pkgDir);
|
||||
Files.writeString(pkgDir.resolve(this.keysClassName + ".java"), this.outputString(), StandardCharsets.UTF_8);
|
||||
protected JavaFile.Builder file(final JavaFile.Builder builder) {
|
||||
return builder
|
||||
.addStaticImport(Key.class, "key");
|
||||
}
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
package io.papermc.generator.types;
|
||||
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
import com.squareup.javapoet.MethodSpec;
|
||||
import com.squareup.javapoet.ParameterSpec;
|
||||
import com.squareup.javapoet.ParameterizedTypeName;
|
||||
import com.squareup.javapoet.TypeName;
|
||||
import com.squareup.javapoet.TypeSpec;
|
||||
import io.papermc.generator.Main;
|
||||
import io.papermc.generator.utils.Annotations;
|
||||
import io.papermc.generator.utils.Formatting;
|
||||
import io.papermc.generator.utils.Javadocs;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.tag.TagKey;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
|
||||
import static com.squareup.javapoet.TypeSpec.classBuilder;
|
||||
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
|
||||
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static javax.lang.model.element.Modifier.FINAL;
|
||||
import static javax.lang.model.element.Modifier.PRIVATE;
|
||||
import static javax.lang.model.element.Modifier.PUBLIC;
|
||||
import static javax.lang.model.element.Modifier.STATIC;
|
||||
|
||||
public class GeneratedTagKeyType<T, A> extends SimpleGenerator {
|
||||
|
||||
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
|
||||
static {
|
||||
final Map<RegistryKey<?>, String> map = new HashMap<>();
|
||||
try {
|
||||
for (final Field field : RegistryKey.class.getFields()) {
|
||||
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
|
||||
continue;
|
||||
}
|
||||
map.put((RegistryKey<?>) field.get(null), field.getName());
|
||||
}
|
||||
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
|
||||
} catch (final ReflectiveOperationException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static final String CREATE_JAVADOC = """
|
||||
Creates a tag key for {@link $T} in the registry {@code $L}.
|
||||
|
||||
@param key the tag key's key
|
||||
@return a new tag key
|
||||
""";
|
||||
|
||||
private final Class<A> apiType;
|
||||
private final ResourceKey<? extends Registry<T>> registryKey;
|
||||
private final RegistryKey<A> apiRegistryKey;
|
||||
private final boolean publicCreateKeyMethod;
|
||||
|
||||
public GeneratedTagKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
||||
super(keysClassName, pkg);
|
||||
this.apiType = apiType;
|
||||
this.registryKey = registryKey;
|
||||
this.apiRegistryKey = apiRegistryKey;
|
||||
this.publicCreateKeyMethod = publicCreateKeyMethod;
|
||||
}
|
||||
|
||||
private MethodSpec.Builder createMethod(final TypeName returnType) {
|
||||
final TypeName keyType = TypeName.get(Key.class);
|
||||
|
||||
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
|
||||
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
|
||||
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
|
||||
.addParameter(keyParam)
|
||||
.addCode("return $T.create($T.$L, $N);", TagKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
|
||||
.returns(returnType);
|
||||
if (this.publicCreateKeyMethod) {
|
||||
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
|
||||
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
|
||||
}
|
||||
return create;
|
||||
}
|
||||
|
||||
private TypeSpec.Builder keyHolderType() {
|
||||
return classBuilder(this.className)
|
||||
.addModifiers(PUBLIC, FINAL)
|
||||
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
|
||||
.addAnnotations(Annotations.CLASS_HEADER)
|
||||
.addMethod(MethodSpec.constructorBuilder()
|
||||
.addModifiers(PRIVATE)
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TypeSpec getTypeSpec() {
|
||||
final TypeName tagKey = ParameterizedTypeName.get(TagKey.class, this.apiType);
|
||||
|
||||
final TypeSpec.Builder typeBuilder = this.keyHolderType();
|
||||
final MethodSpec.Builder createMethod = this.createMethod(tagKey);
|
||||
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
|
||||
|
||||
final AtomicBoolean allExperimental = new AtomicBoolean(true);
|
||||
registry.listTagIds().sorted(Formatting.alphabeticKeyOrder(nmsTagKey -> nmsTagKey.location().getPath())).forEach(nmsTagKey -> {
|
||||
final String fieldName = Formatting.formatKeyAsField(nmsTagKey.location().getPath());
|
||||
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(tagKey, fieldName, PUBLIC, STATIC, FINAL)
|
||||
.initializer("$N(key($S))", createMethod.build(), nmsTagKey.location().getPath())
|
||||
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), "#" + nmsTagKey.location());
|
||||
final String featureFlagName = Main.EXPERIMENTAL_TAGS.get(nmsTagKey);
|
||||
if (featureFlagName != null) {
|
||||
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.valueOf(featureFlagName.toUpperCase(Locale.ENGLISH)))); // Update for Experimental API
|
||||
} else {
|
||||
allExperimental.set(false);
|
||||
}
|
||||
typeBuilder.addField(fieldBuilder.build());
|
||||
});
|
||||
if (allExperimental.get()) {
|
||||
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
||||
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
||||
} else {
|
||||
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
|
||||
}
|
||||
return typeBuilder.addMethod(createMethod.build()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JavaFile.Builder file(final JavaFile.Builder builder) {
|
||||
return builder
|
||||
.addStaticImport(Key.class, "key");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.papermc.generator.types;
|
||||
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
import com.squareup.javapoet.TypeSpec;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public abstract class SimpleGenerator implements SourceGenerator {
|
||||
|
||||
protected final String className;
|
||||
protected final String packageName;
|
||||
|
||||
protected SimpleGenerator(String className, String packageName) {
|
||||
this.className = className;
|
||||
this.packageName = packageName;
|
||||
}
|
||||
|
||||
protected abstract TypeSpec getTypeSpec();
|
||||
|
||||
protected abstract JavaFile.Builder file(JavaFile.Builder builder);
|
||||
|
||||
@Override
|
||||
public void writeToFile(Path parent) throws IOException {
|
||||
|
||||
JavaFile.Builder builder = JavaFile.builder(this.packageName, this.getTypeSpec());
|
||||
this.file(builder)
|
||||
.indent(" ")
|
||||
.skipJavaLangImports(true);
|
||||
|
||||
builder.build().writeTo(parent, StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,5 @@ import java.nio.file.Path;
|
||||
|
||||
public interface SourceGenerator {
|
||||
|
||||
String outputString();
|
||||
|
||||
void writeToFile(Path parent) throws IOException;
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package io.papermc.generator.types.goal;
|
||||
|
||||
import com.destroystokyo.paper.entity.ai.GoalKey;
|
||||
import com.squareup.javapoet.ClassName;
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
import com.squareup.javapoet.MethodSpec;
|
||||
import com.squareup.javapoet.ParameterSpec;
|
||||
import com.squareup.javapoet.ParameterizedTypeName;
|
||||
import com.squareup.javapoet.TypeName;
|
||||
import com.squareup.javapoet.TypeSpec;
|
||||
import com.squareup.javapoet.TypeVariableName;
|
||||
import io.github.classgraph.ClassGraph;
|
||||
import io.github.classgraph.ScanResult;
|
||||
import io.papermc.generator.types.SimpleGenerator;
|
||||
import io.papermc.generator.utils.Annotations;
|
||||
import io.papermc.generator.utils.Formatting;
|
||||
import io.papermc.generator.utils.Javadocs;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import net.minecraft.world.entity.ai.goal.Goal;
|
||||
import net.minecraft.world.entity.ai.goal.WrappedGoal;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.Mob;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static javax.lang.model.element.Modifier.FINAL;
|
||||
import static javax.lang.model.element.Modifier.PRIVATE;
|
||||
import static javax.lang.model.element.Modifier.PUBLIC;
|
||||
import static javax.lang.model.element.Modifier.STATIC;
|
||||
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public class MobGoalGenerator extends SimpleGenerator {
|
||||
|
||||
private static final String CLASS_HEADER = Javadocs.getVersionDependentClassHeader("Mob Goals");
|
||||
|
||||
public MobGoalGenerator(final String keysClassName, final String pkg) {
|
||||
super(keysClassName, pkg);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TypeSpec getTypeSpec() {
|
||||
TypeVariableName type = TypeVariableName.get("T", Mob.class);
|
||||
TypeSpec.Builder typeBuilder = TypeSpec.interfaceBuilder(this.className)
|
||||
.addSuperinterface(ParameterizedTypeName.get(ClassName.get(com.destroystokyo.paper.entity.ai.Goal.class), type))
|
||||
.addModifiers(PUBLIC)
|
||||
.addTypeVariable(type)
|
||||
.addAnnotations(Annotations.CLASS_HEADER)
|
||||
.addJavadoc(CLASS_HEADER);
|
||||
|
||||
TypeName mobType = ParameterizedTypeName.get(ClassName.get(Class.class), type);
|
||||
TypeName keyType = TypeName.get(String.class);
|
||||
|
||||
ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
|
||||
ParameterSpec typeParam = ParameterSpec.builder(mobType, "type", FINAL).build();
|
||||
MethodSpec.Builder createMethod = MethodSpec.methodBuilder("create")
|
||||
.addModifiers(PRIVATE, STATIC)
|
||||
.addParameter(keyParam)
|
||||
.addParameter(typeParam)
|
||||
.addCode("return $T.of($N, $T.minecraft($N));", GoalKey.class, typeParam, NamespacedKey.class, keyParam)
|
||||
.addTypeVariable(type)
|
||||
.returns(ParameterizedTypeName.get(ClassName.get(GoalKey.class), type));
|
||||
|
||||
List<Class<Goal>> classes;
|
||||
try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("net.minecraft").scan()) {
|
||||
classes = scanResult.getSubclasses(Goal.class.getName()).loadClasses(Goal.class);
|
||||
}
|
||||
|
||||
List<GoalKey<Mob>> vanillaNames = classes.stream()
|
||||
.filter(clazz -> !java.lang.reflect.Modifier.isAbstract(clazz.getModifiers()))
|
||||
.filter(clazz -> !WrappedGoal.class.equals(clazz)) // TODO - properly fix
|
||||
.map(goalClass -> MobGoalNames.getKey(goalClass.getName(), goalClass))
|
||||
.filter((key) -> !MobGoalNames.isIgnored(key.getNamespacedKey().getKey()))
|
||||
.sorted(Comparator.<GoalKey<?>, String>comparing(o -> o.getEntityClass().getSimpleName())
|
||||
.thenComparing(vanillaGoalKey -> vanillaGoalKey.getNamespacedKey().getKey())
|
||||
)
|
||||
.toList();
|
||||
|
||||
|
||||
for (final GoalKey<?> goalKey : vanillaNames) {
|
||||
TypeName typedKey = ParameterizedTypeName.get(GoalKey.class, goalKey.getEntityClass());
|
||||
NamespacedKey key = goalKey.getNamespacedKey();
|
||||
|
||||
String keyPath = key.getKey();
|
||||
String fieldName = Formatting.formatKeyAsField(keyPath);
|
||||
FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
|
||||
.initializer("$N($S, $T.class)", createMethod.build(), keyPath, goalKey.getEntityClass());
|
||||
typeBuilder.addField(fieldBuilder.build());
|
||||
}
|
||||
|
||||
return typeBuilder.addMethod(createMethod.build()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JavaFile.Builder file(JavaFile.Builder builder) {
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,336 @@
|
||||
package io.papermc.generator.types.goal;
|
||||
|
||||
import com.destroystokyo.paper.entity.RangedEntity;
|
||||
import com.destroystokyo.paper.entity.ai.GoalKey;
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import net.minecraft.world.entity.FlyingMob;
|
||||
import net.minecraft.world.entity.PathfinderMob;
|
||||
import net.minecraft.world.entity.TamableAnimal;
|
||||
import net.minecraft.world.entity.ai.goal.Goal;
|
||||
import net.minecraft.world.entity.ambient.AmbientCreature;
|
||||
import net.minecraft.world.entity.animal.AbstractFish;
|
||||
import net.minecraft.world.entity.animal.AbstractGolem;
|
||||
import net.minecraft.world.entity.animal.AbstractSchoolingFish;
|
||||
import net.minecraft.world.entity.animal.Animal;
|
||||
import net.minecraft.world.entity.animal.Pufferfish;
|
||||
import net.minecraft.world.entity.animal.ShoulderRidingEntity;
|
||||
import net.minecraft.world.entity.animal.SnowGolem;
|
||||
import net.minecraft.world.entity.animal.WaterAnimal;
|
||||
import net.minecraft.world.entity.animal.horse.AbstractChestedHorse;
|
||||
import net.minecraft.world.entity.boss.wither.WitherBoss;
|
||||
import net.minecraft.world.entity.monster.AbstractIllager;
|
||||
import net.minecraft.world.entity.monster.EnderMan;
|
||||
import net.minecraft.world.entity.monster.PatrollingMonster;
|
||||
import net.minecraft.world.entity.monster.RangedAttackMob;
|
||||
import net.minecraft.world.entity.monster.SpellcasterIllager;
|
||||
import net.minecraft.world.entity.monster.ZombifiedPiglin;
|
||||
import net.minecraft.world.entity.monster.piglin.AbstractPiglin;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.AbstractHorse;
|
||||
import org.bukkit.entity.AbstractSkeleton;
|
||||
import org.bukkit.entity.AbstractVillager;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Ambient;
|
||||
import org.bukkit.entity.Animals;
|
||||
import org.bukkit.entity.Bat;
|
||||
import org.bukkit.entity.Bee;
|
||||
import org.bukkit.entity.Blaze;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.bukkit.entity.CaveSpider;
|
||||
import org.bukkit.entity.ChestedHorse;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.Cod;
|
||||
import org.bukkit.entity.Cow;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.Dolphin;
|
||||
import org.bukkit.entity.Donkey;
|
||||
import org.bukkit.entity.Drowned;
|
||||
import org.bukkit.entity.ElderGuardian;
|
||||
import org.bukkit.entity.EnderDragon;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.entity.Endermite;
|
||||
import org.bukkit.entity.Evoker;
|
||||
import org.bukkit.entity.Fish;
|
||||
import org.bukkit.entity.Flying;
|
||||
import org.bukkit.entity.Fox;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.entity.Golem;
|
||||
import org.bukkit.entity.Guardian;
|
||||
import org.bukkit.entity.Hoglin;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Husk;
|
||||
import org.bukkit.entity.Illager;
|
||||
import org.bukkit.entity.Illusioner;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.Llama;
|
||||
import org.bukkit.entity.MagmaCube;
|
||||
import org.bukkit.entity.Mob;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Mule;
|
||||
import org.bukkit.entity.MushroomCow;
|
||||
import org.bukkit.entity.Ocelot;
|
||||
import org.bukkit.entity.Panda;
|
||||
import org.bukkit.entity.Parrot;
|
||||
import org.bukkit.entity.Phantom;
|
||||
import org.bukkit.entity.Pig;
|
||||
import org.bukkit.entity.PigZombie;
|
||||
import org.bukkit.entity.Piglin;
|
||||
import org.bukkit.entity.PiglinAbstract;
|
||||
import org.bukkit.entity.PiglinBrute;
|
||||
import org.bukkit.entity.Pillager;
|
||||
import org.bukkit.entity.PolarBear;
|
||||
import org.bukkit.entity.PufferFish;
|
||||
import org.bukkit.entity.Rabbit;
|
||||
import org.bukkit.entity.Raider;
|
||||
import org.bukkit.entity.Ravager;
|
||||
import org.bukkit.entity.Salmon;
|
||||
import org.bukkit.entity.Sheep;
|
||||
import org.bukkit.entity.Shulker;
|
||||
import org.bukkit.entity.Silverfish;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.SkeletonHorse;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.entity.Spellcaster;
|
||||
import org.bukkit.entity.Spider;
|
||||
import org.bukkit.entity.Squid;
|
||||
import org.bukkit.entity.Stray;
|
||||
import org.bukkit.entity.Strider;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.TraderLlama;
|
||||
import org.bukkit.entity.TropicalFish;
|
||||
import org.bukkit.entity.Turtle;
|
||||
import org.bukkit.entity.Vex;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.entity.Vindicator;
|
||||
import org.bukkit.entity.WanderingTrader;
|
||||
import org.bukkit.entity.WaterMob;
|
||||
import org.bukkit.entity.Witch;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.entity.WitherSkeleton;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.entity.Zoglin;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.entity.ZombieHorse;
|
||||
import org.bukkit.entity.ZombieVillager;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class MobGoalNames {
|
||||
|
||||
private static final Map<Class<? extends Goal>, Class<? extends Mob>> entityClassCache = new HashMap<>();
|
||||
public static final Map<Class<? extends net.minecraft.world.entity.Mob>, Class<? extends Mob>> bukkitMap = new HashMap<>();
|
||||
|
||||
|
||||
static {
|
||||
//<editor-fold defaultstate="collapsed" desc="bukkitMap Entities">
|
||||
bukkitMap.put(net.minecraft.world.entity.Mob.class, Mob.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.AgeableMob.class, Ageable.class);
|
||||
bukkitMap.put(AmbientCreature.class, Ambient.class);
|
||||
bukkitMap.put(Animal.class, Animals.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.ambient.Bat.class, Bat.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Bee.class, Bee.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Blaze.class, Blaze.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Cat.class, Cat.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.CaveSpider.class, CaveSpider.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Chicken.class, Chicken.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Cod.class, Cod.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Cow.class, Cow.class);
|
||||
bukkitMap.put(PathfinderMob.class, Creature.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Creeper.class, Creeper.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Dolphin.class, Dolphin.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Drowned.class, Drowned.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.boss.enderdragon.EnderDragon.class, EnderDragon.class);
|
||||
bukkitMap.put(EnderMan.class, Enderman.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Endermite.class, Endermite.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Evoker.class, Evoker.class);
|
||||
bukkitMap.put(AbstractFish.class, Fish.class);
|
||||
bukkitMap.put(AbstractSchoolingFish.class, io.papermc.paper.entity.SchoolableFish.class);
|
||||
bukkitMap.put(FlyingMob.class, Flying.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Fox.class, Fox.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Ghast.class, Ghast.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Giant.class, Giant.class);
|
||||
bukkitMap.put(AbstractGolem.class, Golem.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Guardian.class, Guardian.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.ElderGuardian.class, ElderGuardian.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.Horse.class, Horse.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.AbstractHorse.class, AbstractHorse.class);
|
||||
bukkitMap.put(AbstractChestedHorse.class, ChestedHorse.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.Donkey.class, Donkey.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.Mule.class, Mule.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.SkeletonHorse.class, SkeletonHorse.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.ZombieHorse.class, ZombieHorse.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.camel.Camel.class, org.bukkit.entity.Camel.class);
|
||||
bukkitMap.put(AbstractIllager.class, Illager.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Illusioner.class, Illusioner.class);
|
||||
bukkitMap.put(SpellcasterIllager.class, Spellcaster.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.IronGolem.class, IronGolem.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.Llama.class, Llama.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.horse.TraderLlama.class, TraderLlama.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.MagmaCube.class, MagmaCube.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Monster.class, Monster.class);
|
||||
bukkitMap.put(PatrollingMonster.class, Raider.class); // close enough
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.MushroomCow.class, MushroomCow.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Ocelot.class, Ocelot.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Panda.class, Panda.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Parrot.class, Parrot.class);
|
||||
bukkitMap.put(ShoulderRidingEntity.class, Parrot.class); // close enough
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Phantom.class, Phantom.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Pig.class, Pig.class);
|
||||
bukkitMap.put(ZombifiedPiglin.class, PigZombie.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Pillager.class, Pillager.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.PolarBear.class, PolarBear.class);
|
||||
bukkitMap.put(Pufferfish.class, PufferFish.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Rabbit.class, Rabbit.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.raid.Raider.class, Raider.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Ravager.class, Ravager.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Salmon.class, Salmon.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Sheep.class, Sheep.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Shulker.class, Shulker.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Silverfish.class, Silverfish.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Skeleton.class, Skeleton.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.AbstractSkeleton.class, AbstractSkeleton.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Stray.class, Stray.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.WitherSkeleton.class, WitherSkeleton.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Slime.class, Slime.class);
|
||||
bukkitMap.put(SnowGolem.class, Snowman.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Spider.class, Spider.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Squid.class, Squid.class);
|
||||
bukkitMap.put(TamableAnimal.class, Tameable.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.TropicalFish.class, TropicalFish.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Turtle.class, Turtle.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Vex.class, Vex.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.npc.Villager.class, Villager.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.npc.AbstractVillager.class, AbstractVillager.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.npc.WanderingTrader.class, WanderingTrader.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Vindicator.class, Vindicator.class);
|
||||
bukkitMap.put(WaterAnimal.class, WaterMob.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Witch.class, Witch.class);
|
||||
bukkitMap.put(WitherBoss.class, Wither.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.Wolf.class, Wolf.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Zombie.class, Zombie.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Husk.class, Husk.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.ZombieVillager.class, ZombieVillager.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.hoglin.Hoglin.class, Hoglin.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.piglin.Piglin.class, Piglin.class);
|
||||
bukkitMap.put(AbstractPiglin.class, PiglinAbstract.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.piglin.PiglinBrute.class, PiglinBrute.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Strider.class, Strider.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Zoglin.class, Zoglin.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.GlowSquid.class, org.bukkit.entity.GlowSquid.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.axolotl.Axolotl.class, org.bukkit.entity.Axolotl.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.goat.Goat.class, org.bukkit.entity.Goat.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.frog.Frog.class, org.bukkit.entity.Frog.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.frog.Tadpole.class, org.bukkit.entity.Tadpole.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.warden.Warden.class, org.bukkit.entity.Warden.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.allay.Allay.class, org.bukkit.entity.Allay.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.sniffer.Sniffer.class, org.bukkit.entity.Sniffer.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.breeze.Breeze.class, org.bukkit.entity.Breeze.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.armadillo.Armadillo.class, org.bukkit.entity.Armadillo.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Bogged.class, org.bukkit.entity.Bogged.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.creaking.Creaking.class, org.bukkit.entity.Creaking.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.AgeableWaterCreature.class, org.bukkit.entity.Squid.class); // close enough
|
||||
//</editor-fold>
|
||||
}
|
||||
|
||||
private static final BiMap<String, String> deobfuscationMap = HashBiMap.create();
|
||||
static final Set<String> ignored = new HashSet<>();
|
||||
|
||||
static {
|
||||
deobfuscationMap.put("abstract_skeleton_1", "abstract_skeleton_melee");
|
||||
|
||||
ignored.add("goal_selector_1");
|
||||
ignored.add("goal_selector_2");
|
||||
ignored.add("selector_1");
|
||||
ignored.add("selector_2");
|
||||
ignored.add("wrapped");
|
||||
}
|
||||
|
||||
public static String getUsableName(String name) {
|
||||
final String original = name;
|
||||
name = name.substring(name.lastIndexOf(".") + 1);
|
||||
boolean flag = false;
|
||||
// inner classes
|
||||
if (name.contains("$")) {
|
||||
String cut = name.substring(name.indexOf("$") + 1);
|
||||
if (cut.length() <= 2) {
|
||||
name = name.replace("Entity", "");
|
||||
name = name.replace("$", "_");
|
||||
flag = true;
|
||||
} else {
|
||||
// mapped, wooo
|
||||
name = cut;
|
||||
}
|
||||
}
|
||||
|
||||
name = name.replace("PathfinderGoal", "");
|
||||
name = name.replace("TargetGoal", "");
|
||||
name = name.replace("Goal", "");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (char c : name.toCharArray()) {
|
||||
if (c >= 'A' && c <= 'Z') {
|
||||
sb.append("_");
|
||||
sb.append(Character.toLowerCase(c));
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
name = sb.toString();
|
||||
name = name.replaceFirst("_", "");
|
||||
|
||||
if (flag && !deobfuscationMap.containsKey(name.toLowerCase(Locale.ROOT)) && !ignored.contains(name)) {
|
||||
System.out.println("need to map " + original + " (" + name.toLowerCase(Locale.ROOT) + ")");
|
||||
}
|
||||
|
||||
// did we rename this key?
|
||||
return deobfuscationMap.getOrDefault(name, name);
|
||||
}
|
||||
|
||||
public static boolean isIgnored(String name) {
|
||||
return ignored.contains(name);
|
||||
}
|
||||
|
||||
|
||||
public static <T extends Mob> GoalKey<T> getKey(String clazzName, Class<? extends Goal> goalClass) {
|
||||
String name = getUsableName(clazzName);
|
||||
if (MobGoalNames.isIgnored(name)) {
|
||||
//noinspection unchecked
|
||||
return (GoalKey<T>) GoalKey.of(Mob.class, NamespacedKey.minecraft(name));
|
||||
}
|
||||
return GoalKey.of(getEntity(goalClass), NamespacedKey.minecraft(name));
|
||||
}
|
||||
|
||||
public static <T extends Mob> Class<T> getEntity(Class<? extends Goal> goalClass) {
|
||||
//noinspection unchecked
|
||||
return (Class<T>) entityClassCache.computeIfAbsent(goalClass, key -> {
|
||||
for (Constructor<?> ctor : key.getDeclaredConstructors()) {
|
||||
for (int i = 0; i < ctor.getParameterCount(); i++) {
|
||||
Class<?> param = ctor.getParameterTypes()[i];
|
||||
if (net.minecraft.world.entity.Mob.class.isAssignableFrom(param)) {
|
||||
//noinspection unchecked
|
||||
return toBukkitClass((Class<? extends net.minecraft.world.entity.Mob>) param);
|
||||
} else if (RangedAttackMob.class.isAssignableFrom(param)) {
|
||||
return RangedEntity.class;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("Can't figure out applicable entity for mob goal " + goalClass); // maybe just return EntityInsentient?
|
||||
});
|
||||
}
|
||||
|
||||
public static Class<? extends Mob> toBukkitClass(Class<? extends net.minecraft.world.entity.Mob> nmsClass) {
|
||||
Class<? extends Mob> bukkitClass = bukkitMap.get(nmsClass);
|
||||
if (bukkitClass == null) {
|
||||
throw new RuntimeException("Can't figure out applicable bukkit entity for nms entity " + nmsClass); // maybe just return Mob?
|
||||
}
|
||||
return bukkitClass;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package io.papermc.generator.utils;
|
||||
|
||||
import com.squareup.javapoet.AnnotationSpec;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import net.minecraft.SharedConstants;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
public final class Annotations {
|
||||
|
||||
public static List<AnnotationSpec> experimentalAnnotations(final MinecraftExperimental.@Nullable Requires requiredFeatureFlag) {
|
||||
final List<AnnotationSpec> annotationSpecs = new ArrayList<>();
|
||||
annotationSpecs.add(AnnotationSpec.builder(ApiStatus.Experimental.class).build());
|
||||
if (requiredFeatureFlag != null) {
|
||||
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class)
|
||||
.addMember("value", "$T.$L", MinecraftExperimental.Requires.class, requiredFeatureFlag.name())
|
||||
.build());
|
||||
} else {
|
||||
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class).build());
|
||||
}
|
||||
return annotationSpecs;
|
||||
}
|
||||
|
||||
public static AnnotationSpec deprecatedVersioned(final @Nullable String version, final boolean forRemoval) {
|
||||
final AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Deprecated.class);
|
||||
if (forRemoval) {
|
||||
annotationSpec.addMember("forRemoval", "$L", true);
|
||||
}
|
||||
if (version != null) {
|
||||
annotationSpec.addMember("since", "$S", version);
|
||||
}
|
||||
|
||||
return annotationSpec.build();
|
||||
}
|
||||
|
||||
public static AnnotationSpec scheduledRemoval(final @Nullable String version) {
|
||||
return AnnotationSpec.builder(ApiStatus.ScheduledForRemoval.class)
|
||||
.addMember("inVersion", "$S", version)
|
||||
.build();
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
public static final AnnotationSpec EXPERIMENTAL_API_ANNOTATION = AnnotationSpec.builder(ApiStatus.Experimental.class).build();
|
||||
public static final AnnotationSpec NULL_MARKED = AnnotationSpec.builder(NullMarked.class).build();
|
||||
private static final AnnotationSpec SUPPRESS_WARNINGS = AnnotationSpec.builder(SuppressWarnings.class)
|
||||
.addMember("value", "$S", "unused")
|
||||
.addMember("value", "$S", "SpellCheckingInspection")
|
||||
.build();
|
||||
private static final AnnotationSpec GENERATED_FROM = AnnotationSpec.builder(GeneratedFrom.class)
|
||||
.addMember("value", "$S", SharedConstants.getCurrentVersion().getName())
|
||||
.build();
|
||||
public static final Iterable<AnnotationSpec> CLASS_HEADER = List.of(
|
||||
SUPPRESS_WARNINGS,
|
||||
GENERATED_FROM,
|
||||
NULL_MARKED
|
||||
);
|
||||
|
||||
private Annotations() {
|
||||
}
|
||||
}
|
||||
@@ -2,27 +2,27 @@ package io.papermc.generator.utils;
|
||||
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import io.papermc.generator.Main;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderGetter;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.data.worldgen.BootstapContext;
|
||||
import net.minecraft.data.worldgen.BootstrapContext;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public record CollectingContext<T>(List<ResourceKey<T>> registered,
|
||||
Registry<T> registry) implements BootstapContext<T> {
|
||||
public record CollectingContext<T>(Set<ResourceKey<T>> registered,
|
||||
Registry<T> registry) implements BootstrapContext<T> {
|
||||
|
||||
@Override
|
||||
public Holder.Reference<T> register(final ResourceKey<T> resourceKey, final @NonNull T t, final Lifecycle lifecycle) {
|
||||
this.registered.add(resourceKey);
|
||||
return Holder.Reference.createStandAlone(this.registry.holderOwner(), resourceKey);
|
||||
return Holder.Reference.createStandAlone(this.registry, resourceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <S> HolderGetter<S> lookup(final ResourceKey<? extends Registry<? extends S>> resourceKey) {
|
||||
return Main.REGISTRY_ACCESS.registryOrThrow(resourceKey).asLookup();
|
||||
return Main.REGISTRY_ACCESS.lookupOrThrow(resourceKey);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package io.papermc.generator.utils;
|
||||
|
||||
import java.util.Optional;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import java.util.Comparator;
|
||||
import java.util.Locale;
|
||||
import java.util.OptionalInt;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public final class Formatting {
|
||||
|
||||
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
|
||||
|
||||
public static String formatKeyAsField(String path) {
|
||||
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_");
|
||||
}
|
||||
|
||||
public static Optional<String> formatTagKey(String tagDir, String resourcePath) {
|
||||
int tagsIndex = resourcePath.indexOf(tagDir);
|
||||
int dotIndex = resourcePath.lastIndexOf('.');
|
||||
if (tagsIndex == -1 || dotIndex == -1) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.of(resourcePath.substring(tagsIndex + tagDir.length() + 1, dotIndex)); // namespace/tags/registry_key/[tag_key].json
|
||||
}
|
||||
|
||||
public static Comparator<String> ALPHABETIC_KEY_ORDER = alphabeticKeyOrder(path -> path);
|
||||
|
||||
public static <T> Comparator<T> alphabeticKeyOrder(Function<T, String> mapper) {
|
||||
return (o1, o2) -> {
|
||||
String path1 = mapper.apply(o1);
|
||||
String path2 = mapper.apply(o2);
|
||||
|
||||
OptionalInt trailingInt1 = tryParseTrailingInt(path1);
|
||||
OptionalInt trailingInt2 = tryParseTrailingInt(path2);
|
||||
|
||||
if (trailingInt1.isPresent() && trailingInt2.isPresent()) {
|
||||
return Integer.compare(trailingInt1.getAsInt(), trailingInt2.getAsInt());
|
||||
}
|
||||
|
||||
return path1.compareTo(path2);
|
||||
};
|
||||
}
|
||||
|
||||
private static OptionalInt tryParseTrailingInt(String path) {
|
||||
int delimiterIndex = path.lastIndexOf('_');
|
||||
if (delimiterIndex != -1) {
|
||||
String score = path.substring(delimiterIndex + 1);
|
||||
if (NumberUtils.isDigits(score)) {
|
||||
return OptionalInt.of(Integer.parseInt(score));
|
||||
}
|
||||
}
|
||||
return OptionalInt.empty();
|
||||
}
|
||||
|
||||
private Formatting() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.papermc.generator.utils;
|
||||
|
||||
public final class Javadocs {
|
||||
|
||||
public static String getVersionDependentClassHeader(String headerIdentifier) {
|
||||
return """
|
||||
Vanilla keys for %s.
|
||||
|
||||
@apiNote The fields provided here are a direct representation of
|
||||
what is available from the vanilla game source. They may be
|
||||
changed (including removals) on any Minecraft version
|
||||
bump, so cross-version compatibility is not provided on the
|
||||
same level as it is on most of the other API.
|
||||
""".formatted(headerIdentifier);
|
||||
}
|
||||
|
||||
public static String getVersionDependentField(String headerIdentifier) {
|
||||
return """
|
||||
%s
|
||||
|
||||
@apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
""".formatted(headerIdentifier);
|
||||
}
|
||||
|
||||
private Javadocs() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package io.papermc.generator.utils;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import io.papermc.generator.Main;
|
||||
import java.util.Collections;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.packs.PackResources;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraft.server.packs.repository.BuiltInPackSource;
|
||||
import net.minecraft.server.packs.resources.MultiPackResourceManager;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// collect all the tags by grabbing the json from the data-packs
|
||||
// another (probably) way is to hook into the data generator like the typed keys generator
|
||||
public final class TagCollector {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
public static Map<TagKey<?>, String> grabExperimental(final MultiPackResourceManager resourceManager) {
|
||||
Map<TagKey<?>, String> result = new IdentityHashMap<>();
|
||||
|
||||
// collect all vanilla tags
|
||||
Multimap<ResourceKey<? extends Registry<?>>, String> vanillaTags = HashMultimap.create();
|
||||
PackResources vanillaPack = resourceManager.listPacks()
|
||||
.filter(packResources -> packResources.packId().equals(BuiltInPackSource.VANILLA_ID))
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
collectFromPack(vanillaPack, (entry, path) -> vanillaTags.put(entry.key(), path));
|
||||
|
||||
// then distinct with other data-pack tags to know for sure newly created tags and so experimental one
|
||||
resourceManager.listPacks().forEach(pack -> {
|
||||
String packId = pack.packId();
|
||||
if (packId.equals(BuiltInPackSource.VANILLA_ID)) return;
|
||||
|
||||
collectFromPack(pack, (entry, path) -> {
|
||||
if (vanillaTags.get(entry.key()).contains(path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
result.put(entry.value().listTagIds()
|
||||
.filter(tagKey -> tagKey.location().getPath().equals(path))
|
||||
.findFirst()
|
||||
.orElseThrow(), packId);
|
||||
});
|
||||
});
|
||||
return Collections.unmodifiableMap(result);
|
||||
}
|
||||
|
||||
private static void collectFromPack(PackResources pack, BiConsumer<RegistryAccess.RegistryEntry<?>, String> output) {
|
||||
Set<String> namespaces = pack.getNamespaces(PackType.SERVER_DATA);
|
||||
|
||||
for (String namespace : namespaces) {
|
||||
Main.REGISTRY_ACCESS.registries().forEach(entry -> {
|
||||
// this is probably expensive but can't find another way around and data-pack loader has similar logic
|
||||
// the issue is that registry key can have parent/key (and custom folder too) but tag key can also have parent/key so parsing become a mess
|
||||
// without having at least one of the two values
|
||||
String tagDir = Registries.tagsDirPath(entry.key());
|
||||
pack.listResources(PackType.SERVER_DATA, namespace, tagDir, (id, supplier) -> {
|
||||
Formatting.formatTagKey(tagDir, id.getPath()).ifPresentOrElse(path -> output.accept(entry, path), () -> {
|
||||
LOGGER.warn("Unable to parse the path: {}/{}/{}.json in the data-pack {} into a tag key", namespace, tagDir, id.getPath(), pack.packId());
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private TagCollector() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.papermc.generator;
|
||||
|
||||
import io.github.classgraph.ClassGraph;
|
||||
import io.github.classgraph.ScanResult;
|
||||
import io.papermc.generator.types.goal.MobGoalNames;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
public class MobGoalConverterTest {
|
||||
|
||||
@Test
|
||||
public void testBukkitMap() {
|
||||
final List<Class<Mob>> classes;
|
||||
try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages(Entity.class.getPackageName()).scan()) {
|
||||
classes = scanResult.getSubclasses(Mob.class.getName()).loadClasses(Mob.class);
|
||||
}
|
||||
|
||||
assertFalse(classes.isEmpty(), "There are supposed to be more than 0 mob classes!");
|
||||
|
||||
List<String> missingClasses = new ArrayList<>();
|
||||
for (Class<Mob> nmsClass : classes) {
|
||||
if (!MobGoalNames.bukkitMap.containsKey(nmsClass)) {
|
||||
missingClasses.add(nmsClass.getCanonicalName());
|
||||
}
|
||||
}
|
||||
|
||||
if (!missingClasses.isEmpty()) {
|
||||
fail("Missing some entity classes in the bukkit map: " + String.join(", ", missingClasses));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
accessWidener v1 named
|
||||
accessible method net/minecraft/server/WorldLoader loadAndReplaceLayer (Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/core/LayeredRegistryAccess;Lnet/minecraft/server/RegistryLayer;Ljava/util/List;)Lnet/minecraft/core/LayeredRegistryAccess;
|
||||
|
||||
# for auto-marking experimental stuff
|
||||
accessible field net/minecraft/core/RegistrySetBuilder entries Ljava/util/List;
|
||||
accessible class net/minecraft/core/RegistrySetBuilder$RegistryStub
|
||||
public net/minecraft/core/RegistrySetBuilder entries
|
||||
public net/minecraft/core/RegistrySetBuilder$RegistryStub
|
||||
public net/minecraft/data/registries/VanillaRegistries BUILDER
|
||||
public net/minecraft/data/registries/WinterDropRegistries BUILDER
|
||||
public net/minecraft/data/registries/TradeRebalanceRegistries BUILDER
|
||||
@@ -27,10 +27,10 @@ index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105dab208df2
|
||||
index 0000000000000000000000000000000000000000..dfb490fe94c1f543cc75e9f5ca76f8254bff9159
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,91 @@
|
||||
@@ -0,0 +1,93 @@
|
||||
+plugins {
|
||||
+ `java-library`
|
||||
+ `maven-publish`
|
||||
@@ -41,30 +41,32 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+ withJavadocJar()
|
||||
+}
|
||||
+
|
||||
+val annotationsVersion = "24.0.1"
|
||||
+val bungeeCordChatVersion = "1.20-R0.1"
|
||||
+val annotationsVersion = "24.1.0"
|
||||
+val bungeeCordChatVersion = "1.20-R0.2"
|
||||
+
|
||||
+dependencies {
|
||||
+ // api dependencies are listed transitively to API consumers
|
||||
+ api("com.google.guava:guava:32.1.2-jre")
|
||||
+ api("com.google.code.gson:gson:2.10.1")
|
||||
+ api("com.google.guava:guava:33.3.1-jre")
|
||||
+ api("com.google.code.gson:gson:2.11.0")
|
||||
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
+ api("org.yaml:snakeyaml:2.2")
|
||||
+ api("org.joml:joml:1.10.5")
|
||||
+ api("org.joml:joml:1.10.8") {
|
||||
+ isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
|
||||
+ }
|
||||
+
|
||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
+
|
||||
+ val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
|
||||
+ compileOnly(annotations)
|
||||
+ testCompileOnly(annotations)
|
||||
+
|
||||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
+ testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
+ testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
+}
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
@@ -100,7 +102,7 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+ options.use()
|
||||
+ options.isDocFilesSubDirs = true
|
||||
+ options.links(
|
||||
+ "https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
+ "https://guava.dev/releases/33.3.1-jre/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
@@ -124,10 +126,10 @@ index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105d
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..0000000000000000000000000000000000000000
|
||||
index 25a8f7daaf393f3306ca5c6c0c79d3de7bc983db..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,278 +0,0 @@
|
||||
@@ -1,267 +0,0 @@
|
||||
-
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -135,7 +137,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
- <version>1.21.4-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
@@ -144,8 +146,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
-
|
||||
- <properties>
|
||||
- <skipTests>true</skipTests>
|
||||
- <maven.compiler.source>1.8</maven.compiler.source>
|
||||
- <maven.compiler.target>1.8</maven.compiler.target>
|
||||
- <maven.compiler.release>17</maven.compiler.release>
|
||||
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
- </properties>
|
||||
-
|
||||
@@ -165,27 +166,27 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.google.guava</groupId>
|
||||
- <artifactId>guava</artifactId>
|
||||
- <version>32.1.2-jre</version>
|
||||
- <version>33.3.1-jre</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>com.google.code.gson</groupId>
|
||||
- <artifactId>gson</artifactId>
|
||||
- <version>2.10.1</version>
|
||||
- <version>2.11.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>org.joml</groupId>
|
||||
- <artifactId>joml</artifactId>
|
||||
- <version>1.10.5</version>
|
||||
- <version>1.10.8</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>net.md-5</groupId>
|
||||
- <artifactId>bungeecord-chat</artifactId>
|
||||
- <version>1.20-R0.1</version>
|
||||
- <version>1.20-R0.2</version>
|
||||
- <type>jar</type>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
@@ -199,33 +200,33 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven</groupId>
|
||||
- <artifactId>maven-resolver-provider</artifactId>
|
||||
- <version>3.8.5</version>
|
||||
- <version>3.9.6</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven.resolver</groupId>
|
||||
- <artifactId>maven-resolver-connector-basic</artifactId>
|
||||
- <version>1.7.3</version>
|
||||
- <version>1.9.18</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven.resolver</groupId>
|
||||
- <artifactId>maven-resolver-transport-http</artifactId>
|
||||
- <version>1.7.3</version>
|
||||
- <version>1.9.18</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <!-- annotations -->
|
||||
- <dependency>
|
||||
- <groupId>org.jetbrains</groupId>
|
||||
- <artifactId>annotations-java5</artifactId>
|
||||
- <version>24.0.1</version>
|
||||
- <version>24.1.0</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <!-- testing -->
|
||||
- <dependency>
|
||||
- <groupId>org.junit.jupiter</groupId>
|
||||
- <artifactId>junit-jupiter</artifactId>
|
||||
- <version>5.10.0</version>
|
||||
- <version>5.10.2</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
@@ -237,13 +238,13 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.mockito</groupId>
|
||||
- <artifactId>mockito-core</artifactId>
|
||||
- <version>5.5.0</version>
|
||||
- <version>5.14.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.5</version>
|
||||
- <version>9.7.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
@@ -266,25 +267,16 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-compiler-plugin</artifactId>
|
||||
- <version>3.11.0</version>
|
||||
- <version>3.13.0</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
- <!-- default changed with version 3.11.0 -->
|
||||
- <showWarnings>false</showWarnings>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
- <artifactId>plexus-compiler-eclipse</artifactId>
|
||||
- <version>2.13.0</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-jar-plugin</artifactId>
|
||||
- <version>3.3.0</version>
|
||||
- <version>3.4.1</version>
|
||||
- <configuration>
|
||||
- <archive>
|
||||
- <manifest>
|
||||
@@ -299,7 +291,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-shade-plugin</artifactId>
|
||||
- <version>3.5.0</version>
|
||||
- <version>3.5.3</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>package</phase>
|
||||
@@ -326,10 +318,10 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-javadoc-plugin</artifactId>
|
||||
- <version>3.5.0</version>
|
||||
- <version>3.6.3</version>
|
||||
- <configuration>
|
||||
- <links>
|
||||
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
||||
- <link>https://guava.dev/releases/32.1.2-jre/api/docs/</link>
|
||||
- </links>
|
||||
- <tags>
|
||||
- <tag>
|
||||
@@ -343,7 +335,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-surefire-plugin</artifactId>
|
||||
- <version>3.1.0</version>
|
||||
- <version>3.2.5</version>
|
||||
- </plugin>
|
||||
- </plugins>
|
||||
- </build>
|
||||
@@ -359,7 +351,7 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-checkstyle-plugin</artifactId>
|
||||
- <version>3.3.0</version>
|
||||
- <version>3.3.1</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
@@ -370,7 +362,6 @@ index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..00000000000000000000000000000000
|
||||
- </executions>
|
||||
- <configuration>
|
||||
- <configLocation>checkstyle.xml</configLocation>
|
||||
- <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
|
||||
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
|
||||
@@ -5,23 +5,22 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 41e77b687df6480adf8f5e21daad105dab208df2..d86ee6acb78d249424c5df98a851178c0f62eec1 100644
|
||||
index dfb490fe94c1f543cc75e9f5ca76f8254bff9159..3667f27baa87c82e071cc14ca20491d38feee255 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -18,15 +18,27 @@ dependencies {
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
api("org.yaml:snakeyaml:2.2")
|
||||
api("org.joml:joml:1.10.5")
|
||||
@@ -20,15 +20,27 @@ dependencies {
|
||||
api("org.joml:joml:1.10.8") {
|
||||
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
|
||||
}
|
||||
+ // Paper start
|
||||
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
+ isTransitive = false // includes junit
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
||||
+ compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
|
||||
- val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
|
||||
+ val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
|
||||
@@ -29,29 +28,31 @@ index 41e77b687df6480adf8f5e21daad105dab208df2..d86ee6acb78d249424c5df98a851178c
|
||||
testCompileOnly(annotations)
|
||||
|
||||
+ // Paper start - add checker
|
||||
+ val checkerQual = "org.checkerframework:checker-qual:3.21.0"
|
||||
+ val checkerQual = "org.checkerframework:checker-qual:3.33.0"
|
||||
+ compileOnlyApi(checkerQual)
|
||||
+ testCompileOnly(checkerQual)
|
||||
+ // Paper end
|
||||
+ api("org.jspecify:jspecify:1.0.0") // Paper - add jspecify
|
||||
+
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
@@ -69,8 +81,12 @@ tasks.withType<Javadoc> {
|
||||
@@ -71,8 +83,13 @@ tasks.withType<Javadoc> {
|
||||
options.links(
|
||||
"https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
"https://guava.dev/releases/33.3.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
"https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
+ // Paper start - add missing javadoc links
|
||||
+ "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
|
||||
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
|
||||
+ "https://javadoc.io/doc/org.joml/joml/1.10.8/index.html",
|
||||
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
|
||||
+ "https://jspecify.dev/docs/api/",
|
||||
+ // Paper end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
@@ -89,3 +105,14 @@ tasks.withType<Javadoc> {
|
||||
@@ -91,3 +108,14 @@ tasks.withType<Javadoc> {
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
@@ -7,16 +7,52 @@ Subject: [PATCH] Test changes
|
||||
- Ignore package-private methods for nullability annotations
|
||||
- Add excludes for classes which don't pass
|
||||
- Disable stupid BukkitMirrorTest
|
||||
- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451
|
||||
|
||||
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d86ee6acb78d249424c5df98a851178c0f62eec1..75bfb0ab8049ebbb52240abf661d469de5526767 100644
|
||||
index 3667f27baa87c82e071cc14ca20491d38feee255..73aaa8a341565626556327cda6a73f98c318863a 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -106,6 +106,12 @@ tasks.test {
|
||||
@@ -11,6 +11,18 @@ java {
|
||||
val annotationsVersion = "24.1.0"
|
||||
val bungeeCordChatVersion = "1.20-R0.2"
|
||||
|
||||
+// Paper start - configure mockito agent that is needed in newer java versions
|
||||
+val mockitoAgent = configurations.register("mockitoAgent")
|
||||
+abstract class MockitoAgentProvider : CommandLineArgumentProvider {
|
||||
+ @get:CompileClasspath
|
||||
+ abstract val fileCollection: ConfigurableFileCollection
|
||||
+
|
||||
+ override fun asArguments(): Iterable<String> {
|
||||
+ return listOf("-javaagent:" + fileCollection.files.single().absolutePath)
|
||||
+ }
|
||||
+}
|
||||
+// Paper end - configure mockito agent that is needed in newer java versions
|
||||
+
|
||||
dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
api("com.google.guava:guava:33.3.1-jre")
|
||||
@@ -46,6 +58,7 @@ dependencies {
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
+ mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
|
||||
}
|
||||
|
||||
configure<PublishingExtension> {
|
||||
@@ -107,8 +120,19 @@ tasks.withType<Javadoc> {
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
+ // Paper start - configure mockito agent that is needed in newer java versions
|
||||
+ val provider = objects.newInstance<MockitoAgentProvider>()
|
||||
+ provider.fileCollection.from(mockitoAgent)
|
||||
+ jvmArgumentProviders.add(provider)
|
||||
+ // Paper end - configure mockito agent that is needed in newer java versions
|
||||
}
|
||||
|
||||
+// Paper start - compile tests with -parameters for better junit parameterized test names
|
||||
@@ -66,7 +102,7 @@ index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242b6bd4fb0 100644
|
||||
index 64e7aef6220097edefdff3b98a771b988365930d..07f904a78f51b220a5891aca1afffac4f46d58b4 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -29,7 +29,13 @@ public class AnnotationTest {
|
||||
@@ -103,7 +139,19 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
};
|
||||
|
||||
@Test
|
||||
@@ -67,14 +83,40 @@ public class AnnotationTest {
|
||||
@@ -61,20 +77,60 @@ public class AnnotationTest {
|
||||
continue;
|
||||
}
|
||||
|
||||
+ // Paper start - skip class if it's @NullMarked
|
||||
+ if (isClassNullMarked(clazz, foundClasses)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // Paper end - skip class if it's @NullMarked
|
||||
+
|
||||
for (MethodNode method : clazz.methods) {
|
||||
if (!isMethodIncluded(clazz, method, foundClasses)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mustBeAnnotated(Type.getReturnType(method.desc)) && !isWellAnnotated(method.invisibleAnnotations)) {
|
||||
@@ -140,11 +188,19 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (method.visibleTypeAnnotations != null) {
|
||||
+ for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.visibleTypeAnnotations) {
|
||||
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
|
||||
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_FORMAL_PARAMETER && ref.getTypeParameterIndex() == i && java.util.Arrays.asList(ACCEPTED_ANNOTATIONS).contains(invisibleTypeAnnotation.desc)) {
|
||||
+ continue dancing;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - Allow use of TYPE_USE annotations
|
||||
ParameterNode paramNode = parameters == null ? null : parameters.get(i);
|
||||
String paramName = paramNode == null ? null : paramNode.name;
|
||||
|
||||
@@ -91,13 +133,18 @@ public class AnnotationTest {
|
||||
@@ -91,17 +147,37 @@ public class AnnotationTest {
|
||||
|
||||
Collections.sort(errors);
|
||||
|
||||
@@ -167,7 +223,50 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
}
|
||||
|
||||
private static void collectClasses(@NotNull File from, @NotNull Map<String, ClassNode> to) throws IOException {
|
||||
@@ -140,6 +187,11 @@ public class AnnotationTest {
|
||||
if (from.isDirectory()) {
|
||||
+ // Paper start - skip packages with @NullMarked
|
||||
+ final File packageInfo = new File(from, "package-info.class");
|
||||
+ if (packageInfo.exists()) {
|
||||
+ try (final FileInputStream in = new FileInputStream(packageInfo)) {
|
||||
+ final ClassReader cr = new ClassReader(in);
|
||||
+
|
||||
+ final ClassNode node = new ClassNode();
|
||||
+ cr.accept(node, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
|
||||
+
|
||||
+ if (isClassNullMarked0(node)) {
|
||||
+ return; // skip packages with @NullMarked
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - skip packages with @NullMarked
|
||||
final File[] files = from.listFiles();
|
||||
assert files != null;
|
||||
|
||||
@@ -125,6 +201,23 @@ public class AnnotationTest {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start - skip class if it's @NullMarked
|
||||
+ private static boolean isClassNullMarked(@NotNull ClassNode clazz, @NotNull Map<String, ClassNode> allClasses) {
|
||||
+ if (clazz.nestHostClass != null) {
|
||||
+ final ClassNode nestHostNode = allClasses.get(clazz.nestHostClass);
|
||||
+ if (nestHostNode != null) {
|
||||
+ return isClassNullMarked0(nestHostNode);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return isClassNullMarked0(clazz);
|
||||
+ }
|
||||
+
|
||||
+ private static boolean isClassNullMarked0(@NotNull ClassNode clazz) {
|
||||
+ return clazz.visibleAnnotations != null && clazz.visibleAnnotations.stream().anyMatch(node -> "Lorg/jspecify/annotations/NullMarked;".equals(node.desc));
|
||||
+ }
|
||||
+ // Paper end - skip class if it's @NullMarked
|
||||
+
|
||||
private static boolean isClassIncluded(@NotNull ClassNode clazz, @NotNull Map<String, ClassNode> allClasses) {
|
||||
// Exclude private, synthetic or deprecated classes and annotations, since their members can't be null
|
||||
if ((clazz.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED | Opcodes.ACC_ANNOTATION)) != 0) {
|
||||
@@ -140,6 +233,11 @@ public class AnnotationTest {
|
||||
// Exceptions are excluded
|
||||
return false;
|
||||
}
|
||||
@@ -179,7 +278,7 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
|
||||
for (String excludedClass : EXCLUDED_CLASSES) {
|
||||
if (excludedClass.equals(clazz.name)) {
|
||||
@@ -152,7 +204,7 @@ public class AnnotationTest {
|
||||
@@ -152,7 +250,7 @@ public class AnnotationTest {
|
||||
|
||||
private static boolean isMethodIncluded(@NotNull ClassNode clazz, @NotNull MethodNode method, @NotNull Map<String, ClassNode> allClasses) {
|
||||
// Exclude private, synthetic and deprecated methods
|
||||
@@ -188,7 +287,7 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -170,11 +222,30 @@ public class AnnotationTest {
|
||||
@@ -170,11 +268,30 @@ public class AnnotationTest {
|
||||
if ("<init>".equals(method.name) && isAnonymous(clazz)) {
|
||||
return false;
|
||||
}
|
||||
@@ -233,10 +332,10 @@ index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b9
|
||||
|
||||
public static Stream<Arguments> data() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 79173d6ed844f1e640e3aa745a9b560ec5e6a2bc..73ec679ac0d1f398b417bd174b47f9af93351e27 100644
|
||||
index c67e0784c043ed194f6acde32411e156412a9b24..eb1fd4b911c4af76cdd3eac85d5365e7941a4a2e 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -61,6 +61,11 @@ public final class TestServer {
|
||||
@@ -83,6 +83,11 @@ public final class TestServer {
|
||||
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
|
||||
when(instance.getUnsafe()).thenReturn(unsafeValues);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Currently includes generated key holder classes for types
|
||||
used in the Registry Modification API
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 75bfb0ab8049ebbb52240abf661d469de5526767..87e4ee95a8da287b02c13fac5f24f66902bc84c9 100644
|
||||
index 73aaa8a341565626556327cda6a73f98c318863a..a214483db535890a4b89e35a8c50cfd709df36d4 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -18,8 +18,8 @@ index 75bfb0ab8049ebbb52240abf661d469de5526767..87e4ee95a8da287b02c13fac5f24f669
|
||||
}
|
||||
|
||||
java {
|
||||
@@ -46,6 +47,22 @@ dependencies {
|
||||
testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
@@ -61,6 +62,22 @@ dependencies {
|
||||
mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
|
||||
}
|
||||
|
||||
+// Paper start
|
||||
@@ -41,7 +41,7 @@ index 75bfb0ab8049ebbb52240abf661d469de5526767..87e4ee95a8da287b02c13fac5f24f669
|
||||
configure<PublishingExtension> {
|
||||
publications.create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
@@ -122,3 +139,14 @@ tasks.check {
|
||||
@@ -143,3 +160,14 @@ tasks.check {
|
||||
dependsOn(scanJar)
|
||||
}
|
||||
// Paper end
|
||||
@@ -85,19 +85,43 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5251f922d2d14da35f61098c11694371f591cd2a
|
||||
index 0000000000000000000000000000000000000000..647f6a1ec1f9d3c203b41f90a99bfd415bf67366
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
@@ -0,0 +1,61 @@
|
||||
@@ -0,0 +1,196 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import net.kyori.adventure.key.Keyed;
|
||||
+import org.bukkit.Art;
|
||||
+import org.bukkit.Fluid;
|
||||
+import org.bukkit.GameEvent;
|
||||
+import org.bukkit.JukeboxSong;
|
||||
+import org.bukkit.MusicInstrument;
|
||||
+import org.bukkit.Particle;
|
||||
+import org.bukkit.Sound;
|
||||
+import org.bukkit.attribute.Attribute;
|
||||
+import org.bukkit.block.Biome;
|
||||
+import org.bukkit.block.BlockType;
|
||||
+import org.bukkit.block.banner.PatternType;
|
||||
+import org.bukkit.damage.DamageType;
|
||||
+import org.bukkit.enchantments.Enchantment;
|
||||
+import org.bukkit.entity.Cat;
|
||||
+import org.bukkit.entity.EntityType;
|
||||
+import org.bukkit.entity.Frog;
|
||||
+import org.bukkit.entity.Villager;
|
||||
+import org.bukkit.entity.Wolf;
|
||||
+import org.bukkit.entity.memory.MemoryKey;
|
||||
+import org.bukkit.generator.structure.Structure;
|
||||
+import org.bukkit.generator.structure.StructureType;
|
||||
+import org.bukkit.inventory.ItemType;
|
||||
+import org.bukkit.inventory.MenuType;
|
||||
+import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
+import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
+import org.bukkit.map.MapCursor;
|
||||
+import org.bukkit.potion.PotionEffectType;
|
||||
+import org.bukkit.potion.PotionType;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+import static io.papermc.paper.registry.RegistryKeyImpl.create;
|
||||
+
|
||||
@@ -114,7 +138,7 @@ index 0000000000000000000000000000000000000000..5251f922d2d14da35f61098c11694371
|
||||
+ * @param <T> the value type
|
||||
+ */
|
||||
+@SuppressWarnings("unused")
|
||||
+@ApiStatus.Experimental
|
||||
+@NullMarked
|
||||
+public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
|
||||
+
|
||||
+ /* ******************* *
|
||||
@@ -130,63 +154,181 @@ index 0000000000000000000000000000000000000000..5251f922d2d14da35f61098c11694371
|
||||
+ * @see io.papermc.paper.registry.keys.StructureTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<StructureType> STRUCTURE_TYPE = create("worldgen/structure_type");
|
||||
+ /**
|
||||
+ * Built-in registry for potion effect types (mob effects).
|
||||
+ * @see io.papermc.paper.registry.keys.MobEffectKeys
|
||||
+ */
|
||||
+ RegistryKey<PotionEffectType> MOB_EFFECT = create("mob_effect");
|
||||
+ /**
|
||||
+ * @apiNote DO NOT USE
|
||||
+ */
|
||||
+ @ApiStatus.Internal
|
||||
+ RegistryKey<BlockType> BLOCK = create("block");
|
||||
+ /**
|
||||
+ * @apiNote DO NOT USE
|
||||
+ */
|
||||
+ @ApiStatus.Internal
|
||||
+ RegistryKey<ItemType> ITEM = create("item");
|
||||
+ /**
|
||||
+ * Built-in registry for cat variants.
|
||||
+ * @see io.papermc.paper.registry.keys.CatVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
|
||||
+ /**
|
||||
+ * Built-in registry for frog variants.
|
||||
+ * @see io.papermc.paper.registry.keys.FrogVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
|
||||
+ /**
|
||||
+ * Built-in registry for villager professions.
|
||||
+ * @see io.papermc.paper.registry.keys.VillagerProfessionKeys
|
||||
+ */
|
||||
+ RegistryKey<Villager.Profession> VILLAGER_PROFESSION = create("villager_profession");
|
||||
+ /**
|
||||
+ * Built-in registry for villager types.
|
||||
+ * @see io.papermc.paper.registry.keys.VillagerTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<Villager.Type> VILLAGER_TYPE = create("villager_type");
|
||||
+ /**
|
||||
+ * Built-in registry for map decoration types.
|
||||
+ * @see io.papermc.paper.registry.keys.MapDecorationTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<MapCursor.Type> MAP_DECORATION_TYPE = create("map_decoration_type");
|
||||
+ /**
|
||||
+ * Built-in registry for menu types.
|
||||
+ * @see io.papermc.paper.registry.keys.MenuTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<MenuType> MENU = create("menu");
|
||||
+ /**
|
||||
+ * Built-in registry for attributes.
|
||||
+ * @see io.papermc.paper.registry.keys.AttributeKeys
|
||||
+ */
|
||||
+ RegistryKey<Attribute> ATTRIBUTE = create("attribute");
|
||||
+ /**
|
||||
+ * Built-in registry for fluids.
|
||||
+ * @see io.papermc.paper.registry.keys.FluidKeys
|
||||
+ */
|
||||
+ RegistryKey<Fluid> FLUID = create("fluid");
|
||||
+ /**
|
||||
+ * Built-in registry for sound events.
|
||||
+ * @see io.papermc.paper.registry.keys.SoundEventKeys
|
||||
+ */
|
||||
+ RegistryKey<Sound> SOUND_EVENT = create("sound_event");
|
||||
+
|
||||
+
|
||||
+
|
||||
+ /* ********************** *
|
||||
+ * Data-driven Registries *
|
||||
+ * ********************** */
|
||||
+ /**
|
||||
+ * Data-driven registry for structure types.
|
||||
+ * Data-driven registry for biomes.
|
||||
+ * @see io.papermc.paper.registry.keys.BiomeKeys
|
||||
+ */
|
||||
+ RegistryKey<Biome> BIOME = create("worldgen/biome");
|
||||
+ /**
|
||||
+ * Data-driven registry for structure types.
|
||||
+ * Data-driven registry for structures.
|
||||
+ * @see io.papermc.paper.registry.keys.StructureKeys
|
||||
+ */
|
||||
+ RegistryKey<Structure> STRUCTURE = create("worldgen/structure");
|
||||
+ /**
|
||||
+ * Data-driven registry for trim materials.
|
||||
+ * @see io.papermc.paper.registry.keys.TrimMaterialKeys
|
||||
+ */
|
||||
+ RegistryKey<TrimMaterial> TRIM_MATERIAL = create("trim_material");
|
||||
+ /**
|
||||
+ * Data-driven registry for structure types.
|
||||
+ * Data-driven registry for trim patterns.
|
||||
+ * @see io.papermc.paper.registry.keys.TrimPatternKeys
|
||||
+ */
|
||||
+ RegistryKey<TrimPattern> TRIM_PATTERN = create("trim_pattern");
|
||||
+ /**
|
||||
+ * Data-driven registry for damage types.
|
||||
+ * @see io.papermc.paper.registry.keys.DamageTypeKeys
|
||||
+ */
|
||||
+ RegistryKey<DamageType> DAMAGE_TYPE = create("damage_type");
|
||||
+ /**
|
||||
+ * Data-driven registry for wolf variants.
|
||||
+ * @see io.papermc.paper.registry.keys.WolfVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Wolf.Variant> WOLF_VARIANT = create("wolf_variant");
|
||||
+ /**
|
||||
+ * Data-driven registry for enchantments.
|
||||
+ * @see io.papermc.paper.registry.keys.EnchantmentKeys
|
||||
+ */
|
||||
+ RegistryKey<Enchantment> ENCHANTMENT = create("enchantment");
|
||||
+ /**
|
||||
+ * Data-driven registry for jukebox songs.
|
||||
+ * @see io.papermc.paper.registry.keys.JukeboxSongKeys
|
||||
+ */
|
||||
+ RegistryKey<JukeboxSong> JUKEBOX_SONG = create("jukebox_song");
|
||||
+ /**
|
||||
+ * Data-driven registry for banner patterns.
|
||||
+ * @see io.papermc.paper.registry.keys.BannerPatternKeys
|
||||
+ */
|
||||
+ RegistryKey<PatternType> BANNER_PATTERN = create("banner_pattern");
|
||||
+ /**
|
||||
+ * Data-driven registry for painting variants.
|
||||
+ * @see io.papermc.paper.registry.keys.PaintingVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Art> PAINTING_VARIANT = create("painting_variant");
|
||||
+ /**
|
||||
+ * Data-driven registry for instruments.
|
||||
+ * @see io.papermc.paper.registry.keys.InstrumentKeys
|
||||
+ */
|
||||
+ RegistryKey<MusicInstrument> INSTRUMENT = create("instrument");
|
||||
+
|
||||
+
|
||||
+ /* ******************* *
|
||||
+ * API-only Registries *
|
||||
+ * ******************* */
|
||||
+ RegistryKey<EntityType> ENTITY_TYPE = create("entity_type");
|
||||
+ RegistryKey<Particle> PARTICLE_TYPE = create("particle_type");
|
||||
+ RegistryKey<PotionType> POTION = create("potion");
|
||||
+ RegistryKey<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type");
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9ad300fa1668cb59bbd85ff8091591db69b8c9dc
|
||||
index 0000000000000000000000000000000000000000..80e3e64f47ac55a4978c9e5b430e2f2d1c871d1b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java
|
||||
@@ -0,0 +1,19 @@
|
||||
@@ -0,0 +1,26 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import com.google.common.collect.Sets;
|
||||
+import java.util.Set;
|
||||
+import net.kyori.adventure.key.Key;
|
||||
+import org.intellij.lang.annotations.Subst;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+import org.jspecify.annotations.Nullable;
|
||||
+
|
||||
+record RegistryKeyImpl<T>(@NotNull Key key) implements RegistryKey<T> {
|
||||
+@NullMarked
|
||||
+record RegistryKeyImpl<T>(Key key) implements RegistryKey<T> {
|
||||
+
|
||||
+ static final Set<RegistryKey<?>> REGISTRY_KEYS = Sets.newIdentityHashSet();
|
||||
+
|
||||
+ static <T> RegistryKey<T> create(@Subst("some_key") final String key) {
|
||||
+ final RegistryKey<T> registryKey = new RegistryKeyImpl<>(Key.key(Key.MINECRAFT_NAMESPACE, key));
|
||||
+ final RegistryKey<T> registryKey = createInternal(key);
|
||||
+ REGISTRY_KEYS.add(registryKey);
|
||||
+ return registryKey;
|
||||
+ }
|
||||
+
|
||||
+ // creates the key without adding to the internal set of keys
|
||||
+ static <T> RegistryKey<T> createInternal(@Subst("some_key") final String key) {
|
||||
+ return new RegistryKeyImpl<>(Key.key(Key.MINECRAFT_NAMESPACE, key));
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/TypedKey.java b/src/main/java/io/papermc/paper/registry/TypedKey.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..271454cd1b92ada4301025b57348ea77da9116a1
|
||||
index 0000000000000000000000000000000000000000..81bee5224196008662ddda528b5dcb8dd7cb9f21
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/TypedKey.java
|
||||
@@ -0,0 +1,44 @@
|
||||
@@ -0,0 +1,45 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import net.kyori.adventure.key.Key;
|
||||
+import net.kyori.adventure.key.Keyed;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Represents a key for a value in a specific registry.
|
||||
@@ -194,7 +336,8 @@ index 0000000000000000000000000000000000000000..271454cd1b92ada4301025b57348ea77
|
||||
+ * @param <T> the value type for the registry
|
||||
+ */
|
||||
+@ApiStatus.Experimental
|
||||
+public sealed interface TypedKey<T> extends Keyed permits TypedKeyImpl {
|
||||
+@NullMarked
|
||||
+public sealed interface TypedKey<T> extends Key permits TypedKeyImpl {
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the key for the value in the registry.
|
||||
@@ -202,7 +345,7 @@ index 0000000000000000000000000000000000000000..271454cd1b92ada4301025b57348ea77
|
||||
+ * @return the value's key
|
||||
+ */
|
||||
+ @Override
|
||||
+ @NotNull Key key();
|
||||
+ Key key();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the registry key for the value this key
|
||||
@@ -210,7 +353,7 @@ index 0000000000000000000000000000000000000000..271454cd1b92ada4301025b57348ea77
|
||||
+ *
|
||||
+ * @return the registry key
|
||||
+ */
|
||||
+ @NotNull RegistryKey<T> registryKey();
|
||||
+ RegistryKey<T> registryKey();
|
||||
+
|
||||
+ /**
|
||||
+ * Create a typed key from a key and a registry key.
|
||||
@@ -221,31 +364,51 @@ index 0000000000000000000000000000000000000000..271454cd1b92ada4301025b57348ea77
|
||||
+ * @return a new key for the value key and registry key
|
||||
+ */
|
||||
+ @ApiStatus.Experimental
|
||||
+ static <T extends Keyed> @NotNull TypedKey<T> create(final @NotNull RegistryKey<T> registryKey, final @NotNull Key key) {
|
||||
+ static <T> TypedKey<T> create(final RegistryKey<T> registryKey, final Key key) {
|
||||
+ return new TypedKeyImpl<>(key, registryKey);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/TypedKeyImpl.java b/src/main/java/io/papermc/paper/registry/TypedKeyImpl.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3c3fd73f7742bb8602e2f9164dd4c1208a412255
|
||||
index 0000000000000000000000000000000000000000..3e29f7007500582cdc3f84b91f11ebeb58f68bbf
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/TypedKeyImpl.java
|
||||
@@ -0,0 +1,8 @@
|
||||
@@ -0,0 +1,23 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import net.kyori.adventure.key.Key;
|
||||
+import net.kyori.adventure.key.Keyed;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+record TypedKeyImpl<T extends Keyed>(@NotNull Key key, @NotNull RegistryKey<T> registryKey) implements TypedKey<T> {
|
||||
+@NullMarked
|
||||
+record TypedKeyImpl<T>(Key key, RegistryKey<T> registryKey) implements TypedKey<T> {
|
||||
+ // Wrap key methods to make this easier to use
|
||||
+ @Override
|
||||
+ public String namespace() {
|
||||
+ return this.key.namespace();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String value() {
|
||||
+ return this.key.value();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String asString() {
|
||||
+ return this.key.asString();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/MinecraftExperimental.java b/src/main/java/org/bukkit/MinecraftExperimental.java
|
||||
index 2365a8c620be709b280fb08855752bb0995838fc..b63e24b3c4d2f1a08e39434caa527bb2e0edea22 100644
|
||||
index a86b87e4c3332202e40e484c3f9c6562b419c70f..e996a758fc1e4ecfec68641733d69665f30792e8 100644
|
||||
--- a/src/main/java/org/bukkit/MinecraftExperimental.java
|
||||
+++ b/src/main/java/org/bukkit/MinecraftExperimental.java
|
||||
@@ -24,4 +24,5 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
})
|
||||
@ApiStatus.Internal
|
||||
public @interface MinecraftExperimental {
|
||||
+ String value() default ""; // Paper
|
||||
@@ -47,5 +47,10 @@ public @interface MinecraftExperimental {
|
||||
@ApiStatus.Internal
|
||||
public enum Requires {
|
||||
|
||||
+ // Paper start
|
||||
+ TRADE_REBALANCE,
|
||||
+ REDSTONE_EXPERIMENTS,
|
||||
+ MINECART_IMPROVEMENTS
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,14 @@ Subject: [PATCH] Add FastUtil to Bukkit
|
||||
Doesn't expose to plugins, just allows Paper-API to use it for optimization
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 75bfb0ab8049ebbb52240abf661d469de5526767..ecba866b84bc5f86a442bf220ab24ed8706aadf9 100644
|
||||
index a214483db535890a4b89e35a8c50cfd709df36d4..e1acfa9abed37e5332edf6b6cf66e3b9b926b366 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -23,6 +23,7 @@ dependencies {
|
||||
@@ -37,6 +37,7 @@ dependencies {
|
||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
isTransitive = false // includes junit
|
||||
}
|
||||
+ api("it.unimi.dsi:fastutil:8.5.6")
|
||||
+ api("it.unimi.dsi:fastutil:8.5.15")
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
+1174
-549
File diff suppressed because it is too large.
Load diff
@@ -6,22 +6,25 @@ Subject: [PATCH] Paper Utils
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java b/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9db0056ab94145819628b3ad8d8d26130d117fcf
|
||||
index 0000000000000000000000000000000000000000..fbcd82b513b4cb9839f9d2b38d9c6c73148e30a6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java
|
||||
@@ -0,0 +1,16 @@
|
||||
@@ -0,0 +1,19 @@
|
||||
+package com.destroystokyo.paper.util;
|
||||
+
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+public class SneakyThrow {
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+public final class SneakyThrow {
|
||||
+
|
||||
+ public static void sneaky(@NotNull Throwable exception) {
|
||||
+ SneakyThrow.<RuntimeException>throwSneaky(exception);
|
||||
+ public static void sneaky(final Throwable exception) {
|
||||
+ SneakyThrow.throwSneaky(exception);
|
||||
+ }
|
||||
+
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ private static <T extends Throwable> void throwSneaky(@NotNull Throwable exception) throws T {
|
||||
+ private static <T extends Throwable> void throwSneaky(final Throwable exception) throws T {
|
||||
+ throw (T) exception;
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -6,143 +6,153 @@ Subject: [PATCH] Use ASM for event executors.
|
||||
Uses method handles for private or static methods.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 2377d476aee8c88d26ca715fdb756dc97749aac8..0c6e0bb90fe5ea29c467323a179a47ec122ba0f6 100644
|
||||
index ed5d58d7569300c917dd52b11953a63fae6878d4..43086f7d201c0988086ef06cfe5a0f866d130961 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -43,6 +43,9 @@ dependencies {
|
||||
@@ -61,6 +61,9 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
+
|
||||
+ implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.4")
|
||||
+ implementation("org.ow2.asm:asm:9.7.1")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5b28e9b1daba7834af67dbc193dd656bedd9a994
|
||||
index 0000000000000000000000000000000000000000..5a702481d28d90cb503faad0d9b9c3231bbff940
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
|
||||
@@ -0,0 +1,42 @@
|
||||
@@ -0,0 +1,46 @@
|
||||
+package com.destroystokyo.paper.event.executor;
|
||||
+
|
||||
+import com.destroystokyo.paper.util.SneakyThrow;
|
||||
+import java.lang.invoke.MethodHandle;
|
||||
+import java.lang.invoke.MethodHandles;
|
||||
+import java.lang.reflect.Method;
|
||||
+
|
||||
+import com.destroystokyo.paper.util.SneakyThrow;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.EventException;
|
||||
+import org.bukkit.event.Listener;
|
||||
+import org.bukkit.plugin.EventExecutor;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+import org.jspecify.annotations.Nullable;
|
||||
+
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+public class MethodHandleEventExecutor implements EventExecutor {
|
||||
+
|
||||
+ private final Class<? extends Event> eventClass;
|
||||
+ private final MethodHandle handle;
|
||||
+
|
||||
+ public MethodHandleEventExecutor(@NotNull Class<? extends Event> eventClass, @NotNull MethodHandle handle) {
|
||||
+ public MethodHandleEventExecutor(final Class<? extends Event> eventClass, final MethodHandle handle) {
|
||||
+ this.eventClass = eventClass;
|
||||
+ this.handle = handle;
|
||||
+ }
|
||||
+
|
||||
+ public MethodHandleEventExecutor(@NotNull Class<? extends Event> eventClass, @NotNull Method m) {
|
||||
+ public MethodHandleEventExecutor(final Class<? extends Event> eventClass, final Method m) {
|
||||
+ this.eventClass = eventClass;
|
||||
+ try {
|
||||
+ m.setAccessible(true);
|
||||
+ this.handle = MethodHandles.lookup().unreflect(m);
|
||||
+ } catch (IllegalAccessException e) {
|
||||
+ } catch (final IllegalAccessException e) {
|
||||
+ throw new AssertionError("Unable to set accessible", e);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
|
||||
+ if (!eventClass.isInstance(event)) return;
|
||||
+ public void execute(final Listener listener, final Event event) throws EventException {
|
||||
+ if (!this.eventClass.isInstance(event)) return;
|
||||
+ try {
|
||||
+ handle.invoke(listener, event);
|
||||
+ } catch (Throwable t) {
|
||||
+ this.handle.invoke(listener, event);
|
||||
+ } catch (final Throwable t) {
|
||||
+ SneakyThrow.sneaky(t);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c83672427324bd068ed52916f700b68446a226f6
|
||||
index 0000000000000000000000000000000000000000..bbdb5b472df116b71c459bdc6cc4b74267ea0f5e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java
|
||||
@@ -0,0 +1,43 @@
|
||||
@@ -0,0 +1,44 @@
|
||||
+package com.destroystokyo.paper.event.executor;
|
||||
+
|
||||
+import com.destroystokyo.paper.util.SneakyThrow;
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import java.lang.invoke.MethodHandle;
|
||||
+import java.lang.invoke.MethodHandles;
|
||||
+import java.lang.reflect.Method;
|
||||
+import java.lang.reflect.Modifier;
|
||||
+
|
||||
+import com.destroystokyo.paper.util.SneakyThrow;
|
||||
+import com.google.common.base.Preconditions;
|
||||
+
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.EventException;
|
||||
+import org.bukkit.event.Listener;
|
||||
+import org.bukkit.plugin.EventExecutor;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+public class StaticMethodHandleEventExecutor implements EventExecutor {
|
||||
+
|
||||
+ private final Class<? extends Event> eventClass;
|
||||
+ private final MethodHandle handle;
|
||||
+
|
||||
+ public StaticMethodHandleEventExecutor(@NotNull Class<? extends Event> eventClass, @NotNull Method m) {
|
||||
+ public StaticMethodHandleEventExecutor(final Class<? extends Event> eventClass, final Method m) {
|
||||
+ Preconditions.checkArgument(Modifier.isStatic(m.getModifiers()), "Not a static method: %s", m);
|
||||
+ Preconditions.checkArgument(eventClass != null, "eventClass is null");
|
||||
+ this.eventClass = eventClass;
|
||||
+ try {
|
||||
+ m.setAccessible(true);
|
||||
+ this.handle = MethodHandles.lookup().unreflect(m);
|
||||
+ } catch (IllegalAccessException e) {
|
||||
+ } catch (final IllegalAccessException e) {
|
||||
+ throw new AssertionError("Unable to set accessible", e);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
|
||||
+ if (!eventClass.isInstance(event)) return;
|
||||
+ public void execute(final Listener listener, final Event event) throws EventException {
|
||||
+ if (!this.eventClass.isInstance(event)) return;
|
||||
+ try {
|
||||
+ handle.invoke(event);
|
||||
+ } catch (Throwable throwable) {
|
||||
+ this.handle.invoke(event);
|
||||
+ } catch (final Throwable throwable) {
|
||||
+ SneakyThrow.sneaky(throwable);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..084c31af1a7ba32bb4c3dc8f16f67fd09ce0b6a4
|
||||
index 0000000000000000000000000000000000000000..abfcb6e8383ff311940d82afe4ff990649a082dc
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
||||
@@ -0,0 +1,54 @@
|
||||
@@ -0,0 +1,59 @@
|
||||
+package com.destroystokyo.paper.event.executor.asm;
|
||||
+
|
||||
+import java.lang.reflect.Method;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+
|
||||
+import org.bukkit.plugin.EventExecutor;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+import org.objectweb.asm.ClassWriter;
|
||||
+import org.objectweb.asm.Type;
|
||||
+import org.objectweb.asm.commons.GeneratorAdapter;
|
||||
+
|
||||
+import static org.objectweb.asm.Opcodes.*;
|
||||
+import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
|
||||
+import static org.objectweb.asm.Opcodes.INVOKEINTERFACE;
|
||||
+import static org.objectweb.asm.Opcodes.INVOKESPECIAL;
|
||||
+import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL;
|
||||
+import static org.objectweb.asm.Opcodes.V1_8;
|
||||
+
|
||||
+public class ASMEventExecutorGenerator {
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+public final class ASMEventExecutorGenerator {
|
||||
+
|
||||
+ private static final String EXECUTE_DESCRIPTOR = "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V";
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static byte[] generateEventExecutor(@NotNull Method m, @NotNull String name) {
|
||||
+ ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
||||
+ writer.visit(V1_8, ACC_PUBLIC, name.replace('.', '/'), null, Type.getInternalName(Object.class), new String[] {Type.getInternalName(EventExecutor.class)});
|
||||
+ public static byte[] generateEventExecutor(final Method m, final String name) {
|
||||
+ final ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
||||
+ writer.visit(V1_8, ACC_PUBLIC, name.replace('.', '/'), null, Type.getInternalName(Object.class), new String[]{Type.getInternalName(EventExecutor.class)});
|
||||
+ // Generate constructor
|
||||
+ GeneratorAdapter methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null), ACC_PUBLIC, "<init>", "()V");
|
||||
+ methodGenerator.loadThis();
|
||||
@@ -170,22 +180,25 @@ index 0000000000000000000000000000000000000000..084c31af1a7ba32bb4c3dc8f16f67fd0
|
||||
+ }
|
||||
+
|
||||
+ public static AtomicInteger NEXT_ID = new AtomicInteger(1);
|
||||
+ @NotNull
|
||||
+
|
||||
+ public static String generateName() {
|
||||
+ int id = NEXT_ID.getAndIncrement();
|
||||
+ final int id = NEXT_ID.getAndIncrement();
|
||||
+ return "com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor" + id;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f79685b48bb581277a6891927988b6f7a4389dc4
|
||||
index 0000000000000000000000000000000000000000..581561fbd32c81ab1774ba8f0b7f3cec9392d99a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -0,0 +1,35 @@
|
||||
+package com.destroystokyo.paper.event.executor.asm;
|
||||
+
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+public interface ClassDefiner {
|
||||
+
|
||||
+ /**
|
||||
@@ -193,7 +206,7 @@ index 0000000000000000000000000000000000000000..f79685b48bb581277a6891927988b6f7
|
||||
+ *
|
||||
+ * @return if classes bypass access checks
|
||||
+ */
|
||||
+ public default boolean isBypassAccessChecks() {
|
||||
+ default boolean isBypassAccessChecks() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
@@ -207,81 +220,79 @@ index 0000000000000000000000000000000000000000..f79685b48bb581277a6891927988b6f7
|
||||
+ * @throws ClassFormatError if the class data is invalid
|
||||
+ * @throws NullPointerException if any of the arguments are null
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Class<?> defineClass(@NotNull ClassLoader parentLoader, @NotNull String name, @NotNull byte[] data);
|
||||
+ Class<?> defineClass(ClassLoader parentLoader, String name, byte[] data);
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static ClassDefiner getInstance() {
|
||||
+ static ClassDefiner getInstance() {
|
||||
+ return SafeClassDefiner.INSTANCE;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ac99477e9f2c08041aeff31abc1d1edee58d0a67
|
||||
index 0000000000000000000000000000000000000000..48bcc72293c2a31b6e2dd2dcd6a79d618c72a137
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java
|
||||
@@ -0,0 +1,66 @@
|
||||
+package com.destroystokyo.paper.event.executor.asm;
|
||||
+
|
||||
+import java.util.concurrent.ConcurrentHashMap;
|
||||
+import java.util.concurrent.ConcurrentMap;
|
||||
+
|
||||
+import com.google.common.base.Preconditions;
|
||||
+
|
||||
+import com.google.common.collect.MapMaker;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.objectweb.asm.Type;
|
||||
+import java.util.concurrent.ConcurrentMap;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+public class SafeClassDefiner implements ClassDefiner {
|
||||
+
|
||||
+ /* default */ static final SafeClassDefiner INSTANCE = new SafeClassDefiner();
|
||||
+
|
||||
+ private SafeClassDefiner() {}
|
||||
+ private SafeClassDefiner() {
|
||||
+ }
|
||||
+
|
||||
+ private final ConcurrentMap<ClassLoader, GeneratedClassLoader> loaders = new MapMaker().weakKeys().makeMap();
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Class<?> defineClass(@NotNull ClassLoader parentLoader, @NotNull String name, @NotNull byte[] data) {
|
||||
+ GeneratedClassLoader loader = loaders.computeIfAbsent(parentLoader, GeneratedClassLoader::new);
|
||||
+ public Class<?> defineClass(final ClassLoader parentLoader, final String name, final byte[] data) {
|
||||
+ final GeneratedClassLoader loader = this.loaders.computeIfAbsent(parentLoader, GeneratedClassLoader::new);
|
||||
+ synchronized (loader.getClassLoadingLock(name)) {
|
||||
+ Preconditions.checkState(!loader.hasClass(name), "%s already defined", name);
|
||||
+ Class<?> c = loader.define(name, data);
|
||||
+ final Class<?> c = loader.define(name, data);
|
||||
+ assert c.getName().equals(name);
|
||||
+ return c;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private static class GeneratedClassLoader extends ClassLoader {
|
||||
+
|
||||
+ static {
|
||||
+ ClassLoader.registerAsParallelCapable();
|
||||
+ }
|
||||
+
|
||||
+ protected GeneratedClassLoader(@NotNull ClassLoader parent) {
|
||||
+ protected GeneratedClassLoader(final ClassLoader parent) {
|
||||
+ super(parent);
|
||||
+ }
|
||||
+
|
||||
+ private Class<?> define(@NotNull String name, byte[] data) {
|
||||
+ synchronized (getClassLoadingLock(name)) {
|
||||
+ assert !hasClass(name);
|
||||
+ Class<?> c = defineClass(name, data, 0, data.length);
|
||||
+ resolveClass(c);
|
||||
+ private Class<?> define(final String name, final byte[] data) {
|
||||
+ synchronized (this.getClassLoadingLock(name)) {
|
||||
+ assert !this.hasClass(name);
|
||||
+ final Class<?> c = this.defineClass(name, data, 0, data.length);
|
||||
+ this.resolveClass(c);
|
||||
+ return c;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ @NotNull
|
||||
+ public Object getClassLoadingLock(@NotNull String name) {
|
||||
+ public Object getClassLoadingLock(final String name) {
|
||||
+ return super.getClassLoadingLock(name);
|
||||
+ }
|
||||
+
|
||||
+ public boolean hasClass(@NotNull String name) {
|
||||
+ synchronized (getClassLoadingLock(name)) {
|
||||
+ public boolean hasClass(final String name) {
|
||||
+ synchronized (this.getClassLoadingLock(name)) {
|
||||
+ try {
|
||||
+ Class.forName(name);
|
||||
+ return true;
|
||||
+ } catch (ClassNotFoundException e) {
|
||||
+ } catch (final ClassNotFoundException e) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -6,25 +6,27 @@ Subject: [PATCH] Add Position
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/math/BlockPosition.java b/src/main/java/io/papermc/paper/math/BlockPosition.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e67020761ded3ac1
|
||||
index 0000000000000000000000000000000000000000..c358bfdefc9bc7598dbd0d89a6b0b8a9408b5bb3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/math/BlockPosition.java
|
||||
@@ -0,0 +1,98 @@
|
||||
@@ -0,0 +1,100 @@
|
||||
+package io.papermc.paper.math;
|
||||
+
|
||||
+import org.bukkit.Axis;
|
||||
+import org.bukkit.block.BlockFace;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.Contract;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * A position represented with integers.
|
||||
+ * <p>
|
||||
+ * <b>May see breaking changes until Experimental annotation is removed.</b>
|
||||
+ *
|
||||
+ * @see FinePosition
|
||||
+ */
|
||||
+@ApiStatus.Experimental
|
||||
+@NullMarked
|
||||
+public interface BlockPosition extends Position {
|
||||
+
|
||||
+ @Override
|
||||
@@ -53,17 +55,17 @@ index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e6702076
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull BlockPosition toBlock() {
|
||||
+ default BlockPosition toBlock() {
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull BlockPosition offset(int x, int y, int z) {
|
||||
+ default BlockPosition offset(final int x, final int y, final int z) {
|
||||
+ return x == 0 && y == 0 && z == 0 ? this : new BlockPositionImpl(this.blockX() + x, this.blockY() + y, this.blockZ() + z);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull FinePosition offset(double x, double y, double z) {
|
||||
+ default FinePosition offset(final double x, final double y, final double z) {
|
||||
+ return new FinePositionImpl(this.blockX() + x, this.blockY() + y, this.blockZ() + z);
|
||||
+ }
|
||||
+
|
||||
@@ -74,7 +76,7 @@ index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e6702076
|
||||
+ * @return the offset block position
|
||||
+ */
|
||||
+ @Contract(value = "_ -> new", pure = true)
|
||||
+ default @NotNull BlockPosition offset(@NotNull BlockFace blockFace) {
|
||||
+ default BlockPosition offset(final BlockFace blockFace) {
|
||||
+ return this.offset(blockFace, 1);
|
||||
+ }
|
||||
+
|
||||
@@ -87,7 +89,7 @@ index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e6702076
|
||||
+ * @return the offset block position
|
||||
+ */
|
||||
+ @Contract(pure = true)
|
||||
+ default @NotNull BlockPosition offset(@NotNull BlockFace blockFace, int amount) {
|
||||
+ default BlockPosition offset(final BlockFace blockFace, final int amount) {
|
||||
+ return amount == 0 ? this : new BlockPositionImpl(this.blockX() + (blockFace.getModX() * amount), this.blockY() + (blockFace.getModY() * amount), this.blockZ() + (blockFace.getModZ() * amount));
|
||||
+ }
|
||||
+
|
||||
@@ -100,7 +102,7 @@ index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e6702076
|
||||
+ * @return the offset block position
|
||||
+ */
|
||||
+ @Contract(pure = true)
|
||||
+ default @NotNull BlockPosition offset(@NotNull Axis axis, int amount) {
|
||||
+ default BlockPosition offset(final Axis axis, final int amount) {
|
||||
+ return amount == 0 ? this : switch (axis) {
|
||||
+ case X -> new BlockPositionImpl(this.blockX() + amount, this.blockY(), this.blockZ());
|
||||
+ case Y -> new BlockPositionImpl(this.blockX(), this.blockY() + amount, this.blockZ());
|
||||
@@ -120,24 +122,25 @@ index 0000000000000000000000000000000000000000..eb5a3f26c7ba56c6715827f52c0013a8
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/math/FinePosition.java b/src/main/java/io/papermc/paper/math/FinePosition.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..d8df70d731573cf2446044925f218876d62fd7cf
|
||||
index 0000000000000000000000000000000000000000..b9c0065d8a9dedc3bd1a2d8bfbedfbc7f952ff93
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/math/FinePosition.java
|
||||
@@ -0,0 +1,56 @@
|
||||
@@ -0,0 +1,57 @@
|
||||
+package io.papermc.paper.math;
|
||||
+
|
||||
+import org.bukkit.util.NumberConversions;
|
||||
+import org.bukkit.util.Vector;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * A position represented with doubles.
|
||||
+ * <p>
|
||||
+ * <b>May see breaking changes until Experimental annotation is removed.</b>
|
||||
+ *
|
||||
+ * @see BlockPosition
|
||||
+ */
|
||||
+@ApiStatus.Experimental
|
||||
+@NullMarked
|
||||
+public interface FinePosition extends Position {
|
||||
+
|
||||
+ @Override
|
||||
@@ -166,17 +169,17 @@ index 0000000000000000000000000000000000000000..d8df70d731573cf2446044925f218876
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull BlockPosition toBlock() {
|
||||
+ default BlockPosition toBlock() {
|
||||
+ return new BlockPositionImpl(this.blockX(), this.blockY(), this.blockZ());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull FinePosition offset(int x, int y, int z) {
|
||||
+ default FinePosition offset(final int x, final int y, final int z) {
|
||||
+ return this.offset((double) x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull FinePosition offset(double x, double y, double z) {
|
||||
+ default FinePosition offset(final double x, final double y, final double z) {
|
||||
+ return x == 0.0 && y == 0.0 && z == 0.0 ? this : new FinePositionImpl(this.x() + x, this.y() + y, this.z() + z);
|
||||
+ }
|
||||
+}
|
||||
@@ -192,10 +195,10 @@ index 0000000000000000000000000000000000000000..93476aaf8d21efb5a30b6d2cc2eeda81
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/math/Position.java b/src/main/java/io/papermc/paper/math/Position.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d9f242740
|
||||
index 0000000000000000000000000000000000000000..0e6a6a6738353b118e0ed093994dda06750700c4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/math/Position.java
|
||||
@@ -0,0 +1,191 @@
|
||||
@@ -0,0 +1,192 @@
|
||||
+package io.papermc.paper.math;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
@@ -203,7 +206,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+import org.bukkit.util.Vector;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.Contract;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Common interface for {@link FinePosition} and {@link BlockPosition}.
|
||||
@@ -211,6 +214,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * <b>May see breaking changes until Experimental annotation is removed.</b>
|
||||
+ */
|
||||
+@ApiStatus.Experimental
|
||||
+@NullMarked
|
||||
+public interface Position {
|
||||
+
|
||||
+ FinePosition FINE_ZERO = new FinePositionImpl(0, 0, 0);
|
||||
@@ -287,7 +291,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @param z z value to offset
|
||||
+ * @return the offset position
|
||||
+ */
|
||||
+ @NotNull Position offset(int x, int y, int z);
|
||||
+ Position offset(int x, int y, int z);
|
||||
+
|
||||
+ /**
|
||||
+ * Returns a position offset by the specified amounts.
|
||||
@@ -297,7 +301,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @param z z value to offset
|
||||
+ * @return the offset position
|
||||
+ */
|
||||
+ @NotNull FinePosition offset(double x, double y, double z);
|
||||
+ FinePosition offset(double x, double y, double z);
|
||||
+
|
||||
+ /**
|
||||
+ * Returns a new position at the center of the block position this represents
|
||||
@@ -305,7 +309,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a new center position
|
||||
+ */
|
||||
+ @Contract(value = "-> new", pure = true)
|
||||
+ default @NotNull FinePosition toCenter() {
|
||||
+ default FinePosition toCenter() {
|
||||
+ return new FinePositionImpl(this.blockX() + 0.5, this.blockY() + 0.5, this.blockZ() + 0.5);
|
||||
+ }
|
||||
+
|
||||
@@ -316,7 +320,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return the block position
|
||||
+ */
|
||||
+ @Contract(pure = true)
|
||||
+ @NotNull BlockPosition toBlock();
|
||||
+ BlockPosition toBlock();
|
||||
+
|
||||
+ /**
|
||||
+ * Converts this position to a vector
|
||||
@@ -324,7 +328,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a new vector
|
||||
+ */
|
||||
+ @Contract(value = "-> new", pure = true)
|
||||
+ default @NotNull Vector toVector() {
|
||||
+ default Vector toVector() {
|
||||
+ return new Vector(this.x(), this.y(), this.z());
|
||||
+ }
|
||||
+
|
||||
@@ -335,7 +339,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a new location
|
||||
+ */
|
||||
+ @Contract(value = "_ -> new", pure = true)
|
||||
+ default @NotNull Location toLocation(@NotNull World world) {
|
||||
+ default Location toLocation(final World world) {
|
||||
+ return new Location(world, this.x(), this.y(), this.z());
|
||||
+ }
|
||||
+
|
||||
@@ -348,7 +352,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a position with those coords
|
||||
+ */
|
||||
+ @Contract(value = "_, _, _ -> new", pure = true)
|
||||
+ static @NotNull BlockPosition block(int x, int y, int z) {
|
||||
+ static BlockPosition block(final int x, final int y, final int z) {
|
||||
+ return new BlockPositionImpl(x, y, z);
|
||||
+ }
|
||||
+
|
||||
@@ -359,7 +363,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a new position at that location
|
||||
+ */
|
||||
+ @Contract(value = "_ -> new", pure = true)
|
||||
+ static @NotNull BlockPosition block(@NotNull Location location) {
|
||||
+ static BlockPosition block(final Location location) {
|
||||
+ return new BlockPositionImpl(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||
+ }
|
||||
+
|
||||
@@ -372,7 +376,7 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a position with those coords
|
||||
+ */
|
||||
+ @Contract(value = "_, _, _ -> new", pure = true)
|
||||
+ static @NotNull FinePosition fine(double x, double y, double z) {
|
||||
+ static FinePosition fine(final double x, final double y, final double z) {
|
||||
+ return new FinePositionImpl(x, y, z);
|
||||
+ }
|
||||
+
|
||||
@@ -383,12 +387,12 @@ index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d
|
||||
+ * @return a new position at that location
|
||||
+ */
|
||||
+ @Contract(value = "_ -> new", pure = true)
|
||||
+ static @NotNull FinePosition fine(@NotNull Location location) {
|
||||
+ static FinePosition fine(final Location location) {
|
||||
+ return new FinePositionImpl(location.getX(), location.getY(), location.getZ());
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 7c4db051472fb6a6c6d24092dc6f75487356690a..85c342fc50f2fe0ce9a1b3980df9e088c3dea92d 100644
|
||||
index 734054f1e8dad74c13d7ae0b1c1af2d9f45b2636..bc8a64d54e001eae6ef4520a49e261b96c5ae9f3 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
Loaded 100 of 3285 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user