mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-20 07:24:16 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d6224db08 | ||
|
|
4f53b058fa | ||
|
|
fdca73405e | ||
|
|
003087ee94 | ||
|
|
0a72a1acfc | ||
|
|
e88519f474 | ||
|
|
6d8c92b512 | ||
|
|
efe800c606 | ||
|
|
1634454700 | ||
|
|
d31a9605d5 | ||
|
|
f061b5848a | ||
|
|
a4b47dee6c | ||
|
|
54331d8e76 | ||
|
|
1a7ba74517 | ||
|
|
6285651194 | ||
|
|
3339f77e1c | ||
|
|
8b124bf298 | ||
|
|
0a2e3e5e88 | ||
|
|
6873051bcb | ||
|
|
5e2438d6f6 | ||
|
|
9d4caa7be4 | ||
|
|
cbfad43467 | ||
|
|
cc70a30315 | ||
|
|
c209895389 | ||
|
|
1f9f7101e2 | ||
|
|
ed89e7c845 | ||
|
|
80dff702fc | ||
|
|
43bd96a679 | ||
|
|
a87c83dae2 | ||
|
|
490d2b69e3 | ||
|
|
7eac936431 | ||
|
|
588b261d52 | ||
|
|
daf2cf02b3 | ||
|
|
b9d97f2434 | ||
|
|
1467dc963d | ||
|
|
89bf687fc4 | ||
|
|
2e7c80562b | ||
|
|
5d54b82be0 | ||
|
|
2ae1df4d42 | ||
|
|
26782e6f0c | ||
|
|
cc84d5b562 | ||
|
|
8bb1efdca3 | ||
|
|
7a5794c8e2 | ||
|
|
9dd20661f5 | ||
|
|
ad0ab66711 | ||
|
|
82396b5145 | ||
|
|
246e974dc1 | ||
|
|
203b6a4b4f | ||
|
|
f204f3a209 | ||
|
|
ba8e060370 | ||
|
|
c51172acbc | ||
|
|
39100a5011 | ||
|
|
fcee61a703 | ||
|
|
ce8cc2cf37 | ||
|
|
3b5bdcfb51 | ||
|
|
4d67e97973 | ||
|
|
da09f4d6d8 | ||
|
|
dbc7e2e0bf | ||
|
|
dd804b6665 | ||
|
|
33eb878834 | ||
|
|
2a2c456011 | ||
|
|
05a12f3899 | ||
|
|
eb04710f71 | ||
|
|
257760453e | ||
|
|
d11baeb08a | ||
|
|
47d322c993 | ||
|
|
d316207a61 | ||
|
|
e6daabbb47 | ||
|
|
53156449f1 | ||
|
|
e3d4c32d03 | ||
|
|
9cd5c39bbe | ||
|
|
a1fbf25465 | ||
|
|
ec74037f05 | ||
|
|
fff650b766 | ||
|
|
bae2a18e24 | ||
|
|
fd8a7ebb4c | ||
|
|
4a3a1491d4 | ||
|
|
9aa2c5ed8a | ||
|
|
d5699a7472 | ||
|
|
df98f8f626 | ||
|
|
d37b298f07 | ||
|
|
62f7fc17d1 | ||
|
|
6e4929246d | ||
|
|
909461975a | ||
|
|
dec191e5e7 | ||
|
|
07b0cd6f5a | ||
|
|
b7a892ecfe | ||
|
|
79d16102fa | ||
|
|
67efdb47aa | ||
|
|
751c233b49 | ||
|
|
f51734fea0 | ||
|
|
516a7111a7 | ||
|
|
1e3ff59b26 | ||
|
|
4c48f812d5 | ||
|
|
a63a6f751f | ||
|
|
923860a90b | ||
|
|
5a4ca2f907 | ||
|
|
ccc2ed0806 | ||
|
|
44c707e059 | ||
|
|
e7c458de3f | ||
|
|
11b05b10a4 | ||
|
|
d133ac0088 | ||
|
|
8951fcdebd | ||
|
|
ecbd5677ce | ||
|
|
e31b9c1a28 | ||
|
|
faa7b7c742 | ||
|
|
d08f326477 | ||
|
|
6500ed2075 | ||
|
|
56eb775a0f | ||
|
|
e225bcfb96 | ||
|
|
4be6abe416 | ||
|
|
c3de8b33de | ||
|
|
5658d6709c | ||
|
|
192538a741 | ||
|
|
b8b9d7bf8c | ||
|
|
1db8603910 | ||
|
|
1c5774fca5 | ||
|
|
0b332b06b6 | ||
|
|
0be9b049a3 | ||
|
|
6993639cc0 | ||
|
|
74172e3123 | ||
|
|
6e1c4f682e | ||
|
|
af0d282a1f | ||
|
|
09bf15fa05 | ||
|
|
43f7d95b4c | ||
|
|
8b536b1775 | ||
|
|
60a7f4bc35 | ||
|
|
0ed0e0c983 | ||
|
|
f4b1ca9f21 | ||
|
|
609104cfa8 | ||
|
|
935d11b433 | ||
|
|
e9eeb8335d | ||
|
|
4a2f42437f | ||
|
|
51b0693c99 | ||
|
|
185b366d8d | ||
|
|
a40e533068 | ||
|
|
5b3918fcb1 | ||
|
|
d315e99b63 | ||
|
|
8090ba0259 | ||
|
|
584400d011 | ||
|
|
124ad23a95 | ||
|
|
6b59aa38ae | ||
|
|
03554eb372 | ||
|
|
dabfe41f29 | ||
|
|
6e2c6fc51e | ||
|
|
d81986bcc5 | ||
|
|
ea17e916b8 | ||
|
|
ce56224038 | ||
|
|
9978932391 | ||
|
|
2ebc9e0deb | ||
|
|
7ddc621009 | ||
|
|
aa4e574eef | ||
|
|
15bc964fcc | ||
|
|
99713ac964 | ||
|
|
f9a6bd1343 | ||
|
|
f4bee872e1 | ||
|
|
be99b286b3 | ||
|
|
c7d5212f82 | ||
|
|
75726b3d34 | ||
|
|
8d7e76ed81 | ||
|
|
01b08b2297 | ||
|
|
cf51581ac1 | ||
|
|
d99fd56995 | ||
|
|
d149051c27 | ||
|
|
660aaa87ca | ||
|
|
4010f03b05 | ||
|
|
e2d2dcf337 | ||
|
|
b11aaf3f0c | ||
|
|
30ae065cb4 | ||
|
|
7f5b0559aa | ||
|
|
851954efb2 | ||
|
|
b8c6a459a6 | ||
|
|
4523089440 | ||
|
|
217fe47878 | ||
|
|
525e3db24a | ||
|
|
c3cac7d8c7 | ||
|
|
a92717bb1d | ||
|
|
9dc32eada2 | ||
|
|
d1644c0454 | ||
|
|
81ce84b3f1 | ||
|
|
18a8a405e0 | ||
|
|
07840b3b55 | ||
|
|
f639c5b14e | ||
|
|
a6851554e8 | ||
|
|
6859b83fe0 | ||
|
|
699da3cd26 | ||
|
|
6d429ef57b | ||
|
|
0bc7c20106 | ||
|
|
d8f83d09ee | ||
|
|
43874d35ec | ||
|
|
5a186e4b02 | ||
|
|
70b3ac21ef | ||
|
|
7f24782aee | ||
|
|
009835c17f | ||
|
|
18db39d480 | ||
|
|
5956c358d0 | ||
|
|
f18232eb6c | ||
|
|
ac69d57de0 | ||
|
|
9297d4a7d2 | ||
|
|
e6fd4e2255 | ||
|
|
c0fa6db602 | ||
|
|
d61d732a75 | ||
|
|
e9c0ac3c6b | ||
|
|
e071ecc1d7 | ||
|
|
14f6ef3da0 | ||
|
|
edac6d1f22 | ||
|
|
525dfab3e3 | ||
|
|
0b77986034 | ||
|
|
f0ab72db92 | ||
|
|
6243555db1 | ||
|
|
abefb652c1 | ||
|
|
483e3ff800 | ||
|
|
0642e5a67e | ||
|
|
9553aa6e15 | ||
|
|
090fb1a33e | ||
|
|
c4896a1c07 | ||
|
|
5f165d0a89 | ||
|
|
df2c1ca6f2 | ||
|
|
5e41b6c471 | ||
|
|
1d3fff08ed | ||
|
|
73ffcbcb41 | ||
|
|
510535fdd4 | ||
|
|
4ade79a307 | ||
|
|
954abb974e | ||
|
|
8f3093ea2b | ||
|
|
2ead5b3c40 | ||
|
|
47cab96d10 | ||
|
|
7cfcebf0f5 | ||
|
|
12e310f1fe | ||
|
|
f28b855189 | ||
|
|
43ed3aba41 | ||
|
|
1da4ee04d3 | ||
|
|
17b5e4015d | ||
|
|
1a8b8b7232 | ||
|
|
fd2e8cfa8a | ||
|
|
ccd05c04a5 | ||
|
|
e70edffaa3 | ||
|
|
3ecaaf33b6 | ||
|
|
c424ea52fa | ||
|
|
ebb1aaeefd | ||
|
|
f2d1f7bf52 | ||
|
|
deb42da38e | ||
|
|
43df2a754d | ||
|
|
d468d0ca28 | ||
|
|
e586d0aecf | ||
|
|
8e36fed7bf | ||
|
|
2e3bf585ea | ||
|
|
f57ad5a888 | ||
|
|
47fa31515d | ||
|
|
7e45c17078 | ||
|
|
32a0fc9b17 | ||
|
|
62c2757afc | ||
|
|
7a7596fb7b | ||
|
|
708b0d6365 | ||
|
|
daf1a1baa2 | ||
|
|
59150a655a | ||
|
|
5594ad1ce3 | ||
|
|
f12bd1368f | ||
|
|
6921ad49db | ||
|
|
4430fd21f5 | ||
|
|
64d8f22757 | ||
|
|
2a73524a19 | ||
|
|
bfd7a02c9d | ||
|
|
b108a0164a | ||
|
|
9f1aa916e4 | ||
|
|
5144a2a2df | ||
|
|
c9c2deae1a | ||
|
|
b220db9d85 | ||
|
|
f9e3d96673 | ||
|
|
6c2b65055b | ||
|
|
5fa1efb1f2 | ||
|
|
6b5d4fc557 | ||
|
|
369b125c52 | ||
|
|
732e049252 | ||
|
|
cdb419c3f1 | ||
|
|
2dde426df6 | ||
|
|
8c00499e76 | ||
|
|
32dac5fbe2 | ||
|
|
0d3f8de811 | ||
|
|
90b8747775 | ||
|
|
5333d23ad8 | ||
|
|
e38e11b890 | ||
|
|
79303c90d7 | ||
|
|
4eac0978ed | ||
|
|
aef5b9a057 | ||
|
|
c65b951493 | ||
|
|
75385e5c01 | ||
|
|
ad19baf1f6 | ||
|
|
fb7acbac0a | ||
|
|
7cd752ceb7 | ||
|
|
9df288e7e3 | ||
|
|
26396bbe1a | ||
|
|
a21850e85f | ||
|
|
b19358914a | ||
|
|
5a296f2d06 | ||
|
|
755c84039a | ||
|
|
136ea44509 | ||
|
|
ba758470fc | ||
|
|
878c39413a | ||
|
|
a63a3a8fa5 | ||
|
|
6a2e1f0271 | ||
|
|
21f1ecfa15 | ||
|
|
9c5966c49c | ||
|
|
ffc1d01a0a | ||
|
|
e66e6e0b51 | ||
|
|
b40a86e114 | ||
|
|
ef23d6d51a | ||
|
|
4fea28b313 | ||
|
|
5502fa4584 | ||
|
|
0e2ae6840b | ||
|
|
3a4493c914 | ||
|
|
66deda7c76 | ||
|
|
44beeec1d7 | ||
|
|
824f74a4ce | ||
|
|
8d72d2b3a4 | ||
|
|
876f1231ee | ||
|
|
ffbf395074 | ||
|
|
550b513f6b | ||
|
|
3f4ee39ca9 | ||
|
|
a4887ec3c3 | ||
|
|
f1185d8f34 | ||
|
|
030b2998eb | ||
|
|
3f8ae692ff | ||
|
|
07df92d75c | ||
|
|
8bbf98979e | ||
|
|
24408e53a3 | ||
|
|
f8160e254b | ||
|
|
ff9b585b29 | ||
|
|
095f413147 | ||
|
|
3dd1162a59 | ||
|
|
436225e341 | ||
|
|
ca89073537 | ||
|
|
7663145821 | ||
|
|
eed75eea58 | ||
|
|
194955770e | ||
|
|
3c3820cb38 | ||
|
|
fc25a328bf | ||
|
|
c7e857506d | ||
|
|
d343cd4f08 | ||
|
|
b4aa1b74ab | ||
|
|
b043c5eade | ||
|
|
c1a6ca80f5 | ||
|
|
a010ef0f60 | ||
|
|
1240632dae | ||
|
|
87df6e08ca | ||
|
|
d7ad947cbb | ||
|
|
434e7f75fa | ||
|
|
6f6e74e015 | ||
|
|
24f3176b1b | ||
|
|
2d0df240f4 | ||
|
|
def658ccc6 | ||
|
|
676b35fb1c | ||
|
|
18a1a693b5 | ||
|
|
617a797743 | ||
|
|
e1711b5d03 | ||
|
|
28ef4a0b2b | ||
|
|
8ee17150b8 | ||
|
|
b52017625d | ||
|
|
60ac9dfca2 | ||
|
|
c671735e84 | ||
|
|
29e5247131 | ||
|
|
f5c533094e | ||
|
|
06a8e08244 | ||
|
|
30eda70dda | ||
|
|
38ec4cc3ce | ||
|
|
435271becf | ||
|
|
991bb12c80 | ||
|
|
b8b643ebdf | ||
|
|
42ad8ba1ee | ||
|
|
9f425cce4c | ||
|
|
8be08acfa2 | ||
|
|
6422772530 | ||
|
|
a008a425ec | ||
|
|
0936015d84 | ||
|
|
488a59df2e | ||
|
|
5bf1533067 | ||
|
|
77024cd651 | ||
|
|
d0e209b2eb | ||
|
|
d934fc181c | ||
|
|
2ca6235b5d | ||
|
|
a271ed000e | ||
|
|
4d64ad8bb8 | ||
|
|
66a717b927 | ||
|
|
79114a90f5 | ||
|
|
4427748b8b | ||
|
|
ae9b8326a4 | ||
|
|
619c240e62 | ||
|
|
19889e7d6f | ||
|
|
107d1fc8ff | ||
|
|
636fddd642 | ||
|
|
13532a1f0a | ||
|
|
e1ace2ba08 | ||
|
|
96f0c1d148 | ||
|
|
03ecf8fe82 | ||
|
|
1c03a7fc5c | ||
|
|
85fe65612e | ||
|
|
88469f6141 | ||
|
|
d81ba4a8c8 | ||
|
|
734c0a37f7 | ||
|
|
7becca450a | ||
|
|
f2a5489363 | ||
|
|
c7a8cb566b | ||
|
|
a80031c3c5 | ||
|
|
b6d9eb3dcc | ||
|
|
4a594a8e4f | ||
|
|
384a28c517 | ||
|
|
57ef3842e9 | ||
|
|
5b509466e6 | ||
|
|
7019947083 | ||
|
|
5ddc9243dd | ||
|
|
1dd89597fd | ||
|
|
2ac1de4ae9 | ||
|
|
1f783ddf44 | ||
|
|
bee920f96a | ||
|
|
333e158ca5 | ||
|
|
67baf07efc | ||
|
|
4ba8ecd3fd | ||
|
|
aee42cdecc | ||
|
|
adb2a32fda | ||
|
|
d2c373b27d | ||
|
|
b0060bcb82 | ||
|
|
4f63db3f70 | ||
|
|
0d356514f2 | ||
|
|
6ce37944a7 | ||
|
|
8ef75f7c34 | ||
|
|
bf2da499d6 | ||
|
|
ef2fe6a775 | ||
|
|
2ac84f14be | ||
|
|
5078becbb3 | ||
|
|
e19784a429 | ||
|
|
1628652264 | ||
|
|
668c7d301b | ||
|
|
d56a63e712 | ||
|
|
8070b211ab | ||
|
|
5ed59d0282 | ||
|
|
70223cfcd6 | ||
|
|
7d0ff90b01 | ||
|
|
ecc09a710a | ||
|
|
846b4faefa | ||
|
|
66da382789 | ||
|
|
3378723bdd | ||
|
|
56723330b3 | ||
|
|
08e2244975 | ||
|
|
f9e934fa1a | ||
|
|
30eacc5019 | ||
|
|
3ba7c18288 | ||
|
|
958a09b280 | ||
|
|
cc66e7e7c8 | ||
|
|
7f58e0413c | ||
|
|
3c256ddc5d | ||
|
|
d2f8e62ecc | ||
|
|
5ce479b1af | ||
|
|
be2b893a3f | ||
|
|
32994ce4af | ||
|
|
0c6a43fe0a | ||
|
|
81e0376102 | ||
|
|
f21306a19d | ||
|
|
5f3dcac8e1 | ||
|
|
600bf94044 | ||
|
|
3b38b69034 | ||
|
|
faa8f0f9b6 | ||
|
|
125624b09e | ||
|
|
7186afda93 | ||
|
|
ee542abb5d | ||
|
|
c7638a6485 | ||
|
|
16795871c3 | ||
|
|
54eff0e27f | ||
|
|
0a85521028 | ||
|
|
587af255a6 | ||
|
|
06326f4d55 | ||
|
|
b73f9798e4 | ||
|
|
7ef5031717 | ||
|
|
ba30258ee6 | ||
|
|
940a65cac0 | ||
|
|
7878b05030 | ||
|
|
16eb63d2ea | ||
|
|
8539bc5ade | ||
|
|
02f357a88d | ||
|
|
92f72b45d5 | ||
|
|
7755b19abc | ||
|
|
6b62ba1c5b | ||
|
|
2514aa2e3c | ||
|
|
82982c54f9 | ||
|
|
726718a6f5 | ||
|
|
1609e232a2 | ||
|
|
fda2e265af | ||
|
|
5c19ae0e94 | ||
|
|
f01b3caeb1 | ||
|
|
9e7262660f | ||
|
|
4489197d01 | ||
|
|
3d411fc6f3 | ||
|
|
d4f26577a5 | ||
|
|
c744f761a1 | ||
|
|
7224ca43f3 | ||
|
|
b95cea35a2 | ||
|
|
d891791929 | ||
|
|
826b0ad4ce | ||
|
|
c99c61cc7a | ||
|
|
5eb57de264 | ||
|
|
976cfdbbc2 | ||
|
|
a7aea8d1ed | ||
|
|
9caa89b733 | ||
|
|
e42515c1ea | ||
|
|
901169775d | ||
|
|
3d86540d1d | ||
|
|
6cb97d067e | ||
|
|
ad323ebf2b | ||
|
|
18efedf7c5 | ||
|
|
4eaf4ff26b | ||
|
|
b1d2ac7822 | ||
|
|
87e6e583a6 | ||
|
|
2897e1a3ad | ||
|
|
dfd5a7c21d | ||
|
|
093f6411c7 | ||
|
|
845bea522b | ||
|
|
d0175f9c39 | ||
|
|
0b1d59e398 | ||
|
|
93bcb8994f | ||
|
|
ecee464b34 | ||
|
|
42789fcc24 | ||
|
|
f26b36f3e8 | ||
|
|
9f09052900 | ||
|
|
95a7ba0785 | ||
|
|
ef4a3b405d | ||
|
|
7096fcd43e | ||
|
|
eeab12ed86 | ||
|
|
ca961e8498 | ||
|
|
40b0a37110 | ||
|
|
6daf0861c9 | ||
|
|
03bc1e722e | ||
|
|
ce94c5e237 | ||
|
|
88aad1e107 | ||
|
|
c4fe14bd45 | ||
|
|
2191b539e3 | ||
|
|
dcd3495564 | ||
|
|
30559841d5 | ||
|
|
0dc0d5c981 | ||
|
|
3b981e2818 | ||
|
|
47bfc74ba9 | ||
|
|
8858e1bce8 | ||
|
|
04be430b8c | ||
|
|
d46351b866 | ||
|
|
d3ec29aa42 | ||
|
|
357abee462 | ||
|
|
c86a040768 | ||
|
|
d9e7dc158d | ||
|
|
46591968c0 | ||
|
|
bb7c256ecf | ||
|
|
d239ed1c9f | ||
|
|
604dece366 | ||
|
|
8b55f20684 | ||
|
|
8bf12ff32c | ||
|
|
0596482a8d | ||
|
|
b5a77aa62a | ||
|
|
5db27d9d93 | ||
|
|
a630e4937b | ||
|
|
96d27d17ce | ||
|
|
742b848f42 | ||
|
|
57884e3400 | ||
|
|
40459f4e01 | ||
|
|
a461072113 | ||
|
|
0105931414 | ||
|
|
c0b7b871ba | ||
|
|
1250c94600 | ||
|
|
ccbd5b17d3 | ||
|
|
2fd3abbb14 | ||
|
|
5bc019d3d3 | ||
|
|
91c24d5501 | ||
|
|
cd7f192fba | ||
|
|
7d0555fb67 | ||
|
|
3864708cf1 | ||
|
|
ef22a58631 | ||
|
|
acf4fa106f | ||
|
|
5a5704ee0b | ||
|
|
7e65416f10 | ||
|
|
2d7bc59db4 | ||
|
|
930469a006 | ||
|
|
c657ba52ad | ||
|
|
46499512eb | ||
|
|
c2779570fa | ||
|
|
750dc609bb | ||
|
|
1037183f4c | ||
|
|
979f959291 | ||
|
|
86cfe0465c | ||
|
|
61d461eea5 | ||
|
|
ff1733225a | ||
|
|
784fca98c8 | ||
|
|
1f0ebd8ba1 | ||
|
|
2e645f04e7 | ||
|
|
debe8eb81c | ||
|
|
2e8f8f258d | ||
|
|
697f40595e | ||
|
|
37404b6619 | ||
|
|
4b3a016d70 | ||
|
|
ed2af5f9b4 | ||
|
|
5418ab52b7 | ||
|
|
61037af138 | ||
|
|
f86cd11d74 | ||
|
|
e46b335dc0 | ||
|
|
79299112eb | ||
|
|
3d5bee3a2c | ||
|
|
466cc84c16 | ||
|
|
27f9e2ea9f | ||
|
|
593e10eec2 | ||
|
|
5d5b8b78d4 | ||
|
|
620c4087bc | ||
|
|
c5bf0e0cb7 | ||
|
|
7f7d53e00a | ||
|
|
073466bd6a | ||
|
|
151e88046d | ||
|
|
c3b1d6735e | ||
|
|
e3a5da64a5 | ||
|
|
3c4599423d | ||
|
|
2bb1f27e07 | ||
|
|
e3adbbbd0b | ||
|
|
5e6838bdc9 | ||
|
|
fc6720e090 | ||
|
|
e29f671363 | ||
|
|
6e501c7b8a | ||
|
|
7dd3cc6f9f | ||
|
|
f346f080ee | ||
|
|
9f19e585db | ||
|
|
bc74487301 | ||
|
|
693baa8cef | ||
|
|
9ae60d4859 | ||
|
|
281efef207 | ||
|
|
d893537ae6 | ||
|
|
986de265fe | ||
|
|
d25633e213 | ||
|
|
0c8c7157f6 | ||
|
|
e393442df9 | ||
|
|
fc94fe30d0 | ||
|
|
1065079be6 | ||
|
|
e426172b18 | ||
|
|
effe93286a | ||
|
|
2a669618a2 | ||
|
|
44cd0e1e10 | ||
|
|
621155f06f | ||
|
|
6c116e261d | ||
|
|
bcc89d91f7 | ||
|
|
8e874afbd5 | ||
|
|
9421cd0b2d | ||
|
|
37c46042c3 | ||
|
|
c5429f0515 | ||
|
|
f0375ca446 | ||
|
|
b34bac9b5e | ||
|
|
f42e418346 | ||
|
|
a060c01f58 | ||
|
|
f41686fab4 | ||
|
|
be88d584cf | ||
|
|
80aa87935d | ||
|
|
405073cca9 | ||
|
|
22cb831138 | ||
|
|
95c8c75789 | ||
|
|
e8e3cadeff | ||
|
|
8123ba9a01 | ||
|
|
5aa6c98dc1 | ||
|
|
8e16b8e4a8 | ||
|
|
90f0a5eac6 | ||
|
|
892d3be144 | ||
|
|
164242ae4b | ||
|
|
07b8c5087b | ||
|
|
abba2e969b | ||
|
|
0a4b57ea01 | ||
|
|
422ecb758f | ||
|
|
20f953b9cb | ||
|
|
d2f1488ef1 | ||
|
|
a3aedd5fad | ||
|
|
e2d07f7e78 | ||
|
|
3aa0fac852 | ||
|
|
238243a7d4 | ||
|
|
9533b62ebf | ||
|
|
d06445e04b | ||
|
|
69255a938b | ||
|
|
773f24238f | ||
|
|
548ed4a1f0 | ||
|
|
76bf764262 | ||
|
|
075882b7b0 | ||
|
|
d25299e1ba | ||
|
|
0160d42302 | ||
|
|
6ca7a013d6 | ||
|
|
60ed93e13b | ||
|
|
747e2e2e27 | ||
|
|
16d1694a78 | ||
|
|
17e74d9ed2 | ||
|
|
923a42e9a3 | ||
|
|
bac66dfbf9 | ||
|
|
6895c0b392 | ||
|
|
ef08319670 | ||
|
|
1aee758f87 | ||
|
|
3d0eca9432 | ||
|
|
93936a7498 | ||
|
|
8e873ccd00 | ||
|
|
7a188af002 | ||
|
|
aaffeb9fac | ||
|
|
67711bcb0d | ||
|
|
f93c158caa | ||
|
|
c74d05a47b | ||
|
|
f867c0f8a1 | ||
|
|
98d024295e | ||
|
|
963d3de709 | ||
|
|
e20fa7f3a2 | ||
|
|
719d262a00 | ||
|
|
9ad9f28f33 | ||
|
|
6ac4a405b5 | ||
|
|
64fbdff13d | ||
|
|
65011f42da | ||
|
|
d763967d4b | ||
|
|
44c807aedd | ||
|
|
6e6bb72245 | ||
|
|
ca96b45637 | ||
|
|
d8ff7786df | ||
|
|
35ed07e0ba | ||
|
|
7b002606bf | ||
|
|
ac0d0a6680 | ||
|
|
e5033cceec | ||
|
|
b5d7e2969f | ||
|
|
6b4bd90bfa | ||
|
|
b2aff55160 | ||
|
|
569c34bca0 | ||
|
|
e63c966756 | ||
|
|
43f9efb9e4 | ||
|
|
82666d62ef | ||
|
|
72b62481a7 | ||
|
|
9cf13e320a | ||
|
|
c8c4a0f61b | ||
|
|
801c44389e | ||
|
|
fbdb060e10 | ||
|
|
09edc78bdc | ||
|
|
6951817088 | ||
|
|
2a22d25975 | ||
|
|
875adc8bdf | ||
|
|
b8b914a99c | ||
|
|
59401d27ca | ||
|
|
26cb21f541 | ||
|
|
49154759c0 | ||
|
|
abc07968e5 | ||
|
|
d28899ae84 | ||
|
|
04c44de145 | ||
|
|
7997d52df5 | ||
|
|
f3d899cbf5 | ||
|
|
e540596c20 | ||
|
|
b1aa7a8e88 | ||
|
|
3eef5b2c02 | ||
|
|
443aa0040c | ||
|
|
48c1db6a8a | ||
|
|
b9f2530e2f | ||
|
|
3cb7c0206a | ||
|
|
a7360f1145 | ||
|
|
c4e3c4b34f | ||
|
|
ae763ae25d | ||
|
|
dd0b4f27d4 | ||
|
|
faf5bcb32b | ||
|
|
93f2c83c0e | ||
|
|
63b5545502 | ||
|
|
31c99517d7 | ||
|
|
2e3a2ff69a | ||
|
|
4aa2c83e03 | ||
|
|
376d7a8878 | ||
|
|
dd5f55f4fc | ||
|
|
d2806c7ec0 | ||
|
|
2db34f4d49 | ||
|
|
a451189d83 | ||
|
|
f3a2be4a06 | ||
|
|
dddd97bc22 | ||
|
|
8e53be6810 | ||
|
|
d24b9ec0ae | ||
|
|
d8900341ac | ||
|
|
0465d047e7 | ||
|
|
cf1f3677ae | ||
|
|
354b02612d | ||
|
|
f06d5b806a | ||
|
|
49385a08ad | ||
|
|
d07c8c8851 | ||
|
|
803c3678e3 | ||
|
|
3118f743a0 | ||
|
|
2fa5c7eca4 | ||
|
|
a09829ed4b | ||
|
|
cf3d92d6e1 | ||
|
|
524b63e88c | ||
|
|
0a930db7d6 | ||
|
|
e6338bbde1 | ||
|
|
e4f7dd21b6 | ||
|
|
b0bae93d06 | ||
|
|
9b93a5cd04 | ||
|
|
3142717154 | ||
|
|
3dcfacfeed | ||
|
|
a51f5fefc4 | ||
|
|
fcc3bbf9b6 | ||
|
|
109390d21e | ||
|
|
c7dd91ef90 | ||
|
|
3d15abfdae | ||
|
|
a9caaefd16 | ||
|
|
261c786a10 | ||
|
|
a5270ccea8 | ||
|
|
08865dc218 | ||
|
|
3f50767e48 | ||
|
|
8ff5887955 | ||
|
|
2aa240337c | ||
|
|
44d75d9955 | ||
|
|
3b61b87501 | ||
|
|
04de362bc9 | ||
|
|
e06175f600 | ||
|
|
fe78d4f1e7 | ||
|
|
4a1de4c0da | ||
|
|
22b77411ec | ||
|
|
3f730ead84 | ||
|
|
d52d70a014 | ||
|
|
0a7b485514 | ||
|
|
151c384313 | ||
|
|
8586d44d7e | ||
|
|
5c8b600cb1 | ||
|
|
afd67d2f00 | ||
|
|
125a3fdc5e | ||
|
|
9963ff9c8e | ||
|
|
8547ea4c6a | ||
|
|
fd434e8b21 | ||
|
|
1524866432 | ||
|
|
19fa9390ff | ||
|
|
a335050332 | ||
|
|
8aa9ecffc5 | ||
|
|
ef02e5169d | ||
|
|
ba31a56949 | ||
|
|
6b7bd75b18 | ||
|
|
013d6625d5 | ||
|
|
ca228ca23e | ||
|
|
1dce68212f | ||
|
|
2683c2433b | ||
|
|
2929800a9f | ||
|
|
c1b04ace78 | ||
|
|
04a54dbc2a | ||
|
|
e7c1f31315 | ||
|
|
62f6917d81 | ||
|
|
babefc7bd3 | ||
|
|
a09c9f4a2e | ||
|
|
5876598ca0 | ||
|
|
f45d643739 | ||
|
|
c1ba176e27 | ||
|
|
9b3013c51a | ||
|
|
a746720a6e | ||
|
|
a95c61c1d8 | ||
|
|
d5da8e4e2b | ||
|
|
861e11a713 | ||
|
|
23ac209c05 | ||
|
|
8df789ae34 | ||
|
|
432e95e4ec | ||
|
|
401ed0a7a5 | ||
|
|
dae6957093 | ||
|
|
7b6405fba7 | ||
|
|
6dc3e74607 | ||
|
|
617066340b | ||
|
|
2dd6db352f | ||
|
|
56e13641df | ||
|
|
9d62113388 | ||
|
|
47b4a6c498 | ||
|
|
7dfe3a1c59 | ||
|
|
44acfc7ec8 | ||
|
|
7933f5e357 | ||
|
|
858c5a27ad | ||
|
|
28e41a0ae9 | ||
|
|
ae79f9be66 | ||
|
|
4a6d58c36e | ||
|
|
5bf6687f1f | ||
|
|
beb80f0422 | ||
|
|
0e86d6fbdb | ||
|
|
2a8e4f19af | ||
|
|
6ed8b6d058 | ||
|
|
33812b3f4a | ||
|
|
b62e542801 | ||
|
|
0080110fad | ||
|
|
19ef661457 | ||
|
|
7946221f0b | ||
|
|
203a42c043 | ||
|
|
d3998dd03b | ||
|
|
e752a48343 | ||
|
|
71955b777b | ||
|
|
d686d07d53 | ||
|
|
72b4c9c6ab | ||
|
|
4b991ab67a | ||
|
|
59399124fa | ||
|
|
3eb4962d7d | ||
|
|
42d3b4c326 | ||
|
|
f3931567f9 | ||
|
|
154adafbcb | ||
|
|
4a1e511262 | ||
|
|
3fc907e50f | ||
|
|
bbf441c3b4 | ||
|
|
bbf660d80e | ||
|
|
a1c3bc26c9 | ||
|
|
fc73e0e482 | ||
|
|
e7727afbe8 | ||
|
|
de5ce2660d | ||
|
|
2e661cb2f8 | ||
|
|
ebeaad0b4e | ||
|
|
ce60c048f8 | ||
|
|
6795ff7db9 | ||
|
|
931f1fb27d | ||
|
|
74625a8d65 | ||
|
|
03e8ccee7d | ||
|
|
01b9e4cb55 | ||
|
|
b5d5014ba2 | ||
|
|
4f7bfd14c0 | ||
|
|
7347300f05 | ||
|
|
aa6bdd2786 | ||
|
|
db0aeeabbd | ||
|
|
9aa426ed56 | ||
|
|
30f9348c26 | ||
|
|
baf76c51f9 | ||
|
|
6abef569e8 | ||
|
|
ade88a6055 | ||
|
|
11d0274a1b | ||
|
|
957de5d6f7 | ||
|
|
f5f4c5c672 | ||
|
|
5924495035 | ||
|
|
c486f65e74 | ||
|
|
b19a7d45d8 | ||
|
|
7f7397f684 | ||
|
|
39142909f6 | ||
|
|
23f5b84c5e | ||
|
|
630b6e6313 | ||
|
|
4396ca9420 | ||
|
|
5286a69c34 | ||
|
|
059d5542c9 | ||
|
|
a09e77a17d | ||
|
|
5a236e3bea | ||
|
|
aba5add7f9 | ||
|
|
a4190672d3 | ||
|
|
10da9182d1 | ||
|
|
2de5bc2855 | ||
|
|
b32db945be | ||
|
|
44d02e6dfd | ||
|
|
fc096dc6fa | ||
|
|
1d52bbde58 | ||
|
|
1a049e854b | ||
|
|
5b15ef81f5 | ||
|
|
05088c1063 | ||
|
|
04c09efd75 | ||
|
|
2c0576099a | ||
|
|
27b49f9d7e | ||
|
|
6a247c425a | ||
|
|
7910034916 | ||
|
|
c56e5d17be | ||
|
|
522eabce5e | ||
|
|
0e4b874994 | ||
|
|
319cc8a5f9 | ||
|
|
b5c26392e1 | ||
|
|
7d53c55cc1 | ||
|
|
3e30994541 | ||
|
|
a669fcba7a | ||
|
|
851053fd9a | ||
|
|
b71a87e803 | ||
|
|
c72658d21a | ||
|
|
d0b8c59769 | ||
|
|
583b74fb7e | ||
|
|
cf6f28aa3e | ||
|
|
f3ece64635 | ||
|
|
6343b7087d | ||
|
|
e279dc4cea | ||
|
|
fc5763c8e8 | ||
|
|
9e32fcda88 | ||
|
|
7fe8c7b547 | ||
|
|
38329514f9 | ||
|
|
37705dfc71 | ||
|
|
e8e7e3144f | ||
|
|
0da229e8f4 | ||
|
|
1029b2523d | ||
|
|
477b520cf0 | ||
|
|
d54fdf5452 | ||
|
|
bfb47aba87 | ||
|
|
d241a57d38 | ||
|
|
01479a82de | ||
|
|
198820d95d | ||
|
|
86741a4e95 | ||
|
|
7d859661ba | ||
|
|
d04c95514e | ||
|
|
e6e3953a85 | ||
|
|
104f1232f3 | ||
|
|
b55bf6e6c1 | ||
|
|
d79af8fcc2 | ||
|
|
ff05429f58 | ||
|
|
0dbabe629a | ||
|
|
3348d46b5a | ||
|
|
aff1a245c2 | ||
|
|
51802f71a5 | ||
|
|
32f34f1444 | ||
|
|
b7309ccdf1 | ||
|
|
8abaac56ff | ||
|
|
a462ab98e9 | ||
|
|
af602a414a | ||
|
|
67e426354c | ||
|
|
e2f8e31fa0 | ||
|
|
d67cce4184 | ||
|
|
ca63b412cb | ||
|
|
89e372c229 | ||
|
|
4ae5b49764 | ||
|
|
1057f32b34 | ||
|
|
e3948eb4ba | ||
|
|
6d363235a5 | ||
|
|
fb50b4fa78 | ||
|
|
85fbaa2b97 | ||
|
|
1440453640 | ||
|
|
e364959d25 | ||
|
|
89642e71b5 | ||
|
|
d8413b3b7d | ||
|
|
92ba038af7 | ||
|
|
2ac2cc2ebf | ||
|
|
990ed86283 | ||
|
|
953d702ed6 | ||
|
|
1fa828ad1a | ||
|
|
9f16fa189f | ||
|
|
a7e78cc3fb | ||
|
|
353c40cc46 | ||
|
|
3a7c8d660c | ||
|
|
b2c9108ffc | ||
|
|
ef447e2ba1 | ||
|
|
85f0b37b03 | ||
|
|
9f6cdfcd11 | ||
|
|
376477767b | ||
|
|
f1376be2e0 | ||
|
|
5e57ec0e67 | ||
|
|
15721f1279 | ||
|
|
e8fe58438d | ||
|
|
8ef04b1ad0 | ||
|
|
a3d6776c02 | ||
|
|
e7a529257a | ||
|
|
714afabf30 | ||
|
|
f1df8d07bb | ||
|
|
a18c4b6449 | ||
|
|
2099342352 | ||
|
|
50ee2727a2 | ||
|
|
571e918ee0 | ||
|
|
7c5d8721c0 | ||
|
|
b5984a965e | ||
|
|
0e0bd94251 | ||
|
|
a9d2d52c1e | ||
|
|
b7c67a16d9 | ||
|
|
35615526a1 | ||
|
|
c43ce52e78 | ||
|
|
61a313f24b | ||
|
|
d71393cead | ||
|
|
64bb6714a3 | ||
|
|
f8336d6adb | ||
|
|
30245f4aed | ||
|
|
a861652d6f | ||
|
|
5fe5ba78da | ||
|
|
8fa9977617 | ||
|
|
0df2dd3ce2 | ||
|
|
80893f2592 | ||
|
|
91cf10541b | ||
|
|
aaccfdee44 | ||
|
|
a8449de731 | ||
|
|
9d98641a94 | ||
|
|
4f13227d9e | ||
|
|
70e9ee0dd1 | ||
|
|
d43932a9d2 | ||
|
|
7118261fee | ||
|
|
89b171db36 | ||
|
|
1c4778790a | ||
|
|
d20d1488de | ||
|
|
c969f277ee | ||
|
|
cf4a77af75 | ||
|
|
4042592420 | ||
|
|
a750241ec3 | ||
|
|
8ab79ec1ae | ||
|
|
a9289df93f | ||
|
|
f6c42c4b53 | ||
|
|
bfb121938a | ||
|
|
20d26d4bcd | ||
|
|
474b851275 | ||
|
|
5c541275c5 | ||
|
|
486e92dfc9 | ||
|
|
959ce3bc92 | ||
|
|
3866c740e9 | ||
|
|
a65a85fb67 | ||
|
|
c921b7bb1c | ||
|
|
7acf2d80d2 | ||
|
|
01b2d6cb39 | ||
|
|
e2665e3cbe | ||
|
|
9b95094207 | ||
|
|
59b637c317 | ||
|
|
52963e8e80 | ||
|
|
43f42ac917 | ||
|
|
0352951d8c | ||
|
|
fe334d0aed | ||
|
|
f2371d8735 | ||
|
|
3c9608efbd | ||
|
|
8dff3b55c9 | ||
|
|
b42b6303ae | ||
|
|
263e6d5cca | ||
|
|
5b5622b4a7 | ||
|
|
e328bf616f | ||
|
|
52ba831b1c | ||
|
|
12b1016d66 | ||
|
|
a471bfec6a | ||
|
|
3b6d3116bd | ||
|
|
5c0c680f56 | ||
|
|
3af8f4772f | ||
|
|
10b2593389 | ||
|
|
cf67d58236 | ||
|
|
748227319c | ||
|
|
94c18e835a | ||
|
|
cfb5693ffe | ||
|
|
3e1f3d5a51 | ||
|
|
c0bf529a6b | ||
|
|
f951ee1f91 | ||
|
|
e8ac971f9e | ||
|
|
b1278aff2e | ||
|
|
c26c14227c | ||
|
|
ce36bcc951 | ||
|
|
1134cd7788 | ||
|
|
7920d2225c | ||
|
|
d0faaf2d53 | ||
|
|
fc60878c25 | ||
|
|
1b941536d0 | ||
|
|
4215bfc6fe | ||
|
|
22d215b2c7 | ||
|
|
69eb7979c1 | ||
|
|
0f0c24d31b | ||
|
|
30c5a0d9cd | ||
|
|
93e0773758 | ||
|
|
c92e64afbd | ||
|
|
6ba9dc74d8 | ||
|
|
f69c244080 | ||
|
|
f1b4a973a8 | ||
|
|
efe49ee4c1 | ||
|
|
51573cb9f5 | ||
|
|
f6ab374718 | ||
|
|
7ace88ae0d | ||
|
|
5f5e04506c | ||
|
|
9a58e121e8 | ||
|
|
7153347d67 | ||
|
|
611ccd9605 | ||
|
|
0befa2eb39 | ||
|
|
b0677bb66d | ||
|
|
f476f1447c | ||
|
|
c8907232da | ||
|
|
864ca81d1d | ||
|
|
636427ac6b | ||
|
|
3d68caed6b | ||
|
|
4f7e25038c | ||
|
|
ba0a95ed26 | ||
|
|
0cd25be408 | ||
|
|
c6fa0ddde3 | ||
|
|
b64a9b7a44 | ||
|
|
326bf39bed | ||
|
|
ac4c37ba48 | ||
|
|
305017d523 | ||
|
|
19d1c552fe | ||
|
|
7d6908d146 | ||
|
|
9cf399f956 | ||
|
|
a0b4450e5b | ||
|
|
9d983a7c96 | ||
|
|
89be08bc58 | ||
|
|
6dcf3e15da | ||
|
|
e66cb9479f | ||
|
|
bd8d9cc3aa | ||
|
|
9453b86907 | ||
|
|
ecf9441fae | ||
|
|
70b659acbe | ||
|
|
2ebb9f2763 | ||
|
|
1231b13dfd | ||
|
|
bebad4d361 | ||
|
|
ed5a1887f4 | ||
|
|
342e689825 | ||
|
|
c5c1a9b25b | ||
|
|
7637905de2 | ||
|
|
ec780b7b93 | ||
|
|
3728c59f1d | ||
|
|
4442d9a706 | ||
|
|
8928b35f30 | ||
|
|
fca189ee4c | ||
|
|
d0fb3dde66 | ||
|
|
fc4377abaf | ||
|
|
97a62752c6 | ||
|
|
87e1e55da7 | ||
|
|
5410cda182 | ||
|
|
ee240ca201 | ||
|
|
98ffa0a256 | ||
|
|
2f450b7ea0 | ||
|
|
099b50dbfa | ||
|
|
ece7a443fe | ||
|
|
984f2669b8 | ||
|
|
9b94b9e3fe | ||
|
|
a781bcb7f4 | ||
|
|
b596f38ab5 | ||
|
|
f2b4d6f829 | ||
|
|
d2d2dc64db | ||
|
|
5b8171a719 | ||
|
|
838ad5ec1a | ||
|
|
3d16323e33 | ||
|
|
ba25eaa788 | ||
|
|
747412e522 | ||
|
|
059ff25d8e | ||
|
|
831143427d | ||
|
|
de51d4860e | ||
|
|
6569038777 | ||
|
|
075aec3ac0 | ||
|
|
734847db68 | ||
|
|
a99f2b78a1 | ||
|
|
037473f2e1 | ||
|
|
378f735e9f | ||
|
|
4cdac76ca5 | ||
|
|
9ed3c8a6bb | ||
|
|
252d289a8d | ||
|
|
832bad1fee | ||
|
|
d5b99316e5 | ||
|
|
3723c5dae5 | ||
|
|
7c3fa7aef5 | ||
|
|
4ee31db7a0 | ||
|
|
0d8cb7393c | ||
|
|
0d3d0a8da1 | ||
|
|
e45eb7f2be | ||
|
|
128e5c414c | ||
|
|
5a70d98c71 | ||
|
|
69d4215397 | ||
|
|
722190305b | ||
|
|
428d4859da | ||
|
|
9455860554 | ||
|
|
eb4b42c089 | ||
|
|
79b3d7359a | ||
|
|
c95ea19da1 | ||
|
|
a8b3f2af14 | ||
|
|
2b8ccc38bb | ||
|
|
baebadb7a6 | ||
|
|
f73db056f2 | ||
|
|
429ac1e71c | ||
|
|
07cd91dda4 | ||
|
|
956f61e775 | ||
|
|
14fc2d2c70 | ||
|
|
9c07240948 | ||
|
|
7e2260578e | ||
|
|
7f2d781241 | ||
|
|
df05ade4a7 | ||
|
|
e4b45e512f | ||
|
|
623bb52fd8 | ||
|
|
ab809dabf8 | ||
|
|
2ebf26c156 | ||
|
|
1ffc598fd4 | ||
|
|
0495d954bc | ||
|
|
cc6a7a6a72 | ||
|
|
b081bbb444 | ||
|
|
69cbb262ba | ||
|
|
ba2a398da3 | ||
|
|
a8a87e7f79 | ||
|
|
2ffd1e6e47 | ||
|
|
efaebb43aa | ||
|
|
d201350a08 | ||
|
|
81184d77fe | ||
|
|
b9d60e0018 | ||
|
|
f50ac49ede | ||
|
|
70d8b8a88a | ||
|
|
535f1b5988 | ||
|
|
366c903f84 | ||
|
|
1781ff36c6 | ||
|
|
4e131d9a54 | ||
|
|
7f6fec5530 | ||
|
|
2d43014029 | ||
|
|
33ea66ea88 | ||
|
|
b74e449efd | ||
|
|
afd4820713 | ||
|
|
8e032fa26a | ||
|
|
897669a069 | ||
|
|
03ea78b40b | ||
|
|
18465cf6cb | ||
|
|
ac6ccd2dc7 | ||
|
|
fb32d11d64 | ||
|
|
ec75e911bd | ||
|
|
603f032e28 | ||
|
|
cf76e43898 | ||
|
|
a0df548dd3 | ||
|
|
dff6048a07 | ||
|
|
478d465cb6 | ||
|
|
271f308c36 | ||
|
|
956958fa0e | ||
|
|
6a68da0559 | ||
|
|
6683eee49a | ||
|
|
f258d5f932 | ||
|
|
600995a220 | ||
|
|
803dfed9f7 | ||
|
|
771cb45b49 | ||
|
|
a2a7689881 | ||
|
|
e9f4c3d0c7 | ||
|
|
a5ef5769b9 | ||
|
|
9d251f94e5 | ||
|
|
d1e8d52f5c | ||
|
|
14d2ae0c0e | ||
|
|
dafa3bde8b | ||
|
|
cb923cef47 | ||
|
|
93888aeed3 | ||
|
|
c41e34e9d8 | ||
|
|
154aea7a61 | ||
|
|
bc53cd1aa4 | ||
|
|
ef51aa7e98 | ||
|
|
705c5ce790 | ||
|
|
26dee50e68 | ||
|
|
be3d7ef11d | ||
|
|
ef5897969f | ||
|
|
d9cd0257ba | ||
|
|
95bb8cb1e5 | ||
|
|
e1aa2f651a | ||
|
|
03c535e80d | ||
|
|
6f9c4f220e | ||
|
|
6f3813b685 | ||
|
|
510dde6923 | ||
|
|
a7761c1867 | ||
|
|
a2af965bad | ||
|
|
28b6ed500b | ||
|
|
6991fa39cc | ||
|
|
274469d299 | ||
|
|
a0b8581ec5 | ||
|
|
b844a0e98d | ||
|
|
e5f14ac176 | ||
|
|
a1110a847d | ||
|
|
a3889fe369 | ||
|
|
bd93918d9b | ||
|
|
421a6ba143 | ||
|
|
f091256edb | ||
|
|
c0e4733eb8 | ||
|
|
e636a6ad58 | ||
|
|
071617bfc5 | ||
|
|
8a079c98cc | ||
|
|
fa95f96a6d | ||
|
|
c198abe5ac | ||
|
|
ef5ba0f1d1 | ||
|
|
fff7cd53cc | ||
|
|
64ce5138e1 | ||
|
|
3c07e7a0d8 | ||
|
|
a1510ffcb5 | ||
|
|
1b96bce44f | ||
|
|
294a5e39a6 | ||
|
|
65fdd6e25f | ||
|
|
6d2ef1f985 | ||
|
|
14af19873c | ||
|
|
2f5dd470d2 | ||
|
|
dc4592ae4d | ||
|
|
baa3cfa636 | ||
|
|
ad324df937 | ||
|
|
f2b301cb17 | ||
|
|
6e369ea787 | ||
|
|
f640abda91 | ||
|
|
77f8f11d99 | ||
|
|
12b4c27468 | ||
|
|
75f3073cbf | ||
|
|
5eddfaed98 | ||
|
|
89b4fdef56 | ||
|
|
6f08c1f758 | ||
|
|
1155789a75 | ||
|
|
8c4a74179d | ||
|
|
bdbc94e54a | ||
|
|
30f880361e | ||
|
|
c5ac347538 | ||
|
|
008da9467f | ||
|
|
ee78249c2f | ||
|
|
412c67b47a | ||
|
|
f4191ad984 | ||
|
|
ea8d1100ac | ||
|
|
20e8c033cc | ||
|
|
ff2d10e0e1 | ||
|
|
672c39e58d | ||
|
|
36d3849118 | ||
|
|
43d7dfde4c | ||
|
|
51a056b3d7 | ||
|
|
6e22d6687c | ||
|
|
369fdf07e2 | ||
|
|
8c6c1b3ccc | ||
|
|
160bdf5472 | ||
|
|
18c70002cb | ||
|
|
4b8cfd9fdd | ||
|
|
ffa5fd5b2a | ||
|
|
9fb4798c77 | ||
|
|
a6039278c3 | ||
|
|
c50702c83b | ||
|
|
d4c1e62c72 | ||
|
|
488c609109 | ||
|
|
0a6e24104e | ||
|
|
d6acac0208 | ||
|
|
b02f61ef21 | ||
|
|
eb82b44726 | ||
|
|
ca035f9447 | ||
|
|
19aa3c0854 | ||
|
|
93675d90bb | ||
|
|
0d90c1d960 | ||
|
|
d826f968b5 | ||
|
|
f682d7489f | ||
|
|
649b1adfdd | ||
|
|
3d67ea736f | ||
|
|
ba88f837fe | ||
|
|
6728703473 | ||
|
|
55521afe35 | ||
|
|
8820b02406 | ||
|
|
e79ba6117b | ||
|
|
668d29a9d7 | ||
|
|
6b97acdb50 | ||
|
|
9a11021560 | ||
|
|
ee18217520 | ||
|
|
16de60f82d | ||
|
|
8cd94f976c | ||
|
|
9ab0662cbf | ||
|
|
5cceed1fd7 | ||
|
|
03a1b51bd7 | ||
|
|
1edf567ea7 | ||
|
|
fa73eddf50 | ||
|
|
1923ae6f4b | ||
|
|
229f3dc061 | ||
|
|
cc95042a94 | ||
|
|
302f54971d | ||
|
|
dff88403b5 | ||
|
|
cd3f9af232 | ||
|
|
b217162cad | ||
|
|
7d24a61ae8 | ||
|
|
ca1b37dbcf | ||
|
|
0e887fb2ea | ||
|
|
a122adf05d | ||
|
|
04fc1e25e4 | ||
|
|
cff402affb | ||
|
|
e1e0368f8c | ||
|
|
8ee39d3822 | ||
|
|
e2b533db64 | ||
|
|
fc5db74f16 | ||
|
|
42e62a3698 | ||
|
|
62f03356ca | ||
|
|
25bb0912fb | ||
|
|
beff1d8d42 | ||
|
|
7dc56cc075 | ||
|
|
394d653978 | ||
|
|
742fa27029 | ||
|
|
18b962dc57 | ||
|
|
233a179dad | ||
|
|
9cc76c5ee6 | ||
|
|
401ba40373 | ||
|
|
6dad50aab1 | ||
|
|
9a43f868aa | ||
|
|
294e9bb590 | ||
|
|
d101311109 | ||
|
|
e0e920bfe0 | ||
|
|
3a090d7c1d | ||
|
|
dc851d856d | ||
|
|
2f8fe43ea3 | ||
|
|
959f96dd74 | ||
|
|
6620d2d023 | ||
|
|
408742494a | ||
|
|
f7ae9c06d8 | ||
|
|
b4c0d8e829 | ||
|
|
b2a410d6cf | ||
|
|
16fa453163 | ||
|
|
fc678684f5 | ||
|
|
8f7db7e52f | ||
|
|
e9d6cf278a | ||
|
|
d1c6f5f98e | ||
|
|
48f581525e | ||
|
|
8d967856b5 | ||
|
|
ee83cf2989 | ||
|
|
cb304d35e2 | ||
|
|
65185c5854 | ||
|
|
91526674be | ||
|
|
3e11ff65db | ||
|
|
4a3ac17a2f | ||
|
|
2283f1ddc9 | ||
|
|
ae78887746 | ||
|
|
9de4bf839f | ||
|
|
295e51181b | ||
|
|
287e3a0090 | ||
|
|
4d150e71a3 | ||
|
|
0debbc263e | ||
|
|
a9e5e40a54 | ||
|
|
cf61080980 | ||
|
|
3e33731cf0 | ||
|
|
d7cda90acd | ||
|
|
9a7dcc8c1a | ||
|
|
d477121790 | ||
|
|
60e7a21e39 | ||
|
|
b915ca2add | ||
|
|
e90ef7aaee | ||
|
|
e918daaa9b | ||
|
|
83b4f645db | ||
|
|
1797df7017 | ||
|
|
3beda9c201 | ||
|
|
68e6bd668c | ||
|
|
696cf61fe9 | ||
|
|
7fe56766fc | ||
|
|
1e62f8c951 | ||
|
|
82b995f96f | ||
|
|
05aa0c2482 | ||
|
|
bca5f4bec4 | ||
|
|
8b599f78c0 | ||
|
|
38776e74bc | ||
|
|
21ce09a5b5 | ||
|
|
5fabec6a42 | ||
|
|
64f361d4b1 | ||
|
|
f8ae842971 | ||
|
|
ca01d6efb8 | ||
|
|
498ab6d165 | ||
|
|
8e8524ccc8 | ||
|
|
714936f710 | ||
|
|
11c0477a34 | ||
|
|
4f65c6bbcc | ||
|
|
c7ee183fe4 | ||
|
|
80545ce1f2 | ||
|
|
c80edcfe9f | ||
|
|
74318fb3c0 | ||
|
|
83a8942724 | ||
|
|
48f57068d8 | ||
|
|
3f85916764 | ||
|
|
ab0f544267 | ||
|
|
14e16c874e | ||
|
|
7fb87ad67f | ||
|
|
1b85417ae6 | ||
|
|
8d41e6fece | ||
|
|
ab2906991d | ||
|
|
ac85c75cc4 | ||
|
|
7f1fae307c | ||
|
|
cce41082a1 | ||
|
|
902a489b04 | ||
|
|
30006fe520 | ||
|
|
2ce1bb9c3f | ||
|
|
c468fa2a95 | ||
|
|
06ef342953 | ||
|
|
02121105de | ||
|
|
e24788157a | ||
|
|
63905c608e | ||
|
|
69127e6952 | ||
|
|
87a84f02a3 | ||
|
|
0b5bea9965 | ||
|
|
0d5e3a080c | ||
|
|
a4ba07de99 | ||
|
|
970a5ec763 | ||
|
|
6f338c44c4 | ||
|
|
f360fadd3f | ||
|
|
846fa4722b | ||
|
|
9752f1d492 | ||
|
|
ce2d386b7e | ||
|
|
993d433d03 | ||
|
|
ede344db3a | ||
|
|
6c397da1f8 | ||
|
|
1d9862fe11 | ||
|
|
2d3db00639 | ||
|
|
7269233134 | ||
|
|
27be0ad808 | ||
|
|
51e875694c | ||
|
|
92d64d77c5 | ||
|
|
579e9e0b8c | ||
|
|
25b9c491c3 | ||
|
|
8f1b48b0ab | ||
|
|
611d3c3b63 | ||
|
|
3a658e10f1 | ||
|
|
92a182e5a8 | ||
|
|
954f0cc26f | ||
|
|
5e0b4e1be6 | ||
|
|
c72511da6a | ||
|
|
15c65ad4e1 | ||
|
|
d06657e2ff | ||
|
|
5dae1ee34f | ||
|
|
88a5d33bad | ||
|
|
42e02a6129 | ||
|
|
7d56164882 | ||
|
|
3e60ad21bf | ||
|
|
55c4e9635a | ||
|
|
101d0212a7 | ||
|
|
f0338b5247 | ||
|
|
80136b4aff | ||
|
|
f0a89e99f5 | ||
|
|
09f830c315 | ||
|
|
ace92f8be0 | ||
|
|
7e08f495a7 | ||
|
|
a8299b4f54 | ||
|
|
bdb00b8d58 | ||
|
|
4e18127371 | ||
|
|
e5165e6fba | ||
|
|
77dc237549 | ||
|
|
e3cc04f538 | ||
|
|
322d1ad75c | ||
|
|
4767903a07 | ||
|
|
0064ce97f0 | ||
|
|
71f067f678 | ||
|
|
8f37dc8570 | ||
|
|
b15b640652 | ||
|
|
3e892f30ca | ||
|
|
20f3efced9 | ||
|
|
25bcd0f2a9 | ||
|
|
d990bf794a | ||
|
|
aa25feb57e | ||
|
|
b203fc7c68 | ||
|
|
9298e045d3 | ||
|
|
e3255588d3 | ||
|
|
514f23cf4d | ||
|
|
ab206b2abf | ||
|
|
2f8a65d364 | ||
|
|
a30e47d094 | ||
|
|
0a78a87a17 | ||
|
|
886ec9c574 | ||
|
|
434fe894bc | ||
|
|
cde9dbe406 | ||
|
|
c5262f188e | ||
|
|
8f57364547 | ||
|
|
eb193f230b | ||
|
|
6a868f975e | ||
|
|
66a8db598f | ||
|
|
bfa13583e3 | ||
|
|
d865e646b9 | ||
|
|
f630537897 | ||
|
|
aaf7ae8fc3 | ||
|
|
52cba23190 | ||
|
|
c48c74a0cf | ||
|
|
9c6c27909d | ||
|
|
3ba3e5cf76 | ||
|
|
df4040a96a | ||
|
|
6932e468cf | ||
|
|
a82279b068 | ||
|
|
0ae7b9c120 | ||
|
|
72f86069a2 | ||
|
|
509c32db70 | ||
|
|
7fa45c0658 | ||
|
|
4e81a6af83 | ||
|
|
66d3eb3400 | ||
|
|
7e36cb76ba | ||
|
|
fc47651c33 | ||
|
|
6948d70d94 | ||
|
|
eee2db8ad9 | ||
|
|
318a36a831 | ||
|
|
4d90bd9e31 | ||
|
|
4e81151e11 | ||
|
|
18195b778a | ||
|
|
326bddad2a | ||
|
|
f4b41a43cf | ||
|
|
38c762f775 | ||
|
|
9833d466c4 | ||
|
|
4d965333ef | ||
|
|
a6ec18690d | ||
|
|
d3fe0b48d8 | ||
|
|
35220e1c4d | ||
|
|
de7bc9870d | ||
|
|
680a3a5d13 | ||
|
|
cf8612c99f | ||
|
|
e817d3355c | ||
|
|
53b7f33ec4 | ||
|
|
5ed9a29f81 | ||
|
|
89406c4754 | ||
|
|
b27b26837f | ||
|
|
0595008fce | ||
|
|
d6b2e019c7 | ||
|
|
25cfb1f5c0 | ||
|
|
10a159b315 | ||
|
|
60c113b0e8 | ||
|
|
ec4330aea7 | ||
|
|
f263fe30a4 | ||
|
|
0ec2f68a96 | ||
|
|
1156b909eb | ||
|
|
9ed246e482 | ||
|
|
c342c5c4f6 | ||
|
|
3b7ef5b262 | ||
|
|
79bf3d8d4f | ||
|
|
cfe91a8722 | ||
|
|
c3e2d34372 | ||
|
|
56b6ee5d2a | ||
|
|
3f34ac1c75 | ||
|
|
be5015d16b | ||
|
|
2c1d4cfc40 | ||
|
|
5bf75e122c | ||
|
|
aa51048990 | ||
|
|
6d117f824d | ||
|
|
0a591e748f | ||
|
|
be2cb5d2f2 | ||
|
|
280ec22348 | ||
|
|
f9a815bba6 | ||
|
|
1534dcc932 | ||
|
|
e19ae7af59 | ||
|
|
1726d6f59e | ||
|
|
756f395158 | ||
|
|
90d2cf4970 | ||
|
|
37e70fd5bb | ||
|
|
126481833b | ||
|
|
b2630cfb49 | ||
|
|
579e2e95e3 | ||
|
|
6580436900 | ||
|
|
a0ecf72a1c | ||
|
|
bc3aaa94de | ||
|
|
482ca5ed15 | ||
|
|
66894c2e8a | ||
|
|
5d5a1fadd9 | ||
|
|
2d531c3a15 | ||
|
|
e4da11727a | ||
|
|
309f97b443 | ||
|
|
98240e910e | ||
|
|
6d79d3d1f8 | ||
|
|
def4e19359 | ||
|
|
6cfd055bec | ||
|
|
1208b25b66 | ||
|
|
b25bf70224 | ||
|
|
7ecb139dba | ||
|
|
2a7720852a | ||
|
|
627eb556cb | ||
|
|
e251155f4f | ||
|
|
4e9c44e574 | ||
|
|
5b662df7cd | ||
|
|
802574fb44 | ||
|
|
51f3334711 | ||
|
|
254b5c963b | ||
|
|
d5f64a79b2 | ||
|
|
dd54a714cb | ||
|
|
d40e9e3d73 | ||
|
|
d5066adb4b | ||
|
|
f933aae562 | ||
|
|
db65a80a7f | ||
|
|
2f9658fa22 | ||
|
|
ab06365a81 | ||
|
|
2bc27bd6f5 | ||
|
|
078ac1abe4 | ||
|
|
05259eb0d2 | ||
|
|
8c272ea032 | ||
|
|
f58f29389c | ||
|
|
854b137820 | ||
|
|
fb8b5ac6b6 | ||
|
|
35106f5e67 | ||
|
|
a5ea58dbf7 | ||
|
|
b4ddc8e5fc | ||
|
|
2223405e79 | ||
|
|
7260e0d0f5 | ||
|
|
44cf7f7330 | ||
|
|
465ceab271 | ||
|
|
fa818d50d1 | ||
|
|
deb75df77a | ||
|
|
aae47e103b | ||
|
|
957dbecb3d | ||
|
|
75fe59ef79 | ||
|
|
63ba5cf39d | ||
|
|
8a0b7fbc47 | ||
|
|
ea9fb5bcb0 | ||
|
|
21d8ceacf0 | ||
|
|
986cf025a0 | ||
|
|
85b936ead2 | ||
|
|
f241679087 | ||
|
|
6618cdc0ad | ||
|
|
fe2de5d8ae | ||
|
|
bd954e7292 | ||
|
|
86367298cc | ||
|
|
08346a2326 | ||
|
|
1bb9090434 | ||
|
|
879bcdf8d8 | ||
|
|
1b7658d8f9 | ||
|
|
d635705449 | ||
|
|
af1b17cb98 | ||
|
|
944ef83805 | ||
|
|
20b3e95b4f | ||
|
|
c2de0dd613 | ||
|
|
2a7f5f55b0 | ||
|
|
a03539ad8b | ||
|
|
c420a8a686 | ||
|
|
8d6a2e8882 | ||
|
|
8da9156bb5 | ||
|
|
ffc8a5188d | ||
|
|
4eb1117659 | ||
|
|
b4602c1e48 | ||
|
|
80ede42191 | ||
|
|
ea6937c0ac | ||
|
|
2f99ba8526 | ||
|
|
16324e16c7 | ||
|
|
c2e1ecf5b1 | ||
|
|
cd353217d6 | ||
|
|
6903f67f0f | ||
|
|
487dab793a | ||
|
|
4cd3f9bd38 | ||
|
|
f581e76057 | ||
|
|
312aa856ad | ||
|
|
6f4363e95b | ||
|
|
595ba92f06 | ||
|
|
df9114d7b0 | ||
|
|
1496d0e482 | ||
|
|
92f5783f35 | ||
|
|
da1895125a | ||
|
|
bcdd470567 | ||
|
|
7cd0070d90 | ||
|
|
8217949fa2 | ||
|
|
4bdf1553c9 | ||
|
|
6fd5d38cd8 | ||
|
|
8a737104ef | ||
|
|
a608da759b | ||
|
|
c828625cc1 | ||
|
|
7ead247fcb | ||
|
|
7a62af78d0 | ||
|
|
9896d6e6b2 | ||
|
|
9c376183e0 | ||
|
|
e5cc9a3cbf | ||
|
|
985979ab14 | ||
|
|
377a4c2284 | ||
|
|
24242db981 | ||
|
|
73a4152b5d | ||
|
|
b5eb094566 | ||
|
|
71140381e0 | ||
|
|
22387b2610 | ||
|
|
da53a7d469 | ||
|
|
b9b30f9f53 | ||
|
|
c984eb9b8c | ||
|
|
eef548f6a1 | ||
|
|
2da8ffb8cd | ||
|
|
8188c21641 | ||
|
|
19dca8c5bb | ||
|
|
5de5b6047a | ||
|
|
695c4159dc | ||
|
|
2624315bd5 | ||
|
|
fff6e50702 | ||
|
|
753b69726a | ||
|
|
df273aca7e | ||
|
|
9e9feb5980 | ||
|
|
e71eb465fb | ||
|
|
e9f2550a26 | ||
|
|
12bfd98011 | ||
|
|
2b45056842 | ||
|
|
c86fdf07db | ||
|
|
385ffd5b27 | ||
|
|
ad6b746124 | ||
|
|
57e8b59db6 | ||
|
|
ecb869695e | ||
|
|
c99c7ee6c9 | ||
|
|
d3c47fe1a4 | ||
|
|
1c21b23e8e | ||
|
|
bb55cd3c42 | ||
|
|
4a74190241 | ||
|
|
586f9594fb | ||
|
|
e68facfd51 | ||
|
|
7d423fa49d | ||
|
|
886553a923 | ||
|
|
ff4a00d103 | ||
|
|
dbdf8a97ae | ||
|
|
2433e31db0 | ||
|
|
5538aac732 | ||
|
|
c05f169d54 | ||
|
|
24aaefe342 | ||
|
|
c167e881fb | ||
|
|
9a8c22f487 | ||
|
|
fd8077a5cd | ||
|
|
6dd196a7a6 | ||
|
|
bdfe14e278 | ||
|
|
1c7b318c3f | ||
|
|
a6acc30eea | ||
|
|
c54a849243 | ||
|
|
1f2871f649 | ||
|
|
147d5902ed | ||
|
|
ec47ca1983 | ||
|
|
6ca6fc6989 | ||
|
|
f29015426f | ||
|
|
57f09fd64d | ||
|
|
2477ee4952 | ||
|
|
2bd7fd2aa7 | ||
|
|
bc5529ded8 | ||
|
|
b05736e4fb | ||
|
|
6a187881c0 | ||
|
|
d1accc4e09 | ||
|
|
e7e130460e | ||
|
|
d33a02f6cd | ||
|
|
8f6c511598 | ||
|
|
7fb04d51ae | ||
|
|
64d5275554 | ||
|
|
76041a9f55 | ||
|
|
502f7de040 | ||
|
|
a86512e807 | ||
|
|
2e19dbe05f | ||
|
|
18d8f07242 | ||
|
|
fb0ff734d7 | ||
|
|
13a5482f91 | ||
|
|
4a5794ad5f | ||
|
|
7652aca406 | ||
|
|
f1dfb1c952 | ||
|
|
b4f866be03 | ||
|
|
4fed35d189 | ||
|
|
c3cff6a911 | ||
|
|
91f718f39d | ||
|
|
e4ea01cfd2 | ||
|
|
dd7d5a46e8 | ||
|
|
3be4b08bb0 | ||
|
|
2fde7b7879 | ||
|
|
60777e5714 | ||
|
|
9d7fcc4987 | ||
|
|
95ed1c3ac3 | ||
|
|
7e285969a7 | ||
|
|
083f1be766 | ||
|
|
d39ed3c03f | ||
|
|
a068bda34f | ||
|
|
559f37e5d2 | ||
|
|
d50b7de668 | ||
|
|
35c5191a4d | ||
|
|
6df6296cd1 | ||
|
|
b88a565344 | ||
|
|
d98bc1ec63 | ||
|
|
74886db10d | ||
|
|
48e4fd8088 | ||
|
|
54c7f896ad | ||
|
|
ccd14e6505 | ||
|
|
dc33534478 | ||
|
|
83d79e23d5 | ||
|
|
151f99e343 | ||
|
|
ccea63f1e2 | ||
|
|
1019419d85 | ||
|
|
a234823d0a | ||
|
|
d2015845e8 | ||
|
|
1857cca081 | ||
|
|
195bbf4652 | ||
|
|
af76d937e1 | ||
|
|
885780a92b | ||
|
|
547bfe26d7 | ||
|
|
bc87fdde1f | ||
|
|
6fc8324337 | ||
|
|
5103d91db0 | ||
|
|
b67ab5ecd3 | ||
|
|
3aa085f17e | ||
|
|
1b9a78827a | ||
|
|
3299e0fa6a | ||
|
|
79e12c8dd8 | ||
|
|
ced33114cc | ||
|
|
294324e31b | ||
|
|
1b27d652af | ||
|
|
e98209249f | ||
|
|
9ddf09e187 | ||
|
|
73e975cfa1 | ||
|
|
a942ea6ee2 | ||
|
|
38ca7c030f | ||
|
|
7d59edc8a5 | ||
|
|
7d05450244 | ||
|
|
8e5ba70706 | ||
|
|
d43c40fc59 | ||
|
|
02ce707546 | ||
|
|
4a11ed6dc4 | ||
|
|
72d07fc3fb | ||
|
|
9b910b26a9 | ||
|
|
4a9be7b4a5 | ||
|
|
34958c654f | ||
|
|
bf91156182 | ||
|
|
b774b6920d | ||
|
|
56f6143873 | ||
|
|
7ba051c7ff | ||
|
|
63f5c240a4 | ||
|
|
ba91e433c3 | ||
|
|
2818b207db | ||
|
|
0527066a4c | ||
|
|
a48400535f | ||
|
|
fa201d21e2 | ||
|
|
c9222ff6f6 | ||
|
|
a45d311339 | ||
|
|
b59278601c | ||
|
|
b48a913fbf | ||
|
|
a0ef779aee | ||
|
|
861ff636b1 | ||
|
|
bbce4bdeb0 | ||
|
|
df0ceb4850 | ||
|
|
b1e45756dd | ||
|
|
4b52878dc1 | ||
|
|
62a4f18866 | ||
|
|
b00faf3930 | ||
|
|
d6ddb2b247 | ||
|
|
900510e7f2 | ||
|
|
7370af0084 | ||
|
|
9644693de3 | ||
|
|
b6bc269505 | ||
|
|
82161c10f8 | ||
|
|
c939033031 | ||
|
|
8c8c040fb3 | ||
|
|
48a07e2b34 | ||
|
|
7bdfbb17b5 | ||
|
|
492646edc3 | ||
|
|
975096b221 | ||
|
|
0c4c790a65 | ||
|
|
012539b5d3 | ||
|
|
f4cd9f27e4 | ||
|
|
449c2322b8 | ||
|
|
7efdcdc592 | ||
|
|
356aa27f70 | ||
|
|
a579c7882f | ||
|
|
3077cf6bb5 | ||
|
|
7c46ee50a4 | ||
|
|
1d37910bd4 | ||
|
|
5555ff2ac1 | ||
|
|
2ad93d79f5 | ||
|
|
6d32fe743b | ||
|
|
f2dd96c3bf | ||
|
|
9b4384d3e6 | ||
|
|
c1831e58f5 | ||
|
|
991f241209 | ||
|
|
b565cf4be1 | ||
|
|
8a5e1cd4f1 | ||
|
|
4445121023 | ||
|
|
1421869094 | ||
|
|
24480ef13a | ||
|
|
73bd7991bb | ||
|
|
6e74761977 | ||
|
|
a7f7a226d6 | ||
|
|
491cdc5fef | ||
|
|
98fe47d085 | ||
|
|
2290627c5f | ||
|
|
656d436028 | ||
|
|
cff8e822f2 | ||
|
|
5dfd46f809 | ||
|
|
97a6395ddd | ||
|
|
5226106ff0 | ||
|
|
5e838e3f10 | ||
|
|
574860f117 | ||
|
|
c19857d463 | ||
|
|
6741d58bec | ||
|
|
eb806dbca5 | ||
|
|
7d8aa683ff | ||
|
|
3bceaa7a2f | ||
|
|
bfa45b66ac | ||
|
|
e39b89859f | ||
|
|
1f14a01994 | ||
|
|
91310ce98c | ||
|
|
94dcfbf197 | ||
|
|
d2b4b8b279 | ||
|
|
aaa9495ceb | ||
|
|
a8b75c9b13 | ||
|
|
f21685e81d | ||
|
|
e24a7f887a | ||
|
|
54b5ab6d79 | ||
|
|
361b2ed7c7 | ||
|
|
cee6c7c999 | ||
|
|
3e5efd4090 | ||
|
|
10b8ba1ec8 | ||
|
|
be90380775 | ||
|
|
3b2e775698 | ||
|
|
01ba90689f | ||
|
|
e53fa82c46 | ||
|
|
48ccbfd860 | ||
|
|
601d4e1f48 | ||
|
|
7fce3bdd25 | ||
|
|
4b1bccd4b5 | ||
|
|
28e809f92f | ||
|
|
866e0e3fa9 |
No files matched your search
@@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: Bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots or Video Recordings**
|
|
||||||
If applicable, add screenshots or video recordings to help explain your problem.
|
|
||||||
|
|
||||||
**Server and Plugin Informations**
|
|
||||||
- Installed plugins:
|
|
||||||
- Iris Version:
|
|
||||||
- Server Platform and Version [eg: PaperSpigot 1.16.3 #240]:
|
|
||||||
- Operating System (if applicable):
|
|
||||||
- Server Logs:
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here, server timings reports, Iris dump information, complete console log etc. Please do not make Pastebin dumps or screenshot expire.
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: Enhancement, Addition
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
+7
-120
@@ -1,125 +1,12 @@
|
|||||||
# User-specific stuff
|
|
||||||
|
build/
|
||||||
|
|
||||||
|
.gradle/
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
*.iws
|
|
||||||
|
|
||||||
# IntelliJ
|
|
||||||
out/
|
|
||||||
|
|
||||||
# Compiled class file
|
|
||||||
*.class
|
|
||||||
|
|
||||||
# Log file
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# BlueJ files
|
|
||||||
*.ctxt
|
|
||||||
|
|
||||||
# Package Files #
|
|
||||||
*.war
|
|
||||||
*.nar
|
|
||||||
*.ear
|
|
||||||
*.zip
|
|
||||||
*.tar.gz
|
|
||||||
*.rar
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
|
||||||
hs_err_pid*
|
|
||||||
|
|
||||||
*~
|
|
||||||
|
|
||||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
||||||
.fuse_hidden*
|
|
||||||
|
|
||||||
# KDE directory preferences
|
|
||||||
.directory
|
|
||||||
|
|
||||||
# Linux trash folder which might appear on any partition or disk
|
|
||||||
.Trash-*
|
|
||||||
|
|
||||||
# .nfs files are created when an open file is removed but is still being accessed
|
|
||||||
.nfs*
|
|
||||||
|
|
||||||
# General
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.AppleDouble
|
|
||||||
.LSOverride
|
|
||||||
|
|
||||||
# Icon must end with two \r
|
collection/
|
||||||
Icon
|
|
||||||
|
|
||||||
# Thumbnails
|
src/main/java/com/volmit/iris/util/uniques/
|
||||||
._*
|
|
||||||
|
|
||||||
# Files that might appear in the root of a volume
|
|
||||||
.DocumentRevisions-V100
|
|
||||||
.fseventsd
|
|
||||||
.Spotlight-V100
|
|
||||||
.TemporaryItems
|
|
||||||
.Trashes
|
|
||||||
.VolumeIcon.icns
|
|
||||||
.com.apple.timemachine.donotpresent
|
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
|
||||||
.AppleDB
|
|
||||||
.AppleDesktop
|
|
||||||
Network Trash Folder
|
|
||||||
Temporary Items
|
|
||||||
.apdisk
|
|
||||||
|
|
||||||
# Windows thumbnail cache files
|
|
||||||
Thumbs.db
|
|
||||||
Thumbs.db:encryptable
|
|
||||||
ehthumbs.db
|
|
||||||
ehthumbs_vista.db
|
|
||||||
|
|
||||||
# Dump file
|
|
||||||
*.stackdump
|
|
||||||
|
|
||||||
# Folder config file
|
|
||||||
[Dd]esktop.ini
|
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
|
||||||
$RECYCLE.BIN/
|
|
||||||
|
|
||||||
# Windows Installer files
|
|
||||||
*.cab
|
|
||||||
*.msi
|
|
||||||
*.msix
|
|
||||||
*.msm
|
|
||||||
*.msp
|
|
||||||
|
|
||||||
# Windows shortcuts
|
|
||||||
*.lnk
|
|
||||||
|
|
||||||
target/
|
|
||||||
|
|
||||||
pom.xml.tag
|
|
||||||
pom.xml.releaseBackup
|
|
||||||
pom.xml.versionsBackup
|
|
||||||
pom.xml.next
|
|
||||||
|
|
||||||
release.properties
|
|
||||||
dependency-reduced-pom.xml
|
|
||||||
buildNumber.properties
|
|
||||||
.mvn/timing.properties
|
|
||||||
.mvn/wrapper/maven-wrapper.jar
|
|
||||||
.flattened-pom.xml
|
|
||||||
|
|
||||||
# Common working directory
|
|
||||||
run/
|
|
||||||
|
|
||||||
.gradle
|
|
||||||
**/build/
|
|
||||||
!src/**/build/
|
|
||||||
|
|
||||||
# Ignore Gradle GUI config
|
|
||||||
gradle-app.setting
|
|
||||||
|
|
||||||
# Cache of project
|
|
||||||
.gradletasknamecache
|
|
||||||
|
|
||||||
# Custom folders
|
|
||||||
release/
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
|
||||||
<component name="FacetManager">
|
|
||||||
<facet type="minecraft" name="Minecraft">
|
|
||||||
<configuration>
|
|
||||||
<autoDetectTypes>
|
|
||||||
<platformType>SPIGOT</platformType>
|
|
||||||
<platformType>BUKKIT</platformType>
|
|
||||||
</autoDetectTypes>
|
|
||||||
</configuration>
|
|
||||||
</facet>
|
|
||||||
</component>
|
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
|
||||||
<output url="file://$MODULE_DIR$/target/classes" />
|
|
||||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" name="Maven: io.timeandspace:smoothie-map:2.0.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.timeandspace:jpsg-core:1.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.11.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.papermc:paperlib:1.0.5" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit.craftbukkit:1.16.3:1.16.3" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit.craftbukkit:1.16.4:1.16.4" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.bergerkiller.bukkit:BKCommonLib:1.16.4-v2" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-core:7.2.0-SNAPSHOT" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit.worldedit-libs:core:7.2.0-SNAPSHOT" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: de.schlichtherle:truezip:6.8.3" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-profile-default_2.13:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.scala-lang:scala-library:2.13.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-http:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-kernel-spec:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-annotations:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:annotations:3.0.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-cio:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-io:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-services:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-logging:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.inject:javax.inject:1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.httpcomponents:httpcore:4.4.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:jcl-over-slf4j:1.7.28" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-odf:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-comp-zipdriver:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-comp-zip:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bouncycastle:bcprov-jdk15on:1.63" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-tar:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-comp-tardriver:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-tar-bzip2:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-tar-gzip:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-tar-xz:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.tukaani:xz:1.8" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-zip-raes:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-profile-base_2.13:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-access-swing:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-access:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-file:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-jar:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-driver-zip:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-comp-ibm437:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truevfs:truevfs-kernel-impl_2.13:0.12.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-key-console:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-key-default:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-key-swing:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-key-macosx:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-key-spec:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.truecommons:truecommons-shed:2.5.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.dev.jna:jna:4.1.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mozilla:rhino-runtime:1.7.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr4-runtime:4.7.2" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit.worldedit-libs:bukkit:7.2.0-SNAPSHOT" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.8.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-api:2.8.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-bukkit:1.7" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: it.unimi.dsi:fastutil:8.2.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: io.lumine.xikage:MythicMobs:4.9.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.4.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.10" level="project" />
|
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.zeroturnaround:zt-zip:1.14" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.6" level="project" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
-35
@@ -1,35 +0,0 @@
|
|||||||
VOLMIT SOFTWARE PUBLIC LICENSE
|
|
||||||
|
|
||||||
Version 1.2, 13 March 2021
|
|
||||||
|
|
||||||
Copyright :copyright: 2021 Andrew Baker
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions
|
|
||||||
|
|
||||||
"License" refers to this file. An updated version is available at <https://github.com/VolmitSoftware/Licenses>. The version at <https://github.com/VolmitSoftware/Licenses> is always correct and up-to-date.
|
|
||||||
|
|
||||||
"Author" refers to the person Andrew Baker <andrew@andrewcbaker.net>.
|
|
||||||
|
|
||||||
"Repository" refers to the location at which the software protected under this License is stored.
|
|
||||||
|
|
||||||
"Content" refers to the files and folders inside of the Repository.
|
|
||||||
|
|
||||||
"Copyright" refers to the laws on intellectual property and the legal rights automatically granted to the Author during the creation of the Content.
|
|
||||||
|
|
||||||
"Modify" refers to editing the Content as well as creating programs or code which depends on the Content to run.
|
|
||||||
|
|
||||||
"Compile" refers to the act of building the Content into an executable file such as a JAR file.
|
|
||||||
|
|
||||||
1. You may freely copy, Modify, distribute, create derivative works, or distribute derivative works of the Content as long as you obey the unmodified License that is supplied with the Content.
|
|
||||||
|
|
||||||
2. You may not copy, Modify, or distribute the Content in such a way that it will, directly or indirectly, generate revenue without explicit, written permission from the Author.
|
|
||||||
|
|
||||||
3. You may not host publicly available download links to Compiled versions of the Content unless you are using less than 5% of the original Content in a Repository of your own.
|
|
||||||
|
|
||||||
4. For any conditions not outlined in the License, refer to your country or state laws for Copyright.
|
|
||||||
|
|
||||||
5. If you do not agree to any of the above conditions you must delete the Content in its entirety as well as all copies of the Content and derivative works of the Content that you have made.
|
|
||||||
|
|
||||||
END TERMS AND CONDITIONS
|
|
||||||
@@ -1,3 +1,83 @@
|
|||||||
# Iris
|
# IrisBukkit
|
||||||
# [Support](https://discord.gg/3xxPTpT) **|** [Documentation](https://docs.volmit.com/iris/) **|** [Git](https://github.com/IrisDimensions)
|
|
||||||

|
The master branch is for the latest version of minecraft.
|
||||||
|
|
||||||
|
# [Support](https://discord.gg/3xxPTpT) **|** [Documentation](https://docs.volmit.com/iris/) **
|
||||||
|
|** [Git](https://github.com/IrisDimensions)
|
||||||
|
|
||||||
|
# Building
|
||||||
|
|
||||||
|
Building IrisBukkit is fairly simple, though you will need to setup a few things if your system has never been used for
|
||||||
|
java
|
||||||
|
development.
|
||||||
|
|
||||||
|
Consider supporting our development by buying IrisBukkit on spigot! We work hard to make IrisBukkit the best it can be
|
||||||
|
for everyone.
|
||||||
|
|
||||||
|
### Command Line Builds
|
||||||
|
|
||||||
|
1. Install [Java JDK 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||||
|
2. Set the JDK installation path to `JAVA_HOME` as an environment variable.
|
||||||
|
* Windows
|
||||||
|
1. Start > Type `env` and press Enter
|
||||||
|
2. Advanced > Environment Variables
|
||||||
|
3. Under System Variables, click `New...`
|
||||||
|
4. Variable Name: `JAVA_HOME`
|
||||||
|
5. Variable Value: `C:\Program Files\Java\jdk-17.0.1` (verify this exists after installing java don't just copy
|
||||||
|
the example text)
|
||||||
|
* MacOS
|
||||||
|
1. Run `/usr/libexec/java_home -V` and look for Java 17
|
||||||
|
2. Run `sudo nano ~/.zshenv`
|
||||||
|
3. Add `export JAVA_HOME=$(/usr/libexec/java_home)` as a new line
|
||||||
|
4. Use `CTRL + X`, then Press `Y`, Then `ENTER`
|
||||||
|
5. Quit & Reopen Terminal and verify with `echo $JAVA_HOME`. It should print a directory
|
||||||
|
3. If this is your first time building IrisBukkit for MC 1.18+ run `gradlew setup` inside the root IrisBukkit project
|
||||||
|
folder.
|
||||||
|
Otherwise, skip this step. Grab a coffee, this may take up to 5 minutes depending on your cpu & internet connection.
|
||||||
|
4. Once the project has setup, run `gradlew iris`
|
||||||
|
5. The IrisBukkit jar will be placed in `IrisBukkit/build/IrisBukkit-XXX-XXX.jar` Enjoy! Consider supporting us by
|
||||||
|
buying it on spigot!
|
||||||
|
|
||||||
|
### IDE Builds (for development)
|
||||||
|
|
||||||
|
* Run `gradlew setup` any time you get dependency issues with craftbukkit
|
||||||
|
* Configure ITJ Gradle to use JDK 17 (in settings, search for gradle)
|
||||||
|
* Add a build line in the build.gradle for your own build task to directly compile IrisBukkit into your plugins folder
|
||||||
|
if you
|
||||||
|
prefer.
|
||||||
|
* Resync the project & run your newly created task (under the development folder in gradle tasks!)
|
||||||
|
|
||||||
|
# IrisBukkit Toolbelt
|
||||||
|
|
||||||
|
Everyone needs a tool-belt.
|
||||||
|
|
||||||
|
```java
|
||||||
|
package com.volmit.iris.core.tools;
|
||||||
|
|
||||||
|
// Get IrisDataManager from a world
|
||||||
|
IrisToolbelt.access(anyWorld).getCompound().getData();
|
||||||
|
|
||||||
|
// Get Default Engine from world
|
||||||
|
IrisToolbelt.access(anyWorld).getCompound().getDefaultEngine();
|
||||||
|
|
||||||
|
// Get the engine at the given height
|
||||||
|
IrisToolbelt.access(anyWorld).getCompound().getEngineForHeight(68);
|
||||||
|
|
||||||
|
// IS THIS THING ON?
|
||||||
|
boolean yes=IrisToolbelt.isIrisWorld(world);
|
||||||
|
|
||||||
|
// GTFO for worlds (moves players to any other world, just not this one)
|
||||||
|
IrisToolbelt.evacuate(world);
|
||||||
|
|
||||||
|
IrisAccess access=IrisToolbelt.createWorld() // If you like builders...
|
||||||
|
.name("myWorld") // The world name
|
||||||
|
.dimension("terrifyinghands")
|
||||||
|
.seed(69133742) // The world seed
|
||||||
|
.headless(true) // Headless make gen go fast
|
||||||
|
.pregen(PregenTask // Define a pregen job to run
|
||||||
|
.builder()
|
||||||
|
.center(new Position2(0,0)) // REGION coords (1 region = 32x32 chunks)
|
||||||
|
.radius(4) // Radius in REGIONS. Rad of 4 means a 9x9 Region map.
|
||||||
|
.build())
|
||||||
|
.create();
|
||||||
|
```
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
id "io.freefair.lombok" version "6.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'com.volmit.iris'
|
||||||
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes('Contains-Sources': 'java,class')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
apply plugin: 'java'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url "https://arcanearts.jfrog.io/artifactory/archives" }
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly 'org.projectlombok:lombok:1.18.24'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.24'
|
||||||
|
annotationProcessor 'systems.manifold:manifold-ext:2022.1.19'
|
||||||
|
implementation 'art.arcane:Source:22.9.3'
|
||||||
|
implementation 'art.arcane:Cram:22.9.3'
|
||||||
|
implementation 'art.arcane:Amulet:22.9.5'
|
||||||
|
implementation 'com.google.code.gson:gson:2.9.0'
|
||||||
|
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.1'
|
||||||
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
|
||||||
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
|
||||||
|
testAnnotationProcessor 'systems.manifold:manifold-ext:2022.1.19'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
id "io.freefair.lombok" version "6.3.0"
|
||||||
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||||
|
id "de.undercouch.download" version "5.0.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
group rootProject.group
|
||||||
|
version rootProject.version
|
||||||
|
|
||||||
|
def nmsVersion = "1.19"
|
||||||
|
def apiVersion = '1.19'
|
||||||
|
def spigotJarVersion = '1.19-R0.1-SNAPSHOT'
|
||||||
|
def name = getRootProject().getName() // Defined in settings.gradle
|
||||||
|
def main = 'com.volmit.iris.platform.bukkit.IrisBukkit'
|
||||||
|
|
||||||
|
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
|
||||||
|
// ======================== WINDOWS =============================
|
||||||
|
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins')
|
||||||
|
registerCustomOutputTask('Psycho', 'D://Dan/MinecraftDevelopment/server/plugins')
|
||||||
|
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins')
|
||||||
|
registerCustomOutputTask('Coco', 'D://Documents/MC/plugins')
|
||||||
|
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins')
|
||||||
|
registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19/plugins')
|
||||||
|
// ========================== UNIX ==============================
|
||||||
|
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
|
||||||
|
registerCustomOutputTaskUnix('PsychoLT', '/Users/brianfopiano/Desktop/REMOTES/RemoteMinecraft/plugins')
|
||||||
|
// ==============================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gradle is weird sometimes, we need to delete the plugin yml from the build folder to actually filter properly.
|
||||||
|
*/
|
||||||
|
file(jar.archiveFile.get().getAsFile().getParentFile().getParentFile().getParentFile().getAbsolutePath() + '/build/resources/main/plugin.yml').delete()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expand properties into plugin yml
|
||||||
|
*/
|
||||||
|
processResources {
|
||||||
|
filesMatching('**/plugin.yml') {
|
||||||
|
expand(
|
||||||
|
'name': name.toString(),
|
||||||
|
'version': version.toString(),
|
||||||
|
'main': main.toString(),
|
||||||
|
'apiversion': apiVersion.toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We need parameter meta for the decree command system
|
||||||
|
*/
|
||||||
|
compileJava {
|
||||||
|
options.compilerArgs << '-parameters'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure Iris for shading
|
||||||
|
*/
|
||||||
|
shadowJar {
|
||||||
|
//minimize()
|
||||||
|
append("plugin.yml")
|
||||||
|
relocate 'com.dfsek.paralithic', 'com.volmit.iris.util.paralithic'
|
||||||
|
relocate 'art.arcane', 'com.volmit.iris.util.arcane'
|
||||||
|
relocate 'manifold', 'com.volmit.iris.util.manifold'
|
||||||
|
relocate 'art.arcane.source', 'com.volmit.iris.util.source'
|
||||||
|
relocate 'ChumBukkit.extensions', 'com.volmit.iris.util.extensions'
|
||||||
|
relocate 'IrisBukkit.extensions', 'com.volmit.iris.util.extensions'
|
||||||
|
relocate 'Fukkit.extensions', 'com.volmit.iris.util.extensions'
|
||||||
|
relocate 'Amulet.extensions', 'com.volmit.iris.util.extensions'
|
||||||
|
relocate 'Iris.extensions', 'com.volmit.iris.util.extensions'
|
||||||
|
dependencies {
|
||||||
|
include(dependency('art.arcane:'))
|
||||||
|
include(dependency('systems.manifold:'))
|
||||||
|
include(dependency("com.dfsek:Paralithic:"))
|
||||||
|
include(dependency(":engine"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Faster dependency caches
|
||||||
|
*/
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.cacheChangingModulesFor 60, 'minutes'
|
||||||
|
resolutionStrategy.cacheDynamicVersionsFor 60, 'minutes'
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
testImplementation.extendsFrom annotationProcessor
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url "https://arcanearts.jfrog.io/artifactory/archives" }
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
|
||||||
|
implementation 'art.arcane:Fukkit:22.9.2'
|
||||||
|
implementation project(":engine")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
|
||||||
|
sourceSets.main.allJava.files.any { it.name == "module-info.java" }) {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.compilerArgs += ['-Xplugin:Manifold', '--module-path', it.classpath.asPath]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.compilerArgs += ['-Xplugin:Manifold']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (JavaVersion.current().toString() != "17") {
|
||||||
|
System.err.println()
|
||||||
|
System.err.println("=========================================================================================================")
|
||||||
|
System.err.println("You must run gradle on Java 17. You are using " + JavaVersion.current())
|
||||||
|
System.err.println()
|
||||||
|
System.err.println("=== For IDEs ===")
|
||||||
|
System.err.println("1. Configure the project for Java 17")
|
||||||
|
System.err.println("2. Configure the bundled gradle to use Java 17 in settings")
|
||||||
|
System.err.println()
|
||||||
|
System.err.println("=== For Command Line (gradlew) ===")
|
||||||
|
System.err.println("1. Install JDK 17 from https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html")
|
||||||
|
System.err.println("2. Set JAVA_HOME environment variable to the new jdk installation folder such as C:\\Program Files\\Java\\jdk-17.0.1")
|
||||||
|
System.err.println("3. Open a new command prompt window to get the new environment variables if need be.")
|
||||||
|
System.err.println("=========================================================================================================")
|
||||||
|
System.err.println()
|
||||||
|
System.exit(69);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println(buildDir);
|
||||||
|
def buildToolsJar = new File(buildDir, "buildtools/BuildTools.jar");
|
||||||
|
def specialSourceJar = new File(buildDir, "specialsource/SpecialSource.jar");
|
||||||
|
def buildToolsFolder = new File(buildDir, "buildtools");
|
||||||
|
def specialSourceFolder = new File(buildDir, "specialsource");
|
||||||
|
def buildToolsHint = new File(buildDir, "buildtools/craftbukkit-" + nmsVersion + ".jar");
|
||||||
|
def outputShadeJar = new File(buildDir, "libs/bukkit-" + version + "-all.jar");
|
||||||
|
def ssiJar = new File(buildDir, "specialsource/bukkit-" + version + "-all.jar");
|
||||||
|
def ssobfJar = new File(buildDir, "specialsource/Iris-" + version + "-rmo.jar");
|
||||||
|
def ssJar = new File(buildDir, "specialsource/Iris-" + version + "-rma.jar");
|
||||||
|
def homePath = System.properties['user.home']
|
||||||
|
def m2 = new File(homePath + "/.m2/repository")
|
||||||
|
def m2s = m2.getAbsolutePath();
|
||||||
|
|
||||||
|
// ======================== Building Mapped Jars =============================
|
||||||
|
task downloadBuildtools(type: Download) {
|
||||||
|
group "remapping"
|
||||||
|
src 'https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar'
|
||||||
|
dest buildToolsJar
|
||||||
|
onlyIf {
|
||||||
|
!buildToolsJar.exists()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task downloadSpecialSource(type: Download) {
|
||||||
|
group "remapping"
|
||||||
|
src 'https://repo.maven.apache.org/maven2/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar'
|
||||||
|
dest specialSourceJar
|
||||||
|
onlyIf {
|
||||||
|
!specialSourceJar.exists()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task executeBuildTools(dependsOn: downloadBuildtools, type: JavaExec)
|
||||||
|
{
|
||||||
|
group "remapping"
|
||||||
|
classpath = files(buildToolsJar)
|
||||||
|
workingDir = buildToolsFolder
|
||||||
|
args = [
|
||||||
|
"--rev",
|
||||||
|
nmsVersion,
|
||||||
|
"--compile",
|
||||||
|
"craftbukkit",
|
||||||
|
"--remap"
|
||||||
|
]
|
||||||
|
onlyIf {
|
||||||
|
!buildToolsHint.exists()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task copyBuildToSpecialSource(type: Copy)
|
||||||
|
{
|
||||||
|
group "remapping"
|
||||||
|
from outputShadeJar
|
||||||
|
into specialSourceFolder
|
||||||
|
dependsOn(downloadSpecialSource, shadowJar)
|
||||||
|
}
|
||||||
|
|
||||||
|
task specialSourceRemapObfuscate(type: JavaExec)
|
||||||
|
{
|
||||||
|
group "remapping"
|
||||||
|
dependsOn(copyBuildToSpecialSource, downloadSpecialSource, shadowJar)
|
||||||
|
workingDir = specialSourceFolder
|
||||||
|
classpath = files(specialSourceJar,
|
||||||
|
new File(m2s + "/org/spigotmc/spigot/" + spigotJarVersion + "/spigot-" + spigotJarVersion + "-remapped-mojang.jar"))
|
||||||
|
mainClass = "net.md_5.specialsource.SpecialSource"
|
||||||
|
args = [
|
||||||
|
"--live",
|
||||||
|
"-i",
|
||||||
|
ssiJar.getName(),
|
||||||
|
"-o",
|
||||||
|
ssobfJar.getName(),
|
||||||
|
"-m",
|
||||||
|
m2s + "/org/spigotmc/minecraft-server/" + spigotJarVersion + "/minecraft-server-" + spigotJarVersion + "-maps-mojang.txt",
|
||||||
|
"--reverse",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
task specialSourceRemap(type: JavaExec)
|
||||||
|
{
|
||||||
|
group "remapping"
|
||||||
|
dependsOn(specialSourceRemapObfuscate)
|
||||||
|
workingDir = specialSourceFolder
|
||||||
|
classpath = files(specialSourceJar,
|
||||||
|
new File(m2s + "/org/spigotmc/spigot/" + spigotJarVersion + "/spigot-" + spigotJarVersion + "-remapped-obf.jar"))
|
||||||
|
mainClass = "net.md_5.specialsource.SpecialSource"
|
||||||
|
args = [
|
||||||
|
"--live",
|
||||||
|
"-i",
|
||||||
|
ssobfJar.getName(),
|
||||||
|
"-o",
|
||||||
|
ssJar.getName(),
|
||||||
|
"-m",
|
||||||
|
m2s + "/org/spigotmc/minecraft-server/" + spigotJarVersion + "/minecraft-server-" + spigotJarVersion + "-maps-spigot.csrg"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.compileJava.dependsOn(executeBuildTools)
|
||||||
|
|
||||||
|
compileJava {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
task setup()
|
||||||
|
{
|
||||||
|
group("iris")
|
||||||
|
dependsOn(clean, executeBuildTools)
|
||||||
|
}
|
||||||
|
|
||||||
|
task iris(type: Copy)
|
||||||
|
{
|
||||||
|
group "iris"
|
||||||
|
from ssJar
|
||||||
|
into buildDir
|
||||||
|
rename { String fileName ->
|
||||||
|
fileName.replace('Iris-' + version + '-rma.jar', "Iris-" + version + ".jar")
|
||||||
|
}
|
||||||
|
dependsOn(specialSourceRemap)
|
||||||
|
}
|
||||||
|
|
||||||
|
def registerCustomOutputTask(name, path) {
|
||||||
|
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('build' + name, Copy) {
|
||||||
|
group('development')
|
||||||
|
outputs.upToDateWhen { false }
|
||||||
|
dependsOn(iris)
|
||||||
|
from(new File(buildDir, "Iris-" + version + ".jar"))
|
||||||
|
into(file(path))
|
||||||
|
rename { String fileName ->
|
||||||
|
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def registerCustomOutputTaskUnix(name, path) {
|
||||||
|
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('build' + name, Copy) {
|
||||||
|
group('development')
|
||||||
|
outputs.upToDateWhen { false }
|
||||||
|
dependsOn(iris)
|
||||||
|
from(new File(buildDir, "Iris-" + version + ".jar"))
|
||||||
|
into(file(path))
|
||||||
|
rename { String fileName ->
|
||||||
|
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,217 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit;
|
||||||
|
|
||||||
|
import art.arcane.amulet.io.IO;
|
||||||
|
import art.arcane.amulet.logging.LogListener;
|
||||||
|
import com.volmit.iris.engine.EngineConfiguration;
|
||||||
|
import com.volmit.iris.platform.IrisPlatform;
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.platform.PlatformWorld;
|
||||||
|
import com.volmit.iris.platform.bukkit.wrapper.BukkitBiome;
|
||||||
|
import com.volmit.iris.platform.bukkit.wrapper.BukkitBlock;
|
||||||
|
import com.volmit.iris.platform.bukkit.wrapper.BukkitKey;
|
||||||
|
import com.volmit.iris.platform.bukkit.wrapper.BukkitWorld;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Warning;
|
||||||
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.WorldCreator;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
public class IrisBukkit extends JavaPlugin implements IrisPlatform, LogListener {
|
||||||
|
private static final String TAG = ChatColor.DARK_GRAY + "[" + ChatColor.GREEN + "Iris" + ChatColor.DARK_GREEN + "/";
|
||||||
|
private static final String TAG_STRIPPED = ChatColor.stripColor(TAG);
|
||||||
|
private static IrisBukkit instance;
|
||||||
|
private ConsoleCommandSender consoleSender;
|
||||||
|
|
||||||
|
public void onEnable() {
|
||||||
|
instance = this;
|
||||||
|
consoleSender = Bukkit.getConsoleSender();
|
||||||
|
LogListener.listener.set(this);
|
||||||
|
|
||||||
|
getServer().getScheduler().scheduleSyncDelayedTask(this, () -> {
|
||||||
|
World world = Bukkit.createWorld(new WorldCreator("iristests/" + UUID.randomUUID()).generator(new IrisBukkitChunkGenerator(this, EngineConfiguration.builder()
|
||||||
|
.timings(true).mutable(true)
|
||||||
|
.build())));
|
||||||
|
for(Player i : Bukkit.getOnlinePlayers())
|
||||||
|
{
|
||||||
|
i.teleport(world.getSpawnLocation());
|
||||||
|
}
|
||||||
|
}, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDisable() {
|
||||||
|
World w = null;
|
||||||
|
for(World i : Bukkit.getWorlds()) {
|
||||||
|
if(!i.getName().startsWith("iristest")) {
|
||||||
|
w = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(World i : Bukkit.getWorlds()) {
|
||||||
|
if(i.getName().startsWith("iristest"))
|
||||||
|
{
|
||||||
|
for(Player j : i.getPlayers())
|
||||||
|
{
|
||||||
|
j.teleport(w.getSpawnLocation());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(i.getGenerator() instanceof Closeable c)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
c.close();
|
||||||
|
} catch(IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BukkitWorld.of(i).unloadChunks(false, true);
|
||||||
|
File folder = i.getWorldFolder();
|
||||||
|
Bukkit.unloadWorld(i, false);
|
||||||
|
IO.delete(folder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IrisBukkit getInstance() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void messageConsole(String color, String key, Object o) {
|
||||||
|
try {
|
||||||
|
consoleSender.sendMessage(TAG + key + ChatColor.DARK_GRAY + "]: " + color + o.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(Throwable e) {
|
||||||
|
System.out.println(TAG_STRIPPED + key + "]: " + o.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void logError(String k, Object o) {
|
||||||
|
messageConsole(ChatColor.RED.toString(), k, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void logInfo(String k, Object o) {
|
||||||
|
messageConsole(ChatColor.WHITE.toString(), k, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void logWarning(String k, Object o) {
|
||||||
|
messageConsole(ChatColor.YELLOW.toString(), k, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void logDebug(String k, Object o) {
|
||||||
|
messageConsole(ChatColor.GRAY.toString(), k, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPlatformName() {
|
||||||
|
return "Bukkit";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<PlatformBlock> getBlocks() {
|
||||||
|
//This is because it's a method extension
|
||||||
|
//noinspection Convert2MethodRef
|
||||||
|
return Arrays.stream(Material.values())
|
||||||
|
.filter(i -> !i.isLegacy())
|
||||||
|
.filter(Material::isBlock)
|
||||||
|
.map(Material::createBlockData).map(i -> BukkitBlock.of(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<PlatformBiome> getBiomes() {
|
||||||
|
//This is because it's a method extension
|
||||||
|
//noinspection Convert2MethodRef
|
||||||
|
return Arrays.stream(Biome.values()).parallel().filter((i) -> i != Biome.CUSTOM).map(i -> BukkitBiome.of(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isWorldLoaded(String name) {
|
||||||
|
return Bukkit.getWorlds().keepWhere(i -> i.getName().equals(name)).isNotEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformWorld getWorld(String name) {
|
||||||
|
World w = Bukkit.getWorld(name);
|
||||||
|
|
||||||
|
if(w == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BukkitWorld.of(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformBlock parseBlock(String raw) {
|
||||||
|
return BukkitBlock.of(Bukkit.createBlockData(raw));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformNamespaceKey key(String namespace, String key) {
|
||||||
|
return BukkitKey.of(namespace, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getStudioFolder(String dimension) {
|
||||||
|
File f = new File(getDataFolder(), "packs/" + dimension);
|
||||||
|
f.mkdirs();
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getStudioFolder() {
|
||||||
|
File f = new File(getDataFolder(), "packs/");
|
||||||
|
f.mkdirs();
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||||
|
return new IrisBukkitChunkGenerator(this, EngineConfiguration.builder()
|
||||||
|
.threads(4)
|
||||||
|
.mutable(true)
|
||||||
|
.timings(true)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void i(String s, Object o) {
|
||||||
|
logInfo(s, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void f(String s, Object o) {
|
||||||
|
logError(s, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void w(String s, Object o) {
|
||||||
|
logWarning(s, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void d(String s, Object o) {
|
||||||
|
logDebug(s, o);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit;
|
||||||
|
|
||||||
|
import art.arcane.chrono.Average;
|
||||||
|
import art.arcane.chrono.PrecisionStopwatch;
|
||||||
|
import art.arcane.spatial.hunk.Hunk;
|
||||||
|
import com.volmit.iris.engine.EngineConfiguration;
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureSizedTarget;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureTarget;
|
||||||
|
import com.volmit.iris.engine.pipeline.PipedHunkStack;
|
||||||
|
import com.volmit.iris.platform.IrisPlatform;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.bukkit.util.StaticBiomeProvider;
|
||||||
|
import com.volmit.iris.platform.bukkit.wrapper.BukkitWorld;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
|
import org.bukkit.generator.BiomeProvider;
|
||||||
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
|
import com.volmit.iris.platform.bukkit.util.ChunkDataHunkView;
|
||||||
|
import org.bukkit.generator.WorldInfo;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
public class IrisBukkitChunkGenerator extends ChunkGenerator implements Closeable {
|
||||||
|
private final IrisPlatform platform;
|
||||||
|
private final EngineConfiguration configuration;
|
||||||
|
private final AtomicReference<Engine> engine;
|
||||||
|
private final ReentrantLock engineLock;
|
||||||
|
private final AtomicInteger perSecond;
|
||||||
|
private final PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||||
|
private final Average a = new Average(128);
|
||||||
|
private final StaticBiomeProvider staticBiomeProvider;
|
||||||
|
|
||||||
|
public IrisBukkitChunkGenerator(IrisPlatform platform, EngineConfiguration configuration) {
|
||||||
|
this.perSecond = new AtomicInteger(0);
|
||||||
|
this.platform = platform;
|
||||||
|
this.configuration = configuration;
|
||||||
|
this.staticBiomeProvider = new StaticBiomeProvider(Biome.PLAINS);
|
||||||
|
this.engine = new AtomicReference<>();
|
||||||
|
this.engineLock = new ReentrantLock();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChunkData generateChunkData(World world, Random random, int x, int z, BiomeGrid biome) {
|
||||||
|
PrecisionStopwatch pp = PrecisionStopwatch.start();
|
||||||
|
initEngine(world);
|
||||||
|
ChunkData data = Bukkit.createChunkData(world);
|
||||||
|
Hunk<PlatformBlock> chunk = new ChunkDataHunkView(data);
|
||||||
|
FeatureSizedTarget targetSize = FeatureSizedTarget.builder()
|
||||||
|
.width(chunk.getWidth())
|
||||||
|
.height(chunk.getHeight())
|
||||||
|
.depth(chunk.getDepth())
|
||||||
|
.offsetX(x << 4)
|
||||||
|
.offsetZ(z << 4)
|
||||||
|
.offsetY(0)
|
||||||
|
.build();
|
||||||
|
FeatureTarget<PlatformBlock> blockTarget = new FeatureTarget<>(chunk, targetSize);
|
||||||
|
PipedHunkStack stack = new PipedHunkStack();
|
||||||
|
stack.register(PlatformBlock.class, blockTarget);
|
||||||
|
engine.get().getPlumbing().generate(engine.get(), targetSize, stack);
|
||||||
|
perSecond.incrementAndGet();
|
||||||
|
a.put(pp.getMilliseconds());
|
||||||
|
|
||||||
|
if(p.getMilliseconds() > 1000)
|
||||||
|
{
|
||||||
|
p.reset();
|
||||||
|
p.begin();
|
||||||
|
System.out.println("PERSECOND: " + perSecond.getAndSet(0) + " AMS: " + ((int)Math.round(a.getAverage())) + "ms");
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initEngine(World world) {
|
||||||
|
if(engine.get() == null)
|
||||||
|
{
|
||||||
|
engineLock.lock();
|
||||||
|
|
||||||
|
if(engine.get() == null)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
engine.set(new Engine(platform, BukkitWorld.of(world), configuration));
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
engineLock.unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canSpawn(World world, int x, int z) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BiomeProvider getDefaultBiomeProvider(WorldInfo worldInfo) {
|
||||||
|
return staticBiomeProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
engine.get().close();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateNoise() {
|
||||||
|
return super.shouldGenerateNoise();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateSurface() {
|
||||||
|
return super.shouldGenerateSurface();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateBedrock() {
|
||||||
|
return super.shouldGenerateBedrock();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateCaves() {
|
||||||
|
return super.shouldGenerateCaves();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateDecorations() {
|
||||||
|
return super.shouldGenerateDecorations();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateMobs() {
|
||||||
|
return super.shouldGenerateMobs();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldGenerateStructures() {
|
||||||
|
return super.shouldGenerateStructures();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.util;
|
||||||
|
|
||||||
|
import art.arcane.spatial.hunk.Hunk;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.bukkit.wrapper.BukkitBlock;
|
||||||
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
|
|
||||||
|
@SuppressWarnings("ClassCanBeRecord")
|
||||||
|
public class ChunkDataHunkView implements Hunk<PlatformBlock> {
|
||||||
|
private final ChunkGenerator.ChunkData chunk;
|
||||||
|
|
||||||
|
public ChunkDataHunkView(ChunkGenerator.ChunkData chunk) {
|
||||||
|
this.chunk = chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDepth() {
|
||||||
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return chunk.getMaxHeight() - chunk.getMinHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public synchronized void set(int x1, int y1, int z1, int x2, int y2, int z2, PlatformBlock t) {
|
||||||
|
if(t == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
chunk.setRegion(x1, y1 + chunk.getMinHeight(), z1, x2, y2 + chunk.getMinHeight(), z2, ((BukkitBlock)t).getDelegate());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public synchronized void setRaw(int x, int y, int z, PlatformBlock t) {
|
||||||
|
if(t == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
chunk.setBlock(x, y + chunk.getMinHeight(), z, ((BukkitBlock)t).getDelegate());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformBlock getRaw(int x, int y, int z) {
|
||||||
|
return BukkitBlock.of(chunk.getBlockData(x, y + chunk.getMinHeight(), z));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.util;
|
||||||
|
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
|
import org.bukkit.generator.BiomeProvider;
|
||||||
|
import org.bukkit.generator.WorldInfo;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class StaticBiomeProvider extends BiomeProvider {
|
||||||
|
private static final List<Biome> ALL_BIOMES = Arrays.stream(Biome.values()).without((i) -> i.equals(Biome.CUSTOM)).toList().unmodifiable();
|
||||||
|
private final Biome defaultBiome;
|
||||||
|
|
||||||
|
public StaticBiomeProvider(Biome defaultBiome) {
|
||||||
|
this.defaultBiome = defaultBiome;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) {
|
||||||
|
return defaultBiome;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Biome> getBiomes(WorldInfo worldInfo) {
|
||||||
|
return ALL_BIOMES;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.wrapper;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BukkitBiome implements PlatformBiome {
|
||||||
|
private final Biome delegate;
|
||||||
|
|
||||||
|
private BukkitBiome(Biome delegate) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformNamespaceKey getKey() {
|
||||||
|
return BukkitKey.of(delegate.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitBiome of(Biome biome) {
|
||||||
|
return new BukkitBiome(biome);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.wrapper;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.data.Ageable;
|
||||||
|
import org.bukkit.block.data.BlockData;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BukkitBlock implements PlatformBlock {
|
||||||
|
private final BlockData delegate;
|
||||||
|
private final Map<String, String> properties;
|
||||||
|
|
||||||
|
private BukkitBlock(BlockData delegate, Map<String, String> properties) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
this.properties = properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BukkitBlock(BlockData delegate) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
String s = delegate.getAsString(true);
|
||||||
|
|
||||||
|
if(s.contains("[")) {
|
||||||
|
Map<String, String> properties = new HashMap<>();
|
||||||
|
String[] props = new String[] {s.split("\\Q[\\E")[1].split("\\Q]\\E")[0]};
|
||||||
|
String[] p;
|
||||||
|
if(props[0].contains(",")) {
|
||||||
|
for(String i : props[0].split("\\Q,\\E")) {
|
||||||
|
p = i.split("\\Q=\\E");
|
||||||
|
properties.put(p[0], p[1]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
p = props[0].split("\\Q=\\E");
|
||||||
|
properties.put(p[0], p[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.properties = Collections.unmodifiableMap(properties);
|
||||||
|
} else {
|
||||||
|
this.properties = Map.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, String> getProperties() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformNamespaceKey getKey() {
|
||||||
|
return BukkitKey.of(delegate.getMaterial().getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitBlock of(BlockData blockData) {
|
||||||
|
return new BukkitBlock(blockData);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitBlock of(Material material) {
|
||||||
|
return of(material.createBlockData());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitBlock of(String raw) {
|
||||||
|
return of(Bukkit.createBlockData(raw));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.wrapper;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformChunk;
|
||||||
|
import org.bukkit.Chunk;
|
||||||
|
|
||||||
|
public class BukkitChunk implements PlatformChunk {
|
||||||
|
private final Chunk delegate;
|
||||||
|
|
||||||
|
private BukkitChunk(Chunk delegate) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getX() {
|
||||||
|
return delegate.getX();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getZ() {
|
||||||
|
return delegate.getZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unload(boolean save, boolean force) {
|
||||||
|
if(force) {
|
||||||
|
delegate.getPluginChunkTickets().forEach(delegate::removePluginChunkTicket);
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate.unload(save);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitChunk of(Chunk chunk) {
|
||||||
|
return new BukkitChunk(chunk);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.wrapper;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.bukkit.NamespacedKey;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BukkitKey implements PlatformNamespaceKey {
|
||||||
|
private final NamespacedKey delegate;
|
||||||
|
|
||||||
|
private BukkitKey(NamespacedKey delegate) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNamespace() {
|
||||||
|
return delegate.getNamespace();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return delegate.getKey();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return delegate.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitKey of(String nsk) {
|
||||||
|
if(nsk.contains(":")) {
|
||||||
|
String[] f = nsk.split("\\Q:\\E");
|
||||||
|
return of(f[0], f[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return of("minecraft", nsk);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitKey of(String namespace, String key) {
|
||||||
|
return of(new NamespacedKey(namespace, key));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitKey of(NamespacedKey key) {
|
||||||
|
return new BukkitKey(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.wrapper;
|
||||||
|
|
||||||
|
import art.arcane.amulet.geometry.Vec;
|
||||||
|
import com.volmit.iris.platform.PlatformPlayer;
|
||||||
|
import com.volmit.iris.platform.PlatformWorld;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class BukkitPlayer implements PlatformPlayer {
|
||||||
|
private final Player delegate;
|
||||||
|
|
||||||
|
private BukkitPlayer(Player delegate) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UUID getUUID() {
|
||||||
|
return delegate.getUniqueId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return delegate.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec getLocation() {
|
||||||
|
return delegate.getLocation().vec();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformWorld getWorld() {
|
||||||
|
return BukkitWorld.of(delegate.getWorld());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUseIris() {
|
||||||
|
return delegate.isOp();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendMessage(String message) {
|
||||||
|
delegate.sendMessage(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendActionBar(String message) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendTitleMessage(String title, String subtitle, int in, int stay, int out) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitPlayer of(Player player) {
|
||||||
|
return new BukkitPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.volmit.iris.platform.bukkit.wrapper;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.PlatformChunk;
|
||||||
|
import com.volmit.iris.platform.PlatformPlayer;
|
||||||
|
import com.volmit.iris.platform.PlatformWorld;
|
||||||
|
import com.volmit.iris.util.WorldHeight;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.bukkit.World;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BukkitWorld implements PlatformWorld {
|
||||||
|
private final World delegate;
|
||||||
|
private final WorldHeight worldHeight;
|
||||||
|
|
||||||
|
private BukkitWorld(World delegate) {
|
||||||
|
this.delegate = delegate;
|
||||||
|
this.worldHeight = new WorldHeight(delegate.getMinHeight(), delegate.getMaxHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WorldHeight getHeight() {
|
||||||
|
return worldHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return delegate.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getFolder() {
|
||||||
|
return delegate.getWorldFolder();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterable<PlatformPlayer> getPlayers() {
|
||||||
|
//noinspection Convert2MethodRef
|
||||||
|
return delegate.getPlayers().stream().map(i -> BukkitPlayer.of(i)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterable<PlatformChunk> getLoadedChunks() {
|
||||||
|
//noinspection Convert2MethodRef
|
||||||
|
return Arrays.stream(delegate.getLoadedChunks()).map(i -> BukkitChunk.of(i)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformChunk getOrLoadChunk(int x, int z) {
|
||||||
|
return BukkitChunk.of(delegate.getChunkAt(x, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformBlock getBlock(int x, int y, int z) {
|
||||||
|
return BukkitBlock.of(delegate.getBlockAt(x, y, z).getBlockData());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlatformBiome getBiome(int x, int y, int z) {
|
||||||
|
return BukkitBiome.of(delegate.getBiome(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getSeed() {
|
||||||
|
return delegate.getSeed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isChunkLoaded(int x, int z) {
|
||||||
|
return delegate.isChunkLoaded(x, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBlock(int x, int y, int z, PlatformBlock block) {
|
||||||
|
delegate.setBlockData(x, y, z, ((BukkitBlock) block).getDelegate());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBiome(int x, int y, int z, PlatformBiome biome) {
|
||||||
|
delegate.setBiome(x, y, z, ((BukkitBiome) biome).getDelegate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BukkitWorld of(World world) {
|
||||||
|
return new BukkitWorld(world);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
name: Iris
|
||||||
|
main: com.volmit.iris.platform.bukkit.IrisBukkit
|
||||||
|
version: 1.0.0
|
||||||
|
api-version: 1.19
|
||||||
|
libraries:
|
||||||
|
- org.apache-extras.beanshell:bsh:2.0b6
|
||||||
|
- com.google.code.gson:gson:2.8.9
|
||||||
|
- com.github.ben-manes.caffeine:caffeine:3.1.1
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
id "io.freefair.lombok" version "6.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
group rootProject.group
|
||||||
|
version rootProject.version
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes('Contains-Sources': 'java,class')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
testImplementation.extendsFrom annotationProcessor
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
|
||||||
|
sourceSets.main.allJava.files.any { it.name == "module-info.java" }) {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.compilerArgs += ['-Xplugin:Manifold', '--module-path', it.classpath.asPath]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.compilerArgs += ['-Xplugin:Manifold']
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.feature.features.FeatureError;
|
||||||
|
import com.volmit.iris.engine.feature.features.FeatureTerrain;
|
||||||
|
import com.volmit.iris.engine.pipeline.EnginePipeline;
|
||||||
|
import com.volmit.iris.engine.pipeline.EnginePlumbing;
|
||||||
|
import com.volmit.iris.engine.pipeline.PipelinePhase;
|
||||||
|
import com.volmit.iris.engine.pipeline.PipelineTask;
|
||||||
|
import com.volmit.iris.platform.IrisPlatform;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.platform.PlatformRegistry;
|
||||||
|
import com.volmit.iris.platform.PlatformWorld;
|
||||||
|
import lombok.Data;
|
||||||
|
import manifold.util.concurrent.ConcurrentWeakHashMap;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Engine implements Closeable {
|
||||||
|
private static final Map<Thread, WeakReference<Engine>> engineContext = new ConcurrentWeakHashMap<>();
|
||||||
|
private final IrisPlatform platform;
|
||||||
|
private final EngineRegistry registry;
|
||||||
|
private final EngineConfiguration configuration;
|
||||||
|
private final PlatformWorld world;
|
||||||
|
private final EngineBlockCache blockCache;
|
||||||
|
private final EngineExecutor executor;
|
||||||
|
private final EnginePlumbing plumbing;
|
||||||
|
private final EngineSeedManager seedManager;
|
||||||
|
private final EngineData data;
|
||||||
|
|
||||||
|
public Engine(IrisPlatform platform, PlatformWorld world, EngineConfiguration configuration) throws IOException {
|
||||||
|
this.configuration = configuration.validate();
|
||||||
|
this.platform = platform;
|
||||||
|
this.world = world;
|
||||||
|
i("Initializing Iris Engine for " + platform.getPlatformName() + " in " + world.getName()
|
||||||
|
+ " with " + configuration.getThreads() + " priority " + configuration.getThreadPriority()
|
||||||
|
+ " threads in " + (configuration.isMutable() ? "edit mode" : "production mode"));
|
||||||
|
this.blockCache = new EngineBlockCache(this);
|
||||||
|
this.registry = EngineRegistry.builder()
|
||||||
|
.blockRegistry(new PlatformRegistry<>("Block", platform.getBlocks()))
|
||||||
|
.biomeRegistry(new PlatformRegistry<>("Biome", platform.getBiomes()))
|
||||||
|
.build();
|
||||||
|
this.data = new EngineData(this).loadData(
|
||||||
|
getConfiguration().isMutable()
|
||||||
|
? getPlatform().getStudioFolder()
|
||||||
|
: getWorld().getIrisDataFolder(), getConfiguration().getDimension());
|
||||||
|
this.seedManager = getSeedManager();
|
||||||
|
this.executor = new EngineExecutor(this);
|
||||||
|
this.plumbing = EnginePlumbing.builder().engine(this)
|
||||||
|
.errorPipeline(EnginePipeline.builder()
|
||||||
|
.phase(PipelinePhase.builder()
|
||||||
|
.task(new PipelineTask<>(new FeatureError(this), PlatformBlock.class))
|
||||||
|
.build())
|
||||||
|
.build())
|
||||||
|
.pipeline(EnginePipeline.builder()
|
||||||
|
.phase(PipelinePhase.builder()
|
||||||
|
.task(new PipelineTask<>(new FeatureTerrain(this), PlatformBlock.class))
|
||||||
|
.build())
|
||||||
|
.build())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlatformBlock block(String block) {
|
||||||
|
return blockCache.get(block);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlatformNamespaceKey key(String nsk) {
|
||||||
|
return getPlatform().key(nsk);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Optional<Engine> context() {
|
||||||
|
WeakReference<Engine> reference = engineContext.get(Thread.currentThread());
|
||||||
|
|
||||||
|
if(reference != null)
|
||||||
|
{
|
||||||
|
return Optional.ofNullable(reference.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
getExecutor().close();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
public class EngineBlockCache
|
||||||
|
{
|
||||||
|
private final Engine engine;
|
||||||
|
private final Map<String, PlatformBlock> cache;
|
||||||
|
|
||||||
|
public EngineBlockCache(Engine engine)
|
||||||
|
{
|
||||||
|
this.engine = engine;
|
||||||
|
this.cache = new ConcurrentHashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlatformBlock get(String t)
|
||||||
|
{
|
||||||
|
return cache.computeIfAbsent(t, (key) -> engine.getPlatform().parseBlock(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.platform.PlatformWorld;
|
||||||
|
import com.volmit.iris.util.NSK;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EngineConfiguration {
|
||||||
|
@Builder.Default
|
||||||
|
private int chunkSize = 16;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private boolean mutable = false;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private boolean timings = false;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private int threads = Runtime.getRuntime().availableProcessors();
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private int threadPriority = 3;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private PlatformNamespaceKey dimension = new NSK("overworld", "main");
|
||||||
|
|
||||||
|
public EngineConfiguration validate() throws IOException {
|
||||||
|
validateChunkSize();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateChunkSize() throws IOException {
|
||||||
|
if(Arrays.binarySearch(allowedChunkSizes, chunkSize) < 0) {
|
||||||
|
throw new IOException("Invalid Chunk Size: " + chunkSize + " Allowed Chunk Sizes are: " + Arrays.toString(allowedChunkSizes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int[] allowedChunkSizes;
|
||||||
|
|
||||||
|
static {
|
||||||
|
allowedChunkSizes = new int[16];
|
||||||
|
|
||||||
|
for(int i = 0; i < allowedChunkSizes.length; i++) {
|
||||||
|
allowedChunkSizes[i] = (int) Math.pow(2, i+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Arrays.sort(allowedChunkSizes); // for binary sorting
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,276 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import art.arcane.amulet.concurrent.J;
|
||||||
|
import art.arcane.amulet.io.IO;
|
||||||
|
import art.arcane.amulet.io.JarLoader;
|
||||||
|
import art.arcane.cram.PakFile;
|
||||||
|
import art.arcane.cram.PakKey;
|
||||||
|
import art.arcane.cram.PakResource;
|
||||||
|
import com.google.gson.*;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.dimension.IrisDimension;
|
||||||
|
import com.volmit.iris.engine.dimension.IrisGenerator;
|
||||||
|
import com.volmit.iris.engine.dimension.IrisRange;
|
||||||
|
import com.volmit.iris.engine.resolver.*;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.util.NSK;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class EngineData implements TypeAdapterFactory {
|
||||||
|
private final Engine engine;
|
||||||
|
private final Gson gson;
|
||||||
|
private List<Resolvable> resolvableTypes;
|
||||||
|
private final Map<Class<?>, Resolver<?>> resolvers;
|
||||||
|
|
||||||
|
public EngineData(Engine engine) throws IOException {
|
||||||
|
this.engine = engine;
|
||||||
|
this.resolvers = new HashMap<>();
|
||||||
|
this.resolvableTypes = J.attempt(() -> new JarLoader(getClass()).all().parallel()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.filter(i -> !i.isInterface() && !i.isEnum())
|
||||||
|
.filter(i -> i.isAssignableFrom(Resolvable.class) || Resolvable.class.isAssignableFrom(i))
|
||||||
|
.filter(i -> !i.equals(EngineResolvable.class))
|
||||||
|
.map(i -> J.attempt(() -> (Resolvable) i.getDeclaredConstructor().newInstance(), null)).toList(), List.of());
|
||||||
|
GsonBuilder gsonBuilder = new GsonBuilder().registerTypeAdapterFactory(this);
|
||||||
|
resolvableTypes.forEach(i -> i.apply(gsonBuilder));
|
||||||
|
this.gson = gsonBuilder.setPrettyPrinting().create();
|
||||||
|
i("Registered " + resolvableTypes.size() + " Mutators with " + resolvableTypes.stream().filter(i -> i instanceof TypeAdapterFactory).count() + " Type Adapter Factories");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void generateSchemas(File folder) throws IOException {
|
||||||
|
folder.mkdirs();
|
||||||
|
|
||||||
|
for(Resolvable i : resolvableTypes) {
|
||||||
|
IO.writeAll(new File(folder, i.entity().getId() + ".json"), i.generateSchema(this).toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T extends Resolvable> T resolve(Class<T> clazz, PlatformNamespaceKey key)
|
||||||
|
{
|
||||||
|
Resolver<?> r = resolvers.get(clazz);
|
||||||
|
|
||||||
|
if(r == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (T) r.resolve(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerResolver(Class<?> type, Resolver<?> resolver, String namespace)
|
||||||
|
{
|
||||||
|
if(resolvers.containsKey(type)) {
|
||||||
|
Resolver r = resolvers.get(type);
|
||||||
|
resolvers.put(type, r.and(namespace, r));
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
resolvers.put(type, resolver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public EngineData loadData(File folder, PlatformNamespaceKey dimension) throws IOException {
|
||||||
|
i("Loading Data in " + folder.getPath());
|
||||||
|
for(File i : folder.listFiles()) {
|
||||||
|
if(i.isDirectory() && i.getName().equals(dimension.getNamespace())) {
|
||||||
|
loadDataNamespaced(i, i.getName());
|
||||||
|
|
||||||
|
if(getEngine().getConfiguration().isMutable()) {
|
||||||
|
generateSchemas(new File(i, ".iris/schema"));
|
||||||
|
i("Generated " + new File(i, ".iris/schema").listFiles().length + " Schemas");
|
||||||
|
generateCodeWorkspace(new File(i, dimension.getNamespace() + ".code-workspace"));
|
||||||
|
i("Generated Code Workspace");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(i.getName().equals(dimension.getNamespace() + ".dat")) {
|
||||||
|
loadPakFile(folder, i.getName().split("\\Q.\\E")[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IrisDimension dim = resolve(IrisDimension.class, dimension);
|
||||||
|
|
||||||
|
if(dim == null) {
|
||||||
|
f("Failed to load dimension " + dimension);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void generateCodeWorkspace(File file) throws IOException {
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
JsonObject ws = new JsonObject();
|
||||||
|
JsonArray folders = new JsonArray();
|
||||||
|
JsonObject folder = new JsonObject();
|
||||||
|
folder.add("path", new JsonPrimitive("."));
|
||||||
|
folders.add(folder);
|
||||||
|
ws.add("folders", folders);
|
||||||
|
JsonObject settings = new JsonObject();
|
||||||
|
settings.add("workbench.colorTheme", new JsonPrimitive("Monokai"));
|
||||||
|
settings.add("workbench.preferredDarkColorTheme", new JsonPrimitive("Solarized Dark"));
|
||||||
|
settings.add("workbench.tips.enabled", new JsonPrimitive(false));
|
||||||
|
settings.add("workbench.tree.indent", new JsonPrimitive(24));
|
||||||
|
settings.add("files.autoSave", new JsonPrimitive("onFocusChange"));
|
||||||
|
JsonObject jc = new JsonObject();
|
||||||
|
jc.add("editor.autoIndent", new JsonPrimitive("brackets"));
|
||||||
|
jc.add("editor.acceptSuggestionOnEnter", new JsonPrimitive("smart"));
|
||||||
|
jc.add("editor.cursorSmoothCaretAnimation", new JsonPrimitive(true));
|
||||||
|
jc.add("editor.dragAndDrop", new JsonPrimitive(false));
|
||||||
|
jc.add("files.trimTrailingWhitespace", new JsonPrimitive(true));
|
||||||
|
jc.add("diffEditor.ignoreTrimWhitespace", new JsonPrimitive(true));
|
||||||
|
jc.add("files.trimFinalNewlines", new JsonPrimitive(true));
|
||||||
|
jc.add("editor.suggest.showKeywords", new JsonPrimitive(false));
|
||||||
|
jc.add("editor.suggest.showSnippets", new JsonPrimitive(false));
|
||||||
|
jc.add("editor.suggest.showWords", new JsonPrimitive(false));
|
||||||
|
JsonObject st = new JsonObject();
|
||||||
|
st.add("strings", new JsonPrimitive(true));
|
||||||
|
jc.add("editor.quickSuggestions", st);
|
||||||
|
jc.add("editor.suggest.insertMode", new JsonPrimitive("replace"));
|
||||||
|
settings.add("[json]", jc);
|
||||||
|
settings.add("json.maxItemsComputed", new JsonPrimitive(30000));
|
||||||
|
JsonArray schemas = new JsonArray();
|
||||||
|
|
||||||
|
for(Resolvable i : resolvableTypes) {
|
||||||
|
String id = i.entity().getId();
|
||||||
|
JsonObject o = new JsonObject();
|
||||||
|
JsonArray fileMatch = new JsonArray();
|
||||||
|
fileMatch.add("/" + id + "/*.json");
|
||||||
|
o.add("fileMatch", fileMatch);
|
||||||
|
o.add("url", new JsonPrimitive(".iris/schema/" + id + ".json"));
|
||||||
|
schemas.add(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
settings.add("json.schemas", schemas);
|
||||||
|
ws.add("settings", settings);
|
||||||
|
IO.writeAll(file, ws.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadDataNamespaced(File folder, String namespace) throws IOException {
|
||||||
|
i("Loading Namespace " + namespace + " in " + folder.getPath());
|
||||||
|
for(Resolvable i : resolvableTypes)
|
||||||
|
{
|
||||||
|
new File(folder, i.entity().getId()).mkdirs();
|
||||||
|
IO.writeAll(new File(new File(folder, i.entity().getId()), "example.json"), gson.toJson(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(File i : folder.listFiles())
|
||||||
|
{
|
||||||
|
if(i.isDirectory()) {
|
||||||
|
loadDataFolder(i, namespace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadDataFolder(File folder, String namespace) {
|
||||||
|
for(Resolvable i : resolvableTypes)
|
||||||
|
{
|
||||||
|
if(!folder.getName().equals(i.entity().getId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
registerResolver(i.getClass(), Resolver.hotDirectoryJson(namespace, i.getClass(), folder, gson), namespace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadPakFile(File folder, String name) throws IOException {
|
||||||
|
PakFile pakFile = new PakFile(folder, name);
|
||||||
|
Map<PakKey, PakResource> resources = pakFile.getAllResources();
|
||||||
|
|
||||||
|
for(Resolvable i : resolvableTypes)
|
||||||
|
{
|
||||||
|
Class<? extends Resolvable> resolvableClass = i.getClass();
|
||||||
|
CompositeResolver<?> composite = Resolver.frozen(resources, (p) -> p.getClass().equals(resolvableClass));
|
||||||
|
|
||||||
|
for(String j : composite.getResolvers().keySet())
|
||||||
|
{
|
||||||
|
Resolver<? extends Resolvable> resolver = composite.getResolvers().get(i);
|
||||||
|
this.registerResolver(i.getClass(), resolver, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printResolvers() {
|
||||||
|
resolvers.forEach((k, i) -> i.print(k.simpleName(), this));
|
||||||
|
}
|
||||||
|
|
||||||
|
private <T> void writeSafeJson(TypeAdapter<T> delegate, JsonWriter out, T value) {
|
||||||
|
try {
|
||||||
|
delegate.write(out, value);
|
||||||
|
} catch (IOException e) {
|
||||||
|
try {
|
||||||
|
delegate.write(out, null);
|
||||||
|
} catch(IOException ex) {
|
||||||
|
throw new RuntimeException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
|
||||||
|
|
||||||
|
for(Resolvable i : resolvableTypes) {
|
||||||
|
if(type.getRawType().equals(i.getClass())) {
|
||||||
|
return new TypeAdapter<>() {
|
||||||
|
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
|
||||||
|
if(token == JsonToken.STRING) {
|
||||||
|
Resolver<?> resolver = getResolvers().get(i.getClass());
|
||||||
|
String key = in.nextString();
|
||||||
|
|
||||||
|
if(resolver == null) {
|
||||||
|
w("Unable to find a resolver for " + i.getClass() + " received " + key);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
T t = (T) resolver.resolve(new NSK(key));
|
||||||
|
|
||||||
|
if(t == null) {
|
||||||
|
w("Unable to resolve " + i.getClass() + " " + key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
return delegate.read(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Resolvable getInstance(Class<?> type) {
|
||||||
|
for(Resolvable i : resolvableTypes) {
|
||||||
|
if(i.getClass().equals(type)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PlatformNamespaceKey> getAllKeys(Class<?> type) {
|
||||||
|
List<PlatformNamespaceKey> keys = new ArrayList<>();
|
||||||
|
Resolver<?> resolver = resolvers.get(type);
|
||||||
|
|
||||||
|
if(resolver != null) {
|
||||||
|
resolver.addAllKeys(keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import art.arcane.amulet.concurrent.J;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.concurrent.ForkJoinPool;
|
||||||
|
import java.util.concurrent.ForkJoinWorkerThread;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class EngineExecutor implements ForkJoinPool.ForkJoinWorkerThreadFactory, Thread.UncaughtExceptionHandler, Closeable {
|
||||||
|
private final Engine engine;
|
||||||
|
private final ForkJoinPool forks;
|
||||||
|
|
||||||
|
public EngineExecutor(Engine engine)
|
||||||
|
{
|
||||||
|
this.engine = engine;
|
||||||
|
forks = new ForkJoinPool(engine.getConfiguration().getThreads(), this, this, true);
|
||||||
|
i("Started Pool with " + engine.getConfiguration().getThreads() + " priority " + engine.getConfiguration().getThreadPriority() + " threads.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uncaughtException(Thread t, Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForkJoinWorkerThread newThread(ForkJoinPool pool) {
|
||||||
|
final ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool);
|
||||||
|
worker.setName("Iris " + engine.getWorld().getName() + " Executor " + worker.getPoolIndex());
|
||||||
|
return worker;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
i("Shutting down generator pool");
|
||||||
|
forks.shutdownNow().forEach((i) -> {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
i.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(Throwable e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
i("Generator pool shutdown");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.PlatformRegistry;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
public class EngineRegistry {
|
||||||
|
private final PlatformRegistry<PlatformBlock> blockRegistry;
|
||||||
|
private final PlatformRegistry<PlatformBiome> biomeRegistry;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.volmit.iris.engine;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class EngineSeedManager {
|
||||||
|
private final Engine engine;
|
||||||
|
private final long worldSeed;
|
||||||
|
|
||||||
|
public EngineSeedManager(Engine engine)
|
||||||
|
{
|
||||||
|
this.engine = engine;
|
||||||
|
this.worldSeed = engine.getWorld().getSeed();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "author")
|
||||||
|
public class IrisAuthor extends EngineResolvable
|
||||||
|
{
|
||||||
|
private String name;
|
||||||
|
private Map<String, String> social;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "biome")
|
||||||
|
public class IrisBiome extends EngineResolvable {
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisSurface surface = new IrisSurface();
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisRange height = IrisRange.flat(1);
|
||||||
|
|
||||||
|
public PlatformBiome toPlatformBiome()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "chance", jsonTypes = {JsonToken.STRING, JsonToken.BEGIN_OBJECT})
|
||||||
|
public class IrisChance extends EngineResolvable implements TypeAdapterFactory {
|
||||||
|
@Builder.Default
|
||||||
|
@TokenConstructor(JsonToken.NUMBER)
|
||||||
|
private double threshold = 0.5;
|
||||||
|
|
||||||
|
@TokenConstructor(JsonToken.STRING)
|
||||||
|
@Builder.Default
|
||||||
|
private IrisGenerator generator = IrisGenerator.WHITE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
|
||||||
|
|
||||||
|
if(!type.getRawType().equals(getClass())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TypeAdapter<>() {
|
||||||
|
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
|
||||||
|
if(token == JsonToken.STRING) {
|
||||||
|
return (T) IrisChance.half(gson.fromJson(in.nextString(), IrisGenerator.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
return delegate.read(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IrisChance half(IrisGenerator generator) {
|
||||||
|
return IrisChance.builder()
|
||||||
|
.threshold(0.5)
|
||||||
|
.generator(generator)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IrisChance white(double chance) {
|
||||||
|
return IrisChance.builder()
|
||||||
|
.threshold(chance)
|
||||||
|
.generator(IrisGenerator.WHITE)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "decorator")
|
||||||
|
public class IrisDecorator extends EngineResolvable {
|
||||||
|
@Builder.Default
|
||||||
|
private IrisPalette palette = IrisPalette.flat("minecraft:grass");
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisChance chance = IrisChance.white(0.25);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Singular;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "dimension")
|
||||||
|
public class IrisDimension extends EngineResolvable {
|
||||||
|
@Builder.Default
|
||||||
|
private IrisDimensionMeta meta = new IrisDimensionMeta();
|
||||||
|
|
||||||
|
@Singular
|
||||||
|
@Type(IrisBiome.class)
|
||||||
|
private List<IrisBiome> biomes = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Singular;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "dimension-meta")
|
||||||
|
public class IrisDimensionMeta extends EngineResolvable
|
||||||
|
{
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
private String version;
|
||||||
|
@Singular
|
||||||
|
@Resolvable.Type(IrisAuthor.class)
|
||||||
|
private List<IrisAuthor> authors = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import art.arcane.source.NoisePlane;
|
||||||
|
import art.arcane.source.script.NoisePlaneConstructor;
|
||||||
|
import art.arcane.source.util.NoisePreset;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.script.ScriptException;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "generator", jsonTypes = {JsonToken.STRING, JsonToken.BEGIN_OBJECT})
|
||||||
|
public class IrisGenerator extends EngineResolvable implements TypeAdapterFactory {
|
||||||
|
public static final IrisGenerator NATURAL = IrisGenerator.builder().java("art.arcane.source.api.util.NoisePreset.NATURAL.create(seed)").build();
|
||||||
|
public static final IrisGenerator WHITE = IrisGenerator.builder().java("Noise.white(seed)").build();
|
||||||
|
public static final IrisGenerator FLAT = IrisGenerator.builder().java("Noise.flat(seed)").build();
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private String java = "art.arcane.source.api.util.NoisePreset.NATURAL.create(seed)";
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisSeed seed = new IrisSeed();
|
||||||
|
|
||||||
|
public NoisePlane getNoisePlane(long seed)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return NoisePlaneConstructor.execute(seed, java);
|
||||||
|
} catch(ScriptException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return NoisePreset.NATURAL.create(seed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
|
||||||
|
|
||||||
|
if(!type.getRawType().equals(getClass())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TypeAdapter<>() {
|
||||||
|
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
|
||||||
|
if(token == JsonToken.STRING) {
|
||||||
|
return (T) IrisGenerator.builder().java(in.nextString()).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
return delegate.read(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Singular;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "palette", jsonTypes = {JsonToken.STRING, JsonToken.BEGIN_OBJECT})
|
||||||
|
public class IrisPalette extends EngineResolvable implements TypeAdapterFactory {
|
||||||
|
@Singular
|
||||||
|
@PlatformType(PlatformBlock.class)
|
||||||
|
@Type(String.class)
|
||||||
|
@TokenConstructor(JsonToken.STRING)
|
||||||
|
private List<String> blocks = new ArrayList<>();
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisGenerator generator = IrisGenerator.WHITE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
|
||||||
|
|
||||||
|
if(!type.getRawType().equals(getClass())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TypeAdapter<>() {
|
||||||
|
public void write(JsonWriter out, T value) {
|
||||||
|
writeSafeJson(delegate, out, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
|
||||||
|
if(token == JsonToken.STRING) {
|
||||||
|
return (T) IrisPalette.flat(in.nextString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return delegate.read(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IrisPalette flat(String block){
|
||||||
|
return IrisPalette.builder()
|
||||||
|
.block(block)
|
||||||
|
.generator(IrisGenerator.FLAT)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "range", jsonTypes = {JsonToken.NUMBER, JsonToken.BEGIN_OBJECT})
|
||||||
|
public class IrisRange extends EngineResolvable implements TypeAdapterFactory {
|
||||||
|
@Builder.Default
|
||||||
|
@TokenConstructor(JsonToken.NUMBER)
|
||||||
|
private double max = 1;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private double min = 1;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisGenerator generator = IrisGenerator.NATURAL;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
|
||||||
|
|
||||||
|
if(!type.getRawType().equals(getClass())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TypeAdapter<>() {
|
||||||
|
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
|
||||||
|
if(token == JsonToken.NUMBER) {
|
||||||
|
double d = in.nextDouble();
|
||||||
|
return (T) IrisRange.builder().min(d).max(d).generator(IrisGenerator.FLAT).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
return delegate.read(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IrisRange flat(double v) {
|
||||||
|
return IrisRange.builder()
|
||||||
|
.max(v)
|
||||||
|
.min(v)
|
||||||
|
.generator(IrisGenerator.FLAT)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "seed", jsonTypes = {JsonToken.NUMBER, JsonToken.STRING, JsonToken.BEGIN_OBJECT})
|
||||||
|
public class IrisSeed extends EngineResolvable implements TypeAdapterFactory {
|
||||||
|
@Builder.Default
|
||||||
|
private IrisSeedSetMode mode = IrisSeedSetMode.LOCAL_OFFSET;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
@TokenConstructor(JsonToken.NUMBER)
|
||||||
|
private long offset = 0;
|
||||||
|
|
||||||
|
@TokenConstructor(JsonToken.STRING)
|
||||||
|
private String hashOffset;
|
||||||
|
|
||||||
|
public long getOffset() {
|
||||||
|
if(hashOffset != null && hashOffset.isNotEmpty()) {
|
||||||
|
return hashOffset.hashCode() + offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getSeed(Engine engine, long localSeed) {
|
||||||
|
return switch(mode)
|
||||||
|
{
|
||||||
|
case WORLD -> engine.getSeedManager().getWorldSeed();
|
||||||
|
case LOCAL -> localSeed;
|
||||||
|
case LOCAL_OFFSET -> localSeed + getOffset();
|
||||||
|
case RAW -> getOffset();
|
||||||
|
case WORLD_OFFSET -> engine.getSeedManager().getWorldSeed() + getOffset();
|
||||||
|
case RANDOM -> (Math.random() * Long.MAX_VALUE) + (Math.random() * Long.MAX_VALUE);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
|
||||||
|
|
||||||
|
if(!type.getRawType().equals(getClass())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TypeAdapter<>() {
|
||||||
|
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
|
||||||
|
if(token == JsonToken.STRING) {
|
||||||
|
return (T) IrisSeed.builder().hashOffset(in.nextString()).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(token == JsonToken.NUMBER) {
|
||||||
|
return (T) IrisSeed.builder().offset(Double.doubleToLongBits(in.nextDouble())).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
return delegate.read(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
public enum IrisSeedSetMode
|
||||||
|
{
|
||||||
|
WORLD,
|
||||||
|
RAW,
|
||||||
|
WORLD_OFFSET,
|
||||||
|
LOCAL,
|
||||||
|
LOCAL_OFFSET,
|
||||||
|
RANDOM
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Singular;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "surface")
|
||||||
|
public class IrisSurface extends EngineResolvable {
|
||||||
|
@Singular
|
||||||
|
@Type(IrisSurfaceLayer.class)
|
||||||
|
private List<IrisSurfaceLayer> layers = new ArrayList<>();
|
||||||
|
|
||||||
|
@Singular
|
||||||
|
@Type(IrisDecorator.class)
|
||||||
|
private List<IrisDecorator> decorators = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.volmit.iris.engine.dimension;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.engine.resolver.Resolvable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
|
@Accessors(fluent = true, chain = true)
|
||||||
|
@Resolvable.Entity(id = "surface-layer")
|
||||||
|
public class IrisSurfaceLayer extends EngineResolvable {
|
||||||
|
@Builder.Default
|
||||||
|
private IrisPalette palette = IrisPalette.flat("minecraft:stone");
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
private IrisRange thickness = IrisRange.flat(1);
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public abstract class Feature<T extends PlatformNamespaced, S extends FeatureState> {
|
||||||
|
private final String name;
|
||||||
|
private final Engine engine;
|
||||||
|
private boolean optimize;
|
||||||
|
private boolean heightAgnostic;
|
||||||
|
|
||||||
|
public Feature(String name, Engine engine)
|
||||||
|
{
|
||||||
|
this.engine = engine;
|
||||||
|
this.name = name;
|
||||||
|
this.optimize = true;
|
||||||
|
this.heightAgnostic = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeatureTask<T, S> task(FeatureSizedTarget target, FeatureTarget<T> origin, FeatureStorage storage, int verticalExecutionSize, int horizontalExecutionSize, FeatureTaskTiming timings)
|
||||||
|
{
|
||||||
|
return new FeatureTask<>(engine, this, storage, target, origin, verticalExecutionSize, horizontalExecutionSize, heightAgnostic, timings);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeatureTask<T, S> task(FeatureSizedTarget target, FeatureTarget<T> origin, FeatureStorage storage, int horizontalExecutionSize, FeatureTaskTiming timings)
|
||||||
|
{
|
||||||
|
return new FeatureTask<>(engine, this, storage, target, origin, Integer.MAX_VALUE, horizontalExecutionSize, heightAgnostic, timings);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract S prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage);
|
||||||
|
|
||||||
|
public abstract void generate(Engine engine, S state, FeatureTarget<T> target, FeatureStorage storage);
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import art.arcane.amulet.range.IntegerRange;
|
||||||
|
import art.arcane.spatial.hunk.storage.ArrayHunk;
|
||||||
|
import art.arcane.spatial.hunk.view.HunkView;
|
||||||
|
import art.arcane.spatial.util.Consume;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class FeatureSizedTarget {
|
||||||
|
@Builder.Default
|
||||||
|
private final int width = 16;
|
||||||
|
@Builder.Default
|
||||||
|
private final int height = 0;
|
||||||
|
@Builder.Default
|
||||||
|
private final int depth = 16;
|
||||||
|
@Builder.Default
|
||||||
|
private final int offsetX = 0;
|
||||||
|
@Builder.Default
|
||||||
|
private final int offsetY = 0;
|
||||||
|
@Builder.Default
|
||||||
|
private final int offsetZ = 0;
|
||||||
|
|
||||||
|
public <T extends PlatformNamespaced> FeatureTarget<T> hunked()
|
||||||
|
{
|
||||||
|
return new FeatureTarget<>(new ArrayHunk<>(width, height, depth), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T extends PlatformNamespaced> FeatureTarget<T> hunked(FeatureTarget<T> origin)
|
||||||
|
{
|
||||||
|
return new FeatureTarget<>(new HunkView<>(origin.getHunk(), width, height, depth, offsetX - origin.getOffsetX(), offsetY - origin.getOffsetY(), offsetZ - origin.getOffsetZ()), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream<FeatureSizedTarget> splitX() {
|
||||||
|
if(width <= 1) {
|
||||||
|
return Stream.of(this);
|
||||||
|
}
|
||||||
|
int wo2 = width/2;
|
||||||
|
return Stream.of(FeatureSizedTarget.builder()
|
||||||
|
.width(wo2).height(height).depth(depth)
|
||||||
|
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ).build(),
|
||||||
|
FeatureSizedTarget.builder()
|
||||||
|
.width(width - wo2).height(height).depth(depth)
|
||||||
|
.offsetX(offsetX + wo2).offsetY(offsetY).offsetZ(offsetZ).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream<FeatureSizedTarget> splitY() {
|
||||||
|
if(height <= 1) {
|
||||||
|
return Stream.of(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ho2 = height / 2;
|
||||||
|
return Stream.of(FeatureSizedTarget.builder()
|
||||||
|
.width(width).height(ho2).depth(depth)
|
||||||
|
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ).build(),
|
||||||
|
FeatureSizedTarget.builder()
|
||||||
|
.width(width).height(height - ho2).depth(depth)
|
||||||
|
.offsetX(offsetX).offsetY(offsetY + ho2).offsetZ(offsetZ).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream<FeatureSizedTarget> splitZ() {
|
||||||
|
if(depth <= 1) {
|
||||||
|
return Stream.of(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
int do2 = depth / 2;
|
||||||
|
return Stream.of(FeatureSizedTarget.builder()
|
||||||
|
.width(width).height(height).depth(do2)
|
||||||
|
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ).build(),
|
||||||
|
FeatureSizedTarget.builder()
|
||||||
|
.width(width).height(height).depth(depth - do2)
|
||||||
|
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ + do2).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAbsoluteMaxX()
|
||||||
|
{
|
||||||
|
return getOffsetX() + getWidth() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAbsoluteMaxY()
|
||||||
|
{
|
||||||
|
return getOffsetY() + getHeight() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAbsoluteMaxZ()
|
||||||
|
{
|
||||||
|
return getOffsetZ() + getDepth() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange yCap(int max) {
|
||||||
|
return new IntegerRange(y().getLeftEndpoint(), Math.min(y().getRightEndpoint(), max));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void forYCap(Consume.One<Integer> consumer, int max) {
|
||||||
|
for(int y : yCap(max)) {
|
||||||
|
consumer.accept(y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void forXZ(Consume.Two<Integer, Integer> consumer) {
|
||||||
|
for(int x : x()) {
|
||||||
|
for(int z : z()) {
|
||||||
|
consumer.accept(x, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange x()
|
||||||
|
{
|
||||||
|
return new IntegerRange(getOffsetX(), getAbsoluteMaxX());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange y()
|
||||||
|
{
|
||||||
|
return new IntegerRange(getOffsetY(), getAbsoluteMaxY());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange z()
|
||||||
|
{
|
||||||
|
return new IntegerRange(getOffsetZ(), getAbsoluteMaxZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange localX()
|
||||||
|
{
|
||||||
|
return new IntegerRange(0, getWidth() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange localY()
|
||||||
|
{
|
||||||
|
return new IntegerRange(0, getHeight() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerRange localZ()
|
||||||
|
{
|
||||||
|
return new IntegerRange(0, getDepth() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FeatureSizedTarget mergedSize(Stream<FeatureSizedTarget> targets, boolean x, boolean y, boolean z) {
|
||||||
|
List<FeatureSizedTarget> t = targets.toList();
|
||||||
|
return FeatureSizedTarget.builder()
|
||||||
|
.width(x ? t.stream().mapToInt(FeatureSizedTarget::getWidth).sum() : t[0].getWidth())
|
||||||
|
.height(y ? t.stream().mapToInt(FeatureSizedTarget::getHeight).sum() : t[0].getHeight())
|
||||||
|
.depth(z ? t.stream().mapToInt(FeatureSizedTarget::getDepth).sum() : t[0].getDepth())
|
||||||
|
.offsetX(x ? t.stream().mapToInt(FeatureSizedTarget::getOffsetX).min().orElse(0) : t[0].getOffsetX())
|
||||||
|
.offsetY(y ? t.stream().mapToInt(FeatureSizedTarget::getOffsetY).min().orElse(0) : t[0].getOffsetY())
|
||||||
|
.offsetZ(z ? t.stream().mapToInt(FeatureSizedTarget::getOffsetZ).min().orElse(0) : t[0].getOffsetZ())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
public interface FeatureState {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.dimension.IrisBiome;
|
||||||
|
import com.volmit.iris.util.NoiseCache;
|
||||||
|
import com.volmit.iris.util.ShortNoiseCache;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FeatureStorage {
|
||||||
|
private ShortNoiseCache height;
|
||||||
|
private NoiseCache<IrisBiome> biome;
|
||||||
|
private final int w;
|
||||||
|
private final int h;
|
||||||
|
|
||||||
|
public FeatureStorage(int w, int h)
|
||||||
|
{
|
||||||
|
this.w = w;
|
||||||
|
this.h = h;
|
||||||
|
this.height = new ShortNoiseCache(w, h);
|
||||||
|
this.biome = new NoiseCache<>(w, h);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import art.arcane.spatial.hunk.Hunk;
|
||||||
|
import art.arcane.spatial.hunk.view.HunkView;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class FeatureTarget<T extends PlatformNamespaced> extends FeatureSizedTarget {
|
||||||
|
private final Hunk<T> hunk;
|
||||||
|
|
||||||
|
public FeatureTarget(Hunk<T> hunk, int offsetX, int offsetY, int offsetZ)
|
||||||
|
{
|
||||||
|
super(hunk.getWidth(), hunk.getHeight(), hunk.getDepth(), offsetX, offsetY, offsetZ);
|
||||||
|
this.hunk = hunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeatureTarget(Hunk<T> hunk, FeatureSizedTarget target)
|
||||||
|
{
|
||||||
|
this(hunk, target.getOffsetX(), target.getOffsetY(), target.getOffsetZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <V extends PlatformNamespaced> FeatureTarget<V> mergedTarget(Stream<FeatureTarget<V>> targets, FeatureTarget<V> origin, boolean x, boolean y, boolean z)
|
||||||
|
{
|
||||||
|
List<FeatureTarget<V>> t = targets.toList();
|
||||||
|
FeatureSizedTarget mergedSize = FeatureSizedTarget.mergedSize(t.stream().map(i -> i), x, y, z);
|
||||||
|
Hunk<V> hunk = new HunkView<>(origin.getHunk(), mergedSize.getWidth(), mergedSize.getHeight(), mergedSize.getDepth(),
|
||||||
|
mergedSize.getOffsetX() - origin.getOffsetX(),
|
||||||
|
mergedSize.getOffsetY() - origin.getOffsetY(),
|
||||||
|
mergedSize.getOffsetZ() - origin.getOffsetZ());
|
||||||
|
return new FeatureTarget<>(hunk, mergedSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import art.arcane.chrono.PrecisionStopwatch;
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
|
import java.util.concurrent.ForkJoinTask;
|
||||||
|
import java.util.concurrent.RecursiveTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Continuously splits up a hunk of work in all 3 dimensions until the job size is within the
|
||||||
|
* specified limits. This allows a single hunk to be split until the ideal amount of tasks can run in parallel.
|
||||||
|
* @param <T> The namespaced object type
|
||||||
|
* @param <S> The feature state type
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FeatureTask<T extends PlatformNamespaced, S extends FeatureState> extends RecursiveTask<FeatureTarget<T>> implements Callable<FeatureTarget<T>> {
|
||||||
|
private final Engine engine;
|
||||||
|
private final Feature<T, S> feature;
|
||||||
|
private final FeatureStorage storage;
|
||||||
|
private final FeatureSizedTarget size;
|
||||||
|
private final FeatureTarget<T> origin;
|
||||||
|
private final int verticalPrepareSize;
|
||||||
|
private final int horizontalPrepareSize;
|
||||||
|
private final boolean heightAgnostic;
|
||||||
|
private final FeatureTaskTiming timings;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected FeatureTarget<T> compute() {
|
||||||
|
FeatureTarget<T> result;
|
||||||
|
PrecisionStopwatch p = null;
|
||||||
|
|
||||||
|
if(timings != null) {
|
||||||
|
p = PrecisionStopwatch.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!heightAgnostic && size.getHeight() > verticalPrepareSize * 2) {
|
||||||
|
result = FeatureTarget.mergedTarget(size.splitY()
|
||||||
|
.map(i -> engine.getExecutor().getForks().submit((ForkJoinTask<FeatureTarget<T>>) with(i)))
|
||||||
|
.map(ForkJoinTask::join), origin, false, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(size.getWidth() > horizontalPrepareSize * 2) {
|
||||||
|
result = FeatureTarget.mergedTarget(size.splitX().map(i -> engine.getExecutor().getForks().submit((ForkJoinTask<FeatureTarget<T>>) with(i)))
|
||||||
|
.map(ForkJoinTask::join), origin, true, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(size.getDepth() > horizontalPrepareSize * 2) {
|
||||||
|
result = FeatureTarget.mergedTarget(size.splitZ().map(i -> engine.getExecutor().getForks().submit((ForkJoinTask<FeatureTarget<T>>) with(i)))
|
||||||
|
.map(ForkJoinTask::join), origin, false, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
IrisPreparedFeature<T, S> preparedFeature = new IrisPreparedFeature<>(engine, feature, size, feature.prepare(engine, size, storage));
|
||||||
|
result = preparedFeature.generate(origin, storage);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(timings != null) {
|
||||||
|
timings.onCompleted(p.getMilliseconds());
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private FeatureTask<T, S> with(FeatureSizedTarget size)
|
||||||
|
{
|
||||||
|
return new FeatureTask<>(engine, feature, storage, size, origin, verticalPrepareSize, horizontalPrepareSize, heightAgnostic, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureTarget<T> call() throws Exception {
|
||||||
|
return compute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface FeatureTaskTiming {
|
||||||
|
void onCompleted(double ms);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
public class IrisPreparedFeature<T extends PlatformNamespaced, S extends FeatureState> {
|
||||||
|
private final Engine engine;
|
||||||
|
private final Feature<T, S> feature;
|
||||||
|
private final FeatureSizedTarget size;
|
||||||
|
private final S state;
|
||||||
|
|
||||||
|
public FeatureTarget<T> generate(FeatureTarget<T> origin, FeatureStorage storage) {
|
||||||
|
FeatureTarget<T> target = size.hunked(origin);
|
||||||
|
feature.generate(engine, state, target, storage);
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.volmit.iris.engine.feature;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureStorage;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureTarget;
|
||||||
|
import com.volmit.iris.engine.feature.features.FeatureTerrain;
|
||||||
|
import com.volmit.iris.engine.resolver.EngineResolvable;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
|
||||||
|
public interface SyntheticFeature<T extends PlatformNamespaced, V extends EngineResolvable, S extends FeatureState> {
|
||||||
|
void generate(Engine engine, V component, FeatureTarget<T> target, S state);
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.volmit.iris.engine.feature.features;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.Feature;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureSizedTarget;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureState;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureStorage;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureTarget;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
public class FeatureError extends Feature<PlatformBlock, FeatureError.State> {
|
||||||
|
private static final State DEFAULT_STATE = new State();
|
||||||
|
private final PlatformBlock ERROR_BLOCK;
|
||||||
|
|
||||||
|
public FeatureError(Engine engine) {
|
||||||
|
super("error", engine);
|
||||||
|
setOptimize(false);
|
||||||
|
ERROR_BLOCK = engine.block("red_sandstone");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public State prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage) {
|
||||||
|
return DEFAULT_STATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generate(Engine engine, State state, FeatureTarget<PlatformBlock> target, FeatureStorage storage) {
|
||||||
|
target.forXZ((x, z) -> target.forYCap((y -> target.getHunk().set(x, y, z, ERROR_BLOCK)), 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class State implements FeatureState {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.volmit.iris.engine.feature.features;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.dimension.IrisBiome;
|
||||||
|
import com.volmit.iris.engine.feature.*;
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import com.volmit.iris.util.NoiseCache;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
public class FeatureOriginBiome extends Feature<PlatformBiome, FeatureOriginBiome.State> {
|
||||||
|
public FeatureOriginBiome(Engine engine) {
|
||||||
|
super("biome-origin", engine);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public State prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage) {
|
||||||
|
final NoiseCache<IrisBiome> noise = storage.getBiome();
|
||||||
|
|
||||||
|
for(int x : target.x()) {
|
||||||
|
for(int z : target.z()) {
|
||||||
|
noise.set(x & storage.getW() - 1, z & storage.getH() - 1, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new State(noise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generate(Engine engine, State state, FeatureTarget<PlatformBiome> target, FeatureStorage storage) {
|
||||||
|
for(int x : target.x()) {
|
||||||
|
for(int z : target.z()) {
|
||||||
|
IrisBiome b = state.getBiomes().get(x, z);
|
||||||
|
target.getHunk().set(x, 0, z, b.toPlatformBiome());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class State implements FeatureState {
|
||||||
|
private final NoiseCache<IrisBiome> biomes;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.volmit.iris.engine.feature.features;
|
||||||
|
|
||||||
|
import art.arcane.source.NoisePlane;
|
||||||
|
import art.arcane.source.interpolator.CubicInterpolator;
|
||||||
|
import art.arcane.source.interpolator.Interpolator;
|
||||||
|
import art.arcane.source.interpolator.LinearInterpolator;
|
||||||
|
import art.arcane.source.interpolator.StarcastInterpolator;
|
||||||
|
import art.arcane.source.noise.provider.MirroredCacheProvider;
|
||||||
|
import art.arcane.source.util.NoisePreset;
|
||||||
|
import art.arcane.spatial.hunk.Hunk;
|
||||||
|
import art.arcane.spatial.hunk.storage.ArrayHunk;
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.*;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
public class FeatureTerrain extends Feature<PlatformBlock, FeatureTerrain.State> {
|
||||||
|
private final PlatformBlock stone;
|
||||||
|
private final NoisePlane generator;
|
||||||
|
private final NoisePlane generator2;
|
||||||
|
|
||||||
|
public FeatureTerrain(Engine engine) {
|
||||||
|
super("terrain", engine);
|
||||||
|
setOptimize(true);
|
||||||
|
stone = engine.block("stone");
|
||||||
|
this.generator = NoisePreset.NATURAL.create(1234);
|
||||||
|
this.generator2 = NoisePreset.NATURAL.create(6664).fit(0, 1).scale(0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public State prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage) {
|
||||||
|
Hunk<Double> snc = new ArrayHunk<>(target.getWidth(), target.getHeight(), target.getDepth());
|
||||||
|
short n;
|
||||||
|
int fdx,fdz;
|
||||||
|
for(int x : target.x()) {
|
||||||
|
fdx = Math.floorMod(x, target.getWidth());
|
||||||
|
for(int z : target.z()) {
|
||||||
|
fdz = Math.floorMod(z, target.getDepth());
|
||||||
|
n = (short) generator.noise(x, z);
|
||||||
|
for(int y = 0; y < n; y++) {
|
||||||
|
if(generator2.noise(x,y,z) > 0.5) {
|
||||||
|
snc.set(fdx, y, fdz, 1D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new State(snc);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generate(Engine engine, State state, FeatureTarget<PlatformBlock> target, FeatureStorage storage) {
|
||||||
|
int y;
|
||||||
|
for(int x : target.localX()) {
|
||||||
|
for(int z : target.localZ()) {
|
||||||
|
for(int i = 0; i < target.getHeight(); i++) {
|
||||||
|
Double v = state.getNoise().get(x, i, z);
|
||||||
|
v = v == null ? 0f : v;
|
||||||
|
if(v >= 0.5) {
|
||||||
|
target.getHunk().set(x,i, z, stone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class State implements FeatureState {
|
||||||
|
private final Hunk<Double> noise;
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.volmit.iris.engine.feature.features.synthetic;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.dimension.IrisBiome;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureStorage;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureTarget;
|
||||||
|
import com.volmit.iris.engine.feature.SyntheticFeature;
|
||||||
|
import com.volmit.iris.engine.feature.features.FeatureTerrain;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
|
||||||
|
public class SyntheticBiomeTerrain implements SyntheticFeature<PlatformBlock, IrisBiome, FeatureTerrain.State>
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void generate(Engine engine, IrisBiome component, FeatureTarget<PlatformBlock> target, FeatureTerrain.State state) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.volmit.iris.engine.network;
|
||||||
|
|
||||||
|
public class Network {
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.volmit.iris.engine.network.server;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.ServerSocket;
|
||||||
|
import java.net.Socket;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class EngineServer extends Thread {
|
||||||
|
private final Engine engine;
|
||||||
|
private final ServerSocket server;
|
||||||
|
private final Map<UUID, EngineServerConnection> connections;
|
||||||
|
|
||||||
|
public EngineServer(Engine engine, int bindPort) throws IOException {
|
||||||
|
this.engine = engine;
|
||||||
|
this.connections = new HashMap<>();
|
||||||
|
this.server = new ServerSocket(bindPort);
|
||||||
|
this.server.setPerformancePreferences(0, 0, 1);
|
||||||
|
this.server.setSoTimeout(5000);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
while(!interrupted()) {
|
||||||
|
try {
|
||||||
|
Socket socket = server.accept();
|
||||||
|
EngineServerConnection connection = new EngineServerConnection(this, socket);
|
||||||
|
connections.put(connection.getConnectionId(), connection);
|
||||||
|
}
|
||||||
|
catch(SocketTimeoutException e) {
|
||||||
|
continue;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close() throws IOException {
|
||||||
|
this.interrupt();
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
package com.volmit.iris.engine.network.server;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.net.Socket;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public class EngineServerConnection extends Thread {
|
||||||
|
private final EngineServer server;
|
||||||
|
private final Socket socket;
|
||||||
|
private final UUID connectionId;
|
||||||
|
|
||||||
|
public EngineServerConnection(EngineServer server, Socket socket) {
|
||||||
|
this.server = server;
|
||||||
|
this.socket = socket;
|
||||||
|
this.connectionId = UUID.randomUUID();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.volmit.iris.engine.optimizer;
|
||||||
|
|
||||||
|
import art.arcane.amulet.range.IntegerRange;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class HunkSlizeConfiguration {
|
||||||
|
private final int verticalSlice;
|
||||||
|
private final int horizontalSlize;
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "H" + horizontalSlize + "" + ((verticalSlice < 8192) ? ("V" + verticalSlice) : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<HunkSlizeConfiguration> generateConfigurations(IntegerRange vertical, IntegerRange horizontal)
|
||||||
|
{
|
||||||
|
List<HunkSlizeConfiguration> configurations = new ArrayList<>();
|
||||||
|
|
||||||
|
for(int i : slice(vertical))
|
||||||
|
{
|
||||||
|
for(int j : slice(horizontal))
|
||||||
|
{
|
||||||
|
configurations.add(new HunkSlizeConfiguration(i, j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return configurations;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<HunkSlizeConfiguration> generateConfigurations(int vertical, IntegerRange horizontal)
|
||||||
|
{
|
||||||
|
List<HunkSlizeConfiguration> configurations = new ArrayList<>();
|
||||||
|
|
||||||
|
for(int j : slice(horizontal))
|
||||||
|
{
|
||||||
|
configurations.add(new HunkSlizeConfiguration(vertical, j));
|
||||||
|
}
|
||||||
|
|
||||||
|
return configurations;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<Integer> slice(IntegerRange range)
|
||||||
|
{
|
||||||
|
List<Integer> v = new ArrayList<>();
|
||||||
|
v.add(range.getRightEndpoint());
|
||||||
|
v.add(range.getLeftEndpoint());
|
||||||
|
int i = (int) (range.getRightEndpoint() / 1.25);
|
||||||
|
|
||||||
|
while(i > range.getLeftEndpoint() && i >= 1)
|
||||||
|
{
|
||||||
|
v.add(i);
|
||||||
|
i /= 1.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
return v.withoutDuplicates();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.volmit.iris.engine.optimizer;
|
||||||
|
|
||||||
|
import art.arcane.chrono.Average;
|
||||||
|
import art.arcane.spatial.hunk.storage.AtomicDoubleHunk;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class IrisOptimizationAttempt<T> {
|
||||||
|
private double value;
|
||||||
|
private final AtomicInteger runs;
|
||||||
|
private final int testRuns;
|
||||||
|
private final T parameters;
|
||||||
|
|
||||||
|
public IrisOptimizationAttempt(T parameters, int testRuns)
|
||||||
|
{
|
||||||
|
this.parameters = parameters;
|
||||||
|
this.testRuns = testRuns;
|
||||||
|
this.value = 0;
|
||||||
|
this.runs = new AtomicInteger(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAverageTime()
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isComplete()
|
||||||
|
{
|
||||||
|
return runs.get() >= testRuns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void report(double ms) {
|
||||||
|
value += ms;
|
||||||
|
runs.incrementAndGet();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.volmit.iris.engine.optimizer;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import art.arcane.chrono.Average;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Singular;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class IrisOptimizer<T> {
|
||||||
|
private final String optimizedFeatureName;
|
||||||
|
private final int testRuns;
|
||||||
|
private int dummyRuns;
|
||||||
|
private final List<T> options;
|
||||||
|
private final Map<T, Double> results;
|
||||||
|
private final Map<T, IrisOptimizationAttempt<T>> attempts = new ConcurrentHashMap<>();
|
||||||
|
private T defaultOption;
|
||||||
|
private final double chanceToTest;
|
||||||
|
private double bestTime;
|
||||||
|
|
||||||
|
public IrisOptimizer(int testRuns, List<T> options, T defaultOption, double chanceToTest, String optimizedFeatureName) {
|
||||||
|
this.bestTime = Double.MAX_VALUE;
|
||||||
|
this.dummyRuns = 1024;
|
||||||
|
this.testRuns = testRuns;
|
||||||
|
this.results = new HashMap<>();
|
||||||
|
this.options = options;
|
||||||
|
this.optimizedFeatureName = optimizedFeatureName;
|
||||||
|
this.defaultOption = defaultOption;
|
||||||
|
this.chanceToTest = chanceToTest;
|
||||||
|
|
||||||
|
for(T i : options) {
|
||||||
|
attempts.put(i, new IrisOptimizationAttempt<>(i, testRuns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return "optimizer";
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void report(T parameters, double ms)
|
||||||
|
{
|
||||||
|
if(dummyRuns-- > 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IrisOptimizationAttempt<T> attempt = attempts.get(parameters);
|
||||||
|
|
||||||
|
if(attempt != null) {
|
||||||
|
attempt.report(ms);
|
||||||
|
|
||||||
|
if(attempt.isComplete()) {
|
||||||
|
results.put(parameters, attempt.getAverageTime());
|
||||||
|
attempts.remove(parameters);
|
||||||
|
double result = attempt.getAverageTime();
|
||||||
|
|
||||||
|
if(result < bestTime) {
|
||||||
|
bestTime = result;
|
||||||
|
defaultOption = attempt.getParameters();
|
||||||
|
}
|
||||||
|
|
||||||
|
d("Attempted " + optimizedFeatureName + " with " + defaultOption.toString() + " " + Form.duration(attempt.getAverageTime(), 2));
|
||||||
|
|
||||||
|
if(attempts.isEmpty()) {
|
||||||
|
d("Fully Optimized " + optimizedFeatureName + " with " + defaultOption.toString());
|
||||||
|
|
||||||
|
for(T i : results.keySet()) {
|
||||||
|
d(i.toString() + ": " + Form.duration(results.get(i), 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public T nextParameters() {
|
||||||
|
if(!attempts.isEmpty() && Math.r(chanceToTest)) {
|
||||||
|
return attempts.k().popRandom();
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultOption;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.volmit.iris.engine.pipeline;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureSizedTarget;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureStorage;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Singular;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class EnginePipeline
|
||||||
|
{
|
||||||
|
@Singular
|
||||||
|
private final List<PipelinePhase> phases;
|
||||||
|
|
||||||
|
public void generate(Engine engine, FeatureSizedTarget target, PipedHunkStack stack) {
|
||||||
|
FeatureStorage storage = new FeatureStorage(engine.getConfiguration().getChunkSize(), engine.getConfiguration().getChunkSize());
|
||||||
|
|
||||||
|
for(PipelinePhase i : phases) {
|
||||||
|
i.generate(engine, target, stack, storage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.volmit.iris.engine.pipeline;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureSizedTarget;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Singular;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EnginePlumbing {
|
||||||
|
private final Engine engine;
|
||||||
|
@Singular
|
||||||
|
private final List<EnginePipeline> pipelines;
|
||||||
|
private final EnginePipeline errorPipeline;
|
||||||
|
|
||||||
|
public void generate(Engine engine, FeatureSizedTarget target, PipedHunkStack stack) {
|
||||||
|
for(EnginePipeline i : pipelines) {
|
||||||
|
i.generate(engine, target, stack);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
getErrorPipeline().generate(engine, target, stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.volmit.iris.engine.pipeline;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.feature.FeatureTarget;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class PipedHunkStack {
|
||||||
|
private final Map<Class<? extends PlatformNamespaced>, FeatureTarget<? extends PlatformNamespaced>> hunks;
|
||||||
|
|
||||||
|
public PipedHunkStack()
|
||||||
|
{
|
||||||
|
this.hunks = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void register(Class<? extends PlatformNamespaced> clazz, FeatureTarget<? extends PlatformNamespaced> hunk)
|
||||||
|
{
|
||||||
|
hunks.put(clazz, hunk);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public <T extends PlatformNamespaced> FeatureTarget<T> hunk(Class<?> hunk)
|
||||||
|
{
|
||||||
|
return (FeatureTarget<T>) hunks.get(hunk);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.volmit.iris.engine.pipeline;
|
||||||
|
|
||||||
|
import com.volmit.iris.engine.Engine;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureSizedTarget;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureStorage;
|
||||||
|
import com.volmit.iris.engine.feature.FeatureTarget;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Singular;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PipelinePhase
|
||||||
|
{
|
||||||
|
@Singular
|
||||||
|
private final List<PipelineTask<?>> tasks;
|
||||||
|
|
||||||
|
public List<FeatureTarget<?>> generate(Engine engine, FeatureSizedTarget target, PipedHunkStack stack, FeatureStorage storage) {
|
||||||
|
return engine.getExecutor().getForks().invokeAll(tasks.stream().map(i -> i.task(target, stack.hunk(i.getTarget()), storage))
|
||||||
|
.collect(Collectors.toList())).stream().map(i -> {
|
||||||
|
try {
|
||||||
|
return i.get();
|
||||||
|
} catch(Throwable e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.volmit.iris.engine.pipeline;
|
||||||
|
|
||||||
|
import art.arcane.amulet.range.IntegerRange;
|
||||||
|
import com.volmit.iris.engine.feature.*;
|
||||||
|
import com.volmit.iris.engine.optimizer.HunkSlizeConfiguration;
|
||||||
|
import com.volmit.iris.engine.optimizer.IrisOptimizer;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static art.arcane.amulet.MagicalSugar.*;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class PipelineTask<T extends PlatformNamespaced>
|
||||||
|
{
|
||||||
|
private final Feature<T, ?> feature;
|
||||||
|
private final Class<T> target;
|
||||||
|
private final IntegerRange verticalEnvelope;
|
||||||
|
private final IntegerRange horizontalEnvelope;
|
||||||
|
private final IrisOptimizer<HunkSlizeConfiguration> optimizer;
|
||||||
|
|
||||||
|
public PipelineTask(Feature<T, ?> feature, Class<T> target, IntegerRange verticalEnvelope, IntegerRange horizontalEnvelope)
|
||||||
|
{
|
||||||
|
this.feature = feature;
|
||||||
|
this.target = target;
|
||||||
|
this.verticalEnvelope = verticalEnvelope;
|
||||||
|
this.horizontalEnvelope = horizontalEnvelope;
|
||||||
|
List<HunkSlizeConfiguration> configurations = feature.isHeightAgnostic() ? HunkSlizeConfiguration.generateConfigurations(Integer.MAX_VALUE, horizontalEnvelope)
|
||||||
|
: HunkSlizeConfiguration.generateConfigurations(verticalEnvelope, horizontalEnvelope);
|
||||||
|
this.optimizer = new IrisOptimizer<>(128, configurations, configurations[0], 1, feature.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PipelineTask(Feature<T, ?> feature, Class<T> target) {
|
||||||
|
this(feature, target, 1 to 16, 1 to 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeatureTask<T, ?> task(FeatureSizedTarget target, FeatureTarget<T> origin, FeatureStorage storage){
|
||||||
|
HunkSlizeConfiguration configuration = getFeature().isOptimize() ? optimizer.nextParameters() : optimizer.getDefaultOption();
|
||||||
|
return feature.task(target, origin, storage, configuration.getVerticalSlice(), configuration.getHorizontalSlize(), (ms) -> optimizer.report(configuration, ms));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CompositeResolver<T extends Resolvable> implements Resolver<T> {
|
||||||
|
private final Map<String, Resolver<T>> resolvers;
|
||||||
|
private final String[] namespaces;
|
||||||
|
|
||||||
|
public CompositeResolver(Map<String, Resolver<T>> resolvers)
|
||||||
|
{
|
||||||
|
this.resolvers = resolvers;
|
||||||
|
this.namespaces = resolvers.keySet().toArray(new String[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNamespace(String namespace) {
|
||||||
|
return resolvers.containsKey(namespace);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T resolve(PlatformNamespaceKey key) {
|
||||||
|
return resolvers.get(key.getNamespace()).resolve(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T resolve(String key) {
|
||||||
|
for(String i : getNamespaces()) {
|
||||||
|
if(resolvers.get(i).contains(i, key)) {
|
||||||
|
return resolvers.get(i).resolve(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resolver<T> and(String namespace, Resolver<T> resolver) {
|
||||||
|
Map<String, Resolver<T>> resolvers = this.resolvers.copy();
|
||||||
|
|
||||||
|
if(hasNamespace(namespace)) {
|
||||||
|
resolvers.put(namespace, resolvers.get(namespace).and(namespace, resolver));
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
resolvers.put(namespace, resolver);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new CompositeResolver<>(resolvers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void print(String type, Object printer, int indent) {
|
||||||
|
printer.i(Form.repeat(" ", indent) + "Composite[" + Arrays.toString(getNamespaces()) + "] " + type);
|
||||||
|
|
||||||
|
for(Resolver<T> i : getResolvers().values()) {
|
||||||
|
i.print(type, printer, indent + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addAllKeys(List<PlatformNamespaceKey> keys) {
|
||||||
|
resolvers.forEach((k, v) -> v.addAllKeys(keys));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class EngineResolvable implements Resolvable {
|
||||||
|
private PlatformNamespaceKey key;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.util.NSK;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FrozenResolver<T extends Resolvable> implements Resolver<T> {
|
||||||
|
private final Map<String, T> registry;
|
||||||
|
private final String namespace;
|
||||||
|
|
||||||
|
public FrozenResolver(String namespace, Map<String, T> registry)
|
||||||
|
{
|
||||||
|
this.registry = Collections.unmodifiableMap(registry);
|
||||||
|
this.namespace = namespace;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNamespace(String namespace) {
|
||||||
|
return this.namespace.equals(namespace);
|
||||||
|
}
|
||||||
|
|
||||||
|
public T resolve(PlatformNamespaceKey key) {
|
||||||
|
return registry.get(key.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T resolve(String key) {
|
||||||
|
return registry.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void print(String type, Object printer, int indent) {
|
||||||
|
printer.i(Form.repeat(" ", indent) + "Frozen[" + namespace + "] " + type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addAllKeys(List<PlatformNamespaceKey> keys) {
|
||||||
|
registry.keySet().forEach((k) -> keys.add(new NSK(getNamespace(), k)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resolver<T> and(String namespace, Resolver<T> resolver) {
|
||||||
|
if(!namespace.equals(getNamespace())) {
|
||||||
|
return new CompositeResolver<>(Map.of(namespace, resolver, getNamespace(), this));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new MergedNamespaceResolver<>(namespace, this, resolver);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import com.github.benmanes.caffeine.cache.CacheLoader;
|
||||||
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||||
|
import com.github.benmanes.caffeine.cache.LoadingCache;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import com.volmit.iris.util.NSK;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HotResolver<T extends Resolvable> implements Resolver<T>, CacheLoader<String, T> {
|
||||||
|
private final LoadingCache<String, T> cache;
|
||||||
|
private final String namespace;
|
||||||
|
private final Function<String, T> loader;
|
||||||
|
private final Supplier<List<String>> keyGetter;
|
||||||
|
|
||||||
|
public HotResolver(String namespace, Function<String, T> loader, Supplier<List<String>> keyGetter)
|
||||||
|
{
|
||||||
|
this.namespace = namespace;
|
||||||
|
this.keyGetter = keyGetter;
|
||||||
|
this.loader = loader;
|
||||||
|
cache = Caffeine.newBuilder().build(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public T resolve(PlatformNamespaceKey key) {
|
||||||
|
return cache.get(key.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T resolve(String key) {
|
||||||
|
return cache.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasNamespace(String namespace) {
|
||||||
|
return this.namespace.equals(namespace);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FrozenResolver<T> freeze()
|
||||||
|
{
|
||||||
|
cache.cleanUp();
|
||||||
|
Map<String, T> map = new HashMap<>((int) cache.estimatedSize());
|
||||||
|
Map<String, T> view = cache.asMap();
|
||||||
|
|
||||||
|
for(String i : view.keySet()) {
|
||||||
|
map.put(i, view.get(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new FrozenResolver<>(getNamespace(), Collections.unmodifiableMap(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable T load(String key) {
|
||||||
|
return loader.apply(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resolver<T> and(String namespace, Resolver<T> resolver) {
|
||||||
|
if(!namespace.equals(getNamespace())) {
|
||||||
|
return new CompositeResolver<>(Map.of(namespace, resolver, getNamespace(), this));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new MergedNamespaceResolver<>(namespace, this, resolver);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void print(String type, Object printer, int indent) {
|
||||||
|
printer.i(Form.repeat(" ", indent) + "Hot[" + namespace + "] " + type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addAllKeys(List<PlatformNamespaceKey> keys) {
|
||||||
|
keys.addAll(keyGetter.get().stream().map(i -> new NSK(getNamespace(), i)).toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MergedNamespaceResolver<T extends Resolvable> implements Resolver<T> {
|
||||||
|
private final String namespace;
|
||||||
|
private final List<Resolver<T>> resolvers;
|
||||||
|
|
||||||
|
public MergedNamespaceResolver(String namespace, Resolver<T>... resolvers)
|
||||||
|
{
|
||||||
|
this(namespace, Arrays.stream(resolvers).toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MergedNamespaceResolver(String namespace, List<Resolver<T>> resolvers)
|
||||||
|
{
|
||||||
|
this.namespace = namespace;
|
||||||
|
this.resolvers = resolvers;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNamespace(String namespace) {
|
||||||
|
return this.namespace.equals(namespace);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T resolve(PlatformNamespaceKey key) {
|
||||||
|
for(Resolver<T> i : resolvers) {
|
||||||
|
T t = i.resolve(key);
|
||||||
|
|
||||||
|
if(t != null)
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T resolve(String key) {
|
||||||
|
for(Resolver<T> i : resolvers) {
|
||||||
|
T t = i.resolve(key);
|
||||||
|
|
||||||
|
if(t != null)
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void print(String type, Object printer, int indent) {
|
||||||
|
printer.i(Form.repeat(" ", indent) + "Merged[" + namespace + "] " + type);
|
||||||
|
|
||||||
|
for(Resolver<T> i : getResolvers()) {
|
||||||
|
i.print(type, printer, indent + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addAllKeys(List<PlatformNamespaceKey> keys) {
|
||||||
|
resolvers.forEach(i -> i.addAllKeys(keys));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resolver<T> and(String namespace, Resolver<T> resolver) {
|
||||||
|
if(namespace.equals(getNamespace()))
|
||||||
|
{
|
||||||
|
List<Resolver<T>> r = resolvers.copy();
|
||||||
|
r.add(resolver);
|
||||||
|
return new MergedNamespaceResolver<>(namespace, r);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new CompositeResolver<>(Map.of(getNamespace(), this, namespace, resolver));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,257 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import art.arcane.cram.PakResource;
|
||||||
|
import com.google.gson.*;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import com.volmit.iris.engine.EngineData;
|
||||||
|
import com.volmit.iris.platform.PlatformBiome;
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespacedMutable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface Resolvable extends PlatformNamespaced, PlatformNamespacedMutable, PakResource {
|
||||||
|
String SCHEMA = "http://json-schema.org/draft-07/schema#";
|
||||||
|
|
||||||
|
default String getSchemaId() {
|
||||||
|
return "https://art.arcane/iris/schemas/"+entity().getId()+".json";
|
||||||
|
}
|
||||||
|
|
||||||
|
default String getSchemaRefId() {
|
||||||
|
return entity().getId()+".json";
|
||||||
|
}
|
||||||
|
|
||||||
|
default JsonObject generateSchema(EngineData data) {
|
||||||
|
JsonObject object = new JsonObject();
|
||||||
|
Entity.ResolverEntityData entity = entity();
|
||||||
|
object.add("$schema", new JsonPrimitive(SCHEMA));
|
||||||
|
object.add("$id", new JsonPrimitive(getSchemaId()));
|
||||||
|
object.add("type", new JsonPrimitive("object"));
|
||||||
|
object.add("description", new JsonPrimitive("No Description for " + entity.getName()));
|
||||||
|
|
||||||
|
JsonObject properties = new JsonObject();
|
||||||
|
JsonObject definitions = new JsonObject();
|
||||||
|
|
||||||
|
for(Field i : getClass().getDeclaredFields()) {
|
||||||
|
i.access();
|
||||||
|
|
||||||
|
if (Modifier.isStatic(i.getModifiers()) || Modifier.isTransient(i.getModifiers())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
properties.add(i.getName(), generateSchemaProperty(data, i.getName(), i.getType(), i.getDeclaredAnnotation(Type.class), i.getDeclaredAnnotation(PlatformType.class), definitions));
|
||||||
|
}
|
||||||
|
|
||||||
|
object.add("properties", properties);
|
||||||
|
object.add("definitions", definitions);
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
default String getSchemaDefinition(String name) {
|
||||||
|
return "D" + name.hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
default JsonObject generateSchemaProperty(EngineData data, String name, Class<?> type, Type listType, PlatformType platformType, JsonObject definitions) {
|
||||||
|
JsonObject main = new JsonObject();
|
||||||
|
JsonArray anyOf = new JsonArray();
|
||||||
|
JsonObject object = new JsonObject();
|
||||||
|
anyOf.add(object);
|
||||||
|
object.add("description", new JsonPrimitive("No Description for field " + name));
|
||||||
|
|
||||||
|
if(type.isAssignableFrom(Resolvable.class) || Resolvable.class.isAssignableFrom(type)) {
|
||||||
|
Resolvable r = data.getInstance(type);
|
||||||
|
|
||||||
|
if(r != null) {
|
||||||
|
String def = getSchemaDefinition(r.getClass().simpleName());
|
||||||
|
object.add("$ref", new JsonPrimitive(r.getSchemaRefId()));
|
||||||
|
JsonObject registry = new JsonObject();
|
||||||
|
registry.add("description", new JsonPrimitive("No Description for field " + name));
|
||||||
|
String defName = getSchemaDefinition("resolve" + type.getCanonicalName());
|
||||||
|
registry.add("type", new JsonPrimitive("string"));
|
||||||
|
registry.add("$ref", new JsonPrimitive("#/definitions/" + defName));
|
||||||
|
|
||||||
|
if(!definitions.has(defName)) {
|
||||||
|
JsonObject enumDef = new JsonObject();
|
||||||
|
JsonArray enums = new JsonArray();
|
||||||
|
data.getAllKeys(type).forEach(i -> enums.add(i.toString()));
|
||||||
|
enumDef.add("enum", enums);
|
||||||
|
definitions.add(defName, enumDef);
|
||||||
|
}
|
||||||
|
|
||||||
|
anyOf.add(registry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type.isAssignableFrom(List.class) || List.class.isAssignableFrom(type)) {
|
||||||
|
if(listType != null) {
|
||||||
|
JsonObject internal = generateSchemaProperty(data, "list", listType.value(), null, platformType, definitions);
|
||||||
|
object.add("items", internal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type.isEnum()) {
|
||||||
|
String defName = getSchemaDefinition(type.getCanonicalName());
|
||||||
|
object.add("type", new JsonPrimitive("string"));
|
||||||
|
object.add("$ref", new JsonPrimitive("#/definitions/" + defName));
|
||||||
|
|
||||||
|
if(!definitions.has(defName)) {
|
||||||
|
try {
|
||||||
|
JsonObject enumDef = new JsonObject();
|
||||||
|
JsonArray enums = new JsonArray();
|
||||||
|
Arrays.stream((Enum<?>[])type.getDeclaredMethod("values").invoke(null)).forEach(i -> enums.add(i.name()));
|
||||||
|
enumDef.add("enum", enums);
|
||||||
|
definitions.add(defName, enumDef);
|
||||||
|
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type.equals(String.class)) {
|
||||||
|
object.add("type", new JsonPrimitive("string"));
|
||||||
|
|
||||||
|
if(platformType != null) {
|
||||||
|
String defName = getSchemaDefinition(platformType.value().getCanonicalName());
|
||||||
|
object.add("$ref", new JsonPrimitive("#/definitions/" + defName));
|
||||||
|
|
||||||
|
if(!definitions.has(defName)) {
|
||||||
|
JsonObject enumDef = new JsonObject();
|
||||||
|
JsonArray enums = buildSchemaPlatformEnum(data, platformType.value());
|
||||||
|
enumDef.add("enum", enums);
|
||||||
|
definitions.add(defName, enumDef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type.equals(int.class) || type.equals(Integer.class)
|
||||||
|
|| type.equals(long.class) || type.equals(Long.class)
|
||||||
|
|| type.equals(byte.class) || type.equals(Byte.class)
|
||||||
|
|| type.equals(short.class) || type.equals(Short.class))
|
||||||
|
{
|
||||||
|
object.add("type", new JsonPrimitive("integer"));
|
||||||
|
|
||||||
|
if(type.equals(int.class) || type.equals(Integer.class)) {
|
||||||
|
object.add("minimum", new JsonPrimitive(Integer.MIN_VALUE));
|
||||||
|
object.add("maximum", new JsonPrimitive(Integer.MAX_VALUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type.equals(long.class) || type.equals(Long.class)) {
|
||||||
|
object.add("minimum", new JsonPrimitive(Long.MIN_VALUE));
|
||||||
|
object.add("maximum", new JsonPrimitive(Long.MAX_VALUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type.equals(short.class) || type.equals(Short.class)) {
|
||||||
|
object.add("minimum", new JsonPrimitive(Short.MIN_VALUE));
|
||||||
|
object.add("maximum", new JsonPrimitive(Short.MAX_VALUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
object.add("minimum", new JsonPrimitive(Byte.MIN_VALUE));
|
||||||
|
object.add("maximum", new JsonPrimitive(Byte.MAX_VALUE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(anyOf.size() == 1)
|
||||||
|
{
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
main.add("anyOf", anyOf);
|
||||||
|
return main;
|
||||||
|
}
|
||||||
|
|
||||||
|
default JsonArray buildSchemaPlatformEnum(EngineData data, Class<? extends PlatformNamespaced> value) {
|
||||||
|
JsonArray a = new JsonArray();
|
||||||
|
|
||||||
|
if(value.equals(PlatformBlock.class)) {
|
||||||
|
data.getEngine().getPlatform().getBlocks().map(i -> i.getKey().toString()).forEach(a::add);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(value.equals(PlatformBiome.class)) {
|
||||||
|
data.getEngine().getPlatform().getBiomes().map(i -> i.getKey().toString()).forEach(a::add);
|
||||||
|
}
|
||||||
|
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void apply(GsonBuilder builder) {
|
||||||
|
if(this instanceof TypeAdapterFactory f) {
|
||||||
|
builder.registerTypeAdapterFactory(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default Entity.ResolverEntityData entity() {
|
||||||
|
return new Entity.ResolverEntityData(getClass().getDeclaredAnnotation(Resolvable.Entity.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
default <T> void writeSafeJson(TypeAdapter<T> delegate, JsonWriter out, T value) {
|
||||||
|
try {
|
||||||
|
delegate.write(out, value);
|
||||||
|
} catch (IOException e) {
|
||||||
|
try {
|
||||||
|
delegate.write(out, null);
|
||||||
|
} catch(IOException ex) {
|
||||||
|
throw new RuntimeException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface Entity {
|
||||||
|
String id();
|
||||||
|
String name() default "";
|
||||||
|
String namePlural() default "";
|
||||||
|
JsonToken[] jsonTypes() default JsonToken.BEGIN_OBJECT;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@lombok.Data
|
||||||
|
class ResolverEntityData
|
||||||
|
{
|
||||||
|
private final Entity annotation;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return annotation.id();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return annotation.name().isEmpty() ? Form.capitalizeWords(getId().replaceAll("\\Q-\\E", " ")) : annotation.name();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamePlural() {
|
||||||
|
return annotation.namePlural().isEmpty() ? getName() + "s" : annotation.namePlural();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface TokenConstructor {
|
||||||
|
JsonToken[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface Type {
|
||||||
|
Class<?> value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Target({ElementType.FIELD, ElementType.TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface PlatformType {
|
||||||
|
Class<? extends PlatformNamespaced> value();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
package com.volmit.iris.engine.resolver;
|
||||||
|
|
||||||
|
import art.arcane.cram.PakKey;
|
||||||
|
import art.arcane.cram.PakResource;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
public interface Resolver<T extends Resolvable> {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
static <F extends Resolvable> CompositeResolver<F> frozen(Map<PakKey, PakResource> resources, Predicate<PakResource> isTypePredicate) {
|
||||||
|
Map<String, Map<String, F>> resolvables = new HashMap<>();
|
||||||
|
Map<String, Resolver<F>> resolvers = new HashMap<>();
|
||||||
|
|
||||||
|
for(PakKey i : resources.keySet()) {
|
||||||
|
PakResource r = resources.get(i);
|
||||||
|
|
||||||
|
if(isTypePredicate.test(r)) {
|
||||||
|
Map<String, F> rs = resolvables.computeIfAbsent(i.getNamespace(), (k) -> new HashMap<>());
|
||||||
|
rs.put(i.getKey(), (F) i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(String i : resolvables.keySet()) {
|
||||||
|
resolvers.put(i, frozen(i, resolvables.get(i)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new CompositeResolver<>(resolvers);
|
||||||
|
}
|
||||||
|
|
||||||
|
static <F extends Resolvable> Resolver<F> frozen(String namespace, Map<String, F> map) {
|
||||||
|
return new FrozenResolver<>(namespace, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
static <F extends Resolvable> Resolver<F> hot(String namespace, Function<String, F> loader, Supplier<List<String>> keyGetter) {
|
||||||
|
return new HotResolver<>(namespace, loader, keyGetter);
|
||||||
|
}
|
||||||
|
|
||||||
|
static <F extends Resolvable> Resolver<F> hotDirectoryJson(String namespace, Class<?> resolvableClass, File folder, Gson gson) {
|
||||||
|
return hotDirectory(namespace, (in) -> (F) gson.fromJson(new InputStreamReader(in), resolvableClass), folder, "json");
|
||||||
|
}
|
||||||
|
|
||||||
|
static <F extends Resolvable> Resolver<F> hotDirectory(String namespace, Function<InputStream, F> loader, File folder, String... extensions) {
|
||||||
|
return new HotResolver<>(namespace, (key) -> {
|
||||||
|
for(String i : extensions)
|
||||||
|
{
|
||||||
|
File f = new File(folder, key + "." + i);
|
||||||
|
if(f.exists())
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
FileInputStream in = new FileInputStream(f);
|
||||||
|
F ff = loader.apply(in);
|
||||||
|
in.close();
|
||||||
|
return ff;
|
||||||
|
} catch(IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}, () -> {
|
||||||
|
List<String> s = new ArrayList<>();
|
||||||
|
|
||||||
|
for(File i : folder.listFiles())
|
||||||
|
{
|
||||||
|
if(i.isFile()) {
|
||||||
|
for(String j : extensions)
|
||||||
|
{
|
||||||
|
if(i.getName().endsWith(j))
|
||||||
|
{
|
||||||
|
s.add(i.getName().split("\\Q.\\E")[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean hasNamespace(String namespace);
|
||||||
|
|
||||||
|
T resolve(PlatformNamespaceKey key);
|
||||||
|
|
||||||
|
T resolve(String key);
|
||||||
|
|
||||||
|
default boolean contains(String namespace, String key) {
|
||||||
|
return hasNamespace(namespace) && resolve(key) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean contains(PlatformNamespaceKey key){
|
||||||
|
return hasNamespace(key.getNamespace()) && resolve(key) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Resolver<T> and(String namespace, Resolver<T> resolver);
|
||||||
|
|
||||||
|
default void print(String type, Object printer)
|
||||||
|
{
|
||||||
|
print(type, printer, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void print(String type, Object printer, int index);
|
||||||
|
|
||||||
|
void addAllKeys(List<PlatformNamespaceKey> keys);
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
public interface IrisPlatform {
|
||||||
|
void logError(String k, Object o);
|
||||||
|
|
||||||
|
void logInfo(String k, Object o);
|
||||||
|
|
||||||
|
void logWarning(String k, Object o);
|
||||||
|
|
||||||
|
void logDebug(String k, Object o);
|
||||||
|
|
||||||
|
String getPlatformName();
|
||||||
|
|
||||||
|
Stream<PlatformBlock> getBlocks();
|
||||||
|
|
||||||
|
Stream<PlatformBiome> getBiomes();
|
||||||
|
|
||||||
|
boolean isWorldLoaded(String name);
|
||||||
|
|
||||||
|
PlatformWorld getWorld(String name);
|
||||||
|
|
||||||
|
PlatformBlock parseBlock(String raw);
|
||||||
|
|
||||||
|
PlatformNamespaceKey key(String namespace, String key);
|
||||||
|
|
||||||
|
default PlatformNamespaceKey key(String nsk)
|
||||||
|
{
|
||||||
|
return key("minecraft", nsk);
|
||||||
|
}
|
||||||
|
|
||||||
|
File getStudioFolder();
|
||||||
|
|
||||||
|
File getStudioFolder(String dimension);
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
public interface PlatformBiome extends PlatformNamespaced {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
public interface PlatformChunk {
|
||||||
|
int getX();
|
||||||
|
|
||||||
|
int getZ();
|
||||||
|
|
||||||
|
void unload(boolean save, boolean force);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
import art.arcane.cram.PakKey;
|
||||||
|
import com.volmit.iris.util.NSK;
|
||||||
|
|
||||||
|
public interface PlatformNamespaceKey {
|
||||||
|
String getNamespace();
|
||||||
|
|
||||||
|
String getKey();
|
||||||
|
|
||||||
|
String toString();
|
||||||
|
|
||||||
|
static PlatformNamespaceKey of(PakKey key) {
|
||||||
|
return new NSK(key.getNamespace(), key.getKey());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
public interface PlatformNamespaced {
|
||||||
|
PlatformNamespaceKey getKey();
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
public interface PlatformNamespacedMutable {
|
||||||
|
void setKey(PlatformNamespaceKey key);
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
import art.arcane.amulet.geometry.Vec;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public interface PlatformPlayer {
|
||||||
|
UUID getUUID();
|
||||||
|
|
||||||
|
String getName();
|
||||||
|
|
||||||
|
Vec getLocation();
|
||||||
|
|
||||||
|
PlatformWorld getWorld();
|
||||||
|
|
||||||
|
boolean canUseIris();
|
||||||
|
|
||||||
|
void sendMessage(String message);
|
||||||
|
|
||||||
|
void sendActionBar(String message);
|
||||||
|
|
||||||
|
void sendTitleMessage(String title, String subtitle, int in, int stay, int out);
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
import art.arcane.amulet.format.Form;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PlatformRegistry<T extends PlatformNamespaced> {
|
||||||
|
private final Map<PlatformNamespaceKey, T> registry;
|
||||||
|
private final String name;
|
||||||
|
private final String namePlural;
|
||||||
|
|
||||||
|
public PlatformRegistry(String name, String namePlural, Stream<T> stream) {
|
||||||
|
this.name = name;
|
||||||
|
this.namePlural = namePlural;
|
||||||
|
registry = Collections.unmodifiableMap(stream.collect(Collectors.toMap(PlatformNamespaced::getKey, (t) -> t)));
|
||||||
|
i("Registered " + Form.f(registry.size()) + " " + namePlural);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlatformRegistry(String name, Stream<T> stream) {
|
||||||
|
this(name, name + "s", stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public T get(PlatformNamespaceKey key) {
|
||||||
|
return registry.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<PlatformNamespaceKey> getKeys() {
|
||||||
|
return Collections.unmodifiableSet(registry.keySet());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.volmit.iris.platform;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.block.PlatformBlock;
|
||||||
|
import com.volmit.iris.util.WorldHeight;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
public interface PlatformWorld {
|
||||||
|
WorldHeight getHeight();
|
||||||
|
|
||||||
|
String getName();
|
||||||
|
|
||||||
|
File getFolder();
|
||||||
|
|
||||||
|
Iterable<PlatformPlayer> getPlayers();
|
||||||
|
|
||||||
|
Iterable<PlatformChunk> getLoadedChunks();
|
||||||
|
|
||||||
|
PlatformChunk getOrLoadChunk(int x, int z);
|
||||||
|
|
||||||
|
PlatformBlock getBlock(int x, int y, int z);
|
||||||
|
|
||||||
|
PlatformBiome getBiome(int x, int y, int z);
|
||||||
|
|
||||||
|
long getSeed();
|
||||||
|
|
||||||
|
boolean isChunkLoaded(int x, int z);
|
||||||
|
|
||||||
|
void setBlock(int x, int y, int z, PlatformBlock block);
|
||||||
|
|
||||||
|
void setBiome(int x, int y, int z, PlatformBiome biome);
|
||||||
|
|
||||||
|
default File getWorldFolder(String subfolder) {
|
||||||
|
return new File(getFolder(), subfolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
default File getRegionFolder() {
|
||||||
|
return getWorldFolder("region");
|
||||||
|
}
|
||||||
|
|
||||||
|
default File getIrisFolder() {
|
||||||
|
return getWorldFolder("iris");
|
||||||
|
}
|
||||||
|
|
||||||
|
default File getIrisDataFolder() {
|
||||||
|
File f = new File(getWorldFolder("iris"), "data");
|
||||||
|
f.mkdirs();
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isRegionLoaded(int x, int z) {
|
||||||
|
for(PlatformChunk i : getLoadedChunks()) {
|
||||||
|
if(i.getX() >> 5 == x && i.getZ() >> 5 == z) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void unloadChunks(boolean save, boolean force) {
|
||||||
|
for(PlatformChunk i : getLoadedChunks()) {
|
||||||
|
i.unload(save, force);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.volmit.iris.platform.block;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaced;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface PlatformBlock extends PlatformNamespaced {
|
||||||
|
Map<String, String> getProperties();
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
public class FloatNoiseCache {
|
||||||
|
private final int width;
|
||||||
|
private final int height;
|
||||||
|
private final float[] cache;
|
||||||
|
|
||||||
|
public FloatNoiseCache(int width, int height)
|
||||||
|
{
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
cache = new float[width * height];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set(int x, int y, float v) {
|
||||||
|
this.cache[y % this.height * this.width + x % this.width] = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float get(int x, int y) {
|
||||||
|
return this.cache[y % this.height * this.width + x % this.width];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
import art.arcane.source.NoisePlane;
|
||||||
|
import art.arcane.spatial.hunk.Hunk;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class HunkedNoisePlane implements NoisePlane {
|
||||||
|
private final Hunk<Double> noise;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double noise(double x, double y, double z) {
|
||||||
|
Double d = noise.get(Math.floorMod((int)x, noise.getWidth()), Math.floorMod((int)y, noise.getHeight()), Math.floorMod((int)z, noise.getDepth()));
|
||||||
|
|
||||||
|
return d != null ? d : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
import com.volmit.iris.platform.PlatformNamespaceKey;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class NSK implements PlatformNamespaceKey {
|
||||||
|
private final String namespace;
|
||||||
|
private final String key;
|
||||||
|
|
||||||
|
public NSK(String namespacedkey)
|
||||||
|
{
|
||||||
|
this(namespacedkey.contains(":") ? namespacedkey.split("\\Q:\\E")[0] : "minecraft",
|
||||||
|
namespacedkey.contains(":") ? namespacedkey.split("\\Q:\\E")[1] : namespacedkey);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNamespace() {
|
||||||
|
return namespace;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return namespace + ":" + key;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
public class NoiseCache<T> {
|
||||||
|
private final int width;
|
||||||
|
private final int height;
|
||||||
|
private final Object[] cache;
|
||||||
|
|
||||||
|
public NoiseCache(int width, int height)
|
||||||
|
{
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
cache = new Object[width * height];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set(int x, int y, T v) {
|
||||||
|
this.cache[y % this.height * this.width + x % this.width] = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public T get(int x, int y) {
|
||||||
|
return (T) this.cache[y % this.height * this.width + x % this.width];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
public class ShortNoiseCache {
|
||||||
|
private final int width;
|
||||||
|
private final int height;
|
||||||
|
private final short[] cache;
|
||||||
|
|
||||||
|
public ShortNoiseCache(int width, int height)
|
||||||
|
{
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
cache = new short[width * height];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set(int x, int y, short v) {
|
||||||
|
this.cache[(Math.floorMod(y,this.height) * this.width) + Math.floorMod(x, this.width)] = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public short get(int x, int y) {
|
||||||
|
return this.cache[(Math.floorMod(y,this.height) * this.width) + Math.floorMod(x,this.width)];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class WorldHeight {
|
||||||
|
private final int minHeight;
|
||||||
|
private final int maxHeight;
|
||||||
|
|
||||||
|
public WorldHeight(int maxHeight) {
|
||||||
|
this(0, maxHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTotalHeight() {
|
||||||
|
return maxHeight - minHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
@@ -0,0 +1,234 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
Vendored
+89
@@ -0,0 +1,89 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
-201
@@ -1,201 +0,0 @@
|
|||||||
package ninja.bytecode.shuriken.json;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2002 JSON.org
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
The Software shall be used for Good, not Evil.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert an HTTP header to a JSONObject and back.
|
|
||||||
*
|
|
||||||
* @author JSON.org
|
|
||||||
* @version 2014-05-03
|
|
||||||
*/
|
|
||||||
public class HTTP
|
|
||||||
{
|
|
||||||
|
|
||||||
/** Carriage return/line feed. */
|
|
||||||
public static final String CRLF = "\r\n";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert an HTTP header string into a JSONObject. It can be a request
|
|
||||||
* header or a response header. A request header will contain
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* {
|
|
||||||
* Method: "POST" (for example),
|
|
||||||
* "Request-URI": "/" (for example),
|
|
||||||
* "HTTP-Version": "HTTP/1.1" (for example)
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* A response header will contain
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* {
|
|
||||||
* "HTTP-Version": "HTTP/1.1" (for example),
|
|
||||||
* "Status-Code": "200" (for example),
|
|
||||||
* "Reason-Phrase": "OK" (for example)
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* In addition, the other parameters in the header will be captured, using
|
|
||||||
* the HTTP field names as JSON names, so that
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* Date: Sun, 26 May 2002 18:06:04 GMT
|
|
||||||
* Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
|
|
||||||
* Cache-Control: no-cache
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* become
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* {...
|
|
||||||
* Date: "Sun, 26 May 2002 18:06:04 GMT",
|
|
||||||
* Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
|
|
||||||
* "Cache-Control": "no-cache",
|
|
||||||
* ...}
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* It does no further checking or conversion. It does not parse dates. It
|
|
||||||
* does not do '%' transforms on URLs.
|
|
||||||
*
|
|
||||||
* @param string
|
|
||||||
* An HTTP header string.
|
|
||||||
* @return A JSONObject containing the elements and attributes of the XML
|
|
||||||
* string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static JSONObject toJSONObject(String string) throws JSONException
|
|
||||||
{
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
HTTPTokener x = new HTTPTokener(string);
|
|
||||||
String token;
|
|
||||||
|
|
||||||
token = x.nextToken();
|
|
||||||
if(token.toUpperCase().startsWith("HTTP"))
|
|
||||||
{
|
|
||||||
|
|
||||||
// Response
|
|
||||||
|
|
||||||
jo.put("HTTP-Version", token);
|
|
||||||
jo.put("Status-Code", x.nextToken());
|
|
||||||
jo.put("Reason-Phrase", x.nextTo('\0'));
|
|
||||||
x.next();
|
|
||||||
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
|
|
||||||
// Request
|
|
||||||
|
|
||||||
jo.put("Method", token);
|
|
||||||
jo.put("Request-URI", x.nextToken());
|
|
||||||
jo.put("HTTP-Version", x.nextToken());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fields
|
|
||||||
|
|
||||||
while(x.more())
|
|
||||||
{
|
|
||||||
String name = x.nextTo(':');
|
|
||||||
x.next(':');
|
|
||||||
jo.put(name, x.nextTo('\0'));
|
|
||||||
x.next();
|
|
||||||
}
|
|
||||||
return jo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a JSONObject into an HTTP header. A request header must contain
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* {
|
|
||||||
* Method: "POST" (for example),
|
|
||||||
* "Request-URI": "/" (for example),
|
|
||||||
* "HTTP-Version": "HTTP/1.1" (for example)
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* A response header must contain
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* {
|
|
||||||
* "HTTP-Version": "HTTP/1.1" (for example),
|
|
||||||
* "Status-Code": "200" (for example),
|
|
||||||
* "Reason-Phrase": "OK" (for example)
|
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* Any other members of the JSONObject will be output as HTTP fields. The
|
|
||||||
* result will end with two CRLF pairs.
|
|
||||||
*
|
|
||||||
* @param jo
|
|
||||||
* A JSONObject
|
|
||||||
* @return An HTTP header string.
|
|
||||||
* @throws JSONException
|
|
||||||
* if the object does not contain enough information.
|
|
||||||
*/
|
|
||||||
public static String toString(JSONObject jo) throws JSONException
|
|
||||||
{
|
|
||||||
Iterator<String> keys = jo.keys();
|
|
||||||
String string;
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
if(jo.has("Status-Code") && jo.has("Reason-Phrase"))
|
|
||||||
{
|
|
||||||
sb.append(jo.getString("HTTP-Version"));
|
|
||||||
sb.append(' ');
|
|
||||||
sb.append(jo.getString("Status-Code"));
|
|
||||||
sb.append(' ');
|
|
||||||
sb.append(jo.getString("Reason-Phrase"));
|
|
||||||
} else if(jo.has("Method") && jo.has("Request-URI"))
|
|
||||||
{
|
|
||||||
sb.append(jo.getString("Method"));
|
|
||||||
sb.append(' ');
|
|
||||||
sb.append('"');
|
|
||||||
sb.append(jo.getString("Request-URI"));
|
|
||||||
sb.append('"');
|
|
||||||
sb.append(' ');
|
|
||||||
sb.append(jo.getString("HTTP-Version"));
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
throw new JSONException("Not enough material for an HTTP header.");
|
|
||||||
}
|
|
||||||
sb.append(CRLF);
|
|
||||||
while(keys.hasNext())
|
|
||||||
{
|
|
||||||
string = keys.next();
|
|
||||||
if(!"HTTP-Version".equals(string) && !"Status-Code".equals(string) && !"Reason-Phrase".equals(string) && !"Method".equals(string) && !"Request-URI".equals(string) && !jo.isNull(string))
|
|
||||||
{
|
|
||||||
sb.append(string);
|
|
||||||
sb.append(": ");
|
|
||||||
sb.append(jo.getString(string));
|
|
||||||
sb.append(CRLF);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sb.append(CRLF);
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
package ninja.bytecode.shuriken.json;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2002 JSON.org
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
The Software shall be used for Good, not Evil.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The HTTPTokener extends the JSONTokener to provide additional methods for the
|
|
||||||
* parsing of HTTP headers.
|
|
||||||
*
|
|
||||||
* @author JSON.org
|
|
||||||
* @version 2014-05-03
|
|
||||||
*/
|
|
||||||
public class HTTPTokener extends JSONTokener
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct an HTTPTokener from a string.
|
|
||||||
*
|
|
||||||
* @param string
|
|
||||||
* A source string.
|
|
||||||
*/
|
|
||||||
public HTTPTokener(String string)
|
|
||||||
{
|
|
||||||
super(string);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the next token or string. This is used in parsing HTTP headers.
|
|
||||||
*
|
|
||||||
* @throws JSONException
|
|
||||||
* @return A String.
|
|
||||||
*/
|
|
||||||
public String nextToken() throws JSONException
|
|
||||||
{
|
|
||||||
char c;
|
|
||||||
char q;
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
do
|
|
||||||
{
|
|
||||||
c = next();
|
|
||||||
} while(Character.isWhitespace(c));
|
|
||||||
if(c == '"' || c == '\'')
|
|
||||||
{
|
|
||||||
q = c;
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
c = next();
|
|
||||||
if(c < ' ')
|
|
||||||
{
|
|
||||||
throw syntaxError("Unterminated string.");
|
|
||||||
}
|
|
||||||
if(c == q)
|
|
||||||
{
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
sb.append(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
if(c == 0 || Character.isWhitespace(c))
|
|
||||||
{
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
sb.append(c);
|
|
||||||
c = next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-1252
File diff suppressed because it is too large.
Load diff
@@ -1,50 +0,0 @@
|
|||||||
package ninja.bytecode.shuriken.json;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The JSONException is thrown by the JSON.org classes when things are amiss.
|
|
||||||
*
|
|
||||||
* @author JSON.org
|
|
||||||
* @version 2014-05-03
|
|
||||||
*/
|
|
||||||
public class JSONException extends RuntimeException
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 0;
|
|
||||||
private Throwable cause;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a JSONException with an explanatory message.
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* Detail about the reason for the exception.
|
|
||||||
*/
|
|
||||||
public JSONException(String message)
|
|
||||||
{
|
|
||||||
super(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new JSONException with the specified cause.
|
|
||||||
*
|
|
||||||
* @param cause
|
|
||||||
* The cause.
|
|
||||||
*/
|
|
||||||
public JSONException(Throwable cause)
|
|
||||||
{
|
|
||||||
super(cause.getMessage());
|
|
||||||
this.cause = cause;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the cause of this exception or null if the cause is nonexistent
|
|
||||||
* or unknown.
|
|
||||||
*
|
|
||||||
* @return the cause of this exception or null if the cause is nonexistent
|
|
||||||
* or unknown.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Throwable getCause()
|
|
||||||
{
|
|
||||||
return this.cause;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,555 +0,0 @@
|
|||||||
package ninja.bytecode.shuriken.json;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2008 JSON.org
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
The Software shall be used for Good, not Evil.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This provides static methods to convert an XML text into a JSONArray or
|
|
||||||
* JSONObject, and to covert a JSONArray or JSONObject into an XML text using
|
|
||||||
* the JsonML transform.
|
|
||||||
*
|
|
||||||
* @author JSON.org
|
|
||||||
* @version 2014-05-03
|
|
||||||
*/
|
|
||||||
public class JSONML
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse XML values and store them in a JSONArray.
|
|
||||||
*
|
|
||||||
* @param x
|
|
||||||
* The XMLTokener containing the source string.
|
|
||||||
* @param arrayForm
|
|
||||||
* true if array form, false if object form.
|
|
||||||
* @param ja
|
|
||||||
* The JSONArray that is containing the current tag or null if we
|
|
||||||
* are at the outermost level.
|
|
||||||
* @return A JSONArray if the value is the outermost tag, otherwise null.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throws JSONException
|
|
||||||
{
|
|
||||||
String attribute;
|
|
||||||
char c;
|
|
||||||
String closeTag = null;
|
|
||||||
int i;
|
|
||||||
JSONArray newja = null;
|
|
||||||
JSONObject newjo = null;
|
|
||||||
Object token;
|
|
||||||
String tagName = null;
|
|
||||||
|
|
||||||
// Test for and skip past these forms:
|
|
||||||
// <!-- ... -->
|
|
||||||
// <![ ... ]]>
|
|
||||||
// <! ... >
|
|
||||||
// <? ... ?>
|
|
||||||
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
if(!x.more())
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Bad XML");
|
|
||||||
}
|
|
||||||
token = x.nextContent();
|
|
||||||
if(token == XML.LT)
|
|
||||||
{
|
|
||||||
token = x.nextToken();
|
|
||||||
if(token instanceof Character)
|
|
||||||
{
|
|
||||||
if(token == XML.SLASH)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Close tag </
|
|
||||||
|
|
||||||
token = x.nextToken();
|
|
||||||
if(!(token instanceof String))
|
|
||||||
{
|
|
||||||
throw new JSONException("Expected a closing name instead of '" + token + "'.");
|
|
||||||
}
|
|
||||||
if(x.nextToken() != XML.GT)
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Misshaped close tag");
|
|
||||||
}
|
|
||||||
return token;
|
|
||||||
} else if(token == XML.BANG)
|
|
||||||
{
|
|
||||||
|
|
||||||
// <!
|
|
||||||
|
|
||||||
c = x.next();
|
|
||||||
if(c == '-')
|
|
||||||
{
|
|
||||||
if(x.next() == '-')
|
|
||||||
{
|
|
||||||
x.skipPast("-->");
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
x.back();
|
|
||||||
}
|
|
||||||
} else if(c == '[')
|
|
||||||
{
|
|
||||||
token = x.nextToken();
|
|
||||||
if(token.equals("CDATA") && x.next() == '[')
|
|
||||||
{
|
|
||||||
if(ja != null)
|
|
||||||
{
|
|
||||||
ja.put(x.nextCDATA());
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Expected 'CDATA['");
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
i = 1;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
token = x.nextMeta();
|
|
||||||
if(token == null)
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Missing '>' after '<!'.");
|
|
||||||
} else if(token == XML.LT)
|
|
||||||
{
|
|
||||||
i += 1;
|
|
||||||
} else if(token == XML.GT)
|
|
||||||
{
|
|
||||||
i -= 1;
|
|
||||||
}
|
|
||||||
} while(i > 0);
|
|
||||||
}
|
|
||||||
} else if(token == XML.QUEST)
|
|
||||||
{
|
|
||||||
|
|
||||||
// <?
|
|
||||||
|
|
||||||
x.skipPast("?>");
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Misshaped tag");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Open tag <
|
|
||||||
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
if(!(token instanceof String))
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Bad tagName '" + token + "'.");
|
|
||||||
}
|
|
||||||
tagName = (String) token;
|
|
||||||
newja = new JSONArray();
|
|
||||||
newjo = new JSONObject();
|
|
||||||
if(arrayForm)
|
|
||||||
{
|
|
||||||
newja.put(tagName);
|
|
||||||
if(ja != null)
|
|
||||||
{
|
|
||||||
ja.put(newja);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
newjo.put("tagName", tagName);
|
|
||||||
if(ja != null)
|
|
||||||
{
|
|
||||||
ja.put(newjo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
token = null;
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
if(token == null)
|
|
||||||
{
|
|
||||||
token = x.nextToken();
|
|
||||||
}
|
|
||||||
if(token == null)
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Misshaped tag");
|
|
||||||
}
|
|
||||||
if(!(token instanceof String))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// attribute = value
|
|
||||||
|
|
||||||
attribute = (String) token;
|
|
||||||
if(!arrayForm && ("tagName".equals(attribute) || "childNode".equals(attribute)))
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Reserved attribute.");
|
|
||||||
}
|
|
||||||
token = x.nextToken();
|
|
||||||
if(token == XML.EQ)
|
|
||||||
{
|
|
||||||
token = x.nextToken();
|
|
||||||
if(!(token instanceof String))
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Missing value");
|
|
||||||
}
|
|
||||||
newjo.accumulate(attribute, XML.stringToValue((String) token));
|
|
||||||
token = null;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
newjo.accumulate(attribute, "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(arrayForm && newjo.length() > 0)
|
|
||||||
{
|
|
||||||
newja.put(newjo);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Empty tag <.../>
|
|
||||||
|
|
||||||
if(token == XML.SLASH)
|
|
||||||
{
|
|
||||||
if(x.nextToken() != XML.GT)
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Misshaped tag");
|
|
||||||
}
|
|
||||||
if(ja == null)
|
|
||||||
{
|
|
||||||
if(arrayForm)
|
|
||||||
{
|
|
||||||
return newja;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
return newjo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Content, between <...> and </...>
|
|
||||||
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
if(token != XML.GT)
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Misshaped tag");
|
|
||||||
}
|
|
||||||
closeTag = (String) parse(x, arrayForm, newja);
|
|
||||||
if(closeTag != null)
|
|
||||||
{
|
|
||||||
if(!closeTag.equals(tagName))
|
|
||||||
{
|
|
||||||
throw x.syntaxError("Mismatched '" + tagName + "' and '" + closeTag + "'");
|
|
||||||
}
|
|
||||||
tagName = null;
|
|
||||||
if(!arrayForm && newja.length() > 0)
|
|
||||||
{
|
|
||||||
newjo.put("childNodes", newja);
|
|
||||||
}
|
|
||||||
if(ja == null)
|
|
||||||
{
|
|
||||||
if(arrayForm)
|
|
||||||
{
|
|
||||||
return newja;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
return newjo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
if(ja != null)
|
|
||||||
{
|
|
||||||
ja.put(token instanceof String ? XML.stringToValue((String) token) : token);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a well-formed (but not necessarily valid) XML string into a
|
|
||||||
* JSONArray using the JsonML transform. Each XML tag is represented as a
|
|
||||||
* JSONArray in which the first element is the tag name. If the tag has
|
|
||||||
* attributes, then the second element will be JSONObject containing the
|
|
||||||
* name/value pairs. If the tag contains children, then strings and
|
|
||||||
* JSONArrays will represent the child tags. Comments, prologs, DTDs, and
|
|
||||||
* <code><[ [ ]]></code> are ignored.
|
|
||||||
*
|
|
||||||
* @param string
|
|
||||||
* The source string.
|
|
||||||
* @return A JSONArray containing the structured data from the XML string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static JSONArray toJSONArray(String string) throws JSONException
|
|
||||||
{
|
|
||||||
return toJSONArray(new XMLTokener(string));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a well-formed (but not necessarily valid) XML string into a
|
|
||||||
* JSONArray using the JsonML transform. Each XML tag is represented as a
|
|
||||||
* JSONArray in which the first element is the tag name. If the tag has
|
|
||||||
* attributes, then the second element will be JSONObject containing the
|
|
||||||
* name/value pairs. If the tag contains children, then strings and
|
|
||||||
* JSONArrays will represent the child content and tags. Comments, prologs,
|
|
||||||
* DTDs, and <code><[ [ ]]></code> are ignored.
|
|
||||||
*
|
|
||||||
* @param x
|
|
||||||
* An XMLTokener.
|
|
||||||
* @return A JSONArray containing the structured data from the XML string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static JSONArray toJSONArray(XMLTokener x) throws JSONException
|
|
||||||
{
|
|
||||||
return (JSONArray) parse(x, true, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a well-formed (but not necessarily valid) XML string into a
|
|
||||||
* JSONObject using the JsonML transform. Each XML tag is represented as a
|
|
||||||
* JSONObject with a "tagName" property. If the tag has attributes, then the
|
|
||||||
* attributes will be in the JSONObject as properties. If the tag contains
|
|
||||||
* children, the object will have a "childNodes" property which will be an
|
|
||||||
* array of strings and JsonML JSONObjects.
|
|
||||||
*
|
|
||||||
* Comments, prologs, DTDs, and <code><[ [ ]]></code> are ignored.
|
|
||||||
*
|
|
||||||
* @param x
|
|
||||||
* An XMLTokener of the XML source text.
|
|
||||||
* @return A JSONObject containing the structured data from the XML string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static JSONObject toJSONObject(XMLTokener x) throws JSONException
|
|
||||||
{
|
|
||||||
return (JSONObject) parse(x, false, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a well-formed (but not necessarily valid) XML string into a
|
|
||||||
* JSONObject using the JsonML transform. Each XML tag is represented as a
|
|
||||||
* JSONObject with a "tagName" property. If the tag has attributes, then the
|
|
||||||
* attributes will be in the JSONObject as properties. If the tag contains
|
|
||||||
* children, the object will have a "childNodes" property which will be an
|
|
||||||
* array of strings and JsonML JSONObjects.
|
|
||||||
*
|
|
||||||
* Comments, prologs, DTDs, and <code><[ [ ]]></code> are ignored.
|
|
||||||
*
|
|
||||||
* @param string
|
|
||||||
* The XML source text.
|
|
||||||
* @return A JSONObject containing the structured data from the XML string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static JSONObject toJSONObject(String string) throws JSONException
|
|
||||||
{
|
|
||||||
return toJSONObject(new XMLTokener(string));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the JSONML transformation, making an XML text from a JSONArray.
|
|
||||||
*
|
|
||||||
* @param ja
|
|
||||||
* A JSONArray.
|
|
||||||
* @return An XML string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static String toString(JSONArray ja) throws JSONException
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
JSONObject jo;
|
|
||||||
String key;
|
|
||||||
Iterator<String> keys;
|
|
||||||
int length;
|
|
||||||
Object object;
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
String tagName;
|
|
||||||
String value;
|
|
||||||
|
|
||||||
// Emit <tagName
|
|
||||||
|
|
||||||
tagName = ja.getString(0);
|
|
||||||
XML.noSpace(tagName);
|
|
||||||
tagName = XML.escape(tagName);
|
|
||||||
sb.append('<');
|
|
||||||
sb.append(tagName);
|
|
||||||
|
|
||||||
object = ja.opt(1);
|
|
||||||
if(object instanceof JSONObject)
|
|
||||||
{
|
|
||||||
i = 2;
|
|
||||||
jo = (JSONObject) object;
|
|
||||||
|
|
||||||
// Emit the attributes
|
|
||||||
|
|
||||||
keys = jo.keys();
|
|
||||||
while(keys.hasNext())
|
|
||||||
{
|
|
||||||
key = keys.next();
|
|
||||||
XML.noSpace(key);
|
|
||||||
value = jo.optString(key);
|
|
||||||
if(value != null)
|
|
||||||
{
|
|
||||||
sb.append(' ');
|
|
||||||
sb.append(XML.escape(key));
|
|
||||||
sb.append('=');
|
|
||||||
sb.append('"');
|
|
||||||
sb.append(XML.escape(value));
|
|
||||||
sb.append('"');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
i = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Emit content in body
|
|
||||||
|
|
||||||
length = ja.length();
|
|
||||||
if(i >= length)
|
|
||||||
{
|
|
||||||
sb.append('/');
|
|
||||||
sb.append('>');
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
sb.append('>');
|
|
||||||
do
|
|
||||||
{
|
|
||||||
object = ja.get(i);
|
|
||||||
i += 1;
|
|
||||||
if(object != null)
|
|
||||||
{
|
|
||||||
if(object instanceof String)
|
|
||||||
{
|
|
||||||
sb.append(XML.escape(object.toString()));
|
|
||||||
} else if(object instanceof JSONObject)
|
|
||||||
{
|
|
||||||
sb.append(toString((JSONObject) object));
|
|
||||||
} else if(object instanceof JSONArray)
|
|
||||||
{
|
|
||||||
sb.append(toString((JSONArray) object));
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
sb.append(object.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while(i < length);
|
|
||||||
sb.append('<');
|
|
||||||
sb.append('/');
|
|
||||||
sb.append(tagName);
|
|
||||||
sb.append('>');
|
|
||||||
}
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the JSONML transformation, making an XML text from a JSONObject.
|
|
||||||
* The JSONObject must contain a "tagName" property. If it has children,
|
|
||||||
* then it must have a "childNodes" property containing an array of objects.
|
|
||||||
* The other properties are attributes with string values.
|
|
||||||
*
|
|
||||||
* @param jo
|
|
||||||
* A JSONObject.
|
|
||||||
* @return An XML string.
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public static String toString(JSONObject jo) throws JSONException
|
|
||||||
{
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
int i;
|
|
||||||
JSONArray ja;
|
|
||||||
String key;
|
|
||||||
Iterator<String> keys;
|
|
||||||
int length;
|
|
||||||
Object object;
|
|
||||||
String tagName;
|
|
||||||
String value;
|
|
||||||
|
|
||||||
// Emit <tagName
|
|
||||||
|
|
||||||
tagName = jo.optString("tagName");
|
|
||||||
if(tagName == null)
|
|
||||||
{
|
|
||||||
return XML.escape(jo.toString());
|
|
||||||
}
|
|
||||||
XML.noSpace(tagName);
|
|
||||||
tagName = XML.escape(tagName);
|
|
||||||
sb.append('<');
|
|
||||||
sb.append(tagName);
|
|
||||||
|
|
||||||
// Emit the attributes
|
|
||||||
|
|
||||||
keys = jo.keys();
|
|
||||||
while(keys.hasNext())
|
|
||||||
{
|
|
||||||
key = keys.next();
|
|
||||||
if(!"tagName".equals(key) && !"childNodes".equals(key))
|
|
||||||
{
|
|
||||||
XML.noSpace(key);
|
|
||||||
value = jo.optString(key);
|
|
||||||
if(value != null)
|
|
||||||
{
|
|
||||||
sb.append(' ');
|
|
||||||
sb.append(XML.escape(key));
|
|
||||||
sb.append('=');
|
|
||||||
sb.append('"');
|
|
||||||
sb.append(XML.escape(value));
|
|
||||||
sb.append('"');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Emit content in body
|
|
||||||
|
|
||||||
ja = jo.optJSONArray("childNodes");
|
|
||||||
if(ja == null)
|
|
||||||
{
|
|
||||||
sb.append('/');
|
|
||||||
sb.append('>');
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
sb.append('>');
|
|
||||||
length = ja.length();
|
|
||||||
for(i = 0; i < length; i += 1)
|
|
||||||
{
|
|
||||||
object = ja.get(i);
|
|
||||||
if(object != null)
|
|
||||||
{
|
|
||||||
if(object instanceof String)
|
|
||||||
{
|
|
||||||
sb.append(XML.escape(object.toString()));
|
|
||||||
} else if(object instanceof JSONObject)
|
|
||||||
{
|
|
||||||
sb.append(toString((JSONObject) object));
|
|
||||||
} else if(object instanceof JSONArray)
|
|
||||||
{
|
|
||||||
sb.append(toString((JSONArray) object));
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
sb.append(object.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sb.append('<');
|
|
||||||
sb.append('/');
|
|
||||||
sb.append(tagName);
|
|
||||||
sb.append('>');
|
|
||||||
}
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -1,21 +0,0 @@
|
|||||||
package ninja.bytecode.shuriken.json;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The <code>JSONString</code> interface allows a <code>toJSONString()</code>
|
|
||||||
* method so that a class can change the behavior of
|
|
||||||
* <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>, and
|
|
||||||
* <code>JSONWriter.value(</code>Object<code>)</code>. The
|
|
||||||
* <code>toJSONString</code> method will be used instead of the default behavior
|
|
||||||
* of using the Object's <code>toString()</code> method and quoting the result.
|
|
||||||
*/
|
|
||||||
public interface JSONString
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The <code>toJSONString</code> method allows a class to produce its own
|
|
||||||
* JSON serialization.
|
|
||||||
*
|
|
||||||
* @return A strictly syntactically correct JSON text.
|
|
||||||
*/
|
|
||||||
public String toJSONString();
|
|
||||||
}
|
|
||||||
Loaded 100 of 739 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user