Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1379401f7 | ||
|
|
4f5752a20c | ||
|
|
c6ba52f798 | ||
|
|
0075578446 | ||
|
|
dbd131a284 | ||
|
|
0a2ba5ecfa | ||
|
|
151115439a | ||
|
|
bd04571298 | ||
|
|
74deb277e3 | ||
|
|
cdb56e56df | ||
|
|
88deb63e3c | ||
|
|
dfdeedffdb | ||
|
|
86926378e8 | ||
|
|
6571400d83 | ||
|
|
e3fa7ecdda | ||
|
|
08c752e71f | ||
|
|
9d6b3b2838 | ||
|
|
624e878eea | ||
|
|
90511f21ba | ||
|
|
63e8f45a12 | ||
|
|
5b56354abb | ||
|
|
f2ef4b5a11 | ||
|
|
218593b1c6 | ||
|
|
79dff13f5c | ||
|
|
8a60631651 | ||
|
|
b62913f90d | ||
|
|
9a1326b4bf | ||
|
|
e550736821 | ||
|
|
ff1b858a70 | ||
|
|
74b0cf9a5e | ||
|
|
7c27ea276a | ||
|
|
57f9aaeb55 | ||
|
|
62f31c6921 | ||
|
|
6bf50e89b7 | ||
|
|
6137c57b2e | ||
|
|
eecd9e4a59 | ||
|
|
1bda25ef76 | ||
|
|
e0044f1a00 | ||
|
|
7d4527c058 | ||
|
|
bfa0e6282e | ||
|
|
42c8fc1f9e | ||
|
|
86a557ac45 | ||
|
|
1a127c1562 | ||
|
|
a5da3a2372 | ||
|
|
49f4972b97 | ||
|
|
395e66fb84 | ||
|
|
ef53e831e8 | ||
|
|
fe5d1e1c79 | ||
|
|
d44d429520 | ||
|
|
7f9a75506a | ||
|
|
1a64f6f154 | ||
|
|
ea2f7cd6ba | ||
|
|
27c11df76c | ||
|
|
2fadb3a481 | ||
|
|
23732af8f2 | ||
|
|
0fe2ea6007 | ||
|
|
630be93a7d | ||
|
|
a67ea23c9c | ||
|
|
eedaea6e0a | ||
|
|
fdec6d9317 | ||
|
|
828ae45034 | ||
|
|
6a8f113376 | ||
|
|
b8c90bb50d | ||
|
|
0a4be7f153 | ||
|
|
fb523dbfcc | ||
|
|
a8fe2e22a5 | ||
|
|
1921c56910 | ||
|
|
64d6f0a1f5 | ||
|
|
15c1922b30 | ||
|
|
06a55a7a50 | ||
|
|
0ff21a3928 | ||
|
|
2313da4108 | ||
|
|
7e446fad6d | ||
|
|
5bf8546579 | ||
|
|
c33eb67c1d | ||
|
|
e5f746f711 | ||
|
|
4a51e50e64 | ||
|
|
f4d525510a | ||
|
|
ce2f390bdd | ||
|
|
c185e2dca8 | ||
|
|
cf71965938 | ||
|
|
fcdf992557 | ||
|
|
727c215f9d | ||
|
|
c327d6f72b | ||
|
|
c8ac83787a | ||
|
|
f15a98df37 | ||
|
|
18b3843015 | ||
|
|
6fa05ed2c7 | ||
|
|
4b004b6fc7 | ||
|
|
013a7e8a7d | ||
|
|
3f584a1767 | ||
|
|
3051a487a6 | ||
|
|
ece9e19877 | ||
|
|
f8f170adf5 | ||
|
|
d7f5194651 | ||
|
|
8d586d5724 | ||
|
|
ceb637a059 | ||
|
|
6f84815da7 | ||
|
|
b984785c57 | ||
|
|
63cb6d8e4e | ||
|
|
7102e2bc81 | ||
|
|
7499e1c1f4 | ||
|
|
9bfc546418 | ||
|
|
3e0286464a | ||
|
|
11d438ebd1 | ||
|
|
445d08d90b | ||
|
|
b73daf6531 | ||
|
|
a22d82a306 | ||
|
|
e45e331901 | ||
|
|
5ef27ba90d | ||
|
|
14f4ca3f7c | ||
|
|
fbc6a7455b | ||
|
|
08a44cd3e1 | ||
|
|
4aa0494fc7 | ||
|
|
825c0e0cb7 | ||
|
|
d98bdc4046 | ||
|
|
9eaa65f122 | ||
|
|
bac5155ba2 | ||
|
|
d2a05a1f8a | ||
|
|
c0420d1e9a | ||
|
|
c8279a73ad | ||
|
|
7e8cba3644 | ||
|
|
4b021b8cd7 | ||
|
|
0626ee2282 | ||
|
|
23080adb85 | ||
|
|
0f35a2b4e6 | ||
|
|
a5921c1b80 | ||
|
|
f8ef988820 | ||
|
|
5f9e6648e2 | ||
|
|
0a1b158e79 | ||
|
|
3c1268b8c1 | ||
|
|
08ee588b10 | ||
|
|
3b6aa49a1f | ||
|
|
ce04ec3589 | ||
|
|
bc0d8992b8 | ||
|
|
6368da9fe0 | ||
|
|
3c16fc212a | ||
|
|
767dbbb413 | ||
|
|
fa54226c7d | ||
|
|
0962fb4de7 | ||
|
|
faaab15329 | ||
|
|
cd9c97fa43 | ||
|
|
e9aafd99e3 | ||
|
|
54cbdc5096 | ||
|
|
3b3fe09036 | ||
|
|
5457d9a89f | ||
|
|
66fc488f3e | ||
|
|
71c311f619 | ||
|
|
6285c3f153 | ||
|
|
2b4131fab4 | ||
|
|
e0bfaefc69 | ||
|
|
c73d337461 | ||
|
|
2c1c0953bf | ||
|
|
fc6beb3481 | ||
|
|
ae8cb74af0 | ||
|
|
3217c349b4 | ||
|
|
9599bd1636 | ||
|
|
17358af49e | ||
|
|
42308910b9 | ||
|
|
b213efa245 | ||
|
|
58aefbbb1f | ||
|
|
45f9006be2 | ||
|
|
934275b57b | ||
|
|
9dd81f7653 | ||
|
|
b6b220fab6 | ||
|
|
02ef80886e | ||
|
|
33b604d3e2 | ||
|
|
369ae9c0b9 | ||
|
|
2c3959eecd | ||
|
|
d01ed60c18 | ||
|
|
20ffeeecba | ||
|
|
4309f3e272 | ||
|
|
4a55026487 | ||
|
|
24e1052176 | ||
|
|
035270de31 | ||
|
|
d8505053f6 | ||
|
|
f26cccf312 | ||
|
|
3b91d5445a | ||
|
|
f23cb5f91a | ||
|
|
e568dfc3ac | ||
|
|
485339cd30 | ||
|
|
d88c65b0e9 | ||
|
|
608975173c | ||
|
|
cc3ffef49d | ||
|
|
d6a2058b28 | ||
|
|
60e73b40ed | ||
|
|
4091c6b4b5 | ||
|
|
e3a6bf3075 | ||
|
|
1637bb1b42 | ||
|
|
9a0306a8b5 | ||
|
|
3f1c767577 | ||
|
|
d9c12b8830 | ||
|
|
f29b88d8e1 | ||
|
|
4792d93341 | ||
|
|
e10d7518c5 | ||
|
|
9652615d27 | ||
|
|
e70a611bb0 | ||
|
|
3901403e0b | ||
|
|
a6279bc8b3 | ||
|
|
ed111d1b49 | ||
|
|
7c22863b18 | ||
|
|
2e9a458786 | ||
|
|
942a6a4978 | ||
|
|
d76f0374ac | ||
|
|
56b914f6c0 | ||
|
|
6be4ca3ad6 | ||
|
|
4b8381cc5a | ||
|
|
f58c07abb4 | ||
|
|
9be38ece95 | ||
|
|
b86311f7b5 | ||
|
|
68c8756e31 | ||
|
|
3bf53ad663 | ||
|
|
333bdd78cd | ||
|
|
3cf5147d05 | ||
|
|
fc7dc79343 | ||
|
|
d303b4ffe3 | ||
|
|
8720c10777 | ||
|
|
e3a58917c5 | ||
|
|
153496032f | ||
|
|
ec2bdd62cf | ||
|
|
ea5018e690 | ||
|
|
8fa2289ea1 | ||
|
|
ecc609d616 | ||
|
|
0eb0eacb15 | ||
|
|
836c0404d9 | ||
|
|
e24e9a00f4 | ||
|
|
f5c1d2d899 | ||
|
|
758cbced56 | ||
|
|
8e7d5f42a4 | ||
|
|
3730f200f7 | ||
|
|
1933615d07 | ||
|
|
7429648ea2 | ||
|
|
583ae5e636 | ||
|
|
317d8534cb | ||
|
|
271c579bbd | ||
|
|
e084b31fc5 | ||
|
|
0a75a528d6 | ||
|
|
499dfde8d0 | ||
|
|
49dc56e9c5 | ||
|
|
0d7b75af9d | ||
|
|
6aee79ab40 | ||
|
|
4578bc5d41 | ||
|
|
1684cd70d9 | ||
|
|
0515bd83c3 | ||
|
|
94e2467513 | ||
|
|
da199cb6ab | ||
|
|
650cd628c7 | ||
|
|
f7e17ad9c9 | ||
|
|
2e69527175 | ||
|
|
3db69e3225 | ||
|
|
ce6317e36d | ||
|
|
e4d2b59837 | ||
|
|
cdbd004a97 | ||
|
|
bac73d3868 | ||
|
|
d0ecce88ce | ||
|
|
e5c09aeccf | ||
|
|
38a9742d71 | ||
|
|
4b9b83cc13 | ||
|
|
80ad435e1c | ||
|
|
0decfbfc26 | ||
|
|
81540fdef6 | ||
|
|
388ddb046c | ||
|
|
8827f6835d | ||
|
|
655213ac70 | ||
|
|
127ea8da6c | ||
|
|
b64bfafdbe | ||
|
|
09d8e523b6 | ||
|
|
4eb79f62fc | ||
|
|
59a00e89fa | ||
|
|
5301878f72 | ||
|
|
a1b158c308 | ||
|
|
48d1055aa9 | ||
|
|
6b6b698eb3 | ||
|
|
31b6e17257 | ||
|
|
f8d81ed905 | ||
|
|
4976780639 | ||
|
|
19d4bd279b | ||
|
|
e7a96d95f7 | ||
|
|
fbf2823bca | ||
|
|
7d5f13f396 | ||
|
|
30e7e3a1ad | ||
|
|
23fef40ea2 | ||
|
|
1e976b15a6 | ||
|
|
2710e4efc2 | ||
|
|
bbe4cd3932 | ||
|
|
87b451f0d5 | ||
|
|
cd26b8f21c | ||
|
|
d829285b30 | ||
|
|
5658818936 | ||
|
|
9a44393c07 | ||
|
|
43e74f9ed1 | ||
|
|
565f43c813 | ||
|
|
babbbe699a | ||
|
|
356de838ad | ||
|
|
bd0771132e | ||
|
|
8b5428e8bf | ||
|
|
e472303e25 | ||
|
|
f948eac755 | ||
|
|
640f0edb33 | ||
|
|
f4f8dda776 | ||
|
|
0413bd298f | ||
|
|
cdeadf66a3 | ||
|
|
2f20d26cb4 | ||
|
|
c790591662 | ||
|
|
da76f2ecc7 | ||
|
|
1557acdc24 | ||
|
|
8d64ae8162 | ||
|
|
e81445eac1 | ||
|
|
088c1a4a62 | ||
|
|
d88498e580 | ||
|
|
b4780bb3b1 | ||
|
|
9540c09065 | ||
|
|
1f8fb2ebdc | ||
|
|
a01532d724 | ||
|
|
0d53dbbabe | ||
|
|
d01af6c15e | ||
|
|
3dc092d926 | ||
|
|
46de91484b | ||
|
|
ef6413014c | ||
|
|
13b71571ac | ||
|
|
6d4605bb99 | ||
|
|
d9361f58a1 | ||
|
|
e6cc623b30 | ||
|
|
e8e2d5ce8e | ||
|
|
5a48c77d63 | ||
|
|
7ccce6c0c1 | ||
|
|
325a577771 | ||
|
|
3580c9ba09 | ||
|
|
4530884842 | ||
|
|
15ab7f65b0 | ||
|
|
6fa045cccb | ||
|
|
2883c846c4 | ||
|
|
5cc058fa7b | ||
|
|
fa1aae7111 | ||
|
|
73e5ec7bd7 | ||
|
|
ccef030997 | ||
|
|
429b3db54b | ||
|
|
ff52130810 | ||
|
|
4bd73350ef | ||
|
|
9f439c2582 | ||
|
|
5493325d06 | ||
|
|
2d56c547d7 | ||
|
|
62d2900123 | ||
|
|
701dc063f8 | ||
|
|
de1bb4b5b1 | ||
|
|
3a90cf3ad8 | ||
|
|
e01df91369 | ||
|
|
4601554c47 | ||
|
|
452bbe6226 | ||
|
|
403f705728 | ||
|
|
cc91389a49 | ||
|
|
38856d7433 | ||
|
|
0b40bd0de3 | ||
|
|
806af005c4 | ||
|
|
682012dd91 | ||
|
|
c3b7ca3699 | ||
|
|
03eedca000 | ||
|
|
236f63d22e | ||
|
|
46cb3ef3fa | ||
|
|
c7526dfb96 | ||
|
|
d34e6a94df | ||
|
|
584d38263a | ||
|
|
064222d0a5 | ||
|
|
55c4e2f01d | ||
|
|
ec3450545d | ||
|
|
adf02d3573 | ||
|
|
c6cf519425 | ||
|
|
322dcd64da | ||
|
|
e3b1aa6963 | ||
|
|
ce10239322 | ||
|
|
0dddf041f6 | ||
|
|
aa04474158 | ||
|
|
84d953d096 | ||
|
|
8677a93582 | ||
|
|
a780c6d15a | ||
|
|
fc035ed96e | ||
|
|
41bb5cb028 | ||
|
|
9c6d7a43db | ||
|
|
8d3461dbdb | ||
|
|
bdb153986b | ||
|
|
6b49f4af87 | ||
|
|
751deaa83b | ||
|
|
08aeb5259a | ||
|
|
f0707cca0d | ||
|
|
f7b04bdee1 | ||
|
|
e99be29acb | ||
|
|
3db091dff1 | ||
|
|
16dcad28ab | ||
|
|
d795b82108 | ||
|
|
e0b6543ed6 | ||
|
|
ab2d8f5192 | ||
|
|
0f76512e9a | ||
|
|
96d3576fa3 | ||
|
|
fadd81d116 | ||
|
|
9016c479de | ||
|
|
93bf15306d | ||
|
|
345f6bd573 | ||
|
|
d82b7e0901 | ||
|
|
d478cc4fb1 | ||
|
|
2666c6e93e | ||
|
|
25de61e890 | ||
|
|
5829ec8e21 | ||
|
|
53f5e75b9f | ||
|
|
c119511760 | ||
|
|
262ccb396e | ||
|
|
760a04cc41 | ||
|
|
d5b96d66bf | ||
|
|
8baf76842d | ||
|
|
1bb8bb68ad | ||
|
|
1656ac52ac | ||
|
|
7ff59b98ff | ||
|
|
ab36eb13b2 | ||
|
|
0b48ca783d | ||
|
|
44732dfc6c | ||
|
|
80e114e707 | ||
|
|
efa0e1a823 | ||
|
|
5ad2a7060a | ||
|
|
800dfaeed7 | ||
|
|
be1c12f8cb | ||
|
|
3dabe5853d | ||
|
|
3891f38763 | ||
|
|
9d10b67ac1 | ||
|
|
64dfbe0522 | ||
|
|
4702c3ace7 | ||
|
|
28a9235c07 | ||
|
|
0d51bd1a64 | ||
|
|
5cc0188879 | ||
|
|
b1cec4176c | ||
|
|
d5d8229bc6 | ||
|
|
5a11687e56 | ||
|
|
ea176bd20d | ||
|
|
a70395f6db | ||
|
|
46d0012f02 | ||
|
|
28bdebac4a | ||
|
|
d730bfac06 | ||
|
|
b850088957 | ||
|
|
3d2c0569c9 | ||
|
|
2315d1e808 | ||
|
|
060621f286 | ||
|
|
efa9290731 | ||
|
|
baf7d522e4 | ||
|
|
a45721401c | ||
|
|
7633cb3008 | ||
|
|
a45adf6310 | ||
|
|
652030943c | ||
|
|
011eb434e4 | ||
|
|
44a6de35f0 | ||
|
|
31fb8ee1e1 | ||
|
|
67dd8b39f2 | ||
|
|
6ea6ea3f95 | ||
|
|
70e580bce1 | ||
|
|
1b55dc8080 | ||
|
|
a29fc26a02 | ||
|
|
dbd0be8460 | ||
|
|
07dcf7b26e | ||
|
|
16c3780e29 | ||
|
|
485f021cae | ||
|
|
a46743bd0b | ||
|
|
5c5242775a | ||
|
|
221edfcf2c | ||
|
|
b7479375ee | ||
|
|
de071f7390 | ||
|
|
9df3e93fba | ||
|
|
70c335680a | ||
|
|
e770016aa2 | ||
|
|
735ce73fe9 | ||
|
|
56ad5cbacd | ||
|
|
511f6e68da | ||
|
|
00744f04ab | ||
|
|
c5d51bb34e | ||
|
|
ab7341e117 | ||
|
|
b96e005611 | ||
|
|
56ed56fd8f | ||
|
|
3fedd7b6fd | ||
|
|
c43d5c2a33 | ||
|
|
20b26f918a | ||
|
|
474f4a06ad | ||
|
|
18a169576e | ||
|
|
2f987749ce | ||
|
|
b7c2e7705a | ||
|
|
e79be758bb | ||
|
|
015fc48e8e | ||
|
|
1432c2adf4 | ||
|
|
353f9b351d | ||
|
|
bbaa7911b0 | ||
|
|
e4d277812e | ||
|
|
ba90cd8f61 | ||
|
|
264616aec3 | ||
|
|
36c4317fd1 | ||
|
|
4ac9faf0bb | ||
|
|
366ad3c13e | ||
|
|
c5d7d87a90 | ||
|
|
ee63003d13 | ||
|
|
6760bedf87 | ||
|
|
1a6eab9350 | ||
|
|
08f901a630 | ||
|
|
14648a8d28 | ||
|
|
933d8de6ad | ||
|
|
8658d8877b | ||
|
|
4d416ed124 | ||
|
|
a368a23aa8 | ||
|
|
6a9232c534 | ||
|
|
085529db28 | ||
|
|
793c3813c6 | ||
|
|
4d88cd3b76 | ||
|
|
1c7301f75f | ||
|
|
5f987e5565 | ||
|
|
a7b87383c4 | ||
|
|
38b73c336a | ||
|
|
677a9dc03b | ||
|
|
fd4c1a5a72 | ||
|
|
0227510baf | ||
|
|
25161c65aa | ||
|
|
4b8a065a74 | ||
|
|
291999a6ec | ||
|
|
0024214abf | ||
|
|
808cdd1ae1 | ||
|
|
ac7476bc8e | ||
|
|
42c18d8c2b | ||
|
|
50a55e26d7 | ||
|
|
51fd8ce538 | ||
|
|
4f2399bae6 | ||
|
|
0f04426670 | ||
|
|
2ed4747d8a | ||
|
|
7e4b97993a | ||
|
|
66b4fdea18 | ||
|
|
1d5145d8c9 | ||
|
|
52d675e38e | ||
|
|
1a53777c46 | ||
|
|
65b3f1f331 | ||
|
|
74ebac0550 | ||
|
|
be89cb3b2d | ||
|
|
d866d62bfa | ||
|
|
6d28101287 | ||
|
|
bd22800601 | ||
|
|
2829cd6fab | ||
|
|
1f10dbf6ae | ||
|
|
c4b72dc4f4 | ||
|
|
3b6c62faee | ||
|
|
c456787b7a | ||
|
|
3e8ce09bc1 | ||
|
|
552d388a55 | ||
|
|
0545f77374 | ||
|
|
1ef2a5b502 | ||
|
|
33bd3427b3 | ||
|
|
e43b0e13c1 | ||
|
|
c8ba78e3b0 | ||
|
|
9f4bc8a4cf | ||
|
|
339549a377 | ||
|
|
c6eae1915a | ||
|
|
b703aca16c | ||
|
|
15e658f326 | ||
|
|
65fa379a5a | ||
|
|
072ad58fdb | ||
|
|
7ada021233 | ||
|
|
eb9d9dc8dc | ||
|
|
363831f95d | ||
|
|
656d55e007 | ||
|
|
f72bef828e | ||
|
|
9adf12fba1 | ||
|
|
c55290d39a | ||
|
|
773978715a | ||
|
|
9869b30eaa | ||
|
|
e60e387991 | ||
|
|
d5cc3612e5 | ||
|
|
5e17e63759 | ||
|
|
6b5b5fa9b2 | ||
|
|
102b667932 | ||
|
|
422fcd2de6 | ||
|
|
a81df651d2 | ||
|
|
27fc5c7946 | ||
|
|
42e6d3db15 | ||
|
|
e979be21cd | ||
|
|
022a5f0210 | ||
|
|
df3bf2fc88 | ||
|
|
5acd936fbc | ||
|
|
eeb844a6e6 | ||
|
|
6a7dbdd20b | ||
|
|
e9cb6bf743 | ||
|
|
19b649e46e | ||
|
|
8514e9d740 | ||
|
|
df30b6f27c | ||
|
|
44a2ce639c | ||
|
|
6790e24aed | ||
|
|
c02a12039e | ||
|
|
be4afe9414 | ||
|
|
769eeb2142 | ||
|
|
aade1bc8b0 | ||
|
|
1967397426 | ||
|
|
9065936218 | ||
|
|
de8950595b | ||
|
|
3e04ed35f2 | ||
|
|
76157d4f4c | ||
|
|
1ccc76ca08 | ||
|
|
ddce3ed908 | ||
|
|
6fcc56f0e3 | ||
|
|
1e4149e8f0 | ||
|
|
8f8d58bc02 | ||
|
|
579febeb32 | ||
|
|
8ef1bfc37b | ||
|
|
46b21d4b5c | ||
|
|
82ee615e1d | ||
|
|
64ba5546d9 | ||
|
|
a3aac61e3f | ||
|
|
9d18c7fd9a | ||
|
|
6f18fbe8ae | ||
|
|
8b7fa96d4f |
No files matched your search
@@ -1,55 +1,72 @@
|
||||
# Using Cloud Command Framework
|
||||
BKCommonLib shades in a custom fork of the [Cloud Command Framework](https://github.com/bergerhealer/cloud "Cloud Command Framework") library so that depending plugins can use it. If you are new to Cloud, look through their [documentation](https://incendo.github.io/cloud/ "documentation") first.
|
||||
BKCommonLib shades in the [Cloud Command Framework](https://github.com/Incendo/cloud "Cloud Command Framework") library so that depending plugins can use it. If you are new to Cloud, look through their [documentation](https://cloud.incendo.org/ "documentation") first.
|
||||
|
||||
### Technical
|
||||
Cloud is shaded at a different package path (to avoid conflicts), so using the integrated cloud requires remapping it using the maven shade or gradle shadow plugin. BKCommonLib has a BOM (Bill of materials) hosted on the same repository BKCommonLib is, that includes information about the cloud dependency and its version. The below maven and gradle configurations make use of this.
|
||||
|
||||
Incendo Cloud jars can be found on the maven central repository, so they should be available automatically. The ci.mg-dev.eu repository proxies and caches the Cloud dependencies too.
|
||||
|
||||
### Version
|
||||
Currently the 1.6.0 release of Cloud is included.
|
||||
Currently the 2.0.0 beta/release-candidate of Cloud is included.
|
||||
|
||||
### Maven
|
||||
The bergerhealer cloud fork is hosted on the same repository as BKCommonLib:
|
||||
BKCommonLib has a BOM (Bill of materials) hosted on the same repository BKCommonLib is, that includes information about the cloud dependency and its version. The below snippets are for your project's `pom.xml`.
|
||||
|
||||
Begin by adding the repository where BKCommonLib is hosted:
|
||||
```xml
|
||||
<repository>
|
||||
<id>MG-Dev Jenkins CI Maven Repository</id>
|
||||
<url>https://ci.mg-dev.eu/plugin/repository/everything</url>
|
||||
</repository>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>MG-Dev Jenkins CI Maven Repository</id>
|
||||
<url>https://ci.mg-dev.eu/plugin/repository/everything</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
```
|
||||
Depend on BKCommonLib and the (fork) cloud command framework libraries:
|
||||
Next, add BKCommonLib-bom under **dependencyManagement** (!). This automatically loads the information about what cloud version and its dependencies are used for a particular version of BKCommonLib. Next just add all the dependencies without specifying the version. The version is taken from the bom.
|
||||
```xml
|
||||
<properties>
|
||||
<project.bkcommonlib.version>1.19.2-v2</project.bkcommonlib.version>
|
||||
<project.cloud.version>1.8.0-SNAPSHOT</project.cloud.version>
|
||||
<project.bkcommonlib.version>1.21.1-v1</project.bkcommonlib.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.bergerkiller.bukkit</groupId>
|
||||
<artifactId>BKCommonLib-bom</artifactId>
|
||||
<version>${project.bkcommonlib.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.bergerkiller.bukkit</groupId>
|
||||
<artifactId>BKCommonLib</artifactId>
|
||||
<version>${project.bkcommonlib.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Cloud Command Framework -->
|
||||
<dependency>
|
||||
<groupId>org.bergerhealer.cloud.commandframework</groupId>
|
||||
<groupId>org.incendo</groupId>
|
||||
<artifactId>cloud-paper</artifactId>
|
||||
<version>${project.cloud.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bergerhealer.cloud.commandframework</groupId>
|
||||
<groupId>org.incendo</groupId>
|
||||
<artifactId>cloud-annotations</artifactId>
|
||||
<version>${project.cloud.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bergerhealer.cloud.commandframework</groupId>
|
||||
<groupId>org.incendo</groupId>
|
||||
<artifactId>cloud-minecraft-extras</artifactId>
|
||||
<version>${project.cloud.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
However, the library and its dependencies are shaded in at a different package than normal. So, you will have to include the maven shade plugin in your project to relocate them. Not doing so will cause a failure at runtime.
|
||||
```xml
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Relocates references to the Cloud command framework to where they are in BKCommonLib -->
|
||||
<plugin>
|
||||
@@ -69,7 +86,7 @@ However, the library and its dependencies are shaded in at a different package t
|
||||
<relocations>
|
||||
<!-- BKCommonLib relocations of Cloud command framework -->
|
||||
<relocation>
|
||||
<pattern>cloud.commandframework</pattern>
|
||||
<pattern>org.incendo.cloud</pattern>
|
||||
<shadedPattern>com.bergerkiller.bukkit.common.dep.cloud</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
@@ -87,4 +104,101 @@ However, the library and its dependencies are shaded in at a different package t
|
||||
</relocations>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>```
|
||||
</plugins>
|
||||
</build>
|
||||
```
|
||||
|
||||
### Gradle (Kotlin)
|
||||
Depending on BKCommonLib will automatically tell Gradle what versions of Cloud and its dependencies to use. The below configuration assumes kotlin gradle syntax, and are for your project's `build.gradle.kts` file.
|
||||
|
||||
This does not work well with older versions of Gradle. Make sure to use **gradle 8.5** at least.
|
||||
|
||||
|
||||
Begin by adding the repository where BKCommonLib is hosted:
|
||||
```kotlin
|
||||
repositories {
|
||||
maven("https://ci.mg-dev.eu/plugin/repository/everything/")
|
||||
}
|
||||
```
|
||||
Next add the BKCommonLib dependency and the cloud dependencies. For cloud, no version has to be specified, which will be provided by BKCommonLib. It is recommended to make use of [version catalogs](https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format) to make this look cleaner, but this is optional.
|
||||
```kotlin
|
||||
dependencies {
|
||||
compileOnlyApi("com.bergerkiller.bukkit:BKCommonLib:1.21.1-v1")
|
||||
|
||||
// Cloud integrated in BKCommonLib
|
||||
compileOnly("org.incendo:cloud-paper")
|
||||
compileOnly("org.incendo:cloud-annotations")
|
||||
compileOnly("org.incendo:cloud-minecraft-extras")
|
||||
}
|
||||
```
|
||||
Finally, make sure the cloud dependency is shaded correctly when compiling your plugin:
|
||||
Also, don't forget to add the Java library.
|
||||
```kotlin
|
||||
plugins {
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id("java-library")
|
||||
}
|
||||
|
||||
tasks {
|
||||
shadowJar {
|
||||
val commonPrefix = "com.bergerkiller.bukkit.common.dep"
|
||||
relocate("org.incendo.cloud", "$commonPrefix.cloud")
|
||||
relocate("io.leangen.geantyref", "$commonPrefix.typetoken")
|
||||
relocate("me.lucko.commodore", "$commonPrefix.me.lucko.commodore")
|
||||
relocate("net.kyori", "$commonPrefix.net.kyori")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Gradle (Groovy)
|
||||
While using `build.gradle`, you will have a small difference in syntax.
|
||||
|
||||
Add the following plugins (`java` should be there already when creating your project):
|
||||
```kotlin
|
||||
plugins {
|
||||
id "java"
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id "java-library"
|
||||
}
|
||||
```
|
||||
|
||||
Then you will add the maven repository for BKCommonlib:
|
||||
```kotlin
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = "https://ci.mg-dev.eu/plugin/repository/everything"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then add it to the dependencies:
|
||||
```kotlin
|
||||
dependencies {
|
||||
// BKCommonLib
|
||||
compileOnlyApi("com.bergerkiller.bukkit:BKCommonLib:1.21.1-v1")
|
||||
|
||||
// Cloud integrated in BKCommonLib
|
||||
compileOnly("org.incendo:cloud-paper")
|
||||
compileOnly("org.incendo:cloud-annotations")
|
||||
compileOnly("org.incendo:cloud-minecraft-extras")
|
||||
|
||||
// Adventure MiniMessage
|
||||
implementation("net.kyori:adventure-api:4.14.0")
|
||||
implementation("net.kyori:adventure-text-minimessage:4.14.0")
|
||||
}
|
||||
```
|
||||
|
||||
Finally, you can shadow the imported plugins:
|
||||
```kotlin
|
||||
tasks {
|
||||
shadowJar {
|
||||
def commonPrefix = "com.bergerkiller.bukkit.common.dep"
|
||||
relocate("org.incendo.cloud", "${commonPrefix}.cloud")
|
||||
relocate("io.leangen.geantyref", "${commonPrefix}.typetoken")
|
||||
relocate("me.lucko.commodore", "${commonPrefix}.me.lucko.commodore")
|
||||
relocate("net.kyori", "${commonPrefix}.net.kyori")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
〚 [⤓ Modrinth](https://modrinth.com/plugin/bkcommonlib) / [⤓ Spigot](https://www.spigotmc.org/resources/bkcommonlib.39590/) / [⤓ Jenkins Dev Builds](https://ci.mg-dev.eu/job/BKCommonLib/) / [Source on GitHub](https://github.com/bergerhealer/BKCommonLib) / [Javadocs](https://ci.mg-dev.eu/javadocs/BKCommonLib/) / [Discord](https://discord.gg/wvU2rFgSnw) 〛
|
||||
|
||||
## About BKCommonLib
|
||||
**BKCommonLib** is a Paper/Spigot/Bukkit server plugin and library which houses a large selection of utilities, API's, frameworks and performance-critical code. It was made to eliminate all use of Minecraft Server Code (aka NMS) from plugins themselves, improving their stability.
|
||||
**BKCommonLib** is a Paper/Spigot/Bukkit server plugin and library which houses a large selection of utilities, APIs, frameworks and performance-critical code. It was made to eliminate all use of Minecraft Server Code (aka NMS) from plugins themselves, improving their stability.
|
||||
|
||||
It made it so that when Minecraft updates, only this library has to be updated. Plugins using it generally don't require updates anymore, except to stay compatible with BKCommonLib itself.
|
||||
|
||||
@@ -68,8 +68,8 @@ This means you don't have to compile different classes for every different permu
|
||||
<summary>Includes Cloud Command Framework</summary>
|
||||
|
||||
#####
|
||||
BKCommonLib includes the [**Cloud Command Framework**](https://github.com/bergerhealer/cloud). Write clean commands with annotations or builder pattern, complete with suggestions, permission handling and localization.
|
||||
BKCommonLib adds a few default utilities to get set up for Paper/Spigot servers even faster.
|
||||
BKCommonLib includes the [**Cloud Command Framework**](https://cloud.incendo.org/). Write clean commands with annotations or builder pattern, complete with suggestions, permission handling and localization.
|
||||
BKCommonLib adds a few default utilities to get set up for Paper/Spigot servers even faster. [Dependency information is here](https://github.com/bergerhealer/BKCommonLib/blob/master/CLOUD_HOWTO.md).
|
||||
******
|
||||
</details>
|
||||
<details>
|
||||
@@ -97,6 +97,39 @@ BKCommonLib adds a few default utilities to get set up for Paper/Spigot servers
|
||||
******
|
||||
</details>
|
||||
<details>
|
||||
<summary>SoftDependency Library</summary>
|
||||
|
||||
#####
|
||||
[SoftDependency](https://github.com/bergerhealer/SoftDependency) is a simple library that makes it easier to lazily handle third-party soft dependencies enabling and disabling.
|
||||
See the Project GitHub page for more information. This library is included in BKCommonLib by default, no shading or relocating required. Dependency management is handled without having to call any methods from your _onEnable()_.
|
||||
|
||||
##### Example
|
||||
```java
|
||||
public class MyPlugin extends JavaPlugin {
|
||||
|
||||
private final SoftDependency<MyDependencyPlugin> myDependency = new SoftDependency<MyDependencyPlugin>(this, "my_dependency") {
|
||||
@Override
|
||||
protected MyDependencyPlugin initialize(Plugin plugin) {
|
||||
return MyDependencyPlugin.class.cast(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onEnable() {
|
||||
getLogger().info("Support for MyDependency enabled!");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDisable() {
|
||||
getLogger().info("Support for MyDependency disabled!");
|
||||
}
|
||||
};
|
||||
|
||||
// Can use myDependency.get() anywhere, returns non-null if enabled.
|
||||
}
|
||||
```
|
||||
******
|
||||
</details>
|
||||
<details>
|
||||
<summary>Server Events</summary>
|
||||
|
||||
#####
|
||||
@@ -278,7 +311,7 @@ public void doWorkInChunk(Chunk chunk) {
|
||||
|
||||
#####
|
||||
By extending server Entity classes at runtime, this API makes it possible to completely alter the behavior of entities on the server. This is core to how [TrainCarts](https://github.com/bergerhealer/TrainCarts) operates.
|
||||
- The entity _onTick()_ can be overrided to run your own routines
|
||||
- The entity _onTick()_ can be overridden to run your own routines
|
||||
- Run entity _onMove()_ or omit it, handle block and entity collisions
|
||||
- Hotswap existing entities at runtime with custom behavior while keeping data consistent
|
||||
- Override entity network synchronization (packets)
|
||||
@@ -365,7 +398,7 @@ There are many more features hidden inside utility classes. Look around.
|
||||
## Dependency Information
|
||||
Want to use BKCommonLib in your own projects? Use the following repository and dependency information. Remember to update the version as necessary.
|
||||
|
||||
Want to use the included [Cloud Command Framework](https://github.com/bergerhealer/cloud)? Follow [these instructions](https://github.com/bergerhealer/BKCommonLib/blob/master/CLOUD_HOWTO.md) to properly relocate your imports.
|
||||
Want to use the included [Cloud Command Framework](https://cloud.incendo.org/)? Follow [these instructions](https://github.com/bergerhealer/BKCommonLib/blob/master/CLOUD_HOWTO.md) to properly relocate your imports.
|
||||
|
||||
<details open>
|
||||
<summary>Maven</summary>
|
||||
@@ -382,7 +415,7 @@ Want to use the included [Cloud Command Framework](https://github.com/bergerheal
|
||||
<dependency>
|
||||
<groupId>com.bergerkiller.bukkit</groupId>
|
||||
<artifactId>BKCommonLib</artifactId>
|
||||
<version>1.19.2-v2</version>
|
||||
<version>1.20.4-v1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -395,16 +428,11 @@ Want to use the included [Cloud Command Framework](https://github.com/bergerheal
|
||||
repositories {
|
||||
maven {
|
||||
url = 'https://ci.mg-dev.eu/plugin/repository/everything'
|
||||
content {
|
||||
includeGroup 'com.bergerkiller.bukkit'
|
||||
includeGroup 'org.bergerhealer.cloud.commandframework'
|
||||
includeGroup 'com.bergerkiller.mountiplex'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.bergerkiller.bukkit:BKCommonLib:1.19.2-v2'
|
||||
compileOnly 'com.bergerkiller.bukkit:BKCommonLib:1.20.4-v1'
|
||||
}
|
||||
```
|
||||
</details>
|
||||
@@ -420,7 +448,7 @@ Bergerkiller, the project owner, is generally fine with people copy-pasting code
|
||||
If you're unsure, ask in our Discord server.
|
||||
|
||||
BKCommonLib shades in/uses the following libraries, further License conditions may apply:
|
||||
- [Cloud Command Framework](https://github.com/incendo/cloud) (custom fork)
|
||||
- [Cloud Command Framework](https://github.com/incendo/cloud)
|
||||
- [ASM](https://github.com/llbit/ow2-asm)
|
||||
- [Javassist](https://github.com/jboss-javassist/javassist)
|
||||
- [Objenesis](http://objenesis.org/)
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
plugins {
|
||||
id("java-platform")
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
repositories {
|
||||
maven("https://ci.mg-dev.eu/plugin/repository/everything") {
|
||||
name = "MGDev"
|
||||
credentials(PasswordCredentials::class)
|
||||
authentication {
|
||||
create<BasicAuthentication>("basic")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
create<MavenPublication>("bom") {
|
||||
from(components["javaPlatform"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
javaPlatform.allowDependencies()
|
||||
|
||||
dependencies {
|
||||
api(platform(libs.cloud.core.bom))
|
||||
api(platform(libs.cloud.minecraft.bom))
|
||||
|
||||
constraints {
|
||||
// Adding BKCommonLib itself keeps maven happy. It's not needed with gradle.
|
||||
// It's a bit of a strange circular thing though. Ugh.
|
||||
api("$group:BKCommonLib:$version")
|
||||
|
||||
api(libs.adventure.api)
|
||||
api(libs.adventure.platform.bukkit)
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,13 @@
|
||||
plugins {
|
||||
id("java-library")
|
||||
id("com.bergerkiller.mountiplex") version "2.93"
|
||||
id("com.github.johnrengelman.shadow") version "7.1.2"
|
||||
id("maven-publish")
|
||||
alias(libs.plugins.mountiplex)
|
||||
alias(libs.plugins.shadow)
|
||||
}
|
||||
|
||||
val buildNumber = System.getenv("BUILD_NUMBER") ?: "NO-CI"
|
||||
|
||||
group = "com.bergerkiller.bukkit"
|
||||
version = "1.19.4-v2"
|
||||
|
||||
repositories {
|
||||
mavenLocal {
|
||||
// Used to access a server JAR for testing
|
||||
// TODO Use Paperclip instead
|
||||
content {
|
||||
includeGroup("org.spigotmc")
|
||||
includeGroup("com.mojang")
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
|
||||
|
||||
@@ -28,6 +17,16 @@ repositories {
|
||||
// - Aikar minecraft-timings
|
||||
// - Myles ViaVersion
|
||||
maven("https://ci.mg-dev.eu/plugin/repository/everything/")
|
||||
|
||||
// Used to access a server JAR for testing
|
||||
// TODO Use Paperclip instead
|
||||
mavenLocal {
|
||||
content {
|
||||
includeGroup("org.spigotmc")
|
||||
includeGroup("com.mojang")
|
||||
includeGroup("com.bergerkiller.mountiplex")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration for shaded dependencies which should not be added to the published Maven .pom
|
||||
@@ -36,6 +35,9 @@ configurations {
|
||||
compileOnly {
|
||||
extendsFrom(internal)
|
||||
}
|
||||
testImplementation {
|
||||
extendsFrom(internal)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -51,6 +53,15 @@ dependencies {
|
||||
compileOnly(libs.log4j.api)
|
||||
compileOnly(libs.log4j.core)
|
||||
|
||||
//
|
||||
// Publish a BKCommonLib-bom that tells projects using this library what versions of cloud to bring in
|
||||
// These still require remapping done by the user, but having the version makes it easier for them to stay up to date
|
||||
// This now allows specifying the cloud library without specifying a version
|
||||
//
|
||||
|
||||
api(platform(project(":BKCommonLib-bom")))
|
||||
internal(platform(project(":BKCommonLib-bom")))
|
||||
|
||||
//
|
||||
// Dependencies shaded into the library for internal use
|
||||
//
|
||||
@@ -59,12 +70,20 @@ dependencies {
|
||||
api(libs.mountiplex)
|
||||
// Region change tracker is included in BKCommonLib for the region block change event
|
||||
api(libs.regionchangetracker)
|
||||
// Region flag tracker is included in BKCommonLib to allow other plugins to store region flags with WorldGuard
|
||||
// We only expose the api to other plugins, but use the full core implementation ourselves for initialization.
|
||||
api(libs.regionflagtracker.api)
|
||||
internal(libs.regionflagtracker.core)
|
||||
// SoftDependency lib is included in BKCommonLib for its handy API
|
||||
api(libs.softdependency)
|
||||
// Aikar's minecraft timings library, https://github.com/aikar/minecraft-timings
|
||||
internal(libs.timings) {
|
||||
isTransitive = false
|
||||
}
|
||||
// GSON isn't available in spigot versions prior to 1.8.1, shade it in order to keep 1.8 compatibility
|
||||
internal(libs.gson)
|
||||
// Color conversion helper library, https://github.com/bergerhealer/BKCommonLib-ColorConversionHelper
|
||||
api(libs.colorconversionhelper)
|
||||
|
||||
//
|
||||
// Optional provided dependencies that BKCommonLib can talk with
|
||||
@@ -73,17 +92,22 @@ dependencies {
|
||||
// ViaVersion API
|
||||
compileOnly(libs.viaversion)
|
||||
// Vault hook for special permissions handling
|
||||
compileOnly(libs.vault)
|
||||
compileOnly(libs.vault) {
|
||||
exclude("org.bukkit", "bukkit")
|
||||
}
|
||||
compileOnly(libs.luckperms)
|
||||
// ProtocolLib hook for protocol handling
|
||||
compileOnly(libs.protocollib)
|
||||
|
||||
//
|
||||
// Cloud command framework
|
||||
// Is relocated - requires appropriate relocation in plugins using it
|
||||
// Versions are part of BKCommonLib-bom and are made available automatically
|
||||
//
|
||||
internal(libs.cloud.paper)
|
||||
internal(libs.cloud.annotations)
|
||||
internal(libs.cloud.minecraft.extras)
|
||||
|
||||
internal("org.incendo:cloud-paper")
|
||||
internal("org.incendo:cloud-annotations")
|
||||
internal("org.incendo:cloud-minecraft-extras")
|
||||
internal(libs.commodore) {
|
||||
isTransitive = false
|
||||
}
|
||||
@@ -131,7 +155,7 @@ tasks {
|
||||
generateTemplateHandles {
|
||||
source.set("com/bergerkiller/templates/init.txt")
|
||||
target.set("com/bergerkiller/generated")
|
||||
variables.put("version", libs.versions.minecraft)
|
||||
variables.put("version", libs.versions.template.minecraft.version);
|
||||
}
|
||||
|
||||
assemble {
|
||||
@@ -143,6 +167,30 @@ tasks {
|
||||
targetCompatibility = "1.8"
|
||||
}
|
||||
|
||||
withType<Test>().configureEach {
|
||||
testLogging {
|
||||
showStandardStreams = true
|
||||
}
|
||||
|
||||
// Used to preload classes under test
|
||||
systemProperty("main.classes.dir", sourceSets["main"].output.classesDirs.asPath)
|
||||
|
||||
// Uncomment to enable SIMD optimizations, to test performance of color conversion
|
||||
//jvmArgs("--add-modules", "jdk.incubator.vector");
|
||||
}
|
||||
|
||||
// This keeps calling testPreloadTemplatesDeadlock in new instances until it fails
|
||||
// We use this to identify class loading deadlocks
|
||||
register("testPreloadTemplatesDeadlock") {
|
||||
doLast {
|
||||
while (true) {
|
||||
exec {
|
||||
commandLine("./gradlew", "test", "--tests", "com.bergerkiller.bukkit.common.TemplateTest.testPreloadTemplatesDeadlock", "--rerun-tasks")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = "UTF-8"
|
||||
isFailOnError = true
|
||||
@@ -150,6 +198,8 @@ tasks {
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property("version", version)
|
||||
inputs.property("build", buildNumber)
|
||||
from("src/main/templates")
|
||||
filesMatching(listOf("plugin.yml", "paper-plugin.yml")) {
|
||||
expand(
|
||||
@@ -167,7 +217,7 @@ tasks {
|
||||
relocate("com.google.gson", "$prefix.gson")
|
||||
|
||||
// Cloud command framework and its dependencies
|
||||
relocate("cloud.commandframework", "$prefix.cloud")
|
||||
relocate("org.incendo.cloud", "$prefix.cloud")
|
||||
relocate("io.leangen.geantyref", "$prefix.typetoken")
|
||||
relocate("me.lucko.commodore", "$prefix.me.lucko.commodore")
|
||||
relocate("net.kyori", "$prefix.net.kyori")
|
||||
@@ -185,7 +235,9 @@ tasks {
|
||||
exclude(dependency("org.checkerframework:checker-qual"))
|
||||
}
|
||||
|
||||
destinationDirectory.set(buildDir)
|
||||
mergeServiceFiles()
|
||||
|
||||
destinationDirectory.set(layout.buildDirectory)
|
||||
archiveFileName.set("${project.name}-${project.version}-$buildNumber.jar")
|
||||
|
||||
isPreserveFileTimestamps = false
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
group=com.bergerkiller.bukkit
|
||||
version=1.21.10-v1-SNAPSHOT
|
||||
@@ -1,21 +1,28 @@
|
||||
[versions]
|
||||
minecraft = "1.19.4"
|
||||
spigot = "1.19.4-R0.1-SNAPSHOT"
|
||||
template-minecraft-version = "1.21.10"
|
||||
spigot = "1.21.10-R0.1-SNAPSHOT"
|
||||
netty = "4.1.42.Final"
|
||||
log4j = "2.17.0"
|
||||
mountiplex = "2.95"
|
||||
regionchangetracker = "1.2"
|
||||
mountiplex = "3.29"
|
||||
regionchangetracker = "1.4"
|
||||
regionflagtracker= "1.0"
|
||||
colorconversionhelper = "1.03"
|
||||
softdependencylib = "1.05"
|
||||
timings = "1.0.4"
|
||||
gson = "2.8.9"
|
||||
viaversion = "3.2.1"
|
||||
viaversion = "4.0.0"
|
||||
vault = "1.7"
|
||||
luckperms = "5.4"
|
||||
protocollib = "4.4.0"
|
||||
cloud = "1.8.0-SNAPSHOT"
|
||||
commodore = "1.13"
|
||||
adventure = "4.12.0"
|
||||
adventure-platform-bukkit = "4.2.0"
|
||||
cloud_core = "2.0.0-rc.2"
|
||||
cloud_minecraft = "2.0.0-beta.13"
|
||||
commodore = "2.2"
|
||||
adventure = "4.25.0"
|
||||
# Note: https://github.com/KyoriPowered/adventure-platform/pull/229
|
||||
adventure-platform-bukkit = "4.4.2-PR229-fix"
|
||||
mockito = "2.22.0"
|
||||
junit = "4.13"
|
||||
shadow = "8.1.1"
|
||||
|
||||
[libraries]
|
||||
spigot = { module = "org.spigotmc:spigot", version.ref = "spigot" }
|
||||
@@ -24,17 +31,25 @@ netty-all = { module = "io.netty:netty-all", version.ref = "netty" }
|
||||
log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
|
||||
log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
|
||||
mountiplex = { module = "com.bergerkiller.mountiplex:Mountiplex", version.ref = "mountiplex" }
|
||||
cloud-core-bom = { module = "org.incendo:cloud-bom", version.ref = "cloud_core" }
|
||||
cloud-minecraft-bom = { module = "org.incendo:cloud-minecraft-bom", version.ref = "cloud_minecraft" }
|
||||
regionchangetracker = { module = "com.bergerkiller.bukkit.regionchangetracker:BKCommonLib-RegionChangeTracker-Core", version.ref = "regionchangetracker" }
|
||||
regionflagtracker-api = { module = "com.bergerkiller.bukkit.regionflagtracker:BKCommonLib-RegionFlagTracker-API", version.ref = "regionflagtracker" }
|
||||
regionflagtracker-core = { module = "com.bergerkiller.bukkit.regionflagtracker:BKCommonLib-RegionFlagTracker-Core", version.ref = "regionflagtracker" }
|
||||
colorconversionhelper = { module = "com.bergerkiller.bukkit.colorconversionhelper:BKCommonLib-ColorConversionHelper", version.ref = "colorconversionhelper" }
|
||||
softdependency = { module = "com.bergerkiller.bukkit.softdependency:SoftDependency", version.ref = "softdependencylib" }
|
||||
timings = { module = "co.aikar:minecraft-timings", version.ref = "timings" }
|
||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||
viaversion = { module = "us.myles:viaversion", version.ref = "viaversion" }
|
||||
viaversion = { module = "com.viaversion:viaversion-api", version.ref = "viaversion" }
|
||||
vault = { module = "com.github.MilkBowl:VaultAPI", version.ref = "vault" }
|
||||
luckperms = { module = "net.luckperms:api", version.ref = "luckperms" }
|
||||
protocollib = { module = "com.comphenix.protocol:ProtocolLib-API", version.ref = "protocollib" }
|
||||
cloud-paper = { module = "org.bergerhealer.cloud.commandframework:cloud-paper", version.ref = "cloud" }
|
||||
cloud-annotations = { module = "org.bergerhealer.cloud.commandframework:cloud-annotations", version.ref = "cloud" }
|
||||
cloud-minecraft-extras = { module = "org.bergerhealer.cloud.commandframework:cloud-minecraft-extras", version.ref = "cloud" }
|
||||
commodore = { module = "me.lucko:commodore", version.ref = "commodore" }
|
||||
adventure-api = { module = "net.kyori:adventure-api", version.ref = "adventure" }
|
||||
adventure-platform-bukkit = { module = "net.kyori:adventure-platform-bukkit", version.ref = "adventure-platform-bukkit" }
|
||||
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
|
||||
junit = { module = "junit:junit", version.ref = "junit" }
|
||||
|
||||
[plugins]
|
||||
mountiplex = { id = "com.bergerkiller.mountiplex", version.ref = "mountiplex" }
|
||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
||||
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -83,10 +83,8 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# 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
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,10 +131,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
# This script is used to import jar files into this /lib local maven repository
|
||||
# Please set the spigot build tools path accordingly
|
||||
# Usage: add_server.sh [version]
|
||||
# add_server.sh 1.12.1
|
||||
|
||||
# Make sure this is correct!
|
||||
spigotbuild_dir=C:/Users/QT/Desktop/SpigotBuild
|
||||
|
||||
# Rest is (should be) magic
|
||||
spigot_version=$1
|
||||
#spigot_version=1.12.1
|
||||
lib_version=${spigot_version}-R0.1-SNAPSHOT
|
||||
mvn_dir=${spigotbuild_dir}/apache-maven-3.2.5/bin
|
||||
spigot_lib_path=${spigotbuild_dir}/spigot-${spigot_version}.jar
|
||||
repo_dir=$PWD
|
||||
cd $mvn_dir
|
||||
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \
|
||||
-Dfile=${spigot_lib_path} \
|
||||
-DgroupId=org.spigotmc -DartifactId=spigot \
|
||||
-Dversion=${lib_version} -Dpackaging=jar \
|
||||
-DlocalRepositoryPath=${repo_dir}
|
||||
|
Before Width: | Height: | Size: 1012 KiB After Width: | Height: | Size: 962 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 935 KiB After Width: | Height: | Size: 885 KiB |
@@ -4,5 +4,13 @@ pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven("https://ci.mg-dev.eu/plugin/repository/everything/")
|
||||
mavenLocal {
|
||||
content {
|
||||
includeGroup("com.bergerkiller.mountiplex")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include(":bom")
|
||||
project(":bom").name = "BKCommonLib-bom"
|
||||
@@ -35,7 +35,6 @@ public abstract class LongHashSetHandle extends Template.Handle {
|
||||
public abstract long[] toArray();
|
||||
public abstract long[] popAll();
|
||||
public abstract void trim();
|
||||
|
||||
public static LongHashSetHandle createNew() {
|
||||
return createNew(16);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.bergerkiller.generated.com.mojang.authlib;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.nbt.CommonTagCompound;
|
||||
import com.bergerkiller.generated.com.mojang.authlib.properties.PropertyHandle;
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -22,24 +22,38 @@ public abstract class GameProfileHandle extends Template.Handle {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
public static final GameProfileHandle createNew(UUID uuid, String name) {
|
||||
return T.constr_uuid_name.newInstance(uuid, name);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static GameProfileHandle deserialize(CommonTagCompound data) {
|
||||
return T.deserialize.invoke(data);
|
||||
public static GameProfileHandle createNew(UUID uuid, String name, Multimap<String, PropertyHandle> properties) {
|
||||
return T.createNew.invoke(uuid, name, properties);
|
||||
}
|
||||
|
||||
public abstract UUID getId();
|
||||
public abstract String getName();
|
||||
public abstract void clearProperties();
|
||||
public abstract Set<String> getPropertyKeys();
|
||||
public abstract Collection<PropertyHandle> getProperties(String key);
|
||||
public abstract boolean putProperty(String key, PropertyHandle property);
|
||||
public abstract void setAllProperties(GameProfileHandle profile);
|
||||
public abstract CommonTagCompound serialize();
|
||||
public abstract Multimap<String, PropertyHandle> getMutableProperties();
|
||||
public static GameProfileHandle createNew(UUID uuid, String name) {
|
||||
return createNew(uuid, name, com.google.common.collect.ImmutableMultimap.of());
|
||||
}
|
||||
|
||||
public GameProfileHandle withProperties(Multimap<String, PropertyHandle> properties) {
|
||||
return createNew(getId(), getName(), properties);
|
||||
}
|
||||
|
||||
public GameProfileHandle withPropertiesOf(GameProfileHandle profile) {
|
||||
return withProperties(profile.getMutableProperties());
|
||||
}
|
||||
|
||||
public GameProfileHandle withPropertiesChanged(java.util.function.Consumer<Multimap<String, PropertyHandle>> mutator) {
|
||||
Multimap<String, PropertyHandle> properties = getMutableProperties();
|
||||
mutator.accept(properties);
|
||||
return withProperties(properties);
|
||||
}
|
||||
|
||||
public GameProfileHandle withPropertyPut(String key, PropertyHandle property) {
|
||||
return withPropertiesChanged(p -> p.put(key, property));
|
||||
}
|
||||
|
||||
public static GameProfileHandle getForPlayer(org.bukkit.entity.HumanEntity player) {
|
||||
Object handle = com.bergerkiller.bukkit.common.conversion.type.HandleConversion.toEntityHandle(player);
|
||||
@@ -50,18 +64,13 @@ public abstract class GameProfileHandle extends Template.Handle {
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class GameProfileClass extends Template.Class<GameProfileHandle> {
|
||||
public final Template.Constructor.Converted<GameProfileHandle> constr_uuid_name = new Template.Constructor.Converted<GameProfileHandle>();
|
||||
|
||||
public final Template.StaticMethod.Converted<GameProfileHandle> deserialize = new Template.StaticMethod.Converted<GameProfileHandle>();
|
||||
public final Template.StaticMethod.Converted<GameProfileHandle> createNew = new Template.StaticMethod.Converted<GameProfileHandle>();
|
||||
|
||||
public final Template.Method<UUID> getId = new Template.Method<UUID>();
|
||||
public final Template.Method<String> getName = new Template.Method<String>();
|
||||
public final Template.Method<Void> clearProperties = new Template.Method<Void>();
|
||||
public final Template.Method<Set<String>> getPropertyKeys = new Template.Method<Set<String>>();
|
||||
public final Template.Method.Converted<Collection<PropertyHandle>> getProperties = new Template.Method.Converted<Collection<PropertyHandle>>();
|
||||
public final Template.Method.Converted<Boolean> putProperty = new Template.Method.Converted<Boolean>();
|
||||
public final Template.Method.Converted<Void> setAllProperties = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<CommonTagCompound> serialize = new Template.Method.Converted<CommonTagCompound>();
|
||||
public final Template.Method<Multimap<String, PropertyHandle>> getMutableProperties = new Template.Method<Multimap<String, PropertyHandle>>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ public abstract class EnumChatFormatHandle extends Template.Handle {
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getId();
|
||||
|
||||
public static final Object[] RAW_VALUES = T.getType().getEnumConstants();
|
||||
public static final EnumChatFormatHandle[] VALUES;
|
||||
static {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.bergerkiller.generated.net.minecraft.advancements;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import org.bukkit.advancement.Advancement;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.advancements.Advancement</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.Optional
|
||||
@Template.InstanceType("net.minecraft.advancements.Advancement")
|
||||
public abstract class AdvancementHandle extends Template.Handle {
|
||||
/** @see AdvancementClass */
|
||||
public static final AdvancementClass T = Template.Class.create(AdvancementClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static AdvancementHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static Advancement toBukkit(Object advancement_or_holder) {
|
||||
return T.toBukkit.invoker.invoke(null,advancement_or_holder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.advancements.Advancement</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class AdvancementClass extends Template.Class<AdvancementHandle> {
|
||||
public final Template.StaticMethod<Advancement> toBukkit = new Template.StaticMethod<Advancement>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ public abstract class BlockPositionHandle extends BaseBlockPositionHandle {
|
||||
return T.fromBukkitBlockRaw.invoker.invoke(null,block);
|
||||
}
|
||||
|
||||
|
||||
public static BlockPositionHandle fromIntVector3(com.bergerkiller.bukkit.common.bases.IntVector3 vector) {
|
||||
return createHandle(fromIntVector3Raw(vector));
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ public abstract class EnumDirectionHandle extends Template.Handle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public int ordinal() {
|
||||
return ((Enum<?>) getRaw()).ordinal();
|
||||
}
|
||||
|
||||
@@ -32,8 +32,6 @@ public abstract class RegistryMaterialsHandle extends Template.Handle {
|
||||
|
||||
public final Template.Method.Converted<Object> get = new Template.Method.Converted<Object>();
|
||||
public final Template.Method<Object> getKey = new Template.Method<Object>();
|
||||
@Template.Optional
|
||||
public final Template.Method<Object> rawSoundEffectResourceKeyToHolder = new Template.Method<Object>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ public abstract class Vector3fHandle extends Template.Handle {
|
||||
public abstract float getY();
|
||||
public abstract float getZ();
|
||||
public abstract Vector toBukkit();
|
||||
|
||||
public static Vector3fHandle fromBukkit(org.bukkit.util.Vector vector) {
|
||||
return createHandle(fromBukkitRaw(vector));
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
|
||||
public abstract byte getTypeId();
|
||||
public abstract Object raw_clone();
|
||||
|
||||
public com.bergerkiller.bukkit.common.nbt.CommonTag toCommonTag() {
|
||||
return new com.bergerkiller.bukkit.common.nbt.CommonTag(this);
|
||||
}
|
||||
@@ -48,7 +47,35 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
} else {
|
||||
str.append(data.getClass().getSimpleName());
|
||||
}
|
||||
str.append(": ").append(data);
|
||||
str.append(": ");
|
||||
|
||||
if (data instanceof byte[]) {
|
||||
byte[] values = (byte[]) data;
|
||||
str.append("[");
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (i > 0) str.append(", ");
|
||||
str.append(values[i]);
|
||||
}
|
||||
str.append("]");
|
||||
} else if (data instanceof int[]) {
|
||||
int[] values = (int[]) data;
|
||||
str.append("[");
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (i > 0) str.append(", ");
|
||||
str.append(values[i]);
|
||||
}
|
||||
str.append("]");
|
||||
} else if (data instanceof long[]) {
|
||||
long[] values = (long[]) data;
|
||||
str.append("[");
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (i > 0) str.append(", ");
|
||||
str.append(values[i]);
|
||||
}
|
||||
str.append("]");
|
||||
} else {
|
||||
str.append(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,33 +97,76 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
}
|
||||
|
||||
private static final com.bergerkiller.bukkit.common.collections.ClassMap<TypeInfo> typeInfoLookup = new com.bergerkiller.bukkit.common.collections.ClassMap<TypeInfo>();
|
||||
private static final TypeInfo toStringFallbackTypeInfo = new TypeInfo(
|
||||
String.class, NBTTagStringHandle.T,
|
||||
data -> NBTTagStringHandle.T.create.raw.invoke(com.bergerkiller.bukkit.common.conversion.Conversion.toString.convert(data, "")),
|
||||
java.util.function.Function.identity()
|
||||
);
|
||||
private static class TypeInfoLookup {
|
||||
public final com.bergerkiller.bukkit.common.collections.ClassMap<TypeInfo> byType = new com.bergerkiller.bukkit.common.collections.ClassMap<TypeInfo>();
|
||||
public final TypeInfo toStringFallback;
|
||||
|
||||
protected static void registerTypeInfo(Class<?> dataType,
|
||||
Template.Class<? extends NBTBaseHandle> handleClass,
|
||||
java.util.function.Function<Object, Object> constructor,
|
||||
java.util.function.Function<Object, Object> get_data)
|
||||
{
|
||||
TypeInfo data_typeInfo = new TypeInfo(dataType, handleClass, constructor, java.util.function.Function.identity());
|
||||
typeInfoLookup.put(dataType, data_typeInfo);
|
||||
Class<?> boxedDataType = com.bergerkiller.mountiplex.reflection.util.BoxedType.getBoxedType(dataType);
|
||||
if (boxedDataType != null) {
|
||||
typeInfoLookup.put(boxedDataType, data_typeInfo);
|
||||
public TypeInfoLookup() {
|
||||
toStringFallback = new TypeInfo(
|
||||
String.class, NBTTagStringHandle.T,
|
||||
data -> NBTTagStringHandle.T.create.raw.invoke(com.bergerkiller.bukkit.common.conversion.Conversion.toString.convert(data, "")),
|
||||
java.util.function.Function.identity()
|
||||
);
|
||||
|
||||
registerTypeInfo(String.class, NBTTagStringHandle.T, NBTTagStringHandle.T.create.raw::invoke, NBTTagStringHandle.T.getData::invoke);
|
||||
registerTypeInfo(byte.class, NBTTagByteHandle.T, NBTTagByteHandle.T.create.raw::invoke, NBTTagByteHandle.T.getByteData::invoke);
|
||||
registerTypeInfo(short.class, NBTTagShortHandle.T, NBTTagShortHandle.T.create.raw::invoke, NBTTagShortHandle.T.getShortData::invoke);
|
||||
registerTypeInfo(int.class, NBTTagIntHandle.T, NBTTagIntHandle.T.create.raw::invoke, NBTTagIntHandle.T.getIntegerData::invoke);
|
||||
registerTypeInfo(long.class, NBTTagLongHandle.T, NBTTagLongHandle.T.create.raw::invoke, NBTTagLongHandle.T.getLongData::invoke);
|
||||
registerTypeInfo(float.class, NBTTagFloatHandle.T, NBTTagFloatHandle.T.create.raw::invoke, NBTTagFloatHandle.T.getFloatData::invoke);
|
||||
registerTypeInfo(double.class, NBTTagDoubleHandle.T, NBTTagDoubleHandle.T.create.raw::invoke, NBTTagDoubleHandle.T.getDoubleData::invoke);
|
||||
registerTypeInfo(byte[].class, NBTTagByteArrayHandle.T, NBTTagByteArrayHandle.T.create.raw::invoke, NBTTagByteArrayHandle.T.getData::invoke);
|
||||
registerTypeInfo(int[].class, NBTTagIntArrayHandle.T, NBTTagIntArrayHandle.T.create.raw::invoke, NBTTagIntArrayHandle.T.getData::invoke);
|
||||
|
||||
if (NBTTagLongArrayHandle.T.isAvailable()) {
|
||||
registerTypeInfo(long[].class, NBTTagLongArrayHandle.T, NBTTagLongArrayHandle.T.create.raw::invoke, NBTTagLongArrayHandle.T.getData::invoke);
|
||||
}
|
||||
|
||||
registerTypeInfo(java.util.Collection.class, NBTTagListHandle.T, NBTTagListHandle.T.create.raw::invoke, NBTTagListHandle.T.data.raw::get);
|
||||
registerTypeInfo(java.util.Map.class, NBTTagCompoundHandle.T, NBTTagCompoundHandle.T.create.raw::invoke, NBTTagCompoundHandle.T.data.raw::get);
|
||||
}
|
||||
|
||||
typeInfoLookup.put(handleClass.getType(), new TypeInfo(dataType, handleClass,
|
||||
java.util.function.Function.identity(), get_data));
|
||||
private void registerTypeInfo(
|
||||
Class<?> dataType,
|
||||
Template.Class<? extends NBTBaseHandle> handleClass,
|
||||
java.util.function.Function<Object, Object> constructor,
|
||||
java.util.function.Function<Object, Object> get_data)
|
||||
{
|
||||
TypeInfo data_typeInfo = new TypeInfo(dataType, handleClass, constructor, java.util.function.Function.identity());
|
||||
byType.put(dataType, data_typeInfo);
|
||||
Class<?> boxedDataType = com.bergerkiller.mountiplex.reflection.util.BoxedType.getBoxedType(dataType);
|
||||
if (boxedDataType != null) {
|
||||
byType.put(boxedDataType, data_typeInfo);
|
||||
}
|
||||
|
||||
typeInfoLookup.put(handleClass.getHandleType(), new TypeInfo(dataType, handleClass,
|
||||
handle -> ((Template.Handle) handle).getRaw(),
|
||||
handle -> get_data.apply(((Template.Handle) handle).getRaw())));
|
||||
byType.put(handleClass.getType(), new TypeInfo(dataType, handleClass,
|
||||
java.util.function.Function.identity(), get_data));
|
||||
|
||||
handleClass.createHandle(null, true);
|
||||
byType.put(handleClass.getHandleType(), new TypeInfo(dataType, handleClass,
|
||||
handle -> ((Template.Handle) handle).getRaw(),
|
||||
handle -> get_data.apply(((Template.Handle) handle).getRaw())));
|
||||
|
||||
handleClass.createHandle(null, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static TypeInfoLookup lookup = null;
|
||||
|
||||
private static TypeInfoLookup lookup() {
|
||||
TypeInfoLookup lookup;
|
||||
if ((lookup = NBTBaseHandle.lookup) != null) {
|
||||
return lookup;
|
||||
}
|
||||
|
||||
synchronized (NBTBaseHandle.class) {
|
||||
if ((lookup = NBTBaseHandle.lookup) != null) {
|
||||
return lookup;
|
||||
}
|
||||
|
||||
lookup = new TypeInfoLookup();
|
||||
NBTBaseHandle.lookup = lookup;
|
||||
return lookup;
|
||||
}
|
||||
}
|
||||
|
||||
private static TypeInfo findTypeInfo(Object data) {
|
||||
@@ -104,7 +174,8 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
throw new IllegalArgumentException("Can not find tag type information for null data");
|
||||
}
|
||||
|
||||
TypeInfo info = typeInfoLookup.get(data.getClass());
|
||||
TypeInfoLookup lookup = lookup();
|
||||
TypeInfo info = lookup.byType.get(data.getClass());
|
||||
if (info != null) {
|
||||
return info;
|
||||
}
|
||||
@@ -116,11 +187,12 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
tag -> handle_info.get_data.apply(((com.bergerkiller.bukkit.common.nbt.CommonTag) data).getRawHandle())
|
||||
);
|
||||
}
|
||||
return toStringFallbackTypeInfo;
|
||||
return lookup.toStringFallback;
|
||||
}
|
||||
|
||||
public static boolean isDataSupportedNatively(Object data) {
|
||||
return typeInfoLookup.get(data) != null || data instanceof com.bergerkiller.bukkit.common.nbt.CommonTag;
|
||||
TypeInfoLookup lookup = lookup();
|
||||
return lookup.byType.get(data) != null || data instanceof com.bergerkiller.bukkit.common.nbt.CommonTag;
|
||||
}
|
||||
|
||||
public static Object getDataForHandle(Object handle) {
|
||||
@@ -136,23 +208,12 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
return info.handleClass.createHandle(info.constructor.apply(data));
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
Class.forName(NBTTagStringHandle.class.getName());
|
||||
Class.forName(NBTTagByteHandle.class.getName());
|
||||
Class.forName(NBTTagShortHandle.class.getName());
|
||||
Class.forName(NBTTagIntHandle.class.getName());
|
||||
Class.forName(NBTTagLongHandle.class.getName());
|
||||
Class.forName(NBTTagFloatHandle.class.getName());
|
||||
Class.forName(NBTTagDoubleHandle.class.getName());
|
||||
Class.forName(NBTTagByteArrayHandle.class.getName());
|
||||
Class.forName(NBTTagIntArrayHandle.class.getName());
|
||||
Class.forName(NBTTagLongArrayHandle.class.getName());
|
||||
Class.forName(NBTTagListHandle.class.getName());
|
||||
Class.forName(NBTTagCompoundHandle.class.getName());
|
||||
} catch (ClassNotFoundException e) {
|
||||
com.bergerkiller.bukkit.common.Logging.LOGGER_NETWORK.log(java.util.logging.Level.SEVERE, "Failed to find core NBT class (corrupt jar?)", e);
|
||||
}
|
||||
public static java.util.function.Consumer<String> createPartialErrorLogger(Object nbtBase) {
|
||||
return (s) -> {
|
||||
String nbtToStr = (nbtBase == null) ? "[null]" : nbtBase.toString();
|
||||
com.bergerkiller.bukkit.common.Logging.LOGGER.severe(
|
||||
"Failed to read (" + nbtToStr + "): " + s);
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.nbt.NBTBase</b>.
|
||||
@@ -189,11 +250,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract String getData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(String.class, T, T.create.raw::invoke, T.getData::invoke);
|
||||
}
|
||||
|
||||
public NBTBaseHandle.NBTTagStringHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
}
|
||||
@@ -233,11 +289,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract byte getByteData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(byte.class, T, T.create.raw::invoke, T.getByteData::invoke);
|
||||
}
|
||||
|
||||
public NBTBaseHandle.NBTTagByteHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
}
|
||||
@@ -278,11 +329,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract short getShortData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(short.class, T, T.create.raw::invoke, T.getShortData::invoke);
|
||||
}
|
||||
|
||||
public static Object createRaw(Object data) { return T.create.raw.invoke(data); }
|
||||
public NBTBaseHandle.NBTTagShortHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
@@ -324,11 +370,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract int getIntegerData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(int.class, T, T.create.raw::invoke, T.getIntegerData::invoke);
|
||||
}
|
||||
|
||||
public NBTBaseHandle.NBTTagIntHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
}
|
||||
@@ -369,11 +410,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract long getLongData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(long.class, T, T.create.raw::invoke, T.getLongData::invoke);
|
||||
}
|
||||
|
||||
public NBTBaseHandle.NBTTagLongHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
}
|
||||
@@ -414,11 +450,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract float getFloatData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(float.class, T, T.create.raw::invoke, T.getFloatData::invoke);
|
||||
}
|
||||
|
||||
public NBTBaseHandle.NBTTagFloatHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
}
|
||||
@@ -459,11 +490,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract double getDoubleData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(double.class, T, T.create.raw::invoke, T.getDoubleData::invoke);
|
||||
}
|
||||
|
||||
public NBTBaseHandle.NBTTagDoubleHandle clone() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.IMMUTABLE_NBT_PRIMITIVES ? this : createHandle(raw_clone());
|
||||
}
|
||||
@@ -504,10 +530,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract byte[] getData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(byte[].class, T, T.create.raw::invoke, T.getData::invoke);
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.nbt.NBTTagByteArray</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
@@ -544,10 +566,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract int[] getData();
|
||||
|
||||
static {
|
||||
registerTypeInfo(int[].class, T, T.create.raw::invoke, T.getData::invoke);
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.nbt.NBTTagIntArray</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
@@ -585,12 +603,6 @@ public abstract class NBTBaseHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract long[] getData();
|
||||
|
||||
static {
|
||||
if (T.isAvailable()) {
|
||||
registerTypeInfo(long[].class, T, T.create.raw::invoke, T.getData::invoke);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.nbt.NBTTagLongArray</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
|
||||
@@ -23,6 +23,18 @@ public abstract class NBTCompressedStreamToolsHandle extends Template.Handle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static NBTTagCompoundHandle parseTagCompoundFromSNBT(String snbtContent) {
|
||||
return T.parseTagCompoundFromSNBT.invoke(snbtContent);
|
||||
}
|
||||
|
||||
public static NBTBaseHandle parseTagFromSNBT(String snbtContent) {
|
||||
return T.parseTagFromSNBT.invoke(snbtContent);
|
||||
}
|
||||
|
||||
public static String handleSNBTParseError(String snbtContent, Throwable exception) {
|
||||
return T.handleSNBTParseError.invoker.invoke(null,snbtContent, exception);
|
||||
}
|
||||
|
||||
public static void uncompressed_writeTag(NBTBaseHandle nbtbase, DataOutput dataoutput) {
|
||||
T.uncompressed_writeTag.invoke(nbtbase, dataoutput);
|
||||
}
|
||||
@@ -52,6 +64,9 @@ public abstract class NBTCompressedStreamToolsHandle extends Template.Handle {
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class NBTCompressedStreamToolsClass extends Template.Class<NBTCompressedStreamToolsHandle> {
|
||||
public final Template.StaticMethod.Converted<NBTTagCompoundHandle> parseTagCompoundFromSNBT = new Template.StaticMethod.Converted<NBTTagCompoundHandle>();
|
||||
public final Template.StaticMethod.Converted<NBTBaseHandle> parseTagFromSNBT = new Template.StaticMethod.Converted<NBTBaseHandle>();
|
||||
public final Template.StaticMethod<String> handleSNBTParseError = new Template.StaticMethod<String>();
|
||||
public final Template.StaticMethod.Converted<Void> uncompressed_writeTag = new Template.StaticMethod.Converted<Void>();
|
||||
public final Template.StaticMethod.Converted<NBTBaseHandle> uncompressed_readTag = new Template.StaticMethod.Converted<NBTBaseHandle>();
|
||||
public final Template.StaticMethod.Converted<Void> uncompressed_writeTagCompound = new Template.StaticMethod.Converted<Void>();
|
||||
|
||||
@@ -29,10 +29,6 @@ public abstract class NBTTagCompoundHandle extends NBTBaseHandle {
|
||||
return T.create.invoke(map);
|
||||
}
|
||||
|
||||
public static NBTBaseHandle fromMojangson(String mojangson) {
|
||||
return T.fromMojangson.invoke(mojangson);
|
||||
}
|
||||
|
||||
public abstract boolean isEmpty();
|
||||
public abstract int size();
|
||||
public abstract Set<String> getKeys();
|
||||
@@ -40,16 +36,10 @@ public abstract class NBTTagCompoundHandle extends NBTBaseHandle {
|
||||
public abstract NBTBaseHandle put(String key, NBTBaseHandle value);
|
||||
public abstract NBTBaseHandle get(String key);
|
||||
public abstract boolean containsKey(String key);
|
||||
|
||||
public NBTTagCompoundHandle clone() {
|
||||
return createHandle(raw_clone());
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
registerTypeInfo(java.util.Map.class, T, T.create.raw::invoke, T.data.raw::get);
|
||||
}
|
||||
|
||||
public com.bergerkiller.bukkit.common.nbt.CommonTagCompound toCommonTag() {
|
||||
return new com.bergerkiller.bukkit.common.nbt.CommonTagCompound(this);
|
||||
}
|
||||
@@ -91,7 +81,6 @@ public abstract class NBTTagCompoundHandle extends NBTBaseHandle {
|
||||
|
||||
public final Template.StaticMethod.Converted<NBTTagCompoundHandle> createEmpty = new Template.StaticMethod.Converted<NBTTagCompoundHandle>();
|
||||
public final Template.StaticMethod.Converted<NBTTagCompoundHandle> create = new Template.StaticMethod.Converted<NBTTagCompoundHandle>();
|
||||
public final Template.StaticMethod.Converted<NBTBaseHandle> fromMojangson = new Template.StaticMethod.Converted<NBTBaseHandle>();
|
||||
|
||||
public final Template.Method<Boolean> isEmpty = new Template.Method<Boolean>();
|
||||
public final Template.Method<Integer> size = new Template.Method<Integer>();
|
||||
|
||||
@@ -38,16 +38,10 @@ public abstract class NBTTagListHandle extends NBTBaseHandle {
|
||||
public abstract NBTBaseHandle remove_at(int index);
|
||||
public abstract void add_at(int index, NBTBaseHandle value);
|
||||
public abstract boolean add(NBTBaseHandle value);
|
||||
|
||||
public NBTTagListHandle clone() {
|
||||
return createHandle(raw_clone());
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
registerTypeInfo(java.util.Collection.class, T, T.create.raw::invoke, T.data.raw::get);
|
||||
}
|
||||
|
||||
public com.bergerkiller.bukkit.common.nbt.CommonTagList toCommonTag() {
|
||||
return new com.bergerkiller.bukkit.common.nbt.CommonTagList(this);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public abstract class NetworkManagerHandle extends Template.Handle {
|
||||
}
|
||||
|
||||
public abstract boolean isConnected();
|
||||
public abstract void queue_sendPacketImpl(Object packet, Object packetsendlistener, boolean flush);
|
||||
public abstract Channel getChannel();
|
||||
public abstract void setChannel(Channel value);
|
||||
/**
|
||||
@@ -37,6 +38,7 @@ public abstract class NetworkManagerHandle extends Template.Handle {
|
||||
public final Template.StaticMethod.Converted<Boolean> queuePacketUnsafe = new Template.StaticMethod.Converted<Boolean>();
|
||||
|
||||
public final Template.Method<Boolean> isConnected = new Template.Method<Boolean>();
|
||||
public final Template.Method.Converted<Void> queue_sendPacketImpl = new Template.Method.Converted<Void>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.chat;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.nbt.CommonTag;
|
||||
import org.bukkit.ChatColor;
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -21,7 +22,36 @@ public abstract class IChatBaseComponentHandle extends Template.Handle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static String chatComponentToJson(IChatBaseComponentHandle chatComponent) {
|
||||
return T.chatComponentToJson.invoke(chatComponent);
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle jsonToChatComponent(String jsonString) {
|
||||
return T.jsonToChatComponent.invoke(jsonString);
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle nbtToChatComponent(CommonTag nbt) {
|
||||
return T.nbtToChatComponent.invoke(nbt);
|
||||
}
|
||||
|
||||
public static CommonTag chatComponentToNBT(IChatBaseComponentHandle chatComponent) {
|
||||
return T.chatComponentToNBT.invoke(chatComponent);
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle empty() {
|
||||
return T.empty.invoke();
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle newLine() {
|
||||
return T.newLine.invoke();
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle modifiersToComponent(Collection<ChatColor> colors) {
|
||||
return T.modifiersToComponent.invoke(colors);
|
||||
}
|
||||
|
||||
public abstract String getText();
|
||||
public abstract boolean isEmpty();
|
||||
public abstract IChatBaseComponentHandle addSibling(IChatBaseComponentHandle sibling);
|
||||
public abstract boolean isMutable();
|
||||
public abstract IChatBaseComponentHandle createCopy();
|
||||
@@ -35,7 +65,16 @@ public abstract class IChatBaseComponentHandle extends Template.Handle {
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class IChatBaseComponentClass extends Template.Class<IChatBaseComponentHandle> {
|
||||
public final Template.StaticMethod.Converted<String> chatComponentToJson = new Template.StaticMethod.Converted<String>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> jsonToChatComponent = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> nbtToChatComponent = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<CommonTag> chatComponentToNBT = new Template.StaticMethod.Converted<CommonTag>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> empty = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> newLine = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> modifiersToComponent = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
|
||||
public final Template.Method<String> getText = new Template.Method<String>();
|
||||
public final Template.Method<Boolean> isEmpty = new Template.Method<Boolean>();
|
||||
public final Template.Method.Converted<IChatBaseComponentHandle> addSibling = new Template.Method.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.Method<Boolean> isMutable = new Template.Method<Boolean>();
|
||||
public final Template.Method.Converted<IChatBaseComponentHandle> createCopy = new Template.Method.Converted<IChatBaseComponentHandle>();
|
||||
@@ -47,58 +86,5 @@ public abstract class IChatBaseComponentHandle extends Template.Handle {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.chat.IChatBaseComponent.ChatSerializer</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.chat.IChatBaseComponent.ChatSerializer")
|
||||
public abstract static class ChatSerializerHandle extends Template.Handle {
|
||||
/** @see ChatSerializerClass */
|
||||
public static final ChatSerializerClass T = Template.Class.create(ChatSerializerClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ChatSerializerHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static String chatComponentToJson(IChatBaseComponentHandle chatComponent) {
|
||||
return T.chatComponentToJson.invoke(chatComponent);
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle jsonToChatComponent(String jsonString) {
|
||||
return T.jsonToChatComponent.invoke(jsonString);
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle empty() {
|
||||
return T.empty.invoke();
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle newLine() {
|
||||
return T.newLine.invoke();
|
||||
}
|
||||
|
||||
public static IChatBaseComponentHandle modifiersToComponent(Collection<ChatColor> colors) {
|
||||
return T.modifiersToComponent.invoke(colors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.chat.IChatBaseComponent.ChatSerializer</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class ChatSerializerClass extends Template.Class<ChatSerializerHandle> {
|
||||
public final Template.StaticMethod.Converted<String> chatComponentToJson = new Template.StaticMethod.Converted<String>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> jsonToChatComponent = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> empty = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> newLine = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
public final Template.StaticMethod.Converted<IChatBaseComponentHandle> modifiersToComponent = new Template.StaticMethod.Converted<IChatBaseComponentHandle>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ public abstract class PacketHandle extends Template.Handle {
|
||||
return T.tryUnwrapBundlePacket.invoker.invoke(null,packet);
|
||||
}
|
||||
|
||||
|
||||
public com.bergerkiller.bukkit.common.protocol.CommonPacket toCommonPacket() {
|
||||
return new com.bergerkiller.bukkit.common.protocol.CommonPacket(getRaw(), getPacketType());
|
||||
}
|
||||
@@ -32,7 +31,6 @@ public abstract class PacketHandle extends Template.Handle {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.getType(getRaw());
|
||||
}
|
||||
|
||||
|
||||
protected final double getProtocolPosition(Template.Field.Byte field_1_8_8, Template.Field.Integer field_1_10_2) {
|
||||
if (field_1_10_2.isAvailable()) {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializePosition_1_10_2(field_1_10_2.getInteger(getRaw()));
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket")
|
||||
public abstract class ClientboundCustomPayloadPacketHandle extends PacketHandle {
|
||||
/** @see ClientboundCustomPayloadPacketClass */
|
||||
public static final ClientboundCustomPayloadPacketClass T = Template.Class.create(ClientboundCustomPayloadPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundCustomPayloadPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundCustomPayloadPacketHandle createNew(String channel, byte[] message) {
|
||||
return T.createNew.invoke(channel, message);
|
||||
}
|
||||
|
||||
public abstract String getChannel();
|
||||
public abstract byte[] getMessage();
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_CUSTOM_PAYLOAD;
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class ClientboundCustomPayloadPacketClass extends Template.Class<ClientboundCustomPayloadPacketHandle> {
|
||||
public final Template.StaticMethod.Converted<ClientboundCustomPayloadPacketHandle> createNew = new Template.StaticMethod.Converted<ClientboundCustomPayloadPacketHandle>();
|
||||
|
||||
public final Template.Method<String> getChannel = new Template.Method<String>();
|
||||
public final Template.Method<byte[]> getMessage = new Template.Method<byte[]>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.ChatText;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutKickDisconnect</b>.
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ClientboundDisconnectPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutKickDisconnect")
|
||||
public abstract class PacketPlayOutKickDisconnectHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutKickDisconnectClass */
|
||||
public static final PacketPlayOutKickDisconnectClass T = Template.Class.create(PacketPlayOutKickDisconnectClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ClientboundDisconnectPacket")
|
||||
public abstract class ClientboundDisconnectPacketHandle extends PacketHandle {
|
||||
/** @see ClientboundDisconnectPacketClass */
|
||||
public static final ClientboundDisconnectPacketClass T = Template.Class.create(ClientboundDisconnectPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutKickDisconnectHandle createHandle(Object handleInstance) {
|
||||
public static ClientboundDisconnectPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ public abstract class PacketPlayOutKickDisconnectHandle extends PacketHandle {
|
||||
public abstract ChatText getReason();
|
||||
public abstract void setReason(ChatText value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutKickDisconnect</b>.
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ClientboundDisconnectPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutKickDisconnectClass extends Template.Class<PacketPlayOutKickDisconnectHandle> {
|
||||
public static final class ClientboundDisconnectPacketClass extends Template.Class<ClientboundDisconnectPacketHandle> {
|
||||
public final Template.Field.Converted<ChatText> reason = new Template.Field.Converted<ChatText>();
|
||||
|
||||
}
|
||||
@@ -1,37 +1,37 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutKeepAlive</b>.
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ClientboundKeepAlivePacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutKeepAlive")
|
||||
public abstract class PacketPlayOutKeepAliveHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutKeepAliveClass */
|
||||
public static final PacketPlayOutKeepAliveClass T = Template.Class.create(PacketPlayOutKeepAliveClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ClientboundKeepAlivePacket")
|
||||
public abstract class ClientboundKeepAlivePacketHandle extends PacketHandle {
|
||||
/** @see ClientboundKeepAlivePacketClass */
|
||||
public static final ClientboundKeepAlivePacketClass T = Template.Class.create(ClientboundKeepAlivePacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutKeepAliveHandle createHandle(Object handleInstance) {
|
||||
public static ClientboundKeepAlivePacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutKeepAliveHandle createNew(long key) {
|
||||
public static ClientboundKeepAlivePacketHandle createNew(long key) {
|
||||
return T.createNew.invoke(key);
|
||||
}
|
||||
|
||||
public abstract long getKey();
|
||||
public abstract void setKey(long key);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutKeepAlive</b>.
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ClientboundKeepAlivePacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutKeepAliveClass extends Template.Class<PacketPlayOutKeepAliveHandle> {
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutKeepAliveHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutKeepAliveHandle>();
|
||||
public static final class ClientboundKeepAlivePacketClass extends Template.Class<ClientboundKeepAlivePacketHandle> {
|
||||
public final Template.StaticMethod.Converted<ClientboundKeepAlivePacketHandle> createNew = new Template.StaticMethod.Converted<ClientboundKeepAlivePacketHandle>();
|
||||
|
||||
public final Template.Method<Long> getKey = new Template.Method<Long>();
|
||||
public final Template.Method<Void> setKey = new Template.Method<Void>();
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.Optional
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket")
|
||||
public abstract class ClientboundResourcePackPopPacketHandle extends Template.Handle {
|
||||
/** @see ClientboundResourcePackPopPacketClass */
|
||||
public static final ClientboundResourcePackPopPacketClass T = Template.Class.create(ClientboundResourcePackPopPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundResourcePackPopPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract Optional<UUID> getId();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class ClientboundResourcePackPopPacketClass extends Template.Class<ClientboundResourcePackPopPacketHandle> {
|
||||
public final Template.Method<Optional<UUID>> getId = new Template.Method<Optional<UUID>>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.ChatText;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutResourcePackSend</b>.
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutResourcePackSend")
|
||||
public abstract class PacketPlayOutResourcePackSendHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutResourcePackSendClass */
|
||||
public static final PacketPlayOutResourcePackSendClass T = Template.Class.create(PacketPlayOutResourcePackSendClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket")
|
||||
public abstract class ClientboundResourcePackPushPacketHandle extends PacketHandle {
|
||||
/** @see ClientboundResourcePackPushPacketClass */
|
||||
public static final ClientboundResourcePackPushPacketClass T = Template.Class.create(ClientboundResourcePackPushPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutResourcePackSendHandle createHandle(Object handleInstance) {
|
||||
public static ClientboundResourcePackPushPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
@@ -25,15 +26,16 @@ public abstract class PacketPlayOutResourcePackSendHandle extends PacketHandle {
|
||||
public abstract boolean isRequired();
|
||||
public abstract void setPrompt(ChatText prompt);
|
||||
public abstract ChatText getPrompt();
|
||||
public abstract UUID getId();
|
||||
public abstract String getUrl();
|
||||
public abstract void setUrl(String value);
|
||||
public abstract String getHash();
|
||||
public abstract void setHash(String value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutResourcePackSend</b>.
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutResourcePackSendClass extends Template.Class<PacketPlayOutResourcePackSendHandle> {
|
||||
public static final class ClientboundResourcePackPushPacketClass extends Template.Class<ClientboundResourcePackPushPacketHandle> {
|
||||
public final Template.Field<String> url = new Template.Field<String>();
|
||||
public final Template.Field<String> hash = new Template.Field<String>();
|
||||
|
||||
@@ -41,6 +43,7 @@ public abstract class PacketPlayOutResourcePackSendHandle extends PacketHandle {
|
||||
public final Template.Method<Boolean> isRequired = new Template.Method<Boolean>();
|
||||
public final Template.Method.Converted<Void> setPrompt = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<ChatText> getPrompt = new Template.Method.Converted<ChatText>();
|
||||
public final Template.Method<UUID> getId = new Template.Method<UUID>();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.HumanHand;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ServerboundClientInformationPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ServerboundClientInformationPacket")
|
||||
public abstract class ServerboundClientInformationPacketHandle extends PacketHandle {
|
||||
/** @see ServerboundClientInformationPacketClass */
|
||||
public static final ServerboundClientInformationPacketClass T = Template.Class.create(ServerboundClientInformationPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ServerboundClientInformationPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract String getLocale();
|
||||
public abstract int getView();
|
||||
public abstract Object getChatVisibility();
|
||||
public abstract boolean getEnableColors();
|
||||
public abstract int getModelPartFlags();
|
||||
public abstract HumanHand getMainHand();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ServerboundClientInformationPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class ServerboundClientInformationPacketClass extends Template.Class<ServerboundClientInformationPacketHandle> {
|
||||
public final Template.Method<String> getLocale = new Template.Method<String>();
|
||||
public final Template.Method<Integer> getView = new Template.Method<Integer>();
|
||||
public final Template.Method<Object> getChatVisibility = new Template.Method<Object>();
|
||||
public final Template.Method<Boolean> getEnableColors = new Template.Method<Boolean>();
|
||||
public final Template.Method<Integer> getModelPartFlags = new Template.Method<Integer>();
|
||||
public final Template.Method.Converted<HumanHand> getMainHand = new Template.Method.Converted<HumanHand>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayInKeepAlive</b>.
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ServerboundKeepAlivePacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayInKeepAlive")
|
||||
public abstract class PacketPlayInKeepAliveHandle extends PacketHandle {
|
||||
/** @see PacketPlayInKeepAliveClass */
|
||||
public static final PacketPlayInKeepAliveClass T = Template.Class.create(PacketPlayInKeepAliveClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ServerboundKeepAlivePacket")
|
||||
public abstract class ServerboundKeepAlivePacketHandle extends PacketHandle {
|
||||
/** @see ServerboundKeepAlivePacketClass */
|
||||
public static final ServerboundKeepAlivePacketClass T = Template.Class.create(ServerboundKeepAlivePacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayInKeepAliveHandle createHandle(Object handleInstance) {
|
||||
public static ServerboundKeepAlivePacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ public abstract class PacketPlayInKeepAliveHandle extends PacketHandle {
|
||||
public abstract long getKey();
|
||||
public abstract void setKey(long key);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInKeepAlive</b>.
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ServerboundKeepAlivePacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInKeepAliveClass extends Template.Class<PacketPlayInKeepAliveHandle> {
|
||||
public static final class ServerboundKeepAlivePacketClass extends Template.Class<ServerboundKeepAlivePacketHandle> {
|
||||
public final Template.Method<Long> getKey = new Template.Method<Long>();
|
||||
public final Template.Method<Void> setKey = new Template.Method<Void>();
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.common;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayInResourcePackStatus</b>.
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.common.ServerboundResourcePackPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayInResourcePackStatus")
|
||||
public abstract class PacketPlayInResourcePackStatusHandle extends PacketHandle {
|
||||
/** @see PacketPlayInResourcePackStatusClass */
|
||||
public static final PacketPlayInResourcePackStatusClass T = Template.Class.create(PacketPlayInResourcePackStatusClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
@Template.InstanceType("net.minecraft.network.protocol.common.ServerboundResourcePackPacket")
|
||||
public abstract class ServerboundResourcePackPacketHandle extends PacketHandle {
|
||||
/** @see ServerboundResourcePackPacketClass */
|
||||
public static final ServerboundResourcePackPacketClass T = Template.Class.create(ServerboundResourcePackPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayInResourcePackStatusHandle createHandle(Object handleInstance) {
|
||||
public static ServerboundResourcePackPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ public abstract class PacketPlayInResourcePackStatusHandle extends PacketHandle
|
||||
public abstract Object getStatus();
|
||||
public abstract void setStatus(Object value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInResourcePackStatus</b>.
|
||||
* Stores class members for <b>net.minecraft.network.protocol.common.ServerboundResourcePackPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInResourcePackStatusClass extends Template.Class<PacketPlayInResourcePackStatusHandle> {
|
||||
public static final class ServerboundResourcePackPacketClass extends Template.Class<ServerboundResourcePackPacketHandle> {
|
||||
@Template.Optional
|
||||
public final Template.Field<String> message = new Template.Field<String>();
|
||||
public final Template.Field.Converted<Object> status = new Template.Field.Converted<Object>();
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.vehicle.NewMinecartBehaviorHandle.LerpStepHandle;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.ClientboundMoveMinecartPacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.Optional
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.ClientboundMoveMinecartPacket")
|
||||
public abstract class ClientboundMoveMinecartPacketHandle extends PacketHandle {
|
||||
/** @see ClientboundMoveMinecartPacketClass */
|
||||
public static final ClientboundMoveMinecartPacketClass T = Template.Class.create(ClientboundMoveMinecartPacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundMoveMinecartPacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundMoveMinecartPacketHandle createNew(int entityId, List<LerpStepHandle> lerpSteps) {
|
||||
return T.createNew.invoke(entityId, lerpSteps);
|
||||
}
|
||||
|
||||
public abstract int getEntityId();
|
||||
public abstract List<LerpStepHandle> getLerpSteps();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.ClientboundMoveMinecartPacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class ClientboundMoveMinecartPacketClass extends Template.Class<ClientboundMoveMinecartPacketHandle> {
|
||||
public final Template.StaticMethod.Converted<ClientboundMoveMinecartPacketHandle> createNew = new Template.StaticMethod.Converted<ClientboundMoveMinecartPacketHandle>();
|
||||
|
||||
public final Template.Method<Integer> getEntityId = new Template.Method<Integer>();
|
||||
public final Template.Method.Converted<List<LerpStepHandle>> getLerpSteps = new Template.Method.Converted<List<LerpStepHandle>>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,6 @@ public abstract class ClientboundPlayerInfoUpdatePacketHandle extends PacketHand
|
||||
public abstract int getPing();
|
||||
public abstract GameMode getGameMode();
|
||||
public abstract ChatText getListName();
|
||||
|
||||
public static PlayerInfoDataHandle createNew(ClientboundPlayerInfoUpdatePacketHandle packet, GameProfileHandle profile, int ping, org.bukkit.GameMode gameMode, ChatText listName) {
|
||||
return createNew(packet, profile, ping, gameMode, listName, true); // Listed like olden times
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.ClientboundResetScorePacket</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.ClientboundResetScorePacket")
|
||||
public abstract class ClientboundResetScorePacketHandle extends PacketHandle {
|
||||
/** @see ClientboundResetScorePacketClass */
|
||||
public static final ClientboundResetScorePacketClass T = Template.Class.create(ClientboundResetScorePacketClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundResetScorePacketHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static ClientboundResetScorePacketHandle createNew(String name, String objectiveName) {
|
||||
return T.createNew.invoke(name, objectiveName);
|
||||
}
|
||||
|
||||
public abstract String getName();
|
||||
public abstract void setName(String value);
|
||||
public abstract String getObjName();
|
||||
public abstract void setObjName(String value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.ClientboundResetScorePacket</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class ClientboundResetScorePacketClass extends Template.Class<ClientboundResetScorePacketHandle> {
|
||||
public final Template.Field<String> name = new Template.Field<String>();
|
||||
public final Template.Field<String> objName = new Template.Field<String>();
|
||||
|
||||
public final Template.StaticMethod.Converted<ClientboundResetScorePacketHandle> createNew = new Template.StaticMethod.Converted<ClientboundResetScorePacketHandle>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ public abstract class PacketPlayInArmAnimationHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public com.bergerkiller.bukkit.common.wrappers.HumanHand getHand(org.bukkit.entity.HumanEntity humanEntity) {
|
||||
return internalGetHand(T.enumHand, humanEntity);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,10 @@ public abstract class PacketPlayInBlockPlaceHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public abstract float getYaw();
|
||||
public abstract float getPitch();
|
||||
public abstract void setYaw(float yaw);
|
||||
public abstract void setPitch(float pitch);
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.IN_BLOCK_PLACE;
|
||||
@@ -49,6 +52,11 @@ public abstract class PacketPlayInBlockPlaceHandle extends PacketHandle {
|
||||
@Template.Optional
|
||||
public final Template.Field.Long timestamp = new Template.Field.Long();
|
||||
|
||||
public final Template.Method<Float> getYaw = new Template.Method<Float>();
|
||||
public final Template.Method<Float> getPitch = new Template.Method<Float>();
|
||||
public final Template.Method<Void> setYaw = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setPitch = new Template.Method<Void>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayInClientCommand</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayInClientCommand")
|
||||
public abstract class PacketPlayInClientCommandHandle extends PacketHandle {
|
||||
/** @see PacketPlayInClientCommandClass */
|
||||
public static final PacketPlayInClientCommandClass T = Template.Class.create(PacketPlayInClientCommandClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayInClientCommandHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract Object getAction();
|
||||
public abstract void setAction(Object value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInClientCommand</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInClientCommandClass extends Template.Class<PacketPlayInClientCommandHandle> {
|
||||
public final Template.Field.Converted<Object> action = new Template.Field.Converted<Object>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,17 +21,21 @@ public abstract class PacketPlayInSetCreativeSlotHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getSlot();
|
||||
public abstract void setSlot(int value);
|
||||
public static PacketPlayInSetCreativeSlotHandle createNew(int slotIndex, ItemStack item) {
|
||||
return T.createNew.invoke(slotIndex, item);
|
||||
}
|
||||
|
||||
public abstract ItemStack getItem();
|
||||
public abstract void setItem(ItemStack value);
|
||||
public abstract int getSlotIndex();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInSetCreativeSlot</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInSetCreativeSlotClass extends Template.Class<PacketPlayInSetCreativeSlotHandle> {
|
||||
public final Template.Field.Integer slot = new Template.Field.Integer();
|
||||
public final Template.Field.Converted<ItemStack> item = new Template.Field.Converted<ItemStack>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayInSetCreativeSlotHandle> createNew = new Template.StaticMethod.Converted<PacketPlayInSetCreativeSlotHandle>();
|
||||
|
||||
public final Template.Method.Converted<ItemStack> getItem = new Template.Method.Converted<ItemStack>();
|
||||
public final Template.Method<Integer> getSlotIndex = new Template.Method<Integer>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.HumanHand;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayInSettings</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayInSettings")
|
||||
public abstract class PacketPlayInSettingsHandle extends PacketHandle {
|
||||
/** @see PacketPlayInSettingsClass */
|
||||
public static final PacketPlayInSettingsClass T = Template.Class.create(PacketPlayInSettingsClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayInSettingsHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public HumanHand getMainHand() {
|
||||
if (T.mainHand.isAvailable()) {
|
||||
return T.mainHand.get(getRaw());
|
||||
} else {
|
||||
return HumanHand.RIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
public void setMainHand(HumanHand mainHand) {
|
||||
if (T.mainHand.isAvailable()) {
|
||||
T.mainHand.set(getRaw(), mainHand);
|
||||
}
|
||||
}
|
||||
public abstract String getLocale();
|
||||
public abstract void setLocale(String value);
|
||||
public abstract int getView();
|
||||
public abstract void setView(int value);
|
||||
public abstract Object getChatVisibility();
|
||||
public abstract void setChatVisibility(Object value);
|
||||
public abstract boolean isEnableColors();
|
||||
public abstract void setEnableColors(boolean value);
|
||||
public abstract int getModelPartFlags();
|
||||
public abstract void setModelPartFlags(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInSettings</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInSettingsClass extends Template.Class<PacketPlayInSettingsHandle> {
|
||||
public final Template.Field<String> locale = new Template.Field<String>();
|
||||
public final Template.Field.Integer view = new Template.Field.Integer();
|
||||
public final Template.Field.Converted<Object> chatVisibility = new Template.Field.Converted<Object>();
|
||||
public final Template.Field.Boolean enableColors = new Template.Field.Boolean();
|
||||
public final Template.Field.Integer modelPartFlags = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Converted<HumanHand> mainHand = new Template.Field.Converted<HumanHand>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,23 +20,35 @@ public abstract class PacketPlayInSteerVehicleHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayInSteerVehicleHandle createNew(boolean isLeft, boolean isRight, boolean isForward, boolean isBackward, boolean isJump, boolean isUnmount, boolean isSprint) {
|
||||
return T.createNew.invokeVA(isLeft, isRight, isForward, isBackward, isJump, isUnmount, isSprint);
|
||||
}
|
||||
|
||||
public abstract boolean isLeft();
|
||||
public abstract boolean isRight();
|
||||
public abstract boolean isForward();
|
||||
public abstract boolean isBackward();
|
||||
public abstract float getSideways();
|
||||
public abstract void setSideways(float value);
|
||||
public abstract float getForwards();
|
||||
public abstract void setForwards(float value);
|
||||
public abstract boolean isJump();
|
||||
public abstract void setJump(boolean value);
|
||||
public abstract boolean isUnmount();
|
||||
public abstract void setUnmount(boolean value);
|
||||
public abstract boolean isSprint();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInSteerVehicle</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInSteerVehicleClass extends Template.Class<PacketPlayInSteerVehicleHandle> {
|
||||
public final Template.Field.Float sideways = new Template.Field.Float();
|
||||
public final Template.Field.Float forwards = new Template.Field.Float();
|
||||
public final Template.Field.Boolean jump = new Template.Field.Boolean();
|
||||
public final Template.Field.Boolean unmount = new Template.Field.Boolean();
|
||||
public final Template.StaticMethod.Converted<PacketPlayInSteerVehicleHandle> createNew = new Template.StaticMethod.Converted<PacketPlayInSteerVehicleHandle>();
|
||||
|
||||
public final Template.Method<Boolean> isLeft = new Template.Method<Boolean>();
|
||||
public final Template.Method<Boolean> isRight = new Template.Method<Boolean>();
|
||||
public final Template.Method<Boolean> isForward = new Template.Method<Boolean>();
|
||||
public final Template.Method<Boolean> isBackward = new Template.Method<Boolean>();
|
||||
public final Template.Method<Float> getSideways = new Template.Method<Float>();
|
||||
public final Template.Method<Float> getForwards = new Template.Method<Float>();
|
||||
public final Template.Method<Boolean> isJump = new Template.Method<Boolean>();
|
||||
public final Template.Method<Boolean> isUnmount = new Template.Method<Boolean>();
|
||||
public final Template.Method<Boolean> isSprint = new Template.Method<Boolean>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ public abstract class PacketPlayInUseItemHandle extends PacketHandle {
|
||||
public abstract void setDeltaX(float dx);
|
||||
public abstract void setDeltaY(float dy);
|
||||
public abstract void setDeltaZ(float dz);
|
||||
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.IN_USE_ITEM;
|
||||
|
||||
@@ -21,26 +21,29 @@ public abstract class PacketPlayInVehicleMoveHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayInVehicleMoveHandle createNew(double posX, double posY, double posZ, float yaw, float pitch, boolean onGround) {
|
||||
return T.createNew.invokeVA(posX, posY, posZ, yaw, pitch, onGround);
|
||||
}
|
||||
|
||||
public abstract double getPosX();
|
||||
public abstract void setPosX(double value);
|
||||
public abstract double getPosY();
|
||||
public abstract void setPosY(double value);
|
||||
public abstract double getPosZ();
|
||||
public abstract void setPosZ(double value);
|
||||
public abstract float getYaw();
|
||||
public abstract void setYaw(float value);
|
||||
public abstract float getPitch();
|
||||
public abstract void setPitch(float value);
|
||||
public abstract boolean isOnGround();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayInVehicleMove</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayInVehicleMoveClass extends Template.Class<PacketPlayInVehicleMoveHandle> {
|
||||
public final Template.Field.Double posX = new Template.Field.Double();
|
||||
public final Template.Field.Double posY = new Template.Field.Double();
|
||||
public final Template.Field.Double posZ = new Template.Field.Double();
|
||||
public final Template.Field.Float yaw = new Template.Field.Float();
|
||||
public final Template.Field.Float pitch = new Template.Field.Float();
|
||||
public final Template.StaticMethod.Converted<PacketPlayInVehicleMoveHandle> createNew = new Template.StaticMethod.Converted<PacketPlayInVehicleMoveHandle>();
|
||||
|
||||
public final Template.Method<Double> getPosX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getPosY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getPosZ = new Template.Method<Double>();
|
||||
public final Template.Method<Float> getYaw = new Template.Method<Float>();
|
||||
public final Template.Method<Float> getPitch = new Template.Method<Float>();
|
||||
public final Template.Method<Boolean> isOnGround = new Template.Method<Boolean>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.InventoryClickType;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayInWindowClick</b>.
|
||||
@@ -24,12 +23,10 @@ public abstract class PacketPlayInWindowClickHandle extends PacketHandle {
|
||||
|
||||
public abstract int getWindowId();
|
||||
public abstract void setWindowId(int value);
|
||||
public abstract int getSlot();
|
||||
public abstract void setSlot(int value);
|
||||
public abstract int getButton();
|
||||
public abstract void setButton(int value);
|
||||
public abstract ItemStack getItem();
|
||||
public abstract void setItem(ItemStack value);
|
||||
public abstract short getSlot();
|
||||
public abstract void setSlot(short value);
|
||||
public abstract byte getButton();
|
||||
public abstract void setButton(byte value);
|
||||
public abstract InventoryClickType getMode();
|
||||
public abstract void setMode(InventoryClickType value);
|
||||
/**
|
||||
@@ -38,9 +35,8 @@ public abstract class PacketPlayInWindowClickHandle extends PacketHandle {
|
||||
*/
|
||||
public static final class PacketPlayInWindowClickClass extends Template.Class<PacketPlayInWindowClickHandle> {
|
||||
public final Template.Field.Integer windowId = new Template.Field.Integer();
|
||||
public final Template.Field.Integer slot = new Template.Field.Integer();
|
||||
public final Template.Field.Integer button = new Template.Field.Integer();
|
||||
public final Template.Field.Converted<ItemStack> item = new Template.Field.Converted<ItemStack>();
|
||||
public final Template.Field.Converted<Short> slot = new Template.Field.Converted<Short>();
|
||||
public final Template.Field.Converted<Byte> button = new Template.Field.Converted<Byte>();
|
||||
public final Template.Field.Converted<InventoryClickType> mode = new Template.Field.Converted<InventoryClickType>();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutAnimation</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutAnimation")
|
||||
public abstract class PacketPlayOutAnimationHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutAnimationClass */
|
||||
public static final PacketPlayOutAnimationClass T = Template.Class.create(PacketPlayOutAnimationClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutAnimationHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract int getAction();
|
||||
public abstract void setAction(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutAnimation</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutAnimationClass extends Template.Class<PacketPlayOutAnimationHandle> {
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
public final Template.Field.Integer action = new Template.Field.Integer();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ public abstract class PacketPlayOutAttachEntityHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutAttachEntityHandle createNew() {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
public static PacketPlayOutAttachEntityHandle createNewMount(Entity passengerEntity, Entity vehicleEntity) {
|
||||
return T.createNewMount.invoke(passengerEntity, vehicleEntity);
|
||||
}
|
||||
@@ -31,9 +35,8 @@ public abstract class PacketPlayOutAttachEntityHandle extends PacketHandle {
|
||||
|
||||
public abstract boolean isLeash();
|
||||
public abstract void setIsLeash(boolean isLeash);
|
||||
|
||||
public static PacketPlayOutAttachEntityHandle createNewLeash(int leashedEntityId, int holderEntityId) {
|
||||
PacketPlayOutAttachEntityHandle packet = T.newHandleNull();
|
||||
PacketPlayOutAttachEntityHandle packet = createNew();
|
||||
packet.setVehicleId(holderEntityId);
|
||||
packet.setPassengerId(leashedEntityId);
|
||||
packet.setIsLeash(true);
|
||||
@@ -44,7 +47,7 @@ public abstract class PacketPlayOutAttachEntityHandle extends PacketHandle {
|
||||
if (!T.leashId.isAvailable()) {
|
||||
throw new UnsupportedOperationException("Not supported >= MC 1.9, use Mount packet instead");
|
||||
}
|
||||
PacketPlayOutAttachEntityHandle packet = T.newHandleNull();
|
||||
PacketPlayOutAttachEntityHandle packet = createNew();
|
||||
packet.setVehicleId(vehicleEntityId);
|
||||
packet.setPassengerId(passengerEntityId);
|
||||
packet.setIsLeash(false);
|
||||
@@ -64,6 +67,7 @@ public abstract class PacketPlayOutAttachEntityHandle extends PacketHandle {
|
||||
public final Template.Field.Integer passengerId = new Template.Field.Integer();
|
||||
public final Template.Field.Integer vehicleId = new Template.Field.Integer();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutAttachEntityHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutAttachEntityHandle>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutAttachEntityHandle> createNewMount = new Template.StaticMethod.Converted<PacketPlayOutAttachEntityHandle>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutAttachEntityHandle> createNewLeash = new Template.StaticMethod.Converted<PacketPlayOutAttachEntityHandle>();
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.bases.IntVector3;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutBed</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.Optional
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutBed")
|
||||
public abstract class PacketPlayOutBedHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutBedClass */
|
||||
public static final PacketPlayOutBedClass T = Template.Class.create(PacketPlayOutBedClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutBedHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract IntVector3 getBedPosition();
|
||||
public abstract void setBedPosition(IntVector3 value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutBed</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutBedClass extends Template.Class<PacketPlayOutBedHandle> {
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
public final Template.Field.Converted<IntVector3> bedPosition = new Template.Field.Converted<IntVector3>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,10 @@ public abstract class PacketPlayOutBlockChangeHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutBlockChangeHandle createNewNull() {
|
||||
return T.createNewNull.invoke();
|
||||
}
|
||||
|
||||
public static PacketPlayOutBlockChangeHandle createNew(IntVector3 position, BlockData blockData) {
|
||||
return T.createNew.invoke(position, blockData);
|
||||
}
|
||||
@@ -38,6 +42,7 @@ public abstract class PacketPlayOutBlockChangeHandle extends PacketHandle {
|
||||
public final Template.Field.Converted<IntVector3> position = new Template.Field.Converted<IntVector3>();
|
||||
public final Template.Field.Converted<BlockData> blockData = new Template.Field.Converted<BlockData>();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutBlockChangeHandle> createNewNull = new Template.StaticMethod.Converted<PacketPlayOutBlockChangeHandle>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutBlockChangeHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutBlockChangeHandle>();
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ public abstract class PacketPlayOutCameraHandle extends PacketHandle {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
|
||||
public static PacketPlayOutCameraHandle createNew(int entityId) {
|
||||
PacketPlayOutCameraHandle packet = createNew();
|
||||
packet.setEntityId(entityId);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutCloseWindow</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutCloseWindow")
|
||||
public abstract class PacketPlayOutCloseWindowHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutCloseWindowClass */
|
||||
public static final PacketPlayOutCloseWindowClass T = Template.Class.create(PacketPlayOutCloseWindowClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutCloseWindowHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getWindowId();
|
||||
public abstract void setWindowId(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutCloseWindow</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutCloseWindowClass extends Template.Class<PacketPlayOutCloseWindowHandle> {
|
||||
public final Template.Field.Integer windowId = new Template.Field.Integer();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,49 +1,26 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutCustomPayload</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
* @deprecated This class is moved to {@link com.bergerkiller.generated.net.minecraft.network.protocol.common.ClientboundCustomPayloadPacketHandle}
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutCustomPayload")
|
||||
public abstract class PacketPlayOutCustomPayloadHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutCustomPayloadClass */
|
||||
public static final PacketPlayOutCustomPayloadClass T = Template.Class.create(PacketPlayOutCustomPayloadClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
@Deprecated
|
||||
public class PacketPlayOutCustomPayloadHandle extends PacketHandle {
|
||||
private final Object raw;
|
||||
|
||||
public static PacketPlayOutCustomPayloadHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
private PacketPlayOutCustomPayloadHandle(Object raw) {
|
||||
this.raw = raw;
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutCustomPayloadHandle createNew(String channel, byte[] message) {
|
||||
return T.createNew.invoke(channel, message);
|
||||
return new PacketPlayOutCustomPayloadHandle(
|
||||
com.bergerkiller.generated.net.minecraft.network.protocol.common.ClientboundCustomPayloadPacketHandle.createNew(
|
||||
channel, message).getRaw());
|
||||
}
|
||||
|
||||
public abstract byte[] getMessage();
|
||||
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_CUSTOM_PAYLOAD;
|
||||
public Object getRaw() {
|
||||
return raw;
|
||||
}
|
||||
public abstract String getChannel();
|
||||
public abstract void setChannel(String value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutCustomPayload</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutCustomPayloadClass extends Template.Class<PacketPlayOutCustomPayloadHandle> {
|
||||
public final Template.Field.Converted<String> channel = new Template.Field.Converted<String>();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutCustomPayloadHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutCustomPayloadHandle>();
|
||||
|
||||
public final Template.Method<byte[]> getMessage = new Template.Method<byte[]>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,14 +39,22 @@ public abstract class PacketPlayOutCustomSoundEffectHandle extends PacketHandle
|
||||
public abstract long getRandomSeed();
|
||||
public abstract void setRandomSeed(long seed);
|
||||
|
||||
public static final java.util.Random SOUND_RANDOM_SEED_SOURCE = new java.util.Random();
|
||||
|
||||
public static PacketPlayOutCustomSoundEffectHandle createNew(com.bergerkiller.bukkit.common.resources.ResourceKey<com.bergerkiller.bukkit.common.resources.SoundEffect> soundEffect, String category, org.bukkit.Location location, float volume, float pitch) {
|
||||
return createNew(soundEffect, category, location.getWorld(), location.getX(), location.getY(), location.getZ(), volume, pitch);
|
||||
return createNew(soundEffect, category, location.getX(), location.getY(), location.getZ(), volume, pitch);
|
||||
}
|
||||
|
||||
public static PacketPlayOutCustomSoundEffectHandle createNew(com.bergerkiller.bukkit.common.resources.ResourceKey<com.bergerkiller.bukkit.common.resources.SoundEffect> soundEffect, String category, org.bukkit.World world, double x, double y, double z, float volume, float pitch) {
|
||||
long randomSeed = com.bergerkiller.bukkit.common.utils.WorldUtil.getRandom(world).nextLong();
|
||||
public static PacketPlayOutCustomSoundEffectHandle createNew(com.bergerkiller.bukkit.common.resources.ResourceKey<com.bergerkiller.bukkit.common.resources.SoundEffect> soundEffect, String category, double x, double y, double z, float volume, float pitch) {
|
||||
long randomSeed = SOUND_RANDOM_SEED_SOURCE.nextLong();
|
||||
return createNew(soundEffect, category, x, y, z, volume, pitch, randomSeed);
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public static PacketPlayOutCustomSoundEffectHandle createNew(com.bergerkiller.bukkit.common.resources.ResourceKey<com.bergerkiller.bukkit.common.resources.SoundEffect> soundEffect, String category, org.bukkit.World world, double x, double y, double z, float volume, float pitch) {
|
||||
return createNew(soundEffect, category, x, y, z, volume, pitch);
|
||||
}
|
||||
public abstract ResourceKey<SoundEffect> getSound();
|
||||
public abstract void setSound(ResourceKey<SoundEffect> value);
|
||||
public abstract float getVolume();
|
||||
|
||||
@@ -34,7 +34,6 @@ public abstract class PacketPlayOutEntityDestroyHandle extends PacketHandle {
|
||||
public abstract int[] getEntityIds();
|
||||
public abstract void setSingleEntityId(int entityId);
|
||||
public abstract void setMultipleEntityIds(int[] multipleEntityIds);
|
||||
|
||||
public static boolean canDestroyMultiple() {
|
||||
return com.bergerkiller.bukkit.common.internal.CommonCapabilities.PACKET_DESTROY_MULTIPLE;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.Holder;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.effect.MobEffectListHandle;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutEntityEffect</b>.
|
||||
@@ -20,22 +21,33 @@ public abstract class PacketPlayOutEntityEffectHandle extends PacketHandle {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
public static final PacketPlayOutEntityEffectHandle createNew(int entityId, PotionEffect mobeffect) {
|
||||
return T.constr_entityId_mobeffect.newInstance(entityId, mobeffect);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract PotionEffectType getEffect();
|
||||
public abstract void setEffect(PotionEffectType type);
|
||||
public static PacketPlayOutEntityEffectHandle createNew(int entityId, PotionEffect effect, boolean blend) {
|
||||
return T.createNew.invoke(entityId, effect, blend);
|
||||
}
|
||||
|
||||
public abstract int getEffectAmplifier();
|
||||
public abstract void setEffectAmplifier(int amplifier);
|
||||
public abstract Holder<MobEffectListHandle> getEffect();
|
||||
public abstract void setEffect(Holder<MobEffectListHandle> effect);
|
||||
public static final int FLAG_AMBIENT = 1;
|
||||
public static final int FLAG_VISIBLE = 2;
|
||||
public static final int FLAG_SHOW_ICON = 4;
|
||||
|
||||
public org.bukkit.potion.PotionEffectType getPotionEffectType() {
|
||||
return MobEffectListHandle.holderToBukkit(getEffect());
|
||||
}
|
||||
|
||||
public void setPotionEffectType(org.bukkit.potion.PotionEffectType effectType) {
|
||||
setEffect(MobEffectListHandle.holderFromBukkit(effectType));
|
||||
}
|
||||
|
||||
public static PacketPlayOutEntityEffectHandle createNew(int entityId, org.bukkit.potion.PotionEffect effect) {
|
||||
return createNew(entityId, effect, false);
|
||||
}
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract byte getEffectAmplifier();
|
||||
public abstract void setEffectAmplifier(byte value);
|
||||
public abstract int getEffectDurationTicks();
|
||||
public abstract void setEffectDurationTicks(int value);
|
||||
public abstract byte getFlags();
|
||||
@@ -45,14 +57,15 @@ public abstract class PacketPlayOutEntityEffectHandle extends PacketHandle {
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutEntityEffectClass extends Template.Class<PacketPlayOutEntityEffectHandle> {
|
||||
public final Template.Constructor.Converted<PacketPlayOutEntityEffectHandle> constr_entityId_mobeffect = new Template.Constructor.Converted<PacketPlayOutEntityEffectHandle>();
|
||||
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
public final Template.Field.Byte effectAmplifier = new Template.Field.Byte();
|
||||
public final Template.Field.Integer effectDurationTicks = new Template.Field.Integer();
|
||||
public final Template.Field.Byte flags = new Template.Field.Byte();
|
||||
|
||||
public final Template.Method.Converted<PotionEffectType> getEffect = new Template.Method.Converted<PotionEffectType>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutEntityEffectHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutEntityEffectHandle>();
|
||||
|
||||
public final Template.Method<Integer> getEffectAmplifier = new Template.Method<Integer>();
|
||||
public final Template.Method<Void> setEffectAmplifier = new Template.Method<Void>();
|
||||
public final Template.Method.Converted<Holder<MobEffectListHandle>> getEffect = new Template.Method.Converted<Holder<MobEffectListHandle>>();
|
||||
public final Template.Method.Converted<Void> setEffect = new Template.Method.Converted<Void>();
|
||||
|
||||
}
|
||||
|
||||
@@ -22,15 +22,43 @@ public abstract class PacketPlayOutEntityEquipmentHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutEntityEquipmentHandle createNew(int entityId, EquipmentSlot slot, ItemStack itemStack) {
|
||||
return T.createNew.invoke(entityId, slot, itemStack);
|
||||
public static PacketPlayOutEntityEquipmentHandle createNew(OwnerType ownerType, int entityId, EquipmentSlot slot, ItemStack itemStack) {
|
||||
return T.createNew.invoke(ownerType, entityId, slot, itemStack);
|
||||
}
|
||||
|
||||
public abstract int getSlotCount();
|
||||
public abstract EquipmentSlot getEquipmentSlot(int index);
|
||||
public abstract void setEquipmentSlot(int index, EquipmentSlot slot);
|
||||
public abstract EquipmentSlot getEquipmentSlot(OwnerType ownerType, int index);
|
||||
public abstract void setEquipmentSlot(OwnerType ownerType, int index, EquipmentSlot slot);
|
||||
public abstract ItemStack getItemStack(int index);
|
||||
public abstract void setItemStack(int index, ItemStack itemStack);
|
||||
public enum OwnerType {
|
||||
NON_PLAYER(false), PLAYER(true);
|
||||
|
||||
private final boolean isPlayer;
|
||||
|
||||
OwnerType(boolean isPlayer) {
|
||||
this.isPlayer = isPlayer;
|
||||
}
|
||||
|
||||
public boolean isPlayer() {
|
||||
return isPlayer;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static PacketPlayOutEntityEquipmentHandle createNew(int entityId, org.bukkit.inventory.EquipmentSlot slot, org.bukkit.inventory.ItemStack itemStack) {
|
||||
return createNew(OwnerType.NON_PLAYER, entityId, slot, itemStack);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public org.bukkit.inventory.EquipmentSlot getEquipmentSlot(int index) {
|
||||
return getEquipmentSlot(OwnerType.NON_PLAYER, index);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setEquipmentSlot(int index, org.bukkit.inventory.EquipmentSlot slot) {
|
||||
setEquipmentSlot(OwnerType.NON_PLAYER, index, slot);
|
||||
}
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,6 @@ public abstract class PacketPlayOutEntityHandle extends PacketHandle {
|
||||
public abstract void setYaw(float yaw);
|
||||
public abstract void setPitch(float pitch);
|
||||
|
||||
|
||||
@Deprecated
|
||||
public float getDeltaYaw() {
|
||||
return getYaw();
|
||||
@@ -101,7 +100,6 @@ public abstract class PacketPlayOutEntityHandle extends PacketHandle {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_ENTITY_LOOK;
|
||||
@@ -148,7 +146,6 @@ public abstract class PacketPlayOutEntityHandle extends PacketHandle {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_ENTITY_MOVE;
|
||||
@@ -196,7 +193,6 @@ public abstract class PacketPlayOutEntityHandle extends PacketHandle {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_ENTITY_MOVE_LOOK;
|
||||
|
||||
@@ -27,7 +27,6 @@ public abstract class PacketPlayOutEntityHeadRotationHandle extends PacketHandle
|
||||
|
||||
public abstract float getHeadYaw();
|
||||
public abstract void setHeadYaw(float headYaw);
|
||||
|
||||
public static PacketPlayOutEntityHeadRotationHandle createNew() {
|
||||
return T.createNewEmpty.invoke();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ public abstract class PacketPlayOutEntityMetadataHandle extends PacketHandle {
|
||||
return T.createForChanges.invoke(entityId, datawatcher);
|
||||
}
|
||||
|
||||
|
||||
public static PacketPlayOutEntityMetadataHandle createNew(int entityId, DataWatcher datawatcher, boolean includeUnchangedData) {
|
||||
if (includeUnchangedData) {
|
||||
return createForSpawn(entityId, datawatcher);
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutEntityStatus</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutEntityStatus")
|
||||
public abstract class PacketPlayOutEntityStatusHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutEntityStatusClass */
|
||||
public static final PacketPlayOutEntityStatusClass T = Template.Class.create(PacketPlayOutEntityStatusClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutEntityStatusHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract byte getEventId();
|
||||
public abstract void setEventId(byte value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutEntityStatus</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutEntityStatusClass extends Template.Class<PacketPlayOutEntityStatusHandle> {
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
public final Template.Field.Byte eventId = new Template.Field.Byte();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,105 +19,91 @@ public abstract class PacketPlayOutEntityTeleportHandle extends PacketHandle {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
public static final PacketPlayOutEntityTeleportHandle createNew(Entity entity) {
|
||||
return T.constr_entity.newInstance(entity);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutEntityTeleportHandle createNew() {
|
||||
return T.createNew.invoke();
|
||||
public static PacketPlayOutEntityTeleportHandle createNewForEntity(Entity entity) {
|
||||
return T.createNewForEntity.invoke(entity);
|
||||
}
|
||||
|
||||
public static PacketPlayOutEntityTeleportHandle createNew(int entityId, double posX, double posY, double posZ, float yaw, float pitch, boolean onGround) {
|
||||
return T.createNew.invokeVA(entityId, posX, posY, posZ, yaw, pitch, onGround);
|
||||
}
|
||||
|
||||
public abstract int getEntityId();
|
||||
public abstract double getPosX();
|
||||
public abstract double getPosY();
|
||||
public abstract double getPosZ();
|
||||
public abstract float getYaw();
|
||||
public abstract float getPitch();
|
||||
public abstract boolean isOnGround();
|
||||
public abstract int getEncodedPosX();
|
||||
public abstract int getEncodedPosY();
|
||||
public abstract int getEncodedPosZ();
|
||||
public abstract int getEncodedYaw();
|
||||
public abstract int getEncodedPitch();
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_ENTITY_TELEPORT;
|
||||
}
|
||||
|
||||
public static PacketPlayOutEntityTeleportHandle createNew(int entityId, double posX, double posY, double posZ, float yaw, float pitch, boolean onGround) {
|
||||
PacketPlayOutEntityTeleportHandle handle = createNew();
|
||||
handle.setEntityId(entityId);
|
||||
handle.setPosX(posX);
|
||||
handle.setPosY(posY);
|
||||
handle.setPosZ(posZ);
|
||||
handle.setYaw(yaw);
|
||||
handle.setPitch(pitch);
|
||||
handle.setOnGround(onGround);
|
||||
return handle;
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public double getPosX() {
|
||||
return getProtocolPosition(T.posX_1_8_8, T.posX_1_10_2);
|
||||
}
|
||||
public static class Builder {
|
||||
private int entityId;
|
||||
private double posX, posY, posZ;
|
||||
private float yaw, pitch;
|
||||
private boolean onGround;
|
||||
|
||||
public double getPosY() {
|
||||
return getProtocolPosition(T.posY_1_8_8, T.posY_1_10_2);
|
||||
}
|
||||
public Builder entityId(int entityId) { this.entityId = entityId; return this; }
|
||||
public Builder posX(double posX) { this.posX = posX; return this; }
|
||||
public Builder posY(double posY) { this.posY = posY; return this; }
|
||||
public Builder posZ(double posZ) { this.posZ = posZ; return this; }
|
||||
public Builder position(org.bukkit.util.Vector position) {
|
||||
return position(position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
public Builder position(double x, double y, double z) {
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
return this;
|
||||
}
|
||||
public Builder yaw(float yaw) { this.yaw = yaw; return this; }
|
||||
public Builder pitch(float pitch) { this.pitch = pitch; return this; }
|
||||
public Builder rotation(float yaw, float pitch) {
|
||||
this.yaw = yaw;
|
||||
this.pitch = pitch;
|
||||
return this;
|
||||
}
|
||||
public Builder onGround(boolean onGround) { this.onGround = onGround; return this; }
|
||||
|
||||
public double getPosZ() {
|
||||
return getProtocolPosition(T.posZ_1_8_8, T.posZ_1_10_2);
|
||||
public PacketPlayOutEntityTeleportHandle create() {
|
||||
return PacketPlayOutEntityTeleportHandle.createNew(entityId, posX, posY, posZ, yaw, pitch, onGround);
|
||||
}
|
||||
}
|
||||
|
||||
public void setPosX(double posX) {
|
||||
setProtocolPosition(T.posX_1_8_8, T.posX_1_10_2, posX);
|
||||
}
|
||||
|
||||
public void setPosY(double posY) {
|
||||
setProtocolPosition(T.posY_1_8_8, T.posY_1_10_2, posY);
|
||||
}
|
||||
|
||||
public void setPosZ(double posZ) {
|
||||
setProtocolPosition(T.posZ_1_8_8, T.posZ_1_10_2, posZ);
|
||||
}
|
||||
|
||||
public float getYaw() {
|
||||
return getProtocolRotation(T.yaw_raw);
|
||||
}
|
||||
|
||||
public float getPitch() {
|
||||
return getProtocolRotation(T.pitch_raw);
|
||||
}
|
||||
|
||||
public void setYaw(float yaw) {
|
||||
setProtocolRotation(T.yaw_raw, yaw);
|
||||
}
|
||||
|
||||
public void setPitch(float pitch) {
|
||||
setProtocolRotation(T.pitch_raw, pitch);
|
||||
}
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract boolean isOnGround();
|
||||
public abstract void setOnGround(boolean value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutEntityTeleport</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutEntityTeleportClass extends Template.Class<PacketPlayOutEntityTeleportHandle> {
|
||||
public final Template.Constructor.Converted<PacketPlayOutEntityTeleportHandle> constr_entity = new Template.Constructor.Converted<PacketPlayOutEntityTeleportHandle>();
|
||||
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer posX_1_8_8 = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer posY_1_8_8 = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer posZ_1_8_8 = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Double posX_1_10_2 = new Template.Field.Double();
|
||||
@Template.Optional
|
||||
public final Template.Field.Double posY_1_10_2 = new Template.Field.Double();
|
||||
@Template.Optional
|
||||
public final Template.Field.Double posZ_1_10_2 = new Template.Field.Double();
|
||||
@Template.Optional
|
||||
public final Template.Field.Byte yaw_raw = new Template.Field.Byte();
|
||||
@Template.Optional
|
||||
public final Template.Field.Byte pitch_raw = new Template.Field.Byte();
|
||||
public final Template.Field.Boolean onGround = new Template.Field.Boolean();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutEntityTeleportHandle> createNewForEntity = new Template.StaticMethod.Converted<PacketPlayOutEntityTeleportHandle>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutEntityTeleportHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutEntityTeleportHandle>();
|
||||
|
||||
public final Template.Method<Integer> getEntityId = new Template.Method<Integer>();
|
||||
public final Template.Method<Double> getPosX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getPosY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getPosZ = new Template.Method<Double>();
|
||||
public final Template.Method<Float> getYaw = new Template.Method<Float>();
|
||||
public final Template.Method<Float> getPitch = new Template.Method<Float>();
|
||||
public final Template.Method<Boolean> isOnGround = new Template.Method<Boolean>();
|
||||
public final Template.Method<Integer> getEncodedPosX = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getEncodedPosY = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getEncodedPosZ = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getEncodedYaw = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getEncodedPitch = new Template.Method<Integer>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutEntityVelocity</b>.
|
||||
@@ -29,43 +30,20 @@ public abstract class PacketPlayOutEntityVelocityHandle extends PacketHandle {
|
||||
return T.createNew.invoke(entityId, motX, motY, motZ);
|
||||
}
|
||||
|
||||
|
||||
public abstract Vector getMotVector();
|
||||
public abstract void setMotVector(Vector movement);
|
||||
public abstract double getMotX();
|
||||
public abstract double getMotY();
|
||||
public abstract double getMotZ();
|
||||
public abstract void setMotX(double x);
|
||||
public abstract void setMotY(double y);
|
||||
public abstract void setMotZ(double z);
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_ENTITY_VELOCITY;
|
||||
}
|
||||
|
||||
public double getMotX() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motX_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public double getMotY() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motY_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public double getMotZ() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motZ_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public void setMotX(double motX) {
|
||||
T.motX_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motX));
|
||||
}
|
||||
|
||||
public void setMotY(double motY) {
|
||||
T.motY_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motY));
|
||||
}
|
||||
|
||||
public void setMotZ(double motZ) {
|
||||
T.motZ_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motZ));
|
||||
}
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract int getMotX_raw();
|
||||
public abstract void setMotX_raw(int value);
|
||||
public abstract int getMotY_raw();
|
||||
public abstract void setMotY_raw(int value);
|
||||
public abstract int getMotZ_raw();
|
||||
public abstract void setMotZ_raw(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutEntityVelocity</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
@@ -74,12 +52,18 @@ public abstract class PacketPlayOutEntityVelocityHandle extends PacketHandle {
|
||||
public final Template.Constructor.Converted<PacketPlayOutEntityVelocityHandle> constr_entity = new Template.Constructor.Converted<PacketPlayOutEntityVelocityHandle>();
|
||||
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
public final Template.Field.Integer motX_raw = new Template.Field.Integer();
|
||||
public final Template.Field.Integer motY_raw = new Template.Field.Integer();
|
||||
public final Template.Field.Integer motZ_raw = new Template.Field.Integer();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutEntityVelocityHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutEntityVelocityHandle>();
|
||||
|
||||
public final Template.Method.Converted<Vector> getMotVector = new Template.Method.Converted<Vector>();
|
||||
public final Template.Method.Converted<Void> setMotVector = new Template.Method.Converted<Void>();
|
||||
public final Template.Method<Double> getMotX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getMotY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getMotZ = new Template.Method<Double>();
|
||||
public final Template.Method<Void> setMotX = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setMotY = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setMotZ = new Template.Method<Void>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutExperience</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutExperience")
|
||||
public abstract class PacketPlayOutExperienceHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutExperienceClass */
|
||||
public static final PacketPlayOutExperienceClass T = Template.Class.create(PacketPlayOutExperienceClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutExperienceHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract float getExperienceProgress();
|
||||
public abstract void setExperienceProgress(float value);
|
||||
public abstract int getTotalExperience();
|
||||
public abstract void setTotalExperience(int value);
|
||||
public abstract int getExperienceLevel();
|
||||
public abstract void setExperienceLevel(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutExperience</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutExperienceClass extends Template.Class<PacketPlayOutExperienceHandle> {
|
||||
public final Template.Field.Float experienceProgress = new Template.Field.Float();
|
||||
public final Template.Field.Integer totalExperience = new Template.Field.Integer();
|
||||
public final Template.Field.Integer experienceLevel = new Template.Field.Integer();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.bases.IntVector3;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.util.Vector;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutExplosion</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutExplosion")
|
||||
public abstract class PacketPlayOutExplosionHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutExplosionClass */
|
||||
public static final PacketPlayOutExplosionClass T = Template.Class.create(PacketPlayOutExplosionClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutExplosionHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
public static final PacketPlayOutExplosionHandle createNew(double x, double y, double z, float power, List<IntVector3> blocks, Vector knockback) {
|
||||
return T.constr_x_y_z_power_blocks_knockback.newInstanceVA(x, y, z, power, blocks, knockback);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract double getX();
|
||||
public abstract void setX(double value);
|
||||
public abstract double getY();
|
||||
public abstract void setY(double value);
|
||||
public abstract double getZ();
|
||||
public abstract void setZ(double value);
|
||||
public abstract float getPower();
|
||||
public abstract void setPower(float value);
|
||||
public abstract List<IntVector3> getBlocks();
|
||||
public abstract void setBlocks(List<IntVector3> value);
|
||||
public abstract float getKnockbackX();
|
||||
public abstract void setKnockbackX(float value);
|
||||
public abstract float getKnockbackY();
|
||||
public abstract void setKnockbackY(float value);
|
||||
public abstract float getKnockbackZ();
|
||||
public abstract void setKnockbackZ(float value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutExplosion</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutExplosionClass extends Template.Class<PacketPlayOutExplosionHandle> {
|
||||
public final Template.Constructor.Converted<PacketPlayOutExplosionHandle> constr_x_y_z_power_blocks_knockback = new Template.Constructor.Converted<PacketPlayOutExplosionHandle>();
|
||||
|
||||
public final Template.Field.Double x = new Template.Field.Double();
|
||||
public final Template.Field.Double y = new Template.Field.Double();
|
||||
public final Template.Field.Double z = new Template.Field.Double();
|
||||
public final Template.Field.Float power = new Template.Field.Float();
|
||||
public final Template.Field.Converted<List<IntVector3>> blocks = new Template.Field.Converted<List<IntVector3>>();
|
||||
public final Template.Field.Float knockbackX = new Template.Field.Float();
|
||||
public final Template.Field.Float knockbackY = new Template.Field.Float();
|
||||
public final Template.Field.Float knockbackZ = new Template.Field.Float();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutHeldItemSlot</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutHeldItemSlot")
|
||||
public abstract class PacketPlayOutHeldItemSlotHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutHeldItemSlotClass */
|
||||
public static final PacketPlayOutHeldItemSlotClass T = Template.Class.create(PacketPlayOutHeldItemSlotClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutHeldItemSlotHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getItemInHandIndex();
|
||||
public abstract void setItemInHandIndex(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutHeldItemSlot</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutHeldItemSlotClass extends Template.Class<PacketPlayOutHeldItemSlotHandle> {
|
||||
public final Template.Field.Integer itemInHandIndex = new Template.Field.Integer();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.bergerkiller.bukkit.common.resources.DimensionType;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.Difficulty;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.World;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutLogin</b>.
|
||||
@@ -24,40 +23,30 @@ public abstract class PacketPlayOutLoginHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract GameMode getPreviousGameMode();
|
||||
public abstract void setPreviousGameMode(GameMode gameMode);
|
||||
public abstract void setEncryptedWorldSeed(World world);
|
||||
public abstract int getPlayerId();
|
||||
public abstract void setPlayerId(int value);
|
||||
public abstract boolean isHardcore();
|
||||
public abstract void setHardcore(boolean value);
|
||||
public abstract GameMode getGameMode();
|
||||
public abstract void setGameMode(GameMode value);
|
||||
public abstract DimensionType getDimensionType();
|
||||
public abstract void setDimensionType(DimensionType value);
|
||||
public abstract int getMaxPlayers();
|
||||
public abstract void setMaxPlayers(int value);
|
||||
public abstract int getViewDistance();
|
||||
public abstract boolean isReducedDebugInfo();
|
||||
public abstract void setReducedDebugInfo(boolean value);
|
||||
public abstract GameMode getGameMode();
|
||||
public abstract DimensionType getDimensionType();
|
||||
public abstract GameMode getPreviousGameMode();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutLogin</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutLoginClass extends Template.Class<PacketPlayOutLoginHandle> {
|
||||
public final Template.Field.Integer playerId = new Template.Field.Integer();
|
||||
public final Template.Field.Boolean hardcore = new Template.Field.Boolean();
|
||||
public final Template.Field.Converted<GameMode> gameMode = new Template.Field.Converted<GameMode>();
|
||||
public final Template.Field.Converted<DimensionType> dimensionType = new Template.Field.Converted<DimensionType>();
|
||||
@Template.Optional
|
||||
public final Template.Field.Converted<Difficulty> difficulty = new Template.Field.Converted<Difficulty>();
|
||||
public final Template.Field.Integer maxPlayers = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer viewDistance = new Template.Field.Integer();
|
||||
public final Template.Field.Boolean reducedDebugInfo = new Template.Field.Boolean();
|
||||
|
||||
public final Template.Method<Integer> getPlayerId = new Template.Method<Integer>();
|
||||
public final Template.Method<Boolean> isHardcore = new Template.Method<Boolean>();
|
||||
public final Template.Method<Integer> getMaxPlayers = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getViewDistance = new Template.Method<Integer>();
|
||||
public final Template.Method<Boolean> isReducedDebugInfo = new Template.Method<Boolean>();
|
||||
public final Template.Method.Converted<GameMode> getGameMode = new Template.Method.Converted<GameMode>();
|
||||
public final Template.Method.Converted<DimensionType> getDimensionType = new Template.Method.Converted<DimensionType>();
|
||||
public final Template.Method.Converted<GameMode> getPreviousGameMode = new Template.Method.Converted<GameMode>();
|
||||
public final Template.Method.Converted<Void> setPreviousGameMode = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<Void> setEncryptedWorldSeed = new Template.Method.Converted<Void>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ public abstract class PacketPlayOutMapChunkHandle extends PacketHandle {
|
||||
public abstract byte[] getBuffer();
|
||||
public abstract void setBuffer(byte[] buffer);
|
||||
public abstract List<BlockStateChange> getBlockStates();
|
||||
|
||||
public void setBlockStates(List<BlockStateChange> states) {
|
||||
List<BlockStateChange> baseStates = this.getBlockStates();
|
||||
int count = states.size();
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.map.MapCursor;
|
||||
import com.bergerkiller.generated.net.minecraft.world.level.saveddata.maps.MapIconHandle;
|
||||
import com.bergerkiller.mountiplex.conversion.type.DuplexConverter;
|
||||
import com.bergerkiller.mountiplex.conversion.util.ConvertingList;
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import java.util.List;
|
||||
import org.bukkit.map.MapCursor;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutMap</b>.
|
||||
@@ -22,57 +25,206 @@ public abstract class PacketPlayOutMapHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutMapHandle createNew() {
|
||||
return T.createNew.invoke();
|
||||
public static PacketPlayOutMapHandle createNew(Builder builder) {
|
||||
return T.createNew.invoke(builder);
|
||||
}
|
||||
|
||||
public abstract int getStartX();
|
||||
public abstract void setStartX(int startx);
|
||||
public abstract int getStartY();
|
||||
public abstract void setStartY(int starty);
|
||||
public abstract int getWidth();
|
||||
public abstract void setWidth(int width);
|
||||
public abstract int getHeight();
|
||||
public abstract void setHeight(int height);
|
||||
public abstract byte[] getPixels();
|
||||
public abstract void setPixels(byte[] pixels);
|
||||
public abstract void setPixelData(int startX, int startY, int width, int height, byte[] pixels);
|
||||
public abstract boolean isLocked();
|
||||
public abstract void setLocked(boolean locked);
|
||||
public abstract boolean isTrack();
|
||||
public abstract void setTrack(boolean track);
|
||||
public abstract int getMapId();
|
||||
public abstract void setMapId(int value);
|
||||
public abstract byte getScale();
|
||||
public abstract void setScale(byte value);
|
||||
public abstract boolean isLocked();
|
||||
public abstract boolean hasCursors();
|
||||
public abstract List<MapCursor> getCursors();
|
||||
public abstract void setCursors(List<MapCursor> value);
|
||||
public abstract int getStartX();
|
||||
public abstract int getStartY();
|
||||
public abstract int getWidth();
|
||||
public abstract int getHeight();
|
||||
public abstract boolean hasPixels();
|
||||
public abstract byte[] getPixels();
|
||||
|
||||
public static class Builder implements Cloneable {
|
||||
private int mapId = 0;
|
||||
private byte scale = (byte) 1;
|
||||
private boolean locked = false;
|
||||
private java.util.Optional<java.util.List<MapIconHandle>> mapIcons = java.util.Optional.empty();
|
||||
private boolean hasData = false;
|
||||
private int startX, startY;
|
||||
private int width, height;
|
||||
private byte[] colors = null;
|
||||
|
||||
private static final DuplexConverter<MapIconHandle, MapCursor> mapCursorHandleConversion = new DuplexConverter<MapIconHandle, MapCursor>(MapIconHandle.class, MapCursor.class) {
|
||||
@Override
|
||||
public MapCursor convertInput(MapIconHandle mapIconHandle) {
|
||||
return mapIconHandle.toCursor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapIconHandle convertOutput(MapCursor mapCursor) {
|
||||
return MapIconHandle.fromCursor(mapCursor);
|
||||
}
|
||||
};
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
public int get_mapId() {
|
||||
return this.mapId;
|
||||
}
|
||||
|
||||
public byte get_scale() {
|
||||
return scale;
|
||||
}
|
||||
|
||||
public boolean get_locked() {
|
||||
return locked;
|
||||
}
|
||||
|
||||
public java.util.Optional<java.util.List<org.bukkit.map.MapCursor>> get_cursors() {
|
||||
return mapIcons.map(list -> new ConvertingList<>(list, mapCursorHandleConversion));
|
||||
}
|
||||
|
||||
public java.util.Optional<java.util.List<MapIconHandle>> get_cursors_nms() {
|
||||
return mapIcons;
|
||||
}
|
||||
|
||||
public boolean has_data() {
|
||||
return hasData;
|
||||
}
|
||||
|
||||
public int get_data_startX() {
|
||||
return startX;
|
||||
}
|
||||
|
||||
public int get_data_startY() {
|
||||
return startY;
|
||||
}
|
||||
|
||||
public int get_data_width() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public int get_data_height() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public byte[] get_data_colors() {
|
||||
return colors;
|
||||
}
|
||||
|
||||
public Builder mapId(int mapId) {
|
||||
this.mapId = mapId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder scale(byte scale) {
|
||||
this.scale = scale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder locked(boolean locked) {
|
||||
this.locked = locked;
|
||||
return this;
|
||||
}
|
||||
|
||||
private List<MapIconHandle> convertCursors(java.util.List<org.bukkit.map.MapCursor> cursors) {
|
||||
return new ConvertingList<>(cursors, mapCursorHandleConversion.reverse());
|
||||
}
|
||||
|
||||
public Builder no_cursors() {
|
||||
return this.cursors_nms(java.util.Collections.emptyList());
|
||||
}
|
||||
|
||||
public Builder cursors(java.util.List<org.bukkit.map.MapCursor> cursors) {
|
||||
return this.cursors_nms(convertCursors(cursors));
|
||||
}
|
||||
|
||||
public Builder cursors_nms(java.util.List<MapIconHandle> rawCursors) {
|
||||
this.mapIcons = java.util.Optional.ofNullable(rawCursors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder add_cursors(java.util.List<org.bukkit.map.MapCursor> cursors) {
|
||||
return add_cursors_nms(convertCursors(cursors));
|
||||
}
|
||||
|
||||
public Builder add_cursors_nms(java.util.List<MapIconHandle> rawCursors) {
|
||||
if (!this.mapIcons.isPresent()) {
|
||||
this.cursors_nms(rawCursors);
|
||||
} else if (rawCursors != null && !rawCursors.isEmpty()) {
|
||||
java.util.List<MapIconHandle> existing = this.mapIcons.get();
|
||||
java.util.List<MapIconHandle> newList = new java.util.ArrayList<>(existing.size() + rawCursors.size());
|
||||
newList.addAll(existing);
|
||||
newList.addAll(rawCursors);
|
||||
this.mapIcons = java.util.Optional.of(newList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder data(int startX, int startY, int width, int height, byte[] colors) {
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.colors = colors;
|
||||
this.hasData = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clone() {
|
||||
Builder copy = new Builder();
|
||||
copy.mapId = this.mapId;
|
||||
copy.scale = this.scale;
|
||||
copy.locked = this.locked;
|
||||
copy.mapIcons = this.mapIcons;
|
||||
copy.startX = this.startX;
|
||||
copy.startY = this.startY;
|
||||
copy.width = this.width;
|
||||
copy.height = this.height;
|
||||
copy.colors = this.colors;
|
||||
copy.hasData = this.hasData;
|
||||
return copy;
|
||||
}
|
||||
|
||||
public PacketPlayOutMapHandle create() {
|
||||
return createNew(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static Builder build() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder mutable() {
|
||||
Builder b = build()
|
||||
.mapId(getMapId())
|
||||
.scale(getScale())
|
||||
.locked(isLocked());
|
||||
if (hasCursors()) {
|
||||
b.cursors(getCursors());
|
||||
}
|
||||
if (hasPixels()) {
|
||||
b.data(getStartX(), getStartY(), getWidth(), getHeight(), getPixels());
|
||||
}
|
||||
return b;
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutMap</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutMapClass extends Template.Class<PacketPlayOutMapHandle> {
|
||||
public final Template.Field.Integer mapId = new Template.Field.Integer();
|
||||
public final Template.Field.Byte scale = new Template.Field.Byte();
|
||||
public final Template.Field.Converted<List<MapCursor>> cursors = new Template.Field.Converted<List<MapCursor>>();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutMapHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutMapHandle>();
|
||||
|
||||
public final Template.Method<Integer> getStartX = new Template.Method<Integer>();
|
||||
public final Template.Method<Void> setStartX = new Template.Method<Void>();
|
||||
public final Template.Method<Integer> getStartY = new Template.Method<Integer>();
|
||||
public final Template.Method<Void> setStartY = new Template.Method<Void>();
|
||||
public final Template.Method<Integer> getWidth = new Template.Method<Integer>();
|
||||
public final Template.Method<Void> setWidth = new Template.Method<Void>();
|
||||
public final Template.Method<Integer> getHeight = new Template.Method<Integer>();
|
||||
public final Template.Method<Void> setHeight = new Template.Method<Void>();
|
||||
public final Template.Method<byte[]> getPixels = new Template.Method<byte[]>();
|
||||
public final Template.Method<Void> setPixels = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setPixelData = new Template.Method<Void>();
|
||||
public final Template.Method<Integer> getMapId = new Template.Method<Integer>();
|
||||
public final Template.Method<Byte> getScale = new Template.Method<Byte>();
|
||||
public final Template.Method<Boolean> isLocked = new Template.Method<Boolean>();
|
||||
public final Template.Method<Void> setLocked = new Template.Method<Void>();
|
||||
public final Template.Method<Boolean> isTrack = new Template.Method<Boolean>();
|
||||
public final Template.Method<Void> setTrack = new Template.Method<Void>();
|
||||
public final Template.Method<Boolean> hasCursors = new Template.Method<Boolean>();
|
||||
public final Template.Method.Converted<List<MapCursor>> getCursors = new Template.Method.Converted<List<MapCursor>>();
|
||||
public final Template.Method<Integer> getStartX = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getStartY = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getWidth = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getHeight = new Template.Method<Integer>();
|
||||
public final Template.Method<Boolean> hasPixels = new Template.Method<Boolean>();
|
||||
public final Template.Method<byte[]> getPixels = new Template.Method<byte[]>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ public abstract class PacketPlayOutMountHandle extends PacketHandle {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
|
||||
public void addMountedEntityId(int entityId) {
|
||||
int[] oldIds = this.getMountedEntityIds();
|
||||
if (oldIds == null || oldIds.length == 0) {
|
||||
|
||||
@@ -27,7 +27,6 @@ public abstract class PacketPlayOutNamedEntitySpawnHandle extends PacketHandle {
|
||||
return T.createNew.invoke();
|
||||
}
|
||||
|
||||
|
||||
public boolean hasDataWatcherSupport() {
|
||||
return T.opt_dataWatcher.isAvailable();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ public abstract class PacketPlayOutNamedSoundEffectHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public float getPitch() {
|
||||
if (T.pitch_1_10_2.isAvailable()) {
|
||||
return T.pitch_1_10_2.getFloat(getRaw());
|
||||
@@ -39,7 +38,6 @@ public abstract class PacketPlayOutNamedSoundEffectHandle extends PacketHandle {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getCategory() {
|
||||
if (T.category_1_10_2.isAvailable()) {
|
||||
return T.category_1_10_2.get(getRaw());
|
||||
|
||||
@@ -21,6 +21,15 @@ public abstract class PacketPlayOutOpenSignEditorHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutOpenSignEditorHandle createNew(IntVector3 signPosition, boolean isFrontText) {
|
||||
return T.createNew.invoke(signPosition, isFrontText);
|
||||
}
|
||||
|
||||
public abstract boolean isFrontText();
|
||||
public abstract void setFrontText(boolean front);
|
||||
public static PacketPlayOutOpenSignEditorHandle createNew(IntVector3 signPosition) {
|
||||
return createNew(signPosition, true);
|
||||
}
|
||||
public abstract IntVector3 getSignPosition();
|
||||
public abstract void setSignPosition(IntVector3 value);
|
||||
/**
|
||||
@@ -30,6 +39,11 @@ public abstract class PacketPlayOutOpenSignEditorHandle extends PacketHandle {
|
||||
public static final class PacketPlayOutOpenSignEditorClass extends Template.Class<PacketPlayOutOpenSignEditorHandle> {
|
||||
public final Template.Field.Converted<IntVector3> signPosition = new Template.Field.Converted<IntVector3>();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutOpenSignEditorHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutOpenSignEditorHandle>();
|
||||
|
||||
public final Template.Method<Boolean> isFrontText = new Template.Method<Boolean>();
|
||||
public final Template.Method<Void> setFrontText = new Template.Method<Void>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.RelativeFlags;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.RelativeMovementHandle;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutPosition</b>.
|
||||
@@ -22,85 +21,50 @@ public abstract class PacketPlayOutPositionHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutPositionHandle createNew(double x, double y, double z, float yaw, float pitch, double deltaX, double deltaY, double deltaZ, RelativeFlags relativeFlags, int teleportWaitTimer) {
|
||||
return T.createNew.invokeVA(x, y, z, yaw, pitch, deltaX, deltaY, deltaZ, relativeFlags, teleportWaitTimer);
|
||||
}
|
||||
|
||||
public abstract double getX();
|
||||
public abstract double getY();
|
||||
public abstract double getZ();
|
||||
public abstract float getYaw();
|
||||
public abstract float getPitch();
|
||||
public abstract RelativeFlags getRelativeFlags();
|
||||
public abstract int getTeleportWaitTimer();
|
||||
public static PacketPlayOutPositionHandle createNew(double x, double y, double z, float yaw, float pitch, double deltaX, double deltaY, double deltaZ, RelativeFlags relativeFlags) {
|
||||
return createNew(x, y, z, yaw, pitch, deltaX, deltaY, deltaZ, relativeFlags, 0);
|
||||
}
|
||||
|
||||
public static PacketPlayOutPositionHandle createNew(double x, double y, double z, float yaw, float pitch, RelativeFlags relativeFlags) {
|
||||
return createNew(x, y, z, yaw, pitch, 0.0, 0.0, 0.0, relativeFlags, 0);
|
||||
}
|
||||
|
||||
public static PacketPlayOutPositionHandle createRelative(double dx, double dy, double dz, float dyaw, float dpitch) {
|
||||
return T.createRelative.invoke(dx, dy, dz, dyaw, dpitch);
|
||||
return createNew(dx, dy, dz, dyaw, dpitch, RelativeFlags.RELATIVE_POSITION_ROTATION);
|
||||
}
|
||||
|
||||
public static PacketPlayOutPositionHandle createAbsolute(double x, double y, double z, float yaw, float pitch) {
|
||||
return T.createAbsolute.invoke(x, y, z, yaw, pitch);
|
||||
}
|
||||
|
||||
|
||||
public int getTeleportWaitTimer() {
|
||||
if (T.teleportWaitTimer.isAvailable()) {
|
||||
return T.teleportWaitTimer.getInteger(getRaw());
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setTeleportWaitTimer(int ticks) {
|
||||
if (T.teleportWaitTimer.isAvailable()) {
|
||||
T.teleportWaitTimer.setInteger(getRaw(), ticks);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRotationRelative(boolean relative) {
|
||||
Set<RelativeMovementHandle> flags = getTeleportFlags();
|
||||
if (relative) {
|
||||
flags.add(RelativeMovementHandle.Y_ROT);
|
||||
flags.add(RelativeMovementHandle.X_ROT);
|
||||
} else {
|
||||
flags.remove(RelativeMovementHandle.Y_ROT);
|
||||
flags.remove(RelativeMovementHandle.X_ROT);
|
||||
}
|
||||
}
|
||||
|
||||
public void setPositionRelative(boolean relative) {
|
||||
Set<RelativeMovementHandle> flags = getTeleportFlags();
|
||||
if (relative) {
|
||||
flags.add(RelativeMovementHandle.X);
|
||||
flags.add(RelativeMovementHandle.Y);
|
||||
flags.add(RelativeMovementHandle.Z);
|
||||
} else {
|
||||
flags.remove(RelativeMovementHandle.X);
|
||||
flags.remove(RelativeMovementHandle.Y);
|
||||
flags.remove(RelativeMovementHandle.Z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static PacketPlayOutPositionHandle createAbsolute(org.bukkit.Location location) {
|
||||
return createAbsolute(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
}
|
||||
public abstract double getX();
|
||||
public abstract void setX(double value);
|
||||
public abstract double getY();
|
||||
public abstract void setY(double value);
|
||||
public abstract double getZ();
|
||||
public abstract void setZ(double value);
|
||||
public abstract float getYaw();
|
||||
public abstract void setYaw(float value);
|
||||
public abstract float getPitch();
|
||||
public abstract void setPitch(float value);
|
||||
public abstract Set<RelativeMovementHandle> getTeleportFlags();
|
||||
public abstract void setTeleportFlags(Set<RelativeMovementHandle> value);
|
||||
|
||||
public static PacketPlayOutPositionHandle createAbsolute(double x, double y, double z, float yaw, float pitch) {
|
||||
return createNew(x, y, z, yaw, pitch, RelativeFlags.ABSOLUTE_POSITION);
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutPosition</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutPositionClass extends Template.Class<PacketPlayOutPositionHandle> {
|
||||
public final Template.Field.Double x = new Template.Field.Double();
|
||||
public final Template.Field.Double y = new Template.Field.Double();
|
||||
public final Template.Field.Double z = new Template.Field.Double();
|
||||
public final Template.Field.Float yaw = new Template.Field.Float();
|
||||
public final Template.Field.Float pitch = new Template.Field.Float();
|
||||
public final Template.Field.Converted<Set<RelativeMovementHandle>> teleportFlags = new Template.Field.Converted<Set<RelativeMovementHandle>>();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer teleportWaitTimer = new Template.Field.Integer();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutPositionHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutPositionHandle>();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutPositionHandle> createRelative = new Template.StaticMethod.Converted<PacketPlayOutPositionHandle>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutPositionHandle> createAbsolute = new Template.StaticMethod.Converted<PacketPlayOutPositionHandle>();
|
||||
public final Template.Method<Double> getX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getZ = new Template.Method<Double>();
|
||||
public final Template.Method<Float> getYaw = new Template.Method<Float>();
|
||||
public final Template.Method<Float> getPitch = new Template.Method<Float>();
|
||||
public final Template.Method.Converted<RelativeFlags> getRelativeFlags = new Template.Method.Converted<RelativeFlags>();
|
||||
public final Template.Method<Integer> getTeleportWaitTimer = new Template.Method<Integer>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.Holder;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.effect.MobEffectListHandle;
|
||||
|
||||
@@ -21,31 +22,29 @@ public abstract class PacketPlayOutRemoveEntityEffectHandle extends PacketHandle
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutRemoveEntityEffectHandle createNew() {
|
||||
return T.createNew.invoke();
|
||||
public static PacketPlayOutRemoveEntityEffectHandle createNew(int entityId, Holder<MobEffectListHandle> effect) {
|
||||
return T.createNew.invoke(entityId, effect);
|
||||
}
|
||||
|
||||
|
||||
public static PacketPlayOutRemoveEntityEffectHandle createNew(int entityId, MobEffectListHandle mobEffectList) {
|
||||
PacketPlayOutRemoveEntityEffectHandle handle = createNew();
|
||||
handle.setEntityId(entityId);
|
||||
handle.setEffectList(mobEffectList);
|
||||
return handle;
|
||||
}
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract MobEffectListHandle getEffectList();
|
||||
public abstract void setEffectList(MobEffectListHandle value);
|
||||
public abstract Holder<MobEffectListHandle> getEffect();
|
||||
public org.bukkit.potion.PotionEffectType getPotionEffectType() {
|
||||
return MobEffectListHandle.holderToBukkit(getEffect());
|
||||
}
|
||||
|
||||
public static PacketPlayOutRemoveEntityEffectHandle createNew(int entityId, org.bukkit.potion.PotionEffectType effectType) {
|
||||
return createNew(entityId, MobEffectListHandle.holderFromBukkit(effectType));
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutRemoveEntityEffectClass extends Template.Class<PacketPlayOutRemoveEntityEffectHandle> {
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
public final Template.Field.Converted<MobEffectListHandle> effectList = new Template.Field.Converted<MobEffectListHandle>();
|
||||
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutRemoveEntityEffectHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutRemoveEntityEffectHandle>();
|
||||
|
||||
public final Template.Method<Integer> getEntityId = new Template.Method<Integer>();
|
||||
public final Template.Method.Converted<Holder<MobEffectListHandle>> getEffect = new Template.Method.Converted<Holder<MobEffectListHandle>>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,30 +25,22 @@ public abstract class PacketPlayOutRespawnHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract ResourceKey<World> getWorldName();
|
||||
public abstract void setWorldName(ResourceKey<World> worldType);
|
||||
public abstract GameMode getPreviousGameMode();
|
||||
public abstract void setPreviousGameMode(GameMode gameMode);
|
||||
public abstract void setEncryptedWorldSeed(World world);
|
||||
public abstract DimensionType getDimensionType();
|
||||
public abstract void setDimensionType(DimensionType value);
|
||||
public abstract GameMode getGamemode();
|
||||
public abstract void setGamemode(GameMode value);
|
||||
public abstract ResourceKey<World> getWorldName();
|
||||
public abstract GameMode getPreviousGameMode();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutRespawn</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutRespawnClass extends Template.Class<PacketPlayOutRespawnHandle> {
|
||||
public final Template.Field.Converted<DimensionType> dimensionType = new Template.Field.Converted<DimensionType>();
|
||||
@Template.Optional
|
||||
public final Template.Field.Converted<Difficulty> difficulty = new Template.Field.Converted<Difficulty>();
|
||||
public final Template.Field.Converted<GameMode> gamemode = new Template.Field.Converted<GameMode>();
|
||||
|
||||
public final Template.Method.Converted<DimensionType> getDimensionType = new Template.Method.Converted<DimensionType>();
|
||||
public final Template.Method.Converted<GameMode> getGamemode = new Template.Method.Converted<GameMode>();
|
||||
public final Template.Method.Converted<ResourceKey<World>> getWorldName = new Template.Method.Converted<ResourceKey<World>>();
|
||||
public final Template.Method.Converted<Void> setWorldName = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<GameMode> getPreviousGameMode = new Template.Method.Converted<GameMode>();
|
||||
public final Template.Method.Converted<Void> setPreviousGameMode = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<Void> setEncryptedWorldSeed = new Template.Method.Converted<Void>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.scoreboard.DisplaySlot;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutScoreboardDisplayObjective</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutScoreboardDisplayObjective")
|
||||
public abstract class PacketPlayOutScoreboardDisplayObjectiveHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutScoreboardDisplayObjectiveClass */
|
||||
public static final PacketPlayOutScoreboardDisplayObjectiveClass T = Template.Class.create(PacketPlayOutScoreboardDisplayObjectiveClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutScoreboardDisplayObjectiveHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract DisplaySlot getDisplay();
|
||||
public abstract void setDisplay(DisplaySlot value);
|
||||
public abstract String getName();
|
||||
public abstract void setName(String value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutScoreboardDisplayObjective</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutScoreboardDisplayObjectiveClass extends Template.Class<PacketPlayOutScoreboardDisplayObjectiveHandle> {
|
||||
public final Template.Field.Converted<DisplaySlot> display = new Template.Field.Converted<DisplaySlot>();
|
||||
public final Template.Field<String> name = new Template.Field<String>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.ScoreboardAction;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
@@ -21,14 +20,16 @@ public abstract class PacketPlayOutScoreboardScoreHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutScoreboardScoreHandle createNew(String name, String objectiveName, int score) {
|
||||
return T.createNew.invoke(name, objectiveName, score);
|
||||
}
|
||||
|
||||
public abstract String getName();
|
||||
public abstract void setName(String value);
|
||||
public abstract String getObjName();
|
||||
public abstract void setObjName(String value);
|
||||
public abstract int getValue();
|
||||
public abstract void setValue(int value);
|
||||
public abstract ScoreboardAction getAction();
|
||||
public abstract void setAction(ScoreboardAction value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutScoreboardScore</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
@@ -37,39 +38,8 @@ public abstract class PacketPlayOutScoreboardScoreHandle extends PacketHandle {
|
||||
public final Template.Field<String> name = new Template.Field<String>();
|
||||
public final Template.Field<String> objName = new Template.Field<String>();
|
||||
public final Template.Field.Integer value = new Template.Field.Integer();
|
||||
public final Template.Field.Converted<ScoreboardAction> action = new Template.Field.Converted<ScoreboardAction>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutScoreboardScore.EnumScoreboardAction</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutScoreboardScore.EnumScoreboardAction")
|
||||
public abstract static class EnumScoreboardActionHandle extends Template.Handle {
|
||||
/** @see EnumScoreboardActionClass */
|
||||
public static final EnumScoreboardActionClass T = Template.Class.create(EnumScoreboardActionClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
public static final EnumScoreboardActionHandle CHANGE = T.CHANGE.getSafe();
|
||||
public static final EnumScoreboardActionHandle REMOVE = T.REMOVE.getSafe();
|
||||
/* ============================================================================== */
|
||||
|
||||
public static EnumScoreboardActionHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutScoreboardScore.EnumScoreboardAction</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class EnumScoreboardActionClass extends Template.Class<EnumScoreboardActionHandle> {
|
||||
public final Template.EnumConstant.Converted<EnumScoreboardActionHandle> CHANGE = new Template.EnumConstant.Converted<EnumScoreboardActionHandle>();
|
||||
public final Template.EnumConstant.Converted<EnumScoreboardActionHandle> REMOVE = new Template.EnumConstant.Converted<EnumScoreboardActionHandle>();
|
||||
|
||||
}
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutScoreboardScoreHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutScoreboardScoreHandle>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ public abstract class PacketPlayOutScoreboardTeamHandle extends PacketHandle {
|
||||
public abstract void setColor(ChatColor color);
|
||||
public abstract int getTeamOptionFlags();
|
||||
public abstract void setTeamOptionFlags(int teamOptionFlags);
|
||||
|
||||
public static final int METHOD_ADD = 0;
|
||||
public static final int METHOD_REMOVE = 1;
|
||||
public static final int METHOD_CHANGE = 2;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.Difficulty;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutServerDifficulty</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutServerDifficulty")
|
||||
public abstract class PacketPlayOutServerDifficultyHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutServerDifficultyClass */
|
||||
public static final PacketPlayOutServerDifficultyClass T = Template.Class.create(PacketPlayOutServerDifficultyClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutServerDifficultyHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract Difficulty getDifficulty();
|
||||
public abstract void setDifficulty(Difficulty value);
|
||||
public abstract boolean isHardcore();
|
||||
public abstract void setHardcore(boolean value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutServerDifficulty</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutServerDifficultyClass extends Template.Class<PacketPlayOutServerDifficultyHandle> {
|
||||
public final Template.Field.Converted<Difficulty> difficulty = new Template.Field.Converted<Difficulty>();
|
||||
public final Template.Field.Boolean hardcore = new Template.Field.Boolean();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutSetCooldown</b>.
|
||||
@@ -22,8 +21,6 @@ public abstract class PacketPlayOutSetCooldownHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract Material getMaterial();
|
||||
public abstract void setMaterial(Material value);
|
||||
public abstract int getCooldown();
|
||||
public abstract void setCooldown(int value);
|
||||
/**
|
||||
@@ -31,7 +28,6 @@ public abstract class PacketPlayOutSetCooldownHandle extends PacketHandle {
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutSetCooldownClass extends Template.Class<PacketPlayOutSetCooldownHandle> {
|
||||
public final Template.Field.Converted<Material> material = new Template.Field.Converted<Material>();
|
||||
public final Template.Field.Integer cooldown = new Template.Field.Integer();
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.Optional
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityExperienceOrb")
|
||||
public abstract class PacketPlayOutSpawnEntityExperienceOrbHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutSpawnEntityExperienceOrbClass */
|
||||
@@ -20,7 +21,6 @@ public abstract class PacketPlayOutSpawnEntityExperienceOrbHandle extends Packet
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public double getPosX() {
|
||||
return getProtocolPosition(T.posX_1_8_8, T.posX_1_10_2);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.EntityTypesHandle;
|
||||
import org.bukkit.util.Vector;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@@ -30,7 +31,14 @@ public abstract class PacketPlayOutSpawnEntityHandle extends PacketHandle {
|
||||
public abstract float getPitch();
|
||||
public abstract void setYaw(float yaw);
|
||||
public abstract void setPitch(float pitch);
|
||||
|
||||
public abstract Vector getMotVector();
|
||||
public abstract void setMotVector(Vector motVector);
|
||||
public abstract double getMotX();
|
||||
public abstract double getMotY();
|
||||
public abstract double getMotZ();
|
||||
public abstract void setMotX(double motX);
|
||||
public abstract void setMotY(double motY);
|
||||
public abstract void setMotZ(double motZ);
|
||||
@Override
|
||||
public com.bergerkiller.bukkit.common.protocol.PacketType getPacketType() {
|
||||
return com.bergerkiller.bukkit.common.protocol.PacketType.OUT_ENTITY_SPAWN;
|
||||
@@ -139,30 +147,6 @@ public abstract class PacketPlayOutSpawnEntityHandle extends PacketHandle {
|
||||
public void setPosZ(double posZ) {
|
||||
setProtocolPosition(T.posZ_1_8_8, T.posZ_1_10_2, posZ);
|
||||
}
|
||||
|
||||
public double getMotX() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motX_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public double getMotY() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motY_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public double getMotZ() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motZ_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public void setMotX(double motX) {
|
||||
T.motX_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motX));
|
||||
}
|
||||
|
||||
public void setMotY(double motY) {
|
||||
T.motY_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motY));
|
||||
}
|
||||
|
||||
public void setMotZ(double motZ) {
|
||||
T.motZ_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motZ));
|
||||
}
|
||||
public abstract int getEntityId();
|
||||
public abstract void setEntityId(int value);
|
||||
public abstract int getExtraData();
|
||||
@@ -190,12 +174,6 @@ public abstract class PacketPlayOutSpawnEntityHandle extends PacketHandle {
|
||||
@Template.Optional
|
||||
public final Template.Field.Double posZ_1_10_2 = new Template.Field.Double();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer motX_raw = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer motY_raw = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer motZ_raw = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer opt_entityTypeId = new Template.Field.Integer();
|
||||
public final Template.Field.Integer extraData = new Template.Field.Integer();
|
||||
|
||||
@@ -205,6 +183,14 @@ public abstract class PacketPlayOutSpawnEntityHandle extends PacketHandle {
|
||||
public final Template.Method<Float> getPitch = new Template.Method<Float>();
|
||||
public final Template.Method<Void> setYaw = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setPitch = new Template.Method<Void>();
|
||||
public final Template.Method.Converted<Vector> getMotVector = new Template.Method.Converted<Vector>();
|
||||
public final Template.Method.Converted<Void> setMotVector = new Template.Method.Converted<Void>();
|
||||
public final Template.Method<Double> getMotX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getMotY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getMotZ = new Template.Method<Double>();
|
||||
public final Template.Method<Void> setMotX = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setMotY = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setMotZ = new Template.Method<Void>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.entity.CommonEntityType;
|
||||
import com.bergerkiller.bukkit.common.wrappers.DataWatcher;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@@ -22,10 +22,6 @@ public abstract class PacketPlayOutSpawnEntityLivingHandle extends PacketHandle
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
public static final PacketPlayOutSpawnEntityLivingHandle createNew(LivingEntity entity) {
|
||||
return T.constr_entity.newInstance(entity);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutSpawnEntityLivingHandle createNew() {
|
||||
@@ -40,7 +36,14 @@ public abstract class PacketPlayOutSpawnEntityLivingHandle extends PacketHandle
|
||||
public abstract void setPosX(double x);
|
||||
public abstract void setPosY(double y);
|
||||
public abstract void setPosZ(double z);
|
||||
|
||||
public abstract Vector getMotVector();
|
||||
public abstract void setMotVector(Vector motVector);
|
||||
public abstract double getMotX();
|
||||
public abstract double getMotY();
|
||||
public abstract double getMotZ();
|
||||
public abstract void setMotX(double motX);
|
||||
public abstract void setMotY(double motY);
|
||||
public abstract void setMotZ(double motZ);
|
||||
public boolean hasDataWatcherSupport() {
|
||||
return T.opt_dataWatcher.isAvailable();
|
||||
}
|
||||
@@ -91,30 +94,6 @@ public abstract class PacketPlayOutSpawnEntityLivingHandle extends PacketHandle
|
||||
return getCommonEntityType().entityType;
|
||||
}
|
||||
|
||||
public double getMotX() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motX_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public double getMotY() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motY_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public double getMotZ() {
|
||||
return com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.deserializeVelocity(T.motZ_raw.getInteger(getRaw()));
|
||||
}
|
||||
|
||||
public void setMotX(double motX) {
|
||||
T.motX_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motX));
|
||||
}
|
||||
|
||||
public void setMotY(double motY) {
|
||||
T.motY_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motY));
|
||||
}
|
||||
|
||||
public void setMotZ(double motZ) {
|
||||
T.motZ_raw.setInteger(getRaw(), com.bergerkiller.bukkit.common.internal.logic.ProtocolMath.serializeVelocity(motZ));
|
||||
}
|
||||
|
||||
public float getYaw() {
|
||||
return getProtocolRotation(T.yaw_raw);
|
||||
}
|
||||
@@ -145,18 +124,10 @@ public abstract class PacketPlayOutSpawnEntityLivingHandle extends PacketHandle
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutSpawnEntityLivingClass extends Template.Class<PacketPlayOutSpawnEntityLivingHandle> {
|
||||
public final Template.Constructor.Converted<PacketPlayOutSpawnEntityLivingHandle> constr_entity = new Template.Constructor.Converted<PacketPlayOutSpawnEntityLivingHandle>();
|
||||
|
||||
public final Template.Field.Integer entityId = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field<UUID> entityUUID = new Template.Field<UUID>();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer motX_raw = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer motY_raw = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Integer motZ_raw = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Byte pitch_raw = new Template.Field.Byte();
|
||||
@Template.Optional
|
||||
public final Template.Field.Byte yaw_raw = new Template.Field.Byte();
|
||||
@@ -175,6 +146,14 @@ public abstract class PacketPlayOutSpawnEntityLivingHandle extends PacketHandle
|
||||
public final Template.Method<Void> setPosX = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setPosY = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setPosZ = new Template.Method<Void>();
|
||||
public final Template.Method.Converted<Vector> getMotVector = new Template.Method.Converted<Vector>();
|
||||
public final Template.Method.Converted<Void> setMotVector = new Template.Method.Converted<Void>();
|
||||
public final Template.Method<Double> getMotX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getMotY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getMotZ = new Template.Method<Double>();
|
||||
public final Template.Method<Void> setMotX = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setMotY = new Template.Method<Void>();
|
||||
public final Template.Method<Void> setMotZ = new Template.Method<Void>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ public abstract class PacketPlayOutSpawnEntityWeatherHandle extends PacketHandle
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
public double getPosX() {
|
||||
return getProtocolPosition(T.posX_1_8_8, T.posX_1_10_2);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.bases.IntVector3;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.server.level.EntityPlayerHandle.RespawnConfigHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition</b>.
|
||||
@@ -21,19 +21,19 @@ public abstract class PacketPlayOutSpawnPositionHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract void setAngle(float angle);
|
||||
public abstract float getAngle();
|
||||
public abstract IntVector3 getPosition();
|
||||
public abstract void setPosition(IntVector3 value);
|
||||
public static PacketPlayOutSpawnPositionHandle createNew(RespawnConfigHandle spawnConfig) {
|
||||
return T.createNew.invoke(spawnConfig);
|
||||
}
|
||||
|
||||
public abstract RespawnConfigHandle getSpawn();
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutSpawnPositionClass extends Template.Class<PacketPlayOutSpawnPositionHandle> {
|
||||
public final Template.Field.Converted<IntVector3> position = new Template.Field.Converted<IntVector3>();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutSpawnPositionHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutSpawnPositionHandle>();
|
||||
|
||||
public final Template.Method<Void> setAngle = new Template.Method<Void>();
|
||||
public final Template.Method<Float> getAngle = new Template.Method<Float>();
|
||||
public final Template.Method.Converted<RespawnConfigHandle> getSpawn = new Template.Method.Converted<RespawnConfigHandle>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.resources.ResourceKey;
|
||||
import com.bergerkiller.bukkit.common.resources.SoundEffect;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutStopSound</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutStopSound")
|
||||
public abstract class PacketPlayOutStopSoundHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutStopSoundClass */
|
||||
public static final PacketPlayOutStopSoundClass T = Template.Class.create(PacketPlayOutStopSoundClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutStopSoundHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutStopSoundHandle createNew(ResourceKey<SoundEffect> soundEffect, String category) {
|
||||
return T.createNew.invoke(soundEffect, category);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutStopSound</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutStopSoundClass extends Template.Class<PacketPlayOutStopSoundHandle> {
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutStopSoundHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutStopSoundHandle>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,16 +22,22 @@ public abstract class PacketPlayOutUnloadChunkHandle extends PacketHandle {
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getCx();
|
||||
public abstract void setCx(int value);
|
||||
public abstract int getCz();
|
||||
public abstract void setCz(int value);
|
||||
public abstract void setChunk(int cx, int cz);
|
||||
public void setCx(int cx) {
|
||||
setChunk(cx, getCz());
|
||||
}
|
||||
public void setCz(int cz) {
|
||||
setChunk(getCx(), cz);
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutUnloadChunk</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutUnloadChunkClass extends Template.Class<PacketPlayOutUnloadChunkHandle> {
|
||||
public final Template.Field.Integer cx = new Template.Field.Integer();
|
||||
public final Template.Field.Integer cz = new Template.Field.Integer();
|
||||
public final Template.Method<Integer> getCx = new Template.Method<Integer>();
|
||||
public final Template.Method<Integer> getCz = new Template.Method<Integer>();
|
||||
public final Template.Method<Void> setChunk = new Template.Method<Void>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth")
|
||||
public abstract class PacketPlayOutUpdateHealthHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutUpdateHealthClass */
|
||||
public static final PacketPlayOutUpdateHealthClass T = Template.Class.create(PacketPlayOutUpdateHealthClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutUpdateHealthHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract float getHealth();
|
||||
public abstract void setHealth(float value);
|
||||
public abstract int getFood();
|
||||
public abstract void setFood(int value);
|
||||
public abstract float getFoodSaturation();
|
||||
public abstract void setFoodSaturation(float value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutUpdateHealthClass extends Template.Class<PacketPlayOutUpdateHealthHandle> {
|
||||
public final Template.Field.Float health = new Template.Field.Float();
|
||||
public final Template.Field.Integer food = new Template.Field.Integer();
|
||||
public final Template.Field.Float foodSaturation = new Template.Field.Float();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutUpdateTime</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutUpdateTime")
|
||||
public abstract class PacketPlayOutUpdateTimeHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutUpdateTimeClass */
|
||||
public static final PacketPlayOutUpdateTimeClass T = Template.Class.create(PacketPlayOutUpdateTimeClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutUpdateTimeHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract long getGameTime();
|
||||
public abstract void setGameTime(long value);
|
||||
public abstract long getDayTime();
|
||||
public abstract void setDayTime(long value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutUpdateTime</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutUpdateTimeClass extends Template.Class<PacketPlayOutUpdateTimeHandle> {
|
||||
public final Template.Field.Long gameTime = new Template.Field.Long();
|
||||
public final Template.Field.Long dayTime = new Template.Field.Long();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,26 +21,27 @@ public abstract class PacketPlayOutVehicleMoveHandle extends PacketHandle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutVehicleMoveHandle createNew(double posX, double posY, double posZ, float yaw, float pitch) {
|
||||
return T.createNew.invoke(posX, posY, posZ, yaw, pitch);
|
||||
}
|
||||
|
||||
public abstract double getPosX();
|
||||
public abstract void setPosX(double value);
|
||||
public abstract double getPosY();
|
||||
public abstract void setPosY(double value);
|
||||
public abstract double getPosZ();
|
||||
public abstract void setPosZ(double value);
|
||||
public abstract float getYaw();
|
||||
public abstract void setYaw(float value);
|
||||
public abstract float getPitch();
|
||||
public abstract void setPitch(float value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutVehicleMove</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutVehicleMoveClass extends Template.Class<PacketPlayOutVehicleMoveHandle> {
|
||||
public final Template.Field.Double posX = new Template.Field.Double();
|
||||
public final Template.Field.Double posY = new Template.Field.Double();
|
||||
public final Template.Field.Double posZ = new Template.Field.Double();
|
||||
public final Template.Field.Float yaw = new Template.Field.Float();
|
||||
public final Template.Field.Float pitch = new Template.Field.Float();
|
||||
public final Template.StaticMethod.Converted<PacketPlayOutVehicleMoveHandle> createNew = new Template.StaticMethod.Converted<PacketPlayOutVehicleMoveHandle>();
|
||||
|
||||
public final Template.Method<Double> getPosX = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getPosY = new Template.Method<Double>();
|
||||
public final Template.Method<Double> getPosZ = new Template.Method<Double>();
|
||||
public final Template.Method<Float> getYaw = new Template.Method<Float>();
|
||||
public final Template.Method<Float> getPitch = new Template.Method<Float>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.bergerkiller.generated.net.minecraft.network.protocol.game;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.generated.net.minecraft.network.protocol.PacketHandle;
|
||||
|
||||
/**
|
||||
* Instance wrapper handle for type <b>net.minecraft.network.protocol.game.PacketPlayOutWindowData</b>.
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.InstanceType("net.minecraft.network.protocol.game.PacketPlayOutWindowData")
|
||||
public abstract class PacketPlayOutWindowDataHandle extends PacketHandle {
|
||||
/** @see PacketPlayOutWindowDataClass */
|
||||
public static final PacketPlayOutWindowDataClass T = Template.Class.create(PacketPlayOutWindowDataClass.class, com.bergerkiller.bukkit.common.Common.TEMPLATE_RESOLVER);
|
||||
/* ============================================================================== */
|
||||
|
||||
public static PacketPlayOutWindowDataHandle createHandle(Object handleInstance) {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract int getWindowId();
|
||||
public abstract void setWindowId(int value);
|
||||
public abstract int getId();
|
||||
public abstract void setId(int value);
|
||||
public abstract int getValue();
|
||||
public abstract void setValue(int value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.protocol.game.PacketPlayOutWindowData</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class PacketPlayOutWindowDataClass extends Template.Class<PacketPlayOutWindowDataHandle> {
|
||||
public final Template.Field.Integer windowId = new Template.Field.Integer();
|
||||
public final Template.Field.Integer id = new Template.Field.Integer();
|
||||
public final Template.Field.Integer value = new Template.Field.Integer();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ public abstract class PacketPlayOutWorldParticlesHandle extends PacketHandle {
|
||||
public abstract void setPosX(double x);
|
||||
public abstract void setPosY(double y);
|
||||
public abstract void setPosZ(double z);
|
||||
|
||||
public void setParticle(com.bergerkiller.bukkit.common.resources.ParticleType<Void> particleType) {
|
||||
setParticle(particleType, null);
|
||||
}
|
||||
@@ -41,7 +40,6 @@ public abstract class PacketPlayOutWorldParticlesHandle extends PacketHandle {
|
||||
T.setParticle.invoker.invoke(getRaw(), particleType.getRawHandle(), value);
|
||||
}
|
||||
|
||||
|
||||
public void setPos(double x, double y, double z) {
|
||||
setPosX(x);
|
||||
setPosY(y);
|
||||
|
||||
@@ -22,46 +22,47 @@ public abstract class DataWatcherHandle extends Template.Handle {
|
||||
return T.createHandle(handleInstance);
|
||||
}
|
||||
|
||||
public static final DataWatcherHandle createNew(EntityHandle owner) {
|
||||
return T.constr_owner.newInstance(owner);
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public static DataWatcherHandle createNew(EntityHandle owner) {
|
||||
return T.createNew.invoke(owner);
|
||||
}
|
||||
|
||||
public abstract EntityHandle getOwner();
|
||||
public abstract void setOwner(EntityHandle owner);
|
||||
public abstract DataWatcherHandle cloneWithOwner(EntityHandle owner);
|
||||
public abstract List<PackedItem<?>> packChanges();
|
||||
public abstract List<PackedItem<?>> packNonDefaults();
|
||||
public abstract List<PackedItem<?>> packAll();
|
||||
public abstract List<Item<?>> getCopyOfAllItems();
|
||||
public abstract Item<Object> read(Key<?> key);
|
||||
public abstract void register(Key<?> key, Object defaultValue);
|
||||
public abstract void set(Key<?> key, Object value);
|
||||
public abstract void forceSet(Key<?> key, Object value);
|
||||
public abstract void setRawDefault(Key<?> dwo, Object rawDefaultValue);
|
||||
public abstract void setRaw(Key<?> dwo, Object rawValue, boolean force);
|
||||
public abstract Object get(Key<?> key);
|
||||
public abstract boolean isChanged();
|
||||
public abstract boolean isEmpty();
|
||||
public static final Object UNSET_MARKER_VALUE = com.bergerkiller.bukkit.common.internal.logic.UnsetDataWatcherItemInit.UNSET_MARKER_VALUE;
|
||||
|
||||
public static DataWatcherHandle createNew(org.bukkit.entity.Entity owner) {
|
||||
return createHandle(T.constr_owner.raw.newInstance(com.bergerkiller.bukkit.common.conversion.type.HandleConversion.toEntityHandle(owner)));
|
||||
return createHandle(T.createNew.raw.invoke(com.bergerkiller.bukkit.common.conversion.type.HandleConversion.toEntityHandle(owner)));
|
||||
}
|
||||
public abstract EntityHandle getOwner();
|
||||
public abstract void setOwner(EntityHandle value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.syncher.DataWatcher</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
*/
|
||||
public static final class DataWatcherClass extends Template.Class<DataWatcherHandle> {
|
||||
public final Template.Constructor.Converted<DataWatcherHandle> constr_owner = new Template.Constructor.Converted<DataWatcherHandle>();
|
||||
|
||||
public final Template.Field.Converted<EntityHandle> owner = new Template.Field.Converted<EntityHandle>();
|
||||
public final Template.StaticMethod.Converted<DataWatcherHandle> createNew = new Template.StaticMethod.Converted<DataWatcherHandle>();
|
||||
|
||||
public final Template.Method.Converted<EntityHandle> getOwner = new Template.Method.Converted<EntityHandle>();
|
||||
public final Template.Method.Converted<Void> setOwner = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<DataWatcherHandle> cloneWithOwner = new Template.Method.Converted<DataWatcherHandle>();
|
||||
public final Template.Method.Converted<List<PackedItem<?>>> packChanges = new Template.Method.Converted<List<PackedItem<?>>>();
|
||||
public final Template.Method.Converted<List<PackedItem<?>>> packNonDefaults = new Template.Method.Converted<List<PackedItem<?>>>();
|
||||
public final Template.Method.Converted<List<PackedItem<?>>> packAll = new Template.Method.Converted<List<PackedItem<?>>>();
|
||||
public final Template.Method.Converted<List<Item<?>>> getCopyOfAllItems = new Template.Method.Converted<List<Item<?>>>();
|
||||
public final Template.Method.Converted<Item<Object>> read = new Template.Method.Converted<Item<Object>>();
|
||||
public final Template.Method<Void> register = new Template.Method<Void>();
|
||||
public final Template.Method<Void> set = new Template.Method<Void>();
|
||||
public final Template.Method<Void> forceSet = new Template.Method<Void>();
|
||||
public final Template.Method.Converted<Void> setRawDefault = new Template.Method.Converted<Void>();
|
||||
public final Template.Method.Converted<Void> setRaw = new Template.Method.Converted<Void>();
|
||||
public final Template.Method<Object> get = new Template.Method<Object>();
|
||||
public final Template.Method<Boolean> isChanged = new Template.Method<Boolean>();
|
||||
public final Template.Method<Boolean> isEmpty = new Template.Method<Boolean>();
|
||||
@@ -86,11 +87,11 @@ public abstract class DataWatcherHandle extends Template.Handle {
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
public abstract void setChanged(boolean changed);
|
||||
public abstract boolean isChanged();
|
||||
public abstract Object getValue();
|
||||
public abstract void setValue(Object value);
|
||||
public abstract PackedItemHandle pack();
|
||||
public abstract boolean isChanged();
|
||||
public abstract void setChanged(boolean value);
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.network.syncher.DataWatcher.Item</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
@@ -102,10 +103,9 @@ public abstract class DataWatcherHandle extends Template.Handle {
|
||||
public final Template.Field.Integer keyId = new Template.Field.Integer();
|
||||
@Template.Optional
|
||||
public final Template.Field.Converted<Key<?>> key = new Template.Field.Converted<Key<?>>();
|
||||
@Template.Optional
|
||||
public final Template.Field<Object> value = new Template.Field<Object>();
|
||||
public final Template.Field.Boolean changed = new Template.Field.Boolean();
|
||||
|
||||
public final Template.Method<Void> setChanged = new Template.Method<Void>();
|
||||
public final Template.Method<Boolean> isChanged = new Template.Method<Boolean>();
|
||||
public final Template.Method<Object> getValue = new Template.Method<Object>();
|
||||
public final Template.Method<Void> setValue = new Template.Method<Void>();
|
||||
public final Template.Method.Converted<PackedItemHandle> pack = new Template.Method.Converted<PackedItemHandle>();
|
||||
|
||||