mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-31 22:38:52 -04:00
Compare commits
671
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f14de9ab58 | ||
|
|
8a1c846c2c | ||
|
|
459e7d3490 | ||
|
|
5a9be8944f | ||
|
|
3bb941b087 | ||
|
|
384b496d76 | ||
|
|
fe940caafc | ||
|
|
c9d148ec9c | ||
|
|
e611bf4a77 | ||
|
|
8093822140 | ||
|
|
f695ec15f9 | ||
|
|
1f6c791ce6 | ||
|
|
570805fdf1 | ||
|
|
ddecb08bc7 | ||
|
|
a1b930a21f | ||
|
|
7728ff3892 | ||
|
|
4d7cfcdf61 | ||
|
|
e56dd6ef64 | ||
|
|
236b98fa78 | ||
|
|
ac61e0d4d0 | ||
|
|
d8956fd66f | ||
|
|
ffe005511d | ||
|
|
1e634a20b8 | ||
|
|
50a5a78dd4 | ||
|
|
76c2654399 | ||
|
|
f9f4745e93 | ||
|
|
c700674289 | ||
|
|
c4f0032eee | ||
|
|
d92986016b | ||
|
|
ab57e01242 | ||
|
|
0da1c740a4 | ||
|
|
a7979aa80c | ||
|
|
59804a4e08 | ||
|
|
072c67acad | ||
|
|
60bbe221de | ||
|
|
5f06dc214b | ||
|
|
a6607e585b | ||
|
|
20584f4507 | ||
|
|
9660f1f724 | ||
|
|
c8cbace800 | ||
|
|
a616a24923 | ||
|
|
12035dd589 | ||
|
|
9627b80b01 | ||
|
|
4e9cecc854 | ||
|
|
9d4b19b185 | ||
|
|
aee96d06aa | ||
|
|
23e3c585f7 | ||
|
|
c22a88079f | ||
|
|
2225402082 | ||
|
|
9197207431 | ||
|
|
47c7f7079c | ||
|
|
eb0c1dddfd | ||
|
|
e3dbfe6ff8 | ||
|
|
fac207f36b | ||
|
|
379e794848 | ||
|
|
9081a4b131 | ||
|
|
dc6d75b8ee | ||
|
|
bb297a4448 | ||
|
|
a93922c438 | ||
|
|
f7d21c80d7 | ||
|
|
9248d26fd4 | ||
|
|
b5ac54cd16 | ||
|
|
dc703e67f7 | ||
|
|
0930721865 | ||
|
|
644ff1772e | ||
|
|
3c7e0bebb6 | ||
|
|
0c0eea3876 | ||
|
|
5535140bb7 | ||
|
|
f9dd1448e5 | ||
|
|
ecf5d57ad2 | ||
|
|
8663888abc | ||
|
|
f452cd9a05 | ||
|
|
4fe9cd7fd6 | ||
|
|
9b0ca1c16b | ||
|
|
052ff59f57 | ||
|
|
40e5ef1c46 | ||
|
|
5025977d23 | ||
|
|
922006afe7 | ||
|
|
46cc7cb04d | ||
|
|
fa3e3bbb1b | ||
|
|
afbdcce337 | ||
|
|
2c1d11ed11 | ||
|
|
b88adf0479 | ||
|
|
b1066671f5 | ||
|
|
387e85d4ad | ||
|
|
1fa113f5ac | ||
|
|
77ab58d823 | ||
|
|
1a9e736d8b | ||
|
|
f680682f61 | ||
|
|
4d93d1244d | ||
|
|
6a7d5d2133 | ||
|
|
98397cd1da | ||
|
|
fc5a610394 | ||
|
|
504df5d998 | ||
|
|
3b4d3ebf50 | ||
|
|
aa39c1906e | ||
|
|
2e460e2ca2 | ||
|
|
a07ff7f442 | ||
|
|
5374569ea1 | ||
|
|
af9c1196bf | ||
|
|
09d5543469 | ||
|
|
49e4dd0298 | ||
|
|
c8e408c50a | ||
|
|
e8a0467643 | ||
|
|
2dd0b66b83 | ||
|
|
68374017e1 | ||
|
|
120520f51d | ||
|
|
e8dea9773a | ||
|
|
7b31e6bcc4 | ||
|
|
c6ffca639f | ||
|
|
c491a1f7ca | ||
|
|
0b333b743d | ||
|
|
95e79865e5 | ||
|
|
0e2860cd90 | ||
|
|
3259bf032c | ||
|
|
116205cdf1 | ||
|
|
43277d18dc | ||
|
|
86153419ee | ||
|
|
2b4d9c451c | ||
|
|
7f0e2fa9d8 | ||
|
|
e165095bd5 | ||
|
|
b8708d6e10 | ||
|
|
ef536390ca | ||
|
|
28befab173 | ||
|
|
c142439d5b | ||
|
|
1ca7335654 | ||
|
|
9197d9cdcd | ||
|
|
f75813e64d | ||
|
|
1f617c76a4 | ||
|
|
ebf573aa7a | ||
|
|
75363da470 | ||
|
|
cce4b932cc | ||
|
|
0973e1ced0 | ||
|
|
e7b5c84024 | ||
|
|
4001cc2a89 | ||
|
|
6e57d77d10 | ||
|
|
2206d96a6e | ||
|
|
33f05858f1 | ||
|
|
8443b88c16 | ||
|
|
a4f204a5a3 | ||
|
|
31b6be2164 | ||
|
|
0dbf73067b | ||
|
|
775703e1f5 | ||
|
|
bcdfef4886 | ||
|
|
a19adb463b | ||
|
|
b71208299f | ||
|
|
136b5824b0 | ||
|
|
5004edbbb6 | ||
|
|
d8bdd6329a | ||
|
|
82d56637a0 | ||
|
|
7232a43816 | ||
|
|
098eb7d14b | ||
|
|
835b70ed48 | ||
|
|
9d828a86fb | ||
|
|
910551ee70 | ||
|
|
9beee548d4 | ||
|
|
f9189b265f | ||
|
|
6f3894f27b | ||
|
|
bbc9a5e62e | ||
|
|
94765da04a | ||
|
|
8caa82f123 | ||
|
|
8e1fcc6f14 | ||
|
|
21c4d0233d | ||
|
|
2f87d53af6 | ||
|
|
131ef31492 | ||
|
|
b6b067b1d3 | ||
|
|
546f10eca7 | ||
|
|
542839ba69 | ||
|
|
efab1bba08 | ||
|
|
8f986bc326 | ||
|
|
e155d32aaf | ||
|
|
743e0b7d66 | ||
|
|
1518d703f9 | ||
|
|
af9d851d67 | ||
|
|
20ca91f1c9 | ||
|
|
6fb3c0e49a | ||
|
|
5cb4ff5f5f | ||
|
|
d035c08a5c | ||
|
|
fda7b13f50 | ||
|
|
fb4aaed220 | ||
|
|
c5e1b37ead | ||
|
|
2be9d303ea | ||
|
|
99ac6d213a | ||
|
|
f595724971 | ||
|
|
0511ba147b | ||
|
|
760f48d850 | ||
|
|
bf296b4921 | ||
|
|
6f4aae8b7d | ||
|
|
01e5e74e64 | ||
|
|
b6565a5dee | ||
|
|
49886389cf | ||
|
|
643bf9068b | ||
|
|
53f3258246 | ||
|
|
1e9895ec84 | ||
|
|
52dacb03ae | ||
|
|
85b0f3f393 | ||
|
|
a04a91bf24 | ||
|
|
5e814f7ab5 | ||
|
|
2780f491d6 | ||
|
|
2d3ec7aff1 | ||
|
|
cb7baf2696 | ||
|
|
5cc069df78 | ||
|
|
9222476c1f | ||
|
|
f220755f99 | ||
|
|
d55bbf237c | ||
|
|
83a9d44c3a | ||
|
|
c5a802eaf6 | ||
|
|
2e27875460 | ||
|
|
cd66887faa | ||
|
|
d665c87c21 | ||
|
|
044d3102b6 | ||
|
|
c421a93b06 | ||
|
|
2865aa2272 | ||
|
|
7c4aae3e9d | ||
|
|
d9f671f2a8 | ||
|
|
69733b530b | ||
|
|
d4471c30bc | ||
|
|
185f7e03f5 | ||
|
|
a45eb0eb21 | ||
|
|
ed67142379 | ||
|
|
13169c6848 | ||
|
|
8be134ee2f | ||
|
|
8c3206a413 | ||
|
|
4d4c071b95 | ||
|
|
b82c27754f | ||
|
|
63afec184e | ||
|
|
65699f045e | ||
|
|
d02441a273 | ||
|
|
f76ab784b5 | ||
|
|
a566e36754 | ||
|
|
ef1479fde6 | ||
|
|
d6c7b271e4 | ||
|
|
df9acfa0d1 | ||
|
|
9d7fc8435e | ||
|
|
ab4492ac5c | ||
|
|
cb78dc8d88 | ||
|
|
020adabe26 | ||
|
|
08aca7a274 | ||
|
|
2a9ef2b9fe | ||
|
|
90dc489547 | ||
|
|
5ec5cfbc4a | ||
|
|
1ef65449a8 | ||
|
|
c6ff1ea72e | ||
|
|
cbfa8d3e78 | ||
|
|
5098ff3cfd | ||
|
|
7c32b07d3f | ||
|
|
b2142fed1d | ||
|
|
fef21516e9 | ||
|
|
6fba0f55c1 | ||
|
|
95d43de79f | ||
|
|
0be617b8ab | ||
|
|
c02d22f449 | ||
|
|
846b645856 | ||
|
|
25d93a771c | ||
|
|
f16c782336 | ||
|
|
ed0f315e41 | ||
|
|
d20b03f4c5 | ||
|
|
a3920413ac | ||
|
|
92bccf620f | ||
|
|
15f8a9ee71 | ||
|
|
dfb9ee755e | ||
|
|
68f4117e29 | ||
|
|
f74a24a056 | ||
|
|
e5750cbba0 | ||
|
|
c6482c82cd | ||
|
|
b4c23a9132 | ||
|
|
c470894bd3 | ||
|
|
a940e32f8d | ||
|
|
b6b59eccad | ||
|
|
b520b94fae | ||
|
|
9af99d16f7 | ||
|
|
2cc17d3280 | ||
|
|
20b2bcaa5a | ||
|
|
d1ada605fd | ||
|
|
d37f73626d | ||
|
|
73a94cb02e | ||
|
|
5a48945e50 | ||
|
|
476448a2ce | ||
|
|
bcba4f7fb7 | ||
|
|
20e9608ff3 | ||
|
|
3e5733ceaf | ||
|
|
af29c99b03 | ||
|
|
60d596a24f | ||
|
|
3f993e0466 | ||
|
|
9e3d22ee54 | ||
|
|
e86cb1981f | ||
|
|
e94f265adb | ||
|
|
b3fc35240a | ||
|
|
d74618bddb | ||
|
|
8b54a8d459 | ||
|
|
c17104a0fd | ||
|
|
88ca3ebbf3 | ||
|
|
4003456e5c | ||
|
|
1d21a52d28 | ||
|
|
2d49c62f85 | ||
|
|
20fac724f6 | ||
|
|
0807d73646 | ||
|
|
3013302f35 | ||
|
|
879e7bef21 | ||
|
|
557623dfe2 | ||
|
|
a28d1e176d | ||
|
|
f3c52db70d | ||
|
|
525575b0ba | ||
|
|
a55efeb378 | ||
|
|
da18b082a6 | ||
|
|
7511facebc | ||
|
|
1486f5cfc2 | ||
|
|
f8a16e5081 | ||
|
|
558e2d89ff | ||
|
|
ea7b688655 | ||
|
|
fdafa3435c | ||
|
|
f17c90f6ea | ||
|
|
1dc45669bb | ||
|
|
f3658614a4 | ||
|
|
cad39d8802 | ||
|
|
422f60f587 | ||
|
|
8190ddf0e9 | ||
|
|
af281d0bde | ||
|
|
00905b8c32 | ||
|
|
79b3cb8611 | ||
|
|
797e908621 | ||
|
|
3df3c395de | ||
|
|
b2f682ebb1 | ||
|
|
754e9bc158 | ||
|
|
2df8504139 | ||
|
|
2838f97c56 | ||
|
|
68c75deeeb | ||
|
|
3bc2659740 | ||
|
|
89bba8a67a | ||
|
|
cbd5cdaf92 | ||
|
|
5b9d5cbb55 | ||
|
|
6d6e13be83 | ||
|
|
899bec77b6 | ||
|
|
6dd8325772 | ||
|
|
e9bffd3ad7 | ||
|
|
ff890307c2 | ||
|
|
dda9d3e790 | ||
|
|
1acc02a2ec | ||
|
|
460c472c55 | ||
|
|
69c3b6142d | ||
|
|
9a036a4c01 | ||
|
|
0fbe206893 | ||
|
|
3cea6dd175 | ||
|
|
2fa053f833 | ||
|
|
ea4f858919 | ||
|
|
2aa4ab4b52 | ||
|
|
113977990e | ||
|
|
d86021e2a1 | ||
|
|
79faadef59 | ||
|
|
9b6629db7f | ||
|
|
d151a1ce65 | ||
|
|
d9ca7b483d | ||
|
|
708f7fc1b8 | ||
|
|
621db85845 | ||
|
|
b09066c580 | ||
|
|
7c45f28827 | ||
|
|
9c1b2cae22 | ||
|
|
16b2f81bd4 | ||
|
|
1969af65b9 | ||
|
|
3bd3ce5688 | ||
|
|
108f0e3d88 | ||
|
|
4344c127eb | ||
|
|
881a87216b | ||
|
|
1d473b82af | ||
|
|
6e0c005587 | ||
|
|
5955547c6f | ||
|
|
7a3a1cb8de | ||
|
|
1674cb0913 | ||
|
|
152ce4e923 | ||
|
|
3a6d024217 | ||
|
|
3b722068b0 | ||
|
|
f2fcc5ba79 | ||
|
|
db0fb8e287 | ||
|
|
dae36a67d1 | ||
|
|
6f99862288 | ||
|
|
0377747e1e | ||
|
|
6bc974f90f | ||
|
|
aca53de259 | ||
|
|
41bde38727 | ||
|
|
a4b7ee3b38 | ||
|
|
154b653c57 | ||
|
|
04489bc969 | ||
|
|
25499b3e7a | ||
|
|
bb6bda54dc | ||
|
|
9f3dbdc2d8 | ||
|
|
932148338c | ||
|
|
e0d0c38232 | ||
|
|
a0e732dc6e | ||
|
|
309f674853 | ||
|
|
ea20c2aa4c | ||
|
|
da5272c473 | ||
|
|
dc705c7720 | ||
|
|
a785e574e0 | ||
|
|
4b236b0268 | ||
|
|
1cd86ae5d6 | ||
|
|
b7489a0b14 | ||
|
|
f7554425dc | ||
|
|
9bfc577444 | ||
|
|
217d4cda42 | ||
|
|
08daa43aae | ||
|
|
184d889831 | ||
|
|
c6e0f431ae | ||
|
|
93daeab840 | ||
|
|
f132b297c6 | ||
|
|
858d2e908a | ||
|
|
b61e0b0c82 | ||
|
|
4d9a6e71c9 | ||
|
|
a0010de504 | ||
|
|
cb73a30e23 | ||
|
|
905d63e098 | ||
|
|
1ea8ab7dcc | ||
|
|
a45d21b279 | ||
|
|
3ca6d350fe | ||
|
|
2997ce8457 | ||
|
|
ff279d8310 | ||
|
|
9a7536b068 | ||
|
|
bd973e702e | ||
|
|
ede1851d34 | ||
|
|
cdb8ee0d8e | ||
|
|
e7d86a382c | ||
|
|
eb911df830 | ||
|
|
1c30acc53c | ||
|
|
32b0699235 | ||
|
|
e9c6580230 | ||
|
|
f893eb48fd | ||
|
|
232e2f18bf | ||
|
|
c266c99710 | ||
|
|
2a0e8f6d47 | ||
|
|
e6bd8ec529 | ||
|
|
911a95e873 | ||
|
|
447cfc2ae5 | ||
|
|
8dfeb0d260 | ||
|
|
caa7b19833 | ||
|
|
91d6fb62ba | ||
|
|
8f4a5b2015 | ||
|
|
07604c9a3b | ||
|
|
64dd8ae193 | ||
|
|
156ee6f290 | ||
|
|
c0a524a718 | ||
|
|
fe433d1417 | ||
|
|
efe8f34413 | ||
|
|
0dc662d295 | ||
|
|
081e370bfd | ||
|
|
3ef0567287 | ||
|
|
3cad9e5481 | ||
|
|
dc8b7908be | ||
|
|
85085a1eca | ||
|
|
bff59dee6e | ||
|
|
bb5828531a | ||
|
|
cd08e98c28 | ||
|
|
6bb23582c4 | ||
|
|
56ccb43997 | ||
|
|
bf7d40c9b5 | ||
|
|
5abb3d7f97 | ||
|
|
975ad8186a | ||
|
|
26b6419f04 | ||
|
|
331f7ca425 | ||
|
|
f445c05333 | ||
|
|
71c9ac0ff0 | ||
|
|
1404cc0ab5 | ||
|
|
a62485fc1f | ||
|
|
044f3080ff | ||
|
|
28b0cab906 | ||
|
|
82f34d651c | ||
|
|
6ca908a91d | ||
|
|
0948b8da9a | ||
|
|
22e04a53b3 | ||
|
|
df3217b41b | ||
|
|
9ff15a1913 | ||
|
|
89e43945a3 | ||
|
|
bd8dcddf35 | ||
|
|
dd372f3160 | ||
|
|
c56aab28d4 | ||
|
|
ca58801794 | ||
|
|
38fa5e2628 | ||
|
|
fae1ae7124 | ||
|
|
3ec5f76c73 | ||
|
|
5fbbcb5707 | ||
|
|
5bb8aaba55 | ||
|
|
23ba41e981 | ||
|
|
29b049452b | ||
|
|
0b0f665804 | ||
|
|
3cdf28ffdd | ||
|
|
5d53fba2ce | ||
|
|
c6fb18ea51 | ||
|
|
2d851cb134 | ||
|
|
92b0ef84e9 | ||
|
|
dc8d18384c | ||
|
|
f685be0aab | ||
|
|
44c056ecd5 | ||
|
|
dcc707c20d | ||
|
|
14cc851562 | ||
|
|
7223d1fd68 | ||
|
|
6ab5ad52ec | ||
|
|
079b2ae766 | ||
|
|
34eea827e7 | ||
|
|
06c6ee5a9c | ||
|
|
54748c20ea | ||
|
|
75f52e4cf4 | ||
|
|
55446dd4b1 | ||
|
|
02e63b6fc8 | ||
|
|
3aebcf66ec | ||
|
|
580a24eac3 | ||
|
|
07b1b22c2c | ||
|
|
49a5f716b7 | ||
|
|
23078eccba | ||
|
|
8b825d558f | ||
|
|
8a82f35edf | ||
|
|
bec664c073 | ||
|
|
9a7f97f11f | ||
|
|
95b8d62e4a | ||
|
|
3e61424d8f | ||
|
|
0bd7b4dab3 | ||
|
|
8cbada0cf5 | ||
|
|
f0784fec2d | ||
|
|
c1606c6fc9 | ||
|
|
cfe0c5e0a5 | ||
|
|
e0108cc99f | ||
|
|
c0de8a2591 | ||
|
|
b8733eed52 | ||
|
|
4aa30efec7 | ||
|
|
4354c3fb03 | ||
|
|
f25a676bd5 | ||
|
|
a9906762a0 | ||
|
|
7b5b88eca2 | ||
|
|
291682ba52 | ||
|
|
546d403b45 | ||
|
|
c9f40e32a1 | ||
|
|
d642b8dd07 | ||
|
|
549a11116e | ||
|
|
b5468a4a4f | ||
|
|
c5d278ccb7 | ||
|
|
bf5e15de45 | ||
|
|
f4af417267 | ||
|
|
69c04acaeb | ||
|
|
83a6bb188f | ||
|
|
494a8b5e91 | ||
|
|
c8021f2f08 | ||
|
|
8cdf3af047 | ||
|
|
c90a24e1ab | ||
|
|
83e3cfc34e | ||
|
|
133dd4e5b7 | ||
|
|
a8cca14b86 | ||
|
|
9b0f356fa4 | ||
|
|
f2b0a102b6 | ||
|
|
a7d01b230a | ||
|
|
2a7db4b9b8 | ||
|
|
77e5f2501d | ||
|
|
e6513717bd | ||
|
|
0e0c98f693 | ||
|
|
528bfa4e22 | ||
|
|
83c87779d7 | ||
|
|
dc33235144 | ||
|
|
935c658c5f | ||
|
|
0426f4fbf9 | ||
|
|
7930ec52fa | ||
|
|
75bc03fdcb | ||
|
|
57eb306e4f | ||
|
|
bd0511a9fb | ||
|
|
c14f3292aa | ||
|
|
46e771a062 | ||
|
|
4c0095844b | ||
|
|
10a2ef27d6 | ||
|
|
309ff3da13 | ||
|
|
3af91e2a74 | ||
|
|
2e027e3db7 | ||
|
|
fc40fb02c0 | ||
|
|
2c1c0299f9 | ||
|
|
3c7637515c | ||
|
|
08cbbaf68c | ||
|
|
6e911acf01 | ||
|
|
f6d82a1b28 | ||
|
|
702126aeab | ||
|
|
df566e8fcb | ||
|
|
c83e0f33b5 | ||
|
|
f279f936b6 | ||
|
|
f8e20bafd9 | ||
|
|
a5211ca7ff | ||
|
|
0a5abdb331 | ||
|
|
4ed7413dd2 | ||
|
|
40b66c24fc | ||
|
|
2f7bedf001 | ||
|
|
44c31a9ddb | ||
|
|
20a35de3d8 | ||
|
|
cfc8a15db1 | ||
|
|
d5ba22a86c | ||
|
|
a38505f1c5 | ||
|
|
3cf1ba1fb3 | ||
|
|
9f5d595827 | ||
|
|
75673f0204 | ||
|
|
b43a7571ff | ||
|
|
b071dc04d3 | ||
|
|
12f9ff1647 | ||
|
|
3256a302df | ||
|
|
edbe447477 | ||
|
|
2f43910368 | ||
|
|
c2e87e4cfa | ||
|
|
e40d2ee806 | ||
|
|
ba74e7603b | ||
|
|
19c3fe6dc4 | ||
|
|
d0778dd124 | ||
|
|
8fb2b1cf3d | ||
|
|
5c7d1cbe10 | ||
|
|
3348bfc362 | ||
|
|
8db9252434 | ||
|
|
d9d4fe15cc | ||
|
|
8453e2d514 | ||
|
|
4d3070c0c2 | ||
|
|
15f273a9ef | ||
|
|
007c079cd6 | ||
|
|
9851b1e8ad | ||
|
|
c65c2610cd | ||
|
|
2be08a3fcc | ||
|
|
4cdf440eee | ||
|
|
1545ee8fc2 | ||
|
|
a009fabfe4 | ||
|
|
46e4bfdd13 | ||
|
|
e24c82860d | ||
|
|
1291dee1e1 | ||
|
|
69732be09b | ||
|
|
8ce4ed7dee | ||
|
|
33d3cc0104 | ||
|
|
33b6b519ed | ||
|
|
5ec849f4e3 | ||
|
|
6f4a2d2cd5 | ||
|
|
0bca89e77d | ||
|
|
8f9f162011 | ||
|
|
ac3bea3d5e | ||
|
|
178d4f199b | ||
|
|
933819380d | ||
|
|
d68131e1b9 | ||
|
|
ffbc379c0b | ||
|
|
7053d12508 | ||
|
|
d41442200f | ||
|
|
d2564c343e | ||
|
|
d1c19e8837 | ||
|
|
0ec3bfabad | ||
|
|
43ffb04621 | ||
|
|
eeaedf76a9 | ||
|
|
120fb4829a | ||
|
|
12b93e53a7 | ||
|
|
00b17b9764 | ||
|
|
06192f809d | ||
|
|
d09eb0d3ff | ||
|
|
416321679c | ||
|
|
72c4e6e54f | ||
|
|
d3738e3424 | ||
|
|
2e183db903 | ||
|
|
fa174b88dd | ||
|
|
0b4abe6d16 | ||
|
|
759fb0ecd8 | ||
|
|
429e927c3f | ||
|
|
643aed9133 | ||
|
|
e701642de2 | ||
|
|
a3a03e3da6 | ||
|
|
5dd3d5b552 | ||
|
|
1bae246e6c | ||
|
|
c94ef10189 | ||
|
|
dfacf1f9df | ||
|
|
06c5e34f48 | ||
|
|
1ab8b35e98 | ||
|
|
261b61ee6c | ||
|
|
5abf8e1bab | ||
|
|
7c0b463637 | ||
|
|
e156ab2432 | ||
|
|
0b46a7163b | ||
|
|
21b76c008a | ||
|
|
b7e9f8248d | ||
|
|
8b21e76a36 | ||
|
|
515471185f | ||
|
|
628e8f4e5e |
No files matched your search
@@ -157,6 +157,9 @@ build:
|
|||||||
paths:
|
paths:
|
||||||
- neoforge/build/libs
|
- neoforge/build/libs
|
||||||
- fabric/build/libs
|
- fabric/build/libs
|
||||||
|
exclude:
|
||||||
|
- neoforge/build/libs/*-dev-shadow.jar
|
||||||
|
- fabric/build/libs/*-dev-shadow.jar
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|||||||
+35
-34
@@ -1,41 +1,42 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
## [1.8.1 (September 13th, 2026)](#1-8-1)
|
## [1.8.x (MONTH xth, 2026)](#1-8-x)
|
||||||
|
|
||||||
|
### Additions
|
||||||
|
|
||||||
|
### New rideable Pokémon
|
||||||
|
|
||||||
|
### Pokémon Added
|
||||||
|
|
||||||
|
### Model updates for the following Pokémon
|
||||||
|
- Froakie
|
||||||
|
- Frogadier
|
||||||
|
- Greninja
|
||||||
|
(They have eyelids now.)
|
||||||
|
|
||||||
### Animation updates for the following Pokémon
|
### Animation updates for the following Pokémon
|
||||||
- Flapple, Appletun, Dipplin, Hydrapple (placeholder animations only).
|
- Froakie
|
||||||
|
- Frogadier
|
||||||
|
- Greninja
|
||||||
|
(They can blink now.)
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Reworked spawn presets and added structure tags for spawns
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Fixed a potential world generation stall caused by Type Gem clusters.
|
- Fixed blank Cooking Pot recipe book entries and missing tabs on Fabric.
|
||||||
- Fixed Pokémon on shoulders not animating if they are visibly holding a held item.
|
- Fixed Minior's "Shields Down" ability not working as intended
|
||||||
- Fixed NPCs getting their own TM progress file.
|
- Fixed Dusclops using Squirtle's cry
|
||||||
- Fixed odd NeoForge crash due to a dependency being outdated. It will now correctly flag the dependency for being outdated.
|
- Fixed size error with ceiling attached Orb hitbox
|
||||||
- Fixed the TM Machine refusing move selections that the `unlockAllMoveDexMovesByDefault` config had made visible, leaving the move slot blank and the craft button unresponsive.
|
|
||||||
- Fixed the Beast Ball not applying its 0.1× penalty to Pokémon that are not Ultra Beasts.
|
### Developer
|
||||||
- Fixed the Moon Ball reading the world's total elapsed time instead of the time of day, so its bonus applied during the day instead.
|
|
||||||
- Fixed the Love Ball never awarding its 2.5× opposite gender bonus, and matching species by display name instead of identifier.
|
### Molang & Datapacks
|
||||||
- Fixed the Timer Ball being weaker than a regular Poké Ball on early turns and only reaching 4× on turn 14 instead of turn 10.
|
- Added `q.target_fainted` function to move action effects that checks if any opponents fainted from the move.
|
||||||
- Fixed the Luxury Ball only doubling Friendship gains of 1, leaving level up and berry gains unaffected.
|
|
||||||
- Fixed Rufflet, Braviary, and Hisuian Braviary flooding logs with errors about missing sound events.
|
### Particles
|
||||||
- Fixed Pokémon property typos in Pangoro and Dedenne herd spawn files.
|
- Updated Water shuriken to account for new `q.target_fainted` function
|
||||||
- Fixed unintentional watermelon cosmetic for Hisuian Electrode.
|
|
||||||
- Fixed Blastoise having an unintentional passenger seat.
|
#### New Move Animations
|
||||||
- Fixed form typo in Rockruff-Dusk spawn, preventing it from being able to spawn.
|
|
||||||
- Fixed the `stat_compare` and `stat_equal` evolution requirements crashing the game when given `special_attack` or `special_defence`, and made them treat any non-permanent stat as a failed requirement instead of crashing.
|
|
||||||
- Fixed Rowap and Jacoba berries not correctly altering Pokémon sizes when used as bait.
|
|
||||||
- Fixed Ampharos' eyes not emitting particles.
|
|
||||||
- Fixed Alolan Raticate's cry not playing.
|
|
||||||
- Fixed several incorrect light-based spawning conditions for ghosts and bugs.
|
|
||||||
- Removed unused, placeholder habitat pools.
|
|
||||||
- Fixed Mantyke, Mantine, and Quaxly getting stuck in a recoil 'expression' during battles due to having an expression assigned as a recoil animation.
|
|
||||||
- Fixed Lucario's aura particles not emitting.
|
|
||||||
- Fixed Lycanroc's head movement.
|
|
||||||
- Added head movement to Archaludon.
|
|
||||||
- Fixed Duraludon line not having their sleep animations.
|
|
||||||
- Fixed Diglett line not having their faint animations.
|
|
||||||
- Fixed Kingambit moving its legs while walking.
|
|
||||||
|
|
||||||
### Localization
|
### Localization
|
||||||
- Updated translations for:
|
- Updated translations for:
|
||||||
- Brazilian Portuguese
|
|
||||||
- Simplified Chinese
|
|
||||||
- Japanese
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
- Some kind of particle effect for them? they're meant to have glowing eyes, so maybe some red particles on the eye locator
|
|
||||||
--- global posers? stacked posers?
|
|
||||||
--- red texture seems to be what some people wanted.
|
|
||||||
|
|
||||||
/- shoulder mounts part of it
|
|
||||||
- omni boost
|
|
||||||
- roar when player comes within reach, adjust levels
|
|
||||||
|
|
||||||
- Riding settings to control what the min scale is for a pokemon to be ridable.
|
|
||||||
+5
-2
@@ -1,3 +1,6 @@
|
|||||||
|
import utilities.gitBranch
|
||||||
|
import utilities.gitShortCommit
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("cobblemon.root-conventions")
|
id("cobblemon.root-conventions")
|
||||||
}
|
}
|
||||||
@@ -6,6 +9,6 @@ version = "${project.property("mod_version")}+${project.property("mc_version")}"
|
|||||||
|
|
||||||
val isSnapshot = project.property("snapshot")?.equals("true") == true
|
val isSnapshot = project.property("snapshot")?.equals("true") == true
|
||||||
if (isSnapshot) {
|
if (isSnapshot) {
|
||||||
val fixedBranchName = versioning.info.branch.substringAfter("/")
|
val fixedBranchName = gitBranch().substringAfter("/")
|
||||||
version = "$version-${fixedBranchName}-${versioning.info.build}"
|
version = "$version-${fixedBranchName}-${gitShortCommit()}"
|
||||||
}
|
}
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
- Added `cobblemon:catch_alpha_pokemon` advancement trigger and `totalAlphaCaptureCount` stat for captured Alpha Pokémon.
|
- Added `cobblemon:catch_alpha_pokemon` advancement trigger and `totalAlphaCaptureCount` stat for captured Alpha Pokémon.
|
||||||
|
|
||||||
### New rideable Pokémon
|
### New rideable Pokémon
|
||||||
|
- Pidgeot
|
||||||
- Crobat
|
- Crobat
|
||||||
- Skarmory
|
- Skarmory
|
||||||
- Milotic
|
- Milotic
|
||||||
@@ -106,7 +107,9 @@
|
|||||||
- Avalugg (Hisuian Form)
|
- Avalugg (Hisuian Form)
|
||||||
|
|
||||||
### Model updates for the following Pokémon
|
### Model updates for the following Pokémon
|
||||||
|
- Pidgey
|
||||||
|
- Pidgeotto
|
||||||
|
- Pidgeot
|
||||||
- Sandshrew
|
- Sandshrew
|
||||||
- Sandslash
|
- Sandslash
|
||||||
- Nidoking
|
- Nidoking
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# Changelog
|
||||||
|
## [1.8.1 (September 13th, 2026)](#1-8-1)
|
||||||
|
|
||||||
|
### Animation updates for the following Pokémon
|
||||||
|
- Flapple, Appletun, Dipplin, Hydrapple (placeholder animations only).
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fixed a potential world generation stall caused by Type Gem clusters.
|
||||||
|
- Fixed Pokémon on shoulders not animating if they are visibly holding a held item.
|
||||||
|
- Fixed NPCs getting their own TM progress file.
|
||||||
|
- Fixed odd NeoForge crash due to a dependency being outdated. It will now correctly flag the dependency for being outdated.
|
||||||
|
- Fixed the TM Machine refusing move selections that the `unlockAllMoveDexMovesByDefault` config had made visible, leaving the move slot blank and the craft button unresponsive.
|
||||||
|
- Fixed the Beast Ball not applying its 0.1× penalty to Pokémon that are not Ultra Beasts.
|
||||||
|
- Fixed the Moon Ball reading the world's total elapsed time instead of the time of day, so its bonus applied during the day instead.
|
||||||
|
- Fixed the Love Ball never awarding its 2.5× opposite gender bonus, and matching species by display name instead of identifier.
|
||||||
|
- Fixed the Timer Ball being weaker than a regular Poké Ball on early turns and only reaching 4× on turn 14 instead of turn 10.
|
||||||
|
- Fixed the Luxury Ball only doubling Friendship gains of 1, leaving level up and berry gains unaffected.
|
||||||
|
- Fixed Rufflet, Braviary, and Hisuian Braviary flooding logs with errors about missing sound events.
|
||||||
|
- Fixed Pokémon property typos in Pangoro and Dedenne herd spawn files.
|
||||||
|
- Fixed unintentional watermelon cosmetic for Hisuian Electrode.
|
||||||
|
- Fixed Blastoise having an unintentional passenger seat.
|
||||||
|
- Fixed form typo in Rockruff-Dusk spawn, preventing it from being able to spawn.
|
||||||
|
- Fixed the `stat_compare` and `stat_equal` evolution requirements crashing the game when given `special_attack` or `special_defence`, and made them treat any non-permanent stat as a failed requirement instead of crashing.
|
||||||
|
- Fixed Rowap and Jacoba berries not correctly altering Pokémon sizes when used as bait.
|
||||||
|
- Fixed Ampharos' eyes not emitting particles.
|
||||||
|
- Fixed Alolan Raticate's cry not playing.
|
||||||
|
- Fixed several incorrect light-based spawning conditions for ghosts and bugs.
|
||||||
|
- Removed unused, placeholder habitat pools.
|
||||||
|
- Fixed Mantyke, Mantine, and Quaxly getting stuck in a recoil 'expression' during battles due to having an expression assigned as a recoil animation.
|
||||||
|
- Fixed Lucario's aura particles not emitting.
|
||||||
|
- Fixed Lycanroc's head movement.
|
||||||
|
- Added head movement to Archaludon.
|
||||||
|
- Fixed Duraludon line not having their sleep animations.
|
||||||
|
- Fixed Diglett line not having their faint animations.
|
||||||
|
- Fixed Kingambit moving its legs while walking.
|
||||||
|
|
||||||
|
### Localization
|
||||||
|
- Updated translations for:
|
||||||
|
- Brazilian Portuguese
|
||||||
|
- Simplified Chinese
|
||||||
|
- Japanese
|
||||||
@@ -0,0 +1,211 @@
|
|||||||
|
# Changelog
|
||||||
|
## [1.8.2 (October 11th, 2026)](#1-8-2)
|
||||||
|
|
||||||
|
### Additions
|
||||||
|
- The following items can now be placed on the ground as blocks:
|
||||||
|
- King's Rock, Galarica Cuff, Unremarkable Teacup, Masterpiece Teacup, Chipped Pot, Cracked Pot, Sachet, Metal Powder, Quick Powder, Bright Powder, Soft Sand, Electirizer, Magmarizer, Icy Rock, Heat Rock, Smooth Rock, Damp Rock, Destiny Knot, Luminous Moss, Never-Melt Ice, Wide Lens, Scope Lens, and Zoom Lens.
|
||||||
|
- I wasn't finished. Iron Ball, Metal Coat, Throat Spray, Terrain Extender, Medicinal Brew, Moomoo Milk, HP Up, Protein, Iron, Carbos, Calcium, Zinc, PP Up, PP Max, Upgrade, Dubious Disc, and Loaded Dice.
|
||||||
|
- The following items can now be placed on various surfaces:
|
||||||
|
- Galarica Wreath, Magnet, Flame Orb, Life Orb, Toxic Orb, Light Ball, and Smoke Ball.
|
||||||
|
- The following items can now be placed as blocks and have additional functionality:
|
||||||
|
- Ring Target, Metronome, and Eject Button.
|
||||||
|
- The following items can now be worn by Players and Pokémon:
|
||||||
|
- Galarica Wreath, Cleanse Tag, Spell Tag, Sharp Beak, Covert Cloak, Shell Helmet, and Never-Melt Ice.
|
||||||
|
- Wearable items can now be equipped by a player by holding it and right-clicking (or whatever you've rebound use/interact to).
|
||||||
|
- Wearable items that can be placed down are exempt from this behaviour.
|
||||||
|
- Mint Leaves can now be placed on the ground as Leaf Litter, or in Flower Pots.
|
||||||
|
- The recall animation now renders the ball in hand with the player's arm raised.
|
||||||
|
- Added Oricorio Flowers.
|
||||||
|
- Added Terrain Plants, four plants grown from Electric, Grassy, Misty, and Psychic Seeds, which glow under specific environmental conditions and can be farmed for more of their seeds.
|
||||||
|
- Berries can now be placed in Flower Pots.
|
||||||
|
- The evolution tree for a Pokémon can now be viewed in the Pokédex, showing the Pokémon's full family line and what's needed to evolve into each stage.
|
||||||
|
- Added custom sounds to a bunch of items that can be placed as blocks: liquid bottles, pill bottles, powders, and dice.
|
||||||
|
- Added paper as a new cosmetic item for Pikachu.
|
||||||
|
- Burmy changes its cloak after a battle it took part in, based on the biome.
|
||||||
|
- Trash Cloak in the Deep Dark, Nether and End.
|
||||||
|
- Plant Cloak in lush biomes such as forests, jungles, plains and swamps.
|
||||||
|
- Sandy Cloak in sandy biomes, beaches and caves.
|
||||||
|
|
||||||
|
### Pokémon Added
|
||||||
|
#### Generation 4
|
||||||
|
- Snover
|
||||||
|
- Abomasnow
|
||||||
|
- Burmy
|
||||||
|
- Wormadam
|
||||||
|
- Mothim
|
||||||
|
|
||||||
|
#### Generation 5
|
||||||
|
- Tympole
|
||||||
|
- Palpitoad
|
||||||
|
- Seismitoad
|
||||||
|
|
||||||
|
#### Generation 6
|
||||||
|
- Helioptile
|
||||||
|
- Heliolisk
|
||||||
|
|
||||||
|
#### Generation 7
|
||||||
|
- Grubbin
|
||||||
|
- Charjabug
|
||||||
|
- Vikavolt
|
||||||
|
- Minior
|
||||||
|
|
||||||
|
#### Generation 8
|
||||||
|
- Eternatus
|
||||||
|
|
||||||
|
#### Generation 9
|
||||||
|
- Greavard
|
||||||
|
- Houndstone
|
||||||
|
|
||||||
|
### Model updates for the following Pokémon
|
||||||
|
- Sudowoodo
|
||||||
|
- Spheal
|
||||||
|
- Cacnea
|
||||||
|
- Cacturne
|
||||||
|
- Binacle
|
||||||
|
- Barbaracle
|
||||||
|
- Glimmet
|
||||||
|
- Glimmora
|
||||||
|
- Deerling
|
||||||
|
- Sawsbuck (All forms)
|
||||||
|
- Absol
|
||||||
|
- Poliwag
|
||||||
|
- Politoed
|
||||||
|
- Ekans
|
||||||
|
- Oddish
|
||||||
|
- Gloom
|
||||||
|
- Vileplume
|
||||||
|
- Bellossom
|
||||||
|
- Shroomish
|
||||||
|
- Chespin
|
||||||
|
- Quilladin
|
||||||
|
- Chesnaught
|
||||||
|
- Fennekin
|
||||||
|
- Braixen
|
||||||
|
- Delphox
|
||||||
|
- Froakie
|
||||||
|
- Frogadier
|
||||||
|
- Greninja
|
||||||
|
- Shinx
|
||||||
|
- Luxio
|
||||||
|
- Luxray
|
||||||
|
- Slakoth
|
||||||
|
- Riolu
|
||||||
|
- Lucario
|
||||||
|
- Corsola
|
||||||
|
- Mime Jr.
|
||||||
|
|
||||||
|
### Animation updates for the following Pokémon
|
||||||
|
- Treecko (New Shoulder Mount!)
|
||||||
|
- Bonsly (New Shoulder Mount!)
|
||||||
|
- Sudowoodo
|
||||||
|
- Cacnea
|
||||||
|
- Cacturne
|
||||||
|
- Ekans
|
||||||
|
- Arbok
|
||||||
|
- Oddish
|
||||||
|
- Gloom
|
||||||
|
- Vileplume
|
||||||
|
- Bellossom
|
||||||
|
- Pichu
|
||||||
|
- Pikachu
|
||||||
|
- Raichu (+ Alolan)
|
||||||
|
- Greninja
|
||||||
|
- Slakoth
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Slowed the speed of Type Gem growth, and revamped their generation to grow in a more crystal-like shape.
|
||||||
|
- Terrain Seeds can now be planted.
|
||||||
|
- Terrain Seeds are now consumed during PvP and NPC battles.
|
||||||
|
- Glow Item Frames can be crafted using Bright Powder as an alternative to Glow Ink Sacs.
|
||||||
|
- Bright Powder can be used on Signs and Hanging Signs to make text glow, as an alternative to Glow Ink Sacs.
|
||||||
|
- Updated various recipes to display in Recipe Groups within the Recipe Book.
|
||||||
|
- Updated most recipes to display more logically and consistently within the Recipe Book's categories.
|
||||||
|
- Updated the following recipes
|
||||||
|
- Never-Melt Ice, Focus Sash, Blunder Policy, Weakness Policy, Blank TM.
|
||||||
|
- Made ride rotations less jittery in multiplayer.
|
||||||
|
- Changes Disc Shelf TMs to use textures instead of tinting and overlays to line up with item display.
|
||||||
|
- Blank TM can now be inserted into the Disc Shelf.
|
||||||
|
- Added a TM creative tab.
|
||||||
|
- Made regional and Vivillon split-evo locations mutually exclusive.
|
||||||
|
- Vivillon's patterns are now viewable as forms with form names and unique Pokédex entries displayed.
|
||||||
|
- Item evolutions now unlock **all** locked evolutions whose requirements are met instead of stopping after the first.
|
||||||
|
- Exceptions being "forced" evolutions which stop after the first one.
|
||||||
|
- Removed Mega Drain as a TM.
|
||||||
|
- PokeSnacks (and other area spawns) will now start the vertical offset checking from the center rather than base coordinate
|
||||||
|
- This will help PokeSnacks to work inside caves or tighter spaces better.
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Type Gem blocks now properly generate clusters off of the block.
|
||||||
|
- Correctly grant "They're Minerals!" advancement when planting a Type Gem.
|
||||||
|
- Shoulder mounted Pokémon now follow player body animations, improving their positioning with custom player animations and default actions.
|
||||||
|
- Shoulder mounted Pokémon now sit slightly higher with chest armor equipped for better alignment, with a configurable blacklist.
|
||||||
|
- Type Gem Blocks now have advancements to give you the recipe in the recipe book (the data for the advancements were inside the recipes somehow??).
|
||||||
|
- Some other recipes without advancements have also been corrected.
|
||||||
|
- Corrected the TM Recipes for Charge Beam and Payday.
|
||||||
|
- Starter Screen Categories will no longer stop rendering if they are bigger than the viewport and you are not viewing the top or bottom edges.
|
||||||
|
- The Random Starter option no longer runs off into other categories or becomes unaccessible due to scroll limits if it causes a new row.
|
||||||
|
- Mochi and Feathers no longer drop glass bottles on use.
|
||||||
|
- Fixed a rare set of concurrency bugs related to reloading packs on NeoForge; fixes a ModernFix compatibility issue.
|
||||||
|
- Removed unnecessary conditions for Mimikyu's standing pose. Hopefully fixes the rare instance of it using its shoulder animations during battle in multiplayer scenarios.
|
||||||
|
- Fixed Rockruff line not blinking.
|
||||||
|
- Fixed Flygon sometimes using its running animation instead of walking.
|
||||||
|
- Fixed Bramblin always sleeping outside of battle.
|
||||||
|
- Fixed Dragonair using its battle idle as a normal idle.
|
||||||
|
- Fixed Lycanroc's head movement.
|
||||||
|
- Added head movement to Archaludon.
|
||||||
|
- Fixed Duraludon line not having any sleep animations.
|
||||||
|
- Fixed Diglett line not having their faint animations.
|
||||||
|
- Fixed Kingambit moving its legs while walking.
|
||||||
|
- Fixed Alolan Diglett's cry not playing.
|
||||||
|
- Fixed shiny alpha Snorlax using the non-shiny texture.
|
||||||
|
- Fixed Crabominable's head breaking when looking around.
|
||||||
|
- Fixed Shiny Dipplin and Hydrapple's textures.
|
||||||
|
- Various structure fixes.
|
||||||
|
- Fixed shiny Pokémon under certain circumstances forgetting taught TMs.
|
||||||
|
- Fixed certain Pokémon sounds sometimes being doubled when played at specific times in their animations.
|
||||||
|
- Fixed ball capture beam origin coming from behind the ball.
|
||||||
|
- Fixed Safari Ball catch rate outside of battle.
|
||||||
|
- Fixed alpha eye (and other) particles not respecting the client particle density setting in video options.
|
||||||
|
- Fixed the TM Machine UI not closing when player is moving away from it.
|
||||||
|
- Moved the config category for alpha/shiny chance config fields for fossil machine and honey log slathering to Spawning.
|
||||||
|
- Fixed crashes for addon species with non-Cobblemon namespaces in evolution, fishing bait, and Pokédex lookups.
|
||||||
|
- Bees will now grow Apricorns and the Galarica Nut Bush, which were in the bee growables tag but never handled, and correctly spend their nectar when they do.
|
||||||
|
- Saccharine Leaves can now be bone mealed.
|
||||||
|
- Fixed equipping a stack of wearable items instead of one item of a stack.
|
||||||
|
- Fixed TM stack consumption in TM Machine screen when a player teaches a move to a Pokémon.
|
||||||
|
- Fixed every Miltank giving mushroom stew, not only mushroom variants.
|
||||||
|
- Medicinal Leeks can now be eaten when they aren't being planted, matching their food properties.
|
||||||
|
- Sweeping attacks no longer set owned Pokémon on fire (e.g. with Fire Aspect) or knock them back. Friendly Fire is now off.
|
||||||
|
- Fixed Pokémon not losing their previous form's signature moves when changing forms (e.g. Rotom keeping Overheat after leaving its Heat form).
|
||||||
|
- Form-specific moves gained from a form change are now only granted if the Pokémon is high enough level to learn them, and no longer create duplicates in benched moves.
|
||||||
|
- Spinda now learns Teeter Dance at level 32 instead of via TM.
|
||||||
|
- Fixed Oricorio Pa'u form description in the Pokédex.
|
||||||
|
- Fixed PC playing sound on close when opened via command.
|
||||||
|
|
||||||
|
### Developer
|
||||||
|
- Evolution requirements can now set `pokedexIcon` and `pokedexTooltip` directly in their JSON to control how they're shown on the Pokédex's evolution tree, for example:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"variant": "attack_defence_ratio",
|
||||||
|
"pokedexIcon": "minecraft:diamond_sword",
|
||||||
|
"pokedexTooltip": "cobblemon.ui.pokedex.requirement.attack_defence_ratio.tooltip"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- Fixed the wrong order of operations in the code flow prior to the `FOSSIL_REVIVED` event causing Pokémon to appear without the entity link.
|
||||||
|
- Fixed TestPartySlot command not correctly comparing the provided spec with the target Pokémon.
|
||||||
|
|
||||||
|
### Molang & Datapacks
|
||||||
|
- A new `negate` variant for evolution requirements has been added, which will negate (invert) the provided inner condition.
|
||||||
|
- Added Molang functions for individual Pokédex ids, wherein a subdex is passed in as a string to `dex_caught_count` etc.
|
||||||
|
- Added a `battle_ended` callback, backed by the new `BATTLE_ENDED` event, which fires whenever a battle ends for any reason, alongside a multitude of flags not previously covered by `BATTLE_VICTORY`.
|
||||||
|
- Added `battle_pokemon` to battle actor structs and `has_faced_opponents` to battle Pokémon structs.
|
||||||
|
- Added the `cobblemon:form_change/bagworm_cloak/plant_cloak`, `sandy_cloak` and `trash_cloak` biome tags, which control Burmy's cloak after battle.
|
||||||
|
|
||||||
|
### Localization
|
||||||
|
- Updated translations for:
|
||||||
|
- Brazilian Portuguese
|
||||||
|
- Canadian French
|
||||||
|
- Japanese
|
||||||
|
- Korean
|
||||||
|
- Russian
|
||||||
|
- Ukrainian
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
# Changelog
|
||||||
|
## [1.8.3 (October 25th, 2026)](#1-8-3)
|
||||||
|
|
||||||
|
### Additions
|
||||||
|
- Added compatability with AppleSkin.
|
||||||
|
|
||||||
|
### New Rideable Pokémon
|
||||||
|
- Vikavolt
|
||||||
|
- Fearow
|
||||||
|
|
||||||
|
### Particles
|
||||||
|
## New Move Animations
|
||||||
|
- Water Shuriken
|
||||||
|
|
||||||
|
### Cries added/updated for the following Pokémon
|
||||||
|
- Hoppip
|
||||||
|
- Skiploom
|
||||||
|
- Jumpluff
|
||||||
|
- Houndour
|
||||||
|
- Houndoom
|
||||||
|
- Wurmple
|
||||||
|
- Silcoon
|
||||||
|
- Beautifly
|
||||||
|
- Cascoon
|
||||||
|
- Dustox
|
||||||
|
- Surskit
|
||||||
|
- Masquerain
|
||||||
|
- Torkoal
|
||||||
|
- Starly
|
||||||
|
- Staravia
|
||||||
|
- Staraptor
|
||||||
|
- Combee
|
||||||
|
- Vespiquen
|
||||||
|
- Dusknoir
|
||||||
|
- Helioptile
|
||||||
|
- Heliolisk
|
||||||
|
- Grubbin
|
||||||
|
- Charjabug
|
||||||
|
- Vikavolt
|
||||||
|
- Applin (updated)
|
||||||
|
- Flapple (updated)
|
||||||
|
- Appletun
|
||||||
|
- Runerigus
|
||||||
|
- Dipplin
|
||||||
|
|
||||||
|
### Animation updates for the following Pokémon
|
||||||
|
- Vikavolt
|
||||||
|
- Magby
|
||||||
|
- Magmar
|
||||||
|
- Ninetales (+ Alolan)
|
||||||
|
- Spearow
|
||||||
|
- Fearow
|
||||||
|
- Squawkabilly
|
||||||
|
- Mudkip
|
||||||
|
- Marshtomp
|
||||||
|
- Swampert
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Changed the Misc icon in the Campfire Pot Recipe Book to Health Candy.
|
||||||
|
- Moved EXP Candies from the Medicine recipe book category to the Misc category.
|
||||||
|
- Removed Dynamic Lights data from the Magmarizer item for consistency with the block.
|
||||||
|
- Added `doPokemonPredation` game rule, which controls aggressiveness of Pokémon with the `hate_entity` brain task defined.
|
||||||
|
- Added `predation_chance` server config value, which controls the possibility of attacking the hated entity found in `hate_entity` brain tasks.
|
||||||
|
- Prehistoric Eroded Pillar generates slightly more frequently.
|
||||||
|
- Togekiss was changed from a jet-style mount to bird-style.
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fixed datapacks with item interaction evolutions that don't specify an item crashing the world on load.
|
||||||
|
- Fixed the Pokédex evolution tree crashing when a datapack's dex entry is missing an evolution's form.
|
||||||
|
- Fixed the Pokédex evolution tree crashing with a stack overflow on evolutions that loop back on themselves.
|
||||||
|
- Fixed the Pokédex evolution tree crashing when looking at a dex that is not part of the "National Dex" aggregate.
|
||||||
|
- Fixed some display names in the Pokédex evolution tree having unintended font colours.
|
||||||
|
- Fixed evolution trees not building properly when a Pokémon has several Pokédex entries for different regions.
|
||||||
|
- Fixed form-changing evolutions sometimes resolving to the source form in the Pokédex evolution tree.
|
||||||
|
- Broken datapack evolutions are now logged and skipped in the Pokédex evolution tree instead of crashing.
|
||||||
|
- Fixed the `alpha` property having no tab completion in commands such as `/pokespawn`, `/pokegive` and `/pokeedit`, and added the missing `dmax_level`, `gmax_factor` and `tradable` aliases to tab completion.
|
||||||
|
- Fixed friendship booster items not being recognised as such.
|
||||||
|
- Fixed conflicts with other mods that would make use of recipe books in certain ways (Farmer's Delight Cooking Pot).
|
||||||
|
- Fixed Pokémon battles stalling when a sidemod cancels the `THROWN_POKEBALL_HIT` hit event.
|
||||||
|
- Fixed choice feature tab completion in `spawnpokemon/pokegive/pokeedit` commands.
|
||||||
|
- Fixed MoLang that's targeting players intermittedly failing when they have died, requiring them to relog.
|
||||||
|
- Fixed a NeoForge bug where none of the Cobblemon plants/berries could be placed into pots.
|
||||||
|
- Fixed party overlay not hiding when the player opens the Pokédex scanner.
|
||||||
|
- Fixed `hate_entity` task focusing on its own entity, therefore enabling deadly warfare between Zangoose and Seviper.
|
||||||
|
- Prehistoric Frozen Pond, Prehistoric Frozen Spike, and Prehistoric Lush Den now actually generate (oops).
|
||||||
|
- Fixed Frogadier floating in its `battle_idle` animation.
|
||||||
|
- Fixed absence or incorrect mergers in spawning conditions, causing the max height/depth of conditions to use the min value instead.
|
||||||
|
- Added stricter riding checks on server side to prevent possible packet forgery when a player tries to ride Pokémon.
|
||||||
|
- Fixed Pokémon cries and animation sounds played from GUIs, such as the starter selection screen and the Pokédex, being tied to the Master volume slider instead of Friendly Creatures.
|
||||||
|
- Fixed Archeops T-posing during its `air_cry` animation.
|
||||||
|
|
||||||
|
### Developer
|
||||||
|
- Bumped NeoForge to `21.1.195` to get access to MixinExtras `0.5` and the expressions annotation.
|
||||||
|
- New Platform Event `PLAYER_RESPAWN` which is fired when a player respawns (either through death or returning from the end).
|
||||||
|
- Platform Events `SERVER_PLAYER_TICK_PRE` and `SERVER_PLAYER_TICK_POST` no longer fire when the player is dead.
|
||||||
|
- It is now tied much closer to the actual entity rather than the player or their connection.
|
||||||
|
|
||||||
|
### Molang & Datapacks
|
||||||
|
- Fixed `q.pokemon.nature` returning class instance instead of proper string value (`cobblemon:adamant`).
|
||||||
|
- Fixed `q.entity.is_looking_at` result being always `1` for whatever entity passed as the target parameter.
|
||||||
|
- Added hate chance optional parameter to `hate_entity` task. `1.0` will make an entity always attack the target.
|
||||||
|
|
||||||
|
### Localization
|
||||||
|
- Updated translations for:
|
||||||
|
- Russian
|
||||||
|
- Japanese
|
||||||
|
- Brazilian Portuguese
|
||||||
+15
-6
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
import java.time.OffsetDateTime
|
|
||||||
import java.time.ZoneOffset
|
|
||||||
import java.time.format.DateTimeFormatter
|
|
||||||
import utilities.isSnapshot
|
import utilities.isSnapshot
|
||||||
import utilities.version
|
import utilities.version
|
||||||
|
import utilities.gitBranch
|
||||||
|
import utilities.gitCommit
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
@@ -72,6 +71,14 @@ tasks.withType<Test> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Git info lives in its own output dir (not processResources) so a new commit only rewrites this one file.
|
||||||
|
val writeGitInfo by tasks.registering(WriteProperties::class) {
|
||||||
|
destinationFile = layout.buildDirectory.file("generated/gitInfo/cobblemon-git.properties")
|
||||||
|
property("commit", gitCommit())
|
||||||
|
property("branch", gitBranch())
|
||||||
|
}
|
||||||
|
sourceSets.main { output.dir(mapOf("builtBy" to writeGitInfo), layout.buildDirectory.dir("generated/gitInfo")) }
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
exclude("data/**/README.md")
|
exclude("data/**/README.md")
|
||||||
}
|
}
|
||||||
@@ -98,11 +105,13 @@ sourceSets {
|
|||||||
property("modid", "cobblemon")
|
property("modid", "cobblemon")
|
||||||
property("version", project.version())
|
property("version", project.version())
|
||||||
property("isSnapshot", if(rootProject.isSnapshot()) "true" else "false")
|
property("isSnapshot", if(rootProject.isSnapshot()) "true" else "false")
|
||||||
property("gitCommit", versioning.info.commit)
|
|
||||||
property("branch", versioning.info.branch)
|
|
||||||
System.getProperty("buildNumber")?.let { property("buildNumber", it) }
|
System.getProperty("buildNumber")?.let { property("buildNumber", it) }
|
||||||
property("timestamp", OffsetDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ofPattern("MM/dd/yyyy hh:mm:ss")) + " UTC")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The platform jars are built from :common:jar, so the remapped common jars are only needed by `publish`
|
||||||
|
tasks.assemble {
|
||||||
|
setDependsOn(dependsOn.filterNot { (it as? TaskProvider<*>)?.name in setOf("remapJar", "remapSourcesJar") })
|
||||||
|
}
|
||||||
@@ -8,54 +8,42 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.mixin;
|
package com.cobblemon.mod.common.mixin;
|
||||||
|
|
||||||
import com.cobblemon.mod.common.block.SaccharineLeafBlock;
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.world.entity.animal.Bee;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.BonemealableBlock;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
|
||||||
|
|
||||||
|
|
||||||
@Mixin(targets = "net.minecraft.world.entity.animal.Bee$BeeGrowCropGoal")
|
@Mixin(targets = "net.minecraft.world.entity.animal.Bee$BeeGrowCropGoal")
|
||||||
public abstract class BeeEntityMixin {
|
public abstract class BeeEntityMixin {
|
||||||
|
|
||||||
@Unique
|
@Shadow(aliases = {"this$0", "field_20373"}) @Final private Bee bee;
|
||||||
private BlockState cobblemon$result = null;
|
|
||||||
|
|
||||||
@Inject(method = "tick()V", at = @At(
|
|
||||||
value = "INVOKE",
|
|
||||||
target = "Lnet/minecraft/world/level/block/BonemealableBlock;performBonemeal(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/util/RandomSource;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)V",
|
|
||||||
shift = At.Shift.BY,
|
|
||||||
by = 2
|
|
||||||
),
|
|
||||||
locals = LocalCapture.CAPTURE_FAILHARD
|
|
||||||
)
|
|
||||||
private void injectCustomGrowth(CallbackInfo ci, int i, BlockPos blockPos, BlockState blockState, Block block) {
|
|
||||||
if (block instanceof SaccharineLeafBlock) {
|
|
||||||
|
|
||||||
int age = blockState.getValue(SaccharineLeafBlock.Companion.getAGE());
|
|
||||||
boolean waterlogged = blockState.getValue(BlockStateProperties.WATERLOGGED);
|
|
||||||
|
|
||||||
if (age < 2 && !waterlogged) {
|
|
||||||
this.cobblemon$result = blockState.setValue(SaccharineLeafBlock.Companion.getAGE(), age + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Grows bonemealable blocks vanilla's hardcoded checks miss, returning the state so it handles the rest.
|
||||||
@ModifyVariable(method = "tick", at = @At(value = "LOAD", ordinal = 0), index = 5)
|
@ModifyVariable(method = "tick", at = @At(value = "LOAD", ordinal = 0), index = 5)
|
||||||
private BlockState applyCustomBlockState(BlockState before) {
|
private BlockState cobblemon$growBonemealableBlocks(BlockState grownState, @Local(ordinal = 0) BlockState blockState, @Local BlockPos pos) {
|
||||||
if(this.cobblemon$result != null && before == null) {
|
if (grownState != null || blockState.is(Blocks.CAVE_VINES) || blockState.is(Blocks.CAVE_VINES_PLANT)) {
|
||||||
BlockState result = this.cobblemon$result;
|
return grownState;
|
||||||
this.cobblemon$result = null;
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return before;
|
if (!(blockState.getBlock() instanceof BonemealableBlock bonemealable)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
ServerLevel level = (ServerLevel) this.bee.level();
|
||||||
|
if (!bonemealable.isValidBonemealTarget(level, pos, blockState)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
bonemealable.performBonemeal(level, this.bee.getRandom(), pos, blockState);
|
||||||
|
return level.getBlockState(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
|||||||
import com.mojang.serialization.MapCodec;
|
import com.mojang.serialization.MapCodec;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
import net.minecraft.SharedConstants;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.IntTag;
|
import net.minecraft.nbt.IntTag;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
@@ -45,4 +46,24 @@ public class ChunkStorageMixin {
|
|||||||
int curVersion = vanillaFixed.contains(VERSION_KEY) ? vanillaFixed.getInt(VERSION_KEY) : 0;
|
int curVersion = vanillaFixed.contains(VERSION_KEY) ? vanillaFixed.getInt(VERSION_KEY) : 0;
|
||||||
return DataFixTypes.CHUNK.update(CobblemonSchemas.getDATA_FIXER(), vanillaFixed, curVersion, CobblemonSchemas.DATA_VERSION);
|
return DataFixTypes.CHUNK.update(CobblemonSchemas.getDATA_FIXER(), vanillaFixed, curVersion, CobblemonSchemas.DATA_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Our update on the same MC version still needs its own fixes so run them here in that case.
|
||||||
|
@Inject(
|
||||||
|
method = "upgradeChunkTag(Lnet/minecraft/resources/ResourceKey;Ljava/util/function/Supplier;Lnet/minecraft/nbt/CompoundTag;Ljava/util/Optional;)Lnet/minecraft/nbt/CompoundTag;",
|
||||||
|
at = @At("HEAD"),
|
||||||
|
cancellable = true
|
||||||
|
)
|
||||||
|
private void cobblemon$doChunkFixOnCurrentVersion(
|
||||||
|
ResourceKey<Level> levelKey,
|
||||||
|
Supplier<DimensionDataStorage> storage,
|
||||||
|
CompoundTag chunkData,
|
||||||
|
Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> chunkGeneratorKey,
|
||||||
|
CallbackInfoReturnable<CompoundTag> cir
|
||||||
|
) {
|
||||||
|
if (ChunkStorage.getVersion(chunkData) != SharedConstants.getCurrentVersion().getDataVersion().getVersion()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int curVersion = chunkData.contains(VERSION_KEY) ? chunkData.getInt(VERSION_KEY) : 0;
|
||||||
|
cir.setReturnValue(DataFixTypes.CHUNK.update(CobblemonSchemas.getDATA_FIXER(), chunkData, curVersion, CobblemonSchemas.DATA_VERSION));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Whitespace-only changes.
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.mixin;
|
package com.cobblemon.mod.common.mixin;
|
||||||
|
|
||||||
|
import com.cobblemon.mod.common.CobblemonNetwork;
|
||||||
import com.cobblemon.mod.common.OrientationControllable;
|
import com.cobblemon.mod.common.OrientationControllable;
|
||||||
import com.cobblemon.mod.common.api.orientation.OrientationController;
|
import com.cobblemon.mod.common.api.orientation.OrientationController;
|
||||||
import com.cobblemon.mod.common.api.pokemon.effect.ShoulderEffectRegistry;
|
import com.cobblemon.mod.common.api.pokemon.effect.ShoulderEffectRegistry;
|
||||||
@@ -17,6 +18,7 @@ import com.cobblemon.mod.common.api.riding.behaviour.types.liquid.SubmarineBehav
|
|||||||
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate;
|
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate;
|
||||||
import com.cobblemon.mod.common.client.render.MatrixWrapper;
|
import com.cobblemon.mod.common.client.render.MatrixWrapper;
|
||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
|
||||||
|
import com.cobblemon.mod.common.net.messages.server.orientation.ServerboundUpdateOrientationPacket;
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
|||||||
@@ -35,13 +35,16 @@ import com.cobblemon.mod.common.util.DataKeys;
|
|||||||
import com.cobblemon.mod.common.world.gamerules.CobblemonGameRules;
|
import com.cobblemon.mod.common.world.gamerules.CobblemonGameRules;
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||||
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.Tag;
|
import net.minecraft.nbt.Tag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EntityDimensions;
|
import net.minecraft.world.entity.EntityDimensions;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
@@ -50,6 +53,7 @@ import net.minecraft.world.entity.item.ItemEntity;
|
|||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.food.FoodProperties;
|
import net.minecraft.world.food.FoodProperties;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@@ -371,4 +375,33 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
|
|||||||
this.cobblemon$rideEyePos = rideEyePos;
|
this.cobblemon$rideEyePos = rideEyePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sweeping attacks apply post-attack enchantment effects (e.g. Fire Aspect) to every entity caught
|
||||||
|
* in the sweep, even if the damage itself was blocked. Skip them for Pokémon immune to the attack.
|
||||||
|
*/
|
||||||
|
@WrapOperation(
|
||||||
|
method = "attack",
|
||||||
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/enchantment/EnchantmentHelper;doPostAttackEffects(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/damagesource/DamageSource;)V")
|
||||||
|
)
|
||||||
|
private void cobblemon$skipPostAttackEffectsOnImmunePokemon(ServerLevel level, Entity target, DamageSource source, Operation<Void> original) {
|
||||||
|
if (target instanceof PokemonEntity pokemonEntity && pokemonEntity.isInvulnerableTo(source)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
original.call(level, target, source);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sweeping attacks also knock back every entity caught in the sweep regardless of whether it took damage.
|
||||||
|
*/
|
||||||
|
@WrapOperation(
|
||||||
|
method = "attack",
|
||||||
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;knockback(DDD)V")
|
||||||
|
)
|
||||||
|
private void cobblemon$skipKnockbackOnImmunePokemon(LivingEntity target, double strength, double x, double z, Operation<Void> original, @Local DamageSource source) {
|
||||||
|
if (target instanceof PokemonEntity pokemonEntity && pokemonEntity.isInvulnerableTo(source)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
original.call(target, strength, x, z);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
@@ -10,7 +10,9 @@ package com.cobblemon.mod.common.mixin.accessor;
|
|||||||
|
|
||||||
import net.minecraft.client.gui.components.StateSwitchingButton;
|
import net.minecraft.client.gui.components.StateSwitchingButton;
|
||||||
import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent;
|
import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Mutable;
|
||||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
||||||
@Mixin(RecipeBookComponent.class)
|
@Mixin(RecipeBookComponent.class)
|
||||||
|
|||||||
+2
-1
@@ -15,9 +15,11 @@ import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
|||||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||||
import com.llamalad7.mixinextras.sugar.Local;
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.NonNullList;
|
import net.minecraft.core.NonNullList;
|
||||||
import net.minecraft.world.Containers;
|
import net.minecraft.world.Containers;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
import net.minecraft.world.item.alchemy.PotionBrewing;
|
import net.minecraft.world.item.alchemy.PotionBrewing;
|
||||||
import net.minecraft.world.item.crafting.RecipeHolder;
|
import net.minecraft.world.item.crafting.RecipeHolder;
|
||||||
import net.minecraft.world.item.crafting.RecipeManager;
|
import net.minecraft.world.item.crafting.RecipeManager;
|
||||||
@@ -32,7 +34,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@Mixin(BrewingStandBlockEntity.class)
|
@Mixin(BrewingStandBlockEntity.class)
|
||||||
public class BrewingStandBlockEntityMixin {
|
public class BrewingStandBlockEntityMixin {
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,17 @@
|
|||||||
package com.cobblemon.mod.common.mixin.brewing;
|
package com.cobblemon.mod.common.mixin.brewing;
|
||||||
|
|
||||||
import com.cobblemon.mod.common.duck.RecipeAwareSlot;
|
import com.cobblemon.mod.common.duck.RecipeAwareSlot;
|
||||||
|
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe;
|
||||||
|
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||||
|
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||||
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import net.minecraft.world.Container;
|
import net.minecraft.world.Container;
|
||||||
import net.minecraft.world.entity.player.Inventory;
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.inventory.BrewingStandMenu;
|
import net.minecraft.world.inventory.BrewingStandMenu;
|
||||||
import net.minecraft.world.inventory.ContainerData;
|
import net.minecraft.world.inventory.ContainerData;
|
||||||
import net.minecraft.world.inventory.Slot;
|
import net.minecraft.world.inventory.Slot;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe;
|
|||||||
import net.minecraft.world.inventory.BrewingStandMenu;
|
import net.minecraft.world.inventory.BrewingStandMenu;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.crafting.RecipeManager;
|
import net.minecraft.world.item.crafting.RecipeManager;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import net.minecraft.client.Camera;
|
|||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import org.joml.Quaternionf;
|
||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|||||||
+9
-17
@@ -10,10 +10,13 @@ package com.cobblemon.mod.common.mixin.client;
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.CobblemonRecipeCategories;
|
import com.cobblemon.mod.common.CobblemonRecipeCategories;
|
||||||
import com.cobblemon.mod.common.item.crafting.CookingPotBookCategory;
|
import com.cobblemon.mod.common.item.crafting.CookingPotBookCategory;
|
||||||
|
import com.cobblemon.mod.common.item.crafting.CookingPotRecipe;
|
||||||
import com.cobblemon.mod.common.item.crafting.CookingPotRecipeBase;
|
import com.cobblemon.mod.common.item.crafting.CookingPotRecipeBase;
|
||||||
|
import com.cobblemon.mod.common.item.crafting.CookingPotShapelessRecipe;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import net.minecraft.client.ClientRecipeBook;
|
import net.minecraft.client.ClientRecipeBook;
|
||||||
import net.minecraft.client.RecipeBookCategories;
|
import net.minecraft.client.RecipeBookCategories;
|
||||||
import net.minecraft.client.gui.screens.recipebook.RecipeCollection;
|
import net.minecraft.client.gui.screens.recipebook.RecipeCollection;
|
||||||
@@ -61,23 +64,12 @@ public abstract class ClientRecipeBookMixin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "setupCollections", at = @At("RETURN"))
|
@Inject(method = "setupCollections",
|
||||||
private void addCustomAggregateCategories(Iterable<RecipeHolder<?>> recipes, RegistryAccess registryAccess, CallbackInfo ci) {
|
at = @At(
|
||||||
Map<RecipeBookCategories, List<List<RecipeHolder<?>>>> map = categorizeAndGroupRecipes(recipes);
|
value = "INVOKE",
|
||||||
Map<RecipeBookCategories, List<RecipeCollection>> map2 = Maps.newHashMap();
|
target = "Lcom/google/common/collect/ImmutableMap;copyOf(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap;"
|
||||||
ImmutableList.Builder<RecipeCollection> builder = ImmutableList.builder();
|
))
|
||||||
|
private void addCustomAggregateCategories(Iterable<RecipeHolder<?>> recipes, RegistryAccess registryAccess, CallbackInfo ci, @Local(ordinal = 1) Map<RecipeBookCategories, List<RecipeCollection>> map2) {
|
||||||
map.forEach((recipeBookCategories, list) -> {
|
|
||||||
List<RecipeCollection> collections = list.stream()
|
|
||||||
.map(listx -> new RecipeCollection(registryAccess, listx))
|
|
||||||
.peek(builder::add)
|
|
||||||
.collect(ImmutableList.toImmutableList());
|
|
||||||
map2.put(recipeBookCategories, collections);
|
|
||||||
});
|
|
||||||
RecipeBookCategories.AGGREGATE_CATEGORIES.forEach((recipeBookCategories, list) -> map2.put(recipeBookCategories, (List) list.stream().flatMap((recipeBookCategoriesx) -> ((List) map2.getOrDefault(recipeBookCategoriesx, ImmutableList.of())).stream()).collect(ImmutableList.toImmutableList())));
|
|
||||||
CobblemonRecipeCategories.Companion.getCustomAggregateCategories().forEach((recipeBookCategories, list) -> map2.put(recipeBookCategories, (List) list.stream().flatMap((recipeBookCategoriesx) -> ((List) map2.getOrDefault(recipeBookCategoriesx, ImmutableList.of())).stream()).collect(ImmutableList.toImmutableList())));
|
CobblemonRecipeCategories.Companion.getCustomAggregateCategories().forEach((recipeBookCategories, list) -> map2.put(recipeBookCategories, (List) list.stream().flatMap((recipeBookCategoriesx) -> ((List) map2.getOrDefault(recipeBookCategoriesx, ImmutableList.of())).stream()).collect(ImmutableList.toImmutableList())));
|
||||||
|
|
||||||
this.collectionsByTab = ImmutableMap.copyOf(map2);
|
|
||||||
this.allCollections = builder.build();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,11 +10,13 @@ package com.cobblemon.mod.common.mixin.client;
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.OrientationControllable;
|
import com.cobblemon.mod.common.OrientationControllable;
|
||||||
import com.cobblemon.mod.common.client.render.player.MountedPlayerRenderer;
|
import com.cobblemon.mod.common.client.render.player.MountedPlayerRenderer;
|
||||||
|
import com.cobblemon.mod.common.client.render.player.RecallArmAnimationTracker;
|
||||||
import com.cobblemon.mod.common.duck.RidePassenger;
|
import com.cobblemon.mod.common.duck.RidePassenger;
|
||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.model.geom.ModelPart;
|
import net.minecraft.client.model.geom.ModelPart;
|
||||||
import net.minecraft.client.player.AbstractClientPlayer;
|
import net.minecraft.client.player.AbstractClientPlayer;
|
||||||
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
@@ -96,4 +98,14 @@ public class HumanoidModelMixin {
|
|||||||
MountedPlayerRenderer.INSTANCE.animate((HumanoidModel<AbstractClientPlayer>)(Object)this, pokemonEntity, player, netHeadYaw, headPitch, ageInTicks, limbSwing, limbSwingAmount);
|
MountedPlayerRenderer.INSTANCE.animate((HumanoidModel<AbstractClientPlayer>)(Object)this, pokemonEntity, player, netHeadYaw, headPitch, ageInTicks, limbSwing, limbSwingAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject(method = "setupAnim*", at = @At("TAIL"))
|
||||||
|
public void cobblemon$poseRecallArm(LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, CallbackInfo ci) {
|
||||||
|
if (!(entity instanceof AbstractClientPlayer) || entity.getVehicle() instanceof PokemonEntity) return;
|
||||||
|
float raise = RecallArmAnimationTracker.INSTANCE.raiseFactor(entity.getUUID());
|
||||||
|
if (raise <= 0f) return;
|
||||||
|
this.rightArm.xRot = Mth.lerp(raise, this.rightArm.xRot, (float) (-Math.PI / 2.0));
|
||||||
|
this.rightArm.yRot = Mth.lerp(raise, this.rightArm.yRot, 0f);
|
||||||
|
this.rightArm.zRot = Mth.lerp(raise, this.rightArm.zRot, 0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Cobblemon Contributors
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cobblemon.mod.common.mixin.client;
|
||||||
|
|
||||||
|
import com.cobblemon.mod.common.client.render.player.RecallArmAnimationTracker;
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
|
import net.minecraft.client.renderer.entity.layers.ItemInHandLayer;
|
||||||
|
import net.minecraft.world.entity.HumanoidArm;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(ItemInHandLayer.class)
|
||||||
|
public class ItemInHandLayerMixin {
|
||||||
|
@Inject(method = "renderArmWithItem", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void cobblemon$hideRecallHandItem(LivingEntity entity, ItemStack itemStack, ItemDisplayContext itemDisplayContext, HumanoidArm humanoidArm, PoseStack poseStack, MultiBufferSource multiBufferSource, int light, CallbackInfo ci) {
|
||||||
|
if (humanoidArm == HumanoidArm.RIGHT && RecallArmAnimationTracker.INSTANCE.isRecalling(entity.getUUID())) {
|
||||||
|
ci.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
@@ -9,6 +9,7 @@
|
|||||||
package com.cobblemon.mod.common.mixin.client;
|
package com.cobblemon.mod.common.mixin.client;
|
||||||
|
|
||||||
import com.cobblemon.mod.common.OrientationControllable;
|
import com.cobblemon.mod.common.OrientationControllable;
|
||||||
|
import com.cobblemon.mod.common.client.render.player.FirstPersonRecallBallRenderer;
|
||||||
import com.cobblemon.mod.common.item.PokedexItem;
|
import com.cobblemon.mod.common.item.PokedexItem;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -31,6 +32,9 @@ public class ItemInHandRendererMixin {
|
|||||||
if (abstractClientPlayer.isUsingItem() && abstractClientPlayer.getUseItem().getItem() instanceof PokedexItem) {
|
if (abstractClientPlayer.isUsingItem() && abstractClientPlayer.getUseItem().getItem() instanceof PokedexItem) {
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
}
|
}
|
||||||
|
else if (interactionHand == InteractionHand.MAIN_HAND && FirstPersonRecallBallRenderer.INSTANCE.render(poseStack, multiBufferSource, j, f)) {
|
||||||
|
ci.cancel();
|
||||||
|
}
|
||||||
else if (abstractClientPlayer instanceof OrientationControllable controllable && controllable.getOrientationController().isActive()) {
|
else if (abstractClientPlayer instanceof OrientationControllable controllable && controllable.getOrientationController().isActive()) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-43
@@ -9,55 +9,25 @@
|
|||||||
package com.cobblemon.mod.common.mixin.client;
|
package com.cobblemon.mod.common.mixin.client;
|
||||||
|
|
||||||
import com.cobblemon.mod.common.CobblemonRecipeCategories;
|
import com.cobblemon.mod.common.CobblemonRecipeCategories;
|
||||||
import net.minecraft.client.ClientRecipeBook;
|
import com.llamalad7.mixinextras.expression.Definition;
|
||||||
import net.minecraft.client.Minecraft;
|
import com.llamalad7.mixinextras.expression.Expression;
|
||||||
|
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||||
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import net.minecraft.client.RecipeBookCategories;
|
import net.minecraft.client.RecipeBookCategories;
|
||||||
import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent;
|
import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent;
|
||||||
import net.minecraft.client.gui.screens.recipebook.RecipeBookPage;
|
|
||||||
import net.minecraft.client.gui.screens.recipebook.RecipeBookTabButton;
|
|
||||||
import org.spongepowered.asm.mixin.Final;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
@Mixin(RecipeBookComponent.class)
|
@Mixin(RecipeBookComponent.class)
|
||||||
public class RecipeBookComponentMixin {
|
public class RecipeBookComponentMixin {
|
||||||
|
@Definition(id = "recipeBookCategories", local = @Local(type = RecipeBookCategories.class))
|
||||||
@Shadow private ClientRecipeBook book;
|
@Definition(id = "FURNACE_SEARCH", field = "Lnet/minecraft/client/RecipeBookCategories;FURNACE_SEARCH:Lnet/minecraft/client/RecipeBookCategories;")
|
||||||
|
@Expression("recipeBookCategories != FURNACE_SEARCH")
|
||||||
@Shadow protected Minecraft minecraft;
|
@ModifyExpressionValue(
|
||||||
|
method = "updateTabs",
|
||||||
@Shadow private int width;
|
at = @At(value = "MIXINEXTRAS:EXPRESSION")
|
||||||
|
)
|
||||||
@Shadow private int xOffset;
|
private boolean notCookingPotSearch(boolean original, @Local RecipeBookCategories recipeBookCategories) {
|
||||||
|
return original && recipeBookCategories != CobblemonRecipeCategories.COOKING_POT_SEARCH.toVanillaCategory();
|
||||||
@Shadow private int height;
|
|
||||||
|
|
||||||
@Shadow @Final private RecipeBookPage recipeBookPage;
|
|
||||||
|
|
||||||
@Inject(method = "updateTabs", at = @At("HEAD"), cancellable = true)
|
|
||||||
private void customUpdateTabs(CallbackInfo ci) {
|
|
||||||
RecipeBookComponent instance = (RecipeBookComponent) (Object) this;
|
|
||||||
int i = (width - 147) / 2 - xOffset - 30;
|
|
||||||
int j = (height - 166) / 2 + 3;
|
|
||||||
int k = 27;
|
|
||||||
int l = 0;
|
|
||||||
|
|
||||||
for (RecipeBookTabButton recipeBookTabButton : instance.tabButtons) {
|
|
||||||
RecipeBookCategories recipeBookCategories = recipeBookTabButton.getCategory();
|
|
||||||
if (recipeBookCategories != RecipeBookCategories.CRAFTING_SEARCH && recipeBookCategories != RecipeBookCategories.FURNACE_SEARCH && recipeBookCategories != CobblemonRecipeCategories.COOKING_POT_SEARCH.toVanillaCategory()) {
|
|
||||||
if (recipeBookTabButton.updateVisibility(book)) {
|
|
||||||
recipeBookTabButton.setPosition(i, j + 27 * l++);
|
|
||||||
recipeBookTabButton.startAnimation(minecraft);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
recipeBookTabButton.visible = true;
|
|
||||||
recipeBookTabButton.setPosition(i, j + k * l++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ci.cancel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,8 +8,12 @@ object CobblemonBuildDetails {
|
|||||||
const val VERSION = "{{ version }}"
|
const val VERSION = "{{ version }}"
|
||||||
const val SNAPSHOT = {{ isSnapshot }}
|
const val SNAPSHOT = {{ isSnapshot }}
|
||||||
|
|
||||||
const val GIT_COMMIT = "{{ gitCommit | default("Not Specified") }}"
|
// Read at runtime rather than templated in, so a new commit doesn't invalidate compiled code.
|
||||||
const val BRANCH = "{{ branch | default("Not Specified") }}"
|
private val git = java.util.Properties().apply {
|
||||||
|
CobblemonBuildDetails::class.java.getResourceAsStream("/cobblemon-git.properties")?.use(::load)
|
||||||
|
}
|
||||||
|
@JvmField val GIT_COMMIT: String = git.getProperty("commit", "Not Specified")
|
||||||
|
@JvmField val BRANCH: String = git.getProperty("branch", "Not Specified")
|
||||||
|
|
||||||
fun smallCommitHash(): String {
|
fun smallCommitHash(): String {
|
||||||
return this.GIT_COMMIT.substring(0, 7)
|
return this.GIT_COMMIT.substring(0, 7)
|
||||||
|
|||||||
@@ -97,10 +97,10 @@ import com.cobblemon.mod.common.pokemon.Pokemon
|
|||||||
import com.cobblemon.mod.common.pokemon.aspects.ALPHA_ASPECT
|
import com.cobblemon.mod.common.pokemon.aspects.ALPHA_ASPECT
|
||||||
import com.cobblemon.mod.common.pokemon.aspects.CHARACTERISTIC_RAINBOW_ASPECT
|
import com.cobblemon.mod.common.pokemon.aspects.CHARACTERISTIC_RAINBOW_ASPECT
|
||||||
import com.cobblemon.mod.common.pokemon.aspects.COSMETIC_SLOT_ASPECT
|
import com.cobblemon.mod.common.pokemon.aspects.COSMETIC_SLOT_ASPECT
|
||||||
import com.cobblemon.mod.common.pokemon.aspects.FORM_ASPECTS
|
|
||||||
import com.cobblemon.mod.common.pokemon.aspects.GENDER_ASPECT
|
import com.cobblemon.mod.common.pokemon.aspects.GENDER_ASPECT
|
||||||
import com.cobblemon.mod.common.pokemon.aspects.MARK_ASPECT
|
import com.cobblemon.mod.common.pokemon.aspects.MARK_ASPECT
|
||||||
import com.cobblemon.mod.common.pokemon.aspects.SHINY_ASPECT
|
import com.cobblemon.mod.common.pokemon.aspects.SHINY_ASPECT
|
||||||
|
import com.cobblemon.mod.common.pokemon.evolution.variants.BlockClickEvolution
|
||||||
import com.cobblemon.mod.common.pokemon.feature.SlowpokeTailRegrowthSpeciesFeature
|
import com.cobblemon.mod.common.pokemon.feature.SlowpokeTailRegrowthSpeciesFeature
|
||||||
import com.cobblemon.mod.common.pokemon.feature.SlowpokeTailRegrowthSpeciesFeatureProvider
|
import com.cobblemon.mod.common.pokemon.feature.SlowpokeTailRegrowthSpeciesFeatureProvider
|
||||||
import com.cobblemon.mod.common.pokemon.feature.TagSeasonResolver
|
import com.cobblemon.mod.common.pokemon.feature.TagSeasonResolver
|
||||||
@@ -115,7 +115,6 @@ import com.cobblemon.mod.common.pokemon.properties.NoAIProperty
|
|||||||
import com.cobblemon.mod.common.pokemon.properties.UnaspectPropertyType
|
import com.cobblemon.mod.common.pokemon.properties.UnaspectPropertyType
|
||||||
import com.cobblemon.mod.common.pokemon.properties.UncatchableProperty
|
import com.cobblemon.mod.common.pokemon.properties.UncatchableProperty
|
||||||
import com.cobblemon.mod.common.pokemon.stat.CobblemonStatProvider
|
import com.cobblemon.mod.common.pokemon.stat.CobblemonStatProvider
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.triggers.BlockClickTrigger
|
|
||||||
import com.cobblemon.mod.common.starter.CobblemonStarterHandler
|
import com.cobblemon.mod.common.starter.CobblemonStarterHandler
|
||||||
import com.cobblemon.mod.common.util.*
|
import com.cobblemon.mod.common.util.*
|
||||||
import com.cobblemon.mod.common.world.feature.CobblemonPlacedFeatures
|
import com.cobblemon.mod.common.world.feature.CobblemonPlacedFeatures
|
||||||
@@ -261,6 +260,9 @@ object Cobblemon {
|
|||||||
RequestManager.onLogoff(it.player)
|
RequestManager.onLogoff(it.player)
|
||||||
serverPlayerStructs.remove(it.player.uuid)
|
serverPlayerStructs.remove(it.player.uuid)
|
||||||
}
|
}
|
||||||
|
PlatformEvents.PLAYER_RESPAWN.subscribe {
|
||||||
|
serverPlayerStructs.remove(it.player.uuid)
|
||||||
|
}
|
||||||
PlatformEvents.PLAYER_DEATH.subscribe {
|
PlatformEvents.PLAYER_DEATH.subscribe {
|
||||||
PCLinkManager.removeLink(it.player.uuid)
|
PCLinkManager.removeLink(it.player.uuid)
|
||||||
battleRegistry.getBattleByParticipatingPlayer(it.player)?.stop()
|
battleRegistry.getBattleByParticipatingPlayer(it.player)?.stop()
|
||||||
@@ -274,8 +276,13 @@ object Cobblemon {
|
|||||||
PlatformEvents.RIGHT_CLICK_BLOCK.subscribe { event ->
|
PlatformEvents.RIGHT_CLICK_BLOCK.subscribe { event ->
|
||||||
val player = event.player
|
val player = event.player
|
||||||
val block = player.level().getBlockState(event.pos).block
|
val block = player.level().getBlockState(event.pos).block
|
||||||
val context = BlockClickTrigger.Context(block, player.level())
|
player.party().forEach { pokemon ->
|
||||||
player.party().forEach { pokemon -> pokemon.triggerTransformations<BlockClickTrigger>(context) }
|
pokemon.lockedEvolutions
|
||||||
|
.filterIsInstance<BlockClickEvolution>()
|
||||||
|
.forEach { evolution ->
|
||||||
|
evolution.attemptEvolution(pokemon, BlockClickEvolution.BlockInteractionContext(block, player.level()))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PlatformEvents.CHANGE_DIMENSION.subscribe {
|
PlatformEvents.CHANGE_DIMENSION.subscribe {
|
||||||
@@ -319,7 +326,6 @@ object Cobblemon {
|
|||||||
|
|
||||||
SHINY_ASPECT.register()
|
SHINY_ASPECT.register()
|
||||||
GENDER_ASPECT.register()
|
GENDER_ASPECT.register()
|
||||||
FORM_ASPECTS.register()
|
|
||||||
COSMETIC_SLOT_ASPECT.register()
|
COSMETIC_SLOT_ASPECT.register()
|
||||||
CHARACTERISTIC_RAINBOW_ASPECT.register()
|
CHARACTERISTIC_RAINBOW_ASPECT.register()
|
||||||
ALPHA_ASPECT.register()
|
ALPHA_ASPECT.register()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
package com.cobblemon.mod.common
|
package com.cobblemon.mod.common
|
||||||
|
|
||||||
import com.bedrockk.molang.Expression
|
import com.bedrockk.molang.Expression
|
||||||
import com.cobblemon.mod.common.CobblemonBehaviours.autoPokemonBehaviours
|
|
||||||
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
|
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
|
||||||
import com.cobblemon.mod.common.api.ai.CobblemonBehaviour
|
import com.cobblemon.mod.common.api.ai.CobblemonBehaviour
|
||||||
import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
|
import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
|
||||||
@@ -20,7 +19,16 @@ import com.cobblemon.mod.common.api.molang.ExpressionLike
|
|||||||
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
||||||
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
||||||
import com.cobblemon.mod.common.net.messages.client.data.BehaviourSyncPacket
|
import com.cobblemon.mod.common.net.messages.client.data.BehaviourSyncPacket
|
||||||
import com.cobblemon.mod.common.util.adapters.*
|
import com.cobblemon.mod.common.util.adapters.ActivityAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.BehaviourConfigAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.ExpressionAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.ExpressionLikeAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.ExpressionOrEntityVariableAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.IdentifierAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.MemoryModuleTypeAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.SensorTypeAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.TaskConfigAdapter
|
||||||
|
import com.cobblemon.mod.common.util.adapters.TranslatedTextAdapter
|
||||||
import com.cobblemon.mod.common.util.cobblemonResource
|
import com.cobblemon.mod.common.util.cobblemonResource
|
||||||
import com.cobblemon.mod.common.util.endsWith
|
import com.cobblemon.mod.common.util.endsWith
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
|||||||
@@ -109,4 +109,21 @@ object CobblemonBlockEntities : PlatformRegistry<Registry<BlockEntityType<*>>, R
|
|||||||
"poke_snack",
|
"poke_snack",
|
||||||
BlockEntityType.Builder.of(::PokeSnackBlockEntity, CobblemonBlocks.POKE_SNACK, CobblemonBlocks.POKE_CAKE).build(null)
|
BlockEntityType.Builder.of(::PokeSnackBlockEntity, CobblemonBlocks.POKE_SNACK, CobblemonBlocks.POKE_CAKE).build(null)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val TERRAIN_PLANT: BlockEntityType<TerrainPlantBlockEntity> = this.create(
|
||||||
|
"terrain_plant",
|
||||||
|
BlockEntityType.Builder.of(::TerrainPlantBlockEntity,
|
||||||
|
CobblemonBlocks.VOLTACONIA,
|
||||||
|
CobblemonBlocks.LUCIBELL,
|
||||||
|
CobblemonBlocks.VERDROOT
|
||||||
|
).build(null)
|
||||||
|
)
|
||||||
|
@JvmField
|
||||||
|
val MISTLEAF_FLOWER: BlockEntityType<MistleafFlowerBlockEntity> = this.create(
|
||||||
|
"mistleaf",
|
||||||
|
BlockEntityType.Builder.of(::MistleafFlowerBlockEntity,
|
||||||
|
CobblemonBlocks.MISTLEAF
|
||||||
|
).build(null)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,7 @@ import com.cobblemon.mod.common.block.MintBlock.MintType
|
|||||||
import com.cobblemon.mod.common.block.campfirepot.CampfireBlock
|
import com.cobblemon.mod.common.block.campfirepot.CampfireBlock
|
||||||
import com.cobblemon.mod.common.block.campfirepot.CampfirePotBlock
|
import com.cobblemon.mod.common.block.campfirepot.CampfirePotBlock
|
||||||
import com.cobblemon.mod.common.block.chest.GildedChestBlock
|
import com.cobblemon.mod.common.block.chest.GildedChestBlock
|
||||||
|
import com.cobblemon.mod.common.block.decor.*
|
||||||
import com.cobblemon.mod.common.block.general.BaleBlock
|
import com.cobblemon.mod.common.block.general.BaleBlock
|
||||||
import com.cobblemon.mod.common.block.general.HorizontalRotationCarpetBlock
|
import com.cobblemon.mod.common.block.general.HorizontalRotationCarpetBlock
|
||||||
import com.cobblemon.mod.common.block.general.HorizontalRotationalBlock
|
import com.cobblemon.mod.common.block.general.HorizontalRotationalBlock
|
||||||
@@ -26,6 +27,7 @@ import com.cobblemon.mod.common.block.sign.CobblemonSignBlock
|
|||||||
import com.cobblemon.mod.common.block.sign.CobblemonWallHangingSignBlock
|
import com.cobblemon.mod.common.block.sign.CobblemonWallHangingSignBlock
|
||||||
import com.cobblemon.mod.common.block.sign.CobblemonWallSignBlock
|
import com.cobblemon.mod.common.block.sign.CobblemonWallSignBlock
|
||||||
import com.cobblemon.mod.common.block.tmmachine.TMMachineBlock
|
import com.cobblemon.mod.common.block.tmmachine.TMMachineBlock
|
||||||
|
import com.cobblemon.mod.common.block.general.MintLitterBlock
|
||||||
import com.cobblemon.mod.common.mixin.invoker.BlocksInvoker
|
import com.cobblemon.mod.common.mixin.invoker.BlocksInvoker
|
||||||
import com.cobblemon.mod.common.mixin.invoker.DoorBlockInvoker
|
import com.cobblemon.mod.common.mixin.invoker.DoorBlockInvoker
|
||||||
import com.cobblemon.mod.common.mixin.invoker.FireBlockInvoker
|
import com.cobblemon.mod.common.mixin.invoker.FireBlockInvoker
|
||||||
@@ -621,37 +623,131 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
val WEAKNESS_POLICY = create("weakness_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_LARGE_SOUNDS).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
|
val WEAKNESS_POLICY = create("weakness_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_LARGE_SOUNDS).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val FULL_HEAL = create("full_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
val RING_TARGET = create("ring_target", RingTargetBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOD).mapColor(MapColor.NONE).noOcclusion().strength(0.125f)))
|
||||||
@JvmField
|
@JvmField
|
||||||
val ANTIDOTE = create("antidote", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
val MAGNET = create("magnet", MagnetBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion().strength(0.075f)))
|
||||||
@JvmField
|
@JvmField
|
||||||
val AWAKENING = create("awakening", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
val GALARICA_WREATH = create("galarica_wreath", GalaricaWreathBlock(BlockBehaviour.Properties.of().sound(SoundType.AZALEA_LEAVES).mapColor(MapColor.NONE).noOcclusion().noCollission()))
|
||||||
@JvmField
|
|
||||||
val BURN_HEAL = create("burn_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
|
||||||
@JvmField
|
|
||||||
val ICE_HEAL = create("ice_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
|
||||||
@JvmField
|
|
||||||
val PARALYZE_HEAL = create("paralyze_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val ETHER = create("ether", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
val FLAME_ORB = create("flame_orb", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().lightLevel{15}))
|
||||||
@JvmField
|
@JvmField
|
||||||
val MAX_ETHER = create("max_ether", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
val TOXIC_ORB = create("toxic_orb", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion()))
|
||||||
@JvmField
|
@JvmField
|
||||||
val ELIXIR = create("elixir", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
val LIFE_ORB = create("life_orb", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().lightLevel{7}))
|
||||||
@JvmField
|
@JvmField
|
||||||
val MAX_ELIXIR = create("max_elixir", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
val LIGHT_BALL = create("light_ball", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().lightLevel{13}))
|
||||||
|
@JvmField
|
||||||
|
val SMOKE_BALL = create("smoke_ball", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion()))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTION = create("potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.POTION))
|
val KINGS_ROCK = create("kings_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.TUMBLESTONE_BLOCK_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.CENTERED_6x))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val SUPER_POTION = create("super_potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.POTION))
|
val GALARICA_CUFF = create("galarica_cuff", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.AZALEA_LEAVES).mapColor(MapColor.NONE).noCollission().noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_10x4))
|
||||||
@JvmField
|
@JvmField
|
||||||
val HYPER_POTION = create("hyper_potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.POTION))
|
val UNREMARKABLE_TEACUP = create("unremarkable_teacup", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEACUP))
|
||||||
@JvmField
|
@JvmField
|
||||||
val MAX_POTION = create("max_potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.MAX_POTION))
|
val MASTERPIECE_TEACUP = create("masterpiece_teacup", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEACUP))
|
||||||
@JvmField
|
@JvmField
|
||||||
val FULL_RESTORE = create("full_restore", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.MAX_POTION))
|
val CHIPPED_POT = create("chipped_pot", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEAPOT))
|
||||||
|
@JvmField
|
||||||
|
val CRACKED_POT = create("cracked_pot", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEAPOT))
|
||||||
|
@JvmField
|
||||||
|
val ELECTIRIZER = create("electirizer", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.IZER))
|
||||||
|
@JvmField
|
||||||
|
val MAGMARIZER = create("magmarizer", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.IZER))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val SACHET = create("sachet", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||||
|
@JvmField
|
||||||
|
val METAL_POWDER = create("metal_powder", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_POWDER_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||||
|
@JvmField
|
||||||
|
val QUICK_POWDER = create("quick_powder", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_POWDER_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||||
|
@JvmField
|
||||||
|
val BRIGHT_POWDER = create("bright_powder", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_POWDER_SOUNDS).mapColor(MapColor.NONE).noOcclusion().lightLevel{3}, DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||||
|
@JvmField
|
||||||
|
val SOFT_SAND = create("soft_sand", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_POWDER_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val NEVER_MELT_ICE = create("never_melt_ice", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().friction(0.989F), DecorativeItemBlock.DecorativeItemBlockType.NEVERMELT))
|
||||||
|
@JvmField
|
||||||
|
val SCOPE_LENS = create("scope_lens", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.COPPER).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.SCOPE))
|
||||||
|
@JvmField
|
||||||
|
val WIDE_LENS = create("wide_lens", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.COPPER).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.WIDE))
|
||||||
|
@JvmField
|
||||||
|
val ZOOM_LENS = create("zoom_lens", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.COPPER).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.ZOOM))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ICY_ROCK = create("icy_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x4))
|
||||||
|
@JvmField
|
||||||
|
val HEAT_ROCK = create("heat_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x4))
|
||||||
|
@JvmField
|
||||||
|
val SMOOTH_ROCK = create("smooth_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x4))
|
||||||
|
@JvmField
|
||||||
|
val DAMP_ROCK = create("damp_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x6))
|
||||||
|
@JvmField
|
||||||
|
val DESTINY_KNOT = create("destiny_knot", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.KNOT))
|
||||||
|
@JvmField
|
||||||
|
val LUMINOUS_MOSS = create("luminous_moss", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.MOSS).mapColor(MapColor.NONE).noOcclusion().lightLevel{5}, DecorativeItemBlock.DecorativeItemBlockType.CENTERED_8x))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val METRONOME = create("metronome", ActivatableDecorationBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion(), ActivatableDecorationBlock.ActivatableDecorationBlockType.METRONOME))
|
||||||
|
@JvmField
|
||||||
|
val EJECT_BUTTON = create("eject_button", EjectButtonBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion().strength(0.125f), 40))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val LOADED_DICE = create("loaded_dice", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_DICE_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.DICE))
|
||||||
|
@JvmField
|
||||||
|
val IRON_BALL = create("iron_ball", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.IRON_BALL))
|
||||||
|
@JvmField
|
||||||
|
val METAL_COAT = create("metal_coat", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.METAL_COAT))
|
||||||
|
@JvmField
|
||||||
|
val UPGRADE = create("upgrade", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.UPGRADE))
|
||||||
|
@JvmField
|
||||||
|
val DUBIOUS_DISC = create("dubious_disc", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.UPGRADE))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val THROAT_SPRAY = create("throat_spray", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.THROAT_SPRAY))
|
||||||
|
@JvmField
|
||||||
|
val TERRAIN_EXTENDER = create("terrain_extender", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_METAL_CAN_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.EXTENDER))
|
||||||
|
@JvmField
|
||||||
|
val MOOMOO_MILK = create("moomoo_milk", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_JAR_GLASS_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.GLASS_BOTTLE))
|
||||||
|
@JvmField
|
||||||
|
val MEDICINAL_BREW = create("medicinal_brew", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_JAR_GLASS_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.GLASS_BOTTLE))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val FULL_HEAL = create("full_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||||
|
@JvmField
|
||||||
|
val ANTIDOTE = create("antidote", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||||
|
@JvmField
|
||||||
|
val AWAKENING = create("awakening", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||||
|
@JvmField
|
||||||
|
val BURN_HEAL = create("burn_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||||
|
@JvmField
|
||||||
|
val ICE_HEAL = create("ice_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||||
|
@JvmField
|
||||||
|
val PARALYZE_HEAL = create("paralyze_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ETHER = create("ether", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
||||||
|
@JvmField
|
||||||
|
val MAX_ETHER = create("max_ether", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
||||||
|
@JvmField
|
||||||
|
val ELIXIR = create("elixir", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
||||||
|
@JvmField
|
||||||
|
val MAX_ELIXIR = create("max_elixir", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.ETHER))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val POTION = create("potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.POTION))
|
||||||
|
@JvmField
|
||||||
|
val SUPER_POTION = create("super_potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.POTION))
|
||||||
|
@JvmField
|
||||||
|
val HYPER_POTION = create("hyper_potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.POTION))
|
||||||
|
@JvmField
|
||||||
|
val MAX_POTION = create("max_potion", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.MAX_POTION))
|
||||||
|
@JvmField
|
||||||
|
val FULL_RESTORE = create("full_restore", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.MAX_POTION))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val DIRE_HIT = create("dire_hit", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.BATTLE_ITEM))
|
val DIRE_HIT = create("dire_hit", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.BATTLE_ITEM))
|
||||||
@@ -670,6 +766,23 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
@JvmField
|
@JvmField
|
||||||
val X_SPEED = create("x_${Stats.SPEED.identifier.path}", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.BATTLE_ITEM))
|
val X_SPEED = create("x_${Stats.SPEED.identifier.path}", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.BATTLE_ITEM))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val HP_UP = create("hp_up", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val PROTEIN = create("protein", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val IRON = create("iron", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val CARBOS = create("carbos", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val CALCIUM = create("calcium", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val ZINC = create("zinc", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val PP_UP = create("pp_up", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
@JvmField
|
||||||
|
val PP_MAX = create("pp_max", StackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_BOTTLE_PILLS_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val MONITOR = create("monitor", MonitorBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).lightLevel { if (it.getValue(MonitorBlock.SCREEN) != MonitorBlock.MonitorScreen.OFF) 13 else 0 }))
|
val MONITOR = create("monitor", MonitorBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).lightLevel { if (it.getValue(MonitorBlock.SCREEN) != MonitorBlock.MonitorScreen.OFF) 13 else 0 }))
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -685,6 +798,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
@JvmField
|
@JvmField
|
||||||
val PC = create("pc", PCBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2F).noOcclusion().lightLevel { if ((it.getValue(PCBlock.ON) as Boolean) && (it.getValue(PCBlock.PART) == PCBlock.PCPart.TOP)) 13 else 0 }))
|
val PC = create("pc", PCBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2F).noOcclusion().lightLevel { if ((it.getValue(PCBlock.ON) as Boolean) && (it.getValue(PCBlock.PART) == PCBlock.PCPart.TOP)) 13 else 0 }))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
val TM_MACHINE = create(
|
val TM_MACHINE = create(
|
||||||
"tm_machine",
|
"tm_machine",
|
||||||
TMMachineBlock(
|
TMMachineBlock(
|
||||||
@@ -713,7 +827,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val PASTURE = create("pasture", PastureBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD).strength(2F).noOcclusion().pushReaction(PushReaction.BLOCK).lightLevel { if ((it.getValue(PastureBlock.ON) as Boolean) && (it.getValue(PastureBlock.PART) == PastureBlock.PasturePart.TOP)) 13 else 0 }))
|
val PASTURE = create("pasture", PastureBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD).strength(2F).noOcclusion().pushReaction(PushReaction.BLOCK).lightLevel { if ((it.getValue(PastureBlock.ON) as Boolean) && (it.getValue(PastureBlock.PART) == PastureBlock.PasturePart.TOP)) 13 else 0 }))
|
||||||
|
@JvmField
|
||||||
val RED_MINT = create("red_mint", MintBlock(MintType.RED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
|
val RED_MINT = create("red_mint", MintBlock(MintType.RED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
|
||||||
@JvmField
|
@JvmField
|
||||||
val BLUE_MINT = create("blue_mint", MintBlock(MintType.BLUE, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLUE).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
|
val BLUE_MINT = create("blue_mint", MintBlock(MintType.BLUE, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLUE).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
|
||||||
@@ -731,29 +845,68 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
@JvmField
|
@JvmField
|
||||||
val PEP_UP_FLOWER = this.create("pep_up_flower", FlowerBlock(MobEffects.LEVITATION, 10F, BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).offsetType(BlockBehaviour.OffsetType.XZ).pushReaction(PushReaction.DESTROY)))
|
val PEP_UP_FLOWER = this.create("pep_up_flower", FlowerBlock(MobEffects.LEVITATION, 10F, BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).offsetType(BlockBehaviour.OffsetType.XZ).pushReaction(PushReaction.DESTROY)))
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_PEP_UP_FLOWER = this.create("potted_pep_up_flower", BlocksInvoker.createFlowerPotBlock(PEP_UP_FLOWER))
|
|
||||||
@JvmField
|
|
||||||
val HEARTY_GRAINS = this.create("hearty_grains", HeartyGrainsBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).ignitedByLava().mapColor(MapColor.PLANT).noCollission().randomTicks().instabreak()))
|
val HEARTY_GRAINS = this.create("hearty_grains", HeartyGrainsBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).ignitedByLava().mapColor(MapColor.PLANT).noCollission().randomTicks().instabreak()))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val GALARICA_NUT_BUSH = this.create("galarica_nut_bush", NutBushBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).randomTicks().noCollission().sound(SoundType.SWEET_BERRY_BUSH).pushReaction(PushReaction.DESTROY)))
|
val GALARICA_NUT_BUSH = this.create("galarica_nut_bush", NutBushBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).randomTicks().noCollission().sound(SoundType.SWEET_BERRY_BUSH).pushReaction(PushReaction.DESTROY)))
|
||||||
|
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_RED_APRICORN_SAPLING = this.create("potted_red_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(RED_APRICORN_SAPLING))
|
val RED_MINT_LEAF_LITTER = this.mintLitter("red_mint_leaf_litter", MapColor.COLOR_RED)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_YELLOW_APRICORN_SAPLING = this.create("potted_yellow_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(YELLOW_APRICORN_SAPLING))
|
val POTTED_RED_MINT = this.flowerPot("potted_red_mint", RED_MINT_LEAF_LITTER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_GREEN_APRICORN_SAPLING = this.create("potted_green_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(GREEN_APRICORN_SAPLING))
|
val BLUE_MINT_LEAF_LITTER = this.mintLitter("blue_mint_leaf_litter", MapColor.COLOR_BLUE)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_BLUE_APRICORN_SAPLING = this.create("potted_blue_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(BLUE_APRICORN_SAPLING))
|
val POTTED_BLUE_MINT = this.flowerPot("potted_blue_mint", BLUE_MINT_LEAF_LITTER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_PINK_APRICORN_SAPLING = this.create("potted_pink_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(PINK_APRICORN_SAPLING))
|
val CYAN_MINT_LEAF_LITTER = this.mintLitter("cyan_mint_leaf_litter", MapColor.COLOR_CYAN)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_BLACK_APRICORN_SAPLING = this.create("potted_black_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(BLACK_APRICORN_SAPLING))
|
val POTTED_CYAN_MINT = this.flowerPot("potted_cyan_mint", CYAN_MINT_LEAF_LITTER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_WHITE_APRICORN_SAPLING = this.create("potted_white_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(WHITE_APRICORN_SAPLING))
|
val PINK_MINT_LEAF_LITTER = this.mintLitter("pink_mint_leaf_litter", MapColor.COLOR_PINK)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTTED_SACCHARINE_SAPLING = this.create("potted_saccharine_sapling", BlocksInvoker.createFlowerPotBlock(SACCHARINE_SAPLING))
|
val POTTED_PINK_MINT = this.flowerPot("potted_pink_mint", PINK_MINT_LEAF_LITTER)
|
||||||
|
@JvmField
|
||||||
|
val GREEN_MINT_LEAF_LITTER = this.mintLitter("green_mint_leaf_litter", MapColor.COLOR_GREEN)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_GREEN_MINT = this.flowerPot("potted_green_mint", GREEN_MINT_LEAF_LITTER)
|
||||||
|
@JvmField
|
||||||
|
val WHITE_MINT_LEAF_LITTER = this.mintLitter("white_mint_leaf_litter", MapColor.SNOW)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_WHITE_MINT = this.flowerPot("potted_white_mint", WHITE_MINT_LEAF_LITTER)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val LOBAILA = this.create("lobaila", LobailaFlowerBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).offsetType(BlockBehaviour.OffsetType.XZ).ignitedByLava().pushReaction(PushReaction.DESTROY)))
|
||||||
|
@JvmField
|
||||||
|
val POMOHANA = this.create("pomohana", PomohanaFlowerBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).ignitedByLava().pushReaction(PushReaction.DESTROY)))
|
||||||
|
@JvmField
|
||||||
|
val PAUVILLEA = this.create("pauvillea",PauvilleaFlowerBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().sound(SoundType.GRASS).instabreak().ignitedByLava().pushReaction(PushReaction.DESTROY)))
|
||||||
|
@JvmField
|
||||||
|
val WISTENSU = this.create("wistensu", WistensuFlowerHeadBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().sound(SoundType.GRASS).instabreak().ignitedByLava().pushReaction(PushReaction.DESTROY).lightLevel{11}))
|
||||||
|
@JvmField
|
||||||
|
val WISTENSU_VINE = this.create("wistensu_vine", WistensuFlowerVineBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().sound(SoundType.GRASS).instabreak().ignitedByLava().pushReaction(PushReaction.DESTROY)))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ELECTRIC_SEED = this.terrainSeed("electric_seed", TerrainSeedBlock.TerrainSeedType.ELECTRIC)
|
||||||
|
@JvmField
|
||||||
|
val PSYCHIC_SEED = this.terrainSeed("psychic_seed", TerrainSeedBlock.TerrainSeedType.PSYCHIC)
|
||||||
|
@JvmField
|
||||||
|
val MISTY_SEED = this.terrainSeed("misty_seed", TerrainSeedBlock.TerrainSeedType.MISTY)
|
||||||
|
@JvmField
|
||||||
|
val GRASSY_SEED = this.terrainSeed("grassy_seed", TerrainSeedBlock.TerrainSeedType.GRASSY)
|
||||||
|
@JvmField
|
||||||
|
val VOLTACONIA = this.terrainPlant("voltaconia") { state -> if (state.getValue(TerrainPlantBlock.GLOWING)) 8 else 0 }
|
||||||
|
@JvmField
|
||||||
|
val VERDROOT = this.terrainPlant("verdroot") { state -> if (state.getValue(TerrainPlantBlock.GLOWING)) 5 else 0 }
|
||||||
|
@JvmField
|
||||||
|
val LUCIBELL = this.terrainPlant("lucibell") { state -> if (state.getValue(TerrainPlantBlock.GLOWING)) 8 else 0 }
|
||||||
|
@JvmField
|
||||||
|
val MISTLEAF = this.create(
|
||||||
|
"mistleaf",
|
||||||
|
MistleafFlowerBlock {
|
||||||
|
if ((it.getValue(MistleafFlowerBlock.GLOWING) >= 1)) it.getValue(MistleafFlowerBlock.GLOWING) + 2 else 0
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val HEARTY_GRAIN_BALE = this.create("hearty_grain_bale", BaleBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).instrument(NoteBlockInstrument.BANJO).strength(0.5F).sound(CobblemonSounds.HEARTY_GRAIN_BALE_SOUNDS)))
|
val HEARTY_GRAIN_BALE = this.create("hearty_grain_bale", BaleBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).instrument(NoteBlockInstrument.BANJO).strength(0.5F).sound(CobblemonSounds.HEARTY_GRAIN_BALE_SOUNDS)))
|
||||||
@@ -931,6 +1084,165 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
val YACHE_BERRY = this.berryBlock("yache")
|
val YACHE_BERRY = this.berryBlock("yache")
|
||||||
//val BINDING_SOIL = this.create("binding_soil", BindingSoilBlock(BlockBehaviour.Properties.of()))
|
//val BINDING_SOIL = this.create("binding_soil", BindingSoilBlock(BlockBehaviour.Properties.of()))
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val POTTED_AGUAV_BERRY = this.flowerPot("potted_aguav_berry", AGUAV_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_APICOT_BERRY = this.flowerPot("potted_apicot_berry", APICOT_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_ASPEAR_BERRY = this.flowerPot("potted_aspear_berry", ASPEAR_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_BABIRI_BERRY = this.flowerPot("potted_babiri_berry", BABIRI_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_BELUE_BERRY = this.flowerPot("potted_belue_berry", BELUE_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_BLUK_BERRY = this.flowerPot("potted_bluk_berry", BLUK_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CHARTI_BERRY = this.flowerPot("potted_charti_berry", CHARTI_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CHERI_BERRY = this.flowerPot("potted_cheri_berry", CHERI_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CHESTO_BERRY = this.flowerPot("potted_chesto_berry", CHESTO_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CHILAN_BERRY = this.flowerPot("potted_chilan_berry", CHILAN_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CHOPLE_BERRY = this.flowerPot("potted_chople_berry", CHOPLE_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_COBA_BERRY = this.flowerPot("potted_coba_berry", COBA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_COLBUR_BERRY = this.flowerPot("potted_colbur_berry", COLBUR_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CORNN_BERRY = this.flowerPot("potted_cornn_berry", CORNN_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_CUSTAP_BERRY = this.flowerPot("potted_custap_berry", CUSTAP_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_DURIN_BERRY = this.flowerPot("potted_durin_berry", DURIN_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_EGGANT_BERRY = this.flowerPot("potted_eggant_berry", EGGANT_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_ENIGMA_BERRY = this.flowerPot("potted_enigma_berry", ENIGMA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_FIGY_BERRY = this.flowerPot("potted_figy_berry", FIGY_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_GANLON_BERRY = this.flowerPot("potted_ganlon_berry", GANLON_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_GREPA_BERRY = this.flowerPot("potted_grepa_berry", GREPA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_HABAN_BERRY = this.flowerPot("potted_haban_berry", HABAN_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_HONDEW_BERRY = this.flowerPot("potted_hondew_berry", HONDEW_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_HOPO_BERRY = this.flowerPot("potted_hopo_berry", HOPO_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_IAPAPA_BERRY = this.flowerPot("potted_iapapa_berry", IAPAPA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_JABOCA_BERRY = this.flowerPot("potted_jaboca_berry", JABOCA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_KASIB_BERRY = this.flowerPot("potted_kasib_berry", KASIB_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_KEBIA_BERRY = this.flowerPot("potted_kebia_berry", KEBIA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_KEE_BERRY = this.flowerPot("potted_kee_berry", KEE_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_KELPSY_BERRY = this.flowerPot("potted_kelpsy_berry", KELPSY_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_LANSAT_BERRY = this.flowerPot("potted_lansat_berry", LANSAT_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_LEPPA_BERRY = this.flowerPot("potted_leppa_berry", LEPPA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_LIECHI_BERRY = this.flowerPot("potted_liechi_berry", LIECHI_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_LUM_BERRY = this.flowerPot("potted_lum_berry", LUM_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_MAGO_BERRY = this.flowerPot("potted_mago_berry", MAGO_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_MAGOST_BERRY = this.flowerPot("potted_magost_berry", MAGOST_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_MARANGA_BERRY = this.flowerPot("potted_maranga_berry", MARANGA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_MICLE_BERRY = this.flowerPot("potted_micle_berry", MICLE_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_NANAB_BERRY = this.flowerPot("potted_nanab_berry", NANAB_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_NOMEL_BERRY = this.flowerPot("potted_nomel_berry", NOMEL_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_OCCA_BERRY = this.flowerPot("potted_occa_berry", OCCA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_ORAN_BERRY = this.flowerPot("potted_oran_berry", ORAN_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PAMTRE_BERRY = this.flowerPot("potted_pamtre_berry", PAMTRE_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PASSHO_BERRY = this.flowerPot("potted_passho_berry", PASSHO_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PAYAPA_BERRY = this.flowerPot("potted_payapa_berry", PAYAPA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PECHA_BERRY = this.flowerPot("potted_pecha_berry", PECHA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PERSIM_BERRY = this.flowerPot("potted_persim_berry", PERSIM_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PETAYA_BERRY = this.flowerPot("potted_petaya_berry", PETAYA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PINAP_BERRY = this.flowerPot("potted_pinap_berry", PINAP_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_POMEG_BERRY = this.flowerPot("potted_pomeg_berry", POMEG_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_QUALOT_BERRY = this.flowerPot("potted_qualot_berry", QUALOT_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_RABUTA_BERRY = this.flowerPot("potted_rabuta_berry", RABUTA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_RAWST_BERRY = this.flowerPot("potted_rawst_berry", RAWST_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_RAZZ_BERRY = this.flowerPot("potted_razz_berry", RAZZ_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_RINDO_BERRY = this.flowerPot("potted_rindo_berry", RINDO_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_ROSELI_BERRY = this.flowerPot("potted_roseli_berry", ROSELI_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_ROWAP_BERRY = this.flowerPot("potted_rowap_berry", ROWAP_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_SALAC_BERRY = this.flowerPot("potted_salac_berry", SALAC_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_SHUCA_BERRY = this.flowerPot("potted_shuca_berry", SHUCA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_SITRUS_BERRY = this.flowerPot("potted_sitrus_berry", SITRUS_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_SPELON_BERRY = this.flowerPot("potted_spelon_berry", SPELON_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_STARF_BERRY = this.flowerPot("potted_starf_berry", STARF_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_TAMATO_BERRY = this.flowerPot("potted_tamato_berry", TAMATO_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_TANGA_BERRY = this.flowerPot("potted_tanga_berry", TANGA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_TOUGA_BERRY = this.flowerPot("potted_touga_berry", TOUGA_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_WACAN_BERRY = this.flowerPot("potted_wacan_berry", WACAN_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_WATMEL_BERRY = this.flowerPot("potted_watmel_berry", WATMEL_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_WEPEAR_BERRY = this.flowerPot("potted_wepear_berry", WEPEAR_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_WIKI_BERRY = this.flowerPot("potted_wiki_berry", WIKI_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_YACHE_BERRY = this.flowerPot("potted_yache_berry", YACHE_BERRY)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PEP_UP_FLOWER = this.flowerPot("potted_pep_up_flower", PEP_UP_FLOWER)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_RED_APRICORN_SAPLING = this.flowerPot("potted_red_apricorn_sapling", RED_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_YELLOW_APRICORN_SAPLING = this.flowerPot("potted_yellow_apricorn_sapling", YELLOW_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_GREEN_APRICORN_SAPLING = this.flowerPot("potted_green_apricorn_sapling", GREEN_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_BLUE_APRICORN_SAPLING = this.flowerPot("potted_blue_apricorn_sapling", BLUE_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_PINK_APRICORN_SAPLING = this.flowerPot("potted_pink_apricorn_sapling", PINK_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_BLACK_APRICORN_SAPLING = this.flowerPot("potted_black_apricorn_sapling", BLACK_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_WHITE_APRICORN_SAPLING = this.flowerPot("potted_white_apricorn_sapling", WHITE_APRICORN_SAPLING)
|
||||||
|
@JvmField
|
||||||
|
val POTTED_SACCHARINE_SAPLING = this.flowerPot("potted_saccharine_sapling", SACCHARINE_SAPLING)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
/**
|
/**
|
||||||
* Makes all blocks in array flammable by adding them to FireBlock's flammableRegistry.
|
* Makes all blocks in array flammable by adding them to FireBlock's flammableRegistry.
|
||||||
@@ -1032,4 +1344,57 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun typeGemClusters() = typeGemClusters.toMap()
|
fun typeGemClusters() = typeGemClusters.toMap()
|
||||||
|
|
||||||
|
private fun flowerPot(name: String, flower: Block) = this.create(
|
||||||
|
name,
|
||||||
|
FlowerPotBlock(
|
||||||
|
flower,
|
||||||
|
BlockBehaviour.Properties.of()
|
||||||
|
.instabreak()
|
||||||
|
.noOcclusion()
|
||||||
|
.pushReaction(PushReaction.DESTROY)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun mintLitter(name: String, color: MapColor) = this.create(
|
||||||
|
name,
|
||||||
|
MintLitterBlock(
|
||||||
|
BlockBehaviour.Properties.of()
|
||||||
|
.sound(CobblemonSounds.MINT_SOUNDS)
|
||||||
|
.mapColor(color)
|
||||||
|
.noOcclusion()
|
||||||
|
.noCollission()
|
||||||
|
.pushReaction(PushReaction.DESTROY)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun terrainSeed(name: String, type: TerrainSeedBlock.TerrainSeedType) = this.create(
|
||||||
|
name,
|
||||||
|
TerrainSeedBlock(
|
||||||
|
type,
|
||||||
|
BlockBehaviour.Properties.of()
|
||||||
|
.pushReaction(PushReaction.DESTROY)
|
||||||
|
.ignitedByLava()
|
||||||
|
.mapColor(MapColor.PLANT)
|
||||||
|
.offsetType(BlockBehaviour.OffsetType.XZ)
|
||||||
|
.noCollission()
|
||||||
|
.randomTicks()
|
||||||
|
.instabreak()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun terrainPlant(name: String, lightLevel: (BlockState) -> Int) = this.create(
|
||||||
|
name,
|
||||||
|
TerrainPlantBlock(
|
||||||
|
BlockBehaviour.Properties.of()
|
||||||
|
.mapColor(MapColor.PLANT)
|
||||||
|
.noCollission()
|
||||||
|
.instabreak()
|
||||||
|
.sound(SoundType.GRASS)
|
||||||
|
.offsetType(BlockBehaviour.OffsetType.XZ)
|
||||||
|
.ignitedByLava()
|
||||||
|
.pushReaction(PushReaction.DESTROY)
|
||||||
|
.lightLevel(lightLevel)
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
@@ -41,8 +41,6 @@ object CobblemonCommands {
|
|||||||
HeldItemCommand.register(dispatcher, registry)
|
HeldItemCommand.register(dispatcher, registry)
|
||||||
PcCommand.register(dispatcher)
|
PcCommand.register(dispatcher)
|
||||||
SpawnPokemonFromPool.register(dispatcher)
|
SpawnPokemonFromPool.register(dispatcher)
|
||||||
SpawnMeteorCommand.register(dispatcher)
|
|
||||||
SetMegaBondCommand.register(dispatcher)
|
|
||||||
PokeboxCommand.register(dispatcher)
|
PokeboxCommand.register(dispatcher)
|
||||||
PokedexCommand.register(dispatcher)
|
PokedexCommand.register(dispatcher)
|
||||||
TestStoreCommand.register(dispatcher)
|
TestStoreCommand.register(dispatcher)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import com.cobblemon.mod.common.entity.generic.GenericBedrockEntity
|
|||||||
import com.cobblemon.mod.common.entity.npc.NPCEntity
|
import com.cobblemon.mod.common.entity.npc.NPCEntity
|
||||||
import com.cobblemon.mod.common.entity.pokeball.EmptyPokeBallEntity
|
import com.cobblemon.mod.common.entity.pokeball.EmptyPokeBallEntity
|
||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||||
import com.cobblemon.mod.common.entity.projectile.FallingStarEntity
|
|
||||||
import com.cobblemon.mod.common.platform.PlatformRegistry
|
import com.cobblemon.mod.common.platform.PlatformRegistry
|
||||||
import com.cobblemon.mod.common.util.cobblemonResource
|
import com.cobblemon.mod.common.util.cobblemonResource
|
||||||
import net.minecraft.core.Registry
|
import net.minecraft.core.Registry
|
||||||
@@ -96,15 +95,6 @@ object CobblemonEntities : PlatformRegistry<Registry<EntityType<*>>, ResourceKey
|
|||||||
EntityType.Builder.of({ _, world -> NPCEntity(world) }, MobCategory.CREATURE).build("$NPC_KEY")
|
EntityType.Builder.of({ _, world -> NPCEntity(world) }, MobCategory.CREATURE).build("$NPC_KEY")
|
||||||
)
|
)
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val FALLING_STAR_KEY = cobblemonResource("falling_star")
|
|
||||||
@JvmField
|
|
||||||
val FALLING_STAR: EntityType<FallingStarEntity> = create(
|
|
||||||
FALLING_STAR_KEY.path,
|
|
||||||
EntityType.Builder.of(::FallingStarEntity, MobCategory.MISC).sized(0.5F, 0.5F).clientTrackingRange(8)
|
|
||||||
.build(FALLING_STAR_KEY.toString())
|
|
||||||
)
|
|
||||||
|
|
||||||
fun registerAttributes(consumer: (EntityType<out LivingEntity>, AttributeSupplier.Builder) -> Unit) {
|
fun registerAttributes(consumer: (EntityType<out LivingEntity>, AttributeSupplier.Builder) -> Unit) {
|
||||||
consumer(POKEMON, PokemonEntity.createAttributes())
|
consumer(POKEMON, PokemonEntity.createAttributes())
|
||||||
consumer(NPC, NPCEntity.createAttributes())
|
consumer(NPC, NPCEntity.createAttributes())
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.cobblemon.mod.common.api.net.NetworkPacket
|
|||||||
import com.mojang.brigadier.arguments.ArgumentType
|
import com.mojang.brigadier.arguments.ArgumentType
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
import net.minecraft.commands.synchronization.ArgumentTypeInfo
|
import net.minecraft.commands.synchronization.ArgumentTypeInfo
|
||||||
|
import net.minecraft.core.HolderLookup
|
||||||
import net.minecraft.resources.ResourceKey
|
import net.minecraft.resources.ResourceKey
|
||||||
import net.minecraft.resources.ResourceLocation
|
import net.minecraft.resources.ResourceLocation
|
||||||
import net.minecraft.server.MinecraftServer
|
import net.minecraft.server.MinecraftServer
|
||||||
@@ -19,6 +20,7 @@ import net.minecraft.server.level.ServerPlayer
|
|||||||
import net.minecraft.server.packs.PackType
|
import net.minecraft.server.packs.PackType
|
||||||
import net.minecraft.server.packs.resources.PreparableReloadListener
|
import net.minecraft.server.packs.resources.PreparableReloadListener
|
||||||
import net.minecraft.tags.TagKey
|
import net.minecraft.tags.TagKey
|
||||||
|
import net.minecraft.world.inventory.MenuType
|
||||||
import net.minecraft.world.level.GameRules
|
import net.minecraft.world.level.GameRules
|
||||||
import net.minecraft.world.level.ItemLike
|
import net.minecraft.world.level.ItemLike
|
||||||
import net.minecraft.world.level.biome.Biome
|
import net.minecraft.world.level.biome.Biome
|
||||||
@@ -167,12 +169,16 @@ interface CobblemonImplementation {
|
|||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
* @param identifier
|
* @param identifier
|
||||||
* @param reloader
|
* @param reloaderFactory
|
||||||
* @param type
|
* @param type
|
||||||
* @param dependencies
|
* @param dependencies
|
||||||
*/
|
*/
|
||||||
fun registerResourceReloader(identifier: ResourceLocation, reloader: PreparableReloadListener, type: PackType, dependencies: Collection<ResourceLocation>)
|
fun registerResourceReloader(
|
||||||
|
identifier: ResourceLocation,
|
||||||
|
type: PackType,
|
||||||
|
dependencies: Collection<ResourceLocation>,
|
||||||
|
reloaderFactory: (HolderLookup.Provider) -> PreparableReloadListener
|
||||||
|
)
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -33,12 +33,6 @@ object CobblemonItemComponents : PlatformRegistry<Registry<DataComponentType<*>>
|
|||||||
.networkSynchronized(HeldItemEffectComponent.PACKET_CODEC)
|
.networkSynchronized(HeldItemEffectComponent.PACKET_CODEC)
|
||||||
.build())
|
.build())
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val MEGA_BOND: DataComponentType<MegaBondComponent> = create("mega_bond", DataComponentType.builder<MegaBondComponent>()
|
|
||||||
.persistent(MegaBondComponent.CODEC)
|
|
||||||
.networkSynchronized(MegaBondComponent.PACKET_CODEC)
|
|
||||||
.build())
|
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val BAIT: DataComponentType<RodBaitComponent> = create("bait", DataComponentType.builder<RodBaitComponent>()
|
val BAIT: DataComponentType<RodBaitComponent> = create("bait", DataComponentType.builder<RodBaitComponent>()
|
||||||
.persistent(RodBaitComponent.CODEC)
|
.persistent(RodBaitComponent.CODEC)
|
||||||
|
|||||||
@@ -472,18 +472,18 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
// Evolution items
|
// Evolution items
|
||||||
@JvmField val LINK_CABLE = create("link_cable", LinkCableItem())
|
@JvmField val LINK_CABLE = create("link_cable", LinkCableItem())
|
||||||
@JvmField val DRAGON_SCALE = noSettingsItem("dragon_scale")
|
@JvmField val DRAGON_SCALE = noSettingsItem("dragon_scale")
|
||||||
@JvmField val METAL_COAT = noSettingsItem("metal_coat")
|
@JvmField val METAL_COAT = itemNameBlockItem("metal_coat", CobblemonBlocks.METAL_COAT)
|
||||||
@JvmField val UPGRADE = noSettingsItem("upgrade")
|
@JvmField val UPGRADE = itemNameBlockItem("upgrade", CobblemonBlocks.UPGRADE)
|
||||||
@JvmField val DUBIOUS_DISC = noSettingsItem("dubious_disc")
|
@JvmField val DUBIOUS_DISC = itemNameBlockItem("dubious_disc", CobblemonBlocks.DUBIOUS_DISC)
|
||||||
@JvmField val DEEP_SEA_SCALE = noSettingsItem("deep_sea_scale")
|
@JvmField val DEEP_SEA_SCALE = noSettingsItem("deep_sea_scale")
|
||||||
@JvmField val DEEP_SEA_TOOTH = noSettingsItem("deep_sea_tooth")
|
@JvmField val DEEP_SEA_TOOTH = noSettingsItem("deep_sea_tooth")
|
||||||
@JvmField val ELECTIRIZER = noSettingsItem("electirizer")
|
@JvmField val ELECTIRIZER = itemNameBlockItem("electirizer", CobblemonBlocks.ELECTIRIZER)
|
||||||
@JvmField val MAGMARIZER = noSettingsItem("magmarizer")
|
@JvmField val MAGMARIZER = itemNameBlockItem("magmarizer", CobblemonBlocks.MAGMARIZER)
|
||||||
@JvmField val OVAL_STONE = noSettingsItem("oval_stone")
|
@JvmField val OVAL_STONE = noSettingsItem("oval_stone")
|
||||||
@JvmField val PROTECTOR = noSettingsItem("protector")
|
@JvmField val PROTECTOR = noSettingsItem("protector")
|
||||||
@JvmField val REAPER_CLOTH = noSettingsItem("reaper_cloth")
|
@JvmField val REAPER_CLOTH = noSettingsItem("reaper_cloth")
|
||||||
@JvmField val PRISM_SCALE = noSettingsItem("prism_scale")
|
@JvmField val PRISM_SCALE = noSettingsItem("prism_scale")
|
||||||
@JvmField val SACHET = noSettingsItem("sachet")
|
@JvmField val SACHET = itemNameBlockItem("sachet", CobblemonBlocks.SACHET)
|
||||||
@JvmField val WHIPPED_DREAM = create("whipped_dream", foodItem(8, 0.3f))
|
@JvmField val WHIPPED_DREAM = create("whipped_dream", foodItem(8, 0.3f))
|
||||||
@JvmField val STRAWBERRY_SWEET = create("strawberry_sweet", foodItem(6, 0.125f))
|
@JvmField val STRAWBERRY_SWEET = create("strawberry_sweet", foodItem(6, 0.125f))
|
||||||
@JvmField val LOVE_SWEET = create("love_sweet", foodItem(6, 0.125f))
|
@JvmField val LOVE_SWEET = create("love_sweet", foodItem(6, 0.125f))
|
||||||
@@ -492,22 +492,20 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField val FLOWER_SWEET = create("flower_sweet", foodItem(6, 0.125f))
|
@JvmField val FLOWER_SWEET = create("flower_sweet", foodItem(6, 0.125f))
|
||||||
@JvmField val STAR_SWEET = create("star_sweet", foodItem(6, 0.125f))
|
@JvmField val STAR_SWEET = create("star_sweet", foodItem(6, 0.125f))
|
||||||
@JvmField val RIBBON_SWEET = create("ribbon_sweet", foodItem(6, 0.125f))
|
@JvmField val RIBBON_SWEET = create("ribbon_sweet", foodItem(6, 0.125f))
|
||||||
@JvmField val CHIPPED_POT = noSettingsItem("chipped_pot")
|
@JvmField val CHIPPED_POT = itemNameBlockItem("chipped_pot", CobblemonBlocks.CHIPPED_POT)
|
||||||
@JvmField val CRACKED_POT = noSettingsItem("cracked_pot")
|
@JvmField val CRACKED_POT = itemNameBlockItem("cracked_pot", CobblemonBlocks.CRACKED_POT)
|
||||||
@JvmField val MASTERPIECE_TEACUP = noSettingsItem("masterpiece_teacup")
|
@JvmField val MASTERPIECE_TEACUP = itemNameBlockItem("masterpiece_teacup", CobblemonBlocks.MASTERPIECE_TEACUP)
|
||||||
@JvmField val UNREMARKABLE_TEACUP = noSettingsItem("unremarkable_teacup")
|
@JvmField val UNREMARKABLE_TEACUP = itemNameBlockItem("unremarkable_teacup", CobblemonBlocks.UNREMARKABLE_TEACUP)
|
||||||
@JvmField val SWEET_APPLE = compostableItem("sweet_apple", foodItem(4, 0.3f), 0.65f)
|
@JvmField val SWEET_APPLE = compostableItem("sweet_apple", foodItem(4, 0.3f), 0.65f)
|
||||||
@JvmField val TART_APPLE = compostableItem("tart_apple", foodItem(4, 0.3f), 0.65f)
|
@JvmField val TART_APPLE = compostableItem("tart_apple", foodItem(4, 0.3f), 0.65f)
|
||||||
@JvmField val SYRUPY_APPLE = compostableItem("syrupy_apple", foodItem(4, 0.3f), 0.65f)
|
@JvmField val SYRUPY_APPLE = compostableItem("syrupy_apple", foodItem(4, 0.3f), 0.65f)
|
||||||
@JvmField val GALARICA_CUFF = noSettingsItem("galarica_cuff")
|
@JvmField val GALARICA_CUFF = itemNameBlockItem("galarica_cuff", CobblemonBlocks.GALARICA_CUFF)
|
||||||
@JvmField val GALARICA_WREATH = noSettingsItem("galarica_wreath")
|
|
||||||
@JvmField val BLACK_AUGURITE = noSettingsItem("black_augurite")
|
@JvmField val BLACK_AUGURITE = noSettingsItem("black_augurite")
|
||||||
@JvmField val PEAT_BLOCK = noSettingsItem("peat_block")
|
@JvmField val PEAT_BLOCK = noSettingsItem("peat_block")
|
||||||
@JvmField val RAZOR_CLAW = noSettingsItem("razor_claw")
|
@JvmField val RAZOR_CLAW = noSettingsItem("razor_claw")
|
||||||
@JvmField val RAZOR_FANG = noSettingsItem("razor_fang")
|
@JvmField val RAZOR_FANG = noSettingsItem("razor_fang")
|
||||||
@JvmField val AUSPICIOUS_ARMOR = heldItem("auspicious_armor")
|
@JvmField val AUSPICIOUS_ARMOR = heldItem("auspicious_armor")
|
||||||
@JvmField val MALICIOUS_ARMOR = heldItem("malicious_armor")
|
@JvmField val MALICIOUS_ARMOR = heldItem("malicious_armor")
|
||||||
@JvmField val SHELL_HELMET = heldItem("shell_helmet")
|
|
||||||
@JvmField val METAL_ALLOY = noSettingsItem("metal_alloy")
|
@JvmField val METAL_ALLOY = noSettingsItem("metal_alloy")
|
||||||
@JvmField val SCROLL_OF_DARKNESS = noSettingsItem("scroll_of_darkness")
|
@JvmField val SCROLL_OF_DARKNESS = noSettingsItem("scroll_of_darkness")
|
||||||
@JvmField val SCROLL_OF_WATERS = noSettingsItem("scroll_of_waters")
|
@JvmField val SCROLL_OF_WATERS = noSettingsItem("scroll_of_waters")
|
||||||
@@ -651,17 +649,17 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val EXPERIENCE_CANDY_XL = candyItem("exp_candy_xl") { _, _ -> CandyItem.DEFAULT_XL_CANDY_YIELD }
|
val EXPERIENCE_CANDY_XL = candyItem("exp_candy_xl") { _, _ -> CandyItem.DEFAULT_XL_CANDY_YIELD }
|
||||||
@JvmField
|
@JvmField
|
||||||
val CALCIUM = create("calcium", VitaminItem(Stats.SPECIAL_ATTACK))
|
val CALCIUM = create("calcium", VitaminItem(Stats.SPECIAL_ATTACK, CobblemonBlocks.CALCIUM))
|
||||||
@JvmField
|
@JvmField
|
||||||
val CARBOS = create("carbos", VitaminItem(Stats.SPEED))
|
val CARBOS = create("carbos", VitaminItem(Stats.SPEED, CobblemonBlocks.CARBOS))
|
||||||
@JvmField
|
@JvmField
|
||||||
val HP_UP = create("hp_up", VitaminItem(Stats.HP))
|
val HP_UP = create("hp_up", VitaminItem(Stats.HP, CobblemonBlocks.HP_UP))
|
||||||
@JvmField
|
@JvmField
|
||||||
val IRON = create("iron", VitaminItem(Stats.DEFENCE))
|
val IRON = create("iron", VitaminItem(Stats.DEFENCE, CobblemonBlocks.IRON))
|
||||||
@JvmField
|
@JvmField
|
||||||
val PROTEIN = create("protein", VitaminItem(Stats.ATTACK))
|
val PROTEIN = create("protein", VitaminItem(Stats.ATTACK, CobblemonBlocks.PROTEIN))
|
||||||
@JvmField
|
@JvmField
|
||||||
val ZINC = create("zinc", VitaminItem(Stats.SPECIAL_DEFENCE))
|
val ZINC = create("zinc", VitaminItem(Stats.SPECIAL_DEFENCE, CobblemonBlocks.ZINC))
|
||||||
@JvmField
|
@JvmField
|
||||||
val HEALTH_MOCHI = create("health_mochi", MochiItem(Stats.HP))
|
val HEALTH_MOCHI = create("health_mochi", MochiItem(Stats.HP))
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -713,7 +711,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val PEP_UP_FLOWER = compostableBlockItem("pep_up_flower", CobblemonBlocks.PEP_UP_FLOWER)
|
val PEP_UP_FLOWER = compostableBlockItem("pep_up_flower", CobblemonBlocks.PEP_UP_FLOWER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val MEDICINAL_BREW = noSettingsItem("medicinal_brew")
|
val MEDICINAL_BREW = itemNameBlockItem("medicinal_brew", CobblemonBlocks.MEDICINAL_BREW)
|
||||||
@JvmField
|
@JvmField
|
||||||
val REMEDY = compostableItem("remedy", RemedyItem(RemedyItem.NORMAL), 0.65f)
|
val REMEDY = compostableItem("remedy", RemedyItem(RemedyItem.NORMAL), 0.65f)
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -721,7 +719,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val SUPERB_REMEDY = compostableItem("superb_remedy", RemedyItem(RemedyItem.SUPERB), 1f)
|
val SUPERB_REMEDY = compostableItem("superb_remedy", RemedyItem(RemedyItem.SUPERB), 1f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val MOOMOO_MILK = create("moomoo_milk", MoomooMilk(Item.Properties().craftRemainder(Items.GLASS_BOTTLE).stacksTo((16))))
|
val MOOMOO_MILK = create("moomoo_milk", MoomooMilk(Item.Properties().craftRemainder(Items.GLASS_BOTTLE).stacksTo((16)), CobblemonBlocks.MOOMOO_MILK))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val POTION = create("potion", PotionItem(PotionType.POTION, CobblemonBlocks.POTION))
|
val POTION = create("potion", PotionItem(PotionType.POTION, CobblemonBlocks.POTION))
|
||||||
@@ -743,34 +741,34 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val MAX_REVIVE = create("max_revive", ReviveItem(max = true))
|
val MAX_REVIVE = create("max_revive", ReviveItem(max = true))
|
||||||
@JvmField
|
@JvmField
|
||||||
val PP_UP = create("pp_up", PPUpItem(1))
|
val PP_UP = create("pp_up", PPUpItem(1, CobblemonBlocks.PP_UP))
|
||||||
@JvmField
|
@JvmField
|
||||||
val PP_MAX = create("pp_max", PPUpItem(3))
|
val PP_MAX = create("pp_max", PPUpItem(3, CobblemonBlocks.PP_MAX))
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val RED_MINT_SEEDS = mintSeed("red", MintType.RED.getCropBlock())
|
val RED_MINT_SEEDS = mintSeed("red", MintType.RED.getCropBlock())
|
||||||
@JvmField
|
@JvmField
|
||||||
val RED_MINT_LEAF = mintLeaf("red", MintLeafItem(MintType.RED))
|
val RED_MINT_LEAF = compostableItemNameBlockItem("red_mint_leaf", CobblemonBlocks.RED_MINT_LEAF_LITTER, 0.50f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val BLUE_MINT_SEEDS = mintSeed("blue", MintType.BLUE.getCropBlock())
|
val BLUE_MINT_SEEDS = mintSeed("blue", MintType.BLUE.getCropBlock())
|
||||||
@JvmField
|
@JvmField
|
||||||
val BLUE_MINT_LEAF = mintLeaf("blue", MintLeafItem(MintType.BLUE))
|
val BLUE_MINT_LEAF = compostableItemNameBlockItem("blue_mint_leaf", CobblemonBlocks.BLUE_MINT_LEAF_LITTER, 0.50f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val CYAN_MINT_SEEDS = mintSeed("cyan", MintType.CYAN.getCropBlock())
|
val CYAN_MINT_SEEDS = mintSeed("cyan", MintType.CYAN.getCropBlock())
|
||||||
@JvmField
|
@JvmField
|
||||||
val CYAN_MINT_LEAF = mintLeaf("cyan", MintLeafItem(MintType.CYAN))
|
val CYAN_MINT_LEAF = compostableItemNameBlockItem("cyan_mint_leaf", CobblemonBlocks.CYAN_MINT_LEAF_LITTER, 0.50f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val PINK_MINT_SEEDS = mintSeed("pink", MintType.PINK.getCropBlock())
|
val PINK_MINT_SEEDS = mintSeed("pink", MintType.PINK.getCropBlock())
|
||||||
@JvmField
|
@JvmField
|
||||||
val PINK_MINT_LEAF = mintLeaf("pink", MintLeafItem(MintType.PINK))
|
val PINK_MINT_LEAF = compostableItemNameBlockItem("pink_mint_leaf", CobblemonBlocks.PINK_MINT_LEAF_LITTER, 0.50f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val GREEN_MINT_SEEDS = mintSeed("green", MintType.GREEN.getCropBlock())
|
val GREEN_MINT_SEEDS = mintSeed("green", MintType.GREEN.getCropBlock())
|
||||||
@JvmField
|
@JvmField
|
||||||
val GREEN_MINT_LEAF = mintLeaf("green", MintLeafItem(MintType.GREEN))
|
val GREEN_MINT_LEAF = compostableItemNameBlockItem("green_mint_leaf", CobblemonBlocks.GREEN_MINT_LEAF_LITTER, 0.50f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val WHITE_MINT_SEEDS = mintSeed("white", MintType.WHITE.getCropBlock())
|
val WHITE_MINT_SEEDS = mintSeed("white", MintType.WHITE.getCropBlock())
|
||||||
@JvmField
|
@JvmField
|
||||||
val WHITE_MINT_LEAF = mintLeaf("white", MintLeafItem(MintType.WHITE))
|
val WHITE_MINT_LEAF = compostableItemNameBlockItem("white_mint_leaf", CobblemonBlocks.WHITE_MINT_LEAF_LITTER, 0.50f)
|
||||||
|
|
||||||
val mints = mutableMapOf<String, MintItem>()
|
val mints = mutableMapOf<String, MintItem>()
|
||||||
|
|
||||||
@@ -914,10 +912,6 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
val THUNDER_STONE = noSettingsItem("thunder_stone")
|
val THUNDER_STONE = noSettingsItem("thunder_stone")
|
||||||
@JvmField
|
@JvmField
|
||||||
val WATER_STONE = noSettingsItem("water_stone")
|
val WATER_STONE = noSettingsItem("water_stone")
|
||||||
@JvmField
|
|
||||||
val MEGA_SHARD = noSettingsItem("mega_shard")
|
|
||||||
@JvmField
|
|
||||||
val DORMANT_MEGA_STONE = heldItem("dormant_mega_stone")
|
|
||||||
|
|
||||||
val wearables = mutableListOf<WearableItem>()
|
val wearables = mutableListOf<WearableItem>()
|
||||||
//Wearable items (these items should have a corresponding 3D model)
|
//Wearable items (these items should have a corresponding 3D model)
|
||||||
@@ -926,44 +920,31 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField val CHOICE_SPECS = wearableItem("choice_specs")
|
@JvmField val CHOICE_SPECS = wearableItem("choice_specs")
|
||||||
@JvmField val EXP_SHARE = wearableItem("exp_share")
|
@JvmField val EXP_SHARE = wearableItem("exp_share")
|
||||||
@JvmField val FOCUS_BAND = wearableItem("focus_band")
|
@JvmField val FOCUS_BAND = wearableItem("focus_band")
|
||||||
@JvmField val KINGS_ROCK = wearableItem("kings_rock")
|
@JvmField val KINGS_ROCK = wearableBlockItem("kings_rock", CobblemonBlocks.KINGS_ROCK)
|
||||||
|
@JvmField val NEVER_MELT_ICE = wearableBlockItem("never_melt_ice", CobblemonBlocks.NEVER_MELT_ICE)
|
||||||
@JvmField val MUSCLE_BAND = wearableItem("muscle_band")
|
@JvmField val MUSCLE_BAND = wearableItem("muscle_band")
|
||||||
@JvmField val ROCKY_HELMET = wearableItem("rocky_helmet")
|
@JvmField val ROCKY_HELMET = wearableItem("rocky_helmet")
|
||||||
@JvmField val SAFETY_GOGGLES = wearableItem("safety_goggles")
|
@JvmField val SAFETY_GOGGLES = wearableItem("safety_goggles")
|
||||||
@JvmField val WISE_GLASSES = wearableItem("wise_glasses")
|
@JvmField val WISE_GLASSES = wearableItem("wise_glasses")
|
||||||
|
@JvmField val SHARP_BEAK = wearableItem("sharp_beak")
|
||||||
|
@JvmField val COVERT_CLOAK = wearableItem("covert_cloak")
|
||||||
|
@JvmField val SHELL_HELMET = wearableItem("shell_helmet")
|
||||||
|
@JvmField val GALARICA_WREATH = wearableBlockItem("galarica_wreath", CobblemonBlocks.GALARICA_WREATH)
|
||||||
|
@JvmField val CLEANSE_TAG = wearableBlockItem("cleanse_tag", CobblemonBlocks.CLEANSE_TAG)
|
||||||
|
@JvmField val SPELL_TAG = wearableBlockItem("spell_tag", CobblemonBlocks.SPELL_TAG)
|
||||||
|
|
||||||
// Held Items
|
// Held Items
|
||||||
@JvmField
|
@JvmField
|
||||||
val ABILITY_SHIELD = heldItem("ability_shield")
|
val ABILITY_SHIELD = heldItem("ability_shield")
|
||||||
@JvmField
|
@JvmField
|
||||||
val ABOMASITE = heldItem("abomasite")
|
|
||||||
@JvmField
|
|
||||||
val ABSOLITE = heldItem("absolite")
|
|
||||||
@JvmField
|
|
||||||
val ABSORB_BULB = heldItem("absorb_bulb")
|
val ABSORB_BULB = heldItem("absorb_bulb")
|
||||||
@JvmField
|
@JvmField
|
||||||
val AERODACTYLITE = heldItem("aerodactylite")
|
|
||||||
@JvmField
|
|
||||||
val AGGRONITE = heldItem("aggronite")
|
|
||||||
@JvmField
|
|
||||||
val AIR_BALLOON = heldItem("air_balloon")
|
val AIR_BALLOON = heldItem("air_balloon")
|
||||||
@JvmField
|
@JvmField
|
||||||
val ALAKAZITE = heldItem("alakazite")
|
|
||||||
@JvmField
|
|
||||||
val ALTARIANITE = heldItem("altarianite")
|
|
||||||
@JvmField
|
|
||||||
val AMPHAROSITE = heldItem("ampharosite")
|
|
||||||
@JvmField
|
|
||||||
val ASSAULT_VEST = heldItem("assault_vest")
|
val ASSAULT_VEST = heldItem("assault_vest")
|
||||||
@JvmField
|
@JvmField
|
||||||
val BIG_ROOT = compostableBlockItem("big_root", CobblemonBlocks.BIG_ROOT, 0.30f)
|
val BIG_ROOT = compostableBlockItem("big_root", CobblemonBlocks.BIG_ROOT, 0.30f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val AUDINITE = heldItem("audinite")
|
|
||||||
@JvmField
|
|
||||||
val BANETTITE = heldItem("banettite")
|
|
||||||
@JvmField
|
|
||||||
val BEEDRILLITE = heldItem("beedrillite")
|
|
||||||
@JvmField
|
|
||||||
val BINDING_BAND = heldItem("binding_band")
|
val BINDING_BAND = heldItem("binding_band")
|
||||||
@JvmField
|
@JvmField
|
||||||
val BLACK_BELT = heldItem("black_belt")
|
val BLACK_BELT = heldItem("black_belt")
|
||||||
@@ -972,39 +953,23 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val BLUNDER_POLICY = itemNameBlockItem("blunder_policy", CobblemonBlocks.BLUNDER_POLICY)
|
val BLUNDER_POLICY = itemNameBlockItem("blunder_policy", CobblemonBlocks.BLUNDER_POLICY)
|
||||||
@JvmField
|
@JvmField
|
||||||
val BLASTOISINITE = heldItem("blastoisinite")
|
|
||||||
@JvmField
|
|
||||||
val BLAZIKENITE = heldItem("blazikenite")
|
|
||||||
@JvmField
|
|
||||||
val CAMERUPTITE = heldItem("cameruptite")
|
|
||||||
@JvmField
|
|
||||||
val CELL_BATTERY = heldItem("cell_battery")
|
val CELL_BATTERY = heldItem("cell_battery")
|
||||||
@JvmField
|
@JvmField
|
||||||
val CHARCOAL = heldItem("charcoal_stick", remappedName = "charcoal")
|
val CHARCOAL = heldItem("charcoal_stick", remappedName = "charcoal")
|
||||||
@JvmField
|
@JvmField
|
||||||
val CHARIZARDITE_X = heldItem("charizardite_x")
|
|
||||||
@JvmField
|
|
||||||
val CHARIZARDITE_Y = heldItem("charizardite_y")
|
|
||||||
@JvmField
|
|
||||||
val CHOICE_SCARF = heldItem("choice_scarf")
|
val CHOICE_SCARF = heldItem("choice_scarf")
|
||||||
@JvmField
|
@JvmField
|
||||||
val CLEANSE_TAG = itemNameBlockItem("cleanse_tag", CobblemonBlocks.CLEANSE_TAG)
|
|
||||||
@JvmField
|
|
||||||
val CLEAR_AMULET = heldItem("clear_amulet")
|
val CLEAR_AMULET = heldItem("clear_amulet")
|
||||||
@JvmField
|
@JvmField
|
||||||
val COVERT_CLOAK = heldItem("covert_cloak")
|
val DESTINY_KNOT = itemNameBlockItem("destiny_knot", CobblemonBlocks.DESTINY_KNOT)
|
||||||
@JvmField
|
|
||||||
val DESTINY_KNOT = heldItem("destiny_knot")
|
|
||||||
@JvmField
|
|
||||||
val DIANCITE = heldItem("diancite")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val DRAGON_FANG = heldItem("dragon_fang")
|
val DRAGON_FANG = heldItem("dragon_fang")
|
||||||
@JvmField
|
@JvmField
|
||||||
val EJECT_BUTTON = heldItem("eject_button")
|
val EJECT_BUTTON = itemNameBlockItem("eject_button", CobblemonBlocks.EJECT_BUTTON)
|
||||||
@JvmField
|
@JvmField
|
||||||
val EJECT_PACK = heldItem("eject_pack")
|
val EJECT_PACK = heldItem("eject_pack")
|
||||||
@JvmField
|
@JvmField
|
||||||
val ELECTRIC_SEED = heldItem("electric_seed")
|
val ELECTRIC_SEED = itemNameBlockItem("electric_seed", CobblemonBlocks.ELECTRIC_SEED)
|
||||||
@JvmField
|
@JvmField
|
||||||
val EVERSTONE = heldItem("everstone")
|
val EVERSTONE = heldItem("everstone")
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -1014,90 +979,46 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val FAIRY_FEATHER = heldItem("fairy_feather")
|
val FAIRY_FEATHER = heldItem("fairy_feather")
|
||||||
@JvmField
|
@JvmField
|
||||||
val FLAME_ORB = heldItem("flame_orb")
|
val FLAME_ORB = itemNameBlockItem("flame_orb", CobblemonBlocks.FLAME_ORB)
|
||||||
@JvmField
|
@JvmField
|
||||||
val FLOAT_STONE = heldItem("float_stone")
|
val FLOAT_STONE = heldItem("float_stone")
|
||||||
@JvmField
|
@JvmField
|
||||||
val FOCUS_SASH = heldItem("focus_sash")
|
val FOCUS_SASH = heldItem("focus_sash")
|
||||||
@JvmField
|
@JvmField
|
||||||
val GALLADITE = heldItem("galladite")
|
val GRASSY_SEED = itemNameBlockItem("grassy_seed", CobblemonBlocks.GRASSY_SEED)
|
||||||
@JvmField
|
|
||||||
val GARCHOMPITE = heldItem("garchompite")
|
|
||||||
@JvmField
|
|
||||||
val GARDEVOIRITE = heldItem("gardevoirite")
|
|
||||||
@JvmField
|
|
||||||
val GENGARITE = heldItem("gengarite")
|
|
||||||
@JvmField
|
|
||||||
val GLALITITE = heldItem("glalitite")
|
|
||||||
@JvmField
|
|
||||||
val GRASSY_SEED = heldItem("grassy_seed")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val GRIP_CLAW = heldItem("grip_claw")
|
val GRIP_CLAW = heldItem("grip_claw")
|
||||||
@JvmField
|
@JvmField
|
||||||
val GYARADOSITE = heldItem("gyaradosite")
|
|
||||||
@JvmField
|
|
||||||
val HARD_STONE = heldItem("hard_stone")
|
val HARD_STONE = heldItem("hard_stone")
|
||||||
@JvmField
|
@JvmField
|
||||||
val HEAVY_DUTY_BOOTS = heldItem("heavy_duty_boots")
|
val HEAVY_DUTY_BOOTS = heldItem("heavy_duty_boots")
|
||||||
@JvmField
|
@JvmField
|
||||||
val HERACRONITE = heldItem("heracronite")
|
val IRON_BALL = itemNameBlockItem("iron_ball", CobblemonBlocks.IRON_BALL)
|
||||||
@JvmField
|
|
||||||
val HOUNDOOMINITE = heldItem("houndoominite")
|
|
||||||
@JvmField
|
|
||||||
val IRON_BALL = heldItem("iron_ball")
|
|
||||||
@JvmField
|
|
||||||
val KANGASKHANITE = heldItem("kangaskhanite")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val LAGGING_TAIL = heldItem("lagging_tail")
|
val LAGGING_TAIL = heldItem("lagging_tail")
|
||||||
@JvmField
|
@JvmField
|
||||||
val LEFTOVERS = compostableHeldItem("leftovers", null, 0.50f)
|
val LEFTOVERS = compostableHeldItem("leftovers", null, 0.50f)
|
||||||
@JvmField
|
@JvmField
|
||||||
val LATIASITE = heldItem("latiasite")
|
val LIFE_ORB = itemNameBlockItem("life_orb", CobblemonBlocks.LIFE_ORB)
|
||||||
@JvmField
|
@JvmField
|
||||||
val LATIOSITE = heldItem("latiosite")
|
val LIGHT_BALL = itemNameBlockItem("light_ball", CobblemonBlocks.LIGHT_BALL)
|
||||||
@JvmField
|
|
||||||
val LIFE_ORB = heldItem("life_orb")
|
|
||||||
@JvmField
|
|
||||||
val LIGHT_BALL = heldItem("light_ball")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val LIGHT_CLAY = heldItem("light_clay")
|
val LIGHT_CLAY = heldItem("light_clay")
|
||||||
@JvmField
|
@JvmField
|
||||||
val LOADED_DICE = heldItem("loaded_dice")
|
val LOADED_DICE = itemNameBlockItem("loaded_dice", CobblemonBlocks.LOADED_DICE)
|
||||||
@JvmField
|
|
||||||
val LOPUNNITE = heldItem("lopunnite")
|
|
||||||
@JvmField
|
|
||||||
val LUCARIONITE = heldItem("lucarionite")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val LUCKY_EGG = heldItem("lucky_egg")
|
val LUCKY_EGG = heldItem("lucky_egg")
|
||||||
@JvmField
|
@JvmField
|
||||||
val LUMINOUS_MOSS = heldItem("luminous_moss")
|
val LUMINOUS_MOSS = itemNameBlockItem("luminous_moss", CobblemonBlocks.LUMINOUS_MOSS)
|
||||||
@JvmField
|
@JvmField
|
||||||
val MAGNET = heldItem("magnet")
|
val MAGNET = itemNameBlockItem("magnet", CobblemonBlocks.MAGNET)
|
||||||
@JvmField
|
@JvmField
|
||||||
val MANECTITE = heldItem("manectite")
|
val METRONOME = itemNameBlockItem("metronome", CobblemonBlocks.METRONOME)
|
||||||
@JvmField
|
|
||||||
val MAWILITE = heldItem("mawilite")
|
|
||||||
@JvmField
|
|
||||||
val MEDICHAMITE = heldItem("medichamite")
|
|
||||||
@JvmField
|
|
||||||
val METAGROSSITE = heldItem("metagrossite")
|
|
||||||
@JvmField
|
|
||||||
val METRONOME = heldItem("metronome")
|
|
||||||
@JvmField
|
|
||||||
val MEWTWONITE_X = heldItem("mewtwonite_x")
|
|
||||||
@JvmField
|
|
||||||
val MEWTWONITE_Y = heldItem("mewtwonite_y")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val MIRACLE_SEED = heldItem("miracle_seed")
|
val MIRACLE_SEED = heldItem("miracle_seed")
|
||||||
@JvmField
|
@JvmField
|
||||||
val MYSTIC_WATER = heldItem("mystic_water")
|
val MYSTIC_WATER = heldItem("mystic_water")
|
||||||
@JvmField
|
@JvmField
|
||||||
val NEVER_MELT_ICE = heldItem("never_melt_ice")
|
|
||||||
@JvmField
|
|
||||||
val PIDGEOTITE = heldItem("pidgeotite")
|
|
||||||
@JvmField
|
|
||||||
val PINSIRITE = heldItem("pinsirite")
|
|
||||||
@JvmField
|
|
||||||
val POISON_BARB = heldItem("poison_barb")
|
val POISON_BARB = heldItem("poison_barb")
|
||||||
@JvmField
|
@JvmField
|
||||||
val POWER_ANKLET = heldItem("power_anklet")
|
val POWER_ANKLET = heldItem("power_anklet")
|
||||||
@@ -1112,7 +1033,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val POWER_WEIGHT = heldItem("power_weight")
|
val POWER_WEIGHT = heldItem("power_weight")
|
||||||
@JvmField
|
@JvmField
|
||||||
val PSYCHIC_SEED = heldItem("psychic_seed")
|
val PSYCHIC_SEED = itemNameBlockItem("psychic_seed", CobblemonBlocks.PSYCHIC_SEED)
|
||||||
@JvmField
|
@JvmField
|
||||||
val PROTECTIVE_PADS = heldItem("protective_pads")
|
val PROTECTIVE_PADS = heldItem("protective_pads")
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -1122,23 +1043,11 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val RED_CARD = heldItem("red_card")
|
val RED_CARD = heldItem("red_card")
|
||||||
@JvmField
|
@JvmField
|
||||||
val RING_TARGET = heldItem("ring_target")
|
val RING_TARGET = itemNameBlockItem("ring_target", CobblemonBlocks.RING_TARGET)
|
||||||
@JvmField
|
@JvmField
|
||||||
val ROOM_SERVICE = heldItem("room_service")
|
val ROOM_SERVICE = heldItem("room_service")
|
||||||
@JvmField
|
@JvmField
|
||||||
val SABLENITE = heldItem("sablenite")
|
val SCOPE_LENS = itemNameBlockItem("scope_lens", CobblemonBlocks.SCOPE_LENS)
|
||||||
@JvmField
|
|
||||||
val SALAMENCITE = heldItem("salamencite")
|
|
||||||
@JvmField
|
|
||||||
val SCEPTILITE = heldItem("sceptilite")
|
|
||||||
@JvmField
|
|
||||||
val SCIZORITE = heldItem("scizorite")
|
|
||||||
@JvmField
|
|
||||||
val SCOPE_LENS = heldItem("scope_lens")
|
|
||||||
@JvmField
|
|
||||||
val SHARP_BEAK = heldItem("sharp_beak")
|
|
||||||
@JvmField
|
|
||||||
val SHARPEDONITE = heldItem("sharpedonite")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val SHED_SHELL = heldItem("shed_shell")
|
val SHED_SHELL = heldItem("shed_shell")
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -1148,65 +1057,53 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
@JvmField
|
@JvmField
|
||||||
val SILVER_POWDER = heldItem("silver_powder")
|
val SILVER_POWDER = heldItem("silver_powder")
|
||||||
@JvmField
|
@JvmField
|
||||||
val SLOWBRONITE = heldItem("slowbronite")
|
val SOFT_SAND = itemNameBlockItem("soft_sand", CobblemonBlocks.SOFT_SAND)
|
||||||
@JvmField
|
@JvmField
|
||||||
val SOFT_SAND = heldItem("soft_sand")
|
val SMOKE_BALL = itemNameBlockItem("smoke_ball", CobblemonBlocks.SMOKE_BALL)
|
||||||
@JvmField
|
|
||||||
val SPELL_TAG = itemNameBlockItem("spell_tag", CobblemonBlocks.SPELL_TAG)
|
|
||||||
@JvmField
|
|
||||||
val SMOKE_BALL = heldItem("smoke_ball")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val SOOTHE_BELL = heldItem("soothe_bell")
|
val SOOTHE_BELL = heldItem("soothe_bell")
|
||||||
@JvmField
|
@JvmField
|
||||||
val STEELIXITE = heldItem("steelixite")
|
|
||||||
@JvmField
|
|
||||||
val STICKY_BARB = heldItem("sticky_barb")
|
val STICKY_BARB = heldItem("sticky_barb")
|
||||||
@JvmField
|
@JvmField
|
||||||
val SWAMPERTITE = heldItem("swampertite")
|
val TERRAIN_EXTENDER = itemNameBlockItem("terrain_extender", CobblemonBlocks.TERRAIN_EXTENDER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val TERRAIN_EXTENDER = heldItem("terrain_extender")
|
val THROAT_SPRAY = itemNameBlockItem("throat_spray", CobblemonBlocks.THROAT_SPRAY)
|
||||||
@JvmField
|
@JvmField
|
||||||
val THROAT_SPRAY = heldItem("throat_spray")
|
val TOXIC_ORB = itemNameBlockItem("toxic_orb", CobblemonBlocks.TOXIC_ORB)
|
||||||
@JvmField
|
|
||||||
val TOXIC_ORB = heldItem("toxic_orb")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val TWISTED_SPOON = heldItem("twisted_spoon")
|
val TWISTED_SPOON = heldItem("twisted_spoon")
|
||||||
@JvmField
|
@JvmField
|
||||||
val TYRANITARITE = heldItem("tyranitarite")
|
|
||||||
@JvmField
|
|
||||||
val UTILITY_UMBRELLA = heldItem("utility_umbrella")
|
val UTILITY_UMBRELLA = heldItem("utility_umbrella")
|
||||||
@JvmField
|
@JvmField
|
||||||
val WEAKNESS_POLICY = itemNameBlockItem("weakness_policy", CobblemonBlocks.WEAKNESS_POLICY)
|
val WEAKNESS_POLICY = itemNameBlockItem("weakness_policy", CobblemonBlocks.WEAKNESS_POLICY)
|
||||||
@JvmField
|
@JvmField
|
||||||
val VENUSAURITE = heldItem("venusaurite")
|
val WIDE_LENS = itemNameBlockItem("wide_lens", CobblemonBlocks.WIDE_LENS)
|
||||||
@JvmField
|
@JvmField
|
||||||
val WIDE_LENS = heldItem("wide_lens")
|
val ZOOM_LENS = itemNameBlockItem("zoom_lens", CobblemonBlocks.ZOOM_LENS)
|
||||||
@JvmField
|
|
||||||
val ZOOM_LENS = heldItem("zoom_lens")
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val MENTAL_HERB = compostableHeldItem("mental_herb", null, 0.85F)
|
val MENTAL_HERB = compostableHeldItem("mental_herb", null, 0.85F)
|
||||||
@JvmField
|
@JvmField
|
||||||
val MIRROR_HERB = compostableHeldItem("mirror_herb", null, 0.85F)
|
val MIRROR_HERB = compostableHeldItem("mirror_herb", null, 0.85F)
|
||||||
@JvmField
|
@JvmField
|
||||||
val MISTY_SEED = heldItem("misty_seed")
|
val MISTY_SEED = itemNameBlockItem("misty_seed", CobblemonBlocks.MISTY_SEED)
|
||||||
@JvmField
|
@JvmField
|
||||||
val POWER_HERB = compostableHeldItem("power_herb", null, 0.85F)
|
val POWER_HERB = compostableHeldItem("power_herb", null, 0.85F)
|
||||||
@JvmField
|
@JvmField
|
||||||
val WHITE_HERB = compostableHeldItem("white_herb", null, 0.85F)
|
val WHITE_HERB = compostableHeldItem("white_herb", null, 0.85F)
|
||||||
@JvmField
|
@JvmField
|
||||||
val BRIGHT_POWDER = heldItem("bright_powder")
|
val BRIGHT_POWDER = glowItem("bright_powder", CobblemonBlocks.BRIGHT_POWDER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val METAL_POWDER = heldItem("metal_powder")
|
val METAL_POWDER = itemNameBlockItem("metal_powder", CobblemonBlocks.METAL_POWDER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val QUICK_POWDER = heldItem("quick_powder")
|
val QUICK_POWDER = itemNameBlockItem("quick_powder", CobblemonBlocks.QUICK_POWDER)
|
||||||
@JvmField
|
@JvmField
|
||||||
val DAMP_ROCK = heldItem("damp_rock")
|
val DAMP_ROCK = itemNameBlockItem("damp_rock", CobblemonBlocks.DAMP_ROCK)
|
||||||
@JvmField
|
@JvmField
|
||||||
val HEAT_ROCK = heldItem("heat_rock")
|
val HEAT_ROCK = itemNameBlockItem("heat_rock", CobblemonBlocks.HEAT_ROCK)
|
||||||
@JvmField
|
@JvmField
|
||||||
val SMOOTH_ROCK = heldItem("smooth_rock")
|
val SMOOTH_ROCK = itemNameBlockItem("smooth_rock", CobblemonBlocks.SMOOTH_ROCK)
|
||||||
@JvmField
|
@JvmField
|
||||||
val ICY_ROCK = heldItem("icy_rock")
|
val ICY_ROCK = itemNameBlockItem("icy_rock", CobblemonBlocks.ICY_ROCK)
|
||||||
|
|
||||||
// Mulch
|
// Mulch
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -1661,6 +1558,25 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
//@JvmField
|
//@JvmField
|
||||||
//val BINDING_SOIL = blockItem("binding_soil", CobblemonBlocks.BINDING_SOIL)
|
//val BINDING_SOIL = blockItem("binding_soil", CobblemonBlocks.BINDING_SOIL)
|
||||||
|
|
||||||
|
// Plants, Flora, and Flowers
|
||||||
|
@JvmField
|
||||||
|
val LOBAILA = compostableBlockItem("lobaila", CobblemonBlocks.LOBAILA, 0.65f)
|
||||||
|
@JvmField
|
||||||
|
val POMOHANA = compostableBlockItem("pomohana", CobblemonBlocks.POMOHANA, 0.3f)
|
||||||
|
@JvmField
|
||||||
|
val PAUVILLEA = compostableBlockItem("pauvillea", CobblemonBlocks.PAUVILLEA, 0.65f)
|
||||||
|
@JvmField
|
||||||
|
val WISTENSU = compostableBlockItem("wistensu", CobblemonBlocks.WISTENSU, 0.5f)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val VOLTACONIA = compostableBlockItem("voltaconia", CobblemonBlocks.VOLTACONIA, 0.85f)
|
||||||
|
@JvmField
|
||||||
|
val VERDROOT = compostableBlockItem("verdroot", CobblemonBlocks.VERDROOT, 0.85f)
|
||||||
|
@JvmField
|
||||||
|
val MISTLEAF = compostableBlockItem("mistleaf", CobblemonBlocks.MISTLEAF, 0.85f)
|
||||||
|
@JvmField
|
||||||
|
val LUCIBELL = compostableBlockItem("lucibell", CobblemonBlocks.LUCIBELL, 0.85f)
|
||||||
|
|
||||||
private fun blockItem(name: String, block: Block, rarity: Rarity = Rarity.COMMON): BlockItem = this.create(name, BlockItem(block, Item.Properties().rarity(rarity)))
|
private fun blockItem(name: String, block: Block, rarity: Rarity = Rarity.COMMON): BlockItem = this.create(name, BlockItem(block, Item.Properties().rarity(rarity)))
|
||||||
|
|
||||||
private fun itemNameBlockItem(name: String, block: Block, rarity: Rarity = Rarity.COMMON): ItemNameBlockItem = this.create(name, ItemNameBlockItem(block, Item.Properties().rarity(rarity)))
|
private fun itemNameBlockItem(name: String, block: Block, rarity: Rarity = Rarity.COMMON): ItemNameBlockItem = this.create(name, ItemNameBlockItem(block, Item.Properties().rarity(rarity)))
|
||||||
@@ -1697,7 +1613,16 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
|
|
||||||
private fun wearableItem(name: String, heldItemRemappedName: String? = null): CobblemonItem = create(
|
private fun wearableItem(name: String, heldItemRemappedName: String? = null): CobblemonItem = create(
|
||||||
name,
|
name,
|
||||||
WearableItem(name).also {
|
WearableHatItem(name).also {
|
||||||
|
wearables.add(it)
|
||||||
|
if (heldItemRemappedName != null) {
|
||||||
|
CobblemonHeldItemManager.registerRemap(it, heldItemRemappedName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
private fun wearableBlockItem(name: String, block: Block, heldItemRemappedName: String? = null): WearableBlockItem = create(
|
||||||
|
name,
|
||||||
|
WearableBlockItem(name, block).also {
|
||||||
wearables.add(it)
|
wearables.add(it)
|
||||||
if (heldItemRemappedName != null) {
|
if (heldItemRemappedName != null) {
|
||||||
CobblemonHeldItemManager.registerRemap(it, heldItemRemappedName)
|
CobblemonHeldItemManager.registerRemap(it, heldItemRemappedName)
|
||||||
@@ -1854,4 +1779,6 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
|||||||
private fun foodItem(nutrition: Int, saturationModifier: Float): Item {
|
private fun foodItem(nutrition: Int, saturationModifier: Float): Item {
|
||||||
return CobblemonItem(Item.Properties().food(FoodProperties.Builder().nutrition(nutrition).saturationModifier(saturationModifier).build()))
|
return CobblemonItem(Item.Properties().food(FoodProperties.Builder().nutrition(nutrition).saturationModifier(saturationModifier).build()))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private fun glowItem(name: String, block: Block): GlowItem = this.create(name, GlowItem(block, Item.Properties()))
|
||||||
|
}
|
||||||
@@ -15,12 +15,12 @@ import com.cobblemon.mod.common.api.moves.animations.ActionEffectContext
|
|||||||
import com.mojang.serialization.Codec
|
import com.mojang.serialization.Codec
|
||||||
import com.mojang.serialization.codecs.ListCodec
|
import com.mojang.serialization.codecs.ListCodec
|
||||||
import com.mojang.serialization.codecs.PrimitiveCodec
|
import com.mojang.serialization.codecs.PrimitiveCodec
|
||||||
import java.util.Optional
|
|
||||||
import java.util.UUID
|
|
||||||
import net.minecraft.core.BlockPos
|
import net.minecraft.core.BlockPos
|
||||||
|
import net.minecraft.core.GlobalPos
|
||||||
import net.minecraft.core.UUIDUtil
|
import net.minecraft.core.UUIDUtil
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.ai.memory.MemoryModuleType
|
import net.minecraft.world.entity.ai.memory.MemoryModuleType
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
object CobblemonMemories {
|
object CobblemonMemories {
|
||||||
val memories = mutableMapOf<String, MemoryModuleType<*>>()
|
val memories = mutableMapOf<String, MemoryModuleType<*>>()
|
||||||
|
|||||||
@@ -107,14 +107,10 @@ import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.Add
|
|||||||
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.ClearEvolutionsPacket
|
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.ClearEvolutionsPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.ClientboundSeatAssignmentPacket
|
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.ClientboundSeatAssignmentPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.RemoveEvolutionPacket
|
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.RemoveEvolutionPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.pokemon.update.form.AddFormPacket
|
|
||||||
import com.cobblemon.mod.common.net.messages.client.pokemon.update.form.ClearFormsPacket
|
|
||||||
import com.cobblemon.mod.common.net.messages.client.pokemon.update.form.RemoveFormPacket
|
|
||||||
import com.cobblemon.mod.common.net.messages.client.settings.OpenCobblemonConfigScreenPacket
|
import com.cobblemon.mod.common.net.messages.client.settings.OpenCobblemonConfigScreenPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.settings.ServerSettingsPacket
|
import com.cobblemon.mod.common.net.messages.client.settings.ServerSettingsPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.sound.UnvalidatedPlaySoundS2CPacket
|
import com.cobblemon.mod.common.net.messages.client.sound.UnvalidatedPlaySoundS2CPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnGenericBedrockPacket
|
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnGenericBedrockPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnFallingStarPacket
|
|
||||||
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnNPCPacket
|
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnNPCPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnPokeballPacket
|
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnPokeballPacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnPokemonPacket
|
import com.cobblemon.mod.common.net.messages.client.spawn.SpawnPokemonPacket
|
||||||
@@ -198,8 +194,6 @@ import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetItemHidden
|
|||||||
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetMarkingsPacket
|
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetMarkingsPacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetNicknamePacket
|
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetNicknamePacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.pokemon.update.evolution.AcceptEvolutionPacket
|
import com.cobblemon.mod.common.net.messages.server.pokemon.update.evolution.AcceptEvolutionPacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.pokemon.update.form.AcceptFormPacket
|
|
||||||
import com.cobblemon.mod.common.net.messages.server.pokemon.update.form.RevertFormPacket
|
|
||||||
import com.cobblemon.mod.common.net.messages.server.riding.DismountPokemonPacket
|
import com.cobblemon.mod.common.net.messages.server.riding.DismountPokemonPacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdateDriverInputPacket
|
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdateDriverInputPacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdatePassengerPositionPacket
|
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdatePassengerPositionPacket
|
||||||
@@ -217,11 +211,9 @@ import com.cobblemon.mod.common.net.messages.server.trade.ChangeTradeAcceptanceP
|
|||||||
import com.cobblemon.mod.common.net.messages.server.trade.OfferTradePacket
|
import com.cobblemon.mod.common.net.messages.server.trade.OfferTradePacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.trade.PerformTradePacket
|
import com.cobblemon.mod.common.net.messages.server.trade.PerformTradePacket
|
||||||
import com.cobblemon.mod.common.net.messages.server.trade.UpdateTradeOfferPacket
|
import com.cobblemon.mod.common.net.messages.server.trade.UpdateTradeOfferPacket
|
||||||
import com.cobblemon.mod.common.net.serverhandling.AcceptFormHandler
|
|
||||||
import com.cobblemon.mod.common.net.serverhandling.ChallengeHandler
|
import com.cobblemon.mod.common.net.serverhandling.ChallengeHandler
|
||||||
import com.cobblemon.mod.common.net.serverhandling.ChallengeResponseHandler
|
import com.cobblemon.mod.common.net.serverhandling.ChallengeResponseHandler
|
||||||
import com.cobblemon.mod.common.net.serverhandling.RequestInteractionsHandler
|
import com.cobblemon.mod.common.net.serverhandling.RequestInteractionsHandler
|
||||||
import com.cobblemon.mod.common.net.serverhandling.RevertFormHandler
|
|
||||||
import com.cobblemon.mod.common.net.serverhandling.battle.BattleSelectActionsHandler
|
import com.cobblemon.mod.common.net.serverhandling.battle.BattleSelectActionsHandler
|
||||||
import com.cobblemon.mod.common.net.serverhandling.battle.RemoveSpectatorHandler
|
import com.cobblemon.mod.common.net.serverhandling.battle.RemoveSpectatorHandler
|
||||||
import com.cobblemon.mod.common.net.serverhandling.battle.SpectateBattleHandler
|
import com.cobblemon.mod.common.net.serverhandling.battle.SpectateBattleHandler
|
||||||
@@ -433,6 +425,7 @@ object CobblemonNetwork {
|
|||||||
list.add(PacketRegisterInfo(MovesRegistrySyncPacket.ID, MovesRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
list.add(PacketRegisterInfo(MovesRegistrySyncPacket.ID, MovesRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
list.add(PacketRegisterInfo(BerryRegistrySyncPacket.ID, BerryRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
list.add(PacketRegisterInfo(BerryRegistrySyncPacket.ID, BerryRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
list.add(PacketRegisterInfo(SpeciesRegistrySyncPacket.ID, SpeciesRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
list.add(PacketRegisterInfo(SpeciesRegistrySyncPacket.ID, SpeciesRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
|
list.add(PacketRegisterInfo(DexEvolutionDisplaySyncPacket.ID, DexEvolutionDisplaySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
list.add(PacketRegisterInfo(PropertiesCompletionRegistrySyncPacket.ID, PropertiesCompletionRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
list.add(PacketRegisterInfo(PropertiesCompletionRegistrySyncPacket.ID, PropertiesCompletionRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
list.add(PacketRegisterInfo(StandardSpeciesFeatureSyncPacket.ID, StandardSpeciesFeatureSyncPacket::decode, DataRegistrySyncPacketHandler()))
|
list.add(PacketRegisterInfo(StandardSpeciesFeatureSyncPacket.ID, StandardSpeciesFeatureSyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
list.add(PacketRegisterInfo(GlobalSpeciesFeatureSyncPacket.ID, GlobalSpeciesFeatureSyncPacket::decode, DataRegistrySyncPacketHandler()))
|
list.add(PacketRegisterInfo(GlobalSpeciesFeatureSyncPacket.ID, GlobalSpeciesFeatureSyncPacket::decode, DataRegistrySyncPacketHandler()))
|
||||||
@@ -465,7 +458,6 @@ object CobblemonNetwork {
|
|||||||
list.add(PacketRegisterInfo(SpawnPokemonPacket.ID, SpawnPokemonPacket::decode, SpawnExtraDataEntityHandler()))
|
list.add(PacketRegisterInfo(SpawnPokemonPacket.ID, SpawnPokemonPacket::decode, SpawnExtraDataEntityHandler()))
|
||||||
list.add(PacketRegisterInfo(SpawnPokeballPacket.ID, SpawnPokeballPacket::decode, SpawnExtraDataEntityHandler()))
|
list.add(PacketRegisterInfo(SpawnPokeballPacket.ID, SpawnPokeballPacket::decode, SpawnExtraDataEntityHandler()))
|
||||||
list.add(PacketRegisterInfo(SpawnGenericBedrockPacket.ID, SpawnGenericBedrockPacket::decode, SpawnExtraDataEntityHandler()))
|
list.add(PacketRegisterInfo(SpawnGenericBedrockPacket.ID, SpawnGenericBedrockPacket::decode, SpawnExtraDataEntityHandler()))
|
||||||
list.add(PacketRegisterInfo(SpawnFallingStarPacket.ID, SpawnFallingStarPacket::decode, SpawnExtraDataEntityHandler()))
|
|
||||||
list.add(PacketRegisterInfo(SpawnNPCPacket.ID, SpawnNPCPacket::decode, SpawnExtraDataEntityHandler()))
|
list.add(PacketRegisterInfo(SpawnNPCPacket.ID, SpawnNPCPacket::decode, SpawnExtraDataEntityHandler()))
|
||||||
list.add(PacketRegisterInfo(ToastPacket.ID, ToastPacket::decode, ToastPacketHandler))
|
list.add(PacketRegisterInfo(ToastPacket.ID, ToastPacket::decode, ToastPacketHandler))
|
||||||
|
|
||||||
@@ -515,11 +507,6 @@ object CobblemonNetwork {
|
|||||||
// Pokédex scanning
|
// Pokédex scanning
|
||||||
list.add(PacketRegisterInfo(ServerConfirmedRegisterPacket.ID, ServerConfirmedRegisterPacket::decode, ServerConfirmedRegisterHandler))
|
list.add(PacketRegisterInfo(ServerConfirmedRegisterPacket.ID, ServerConfirmedRegisterPacket::decode, ServerConfirmedRegisterHandler))
|
||||||
|
|
||||||
// Form packets
|
|
||||||
list.add(PacketRegisterInfo(AddFormPacket.ID, AddFormPacket::decode, PokemonUpdatePacketHandler()))
|
|
||||||
list.add(PacketRegisterInfo(ClearFormsPacket.ID, ClearFormsPacket::decode, PokemonUpdatePacketHandler()))
|
|
||||||
list.add(PacketRegisterInfo(RemoveFormPacket.ID, RemoveFormPacket::decode, PokemonUpdatePacketHandler()))
|
|
||||||
|
|
||||||
// Riding
|
// Riding
|
||||||
list.add(PacketRegisterInfo(ClientboundUpdateRidingStatePacket.ID, ClientboundUpdateRidingStatePacket::decode, ClientboundUpdateRidingStateHandler))
|
list.add(PacketRegisterInfo(ClientboundUpdateRidingStatePacket.ID, ClientboundUpdateRidingStatePacket::decode, ClientboundUpdateRidingStateHandler))
|
||||||
list.add(PacketRegisterInfo(ClientboundUpdateDriverInputPacket.ID, ClientboundUpdateDriverInputPacket::decode, ClientboundUpdateDriverInputHandler))
|
list.add(PacketRegisterInfo(ClientboundUpdateDriverInputPacket.ID, ClientboundUpdateDriverInputPacket::decode, ClientboundUpdateDriverInputHandler))
|
||||||
@@ -635,10 +622,6 @@ object CobblemonNetwork {
|
|||||||
// NPC packets
|
// NPC packets
|
||||||
list.add(PacketRegisterInfo(SaveNPCPacket.ID, SaveNPCPacket::decode, SaveNPCHandler))
|
list.add(PacketRegisterInfo(SaveNPCPacket.ID, SaveNPCPacket::decode, SaveNPCHandler))
|
||||||
|
|
||||||
// Form Packets
|
|
||||||
list.add(PacketRegisterInfo(AcceptFormPacket.ID, AcceptFormPacket::decode, AcceptFormHandler))
|
|
||||||
list.add(PacketRegisterInfo(RevertFormPacket.ID, RevertFormPacket::decode, RevertFormHandler))
|
|
||||||
|
|
||||||
// Riding packet(s)
|
// Riding packet(s)
|
||||||
list.add(PacketRegisterInfo(ServerboundUpdateOrientationPacket.ID, ServerboundUpdateOrientationPacket::decode, ServerboundUpdateOrientationHandler))
|
list.add(PacketRegisterInfo(ServerboundUpdateOrientationPacket.ID, ServerboundUpdateOrientationPacket::decode, ServerboundUpdateOrientationHandler))
|
||||||
list.add(PacketRegisterInfo(ServerboundUpdateRidingStatePacket.ID, ServerboundUpdateRidingStatePacket::decode, ServerboundUpdateRidingStateHandler))
|
list.add(PacketRegisterInfo(ServerboundUpdateRidingStatePacket.ID, ServerboundUpdateRidingStatePacket::decode, ServerboundUpdateRidingStateHandler))
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
package com.cobblemon.mod.common
|
package com.cobblemon.mod.common
|
||||||
|
|
||||||
import com.cobblemon.mod.common.entity.pokemon.ai.sensors.*
|
import com.cobblemon.mod.common.entity.pokemon.ai.sensors.*
|
||||||
|
import com.cobblemon.mod.common.pokemon.ai.PokemonDisturbancesSensor
|
||||||
import com.cobblemon.mod.common.entity.sensor.BattlingPokemonSensor
|
import com.cobblemon.mod.common.entity.sensor.BattlingPokemonSensor
|
||||||
import com.cobblemon.mod.common.entity.sensor.NPCBattlingSensor
|
import com.cobblemon.mod.common.entity.sensor.NPCBattlingSensor
|
||||||
import com.cobblemon.mod.common.pokemon.ai.PokemonDisturbancesSensor
|
|
||||||
import java.util.function.Supplier
|
import java.util.function.Supplier
|
||||||
import net.minecraft.world.entity.Entity
|
import net.minecraft.world.entity.Entity
|
||||||
import net.minecraft.world.entity.ai.sensing.Sensor
|
import net.minecraft.world.entity.ai.sensing.Sensor
|
||||||
|
|||||||
@@ -148,6 +148,9 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
|
|||||||
@JvmField
|
@JvmField
|
||||||
val MONITOR_GLITCHING = this.create("block.monitor.glitching")
|
val MONITOR_GLITCHING = this.create("block.monitor.glitching")
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val BRIGHT_POWDER_USE = this.create("block.bright_powder.use")
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val FOSSIL_MACHINE_ACTIVATE = this.create("block.fossil_machine.activate")
|
val FOSSIL_MACHINE_ACTIVATE = this.create("block.fossil_machine.activate")
|
||||||
@JvmField
|
@JvmField
|
||||||
@@ -657,5 +660,95 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
|
|||||||
SoundEvents.WOOL_FALL
|
SoundEvents.WOOL_FALL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_POWDER_PLACE = this.create("block.item_block.powder.place")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_POWDER_BREAK = this.create("block.item_block.powder.break")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_POWDER_STEP = this.create("block.item_block.powder.step")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_POWDER_SOUNDS = SoundType(1f, 1.1f,
|
||||||
|
ITEM_BLOCK_POWDER_BREAK,
|
||||||
|
ITEM_BLOCK_POWDER_STEP,
|
||||||
|
ITEM_BLOCK_POWDER_PLACE,
|
||||||
|
ITEM_BLOCK_POWDER_STEP,
|
||||||
|
ITEM_BLOCK_POWDER_STEP
|
||||||
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_LIQUID_PLACE = this.create("block.item_block.bottle_liquid.place")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_LIQUID_BREAK = this.create("block.item_block.bottle_liquid.break")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_LIQUID_STEP = this.create("block.item_block.bottle_liquid.step")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_LIQUID_SOUNDS = SoundType(1f, 1.1f,
|
||||||
|
ITEM_BLOCK_BOTTLE_LIQUID_BREAK,
|
||||||
|
ITEM_BLOCK_BOTTLE_LIQUID_STEP,
|
||||||
|
ITEM_BLOCK_BOTTLE_LIQUID_PLACE,
|
||||||
|
ITEM_BLOCK_BOTTLE_LIQUID_PLACE,
|
||||||
|
ITEM_BLOCK_BOTTLE_LIQUID_PLACE
|
||||||
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_PILLS_PLACE = this.create("block.item_block.bottle_pills.place")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_PILLS_BREAK = this.create("block.item_block.bottle_pills.break")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_PILLS_STEP = this.create("block.item_block.bottle_pills.step")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_BOTTLE_PILLS_SOUNDS = SoundType(1f, 1.1f,
|
||||||
|
ITEM_BLOCK_BOTTLE_PILLS_BREAK,
|
||||||
|
ITEM_BLOCK_BOTTLE_PILLS_STEP,
|
||||||
|
ITEM_BLOCK_BOTTLE_PILLS_PLACE,
|
||||||
|
ITEM_BLOCK_BOTTLE_PILLS_PLACE,
|
||||||
|
ITEM_BLOCK_BOTTLE_PILLS_PLACE
|
||||||
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_DICE_PLACE = this.create("block.item_block.dice.place")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_DICE_BREAK = this.create("block.item_block.dice.break")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_DICE_STEP = this.create("block.item_block.dice.step")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_DICE_SOUNDS = SoundType(1f, 1.1f,
|
||||||
|
ITEM_BLOCK_DICE_BREAK,
|
||||||
|
ITEM_BLOCK_DICE_STEP,
|
||||||
|
ITEM_BLOCK_DICE_PLACE,
|
||||||
|
ITEM_BLOCK_DICE_STEP,
|
||||||
|
ITEM_BLOCK_DICE_STEP
|
||||||
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_METAL_CAN_PLACE = this.create("block.item_block.metal_can.place")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_METAL_CAN_BREAK = this.create("block.item_block.metal_can.break")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_METAL_CAN_STEP = this.create("block.item_block.metal_can.step")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_METAL_CAN_SOUNDS = SoundType(1f, 1.1f,
|
||||||
|
ITEM_BLOCK_METAL_CAN_BREAK,
|
||||||
|
ITEM_BLOCK_METAL_CAN_STEP,
|
||||||
|
ITEM_BLOCK_METAL_CAN_PLACE,
|
||||||
|
ITEM_BLOCK_METAL_CAN_STEP,
|
||||||
|
ITEM_BLOCK_METAL_CAN_STEP
|
||||||
|
)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_JAR_GLASS_LIQUID_PLACE = this.create("block.item_block.jar_glass_liquid.place")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_JAR_GLASS_LIQUID_BREAK = this.create("block.item_block.jar_glass_liquid.break")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_JAR_GLASS_LIQUID_STEP = this.create("block.item_block.jar_glass_liquid.step")
|
||||||
|
@JvmField
|
||||||
|
val ITEM_BLOCK_JAR_GLASS_LIQUID_SOUNDS = SoundType(1f, 1.1f,
|
||||||
|
ITEM_BLOCK_JAR_GLASS_LIQUID_BREAK,
|
||||||
|
ITEM_BLOCK_JAR_GLASS_LIQUID_STEP,
|
||||||
|
ITEM_BLOCK_JAR_GLASS_LIQUID_PLACE,
|
||||||
|
ITEM_BLOCK_JAR_GLASS_LIQUID_STEP,
|
||||||
|
ITEM_BLOCK_JAR_GLASS_LIQUID_STEP
|
||||||
|
)
|
||||||
|
|
||||||
private fun create(name: String): SoundEvent = this.create(name, SoundEvent.createVariableRangeEvent(cobblemonResource(name)))
|
private fun create(name: String): SoundEvent = this.create(name, SoundEvent.createVariableRangeEvent(cobblemonResource(name)))
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common
|
package com.cobblemon.mod.common
|
||||||
|
|
||||||
import java.util.Optional
|
|
||||||
import net.minecraft.core.registries.BuiltInRegistries
|
import net.minecraft.core.registries.BuiltInRegistries
|
||||||
import net.minecraft.util.RandomSource
|
import net.minecraft.util.RandomSource
|
||||||
import net.minecraft.world.entity.Entity
|
import net.minecraft.world.entity.Entity
|
||||||
@@ -19,6 +18,7 @@ import net.minecraft.world.item.ItemStack
|
|||||||
import net.minecraft.world.item.Items
|
import net.minecraft.world.item.Items
|
||||||
import net.minecraft.world.item.trading.ItemCost
|
import net.minecraft.world.item.trading.ItemCost
|
||||||
import net.minecraft.world.item.trading.MerchantOffer
|
import net.minecraft.world.item.trading.MerchantOffer
|
||||||
|
import java.util.Optional
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generator for various trade offers in the mod.
|
* A generator for various trade offers in the mod.
|
||||||
|
|||||||
+1
-1
@@ -11,10 +11,10 @@ package com.cobblemon.mod.common.advancement.criterion
|
|||||||
import com.cobblemon.mod.common.util.cobblemonResource
|
import com.cobblemon.mod.common.util.cobblemonResource
|
||||||
import com.mojang.serialization.Codec
|
import com.mojang.serialization.Codec
|
||||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||||
import java.util.Optional
|
|
||||||
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
||||||
import net.minecraft.resources.ResourceLocation
|
import net.minecraft.resources.ResourceLocation
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
import java.util.Optional
|
||||||
|
|
||||||
class AspectCriterion(
|
class AspectCriterion(
|
||||||
playerCtx: Optional<ContextAwarePredicate>,
|
playerCtx: Optional<ContextAwarePredicate>,
|
||||||
|
|||||||
+1
-1
@@ -14,8 +14,8 @@ import com.mojang.serialization.codecs.RecordCodecBuilder
|
|||||||
import java.util.Optional
|
import java.util.Optional
|
||||||
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
||||||
import net.minecraft.advancements.critereon.EntityPredicate
|
import net.minecraft.advancements.critereon.EntityPredicate
|
||||||
import net.minecraft.resources.ResourceLocation
|
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
import net.minecraft.resources.ResourceLocation
|
||||||
|
|
||||||
class CastPokeRodContext(val baitId: ResourceLocation)
|
class CastPokeRodContext(val baitId: ResourceLocation)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,10 +10,10 @@ package com.cobblemon.mod.common.advancement.criterion
|
|||||||
|
|
||||||
import com.mojang.serialization.Codec
|
import com.mojang.serialization.Codec
|
||||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||||
import java.util.Optional
|
|
||||||
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
||||||
import net.minecraft.advancements.critereon.EntityPredicate
|
import net.minecraft.advancements.critereon.EntityPredicate
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
import java.util.Optional
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A context that is used when you require a [CountableContext] along with some type string.
|
* A context that is used when you require a [CountableContext] along with some type string.
|
||||||
|
|||||||
+1
-1
@@ -14,8 +14,8 @@ import com.mojang.serialization.codecs.RecordCodecBuilder
|
|||||||
import java.util.Optional
|
import java.util.Optional
|
||||||
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
import net.minecraft.advancements.critereon.ContextAwarePredicate
|
||||||
import net.minecraft.advancements.critereon.EntityPredicate
|
import net.minecraft.advancements.critereon.EntityPredicate
|
||||||
import net.minecraft.resources.ResourceLocation
|
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
import net.minecraft.resources.ResourceLocation
|
||||||
|
|
||||||
class ReelInPokemonContext(val species : ResourceLocation, val baitId: ResourceLocation)
|
class ReelInPokemonContext(val species : ResourceLocation, val baitId: ResourceLocation)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
package com.cobblemon.mod.common.api.abilities
|
package com.cobblemon.mod.common.api.abilities
|
||||||
|
|
||||||
import com.cobblemon.mod.common.api.Priority
|
import com.cobblemon.mod.common.api.Priority
|
||||||
import com.cobblemon.mod.common.api.data.ShowdownIdentifiable
|
|
||||||
import com.cobblemon.mod.common.util.codec.CodecUtils
|
import com.cobblemon.mod.common.util.codec.CodecUtils
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.mojang.serialization.Codec
|
import com.mojang.serialization.Codec
|
||||||
@@ -26,7 +25,7 @@ class AbilityTemplate(
|
|||||||
var builder: (AbilityTemplate, forced: Boolean, priority: Priority) -> Ability = { template, forced, priority -> Ability(template, forced, priority) },
|
var builder: (AbilityTemplate, forced: Boolean, priority: Priority) -> Ability = { template, forced, priority -> Ability(template, forced, priority) },
|
||||||
val displayName: String = "cobblemon.ability.$name",
|
val displayName: String = "cobblemon.ability.$name",
|
||||||
val description: String = "cobblemon.ability.$name.desc"
|
val description: String = "cobblemon.ability.$name.desc"
|
||||||
) : ShowdownIdentifiable {
|
) {
|
||||||
/**
|
/**
|
||||||
* Returns the Ability or if applicable the extension connected to this template
|
* Returns the Ability or if applicable the extension connected to this template
|
||||||
*/
|
*/
|
||||||
@@ -46,8 +45,6 @@ class AbilityTemplate(
|
|||||||
*/
|
*/
|
||||||
fun create(json: JsonObject) = create().loadFromJSON(json)
|
fun create(json: JsonObject) = create().loadFromJSON(json)
|
||||||
|
|
||||||
override fun showdownId(): String = ShowdownIdentifiable.REGEX.replace(this.name.lowercase(), "")
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
|||||||
+1
@@ -18,6 +18,7 @@ import com.cobblemon.mod.common.api.molang.MoLangFunctions.addStandardFunctions
|
|||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
||||||
import com.cobblemon.mod.common.api.molang.ObjectValue
|
import com.cobblemon.mod.common.api.molang.ObjectValue
|
||||||
|
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
|
||||||
import com.cobblemon.mod.common.entity.MoLangScriptingEntity
|
import com.cobblemon.mod.common.entity.MoLangScriptingEntity
|
||||||
import com.cobblemon.mod.common.util.activityRegistry
|
import com.cobblemon.mod.common.util.activityRegistry
|
||||||
import com.cobblemon.mod.common.util.asIdentifierDefaultingNamespace
|
import com.cobblemon.mod.common.util.asIdentifierDefaultingNamespace
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
|
|||||||
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
||||||
|
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
|
||||||
import com.cobblemon.mod.common.util.asTranslated
|
import com.cobblemon.mod.common.util.asTranslated
|
||||||
import com.cobblemon.mod.common.util.resolve
|
import com.cobblemon.mod.common.util.resolve
|
||||||
import com.cobblemon.mod.common.util.withQueryValue
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.cobblemon.mod.common.util.getBooleanOrNull
|
|||||||
import com.cobblemon.mod.common.util.getDoubleOrNull
|
import com.cobblemon.mod.common.util.getDoubleOrNull
|
||||||
import kotlin.math.sqrt
|
import kotlin.math.sqrt
|
||||||
import net.minecraft.core.BlockPos
|
import net.minecraft.core.BlockPos
|
||||||
|
import net.minecraft.world.entity.PathfinderMob
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to maintain some settings around how the entity should wander this tick. The idea is you
|
* Used to maintain some settings around how the entity should wander this tick. The idea is you
|
||||||
|
|||||||
@@ -8,12 +8,16 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.api.ai.config
|
package com.cobblemon.mod.common.api.ai.config
|
||||||
|
|
||||||
|
import com.bedrockk.molang.runtime.MoLangRuntime
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
|
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
||||||
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
||||||
import com.cobblemon.mod.common.util.asExpression
|
import com.cobblemon.mod.common.util.asExpression
|
||||||
import com.cobblemon.mod.common.util.cobblemonResource
|
import com.cobblemon.mod.common.util.cobblemonResource
|
||||||
import com.cobblemon.mod.common.util.resolveBoolean
|
import com.cobblemon.mod.common.util.resolveBoolean
|
||||||
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import net.minecraft.resources.ResourceLocation
|
import net.minecraft.resources.ResourceLocation
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
|
|
||||||
|
|||||||
+31
-7
@@ -9,6 +9,7 @@
|
|||||||
package com.cobblemon.mod.common.api.ai.config.task
|
package com.cobblemon.mod.common.api.ai.config.task
|
||||||
|
|
||||||
import com.bedrockk.molang.Expression
|
import com.bedrockk.molang.Expression
|
||||||
|
import com.cobblemon.mod.common.Cobblemon
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
|
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
@@ -17,6 +18,7 @@ import com.cobblemon.mod.common.util.asExpression
|
|||||||
import com.cobblemon.mod.common.util.mainThreadRuntime
|
import com.cobblemon.mod.common.util.mainThreadRuntime
|
||||||
import com.cobblemon.mod.common.util.resolveBoolean
|
import com.cobblemon.mod.common.util.resolveBoolean
|
||||||
import com.cobblemon.mod.common.util.withQueryValue
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
|
import com.cobblemon.mod.common.world.gamerules.CobblemonGameRules
|
||||||
import com.mojang.datafixers.util.Either
|
import com.mojang.datafixers.util.Either
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
||||||
@@ -34,6 +36,8 @@ import net.minecraft.world.entity.ai.sensing.SensorType
|
|||||||
class HateEntityTaskConfig : SingleTaskConfig {
|
class HateEntityTaskConfig : SingleTaskConfig {
|
||||||
val entityCondition: Expression = "true".asExpression()
|
val entityCondition: Expression = "true".asExpression()
|
||||||
val range: ExpressionOrEntityVariable = Either.left("24".asExpression())
|
val range: ExpressionOrEntityVariable = Either.left("24".asExpression())
|
||||||
|
val chance: Float = Cobblemon.config.predationChance
|
||||||
|
private val coercedChance = chance.coerceIn(0f, 1f)
|
||||||
|
|
||||||
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = emptyList<MoLangConfigVariable>()
|
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = emptyList<MoLangConfigVariable>()
|
||||||
override fun createTask(
|
override fun createTask(
|
||||||
@@ -43,24 +47,44 @@ class HateEntityTaskConfig : SingleTaskConfig {
|
|||||||
val range = range.resolveFloat(behaviourConfigurationContext.runtime)
|
val range = range.resolveFloat(behaviourConfigurationContext.runtime)
|
||||||
behaviourConfigurationContext.addMemories(
|
behaviourConfigurationContext.addMemories(
|
||||||
MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES,
|
MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES,
|
||||||
MemoryModuleType.ANGRY_AT
|
MemoryModuleType.ANGRY_AT,
|
||||||
|
MemoryModuleType.ATTACK_TARGET
|
||||||
)
|
)
|
||||||
behaviourConfigurationContext.addSensors(SensorType.NEAREST_LIVING_ENTITIES)
|
behaviourConfigurationContext.addSensors(SensorType.NEAREST_LIVING_ENTITIES)
|
||||||
return BehaviorBuilder.create { instance ->
|
return BehaviorBuilder.create { instance ->
|
||||||
instance.group(
|
instance.group(
|
||||||
instance.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES),
|
instance.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES),
|
||||||
instance.registered(MemoryModuleType.ANGRY_AT)
|
instance.registered(MemoryModuleType.ANGRY_AT),
|
||||||
).apply(instance) { entities, angryAt ->
|
instance.registered(MemoryModuleType.ATTACK_TARGET),
|
||||||
|
).apply(instance) { entities, angryAt, attackTarget ->
|
||||||
Trigger { world, entity, _ ->
|
Trigger { world, entity, _ ->
|
||||||
val target = instance.get(entities).findClosest {
|
// bail if gamerule is disabled
|
||||||
mainThreadRuntime.withQueryValue("entity", entity.asMostSpecificMoLangValue())
|
if (!world.gameRules.getBoolean(CobblemonGameRules.DO_POKEMON_PREDATION)) return@Trigger false
|
||||||
|
val target = instance.get(entities).findClosest { hated ->
|
||||||
|
mainThreadRuntime.withQueryValue("entity", hated.asMostSpecificMoLangValue())
|
||||||
return@findClosest mainThreadRuntime.resolveBoolean(entityCondition)
|
return@findClosest mainThreadRuntime.resolveBoolean(entityCondition)
|
||||||
}.orElse(null)
|
}.orElse(null)
|
||||||
|
|
||||||
|
var shouldTrigger = false
|
||||||
if (target != null && target.distanceTo(entity) <= range) {
|
if (target != null && target.distanceTo(entity) <= range) {
|
||||||
angryAt.set(target.uuid)
|
shouldTrigger = when {
|
||||||
|
// set always attacking if activity chance is equal to 1.0
|
||||||
|
coercedChance == 1f -> {
|
||||||
|
angryAt.set(target.uuid)
|
||||||
|
attackTarget.set(target)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
// roll the dice in other way
|
||||||
|
coercedChance != 1f && world.random.nextFloat() < coercedChance -> {
|
||||||
|
angryAt.set(target.uuid)
|
||||||
|
attackTarget.set(target)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
// fallback to peaceful behavior in unattended cases
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return@Trigger true
|
return@Trigger shouldTrigger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,13 @@ package com.cobblemon.mod.common.api.ai.config.task
|
|||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
|
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
|
||||||
import com.cobblemon.mod.common.api.ai.asVariables
|
import com.cobblemon.mod.common.api.ai.asVariables
|
||||||
|
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
import com.cobblemon.mod.common.util.asExpression
|
import com.cobblemon.mod.common.util.asExpression
|
||||||
|
import com.cobblemon.mod.common.util.asExpressionLike
|
||||||
|
import com.cobblemon.mod.common.util.resolveBoolean
|
||||||
import com.cobblemon.mod.common.util.weightedSelection
|
import com.cobblemon.mod.common.util.weightedSelection
|
||||||
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import com.mojang.datafixers.util.Either
|
import com.mojang.datafixers.util.Either
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
||||||
|
|||||||
+2
@@ -8,10 +8,12 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.api.ai.config.task
|
package com.cobblemon.mod.common.api.ai.config.task
|
||||||
|
|
||||||
|
import com.bedrockk.molang.runtime.MoLangRuntime
|
||||||
import com.cobblemon.mod.common.CobblemonMemories
|
import com.cobblemon.mod.common.CobblemonMemories
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.WrapperLivingEntityTask.Companion.wrapped
|
import com.cobblemon.mod.common.api.ai.WrapperLivingEntityTask.Companion.wrapped
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
||||||
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
||||||
import com.cobblemon.mod.common.util.mainThreadRuntime
|
import com.cobblemon.mod.common.util.mainThreadRuntime
|
||||||
import com.cobblemon.mod.common.util.resolveBoolean
|
import com.cobblemon.mod.common.util.resolveBoolean
|
||||||
|
|||||||
+2
@@ -10,6 +10,8 @@ package com.cobblemon.mod.common.api.ai.config.task
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.asVariables
|
import com.cobblemon.mod.common.api.ai.asVariables
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
||||||
import net.minecraft.world.entity.ai.behavior.StopBeingAngryIfTargetDead
|
import net.minecraft.world.entity.ai.behavior.StopBeingAngryIfTargetDead
|
||||||
|
|||||||
+2
@@ -9,7 +9,9 @@
|
|||||||
package com.cobblemon.mod.common.api.ai.config.task
|
package com.cobblemon.mod.common.api.ai.config.task
|
||||||
|
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
||||||
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import net.minecraft.world.Difficulty
|
import net.minecraft.world.Difficulty
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
|
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
|
||||||
|
|||||||
+1
@@ -15,6 +15,7 @@ import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
|
|||||||
import com.cobblemon.mod.common.entity.npc.ai.SwitchToBattleTask
|
import com.cobblemon.mod.common.entity.npc.ai.SwitchToBattleTask
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
||||||
|
import net.minecraft.world.entity.ai.memory.MemoryModuleType
|
||||||
|
|
||||||
class SwitchToNPCBattleTaskConfig : SingleTaskConfig {
|
class SwitchToNPCBattleTaskConfig : SingleTaskConfig {
|
||||||
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = emptyList<MoLangConfigVariable>()
|
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = emptyList<MoLangConfigVariable>()
|
||||||
|
|||||||
+2
@@ -10,6 +10,8 @@ package com.cobblemon.mod.common.api.ai.config.task
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.asVariables
|
import com.cobblemon.mod.common.api.ai.asVariables
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.PathfinderMob
|
import net.minecraft.world.entity.PathfinderMob
|
||||||
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
||||||
|
|||||||
+2
@@ -10,6 +10,8 @@ package com.cobblemon.mod.common.api.ai.config.task
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
|
||||||
import com.cobblemon.mod.common.api.ai.asVariables
|
import com.cobblemon.mod.common.api.ai.asVariables
|
||||||
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.PathfinderMob
|
import net.minecraft.world.entity.PathfinderMob
|
||||||
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
||||||
|
|||||||
+1
@@ -25,6 +25,7 @@ import net.minecraft.world.entity.ai.behavior.BehaviorControl
|
|||||||
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
|
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
|
||||||
import net.minecraft.world.entity.ai.behavior.declarative.Trigger
|
import net.minecraft.world.entity.ai.behavior.declarative.Trigger
|
||||||
import net.minecraft.world.entity.ai.memory.MemoryModuleType
|
import net.minecraft.world.entity.ai.memory.MemoryModuleType
|
||||||
|
import net.minecraft.world.entity.ai.memory.MemoryStatus
|
||||||
import net.minecraft.world.entity.ai.sensing.SensorType
|
import net.minecraft.world.entity.ai.sensing.SensorType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,6 @@ import com.cobblemon.mod.common.util.mainThreadRuntime
|
|||||||
import com.cobblemon.mod.common.util.resolveFloat
|
import com.cobblemon.mod.common.util.resolveFloat
|
||||||
import com.cobblemon.mod.common.util.withQueryValue
|
import com.cobblemon.mod.common.util.withQueryValue
|
||||||
import com.mojang.datafixers.util.Either
|
import com.mojang.datafixers.util.Either
|
||||||
import kotlin.math.ceil
|
|
||||||
import net.minecraft.core.BlockPos
|
import net.minecraft.core.BlockPos
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
import net.minecraft.world.entity.PathfinderMob
|
import net.minecraft.world.entity.PathfinderMob
|
||||||
@@ -35,6 +34,7 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType
|
|||||||
import net.minecraft.world.level.material.Fluids
|
import net.minecraft.world.level.material.Fluids
|
||||||
import net.minecraft.world.level.pathfinder.PathType
|
import net.minecraft.world.level.pathfinder.PathType
|
||||||
import net.minecraft.world.phys.Vec3
|
import net.minecraft.world.phys.Vec3
|
||||||
|
import kotlin.math.ceil
|
||||||
|
|
||||||
class WaterWanderTaskConfig : SingleTaskConfig {
|
class WaterWanderTaskConfig : SingleTaskConfig {
|
||||||
val condition = booleanVariable(WANDER, "water_wanders", true).asExpressible()
|
val condition = booleanVariable(WANDER, "water_wanders", true).asExpressible()
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Cobblemon Contributors
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cobblemon.mod.common.api.battles.model
|
||||||
|
|
||||||
|
/**
|
||||||
|
* How a [PokemonBattle] came to an end.
|
||||||
|
*/
|
||||||
|
enum class BattleEndResult {
|
||||||
|
/** One side defeated the other. */
|
||||||
|
VICTORY,
|
||||||
|
/** A wild Pokémon was captured, ending the battle. */
|
||||||
|
CAPTURE,
|
||||||
|
/** An actor forfeited, giving the victory to the other side. */
|
||||||
|
FORFEIT,
|
||||||
|
/** A player fled from a wild Pokémon. */
|
||||||
|
FLED,
|
||||||
|
/** The battle was stopped without a winner, such as by a command, a player disconnecting or an error. */
|
||||||
|
STOPPED
|
||||||
|
}
|
||||||
+33
-12
@@ -21,6 +21,7 @@ import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
|||||||
import com.cobblemon.mod.common.api.battles.model.actor.EntityBackedBattleActor
|
import com.cobblemon.mod.common.api.battles.model.actor.EntityBackedBattleActor
|
||||||
import com.cobblemon.mod.common.api.battles.model.actor.FleeableBattleActor
|
import com.cobblemon.mod.common.api.battles.model.actor.FleeableBattleActor
|
||||||
import com.cobblemon.mod.common.api.events.CobblemonEvents
|
import com.cobblemon.mod.common.api.events.CobblemonEvents
|
||||||
|
import com.cobblemon.mod.common.api.events.battles.BattleEndedEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.BattleFledEvent
|
import com.cobblemon.mod.common.api.events.battles.BattleFledEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.BattleFleeAttemptEvent
|
import com.cobblemon.mod.common.api.events.battles.BattleFleeAttemptEvent
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
@@ -54,9 +55,9 @@ import com.cobblemon.mod.common.net.messages.client.battle.BattleEndPacket
|
|||||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleMakeChoicePacket
|
import com.cobblemon.mod.common.net.messages.client.battle.BattleMakeChoicePacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleMessagePacket
|
import com.cobblemon.mod.common.net.messages.client.battle.BattleMessagePacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleQueueRequestPacket
|
import com.cobblemon.mod.common.net.messages.client.battle.BattleQueueRequestPacket
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.progress.DefeatTransformationProgress
|
import com.cobblemon.mod.common.pokemon.evolution.progress.DefeatEvolutionProgress
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.progress.LastBattleCriticalHitsTransformationProgress
|
import com.cobblemon.mod.common.pokemon.evolution.progress.LastBattleCriticalHitsEvolutionProgress
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.requirements.DefeatRequirement
|
import com.cobblemon.mod.common.pokemon.requirements.DefeatRequirement
|
||||||
import com.cobblemon.mod.common.util.battleLang
|
import com.cobblemon.mod.common.util.battleLang
|
||||||
import com.cobblemon.mod.common.util.getPlayer
|
import com.cobblemon.mod.common.util.getPlayer
|
||||||
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
||||||
@@ -97,8 +98,8 @@ open class PokemonBattle(
|
|||||||
this.actors.forEach { actor ->
|
this.actors.forEach { actor ->
|
||||||
actor.battle = this
|
actor.battle = this
|
||||||
actor.pokemonList.forEach { battlePokemon ->
|
actor.pokemonList.forEach { battlePokemon ->
|
||||||
battlePokemon.effectedPokemon.requirementProgress
|
battlePokemon.effectedPokemon.evolutionProxy.current().progress()
|
||||||
.filterIsInstance<LastBattleCriticalHitsTransformationProgress>()
|
.filterIsInstance<LastBattleCriticalHitsEvolutionProgress>()
|
||||||
.forEach { it.reset() }
|
.forEach { it.reset() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,6 +125,12 @@ open class PokemonBattle(
|
|||||||
var winners = listOf<BattleActor>()
|
var winners = listOf<BattleActor>()
|
||||||
var losers = listOf<BattleActor>()
|
var losers = listOf<BattleActor>()
|
||||||
var ended = false
|
var ended = false
|
||||||
|
/** How the battle ended, or null if it hasn't ended yet. */
|
||||||
|
var endResult: BattleEndResult? = null
|
||||||
|
/** The actor that forfeited the battle, if any. */
|
||||||
|
var forfeitedBy: BattleActor? = null
|
||||||
|
/** Whether a player fled from the battle. */
|
||||||
|
var fled = false
|
||||||
// TEMP battle showcase stuff
|
// TEMP battle showcase stuff
|
||||||
var announcingRules = false
|
var announcingRules = false
|
||||||
var turn: Int = 0
|
var turn: Int = 0
|
||||||
@@ -232,6 +239,10 @@ open class PokemonBattle(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun writeShowdownAction(vararg messages: String) {
|
fun writeShowdownAction(vararg messages: String) {
|
||||||
|
if (messages.any { it.contains("\n") || it.contains("\r") }) {
|
||||||
|
LOGGER.warn("Refusing to forward Showdown action with an embedded line break for battle {}: {}", battleId, messages.joinToString(" | "))
|
||||||
|
return
|
||||||
|
}
|
||||||
log(messages.joinToString("\n"))
|
log(messages.joinToString("\n"))
|
||||||
ShowdownService.service.send(battleId, messages.toList().toTypedArray())
|
ShowdownService.service.send(battleId, messages.toList().toTypedArray())
|
||||||
}
|
}
|
||||||
@@ -251,6 +262,14 @@ open class PokemonBattle(
|
|||||||
|
|
||||||
fun end() {
|
fun end() {
|
||||||
ended = true
|
ended = true
|
||||||
|
val result = when {
|
||||||
|
winners.isNotEmpty() && showdownMessages.any { "capture" in it } -> BattleEndResult.CAPTURE
|
||||||
|
winners.isNotEmpty() && forfeitedBy != null -> BattleEndResult.FORFEIT
|
||||||
|
winners.isNotEmpty() -> BattleEndResult.VICTORY
|
||||||
|
fled -> BattleEndResult.FLED
|
||||||
|
else -> BattleEndResult.STOPPED
|
||||||
|
}
|
||||||
|
endResult = result
|
||||||
val awardToFainted = Cobblemon.config.awardExperienceToFaintedPokemon
|
val awardToFainted = Cobblemon.config.awardExperienceToFaintedPokemon
|
||||||
val awardOnLoss = Cobblemon.config.awardExperienceOnBattleLoss
|
val awardOnLoss = Cobblemon.config.awardExperienceOnBattleLoss
|
||||||
this.actors.forEach { actor ->
|
this.actors.forEach { actor ->
|
||||||
@@ -271,13 +290,12 @@ open class PokemonBattle(
|
|||||||
val facedFainted = opponentPokemon.facedOpponents.contains(faintedPokemon)
|
val facedFainted = opponentPokemon.facedOpponents.contains(faintedPokemon)
|
||||||
val pokemon = opponentPokemon.effectedPokemon
|
val pokemon = opponentPokemon.effectedPokemon
|
||||||
if (facedFainted) {
|
if (facedFainted) {
|
||||||
if (pokemon.hasMatchingRequirement<DefeatRequirement>({ it.target.matches(faintedPokemon.effectedPokemon) })) {
|
pokemon.lockedEvolutions.forEach { evolution ->
|
||||||
val requiredPokemonProperties = pokemon.getRelevantRequirements<DefeatRequirement> { it.target.matches(faintedPokemon.effectedPokemon) }
|
evolution.requirements.filterIsInstance<DefeatRequirement>().forEach { defeatRequirement ->
|
||||||
.map { it.target }
|
if (defeatRequirement.target.matches(faintedPokemon.effectedPokemon)) {
|
||||||
.distinctBy { it.asString() }
|
val progress = pokemon.evolutionProxy.current().progressFirstOrCreate({ it is DefeatEvolutionProgress && it.currentProgress().target == defeatRequirement.target }) { DefeatEvolutionProgress() }
|
||||||
for (props in requiredPokemonProperties) {
|
progress.updateProgress(DefeatEvolutionProgress.Progress(defeatRequirement.target, progress.currentProgress().amount + 1))
|
||||||
val progress = pokemon.progressFirstOrCreate({ it is DefeatTransformationProgress && it.currentProgress().target.asString().equals(props.asString(), ignoreCase = true) }, ::DefeatTransformationProgress)
|
}
|
||||||
progress.updateProgress(DefeatTransformationProgress.Progress(props.copy(), progress.currentProgress().amount + 1))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -333,6 +351,7 @@ open class PokemonBattle(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
CobblemonEvents.BATTLE_ENDED.post(BattleEndedEvent(this, result, forfeitedBy.takeIf { result == BattleEndResult.FORFEIT }))
|
||||||
sendUpdate(BattleEndPacket())
|
sendUpdate(BattleEndPacket())
|
||||||
BattleRegistry.closeBattle(this)
|
BattleRegistry.closeBattle(this)
|
||||||
}
|
}
|
||||||
@@ -503,6 +522,7 @@ open class PokemonBattle(
|
|||||||
.forEach{it.pokemon.heal()}
|
.forEach{it.pokemon.heal()}
|
||||||
CobblemonEvents.BATTLE_FLED.post(BattleFledEvent(this, actors.asSequence().filterIsInstance<PlayerBattleActor>().iterator().next()))
|
CobblemonEvents.BATTLE_FLED.post(BattleFledEvent(this, actors.asSequence().filterIsInstance<PlayerBattleActor>().iterator().next()))
|
||||||
actors.filterIsInstance<EntityBackedBattleActor<*>>().mapNotNull { it.entity }.forEach { it.sendSystemMessage(battleLang("flee").yellow()) }
|
actors.filterIsInstance<EntityBackedBattleActor<*>>().mapNotNull { it.entity }.forEach { it.sendSystemMessage(battleLang("flee").yellow()) }
|
||||||
|
fled = true
|
||||||
stop()
|
stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -540,6 +560,7 @@ open class PokemonBattle(
|
|||||||
private fun checkForfeit(): Boolean {
|
private fun checkForfeit(): Boolean {
|
||||||
val forfeit = actors.find { it.responses.any { it is ForfeitActionResponse } }
|
val forfeit = actors.find { it.responses.any { it is ForfeitActionResponse } }
|
||||||
return forfeit?.let {
|
return forfeit?.let {
|
||||||
|
forfeitedBy = it
|
||||||
this.dispatchWaiting { this.broadcastChatMessage(battleLang("forfeit", it.getName()).red()) }
|
this.dispatchWaiting { this.broadcastChatMessage(battleLang("forfeit", it.getName()).red()) }
|
||||||
writeShowdownAction(">forcelose ${it.showdownId}")
|
writeShowdownAction(">forcelose ${it.showdownId}")
|
||||||
true
|
true
|
||||||
|
|||||||
+1
-1
@@ -22,9 +22,9 @@ import com.cobblemon.mod.common.item.battle.BagItem
|
|||||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleApplyPassResponsePacket
|
import com.cobblemon.mod.common.net.messages.client.battle.BattleApplyPassResponsePacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleMakeChoicePacket
|
import com.cobblemon.mod.common.net.messages.client.battle.BattleMakeChoicePacket
|
||||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleMessagePacket
|
import com.cobblemon.mod.common.net.messages.client.battle.BattleMessagePacket
|
||||||
import java.util.UUID
|
|
||||||
import net.minecraft.network.chat.Component
|
import net.minecraft.network.chat.Component
|
||||||
import net.minecraft.network.chat.MutableComponent
|
import net.minecraft.network.chat.MutableComponent
|
||||||
|
import java.util.UUID
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
|
||||||
abstract class BattleActor(
|
abstract class BattleActor(
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import com.cobblemon.mod.common.util.adapters.*
|
|||||||
import com.cobblemon.mod.common.util.cobblemonResource
|
import com.cobblemon.mod.common.util.cobblemonResource
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import java.awt.Color
|
|
||||||
import net.minecraft.advancements.critereon.MinMaxBounds
|
import net.minecraft.advancements.critereon.MinMaxBounds
|
||||||
import net.minecraft.core.registries.Registries
|
import net.minecraft.core.registries.Registries
|
||||||
import net.minecraft.resources.ResourceLocation
|
import net.minecraft.resources.ResourceLocation
|
||||||
@@ -31,6 +30,7 @@ import net.minecraft.tags.TagKey
|
|||||||
import net.minecraft.world.level.biome.Biome
|
import net.minecraft.world.level.biome.Biome
|
||||||
import net.minecraft.world.phys.AABB
|
import net.minecraft.world.phys.AABB
|
||||||
import net.minecraft.world.phys.Vec3
|
import net.minecraft.world.phys.Vec3
|
||||||
|
import java.awt.Color
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The data registry for [Berry].
|
* The data registry for [Berry].
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import com.cobblemon.mod.common.util.writeBox
|
|||||||
import com.cobblemon.mod.common.util.writeEnumConstant
|
import com.cobblemon.mod.common.util.writeEnumConstant
|
||||||
import com.cobblemon.mod.common.util.writeIdentifier
|
import com.cobblemon.mod.common.util.writeIdentifier
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import java.awt.Color
|
|
||||||
import java.util.EnumSet
|
|
||||||
import net.minecraft.core.BlockPos
|
import net.minecraft.core.BlockPos
|
||||||
import net.minecraft.network.RegistryFriendlyByteBuf
|
import net.minecraft.network.RegistryFriendlyByteBuf
|
||||||
|
import java.awt.Color
|
||||||
|
import java.util.EnumSet
|
||||||
import net.minecraft.resources.ResourceLocation
|
import net.minecraft.resources.ResourceLocation
|
||||||
import net.minecraft.tags.TagKey
|
import net.minecraft.tags.TagKey
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Cobblemon Contributors
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cobblemon.mod.common.api.data
|
||||||
|
|
||||||
|
import com.cobblemon.mod.common.util.endsWith
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.google.gson.reflect.TypeToken
|
||||||
|
import net.minecraft.core.HolderLookup
|
||||||
|
import java.io.BufferedReader
|
||||||
|
import java.io.File
|
||||||
|
import java.util.concurrent.ExecutionException
|
||||||
|
import net.minecraft.resources.ResourceLocation
|
||||||
|
import net.minecraft.server.packs.PackType
|
||||||
|
import net.minecraft.server.packs.resources.ResourceManager
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A [DataRegistry] that consumes JSON files.
|
||||||
|
* Every deserialized instance is attached to an [Identifier].
|
||||||
|
* For example a file under data/mymod/[resourcePath]/entry.json would be backed by the identifier modid:entry.
|
||||||
|
*
|
||||||
|
* @param T The type of the data consumed by this registry.
|
||||||
|
*
|
||||||
|
* @author Licious
|
||||||
|
* @since August 5th, 2022
|
||||||
|
*/
|
||||||
|
interface ServerJsonDataRegistry<T> : DataRegistry {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The [TypeToken] of type [T].
|
||||||
|
*/
|
||||||
|
val typeToken: TypeToken<T>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The folder location for the data this registry will consume.
|
||||||
|
*/
|
||||||
|
val resourcePath: String
|
||||||
|
|
||||||
|
override val type: PackType
|
||||||
|
get() = PackType.SERVER_DATA
|
||||||
|
|
||||||
|
override fun reload(manager: ResourceManager) {
|
||||||
|
//NO-OP, handled by reload(manager, registry)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun reload(manager: ResourceManager, registry: HolderLookup.Provider) {
|
||||||
|
val gson = setupParser(registry)
|
||||||
|
val data = hashMapOf<ResourceLocation, T>()
|
||||||
|
manager.listResources(resourcePath) { path -> path.endsWith(JSON_EXTENSION) }.forEach { (identifier, resource) ->
|
||||||
|
if (identifier.namespace == "pixelmon") {
|
||||||
|
return@forEach
|
||||||
|
}
|
||||||
|
|
||||||
|
resource.open().use { stream ->
|
||||||
|
stream.bufferedReader().use { reader ->
|
||||||
|
val resolvedIdentifier = ResourceLocation.fromNamespaceAndPath(identifier.namespace, File(identifier.path).nameWithoutExtension)
|
||||||
|
data[resolvedIdentifier] = parse(reader, resolvedIdentifier, gson)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
reload(data, registry)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun parse(reader: BufferedReader, identifier: ResourceLocation, gson: Gson): T {
|
||||||
|
return try {
|
||||||
|
gson.fromJson(reader, typeToken.type)
|
||||||
|
} catch (exception: Exception) {
|
||||||
|
throw ExecutionException("Error loading JSON for data: $identifier", exception)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows the creation of [Gson] instances which have adapters that are registry-aware, e.g. [com.cobblemon.mod.common.pokemon.evolution.adapters.LegacyItemConditionWrapperAdapter]
|
||||||
|
*/
|
||||||
|
fun setupParser(registry: HolderLookup.Provider): Gson
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reloads this registry from the deserialized data.
|
||||||
|
*
|
||||||
|
* @param data A map of the data associating an instance to the respective identifier from the [ResourceManager].
|
||||||
|
*/
|
||||||
|
fun reload(data: Map<ResourceLocation, T>, registry: HolderLookup.Provider)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val JSON_EXTENSION = ".json"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.api.drop
|
package com.cobblemon.mod.common.api.drop
|
||||||
|
|
||||||
import com.cobblemon.mod.common.api.pokemon.transformation.requirement.TransformationRequirement
|
import com.cobblemon.mod.common.api.pokemon.requirement.Requirement
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
|
|
||||||
class EvolutionItemDropEntry : ItemDropEntry() {
|
class EvolutionItemDropEntry : ItemDropEntry() {
|
||||||
val requirements: MutableSet<TransformationRequirement> = mutableSetOf()
|
val requirements: MutableSet<Requirement> = mutableSetOf()
|
||||||
|
|
||||||
override fun canDrop(pokemon: Pokemon?): Boolean = pokemon != null && requirements.all { it.check(pokemon) }
|
override fun canDrop(pokemon: Pokemon?): Boolean = pokemon != null && requirements.all { it.check(pokemon) }
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ import com.cobblemon.mod.common.api.events.battles.BattleFaintedEvent
|
|||||||
import com.cobblemon.mod.common.api.events.battles.BattleFledEvent
|
import com.cobblemon.mod.common.api.events.battles.BattleFledEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.BattleFleeAttemptEvent
|
import com.cobblemon.mod.common.api.events.battles.BattleFleeAttemptEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.BattleStartedEvent
|
import com.cobblemon.mod.common.api.events.battles.BattleStartedEvent
|
||||||
|
import com.cobblemon.mod.common.api.events.battles.BattleEndedEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.BattleVictoryEvent
|
import com.cobblemon.mod.common.api.events.battles.BattleVictoryEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.instruction.FormeChangeEvent
|
import com.cobblemon.mod.common.api.events.battles.instruction.FormeChangeEvent
|
||||||
import com.cobblemon.mod.common.api.events.battles.instruction.MegaEvolutionEvent
|
import com.cobblemon.mod.common.api.events.battles.instruction.MegaEvolutionEvent
|
||||||
@@ -48,10 +49,6 @@ import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionAcceptedEv
|
|||||||
import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionCompleteEvent
|
import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionCompleteEvent
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionDisplayEvent
|
import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionDisplayEvent
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionTestedEvent
|
import com.cobblemon.mod.common.api.events.pokemon.evolution.EvolutionTestedEvent
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.form.FormAcceptedEvent
|
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.form.FormCompleteEvent
|
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.form.FormDisplayEvent
|
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.form.FormTestedEvent
|
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.healing.PokemonHealedEvent
|
import com.cobblemon.mod.common.api.events.pokemon.healing.PokemonHealedEvent
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.interaction.ExperienceCandyUseEvent
|
import com.cobblemon.mod.common.api.events.pokemon.interaction.ExperienceCandyUseEvent
|
||||||
import com.cobblemon.mod.common.api.events.pokemon.interaction.PokemonInteractionGUICreationEvent
|
import com.cobblemon.mod.common.api.events.pokemon.interaction.PokemonInteractionGUICreationEvent
|
||||||
@@ -107,18 +104,6 @@ object CobblemonEvents {
|
|||||||
@JvmField
|
@JvmField
|
||||||
val EVOLUTION_COMPLETE = EventObservable<EvolutionCompleteEvent>()
|
val EVOLUTION_COMPLETE = EventObservable<EvolutionCompleteEvent>()
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val FORM_ACCEPTED = CancelableObservable<FormAcceptedEvent>()
|
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val FORM_DISPLAY = EventObservable<FormDisplayEvent>()
|
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val FORM_TESTED = EventObservable<FormTestedEvent>()
|
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val FORM_COMPLETE = EventObservable<FormCompleteEvent>()
|
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val POKEMON_NICKNAMED = CancelableObservable<PokemonNicknamedEvent>()
|
val POKEMON_NICKNAMED = CancelableObservable<PokemonNicknamedEvent>()
|
||||||
|
|
||||||
@@ -155,6 +140,9 @@ object CobblemonEvents {
|
|||||||
@JvmField
|
@JvmField
|
||||||
val BATTLE_FAINTED = EventObservable<BattleFaintedEvent>()
|
val BATTLE_FAINTED = EventObservable<BattleFaintedEvent>()
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val BATTLE_ENDED = EventObservable<BattleEndedEvent>()
|
||||||
|
|
||||||
// instructions
|
// instructions
|
||||||
@JvmField
|
@JvmField
|
||||||
val MEGA_EVOLUTION = EventObservable<MegaEvolutionEvent>()
|
val MEGA_EVOLUTION = EventObservable<MegaEvolutionEvent>()
|
||||||
|
|||||||
+69
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Cobblemon Contributors
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cobblemon.mod.common.api.events.battles
|
||||||
|
|
||||||
|
import com.bedrockk.molang.runtime.value.DoubleValue
|
||||||
|
import com.bedrockk.molang.runtime.value.MoValue
|
||||||
|
import com.bedrockk.molang.runtime.value.StringValue
|
||||||
|
import com.cobblemon.mod.common.api.battles.model.BattleEndResult
|
||||||
|
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
||||||
|
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
||||||
|
import com.cobblemon.mod.common.api.battles.model.actor.ActorType
|
||||||
|
import com.cobblemon.mod.common.util.asArrayValue
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event fired whenever a [PokemonBattle] ends, regardless of how it ended (victory, fleeing, being stopped, etc).
|
||||||
|
*
|
||||||
|
* [PokemonBattle.winners] and [PokemonBattle.losers] are only populated if the [result] has a winner,
|
||||||
|
* that is [BattleEndResult.VICTORY], [BattleEndResult.CAPTURE] or [BattleEndResult.FORFEIT].
|
||||||
|
*
|
||||||
|
* @param result How the battle ended.
|
||||||
|
* @param forfeitedBy The actor that forfeited, if the [result] is [BattleEndResult.FORFEIT].
|
||||||
|
*/
|
||||||
|
data class BattleEndedEvent(
|
||||||
|
override val battle: PokemonBattle,
|
||||||
|
val result: BattleEndResult,
|
||||||
|
val forfeitedBy: BattleActor?
|
||||||
|
) : BattleEvent {
|
||||||
|
/** Whether one side won the battle, which includes captures and forfeits. */
|
||||||
|
val hasWinner = battle.winners.isNotEmpty()
|
||||||
|
val wasVictory = result == BattleEndResult.VICTORY
|
||||||
|
val wasCapture = result == BattleEndResult.CAPTURE
|
||||||
|
val wasForfeit = result == BattleEndResult.FORFEIT
|
||||||
|
val wasFled = result == BattleEndResult.FLED
|
||||||
|
val wasStopped = result == BattleEndResult.STOPPED
|
||||||
|
|
||||||
|
/** Whether the battle was between players and wild Pokémon. */
|
||||||
|
val isPvW = battle.isPvW
|
||||||
|
/** Whether the battle was between players and NPCs. */
|
||||||
|
val isPvN = battle.isPvN
|
||||||
|
/** Whether the battle was between players. */
|
||||||
|
val isPvP = battle.isPvP
|
||||||
|
|
||||||
|
val context = mutableMapOf<String, MoValue>(
|
||||||
|
"battle" to battle.struct,
|
||||||
|
"result" to StringValue(result.name.lowercase()),
|
||||||
|
"has_winner" to DoubleValue(hasWinner),
|
||||||
|
"was_victory" to DoubleValue(wasVictory),
|
||||||
|
"was_capture" to DoubleValue(wasCapture),
|
||||||
|
"was_forfeit" to DoubleValue(wasForfeit),
|
||||||
|
"was_fled" to DoubleValue(wasFled),
|
||||||
|
"was_stopped" to DoubleValue(wasStopped),
|
||||||
|
"is_pvw" to DoubleValue(isPvW),
|
||||||
|
"is_pvn" to DoubleValue(isPvN),
|
||||||
|
"is_pvp" to DoubleValue(isPvP),
|
||||||
|
"winners" to battle.winners.asArrayValue { it.struct },
|
||||||
|
"losers" to battle.losers.asArrayValue { it.struct },
|
||||||
|
"players" to battle.actors.filter { it.type == ActorType.PLAYER }.asArrayValue { it.struct },
|
||||||
|
"npcs" to battle.actors.filter { it.type == ActorType.NPC }.asArrayValue { it.struct },
|
||||||
|
"wild_pokemon" to battle.actors.filter { it.type == ActorType.WILD }.asArrayValue { it.struct }
|
||||||
|
).apply {
|
||||||
|
forfeitedBy?.let { put("forfeited_by", it.struct) }
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
@@ -15,7 +15,9 @@ import com.cobblemon.mod.common.api.battles.model.actor.ActorType
|
|||||||
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
||||||
import com.cobblemon.mod.common.api.battles.model.actor.EntityBackedBattleActor
|
import com.cobblemon.mod.common.api.battles.model.actor.EntityBackedBattleActor
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
|
||||||
|
import com.cobblemon.mod.common.battles.actor.PlayerBattleActor
|
||||||
import com.cobblemon.mod.common.entity.MoLangScriptingEntity
|
import com.cobblemon.mod.common.entity.MoLangScriptingEntity
|
||||||
|
import com.cobblemon.mod.common.entity.npc.NPCBattleActor
|
||||||
import com.cobblemon.mod.common.util.asArrayValue
|
import com.cobblemon.mod.common.util.asArrayValue
|
||||||
import net.minecraft.world.entity.LivingEntity
|
import net.minecraft.world.entity.LivingEntity
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.bedrockk.molang.runtime.value.DoubleValue
|
|||||||
import com.cobblemon.mod.common.api.events.Cancelable
|
import com.cobblemon.mod.common.api.events.Cancelable
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
||||||
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
import com.cobblemon.mod.common.trade.TradeParticipant
|
import com.cobblemon.mod.common.trade.TradeParticipant
|
||||||
import com.cobblemon.mod.common.util.getPlayer
|
import com.cobblemon.mod.common.util.getPlayer
|
||||||
|
|||||||
+1
-1
@@ -12,8 +12,8 @@ import com.bedrockk.molang.runtime.value.MoValue
|
|||||||
import com.cobblemon.mod.common.api.events.Cancelable
|
import com.cobblemon.mod.common.api.events.Cancelable
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
||||||
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when an evolution is accepted.
|
* Fired when an evolution is accepted.
|
||||||
|
|||||||
+1
-1
@@ -10,8 +10,8 @@ package com.cobblemon.mod.common.api.events.pokemon.evolution
|
|||||||
|
|
||||||
import com.bedrockk.molang.runtime.value.MoValue
|
import com.bedrockk.molang.runtime.value.MoValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired after an evolution finishes.
|
* Fired after an evolution finishes.
|
||||||
|
|||||||
+2
-2
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.evolution
|
package com.cobblemon.mod.common.api.events.pokemon.evolution
|
||||||
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
|
import com.cobblemon.mod.common.api.pokemon.evolution.EvolutionDisplay
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.EvolutionDisplay
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired before an evolution is sent to clients.
|
* Fired before an evolution is sent to clients.
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.evolution
|
package com.cobblemon.mod.common.api.events.pokemon.evolution
|
||||||
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -12,8 +12,8 @@ import com.bedrockk.molang.runtime.value.DoubleValue
|
|||||||
import com.bedrockk.molang.runtime.value.MoValue
|
import com.bedrockk.molang.runtime.value.MoValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
||||||
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
|
||||||
import com.cobblemon.mod.common.util.getBoolean
|
import com.cobblemon.mod.common.util.getBoolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2023 Cobblemon Contributors
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.form
|
|
||||||
|
|
||||||
import com.bedrockk.molang.runtime.value.StringValue
|
|
||||||
import com.cobblemon.mod.common.api.events.Cancelable
|
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.form.TemporaryForm
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fired when a temporary form change is accepted.
|
|
||||||
* Cancelling will not notify users nor remove the form from the pending list.
|
|
||||||
*
|
|
||||||
* @param pokemon The [Pokemon] about to change form.
|
|
||||||
* @param form The [TemporaryForm] being used.
|
|
||||||
*
|
|
||||||
* @author Hiroku
|
|
||||||
* @since June 3rd, 2026
|
|
||||||
*/
|
|
||||||
data class FormAcceptedEvent(
|
|
||||||
override val pokemon: Pokemon,
|
|
||||||
override val form: TemporaryForm
|
|
||||||
) : Cancelable(), FormEvent {
|
|
||||||
val context = mutableMapOf(
|
|
||||||
"pokemon" to pokemon.struct,
|
|
||||||
"form" to StringValue(form.formOnlyShowdownId())
|
|
||||||
)
|
|
||||||
|
|
||||||
val functions = moLangFunctionMap(cancelFunc)
|
|
||||||
}
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2023 Cobblemon Contributors
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.form
|
|
||||||
|
|
||||||
import com.bedrockk.molang.runtime.value.StringValue
|
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.form.TemporaryForm
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fired after a temporary form change finishes.
|
|
||||||
*
|
|
||||||
* @param pokemon The [Pokemon] resulting from the form change.
|
|
||||||
* @param form The [TemporaryForm] that was used.
|
|
||||||
*
|
|
||||||
* @author Hiroku
|
|
||||||
* @since June 3rd, 2026
|
|
||||||
*/
|
|
||||||
data class FormCompleteEvent(
|
|
||||||
/** The [Pokemon] that did the form change. */
|
|
||||||
override val pokemon: Pokemon,
|
|
||||||
/** The [TemporaryForm] that was used. */
|
|
||||||
override val form: TemporaryForm
|
|
||||||
) : FormEvent {
|
|
||||||
val context = mutableMapOf(
|
|
||||||
"pokemon" to pokemon.struct,
|
|
||||||
"form" to StringValue(form.formOnlyShowdownId())
|
|
||||||
)
|
|
||||||
}
|
|
||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2023 Cobblemon Contributors
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.form
|
|
||||||
|
|
||||||
import com.bedrockk.molang.runtime.value.StringValue
|
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.form.FormDisplay
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.form.TemporaryForm
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fired before a form is sent to clients. For modifications on the actual output when they accept it modify
|
|
||||||
* the [display] directly.
|
|
||||||
*
|
|
||||||
* @param pokemon The [Pokemon] that will change form if this proposition is accepted.
|
|
||||||
* @param display The current [FormDisplay] the client will see.
|
|
||||||
* @param form The [TemporaryForm] being used.
|
|
||||||
*
|
|
||||||
* @author Hiroku
|
|
||||||
* @since June 3rd, 2026
|
|
||||||
*/
|
|
||||||
data class FormDisplayEvent(
|
|
||||||
override val pokemon: Pokemon,
|
|
||||||
var display: FormDisplay,
|
|
||||||
override val form: TemporaryForm
|
|
||||||
) : FormEvent {
|
|
||||||
val context = mutableMapOf(
|
|
||||||
"pokemon" to pokemon.struct,
|
|
||||||
"display" to display.struct,
|
|
||||||
"form" to StringValue(form.formOnlyShowdownId())
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2023 Cobblemon Contributors
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.form
|
|
||||||
|
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.form.TemporaryForm
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The root of the various [TemporaryForm]-related events.
|
|
||||||
*/
|
|
||||||
interface FormEvent {
|
|
||||||
/** The Pokémon impacted in this event.*/
|
|
||||||
val pokemon: Pokemon
|
|
||||||
/*** The form triggering this event.*/
|
|
||||||
val form: TemporaryForm
|
|
||||||
}
|
|
||||||
-47
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2023 Cobblemon Contributors
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.pokemon.form
|
|
||||||
|
|
||||||
import com.bedrockk.molang.runtime.value.DoubleValue
|
|
||||||
import com.bedrockk.molang.runtime.value.StringValue
|
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.form.TemporaryForm
|
|
||||||
import com.cobblemon.mod.common.util.getBoolean
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An event fired when [TemporaryForm.test] has been performed.
|
|
||||||
* The final state [result] will be the return value of the test function.
|
|
||||||
*
|
|
||||||
* @property pokemon The [Pokemon] being tested against.
|
|
||||||
* @property form The [TemporaryForm] instance performing the test.
|
|
||||||
* @property originalResult The base result from the Cobblemon implementation.
|
|
||||||
* @property result The final value returned by [TemporaryForm.test].
|
|
||||||
*/
|
|
||||||
data class FormTestedEvent(
|
|
||||||
override val pokemon: Pokemon,
|
|
||||||
override val form: TemporaryForm,
|
|
||||||
val originalResult: Boolean,
|
|
||||||
) : FormEvent {
|
|
||||||
var result: Boolean = originalResult
|
|
||||||
|
|
||||||
val context = mutableMapOf(
|
|
||||||
"pokemon" to pokemon.struct,
|
|
||||||
"form" to StringValue(form.formOnlyShowdownId()),
|
|
||||||
"original_result" to DoubleValue(originalResult),
|
|
||||||
)
|
|
||||||
|
|
||||||
val functions = moLangFunctionMap(
|
|
||||||
"result" to { DoubleValue(result) },
|
|
||||||
"set_result" to {
|
|
||||||
result = it.getBoolean(0)
|
|
||||||
DoubleValue.ONE
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
+1
@@ -15,6 +15,7 @@ import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
|||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
||||||
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
|
import com.cobblemon.mod.common.util.getPlayer
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
package com.cobblemon.mod.common.api.events.storage
|
package com.cobblemon.mod.common.api.events.storage
|
||||||
|
|
||||||
|
import com.bedrockk.molang.runtime.value.DoubleValue
|
||||||
import com.bedrockk.molang.runtime.value.StringValue
|
import com.bedrockk.molang.runtime.value.StringValue
|
||||||
import com.cobblemon.mod.common.api.events.Cancelable
|
import com.cobblemon.mod.common.api.events.Cancelable
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
|
|||||||
+2
@@ -16,7 +16,9 @@ import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
|||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
|
||||||
import com.cobblemon.mod.common.api.storage.PokemonStore
|
import com.cobblemon.mod.common.api.storage.PokemonStore
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
|
import com.cobblemon.mod.common.util.getPlayer
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
|
import java.util.UUID
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base of the events around the release of Pokémon from pc or party.
|
* The base of the events around the release of Pokémon from pc or party.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.cobblemon.mod.common.api.data.JsonDataRegistry
|
|||||||
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
||||||
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
||||||
import com.cobblemon.mod.common.net.messages.client.data.FossilRegistrySyncPacket
|
import com.cobblemon.mod.common.net.messages.client.data.FossilRegistrySyncPacket
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.adapters.LegacyItemConditionWrapperAdapter
|
import com.cobblemon.mod.common.pokemon.evolution.adapters.LegacyItemConditionWrapperAdapter
|
||||||
import com.cobblemon.mod.common.util.adapters.IdentifierAdapter
|
import com.cobblemon.mod.common.util.adapters.IdentifierAdapter
|
||||||
import com.cobblemon.mod.common.util.adapters.ItemLikeConditionAdapter
|
import com.cobblemon.mod.common.util.adapters.ItemLikeConditionAdapter
|
||||||
import com.cobblemon.mod.common.util.adapters.pokemonPropertiesShortAdapter
|
import com.cobblemon.mod.common.util.adapters.pokemonPropertiesShortAdapter
|
||||||
@@ -40,7 +40,7 @@ object Fossils: JsonDataRegistry<Fossil> {
|
|||||||
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
||||||
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
||||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
||||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter)
|
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter())
|
||||||
.create()
|
.create()
|
||||||
|
|
||||||
override val typeToken: TypeToken<Fossil> = TypeToken.get(Fossil::class.java)
|
override val typeToken: TypeToken<Fossil> = TypeToken.get(Fossil::class.java)
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ package com.cobblemon.mod.common.api.gui
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.client.gui.CobblemonRenderable
|
import com.cobblemon.mod.common.client.gui.CobblemonRenderable
|
||||||
import net.minecraft.client.gui.components.AbstractWidget
|
import net.minecraft.client.gui.components.AbstractWidget
|
||||||
import net.minecraft.client.gui.components.Renderable
|
|
||||||
import net.minecraft.client.gui.components.events.GuiEventListener
|
import net.minecraft.client.gui.components.events.GuiEventListener
|
||||||
import net.minecraft.client.gui.narration.NarrationElementOutput
|
import net.minecraft.client.gui.narration.NarrationElementOutput
|
||||||
import net.minecraft.network.chat.Component
|
import net.minecraft.network.chat.Component
|
||||||
@@ -55,6 +54,8 @@ abstract class ParentWidget(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun mouseClicked(pMouseX: Double, pMouseY: Double, pButton: Int): Boolean {
|
override fun mouseClicked(pMouseX: Double, pMouseY: Double, pButton: Int): Boolean {
|
||||||
|
if (!active) return false
|
||||||
|
|
||||||
return children.any {
|
return children.any {
|
||||||
it.mouseClicked(pMouseX, pMouseY, pButton)
|
it.mouseClicked(pMouseX, pMouseY, pButton)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Cobblemon Contributors
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cobblemon.mod.common.api.gui
|
||||||
|
|
||||||
|
import kotlin.math.max
|
||||||
|
import kotlin.math.min
|
||||||
|
|
||||||
|
interface TreeNode<T> {
|
||||||
|
val children: List<TreeNode<T>>
|
||||||
|
}
|
||||||
|
|
||||||
|
class TreeDrawingNode<T>(
|
||||||
|
val value: T,
|
||||||
|
val children: List<TreeDrawingNode<T>>,
|
||||||
|
) {
|
||||||
|
var x = 0
|
||||||
|
var y = 0
|
||||||
|
var offset = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> createDrawingTree(treeNode: TreeNode<T>): TreeDrawingNode<T> {
|
||||||
|
val root = setup(treeNode, 0, mutableListOf<Int>(), mutableListOf<Int>())
|
||||||
|
addMods(root, 0)
|
||||||
|
|
||||||
|
return root
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
private fun <T> setup(
|
||||||
|
treeNode: TreeNode<T>,
|
||||||
|
depth: Int,
|
||||||
|
nexts: MutableList<Int>,
|
||||||
|
offset: MutableList<Int>,
|
||||||
|
): TreeDrawingNode<T> {
|
||||||
|
val children = treeNode.children.map { child ->
|
||||||
|
setup(child, depth + 1, nexts, offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
val treeDrawingNode = TreeDrawingNode<T>(treeNode as T, children)
|
||||||
|
treeDrawingNode.y = depth
|
||||||
|
|
||||||
|
while (nexts.size <= depth) {
|
||||||
|
nexts.add(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
while (offset.size <= depth) {
|
||||||
|
offset.add(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
var place =
|
||||||
|
if (children.isEmpty()) {
|
||||||
|
nexts[depth]
|
||||||
|
} else if (children.size == 1) {
|
||||||
|
// children.first().x - 1
|
||||||
|
children.first().x
|
||||||
|
} else {
|
||||||
|
// (children[0].x + children[1].x) / 2
|
||||||
|
(children.first().x + children.last().x) / 2
|
||||||
|
}
|
||||||
|
|
||||||
|
offset[depth] = max(offset[depth], nexts[depth] - place)
|
||||||
|
|
||||||
|
if (children.isEmpty()) {
|
||||||
|
treeDrawingNode.x = place
|
||||||
|
} else {
|
||||||
|
treeDrawingNode.x = place + offset[depth]
|
||||||
|
}
|
||||||
|
|
||||||
|
nexts[depth] += 2
|
||||||
|
treeDrawingNode.offset = offset[depth]
|
||||||
|
|
||||||
|
return treeDrawingNode
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun <T> addMods(
|
||||||
|
treeNode: TreeDrawingNode<T>,
|
||||||
|
modSum: Int,
|
||||||
|
) {
|
||||||
|
treeNode.x += modSum
|
||||||
|
val newModSum = modSum + treeNode.offset
|
||||||
|
|
||||||
|
treeNode.children.forEach { child ->
|
||||||
|
addMods(child, newModSum)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data class TreeDrawingBounds(val minX: Int, val maxX: Int, val minY: Int, val maxY: Int) {
|
||||||
|
val width = maxX - minX
|
||||||
|
val height = maxY - minY
|
||||||
|
val xCenter = (maxX + minX) / 2.0
|
||||||
|
val yCenter = (maxY + minY) / 2.0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> calculateBounds(treeDrawingNode: TreeDrawingNode<T>): TreeDrawingBounds {
|
||||||
|
var minX = treeDrawingNode.x
|
||||||
|
var maxX = treeDrawingNode.x
|
||||||
|
var minY = treeDrawingNode.y
|
||||||
|
var maxY = treeDrawingNode.y
|
||||||
|
|
||||||
|
for (child in treeDrawingNode.children) {
|
||||||
|
val childBounds = calculateBounds(child)
|
||||||
|
|
||||||
|
minX = min(minX, childBounds.minX)
|
||||||
|
maxX = max(maxX, childBounds.maxX)
|
||||||
|
minY = min(minY, childBounds.minY)
|
||||||
|
maxY = max(maxY, childBounds.maxY)
|
||||||
|
}
|
||||||
|
|
||||||
|
return TreeDrawingBounds(minX, maxX, minY, maxY)
|
||||||
|
}
|
||||||
+5
-10
@@ -12,16 +12,11 @@ import com.bedrockk.molang.runtime.MoLangRuntime
|
|||||||
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
|
||||||
import com.cobblemon.mod.common.api.pokemon.transformation.requirement.TransformationRequirement
|
import com.cobblemon.mod.common.api.pokemon.requirement.Requirement
|
||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||||
import com.cobblemon.mod.common.net.messages.client.sound.UnvalidatedPlaySoundS2CPacket
|
import com.cobblemon.mod.common.net.messages.client.sound.UnvalidatedPlaySoundS2CPacket
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.adapters.CobblemonRequirementAdapter
|
import com.cobblemon.mod.common.pokemon.adapters.CobblemonRequirementAdapter
|
||||||
import com.cobblemon.mod.common.util.asExpressionLike
|
import com.cobblemon.mod.common.util.*
|
||||||
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
|
||||||
import com.cobblemon.mod.common.util.readExpressionLike
|
|
||||||
import com.cobblemon.mod.common.util.withPlayerValue
|
|
||||||
import com.cobblemon.mod.common.util.withQueryValue
|
|
||||||
import com.cobblemon.mod.common.util.writeExpressionLike
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import net.minecraft.core.registries.Registries
|
import net.minecraft.core.registries.Registries
|
||||||
import net.minecraft.network.FriendlyByteBuf
|
import net.minecraft.network.FriendlyByteBuf
|
||||||
@@ -34,7 +29,7 @@ import net.minecraft.world.entity.item.ItemEntity
|
|||||||
import net.minecraft.world.item.ItemStack
|
import net.minecraft.world.item.ItemStack
|
||||||
|
|
||||||
data class PokemonInteractionSet(
|
data class PokemonInteractionSet(
|
||||||
val requirements: List<TransformationRequirement> = listOf(),
|
val requirements: List<Requirement> = listOf(),
|
||||||
val interactions: List<PokemonInteraction> = listOf(),
|
val interactions: List<PokemonInteraction> = listOf(),
|
||||||
) {
|
) {
|
||||||
fun encode(buffer: FriendlyByteBuf) {
|
fun encode(buffer: FriendlyByteBuf) {
|
||||||
@@ -56,7 +51,7 @@ data class PokemonInteractionSet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
data class PokemonInteraction(
|
data class PokemonInteraction(
|
||||||
val requirements: List<TransformationRequirement> = listOf(),
|
val requirements: List<Requirement> = listOf(),
|
||||||
val effects: List<InteractionEffect> = listOf(),
|
val effects: List<InteractionEffect> = listOf(),
|
||||||
val cooldown: ExpressionLike = "0".asExpressionLike()
|
val cooldown: ExpressionLike = "0".asExpressionLike()
|
||||||
) {
|
) {
|
||||||
+28
-24
@@ -10,22 +10,23 @@ package com.cobblemon.mod.common.api.interaction
|
|||||||
|
|
||||||
import com.cobblemon.mod.common.Cobblemon
|
import com.cobblemon.mod.common.Cobblemon
|
||||||
import com.cobblemon.mod.common.api.conditional.RegistryLikeCondition
|
import com.cobblemon.mod.common.api.conditional.RegistryLikeCondition
|
||||||
import com.cobblemon.mod.common.api.data.JsonDataRegistry
|
import com.cobblemon.mod.common.api.data.ServerJsonDataRegistry
|
||||||
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
||||||
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
||||||
import com.cobblemon.mod.common.api.pokemon.transformation.requirement.TransformationRequirement
|
import com.cobblemon.mod.common.api.pokemon.requirement.Requirement
|
||||||
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||||
import com.cobblemon.mod.common.net.messages.client.data.PokemonInteractionsSyncPacket
|
import com.cobblemon.mod.common.net.messages.client.data.PokemonInteractionsSyncPacket
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.adapters.CobblemonRequirementAdapter
|
import com.cobblemon.mod.common.pokemon.adapters.CobblemonRequirementAdapter
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.adapters.LegacyItemConditionWrapperAdapter
|
import com.cobblemon.mod.common.pokemon.evolution.adapters.LegacyItemConditionWrapperAdapter
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.requirements.PokemonPropertiesRequirement
|
import com.cobblemon.mod.common.pokemon.requirements.PokemonPropertiesRequirement
|
||||||
import com.cobblemon.mod.common.util.adapters.*
|
import com.cobblemon.mod.common.util.adapters.*
|
||||||
import com.cobblemon.mod.common.util.cobblemonResource
|
import com.cobblemon.mod.common.util.cobblemonResource
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import net.minecraft.advancements.critereon.ItemPredicate
|
import net.minecraft.advancements.critereon.ItemPredicate
|
||||||
|
import net.minecraft.core.HolderLookup
|
||||||
import net.minecraft.resources.ResourceLocation
|
import net.minecraft.resources.ResourceLocation
|
||||||
import net.minecraft.server.level.ServerPlayer
|
import net.minecraft.server.level.ServerPlayer
|
||||||
import net.minecraft.server.packs.PackType
|
import net.minecraft.server.packs.PackType
|
||||||
@@ -36,28 +37,31 @@ import net.minecraft.world.level.block.Block
|
|||||||
import net.minecraft.world.level.levelgen.structure.Structure
|
import net.minecraft.world.level.levelgen.structure.Structure
|
||||||
import net.minecraft.world.level.material.Fluid
|
import net.minecraft.world.level.material.Fluid
|
||||||
|
|
||||||
object PokemonInteractions : JsonDataRegistry<PokemonInteractionSet> {
|
object PokemonInteractions : ServerJsonDataRegistry<PokemonInteractionSet> {
|
||||||
override val id = cobblemonResource("pokemon_interactions")
|
override val id = cobblemonResource("pokemon_interactions")
|
||||||
override val type = PackType.SERVER_DATA
|
override val type = PackType.SERVER_DATA
|
||||||
|
override fun setupParser(registry: HolderLookup.Provider): Gson {
|
||||||
|
return GsonBuilder()
|
||||||
|
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
||||||
|
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
||||||
|
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter(registry))
|
||||||
|
.registerTypeAdapter(Requirement::class.java, CobblemonRequirementAdapter)
|
||||||
|
.registerTypeAdapter(InteractionEffect::class.java, InteractionEffectAdapter)
|
||||||
|
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
|
||||||
|
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Biome::class.java).type, BiomeLikeConditionAdapter)
|
||||||
|
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Block::class.java).type, BlockLikeConditionAdapter)
|
||||||
|
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
||||||
|
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Structure::class.java).type, StructureLikeConditionAdapter)
|
||||||
|
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Fluid::class.java).type, FluidLikeConditionAdapter)
|
||||||
|
.registerTypeAdapter(IntRange::class.java, IntRangeAdapter)
|
||||||
|
.registerTypeAdapterFactory(LowerCaseEnumTypeAdapterFactory())
|
||||||
|
.setPrettyPrinting()
|
||||||
|
.create()
|
||||||
|
}
|
||||||
|
|
||||||
override val observable = SimpleObservable<PokemonInteractions>()
|
override val observable = SimpleObservable<PokemonInteractions>()
|
||||||
override val typeToken: TypeToken<PokemonInteractionSet> = TypeToken.get(PokemonInteractionSet::class.java)
|
override val typeToken: TypeToken<PokemonInteractionSet> = TypeToken.get(PokemonInteractionSet::class.java)
|
||||||
override val resourcePath = "pokemon_interactions"
|
override val resourcePath = "pokemon_interactions"
|
||||||
override val gson: Gson = GsonBuilder()
|
|
||||||
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
|
||||||
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
|
||||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter)
|
|
||||||
.registerTypeAdapter(TransformationRequirement::class.java, CobblemonRequirementAdapter)
|
|
||||||
.registerTypeAdapter(InteractionEffect::class.java, InteractionEffectAdapter)
|
|
||||||
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
|
|
||||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Biome::class.java).type, BiomeLikeConditionAdapter)
|
|
||||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Block::class.java).type, BlockLikeConditionAdapter)
|
|
||||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
|
||||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Structure::class.java).type, StructureLikeConditionAdapter)
|
|
||||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Fluid::class.java).type, FluidLikeConditionAdapter)
|
|
||||||
.registerTypeAdapter(IntRange::class.java, IntRangeAdapter)
|
|
||||||
.registerTypeAdapterFactory(LowerCaseEnumTypeAdapterFactory())
|
|
||||||
.setPrettyPrinting()
|
|
||||||
.create()
|
|
||||||
|
|
||||||
val interactions = mutableListOf<PokemonInteractionSet>()
|
val interactions = mutableListOf<PokemonInteractionSet>()
|
||||||
|
|
||||||
@@ -65,7 +69,7 @@ object PokemonInteractions : JsonDataRegistry<PokemonInteractionSet> {
|
|||||||
PokemonInteractionsSyncPacket(interactions).sendToPlayer(player)
|
PokemonInteractionsSyncPacket(interactions).sendToPlayer(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun reload(data: Map<ResourceLocation, PokemonInteractionSet>) {
|
override fun reload(data: Map<ResourceLocation, PokemonInteractionSet>, registry: HolderLookup.Provider) {
|
||||||
interactions.clear()
|
interactions.clear()
|
||||||
val split = data.entries
|
val split = data.entries
|
||||||
.partition {
|
.partition {
|
||||||
@@ -87,4 +91,4 @@ object PokemonInteractions : JsonDataRegistry<PokemonInteractionSet> {
|
|||||||
.flatMap { it.interactions }
|
.flatMap { it.interactions }
|
||||||
.firstOrNull(interactionCheck)
|
.firstOrNull(interactionCheck)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ abstract class RequestManager<T : ServerPlayerActionRequest> {
|
|||||||
?: this.getInboundRequest(receiver.uuid, requestID)
|
?: this.getInboundRequest(receiver.uuid, requestID)
|
||||||
|
|
||||||
/** Determines whether [player] can receive a [T]. */
|
/** Determines whether [player] can receive a [T]. */
|
||||||
open fun isBusy(player: ServerPlayer): Boolean = player.isBusy() || player.isPartyBusy()
|
open fun isBusy(player: ServerPlayer): Boolean = player.isInBattle() || player.isTrading() || player.party().find { it.entity?.isBusy == true } != null
|
||||||
|
|
||||||
/** Determines if the [target] is a valid interaction request target. */
|
/** Determines if the [target] is a valid interaction request target. */
|
||||||
abstract fun isValidInteraction(player: ServerPlayer, target: ServerPlayer): Boolean
|
abstract fun isValidInteraction(player: ServerPlayer, target: ServerPlayer): Boolean
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
package com.cobblemon.mod.common.api.item
|
package com.cobblemon.mod.common.api.item
|
||||||
|
|
||||||
import com.cobblemon.mod.common.api.data.DataRegistry
|
import com.cobblemon.mod.common.api.data.DataRegistry
|
||||||
import com.cobblemon.mod.common.api.data.ShowdownIdentifiable
|
|
||||||
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
import com.cobblemon.mod.common.api.reactive.SimpleObservable
|
||||||
import com.cobblemon.mod.common.battles.runner.ShowdownService
|
import com.cobblemon.mod.common.battles.runner.ShowdownService
|
||||||
import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
|
import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
|
||||||
@@ -30,11 +29,9 @@ object HeldItems : DataRegistry {
|
|||||||
// val heldItems = PrioritizedList<BagItemLike>()
|
// val heldItems = PrioritizedList<BagItemLike>()
|
||||||
internal val heldItemsScripts = mutableMapOf<String, String>() // showdown item ID to JavaScript
|
internal val heldItemsScripts = mutableMapOf<String, String>() // showdown item ID to JavaScript
|
||||||
val showdownItems = hashSetOf<String>()
|
val showdownItems = hashSetOf<String>()
|
||||||
val megaStones = hashMapOf<String, String>()
|
|
||||||
|
|
||||||
override fun reload(manager: ResourceManager) {
|
override fun reload(manager: ResourceManager) {
|
||||||
heldItemsScripts.clear()
|
heldItemsScripts.clear()
|
||||||
megaStones.clear()
|
|
||||||
ShowdownService.service.resetRegistryData("heldItem")
|
ShowdownService.service.resetRegistryData("heldItem")
|
||||||
manager.listResources("held_items") { it.path.endsWith(".js") }.forEach { (identifier, resource) ->
|
manager.listResources("held_items") { it.path.endsWith(".js") }.forEach { (identifier, resource) ->
|
||||||
resource.open().use { stream ->
|
resource.open().use { stream ->
|
||||||
@@ -51,9 +48,6 @@ object HeldItems : DataRegistry {
|
|||||||
for (i in 0 until itemsJson.size()) {
|
for (i in 0 until itemsJson.size()) {
|
||||||
val jsItem = itemsJson[i].asJsonObject
|
val jsItem = itemsJson[i].asJsonObject
|
||||||
showdownItems += jsItem.get("id").asString
|
showdownItems += jsItem.get("id").asString
|
||||||
if (jsItem.has("megaEvolves")) {
|
|
||||||
megaStones[jsItem.get("id").asString] = ShowdownIdentifiable.REGEX.replace(jsItem.get("megaEvolves").asString.lowercase(), "")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CobblemonHeldItemManager.load()
|
CobblemonHeldItemManager.load()
|
||||||
|
|||||||
@@ -21,9 +21,34 @@ import com.cobblemon.mod.common.api.battles.interpreter.BattleMessage
|
|||||||
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
||||||
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
||||||
import com.cobblemon.mod.common.api.drop.DropEntry
|
import com.cobblemon.mod.common.api.drop.DropEntry
|
||||||
import com.cobblemon.mod.common.api.molang.function.*
|
import com.cobblemon.mod.common.api.molang.function.BattleActorMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.BattleMessageMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.BattleMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.BiomeMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.BlockMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.DimensionTypeMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.DropEntryMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.EntityMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.EvolutionMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.GeneralMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.ItemStackMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.LivingEntityMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.NPCMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PCMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PartyMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PlayerMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PokedexMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PokemonEntityMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PokemonMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PokemonPropertiesMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.PokemonStoreMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.ServerMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.SpawnablePositionMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.SpeciesMoLangFunctions
|
||||||
|
import com.cobblemon.mod.common.api.molang.function.WorldMoLangFunctions
|
||||||
import com.cobblemon.mod.common.api.pokedex.AbstractPokedexManager
|
import com.cobblemon.mod.common.api.pokedex.AbstractPokedexManager
|
||||||
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
||||||
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
|
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
|
||||||
import com.cobblemon.mod.common.api.spawning.position.SpawnablePosition
|
import com.cobblemon.mod.common.api.spawning.position.SpawnablePosition
|
||||||
import com.cobblemon.mod.common.api.storage.PokemonStore
|
import com.cobblemon.mod.common.api.storage.PokemonStore
|
||||||
@@ -33,10 +58,8 @@ import com.cobblemon.mod.common.entity.npc.NPCEntity
|
|||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||||
import com.cobblemon.mod.common.pokemon.Species
|
import com.cobblemon.mod.common.pokemon.Species
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
|
||||||
import com.cobblemon.mod.common.util.effectiveName
|
import com.cobblemon.mod.common.util.effectiveName
|
||||||
import com.mojang.datafixers.util.Either
|
import com.mojang.datafixers.util.Either
|
||||||
import java.util.function.Function
|
|
||||||
import net.minecraft.core.Holder
|
import net.minecraft.core.Holder
|
||||||
import net.minecraft.core.Registry
|
import net.minecraft.core.Registry
|
||||||
import net.minecraft.core.RegistryAccess
|
import net.minecraft.core.RegistryAccess
|
||||||
@@ -61,6 +84,7 @@ import net.minecraft.world.level.biome.Biome
|
|||||||
import net.minecraft.world.level.block.Block
|
import net.minecraft.world.level.block.Block
|
||||||
import net.minecraft.world.level.dimension.DimensionType
|
import net.minecraft.world.level.dimension.DimensionType
|
||||||
import net.minecraft.world.phys.Vec3
|
import net.minecraft.world.phys.Vec3
|
||||||
|
import java.util.function.Function
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds a bunch of useful MoLang trickery that can be used or extended in API
|
* Holds a bunch of useful MoLang trickery that can be used or extended in API
|
||||||
|
|||||||
+2
@@ -16,6 +16,7 @@ import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
|||||||
import com.cobblemon.mod.common.battles.actor.PlayerBattleActor
|
import com.cobblemon.mod.common.battles.actor.PlayerBattleActor
|
||||||
import com.cobblemon.mod.common.battles.actor.PokemonBattleActor
|
import com.cobblemon.mod.common.battles.actor.PokemonBattleActor
|
||||||
import com.cobblemon.mod.common.entity.npc.NPCBattleActor
|
import com.cobblemon.mod.common.entity.npc.NPCBattleActor
|
||||||
|
import com.cobblemon.mod.common.util.asArrayValue
|
||||||
|
|
||||||
object BattleActorMoLangFunctions : AbstractMoLangFunctionHolder<BattleActor>() {
|
object BattleActorMoLangFunctions : AbstractMoLangFunctionHolder<BattleActor>() {
|
||||||
override fun BattleActor.moLangFunctions(): MutableMap<String, (MoParams) -> Any> {
|
override fun BattleActor.moLangFunctions(): MutableMap<String, (MoParams) -> Any> {
|
||||||
@@ -25,6 +26,7 @@ object BattleActorMoLangFunctions : AbstractMoLangFunctionHolder<BattleActor>()
|
|||||||
functions["is_npc"] = { DoubleValue(actor.type == ActorType.NPC) }
|
functions["is_npc"] = { DoubleValue(actor.type == ActorType.NPC) }
|
||||||
functions["is_player"] = { DoubleValue(actor.type == ActorType.PLAYER) }
|
functions["is_player"] = { DoubleValue(actor.type == ActorType.PLAYER) }
|
||||||
functions["is_wild"] = { DoubleValue(actor.type == ActorType.WILD) }
|
functions["is_wild"] = { DoubleValue(actor.type == ActorType.WILD) }
|
||||||
|
functions["battle_pokemon"] = { actor.pokemonList.asArrayValue { it.struct } }
|
||||||
|
|
||||||
when (actor) {
|
when (actor) {
|
||||||
is NPCBattleActor -> {
|
is NPCBattleActor -> {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import com.bedrockk.molang.runtime.value.DoubleValue
|
|||||||
import com.bedrockk.molang.runtime.value.StringValue
|
import com.bedrockk.molang.runtime.value.StringValue
|
||||||
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
||||||
import com.cobblemon.mod.common.util.asArrayValue
|
import com.cobblemon.mod.common.util.asArrayValue
|
||||||
import java.util.UUID
|
import java.util.*
|
||||||
|
|
||||||
object BattleMoLangFunctions : AbstractMoLangFunctionHolder<PokemonBattle>() {
|
object BattleMoLangFunctions : AbstractMoLangFunctionHolder<PokemonBattle>() {
|
||||||
override fun PokemonBattle.moLangFunctions(): MutableMap<String, (MoParams) -> Any> {
|
override fun PokemonBattle.moLangFunctions(): MutableMap<String, (MoParams) -> Any> {
|
||||||
|
|||||||
+17
-20
@@ -11,34 +11,31 @@ package com.cobblemon.mod.common.api.molang.function
|
|||||||
import com.bedrockk.molang.runtime.MoParams
|
import com.bedrockk.molang.runtime.MoParams
|
||||||
import com.bedrockk.molang.runtime.value.DoubleValue
|
import com.bedrockk.molang.runtime.value.DoubleValue
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||||
import com.cobblemon.mod.common.api.pokemon.transformation.Transformation
|
import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.evolution.Evolution
|
import com.cobblemon.mod.common.pokemon.evolution.variants.ItemInteractionEvolution
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.triggers.ItemInteractionTrigger
|
import com.cobblemon.mod.common.pokemon.evolution.variants.LevelUpEvolution
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.triggers.LevelUpTrigger
|
import com.cobblemon.mod.common.pokemon.evolution.variants.TradeEvolution
|
||||||
import com.cobblemon.mod.common.pokemon.transformation.triggers.TradeTrigger
|
|
||||||
|
|
||||||
object EvolutionMoLangFunctions : AbstractMoLangFunctionHolder<Transformation>() {
|
object EvolutionMoLangFunctions : AbstractMoLangFunctionHolder<Evolution>() {
|
||||||
override fun Transformation.moLangFunctions(): MutableMap<String, (MoParams) -> Any> {
|
override fun Evolution.moLangFunctions(): MutableMap<String, (MoParams) -> Any> {
|
||||||
val evolution = this
|
val evolution = this
|
||||||
val functions = hashMapOf<String, (MoParams) -> Any>()
|
val functions = hashMapOf<String, (MoParams) -> Any>()
|
||||||
|
|
||||||
functions["reevaluate"] = { DoubleValue(evolution.reevaluate) }
|
functions["result"] = { evolution.result.asMoLangValue() }
|
||||||
functions["is_optional"] = { DoubleValue(evolution.optional) }
|
functions["is_optional"] = { DoubleValue(evolution.optional) }
|
||||||
|
functions["consumes_held_item"] = { DoubleValue(evolution.consumeHeldItem) }
|
||||||
|
|
||||||
if (evolution is Evolution) {
|
when (evolution) {
|
||||||
functions["result"] = { evolution.result.asMoLangValue() }
|
is LevelUpEvolution -> {
|
||||||
when (evolution.trigger) {
|
functions["is_level_up"] = { DoubleValue.ONE }
|
||||||
is LevelUpTrigger -> {
|
}
|
||||||
functions["is_level_up"] = { DoubleValue.ONE }
|
|
||||||
}
|
|
||||||
|
|
||||||
is TradeTrigger -> {
|
is TradeEvolution -> {
|
||||||
functions["is_trade"] = { DoubleValue.ONE }
|
functions["is_trade"] = { DoubleValue.ONE }
|
||||||
}
|
}
|
||||||
|
|
||||||
is ItemInteractionTrigger -> {
|
is ItemInteractionEvolution -> {
|
||||||
functions["is_item"] = { DoubleValue.ONE }
|
functions["is_item"] = { DoubleValue.ONE }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
@@ -55,6 +55,11 @@ object GeneralMoLangFunctions {
|
|||||||
struct.map.remove(variable)
|
struct.map.remove(variable)
|
||||||
DoubleValue.ONE
|
DoubleValue.ONE
|
||||||
}
|
}
|
||||||
|
functions["delete_variables"] = { params ->
|
||||||
|
val struct = params.get<VariableStruct>(0)
|
||||||
|
struct.map.clear()
|
||||||
|
DoubleValue.ONE
|
||||||
|
}
|
||||||
functions["get_variable"] = { params ->
|
functions["get_variable"] = { params ->
|
||||||
val struct = params.get<VariableStruct>(0)
|
val struct = params.get<VariableStruct>(0)
|
||||||
val variable = params.getString(1)
|
val variable = params.getString(1)
|
||||||
|
|||||||
+2
-2
@@ -98,14 +98,14 @@ object LivingEntityMoLangFunctions : AbstractMoLangFunctionHolder<LivingEntity>(
|
|||||||
val targetEntity = params.get<MoValue>(0)
|
val targetEntity = params.get<MoValue>(0)
|
||||||
val maxDistance = params.getDoubleOrNull(1)?.toFloat() ?: 2.0F
|
val maxDistance = params.getDoubleOrNull(1)?.toFloat() ?: 2.0F
|
||||||
|
|
||||||
val entity =
|
val target =
|
||||||
if (targetEntity is ObjectValue<*> && targetEntity.obj is Entity) {
|
if (targetEntity is ObjectValue<*> && targetEntity.obj is Entity) {
|
||||||
targetEntity.obj as Entity
|
targetEntity.obj as Entity
|
||||||
} else {
|
} else {
|
||||||
return@isLookingAt DoubleValue.ZERO
|
return@isLookingAt DoubleValue.ZERO
|
||||||
}
|
}
|
||||||
|
|
||||||
DoubleValue(entity.isLookingAt(entity, maxDistance))
|
DoubleValue(entity.isLookingAt(target, maxDistance))
|
||||||
}
|
}
|
||||||
functions["is_living_entity"] = { DoubleValue.ONE }
|
functions["is_living_entity"] = { DoubleValue.ONE }
|
||||||
functions["is_flying"] = { DoubleValue(entity.isFallFlying) }
|
functions["is_flying"] = { DoubleValue(entity.isFallFlying) }
|
||||||
|
|||||||
+22
@@ -16,6 +16,7 @@ import com.cobblemon.mod.common.api.molang.ObjectValue
|
|||||||
import com.cobblemon.mod.common.api.pokedex.AbstractPokedexManager
|
import com.cobblemon.mod.common.api.pokedex.AbstractPokedexManager
|
||||||
import com.cobblemon.mod.common.api.pokedex.CaughtCount
|
import com.cobblemon.mod.common.api.pokedex.CaughtCount
|
||||||
import com.cobblemon.mod.common.api.pokedex.CaughtPercent
|
import com.cobblemon.mod.common.api.pokedex.CaughtPercent
|
||||||
|
import com.cobblemon.mod.common.api.pokedex.Dexes
|
||||||
import com.cobblemon.mod.common.api.pokedex.PokedexEntryProgress
|
import com.cobblemon.mod.common.api.pokedex.PokedexEntryProgress
|
||||||
import com.cobblemon.mod.common.api.pokedex.PokedexManager
|
import com.cobblemon.mod.common.api.pokedex.PokedexManager
|
||||||
import com.cobblemon.mod.common.api.pokedex.SeenCount
|
import com.cobblemon.mod.common.api.pokedex.SeenCount
|
||||||
@@ -74,6 +75,27 @@ object PokedexMoLangFunctions : AbstractMoLangFunctionHolder<AbstractPokedexMana
|
|||||||
functions["caught_percent"] = { DoubleValue(pokedex.getGlobalCalculatedValue(CaughtPercent)) }
|
functions["caught_percent"] = { DoubleValue(pokedex.getGlobalCalculatedValue(CaughtPercent)) }
|
||||||
functions["seen_percent"] = { DoubleValue(pokedex.getGlobalCalculatedValue(SeenPercent)) }
|
functions["seen_percent"] = { DoubleValue(pokedex.getGlobalCalculatedValue(SeenPercent)) }
|
||||||
|
|
||||||
|
functions["dex_caught_count"] = { params ->
|
||||||
|
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||||
|
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, CaughtCount))
|
||||||
|
else DoubleValue.ZERO
|
||||||
|
}
|
||||||
|
functions["dex_seen_count"] = { params ->
|
||||||
|
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||||
|
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, SeenCount))
|
||||||
|
else DoubleValue.ZERO
|
||||||
|
}
|
||||||
|
functions["dex_caught_percent"] = { params ->
|
||||||
|
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||||
|
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, CaughtPercent).toDouble())
|
||||||
|
else DoubleValue.ZERO
|
||||||
|
}
|
||||||
|
functions["dex_seen_percent"] = { params ->
|
||||||
|
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||||
|
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, SeenPercent).toDouble())
|
||||||
|
else DoubleValue.ZERO
|
||||||
|
}
|
||||||
|
|
||||||
when (pokedex) {
|
when (pokedex) {
|
||||||
is PokedexManager -> {
|
is PokedexManager -> {
|
||||||
functions["player_id"] = { StringValue(pokedex.uuid.toString()) }
|
functions["player_id"] = { StringValue(pokedex.uuid.toString()) }
|
||||||
|
|||||||
+2
-2
@@ -212,7 +212,7 @@ object PokemonMoLangFunctions : AbstractMoLangFunctionHolder<Pokemon>() {
|
|||||||
// Lol. Lmao, even.
|
// Lol. Lmao, even.
|
||||||
// TO-DO: Subscribe to [PokemonSpecies.observable].
|
// TO-DO: Subscribe to [PokemonSpecies.observable].
|
||||||
functions["pre_evolution"] = { pokemon.species.preEvolution ?: DoubleValue.ZERO }
|
functions["pre_evolution"] = { pokemon.species.preEvolution ?: DoubleValue.ZERO }
|
||||||
functions["nature"] = { StringValue(pokemon.nature.toString()) }
|
functions["nature"] = { StringValue(pokemon.nature.name.toString()) }
|
||||||
functions["is_wild"] = { DoubleValue(pokemon.entity?.let { it.ownerUUID == null } == true) }
|
functions["is_wild"] = { DoubleValue(pokemon.entity?.let { it.ownerUUID == null } == true) }
|
||||||
functions["is_shiny"] = { DoubleValue(pokemon.shiny) }
|
functions["is_shiny"] = { DoubleValue(pokemon.shiny) }
|
||||||
functions["is_in_party"] = { DoubleValue(pokemon.storeCoordinates.get()?.store is PartyStore) }
|
functions["is_in_party"] = { DoubleValue(pokemon.storeCoordinates.get()?.store is PartyStore) }
|
||||||
@@ -445,7 +445,7 @@ object PokemonMoLangFunctions : AbstractMoLangFunctionHolder<Pokemon>() {
|
|||||||
val idx = params.getInt(0)
|
val idx = params.getInt(0)
|
||||||
val evolution =
|
val evolution =
|
||||||
if (idx >= 0) pokemon.evolutions.elementAtOrNull(idx) else return@forceEvolve DoubleValue.ZERO
|
if (idx >= 0) pokemon.evolutions.elementAtOrNull(idx) else return@forceEvolve DoubleValue.ZERO
|
||||||
evolution?.perform(pokemon)
|
evolution?.forceEvolve(pokemon)
|
||||||
StringValue(evolution.toString())
|
StringValue(evolution.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import com.bedrockk.molang.runtime.struct.MoStruct
|
|||||||
import com.bedrockk.molang.runtime.struct.QueryStruct
|
import com.bedrockk.molang.runtime.struct.QueryStruct
|
||||||
import com.bedrockk.molang.runtime.value.DoubleValue
|
import com.bedrockk.molang.runtime.value.DoubleValue
|
||||||
import com.bedrockk.molang.runtime.value.StringValue
|
import com.bedrockk.molang.runtime.value.StringValue
|
||||||
import com.cobblemon.mod.common.api.data.ShowdownIdentifiable
|
|
||||||
import com.cobblemon.mod.common.api.moves.animations.ActionEffectTimeline
|
|
||||||
import com.cobblemon.mod.common.api.moves.categories.DamageCategories
|
import com.cobblemon.mod.common.api.moves.categories.DamageCategories
|
||||||
import com.cobblemon.mod.common.api.moves.categories.DamageCategory
|
import com.cobblemon.mod.common.api.moves.categories.DamageCategory
|
||||||
import com.cobblemon.mod.common.api.types.ElementalType
|
import com.cobblemon.mod.common.api.types.ElementalType
|
||||||
@@ -57,7 +55,7 @@ open class MoveTemplate(
|
|||||||
val critRatio: Double,
|
val critRatio: Double,
|
||||||
val effectChances: Array<Double>,
|
val effectChances: Array<Double>,
|
||||||
val weight: Float
|
val weight: Float
|
||||||
) : ShowdownIdentifiable {
|
) {
|
||||||
val struct: MoStruct by lazy {
|
val struct: MoStruct by lazy {
|
||||||
QueryStruct(hashMapOf())
|
QueryStruct(hashMapOf())
|
||||||
.addFunction("name") { StringValue(name) }
|
.addFunction("name") { StringValue(name) }
|
||||||
@@ -165,8 +163,6 @@ open class MoveTemplate(
|
|||||||
return this.elementalType
|
return this.elementalType
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showdownId() = ShowdownIdentifiable.REGEX.replace(this.name.lowercase(), "")
|
|
||||||
|
|
||||||
fun getSelectionWeight(form: FormData): Float {
|
fun getSelectionWeight(form: FormData): Float {
|
||||||
return if (this in form.signatureMoves) {
|
return if (this in form.signatureMoves) {
|
||||||
weight * MovesetBuilder.signatureMoveWeightMultiplier
|
weight * MovesetBuilder.signatureMoveWeightMultiplier
|
||||||
|
|||||||
+4
-42
@@ -10,17 +10,13 @@ package com.cobblemon.mod.common.api.moves.animations
|
|||||||
|
|
||||||
import com.bedrockk.molang.runtime.MoLangRuntime
|
import com.bedrockk.molang.runtime.MoLangRuntime
|
||||||
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
||||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addStandardFunctions
|
|
||||||
import com.cobblemon.mod.common.api.moves.animations.keyframes.ActionEffectKeyframe
|
import com.cobblemon.mod.common.api.moves.animations.keyframes.ActionEffectKeyframe
|
||||||
import com.cobblemon.mod.common.api.scheduling.Schedulable
|
|
||||||
import com.cobblemon.mod.common.api.scheduling.ServerTaskTracker
|
|
||||||
import com.cobblemon.mod.common.entity.npc.NPCEntity
|
import com.cobblemon.mod.common.entity.npc.NPCEntity
|
||||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
|
||||||
import com.cobblemon.mod.common.util.asExpressionLike
|
import com.cobblemon.mod.common.util.asExpressionLike
|
||||||
import com.cobblemon.mod.common.util.resolveBoolean
|
import com.cobblemon.mod.common.util.resolveBoolean
|
||||||
import java.util.concurrent.CompletableFuture
|
|
||||||
import net.minecraft.world.entity.Entity
|
import net.minecraft.world.entity.Entity
|
||||||
import net.minecraft.world.level.Level
|
import net.minecraft.world.level.Level
|
||||||
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An action effect will run and execute a series of 'keyframes', with each running once
|
* An action effect will run and execute a series of 'keyframes', with each running once
|
||||||
@@ -40,7 +36,7 @@ class ActionEffectTimeline(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun run(context: ActionEffectContext): CompletableFuture<Unit> {
|
fun run(context: ActionEffectContext): CompletableFuture<Unit> {
|
||||||
val future = if (timeline.isEmpty() || !context.runtime.resolveBoolean(condition)) {
|
return if (timeline.isEmpty() || !context.runtime.resolveBoolean(condition)) {
|
||||||
CompletableFuture.completedFuture(Unit)
|
CompletableFuture.completedFuture(Unit)
|
||||||
} else {
|
} else {
|
||||||
val finalFuture = CompletableFuture<Unit>()
|
val finalFuture = CompletableFuture<Unit>()
|
||||||
@@ -51,10 +47,6 @@ class ActionEffectTimeline(
|
|||||||
it.printStackTrace()
|
it.printStackTrace()
|
||||||
CompletableFuture.completedFuture(Unit)
|
CompletableFuture.completedFuture(Unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
context.future = future
|
|
||||||
future.thenRun { context.getHolds().forEach(context::removeHold) }
|
|
||||||
return future
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun chainKeyframes(context: ActionEffectContext, iterator: Iterator<ActionEffectKeyframe>, finalFuture: CompletableFuture<Unit>) {
|
fun chainKeyframes(context: ActionEffectContext, iterator: Iterator<ActionEffectKeyframe>, finalFuture: CompletableFuture<Unit>) {
|
||||||
@@ -73,45 +65,15 @@ class ActionEffectTimeline(
|
|||||||
|
|
||||||
class ActionEffectContext(
|
class ActionEffectContext(
|
||||||
val actionEffect: ActionEffectTimeline,
|
val actionEffect: ActionEffectTimeline,
|
||||||
private val holds: MutableSet<String> = mutableSetOf(),
|
val holds: MutableSet<String> = mutableSetOf(),
|
||||||
val providers: MutableList<Any> = mutableListOf(),
|
val providers: MutableList<Any> = mutableListOf(),
|
||||||
val runtime: MoLangRuntime,
|
val runtime: MoLangRuntime,
|
||||||
var canBeInterrupted: Boolean = false,
|
var canBeInterrupted: Boolean = false,
|
||||||
var interrupted: Boolean = false,
|
var interrupted: Boolean = false,
|
||||||
var currentKeyframes: MutableList<ActionEffectKeyframe> = mutableListOf(),
|
var currentKeyframes: MutableList<ActionEffectKeyframe> = mutableListOf(),
|
||||||
var level: Level? = null,
|
var level: Level? = null
|
||||||
var holdRemovalCallbacks: MutableMap<String, () -> Unit> = mutableMapOf(),
|
|
||||||
var tracker: Schedulable = ServerTaskTracker
|
|
||||||
) {
|
) {
|
||||||
companion object {
|
|
||||||
fun fromPokemonEntity(
|
|
||||||
actionEffect: ActionEffectTimeline,
|
|
||||||
pokemonEntity: PokemonEntity,
|
|
||||||
runtime: MoLangRuntime = MoLangRuntime().also { it.environment.query.addStandardFunctions() },
|
|
||||||
holds: Collection<String> = emptySet(),
|
|
||||||
holdRemovalCallbacks: Map<String, () -> Unit> = emptyMap()
|
|
||||||
): ActionEffectContext {
|
|
||||||
return ActionEffectContext(
|
|
||||||
actionEffect = actionEffect,
|
|
||||||
providers = mutableListOf(UsersProvider(listOf(pokemonEntity))),
|
|
||||||
holdRemovalCallbacks = holdRemovalCallbacks.toMutableMap(),
|
|
||||||
holds = holds.toMutableSet(),
|
|
||||||
runtime = runtime,
|
|
||||||
level = pokemonEntity.level()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lateinit var future: CompletableFuture<Unit>
|
|
||||||
inline fun <reified T> findOneProvider() = providers.filterIsInstance<T>().firstOrNull()
|
inline fun <reified T> findOneProvider() = providers.filterIsInstance<T>().firstOrNull()
|
||||||
|
|
||||||
/** Returns a reference to the internal holds set so you can keep an eye on it. */
|
|
||||||
fun getHolds(): Set<String> = holds
|
|
||||||
fun addHold(hold: String) = holds.add(hold)
|
|
||||||
fun removeHold(hold: String) {
|
|
||||||
holds.remove(hold)
|
|
||||||
holdRemovalCallbacks.remove(hold)?.invoke()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class UsersProvider(users: List<Entity>): EntityProvider {
|
class UsersProvider(users: List<Entity>): EntityProvider {
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.concurrent.CompletableFuture
|
|||||||
class AddHoldsActionEffectKeyframe : ActionEffectKeyframe {
|
class AddHoldsActionEffectKeyframe : ActionEffectKeyframe {
|
||||||
val holds = mutableSetOf<String>()
|
val holds = mutableSetOf<String>()
|
||||||
override fun play(context: ActionEffectContext): CompletableFuture<Unit> {
|
override fun play(context: ActionEffectContext): CompletableFuture<Unit> {
|
||||||
holds.forEach(context::addHold)
|
context.holds.addAll(holds)
|
||||||
return CompletableFuture.completedFuture(Unit)
|
return CompletableFuture.completedFuture(Unit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded 100 of 4169 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user