mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-24 09:39:16 +00:00
Compare commits
945 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
672f2d717d | ||
|
|
8362800a54 | ||
|
|
731908c265 | ||
|
|
3eb864deb9 | ||
|
|
cb27043d12 | ||
|
|
5b90fce1f5 | ||
|
|
7f49ee3db6 | ||
|
|
72b645916f | ||
|
|
4700c3711c | ||
|
|
feaf21c702 | ||
|
|
4fa8fff3db | ||
|
|
4e670f85f5 | ||
|
|
11a484714a | ||
|
|
6c425947bf | ||
|
|
e06d34f546 | ||
|
|
9ffd0dcdbe | ||
|
|
0ce51709da | ||
|
|
073944dd96 | ||
|
|
874589c772 | ||
|
|
4a05031a0f | ||
|
|
38185ef2f1 | ||
|
|
66dde6c215 | ||
|
|
a438817d00 | ||
|
|
a92e651b43 | ||
|
|
618da86b44 | ||
|
|
46d810eddf | ||
|
|
031601bfa6 | ||
|
|
bb5f777cea | ||
|
|
fa6c2fb63e | ||
|
|
d561348c4f | ||
|
|
c290dba3bb | ||
|
|
1477180fa5 | ||
|
|
6cd4b7c433 | ||
|
|
36f56c2040 | ||
|
|
f763cc4020 | ||
|
|
180d2addd0 | ||
|
|
8fe21d6d05 | ||
|
|
3274fb9615 | ||
|
|
1c5863e6de | ||
|
|
60b424c101 | ||
|
|
2a51454682 | ||
|
|
1d052231f0 | ||
|
|
f120c41518 | ||
|
|
30b8619dd1 | ||
|
|
1e832ed0eb | ||
|
|
6260c07cd6 | ||
|
|
241d8fd321 | ||
|
|
5ddbddf5cc | ||
|
|
38854b7d6a | ||
|
|
958c5ea195 | ||
|
|
4329623341 | ||
|
|
658b0595ff | ||
|
|
2869a2157b | ||
|
|
11d5d74c11 | ||
|
|
54dd379cf5 | ||
|
|
7eef4ed876 | ||
|
|
dd7a8bae16 | ||
|
|
93508d7514 | ||
|
|
1493beb79b | ||
|
|
b7b15a8f7b | ||
|
|
6cb15d004e | ||
|
|
22220b1b95 | ||
|
|
7fe418d529 | ||
|
|
ed8b0a078d | ||
|
|
71affb0a70 | ||
|
|
52f829f5d1 | ||
|
|
518d10fc8f | ||
|
|
62bbeb9471 | ||
|
|
36986d7ddd | ||
|
|
b266b8b341 | ||
|
|
c95c4b5f7d | ||
|
|
68c55086cf | ||
|
|
6b77bba46d | ||
|
|
675c7f8572 | ||
|
|
7fff705897 | ||
|
|
45a7e6a6ea | ||
|
|
1db0f3f536 | ||
|
|
2f086a335d | ||
|
|
9fe9c2a9dd | ||
|
|
2cd9a25791 | ||
|
|
45cef6a752 | ||
|
|
3811dd3554 | ||
|
|
b2c944af43 | ||
|
|
76ca4f2183 | ||
|
|
72d7154a96 | ||
|
|
ee6e9b059a | ||
|
|
2afb468ae4 | ||
|
|
125f705a6a | ||
|
|
3884af64a7 | ||
|
|
6bf65c7c74 | ||
|
|
7ddaa3ce65 | ||
|
|
5786fe78b2 | ||
|
|
f50a2fd0ad | ||
|
|
3f5b799728 | ||
|
|
0cd4997174 | ||
|
|
f70046bc73 | ||
|
|
feb246c559 | ||
|
|
1dd18c3c0a | ||
|
|
36b3521b2a | ||
|
|
c0df132c93 | ||
|
|
0a08b4b0b9 | ||
|
|
8a4208ab18 | ||
|
|
2b8d5541af | ||
|
|
b81765adda | ||
|
|
f7bd48cc9a | ||
|
|
db7681676e | ||
|
|
7d9cfb6ff9 | ||
|
|
14f0a3ce05 | ||
|
|
3c650a7c50 | ||
|
|
a9a964cc75 | ||
|
|
5085c89c22 | ||
|
|
9720ada87f | ||
|
|
9adbbcee93 | ||
|
|
160eee04ff | ||
|
|
8353c5105b | ||
|
|
6fd53d6e95 | ||
|
|
7530c586f7 | ||
|
|
8deb326ea1 | ||
|
|
4b76b592d3 | ||
|
|
3f9288c60f | ||
|
|
91e1b614f3 | ||
|
|
b6f3e3a62f | ||
|
|
4a30b6d264 | ||
|
|
73bfa9beb8 | ||
|
|
18e203f007 | ||
|
|
c6aad25ef2 | ||
|
|
bc8f25ff4b | ||
|
|
4627303008 | ||
|
|
e46a36d1c4 | ||
|
|
62325d9784 | ||
|
|
38d0894c36 | ||
|
|
f7e379c83f | ||
|
|
185cc994f7 | ||
|
|
8815518af9 | ||
|
|
233144eede | ||
|
|
1028ebccbb | ||
|
|
791fd4bc55 | ||
|
|
5a557e6f00 | ||
|
|
948f823744 | ||
|
|
c05d22b550 | ||
|
|
f062d5b894 | ||
|
|
1af7ee8e8d | ||
|
|
53e8c9141c | ||
|
|
64f27e7d39 | ||
|
|
a77c99d050 | ||
|
|
9c4ccc51c7 | ||
|
|
7937d8d041 | ||
|
|
cca66f1f32 | ||
|
|
dc4f0c1159 | ||
|
|
fb07b280be | ||
|
|
2915ef885e | ||
|
|
152a4af549 | ||
|
|
c7508441ec | ||
|
|
3073d3aa9d | ||
|
|
78eebc255e | ||
|
|
5e6ec3b217 | ||
|
|
a6d6814f27 | ||
|
|
9d634ba4d7 | ||
|
|
fcf8a80b0a | ||
|
|
dfaf361bf2 | ||
|
|
6c791c034b | ||
|
|
8935c51cc9 | ||
|
|
b148fa94c3 | ||
|
|
70fef94d15 | ||
|
|
a921845ae3 | ||
|
|
8dd858e813 | ||
|
|
634e7ad7ee | ||
|
|
e926a08def | ||
|
|
f4eb0cfbcb | ||
|
|
ee557d8191 | ||
|
|
7d37954495 | ||
|
|
3dc7bd74fe | ||
|
|
56ae387f7b | ||
|
|
5878128746 | ||
|
|
5994cc66b4 | ||
|
|
a9410d92a2 | ||
|
|
89da5fe08a | ||
|
|
bb69ae887f | ||
|
|
540656870a | ||
|
|
4f3b6e4029 | ||
|
|
cec56c8406 | ||
|
|
7bbae51c7d | ||
|
|
3d00e96f89 | ||
|
|
6f29da1926 | ||
|
|
6f028eae6e | ||
|
|
b44501566c | ||
|
|
5f50fa4202 | ||
|
|
5487cd7858 | ||
|
|
89e1af456f | ||
|
|
439838abd2 | ||
|
|
1cf60544e1 | ||
|
|
70ae1cce4b | ||
|
|
b5fa41cdc1 | ||
|
|
0cce35908d | ||
|
|
5a1d8348d8 | ||
|
|
63cd793407 | ||
|
|
f5abee1f92 | ||
|
|
1b0ed90a54 | ||
|
|
5003f69e8e | ||
|
|
68214cf16f | ||
|
|
1365d442e9 | ||
|
|
2f29953ccb | ||
|
|
9929479bf0 | ||
|
|
b52c71c0f3 | ||
|
|
712be51888 | ||
|
|
3e4cc8841d | ||
|
|
3742d5ef81 | ||
|
|
310b12c81d | ||
|
|
ab64a8f8e2 | ||
|
|
9d18a1297b | ||
|
|
e73534ba2f | ||
|
|
73360bb66c | ||
|
|
5b74f8f836 | ||
|
|
0b87cd9aef | ||
|
|
c5c971eeae | ||
|
|
b554e2ee6c | ||
|
|
436a8c4d8e | ||
|
|
a5725439ee | ||
|
|
30bc725631 | ||
|
|
d261347b06 | ||
|
|
9bc65601c0 | ||
|
|
4a82def974 | ||
|
|
0755e8f618 | ||
|
|
44ef039321 | ||
|
|
a7f5451ea4 | ||
|
|
4902e5b9bb | ||
|
|
f3eb1bb45e | ||
|
|
01a9a13402 | ||
|
|
ff6f76e018 | ||
|
|
01110d0835 | ||
|
|
b6fdde403a | ||
|
|
ad01a157ce | ||
|
|
ac04ef34d7 | ||
|
|
58845ae79f | ||
|
|
d6b7a4bdba | ||
|
|
34040abc8f | ||
|
|
03f535e85e | ||
|
|
6ea0bb30e0 | ||
|
|
dd083f73f7 | ||
|
|
8dee20295e | ||
|
|
6e47e4bcd2 | ||
|
|
ff825b85aa | ||
|
|
802bc50102 | ||
|
|
6d08faa30f | ||
|
|
116ab72f4e | ||
|
|
44d86bc350 | ||
|
|
e0fc4b9443 | ||
|
|
d9e18e0f3b | ||
|
|
6b8610b72d | ||
|
|
468448ff6e | ||
|
|
b85efcd85a | ||
|
|
657f581a3d | ||
|
|
0dbff85bd8 | ||
|
|
bf9c4c602b | ||
|
|
4c44957764 | ||
|
|
ec39d7146c | ||
|
|
c60a772e84 | ||
|
|
9ba47c1b6a | ||
|
|
4fc8a5ad0c | ||
|
|
50ffcceaf4 | ||
|
|
05060e76cb | ||
|
|
5139b587f6 | ||
|
|
63870b75a7 | ||
|
|
cf0a8b3e95 | ||
|
|
8006482c22 | ||
|
|
cda15170bd | ||
|
|
9ececd80d6 | ||
|
|
5ea938a20b | ||
|
|
f4056a3fca | ||
|
|
23188c3898 | ||
|
|
7322f1a9fb | ||
|
|
4f6a676c32 | ||
|
|
f2e3914ad8 | ||
|
|
25f2189a08 | ||
|
|
448c406e3e | ||
|
|
d7c9640dc9 | ||
|
|
08949ab25f | ||
|
|
24ae8d1679 | ||
|
|
adb7b13599 | ||
|
|
eddf94a340 | ||
|
|
3df741c4fc | ||
|
|
12e7c51c39 | ||
|
|
c8e2bcd6e4 | ||
|
|
14d5286eb0 | ||
|
|
397a2b0d82 | ||
|
|
35cf439592 | ||
|
|
2f6d69efac | ||
|
|
d00ab3f8d6 | ||
|
|
05d3adff36 | ||
|
|
4c24c570a8 | ||
|
|
19f78f769b | ||
|
|
44358c122f | ||
|
|
8b720e103f | ||
|
|
bd5ca76ef4 | ||
|
|
5e4136d9a1 | ||
|
|
14029aa60f | ||
|
|
fa99b967ed | ||
|
|
a9120edb70 | ||
|
|
cfc8458841 | ||
|
|
7a7fee1d8a | ||
|
|
b87153a445 | ||
|
|
f97cd10bf6 | ||
|
|
736deca1fc | ||
|
|
7f3b9ec89a | ||
|
|
f2339f26ca | ||
|
|
b74a00de22 | ||
|
|
d71297a114 | ||
|
|
fb006a3032 | ||
|
|
536ed2b967 | ||
|
|
1173c3d053 | ||
|
|
c7c1b2b8c1 | ||
|
|
6c8db56474 | ||
|
|
3292dc47ab | ||
|
|
98889780b9 | ||
|
|
11703afd6b | ||
|
|
3c1597f42f | ||
|
|
9d828ad291 | ||
|
|
84506c65ad | ||
|
|
c5bd594798 | ||
|
|
13805edba9 | ||
|
|
79bd586def | ||
|
|
0e86e942ce | ||
|
|
708959a0c5 | ||
|
|
3bf3e2605b | ||
|
|
39b539aaed | ||
|
|
c9648a5ec4 | ||
|
|
acaa93367f | ||
|
|
2c830eacdd | ||
|
|
4c0e918559 | ||
|
|
f79a3d15d1 | ||
|
|
f2b44d8f99 | ||
|
|
a319314d04 | ||
|
|
2c8c23522b | ||
|
|
c05696df8c | ||
|
|
97019f1a2a | ||
|
|
aa7a1ddd4e | ||
|
|
6bbe1c8518 | ||
|
|
0cf0d68026 | ||
|
|
6ff583a916 | ||
|
|
f1856afa77 | ||
|
|
6a03b4b125 | ||
|
|
9e062acafb | ||
|
|
aff7e49024 | ||
|
|
39b4649a04 | ||
|
|
ca8c7229ce | ||
|
|
4634284e77 | ||
|
|
e92fa789e9 | ||
|
|
d29b4e486d | ||
|
|
56eb0b8ef1 | ||
|
|
dcda5741f1 | ||
|
|
46dd19c326 | ||
|
|
5ef9ccb466 | ||
|
|
5fef1b3f30 | ||
|
|
5606da3449 | ||
|
|
844d500037 | ||
|
|
672a66695e | ||
|
|
125a89b5f9 | ||
|
|
c65c197fbe | ||
|
|
98b1302b77 | ||
|
|
e75afe6c41 | ||
|
|
361d02e075 | ||
|
|
1b20d3b6ac | ||
|
|
c4536d789b | ||
|
|
a7f8d9126e | ||
|
|
84e39add27 | ||
|
|
4d352b231c | ||
|
|
59eda04949 | ||
|
|
695cf24861 | ||
|
|
85d4dd9491 | ||
|
|
3a0fcd1517 | ||
|
|
e7e649ad66 | ||
|
|
b875a4898b | ||
|
|
a33cd35ae8 | ||
|
|
6e294d1363 | ||
|
|
7d7269bfe6 | ||
|
|
1306a5bca1 | ||
|
|
0dd45cdfa2 | ||
|
|
4a11ac917b | ||
|
|
460be03a20 | ||
|
|
9f3e5fea38 | ||
|
|
49b494ed02 | ||
|
|
c72559c31a | ||
|
|
2b8e189966 | ||
|
|
09e37f3951 | ||
|
|
c90359716b | ||
|
|
4a1ad1c625 | ||
|
|
27694036a5 | ||
|
|
ed40dc34cf | ||
|
|
af29b2833f | ||
|
|
0ee1f5c47f | ||
|
|
018eb2fdcd | ||
|
|
368a74dfc9 | ||
|
|
1a0475433c | ||
|
|
e841bfad68 | ||
|
|
5d3faba762 | ||
|
|
87cce116af | ||
|
|
356c97a4b2 | ||
|
|
dd6c20ce74 | ||
|
|
e939ffaf2d | ||
|
|
5a6f6fba2e | ||
|
|
99022055cf | ||
|
|
68030a4ae7 | ||
|
|
75ca9240a9 | ||
|
|
6d917b31e0 | ||
|
|
75e508bfd0 | ||
|
|
23136be280 | ||
|
|
527a0f5c70 | ||
|
|
9fbf9539ee | ||
|
|
dab69b2ffe | ||
|
|
7fdbebfb70 | ||
|
|
06ffe5cd06 | ||
|
|
56203c3ee2 | ||
|
|
4f5b562e04 | ||
|
|
e247753f96 | ||
|
|
575b5482b6 | ||
|
|
aa5a72b788 | ||
|
|
d8cb9f2c03 | ||
|
|
5241182520 | ||
|
|
61d8f2e1d4 | ||
|
|
a8031a510f | ||
|
|
c191060b73 | ||
|
|
bfe7cf0ed7 | ||
|
|
a4d72eefbc | ||
|
|
7b98105a0f | ||
|
|
e741dd6f65 | ||
|
|
9ef1c1935d | ||
|
|
43562580d6 | ||
|
|
986250543e | ||
|
|
90ed2f084d | ||
|
|
d353e186a5 | ||
|
|
a8b684d966 | ||
|
|
3ec70f9fb3 | ||
|
|
6199256058 | ||
|
|
265936a791 | ||
|
|
2422013ddf | ||
|
|
2641220fb0 | ||
|
|
68e1830d8e | ||
|
|
fd3f20ed52 | ||
|
|
ccdb136b9a | ||
|
|
0a0617c5fc | ||
|
|
b3e1c48f97 | ||
|
|
88d589bae5 | ||
|
|
0fb5cbdb06 | ||
|
|
d47da11ce8 | ||
|
|
743a4f97ba | ||
|
|
eac1247f36 | ||
|
|
57f60326f3 | ||
|
|
3235f6e388 | ||
|
|
a607a6a137 | ||
|
|
2348d4a855 | ||
|
|
e16f6c87c2 | ||
|
|
598962f5f3 | ||
|
|
8a241bb671 | ||
|
|
8bcb3d9e0e | ||
|
|
2317220666 | ||
|
|
47c1b58aa5 | ||
|
|
0039582f28 | ||
|
|
60a529375c | ||
|
|
d42bcb0ab9 | ||
|
|
4b11bcb77b | ||
|
|
6775edddab | ||
|
|
039a732148 | ||
|
|
9aac70c734 | ||
|
|
dc6c38cf24 | ||
|
|
a2b09cb2aa | ||
|
|
6e6453f897 | ||
|
|
f16de65934 | ||
|
|
fa0a5efb25 | ||
|
|
1ffb6b9395 | ||
|
|
16d746fb8d | ||
|
|
e8629fab66 | ||
|
|
9cb9719461 | ||
|
|
564f02b188 | ||
|
|
d67596117f | ||
|
|
ffecbb2298 | ||
|
|
b5fe2bcc60 | ||
|
|
7641d6dbdf | ||
|
|
54c5e3a8e3 | ||
|
|
d8427cdbcd | ||
|
|
fe03a12bec | ||
|
|
37fca3fc3e | ||
|
|
4dcdbdec3a | ||
|
|
564c79c411 | ||
|
|
ea46c78a15 | ||
|
|
93529cda60 | ||
|
|
13bf6a89cb | ||
|
|
468c69d2dd | ||
|
|
4ccfa8c3b6 | ||
|
|
b9a447453f | ||
|
|
3daf03d89a | ||
|
|
1a7d4c2c37 | ||
|
|
c7f612dac0 | ||
|
|
1a7aa1218a | ||
|
|
e530e30878 | ||
|
|
c5ef4df15a | ||
|
|
dba07c1832 | ||
|
|
d9d0f426e4 | ||
|
|
1b88d3d785 | ||
|
|
1e188fe737 | ||
|
|
335d4abbe1 | ||
|
|
1087d27523 | ||
|
|
f8f8b884bc | ||
|
|
c84c462aeb | ||
|
|
3ba4384c84 | ||
|
|
d4c72c34c3 | ||
|
|
60e950abcb | ||
|
|
6cb48e76a8 | ||
|
|
5e811b188b | ||
|
|
31320b4ab7 | ||
|
|
38e62a9c98 | ||
|
|
74e59fa47b | ||
|
|
80b1374a61 | ||
|
|
bd3e9d01ec | ||
|
|
f3e7d188f9 | ||
|
|
c45044b5c2 | ||
|
|
ac2dcee6c3 | ||
|
|
e72ea21b6b | ||
|
|
a46f57eaab | ||
|
|
843b5d7154 | ||
|
|
4f7d659700 | ||
|
|
0a195e0c11 | ||
|
|
9a9a21350e | ||
|
|
5a4cbc74f7 | ||
|
|
27e06ceb2c | ||
|
|
68f2640ceb | ||
|
|
cd9cf902bf | ||
|
|
03f3b4f8d3 | ||
|
|
6e430861d7 | ||
|
|
b7d658cff3 | ||
|
|
b1b85e7135 | ||
|
|
f28bdccd0f | ||
|
|
d2ea288009 | ||
|
|
e0a60e3ef3 | ||
|
|
563bf12de0 | ||
|
|
ef4037274d | ||
|
|
639294af2d | ||
|
|
9e51a1617f | ||
|
|
d317ac5236 | ||
|
|
42907b5a5d | ||
|
|
5d35fc80d5 | ||
|
|
11cab800e3 | ||
|
|
9272765f3c | ||
|
|
30e1d9552c | ||
|
|
1bafdf0feb | ||
|
|
1618d54b70 | ||
|
|
be6739ecb8 | ||
|
|
200e576ba8 | ||
|
|
ed6fe5631a | ||
|
|
b0ee9b27a1 | ||
|
|
eb0de84ce3 | ||
|
|
c52b3d27bc | ||
|
|
352adbc9cb | ||
|
|
c418683b3d | ||
|
|
5bd22f25b8 | ||
|
|
087ab3815f | ||
|
|
6af2055fd2 | ||
|
|
05e351be9c | ||
|
|
9bdcd6aace | ||
|
|
265807941a | ||
|
|
88b60ea945 | ||
|
|
f5854f9342 | ||
|
|
8ffe6fa8fb | ||
|
|
1d11585fcd | ||
|
|
b0d8b9a078 | ||
|
|
9f1b66fb91 | ||
|
|
55fde2d3fb | ||
|
|
649becb98e | ||
|
|
0b9ea265f0 | ||
|
|
3e92154e27 | ||
|
|
bdb86808a5 | ||
|
|
1993639bf6 | ||
|
|
90a5398e98 | ||
|
|
c5ab77b8ac | ||
|
|
7cd268bb4c | ||
|
|
036dc289d5 | ||
|
|
035f2a0236 | ||
|
|
86669fb6e8 | ||
|
|
5a2bb741a7 | ||
|
|
28e8a234e9 | ||
|
|
bd48e77e7c | ||
|
|
5b6f1182fe | ||
|
|
44d800de1e | ||
|
|
fc55622cc8 | ||
|
|
0e217e431b | ||
|
|
e4cbfcfedc | ||
|
|
ccd59278e5 | ||
|
|
a27bb66fef | ||
|
|
ef6036a7d0 | ||
|
|
b158ea9e78 | ||
|
|
fbc02881d7 | ||
|
|
4340d584c1 | ||
|
|
a4a8678116 | ||
|
|
ab4bee5d69 | ||
|
|
fad17c9cd2 | ||
|
|
e7f0ba1982 | ||
|
|
92bee965f0 | ||
|
|
dd4edb8ba5 | ||
|
|
b8f58b9cc7 | ||
|
|
f334b0137e | ||
|
|
e732c8ff6a | ||
|
|
60bb232d2a | ||
|
|
4f18f26935 | ||
|
|
7dc095b87a | ||
|
|
759780f10e | ||
|
|
77ff87a9c4 | ||
|
|
82d6719681 | ||
|
|
073998789c | ||
|
|
3f4347289c | ||
|
|
dc2a3cde47 | ||
|
|
252eebe5d8 | ||
|
|
bdd0da82e7 | ||
|
|
d144b9ba0b | ||
|
|
b201cf1990 | ||
|
|
286c4da2f3 | ||
|
|
959a5b5c70 | ||
|
|
607a7be337 | ||
|
|
3663b9f957 | ||
|
|
9aa6d1c0fc | ||
|
|
e6b59bc16d | ||
|
|
a478428721 | ||
|
|
8bb01a2412 | ||
|
|
4a98fb6c9d | ||
|
|
ea5dd69719 | ||
|
|
6d3a35517b | ||
|
|
9be6e12a5c | ||
|
|
e8addbc954 | ||
|
|
683becabda | ||
|
|
8c0cbfe93a | ||
|
|
57cb8d5bda | ||
|
|
0b583bcf80 | ||
|
|
9880248e49 | ||
|
|
20b715f7cb | ||
|
|
ed9ddc0825 | ||
|
|
5ab2bae5d7 | ||
|
|
8a2b69464f | ||
|
|
ff78830ead | ||
|
|
01fd89f60c | ||
|
|
44b6396b78 | ||
|
|
998e1b62a5 | ||
|
|
273f7c7a73 | ||
|
|
e9544bb610 | ||
|
|
fecf7f987d | ||
|
|
308395aa86 | ||
|
|
69218b6710 | ||
|
|
8bf7fcff28 | ||
|
|
416fbc093f | ||
|
|
2500fa54e4 | ||
|
|
ccc7a947cd | ||
|
|
83772bed42 | ||
|
|
7f3b7df710 | ||
|
|
39b7563d3a | ||
|
|
7b94d753b8 | ||
|
|
ab89d6a22f | ||
|
|
bff242dc99 | ||
|
|
ec452125e2 | ||
|
|
faa4ca33ad | ||
|
|
0b2284f163 | ||
|
|
b8c4d66160 | ||
|
|
4dfd033435 | ||
|
|
9ca8739514 | ||
|
|
1d8691fed8 | ||
|
|
522aec1d3a | ||
|
|
6153b25bc7 | ||
|
|
bb7e277f19 | ||
|
|
8a7bc3c17d | ||
|
|
af22751210 | ||
|
|
81f6ce26d4 | ||
|
|
633fea8c68 | ||
|
|
0c5855a82d | ||
|
|
c07b4e9f98 | ||
|
|
2407c3f2f8 | ||
|
|
d89371a279 | ||
|
|
86be84b015 | ||
|
|
da79b4e2ea | ||
|
|
e54f7d9c06 | ||
|
|
c0991e46ec | ||
|
|
ddd29529ea | ||
|
|
a1d6431348 | ||
|
|
31bd6a0c0d | ||
|
|
7f98aff531 | ||
|
|
948317c27a | ||
|
|
7406da66a7 | ||
|
|
8586ec67b6 | ||
|
|
991aaa8677 | ||
|
|
a4d1b5b972 | ||
|
|
887d355dea | ||
|
|
93866dc466 | ||
|
|
6c014e25b5 | ||
|
|
b1663c040f | ||
|
|
1f63b47500 | ||
|
|
ce0249f28e | ||
|
|
5d096092b9 | ||
|
|
a6b65c8d76 | ||
|
|
d3a4b0451d | ||
|
|
e0714637ff | ||
|
|
e777566339 | ||
|
|
185d0d8817 | ||
|
|
4132c0552f | ||
|
|
c158e74fb5 | ||
|
|
e5384509cf | ||
|
|
60324c041c | ||
|
|
5be89f3f31 | ||
|
|
4207330dcf | ||
|
|
05ab44d50b | ||
|
|
2a849c417f | ||
|
|
d5d7e9a952 | ||
|
|
f1e3210c7a | ||
|
|
cd07f29038 | ||
|
|
a7428838b3 | ||
|
|
58b00b6ed5 | ||
|
|
9d2544f8cb | ||
|
|
4f99743db7 | ||
|
|
e5d622780e | ||
|
|
905625d18e | ||
|
|
b529cc5691 | ||
|
|
aca279c951 | ||
|
|
086bb764a5 | ||
|
|
4304cad029 | ||
|
|
79e2bdb587 | ||
|
|
51d55eed05 | ||
|
|
ef5115b76c | ||
|
|
58a5aaed30 | ||
|
|
b6592582b3 | ||
|
|
7863660a47 | ||
|
|
ea3e7f9ace | ||
|
|
92e7ac7f20 | ||
|
|
75f6a93024 | ||
|
|
d679660e8a | ||
|
|
f3d87f09d7 | ||
|
|
71c90c6d31 | ||
|
|
3b76bb64a9 | ||
|
|
e5cdd9a7f1 | ||
|
|
121653a8f2 | ||
|
|
9d326d240a | ||
|
|
d92c96ecc2 | ||
|
|
aec5486144 | ||
|
|
773dd2fd1a | ||
|
|
36e5fec284 | ||
|
|
84e81e9ce0 | ||
|
|
0ecde9531e | ||
|
|
7d4b980e59 | ||
|
|
bccb4e154d | ||
|
|
45dd039c53 | ||
|
|
108499706a | ||
|
|
1ae1cebab6 | ||
|
|
77786af4d7 | ||
|
|
809959fde8 | ||
|
|
a47ea13a9b | ||
|
|
dddbcdf088 | ||
|
|
e1067aeb83 | ||
|
|
e5e46f3239 | ||
|
|
a28c08be99 | ||
|
|
279fcad10a | ||
|
|
7505d645eb | ||
|
|
5af98c5683 | ||
|
|
f8cb0caa80 | ||
|
|
e3747d3cfd | ||
|
|
ebe96c0dad | ||
|
|
bbd394b95e | ||
|
|
e1824ffda1 | ||
|
|
d42be730c3 | ||
|
|
a75817dde1 | ||
|
|
066fb7fba0 | ||
|
|
30dc6e865f | ||
|
|
ae5d0b282c | ||
|
|
a9ce316d28 | ||
|
|
6c28e270d2 | ||
|
|
72d4c7eb40 | ||
|
|
921e5912b3 | ||
|
|
aa168fab8c | ||
|
|
dffa357c0a | ||
|
|
7c6442d51f | ||
|
|
f995f6568c | ||
|
|
5b8d812fc8 | ||
|
|
27ce6ad5ba | ||
|
|
58dcb72adc | ||
|
|
202a7106a7 | ||
|
|
b8f79f6559 | ||
|
|
e491401ca0 | ||
|
|
89b236ae9e | ||
|
|
0566b30406 | ||
|
|
14e63bd47d | ||
|
|
1b2ce750ca | ||
|
|
17df8f23c5 | ||
|
|
eca3174214 | ||
|
|
5d7126f772 | ||
|
|
a82ba6503f | ||
|
|
cecbad2eb9 | ||
|
|
a97cb3df4f | ||
|
|
59f29eb6b4 | ||
|
|
ba9cb41d47 | ||
|
|
67a2ad708f | ||
|
|
e385e3cec8 | ||
|
|
6373478d13 | ||
|
|
7cc6dd03ff | ||
|
|
30ffc8cd11 | ||
|
|
b61a71b3b4 | ||
|
|
1c7a7f6edf | ||
|
|
5d410764e1 | ||
|
|
f645589cda | ||
|
|
b49c1e6e47 | ||
|
|
58558732be | ||
|
|
784ef277fc | ||
|
|
eb359f79cb | ||
|
|
31bf39d2e5 | ||
|
|
08159923d6 | ||
|
|
7b8b8d6b75 | ||
|
|
e52f5571a7 | ||
|
|
ea458935f0 | ||
|
|
64674026a6 | ||
|
|
ea71474b62 | ||
|
|
5d6348b83c | ||
|
|
199a26afbc | ||
|
|
c1971bffa8 | ||
|
|
51832005de | ||
|
|
9d5ae41c49 | ||
|
|
fa1d2416e0 | ||
|
|
c212bc294b | ||
|
|
ca21758889 | ||
|
|
75da6d4df1 | ||
|
|
0483bc0afe | ||
|
|
0e12c6906f | ||
|
|
1e633278dd | ||
|
|
554756851f | ||
|
|
ac8ac06c8a | ||
|
|
f6780fcb76 | ||
|
|
31c2ea888b | ||
|
|
2702c0f2e4 | ||
|
|
2aef5f94c0 | ||
|
|
a4b571ccbc | ||
|
|
fd561cd45d | ||
|
|
1357d817e6 | ||
|
|
ba2613d3c7 | ||
|
|
b2e1717dc3 | ||
|
|
ace5abea23 | ||
|
|
2ea1bd5e67 | ||
|
|
8ced379e44 | ||
|
|
f5ab7f3102 | ||
|
|
445ce46357 | ||
|
|
1b9c7d48e4 | ||
|
|
596c3368e0 | ||
|
|
3a699d34eb | ||
|
|
451eca0aa9 | ||
|
|
165517608d | ||
|
|
05eb0b20be | ||
|
|
c47526ce8e | ||
|
|
75d9bf458a | ||
|
|
3b90a58418 | ||
|
|
84e49a266d | ||
|
|
446430be4f | ||
|
|
e0a5ecc156 | ||
|
|
59e8ba2297 | ||
|
|
9f8caff571 | ||
|
|
f68c206a17 | ||
|
|
8c5fdd4673 | ||
|
|
c62be9573d | ||
|
|
c4d2e16433 | ||
|
|
ccf36f23c3 | ||
|
|
495dcd94d8 | ||
|
|
417a759c40 | ||
|
|
90846401a5 | ||
|
|
8e28c59163 | ||
|
|
a3eb0bb9fc | ||
|
|
9aac129aad | ||
|
|
9a6e3a80c7 | ||
|
|
7e45835424 | ||
|
|
58632b8da3 | ||
|
|
acaf95c017 | ||
|
|
1c3ad6a925 | ||
|
|
9bf49d8732 | ||
|
|
6895390f2b | ||
|
|
116831f6d9 | ||
|
|
51c401d6db | ||
|
|
b13bc0060b | ||
|
|
e68d573209 | ||
|
|
2d6f3db8fe | ||
|
|
1a68a60479 | ||
|
|
da55612726 | ||
|
|
1b88e132cc | ||
|
|
6179dbda8a | ||
|
|
2a7b2343b2 | ||
|
|
f7de416070 | ||
|
|
ead4b9e695 | ||
|
|
362adedae6 | ||
|
|
4d88c1f798 | ||
|
|
f664142094 | ||
|
|
0d533a71b6 | ||
|
|
d88a6c5db8 | ||
|
|
4379deaca2 | ||
|
|
67325fdb79 | ||
|
|
77b6239b16 | ||
|
|
248f2ca3c4 | ||
|
|
8b672a68e6 | ||
|
|
ce8127456c | ||
|
|
30185626a6 | ||
|
|
431eea9152 | ||
|
|
d53ec07857 | ||
|
|
2670a41545 | ||
|
|
4825b21951 | ||
|
|
ac2974d290 | ||
|
|
ad7a4503e0 | ||
|
|
4094034aaf | ||
|
|
11e74ef6cc | ||
|
|
1930b911b3 | ||
|
|
7e9417b186 | ||
|
|
c620a9388f | ||
|
|
0d55247dd9 | ||
|
|
9940e61fec | ||
|
|
feb4f77e39 | ||
|
|
d1925201ef | ||
|
|
7e9cea94f3 | ||
|
|
152b1bd24e | ||
|
|
5d6da6034d | ||
|
|
6ea203f6b9 | ||
|
|
79aabc6feb | ||
|
|
0ef5b017df | ||
|
|
8ab969688e | ||
|
|
7e5b94cc5f | ||
|
|
8cd02543bc | ||
|
|
6f68e8b2c7 | ||
|
|
e7baa90792 | ||
|
|
4199824275 | ||
|
|
fc2abb0f3c | ||
|
|
5b275e4170 | ||
|
|
a7e58b715b | ||
|
|
8b8d59065f | ||
|
|
ed0efec628 | ||
|
|
f8a40b8fb3 | ||
|
|
ef8d48846c | ||
|
|
8f973c8dc1 | ||
|
|
e1e47caf72 | ||
|
|
c2d7fe8612 | ||
|
|
93e02093be | ||
|
|
7934be70ee | ||
|
|
ec43d2012e | ||
|
|
e2c8b6ae02 | ||
|
|
4ce37da17e | ||
|
|
92ce6e5a8d | ||
|
|
fd16fd2890 | ||
|
|
9f66725b4a | ||
|
|
373d75609a | ||
|
|
00d4f7640e | ||
|
|
98a26a40b1 | ||
|
|
ba84ac56e9 | ||
|
|
05f501a66a |
17
.classpath
17
.classpath
@@ -28,5 +28,22 @@
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="target/generated-sources/annotations">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="ignore_optional_problems" value="true"/>
|
||||
<attribute name="m2e-apt" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="ignore_optional_problems" value="true"/>
|
||||
<attribute name="m2e-apt" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
71
.factorypath
Normal file
71
.factorypath
Normal file
@@ -0,0 +1,71 @@
|
||||
<factorypath>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/spigotmc/spigot-api/1.16.1-R0.1-SNAPSHOT/spigot-api-1.16.1-R0.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/21.0/guava-21.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/md-5/bungeecord-chat/1.16-R0.3/bungeecord-chat-1.16-R0.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/papermc/paperlib/1.0.5/paperlib-1.0.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bukkit/craftbukkit/cb-1.16.2/1.16.2/cb-1.16.2-1.16.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-bukkit/7.2.0-SNAPSHOT/worldedit-bukkit-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-core/7.2.0-SNAPSHOT/worldedit-core-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-libs/core/7.2.0-SNAPSHOT/core-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/de/schlichtherle/truezip/6.8.3/truezip-6.8.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-profile-default_2.13/0.12.1/truevfs-profile-default_2.13-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/scala-lang/scala-library/2.13.1/scala-library-2.13.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-http/0.12.1/truevfs-driver-http-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-kernel-spec/0.12.1/truevfs-kernel-spec-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-annotations/2.5.0/truecommons-annotations-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-cio/2.5.0/truecommons-cio-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-io/2.5.0/truecommons-io-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-services/2.5.0/truecommons-services-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-logging/2.5.0/truecommons-logging-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.28/jcl-over-slf4j-1.7.28.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-odf/0.12.1/truevfs-driver-odf-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-zipdriver/0.12.1/truevfs-comp-zipdriver-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-zip/0.12.1/truevfs-comp-zip-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.63/bcprov-jdk15on-1.63.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar/0.12.1/truevfs-driver-tar-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-tardriver/0.12.1/truevfs-comp-tardriver-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar-bzip2/0.12.1/truevfs-driver-tar-bzip2-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar-gzip/0.12.1/truevfs-driver-tar-gzip-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar-xz/0.12.1/truevfs-driver-tar-xz-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/tukaani/xz/1.8/xz-1.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-zip-raes/0.12.1/truevfs-driver-zip-raes-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-profile-base_2.13/0.12.1/truevfs-profile-base_2.13-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-access-swing/0.12.1/truevfs-access-swing-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-access/0.12.1/truevfs-access-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-file/0.12.1/truevfs-driver-file-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-jar/0.12.1/truevfs-driver-jar-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-zip/0.12.1/truevfs-driver-zip-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-ibm437/0.12.1/truevfs-comp-ibm437-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-kernel-impl_2.13/0.12.1/truevfs-kernel-impl_2.13-0.12.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-console/2.5.0/truecommons-key-console-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-default/2.5.0/truecommons-key-default-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-swing/2.5.0/truecommons-key-swing-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-macosx/2.5.0/truecommons-key-macosx-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-spec/2.5.0/truecommons-key-spec-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-shed/2.5.0/truecommons-shed-2.5.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mozilla/rhino-runtime/1.7.12/rhino-runtime-1.7.12.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr4-runtime/4.7.2/antlr4-runtime-4.7.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-libs/bukkit/7.2.0-SNAPSHOT/bukkit-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-slf4j-impl/2.8.1/log4j-slf4j-impl-2.8.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bstats/bstats-bukkit/1.7/bstats-bukkit-1.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/lumine/xikage/MythicMobs/4.9.1/MythicMobs-4.9.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.8.5/caffeine-2.8.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/3.4.1/checker-qual-3.4.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.4.0/error_prone_annotations-2.4.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.10/lombok-1.18.10.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/zeroturnaround/zt-zip/1.14/zt-zip-1.14.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
</factorypath>
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -1,3 +1,16 @@
|
||||
/target/
|
||||
|
||||
lib/
|
||||
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
release/
|
||||
|
||||
lint/in.jar
|
||||
|
||||
lint/out.jar
|
||||
|
||||
lint/mapping.txt
|
||||
|
||||
.DS_Store
|
||||
.idea/
|
||||
|
||||
11
.project
11
.project
@@ -20,4 +20,15 @@
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1604627025065</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
||||
4
.settings/org.eclipse.jdt.apt.core.prefs
Normal file
4
.settings/org.eclipse.jdt.apt.core.prefs
Normal file
@@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.apt.aptEnabled=true
|
||||
org.eclipse.jdt.apt.genSrcDir=target\\generated-sources\\annotations
|
||||
org.eclipse.jdt.apt.genTestSrcDir=target\\generated-test-sources\\test-annotations
|
||||
@@ -4,5 +4,6 @@ org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.processAnnotations=enabled
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
||||
97
Iris.iml
Normal file
97
Iris.iml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="EclipseModuleManager">
|
||||
<conelement value="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" />
|
||||
<src_description expected_position="2">
|
||||
<src_folder value="file://$MODULE_DIR$/src/main/java" expected_position="0" />
|
||||
<src_folder value="file://$MODULE_DIR$/src/main/resources" expected_position="1" />
|
||||
<src_folder value="file://$MODULE_DIR$/src/test/java" expected_position="4" />
|
||||
</src_description>
|
||||
</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" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="JavaSE-1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="library" name="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" level="application" />
|
||||
<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>
|
||||
@@ -1,116 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>bytecode.ninja</groupId>
|
||||
<artifactId>Iris</artifactId>
|
||||
<name>Iris</name>
|
||||
<version>1.0</version>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.txt</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.html</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>runbatchfile</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${skip.copy}</skip>
|
||||
<executable>${project.basedir}/scripts/copy.bat</executable>
|
||||
<arguments>
|
||||
<argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument>
|
||||
<argument>${development.location}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>pub</id>
|
||||
<url>http://nexus.mpm.care/content/repositories/pub</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>volmit</id>
|
||||
<url>http://nexus.volmit.com/content/repositories/volmit</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>guava</artifactId>
|
||||
<groupId>com.google.guava</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>bungeecord-chat</artifactId>
|
||||
<groupId>net.md-5</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<groupId>org.yaml</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cb</groupId>
|
||||
<artifactId>craftbukkit-1.14.4</artifactId>
|
||||
<version>1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/craftbukkit-1.14.4.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<development.location>${user.home}\Documents\development\server\plugins\${project.name}.jar</development.location>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
392
eclipse-style.epf
Normal file
392
eclipse-style.epf
Normal file
File diff suppressed because one or more lines are too long
3
gource.bat
Normal file
3
gource.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
cd gource
|
||||
gource -f -a 1 -s 0.01 -t 100000 --colour-images --max-file-lag 35 --title MyGuide --user-scale 1.67 --max-user-speed 725 --filename-time 2 -title Chimera --user-friction 2.5 --padding 1.2 --user-scale 1.25 --filename-time 2 --bloom-intensity 0.1 --bloom-multiplier 3 --hide filenames,dirnames
|
||||
674
gource/COPYING.txt
Normal file
674
gource/COPYING.txt
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
298
gource/ChangeLog.txt
Normal file
298
gource/ChangeLog.txt
Normal file
@@ -0,0 +1,298 @@
|
||||
0.51:
|
||||
* Fixed --font-file relative path handling.
|
||||
* Fixed a bug in resolving the repository root directory from a relative path.
|
||||
|
||||
0.50:
|
||||
* Right mouse button rotation now pivots around the camera.
|
||||
* Added --font-file option.
|
||||
* Added --enable-font-file option to configure.
|
||||
* Added --no-time-travel option (Lars Schmertmann).
|
||||
* Added --dir-name-position option (Lars Schmertmann).
|
||||
* Added --file-extension-fallback option (Lars Schmertmann).
|
||||
* Added --user-show-filter option (Victor Lopez).
|
||||
* Added --disable-input option (Joey Parrish).
|
||||
* Added --loop-delay-seconds option (Joey Parrish).
|
||||
* Added --font-scale option.
|
||||
* Added filename, dirname and user font size options (Carl Colena).
|
||||
* Added workaround for FFMpeg error parsing Gource PPM video output.
|
||||
* Fixed a bug in the Mercurial log parser that caused changes to be missed.
|
||||
* Fixed file removal being cancelled by an action with an earlier timestamp.
|
||||
* Fixed a bug in the log file format detection that could result in the wrong
|
||||
first entry being displayed for a custom log.
|
||||
* Fixed a bug where automatically cycling through a config with multiple
|
||||
repositories reset settings to their defaults.
|
||||
|
||||
0.49:
|
||||
* Fixed compatibility with GLM 0.9.9.0.
|
||||
|
||||
0.48:
|
||||
* Can now generate logs from git sub module directories.
|
||||
|
||||
0.47:
|
||||
* Fixed low mouse movement speed with some mice while repositioning camera.
|
||||
|
||||
0.46:
|
||||
* Added --screen option.
|
||||
|
||||
0.45:
|
||||
* Added --window-position XxY option.
|
||||
* Added --frameless option.
|
||||
* Added --file-show-filter REGEX option (swoogles).
|
||||
* Added --filename-time and filename-colour options (gh2k).
|
||||
* Improved handling of very low seconds-per-day values (malengrin).
|
||||
* Fixed crash when SVN log lacks author information (obarthel).
|
||||
* Additional git log command validation (cym13).
|
||||
* Allow lower case hex colours in custom logs (HSorensen).
|
||||
* Enabled STDOUT support with --output-stream '-' on Windows (circulosmeos).
|
||||
* Now requires SDL 2 to build (deprecated SDL 1.2 support removed).
|
||||
|
||||
0.44:
|
||||
* Fixed crash when taking a screenshot with an odd resolution.
|
||||
* Fixed type deduction compilation error with newer versions of GCC.
|
||||
* Documentation improvements.
|
||||
|
||||
0.43:
|
||||
* Updated boost autoconf macros to fix multi-arch detection.
|
||||
|
||||
0.42:
|
||||
* Fixed bzr log command when no start date was specified (chrisf).
|
||||
* Fixed hg log commit order when date range specified.
|
||||
* Fixed hg log command line on Windows.
|
||||
* Fixed parser bug in date range filtering code.
|
||||
|
||||
0.41:
|
||||
* Multi-monitor support using SDL 2.0 when available.
|
||||
* SDL 1.2 support is deprecated.
|
||||
* Full screen mode now uses desktop resolution by default.
|
||||
* Added --start-date, --stop-date 'YYYY-MM-DD hh:mm:ss' options.
|
||||
* Added --dir-name-depth option.
|
||||
* Changed --file-idle-time default value to 0.
|
||||
* Changed screenshot format to PNG.
|
||||
|
||||
0.40:
|
||||
* Added caption support.
|
||||
* Improved command line interoperability on Windows.
|
||||
* Fixed directory deletion short circuiting processing the rest of a commit.
|
||||
* Fixed issue loading non-ascii user image filenames on windows.
|
||||
* Ignore UTF-8 byte order mark at the start of lines in custom log files.
|
||||
* Fix to boost macros for Macs and non-GNU systems (mistydemeo).
|
||||
* Autotools improvements (flameeyes).
|
||||
|
||||
0.39:
|
||||
* Fixed blurry non power of 2 logos.
|
||||
* File colour changes now supported in custom logs (rmyorston).
|
||||
* Fixed building against Boost 1.50 (svenstaro).
|
||||
* Updated boost autoconf macros (flameeyes).
|
||||
* Autogen script (matthiaskrgr).
|
||||
|
||||
0.38:
|
||||
* New high quality sprites.
|
||||
* Fullscreen toggle with alt + enter.
|
||||
* Window is now resizable. -WIDTHxHEIGHT! creates a non-resizable window.
|
||||
* Lowered minimum zoom distance.
|
||||
* Use AM_CPPFLAGS in Makefile.am to allow passing custom CPPFLAGS.
|
||||
* Don't add files that match the path of a known directory.
|
||||
* Fixed divide by zero in text shader causing artifacts on some video cards.
|
||||
* Recursively search for repository directory when log-format not specified
|
||||
(thanks to Jörg Bachmann for original concept / prototype).
|
||||
* New dependency on Boost Filesystem.
|
||||
* Doubled the maximum zoom out distance.
|
||||
* Allow negative timestamps before 1970 in custom log (artzub).
|
||||
* Fix for UTF8-CPP checked.h compilation issue (vszakats).
|
||||
* Fixed bug causing missing characters in text.
|
||||
* Fixed --highlight-users option not using highlight-colour.
|
||||
* highlight-colour default changed to white.
|
||||
* Added --selection-colour option (applied to selected users and files).
|
||||
* Added --dir-colour option (applied to directories).
|
||||
|
||||
0.37:
|
||||
* Made SVN log GMT timestamp conversion fix portable.
|
||||
|
||||
0.36:
|
||||
* Fixed SVN log GMT timestamp conversion.
|
||||
* Fixed issue with sub-dirs of deleted dir not being removed in some cases.
|
||||
|
||||
0.35:
|
||||
* Added long file extension truncation handling to file key (--key).
|
||||
* Treat changes in Mercurial log files with the same time/user as one commit.
|
||||
* Fixed handling of spaces in directory names with Mercurial.
|
||||
* Fixed --font-colour option.
|
||||
|
||||
0.34:
|
||||
* Now using VBOs and shaders for faster rendering when OpenGL 2.0 is available.
|
||||
* Eliminated bloom colour banding artifacts (requires OpenGL 2.0).
|
||||
* New font rendering library derived from FTGL (FTGL no longer required).
|
||||
* Single pass font/shadow rendering (with lots of help from Chris Forbes).
|
||||
* Added --no-vsync option.
|
||||
* Fixed bug where tree is out of alignment with object positions in windowed
|
||||
mode due to using the wrong display dimensions internally.
|
||||
* Removed default max-files limit.
|
||||
|
||||
0.33:
|
||||
* Added --hide root option to not draw branches from the root directory.
|
||||
* Fixed log parsing of Bazaar merges and tagged commits.
|
||||
* --output-custom-log now skips unparsed log entries instead of exiting.
|
||||
|
||||
0.32:
|
||||
* Fixed behaviour of user camera tracking.
|
||||
|
||||
0.31:
|
||||
* Added --with-tinyxml option to configure (use the system TinyXML library).
|
||||
|
||||
0.30:
|
||||
* Fixed crash when SVN log entry contains no 'paths' element.
|
||||
* Handle directory deletion (happens in SVN logs).
|
||||
|
||||
0.29:
|
||||
* SVN built-in support.
|
||||
* cvs2cl log support (cvs-exp support is now deprecated).
|
||||
* Made camera behaviour when zooming and selecting objects more intuitive.
|
||||
* Improved interactive performance.
|
||||
* Added file extension key (--key or toggled with 'K').
|
||||
* Added mouse-over tool tips.
|
||||
* Added --highlight-colour option.
|
||||
* Added --hash-seed option. The S key now randomizes colours.
|
||||
* Added --output-custom-log option.
|
||||
* Exposed --time-scale option (previously only available interactively).
|
||||
* Removed arbitrary 1024 maximum length limit for log lines.
|
||||
* Fixed two file colouring bugs (quoted files from git, period in file path).
|
||||
* Fix handling of avatars for UTF-8 usernames on MACOSX (Christian Köstlin).
|
||||
* Recover from video mode failing to set due to multi-sampling (Siddhesh Poyarekar).
|
||||
|
||||
0.28:
|
||||
* Bazaar support for merged commits (Nick Moffit).
|
||||
* C++ efficiency improvements (Oliver Smith).
|
||||
* Improved cvs-exp log compatibility.
|
||||
* Re-show name of user when adding a new action if user is idle.
|
||||
* Added --padding option to control camera view padding.
|
||||
* More accurate camera tracking (tracks the bounding boxes of objects).
|
||||
* Improved automatic rotation logic.
|
||||
|
||||
0.27:
|
||||
* Display time stops at the time of the last commit.
|
||||
* Users fade out when end reached rather than ending abruptly.
|
||||
* Position slider is now hidden by default if recording a video.
|
||||
* Automatic camera rotation for better use of screen space.
|
||||
* Support international keyboards (Peter Kjellerstedt).
|
||||
* C++ efficiency improvements (Jacob Metcalfe).
|
||||
* Fixed crash when reading from STDIN.
|
||||
* Fixed intermittent crash closing Gource when using --output-ppm-stream.
|
||||
* Added ini style config file support (see --load/save-config).
|
||||
* Added screenshot button (F12). Screenshots respect the alpha channel.
|
||||
* Added --transparent to make the background see-through (for screenshots).
|
||||
* Added --logo and --background-image options.
|
||||
* Added --dont-stop option for manual exiting when recording videos.
|
||||
* Added --stop-at-time option to stop Gource after a number of seconds.
|
||||
* Added --hide 'mouse' option.
|
||||
* Added --highlight-dirs option.
|
||||
* Added --file-extensions to show filename extensions only.
|
||||
* Added --user-filter REGEX option.
|
||||
* Allow --file-idle-time 0 (files will never expire).
|
||||
* Allow --start-position 'random' to set a random start position.
|
||||
* --log-command VCS replaces multiple --log-command-VCS options.
|
||||
* Replaced --disable-progress and --disable-bloom with arguments to --hide.
|
||||
|
||||
0.26a:
|
||||
* Updated to latest version of GL autoconf macros.
|
||||
|
||||
0.26:
|
||||
* Improved mouse dragging.
|
||||
* Holding right mouse button and moving the mouse rotates the view.
|
||||
* The middle mouse button now toggles the camera mode.
|
||||
* Username positions now scale correctly.
|
||||
* Simulation time no longer incremented while paused, counting towards file time lag.
|
||||
* M key now toggles mouse visibility.
|
||||
* Added --hide option to use instead of multiple --hide-ELEMENT options.
|
||||
|
||||
0.25:
|
||||
* Bazaar support (John Arbash Meinel).
|
||||
* Dragging the mouse on the background moves the camera.
|
||||
* Added --camera-mode option (track,overview).
|
||||
* Support DOS line endings in logs.
|
||||
* Improved compatibility of hg log command (Brendan Cully).
|
||||
* Fixed PPM exporter producing blank images on some video cards.
|
||||
* Fixed parsing of negative timezones from cvs-exp.pl logs.
|
||||
* Fixed various gdb and compiler warnings.
|
||||
|
||||
0.24:
|
||||
* PPM output speed improvements, including using a second thread (HighlandSun).
|
||||
* Now using standard autotools (Flameeyes).
|
||||
* Fixed --max-file-lag not working with some custom log files.
|
||||
* Gource will stop at the end of the log by default when recording a video.
|
||||
* Fixed STDIN stopping working after the first lot of records with tail -f.
|
||||
* Added proper exception handling.
|
||||
* Print errors to stderr.
|
||||
|
||||
0.23:
|
||||
* Hiding filenames no longer hides directory names.
|
||||
* Fixed --stop-on-idle option.
|
||||
* Added --stop-at-end option (more intuitive than --stop-position 1.0).
|
||||
|
||||
0.22:
|
||||
* Fixed Mercurial log order.
|
||||
|
||||
0.21b:
|
||||
* Fixed windows build.
|
||||
|
||||
0.21:
|
||||
* Some documentation fixes.
|
||||
|
||||
0.20:
|
||||
* Added bloom effect (turn off with --disable-bloom).
|
||||
* Added support for Mercurial (thanks to Justin Love for gource.style).
|
||||
* --start-position option now works in combination with --disable-progress.
|
||||
|
||||
0.19:
|
||||
* Use time_t instead of long for timestamps.
|
||||
|
||||
0.18:
|
||||
* Fixed camera movement while the simulation is paused.
|
||||
|
||||
0.17:
|
||||
* Show correct month for CVS logs.
|
||||
* Added time scaling (Bitshifter).
|
||||
|
||||
0.16:
|
||||
* Added --hide-dirnames option.
|
||||
* Added --user-scale option.
|
||||
* Added --date-format option (Pat Notz).
|
||||
* Fix bug when encountering long log lines.
|
||||
* Fixed incorrect parsing of trivial merges.
|
||||
* Fixed building issues on OSX.
|
||||
|
||||
0.15:
|
||||
* Added PPM output support for creating videos (Johannes Schindelin).
|
||||
* Added experimental Apache combined access log support (--log-format apache).
|
||||
* Added --stop-position and --stop-on-idle options (useful for making videos).
|
||||
* Added --max-file-lag option to limit how long after a commit file changes can take to appear.
|
||||
* Added --no-renames to the git log command as they don't display correctly.
|
||||
* Added --max-user-speed and --user-friction as options.
|
||||
* Now builds on OSX Leopard (with the required libaries installed).
|
||||
* Caught raw exception from replace_invalid().
|
||||
* Added CXXFLAGS. You may want to override the default (eg CXXFLAGS=-O3 ./configure).
|
||||
|
||||
0.14:
|
||||
* Updated SVN instructions.
|
||||
|
||||
0.13:
|
||||
* Removed single quotes from log command (fixes running gource --git-log-command in back ticks)
|
||||
* Added SVN instructions.
|
||||
* Fixed manpage hyphens.
|
||||
|
||||
0.12:
|
||||
* Added --enable-ttf-font-dir=DIR option to configure (to specify the ttf-freefont directory).
|
||||
* UTF-8 support using UTF8-CPP (http://utfcpp.sourceforge.net/).
|
||||
* Changed the git log command (see --git-log-command) to require less work to parse.
|
||||
Log files generated with the previous git-log command used by gource should continue to work.
|
||||
* Allow --seconds-per-day value less than 1.0.
|
||||
* Added --git-branch command.
|
||||
* Added --loop command.
|
||||
* Added --crop command.
|
||||
|
||||
0.11:
|
||||
* Made N key skip to next entry.
|
||||
* Documented --user-image-dir flag.
|
||||
* temp file name now uses uid instead of time
|
||||
|
||||
0.1:
|
||||
* First release.
|
||||
469
gource/README.txt
Normal file
469
gource/README.txt
Normal file
@@ -0,0 +1,469 @@
|
||||
|
||||
Gource
|
||||
|
||||
software version control visualization
|
||||
|
||||
Copyright (C) 2009 Andrew Caudwell
|
||||
|
||||
http://gource.io
|
||||
|
||||
Contents
|
||||
========
|
||||
|
||||
1. Description
|
||||
2. Requirements
|
||||
3. Using Gource
|
||||
4. Copyright
|
||||
|
||||
1. Description
|
||||
==============
|
||||
|
||||
OpenGL-based 3D visualisation tool for source control repositories.
|
||||
|
||||
The repository is displayed as a tree where the root of the repository is the
|
||||
centre, directories are branches and files are leaves. Contributors to the
|
||||
source code appear and disappear as they contribute to specific files and
|
||||
directories.
|
||||
|
||||
2. Requirements
|
||||
===============
|
||||
|
||||
Gource's display is rendered using OpenGL and requires a 3D accelerated video
|
||||
card to run.
|
||||
|
||||
3. Using Gource
|
||||
===============
|
||||
|
||||
gource [options] [path]
|
||||
|
||||
options:
|
||||
|
||||
-h, --help
|
||||
Help ('-H' for extended help).
|
||||
|
||||
-WIDTHxHEIGHT, --viewport WIDTHxHEIGHT
|
||||
Set the viewport size. If -f is also supplied, will attempt to set
|
||||
the video mode to this also. Add ! to make the window non-resizable.
|
||||
|
||||
--screen SCREEN
|
||||
Set the number of the screen to display on.
|
||||
|
||||
--window-position XxY
|
||||
Initial window position on your desktop which may be made up of
|
||||
multiple monitors.
|
||||
|
||||
This will override the screen setting so don't specify both.
|
||||
|
||||
--frameless
|
||||
Frameless window.
|
||||
|
||||
-f, --fullscreen
|
||||
Fullscreen.
|
||||
|
||||
-w, --windowed
|
||||
Windowed.
|
||||
|
||||
--transparent
|
||||
Make the background transparent. Only really useful for screenshots.
|
||||
|
||||
--start-date "YYYY-MM-DD hh:mm:ss +tz"
|
||||
Start with the first entry after the supplied date and optional time.
|
||||
|
||||
If a time zone offset isn't specified the local time zone is used.
|
||||
|
||||
Example accepted formats:
|
||||
|
||||
"2012-06-30"
|
||||
"2012-06-30 12:00"
|
||||
"2012-06-30 12:00:00 +12"
|
||||
|
||||
--stop-date "YYYY-MM-DD hh:mm:ss +tz"
|
||||
Stop after the last entry prior to the supplied date and optional time.
|
||||
|
||||
Uses the same format as --start-date.
|
||||
|
||||
-p, --start-position POSITION
|
||||
Begin at some position in the log (between 0.0 and 1.0 or 'random').
|
||||
|
||||
--stop-position POSITION
|
||||
Stop (exit) at some position in the log (does not work with STDIN).
|
||||
|
||||
-t, --stop-at-time SECONDS
|
||||
Stop (exit) after a specified number of seconds.
|
||||
|
||||
--stop-at-end
|
||||
Stop (exit) at the end of the log / stream.
|
||||
|
||||
--loop
|
||||
Loop back to the start of the log when the end is reached.
|
||||
|
||||
--loop-delay-seconds
|
||||
Seconds to delay before looping.
|
||||
|
||||
-a, --auto-skip-seconds SECONDS
|
||||
Skip to next entry if nothing happens for a number of seconds.
|
||||
|
||||
-s, --seconds-per-day SECONDS
|
||||
Speed of simulation in seconds per day.
|
||||
|
||||
--realtime
|
||||
Realtime playback speed.
|
||||
|
||||
--no-time-travel
|
||||
Use the time of the last commit if the time of a commit is in the past.
|
||||
|
||||
-c, --time-scale SCALE
|
||||
Change simulation time scale.
|
||||
|
||||
-i, --file-idle-time SECONDS
|
||||
Time in seconds files remain idle before they are removed or 0
|
||||
for no limit.
|
||||
|
||||
-e, --elasticity FLOAT
|
||||
Elasticity of nodes.
|
||||
|
||||
-b, --background-colour FFFFFF
|
||||
Background colour in hex.
|
||||
|
||||
--background-image IMAGE
|
||||
Set a background image.
|
||||
|
||||
--logo IMAGE
|
||||
Logo to display in the foreground.
|
||||
|
||||
--logo-offset XxY
|
||||
Offset position of the logo.
|
||||
|
||||
--title TITLE
|
||||
Set a title.
|
||||
|
||||
--font-file FILE
|
||||
Specify the font. Should work with most font file formats supported by FreeType, such as TTF and OTF, among others.
|
||||
|
||||
--font-scale SCALE
|
||||
Scale the size of all fonts.
|
||||
|
||||
--font-size SIZE
|
||||
Font size used by the date and title.
|
||||
|
||||
--file-font-size SIZE
|
||||
Font size of filenames.
|
||||
|
||||
--dir-font-size SIZE
|
||||
Font size of directory names
|
||||
|
||||
--user-font-size SIZE
|
||||
Font size of user names.
|
||||
|
||||
--font-colour FFFFFF
|
||||
Font colour used by the date and title in hex.
|
||||
|
||||
--key
|
||||
Show file extension key.
|
||||
|
||||
--date-format FORMAT
|
||||
Specify display date string (strftime format).
|
||||
|
||||
--log-command VCS
|
||||
Show the VCS log command used by gource (git,svn,hg,bzr,cvs2cl).
|
||||
|
||||
--log-format VCS
|
||||
Specify the log format (git,svn,hg,bzr,cvs2cl,custom).
|
||||
|
||||
Required when reading from STDIN.
|
||||
|
||||
--git-branch
|
||||
Get the git log of a branch other than the current one.
|
||||
|
||||
--follow-user USER
|
||||
Have the camera automatically follow a particular user.
|
||||
|
||||
--highlight-dirs
|
||||
Highlight the names of all directories.
|
||||
|
||||
--highlight-user USER
|
||||
Highlight the names of a particular user.
|
||||
|
||||
--highlight-users
|
||||
Highlight the names of all users.
|
||||
|
||||
--highlight-colour FFFFFF
|
||||
Font colour for highlighted users in hex.
|
||||
|
||||
--selection-colour FFFFFF
|
||||
Font colour for selected users and files.
|
||||
|
||||
--filename-colour FFFFFF
|
||||
Font colour for filenames.
|
||||
|
||||
--dir-colour FFFFFF
|
||||
Font colour for directories.
|
||||
|
||||
--dir-name-depth DEPTH
|
||||
Draw names of directories down to a specific depth in the tree.
|
||||
|
||||
--dir-name-position FLOAT
|
||||
Position along edge of the directory name
|
||||
(between 0.1 and 1.0, default is 0.5).
|
||||
|
||||
--filename-time SECONDS
|
||||
Duration to keep filenames on screen (>= 2.0).
|
||||
|
||||
--file-extensions
|
||||
Show filename extensions only.
|
||||
|
||||
--file-extension-fallback
|
||||
Use filename as extension if the extension is missing or empty.
|
||||
|
||||
--file-filter REGEX
|
||||
Filter out file paths matching the specified regular expression.
|
||||
|
||||
--file-show-filter REGEX
|
||||
Show only file paths matching the specified regular expression.
|
||||
|
||||
--user-filter REGEX
|
||||
Filter usernames matching the specified regular expression.
|
||||
|
||||
--user-show-filter REGEX
|
||||
Show only usernames matching the specified regular expression.
|
||||
|
||||
--user-image-dir DIRECTORY
|
||||
Directory containing .jpg or .png images of users
|
||||
(eg "Full Name.png") to use as avatars.
|
||||
|
||||
--default-user-image IMAGE
|
||||
Path of .jpg or .png to use as the default user image.
|
||||
|
||||
--colour-images
|
||||
Colourize user images.
|
||||
|
||||
--crop AXIS
|
||||
Crop view on an axis (vertical,horizontal).
|
||||
|
||||
--padding FLOAT
|
||||
Camera view padding.
|
||||
|
||||
--multi-sampling
|
||||
Enable multi-sampling.
|
||||
|
||||
--no-vsync
|
||||
Disable vsync.
|
||||
|
||||
--bloom-multiplier FLOAT
|
||||
Adjust the amount of bloom.
|
||||
|
||||
--bloom-intensity FLOAT
|
||||
Adjust the intensity of the bloom.
|
||||
|
||||
--max-files NUMBER
|
||||
Set the maximum number of files or 0 for no limit.
|
||||
|
||||
Excess files will be discarded.
|
||||
|
||||
--max-file-lag SECONDS
|
||||
Max time files of a commit can take to appear.
|
||||
|
||||
Use -1 for no limit.
|
||||
|
||||
--max-user-speed UNITS
|
||||
Max speed users can travel per second.
|
||||
|
||||
--user-friction SECONDS
|
||||
Time users take to come to a halt.
|
||||
|
||||
--user-scale SCALE
|
||||
Change scale of user avatars.
|
||||
|
||||
--camera-mode MODE
|
||||
Camera mode (overview,track).
|
||||
|
||||
--disable-auto-rotate
|
||||
Disable automatic camera rotation.
|
||||
|
||||
--disable-input
|
||||
Disable keyboard and mouse input.
|
||||
|
||||
--hide DISPLAY_ELEMENT
|
||||
Hide one or more display elements from the list below:
|
||||
|
||||
bloom - bloom effect
|
||||
date - current date
|
||||
dirnames - names of directories
|
||||
files - file icons
|
||||
filenames - names of files
|
||||
mouse - mouse cursor
|
||||
progress - progress bar widget
|
||||
root - root directory of tree
|
||||
tree - animated tree structure
|
||||
users - user avatars
|
||||
usernames - names of users
|
||||
|
||||
Separate multiple elements with commas (eg "mouse,progress")
|
||||
|
||||
--hash-seed SEED
|
||||
Change the seed of hash function.
|
||||
|
||||
--caption-file FILE
|
||||
Caption file (see Caption Log Format).
|
||||
|
||||
--caption-size SIZE
|
||||
Caption size.
|
||||
|
||||
--caption-colour FFFFFF
|
||||
Caption colour in hex.
|
||||
|
||||
--caption-duration SECONDS
|
||||
Caption duration.
|
||||
|
||||
--caption-offset X
|
||||
Caption horizontal offset (0 to centre captions).
|
||||
|
||||
-o, --output-ppm-stream FILE
|
||||
Output a PPM image stream to a file ('-' for STDOUT).
|
||||
|
||||
This will automatically hide the progress bar initially and
|
||||
enable 'stop-at-end' unless other behaviour is specified.
|
||||
|
||||
-r, --output-framerate FPS
|
||||
Framerate of output (25,30,60). Used with --output-ppm-stream.
|
||||
|
||||
--output-custom-log FILE
|
||||
Output a custom format log file ('-' for STDOUT).
|
||||
|
||||
--load-config CONFIG_FILE
|
||||
Load a gource conf file.
|
||||
|
||||
--save-config CONFIG_FILE
|
||||
Save a gource conf file with the current options.
|
||||
|
||||
--path PATH
|
||||
|
||||
path Either a supported version control directory, a pre-generated log
|
||||
file (see log commands or the custom log format), a Gource conf
|
||||
file or '-' to read STDIN.
|
||||
|
||||
If path is omitted, gource will attempt to read a log from the
|
||||
current directory.
|
||||
|
||||
Git, Bazaar, Mercurial and SVN Examples:
|
||||
|
||||
View the log of the repository in the current path:
|
||||
|
||||
gource
|
||||
|
||||
View the log of a project in the specified directory:
|
||||
|
||||
gource my-project-dir
|
||||
|
||||
For large projects, generating a log of the project history may take a long
|
||||
time. For centralized VCS like SVN, generating the log may also put load on
|
||||
the central VCS server.
|
||||
|
||||
In these cases, you may like to save a copy of the log for later use.
|
||||
|
||||
You can generate a log in the VCS specific log format using
|
||||
the --log-command VCS option:
|
||||
|
||||
cd my-svn-project
|
||||
`gource --log-command svn` > my-svn-project.log
|
||||
gource my-svn-project.log
|
||||
|
||||
You can also have Gource write a copy of the log file in its own format:
|
||||
|
||||
gource --output-custom-log my-project-custom.log
|
||||
|
||||
CVS Support:
|
||||
|
||||
Use 'cvs2cl' to generate the log and then pass it to Gource:
|
||||
|
||||
cvs2cl --chrono --stdout --xml -g-q > my-cvs-project.log
|
||||
gource my-cvs-project.log
|
||||
|
||||
Custom Log Format:
|
||||
|
||||
If you want to use Gource with something other than the supported systems,
|
||||
there is a pipe ('|') delimited custom log format:
|
||||
|
||||
timestamp - A unix timestamp of when the update occured.
|
||||
username - The name of the user who made the update.
|
||||
type - initial for the update type - (A)dded, (M)odified or (D)eleted.
|
||||
file - Path of the file updated.
|
||||
colour - A colour for the file in hex (FFFFFF) format. Optional.
|
||||
|
||||
Caption Log Format:
|
||||
|
||||
Gource can display captions along the timeline by specifying a caption file
|
||||
(using --caption-file) in the pipe ('|') delimited format below:
|
||||
|
||||
timestamp - A unix timestamp of when to display the caption.
|
||||
caption - The caption
|
||||
|
||||
Recording Videos:
|
||||
|
||||
See the guide on the homepage for examples of recording videos with Gource:
|
||||
|
||||
https://github.com/acaudwell/Gource/wiki/Videos
|
||||
|
||||
More Information:
|
||||
|
||||
Visit the Gource homepage for guides and examples of using Gource with various
|
||||
version control systems:
|
||||
|
||||
http://gource.io
|
||||
|
||||
Interface:
|
||||
|
||||
The time shown in the top left of the screen is set initially from the first
|
||||
log entry read and is incremented according to the simulation speed
|
||||
(--seconds-per-day).
|
||||
|
||||
Pressing SPACE at any time will pause/resume the simulation. While paused you
|
||||
may use the mouse to inspect the detail of individual files and users.
|
||||
|
||||
TAB cycles through selecting the current visible users.
|
||||
|
||||
The camera mode, either tracking activity or showing the entire code tree, can
|
||||
be toggled using the Middle mouse button.
|
||||
|
||||
You can drag the left mouse button to manually control the camera. The right
|
||||
mouse button rotates the view.
|
||||
|
||||
Interactive keyboard commands:
|
||||
|
||||
(V) Toggle camera mode
|
||||
(C) Displays Gource logo
|
||||
(K) Toggle file extension key
|
||||
(M) Toggle mouse visibility
|
||||
(N) Jump forward in time to next log entry
|
||||
(S) Randomize colours
|
||||
(D) Toggle directory name display mode
|
||||
(F) Toggle file name display mode
|
||||
(U) Toggle user name display mode
|
||||
(G) Toggle display of users
|
||||
(T) Toggle display of directory tree edges
|
||||
(R) Toggle display of root directory edges
|
||||
(+-) Adjust simulation speed
|
||||
(<>) Adjust time scale
|
||||
(TAB) Cycle through visible users
|
||||
(F12) Screenshot
|
||||
(Alt+Enter) Fullscreen toggle
|
||||
(ESC) Quit
|
||||
|
||||
4. Copyright
|
||||
============
|
||||
|
||||
Gource - software version control visualization
|
||||
Copyright (C) 2009 Andrew Caudwell <acaudwell@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
BIN
gource/SDL2.dll
Normal file
BIN
gource/SDL2.dll
Normal file
Binary file not shown.
BIN
gource/SDL2_image.dll
Normal file
BIN
gource/SDL2_image.dll
Normal file
Binary file not shown.
1
gource/THANKS.txt
Normal file
1
gource/THANKS.txt
Normal file
@@ -0,0 +1 @@
|
||||
Cheers to everyone at Catalyst IT for their support and encouragement.
|
||||
3
gource/cmd/gource
Normal file
3
gource/cmd/gource
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
GOURCE_CMD_DIR=`dirname "$0"`
|
||||
"$GOURCE_CMD_DIR/../gource.exe" "$@"
|
||||
2
gource/cmd/gource.cmd
Normal file
2
gource/cmd/gource.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
"%~dp0\..\gource.exe" %*
|
||||
BIN
gource/data/beam.png
Normal file
BIN
gource/data/beam.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 358 B |
BIN
gource/data/bloom.tga
Normal file
BIN
gource/data/bloom.tga
Normal file
Binary file not shown.
BIN
gource/data/bloom_alpha.tga
Normal file
BIN
gource/data/bloom_alpha.tga
Normal file
Binary file not shown.
BIN
gource/data/file.png
Normal file
BIN
gource/data/file.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
BIN
gource/data/fonts/FreeSans.ttf
Normal file
BIN
gource/data/fonts/FreeSans.ttf
Normal file
Binary file not shown.
108
gource/data/fonts/README.txt
Normal file
108
gource/data/fonts/README.txt
Normal file
@@ -0,0 +1,108 @@
|
||||
-*-text-*-
|
||||
GNU FreeFont
|
||||
|
||||
The GNU FreeFont project aims to provide a useful set of free scalable
|
||||
(i.e., OpenType) fonts covering as much as possible of the ISO 10646/Unicode
|
||||
UCS (Universal Character Set).
|
||||
|
||||
Statement of Purpose
|
||||
--------------------
|
||||
|
||||
The practical reason for putting glyphs together in a single font face is
|
||||
to conveniently mix symbols and characters from different writing systems,
|
||||
without having to switch fonts.
|
||||
|
||||
Coverage
|
||||
--------
|
||||
|
||||
FreeFont covers the following character sets
|
||||
|
||||
* ISO 8859 parts 1-15
|
||||
* CEN MES-3 European Unicode Subset
|
||||
http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
|
||||
* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
|
||||
* Microsoft/Adobe Windows Glyph List 4 (WGL4)
|
||||
http://www.microsoft.com/typography/otspec/WGL4.htm
|
||||
* KOI8-R and KOI8-RU
|
||||
* DEC VT100 graphics symbols
|
||||
* International Phonetic Alphabet
|
||||
* Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets,
|
||||
including Arabic presentation forms A/B
|
||||
* mathematical symbols, including the whole TeX repertoire of symbols
|
||||
* APL symbols
|
||||
etc.
|
||||
|
||||
Editing
|
||||
-------
|
||||
|
||||
The free outline font editor, George Williams's FontForge
|
||||
<http://fontforge.sourceforge.net/> is used for editing the fonts.
|
||||
|
||||
Design Issues
|
||||
-------------
|
||||
|
||||
Which font shapes should be made? Historical style terms like Renaissance
|
||||
or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek
|
||||
scripts to any greater extent than Kufi or Nashki can be applied beyond
|
||||
Arabic script; "italic" is really only meaningful for Latin letters.
|
||||
|
||||
However, most modern writing systems have typographic formulations for
|
||||
contrasting uniform and modulated character stroke widths, and have some
|
||||
history with "oblique", faces. Since the advent of the typewriter, most
|
||||
have developed a typographic style with uniform-width characters.
|
||||
|
||||
Accordingly, the FreeFont family has one monospaced - FreeMono - and two
|
||||
proportional faces (one with uniform stroke - FreeSans - and one with
|
||||
modulated stroke - FreeSerif).
|
||||
|
||||
To make text from different writing systems look good side-by-side, each
|
||||
FreeFont face is meant to contain characters of similar style and weight.
|
||||
|
||||
Licensing
|
||||
---------
|
||||
|
||||
Free UCS scalable fonts is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as published
|
||||
by the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
The fonts are distributed in the hope that they will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
As a special exception, if you create a document which uses this font, and
|
||||
embed this font or unaltered portions of this font into the document, this
|
||||
font does not by itself cause the resulting document to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate any
|
||||
other reasons why the document might be covered by the GNU General Public
|
||||
License. If you modify this font, you may extend this exception to your
|
||||
version of the font, but you are not obligated to do so. If you do not
|
||||
wish to do so, delete this exception statement from your version.
|
||||
|
||||
|
||||
Files and their suffixes
|
||||
------------------------
|
||||
|
||||
The files with .sfd (Spline Font Database) are in FontForge's native format.
|
||||
Please use these if you plan to modify the font files.
|
||||
|
||||
TrueType fonts for immediate consumption are the files with the .ttf
|
||||
(TrueType Font) suffix. These are ready to use in Xwindows based
|
||||
systems using FreeType, on Mac OS, and on older Windows systems.
|
||||
|
||||
OpenType fonts (with suffix .otf) are for use in Windows Vista.
|
||||
Note that although they can be installed on Linux, but many applications
|
||||
in Linux still don't support them.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
|
||||
Steve White <stevan.white@googlemail.com>
|
||||
|
||||
Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
|
||||
$Id: README,v 1.7 2009/01/13 08:43:23 Stevan_White Exp $
|
||||
5
gource/data/gource.style
Normal file
5
gource/data/gource.style
Normal file
@@ -0,0 +1,5 @@
|
||||
changeset = '{file_adds}{file_copies}{file_mods}{file_dels}'
|
||||
file_mod = "{date|hgdate}|{author|person}|M|{file_mod}\n"
|
||||
file_add = "{date|hgdate}|{author|person}|A|{file_add}\n"
|
||||
file_del = "{date|hgdate}|{author|person}|D|{file_del}\n"
|
||||
file_copy = "{date|hgdate}|{author|person}|A|{name}\n"
|
||||
16
gource/data/shaders/bloom.frag
Normal file
16
gource/data/shaders/bloom.frag
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
varying vec3 pos;
|
||||
|
||||
void main()
|
||||
{
|
||||
float r = fract(sin(dot(pos.xy ,vec2(11.3713,67.3219))) * 2351.3718);
|
||||
|
||||
float offset = (0.5 - r) * gl_TexCoord[0].x * 0.045;
|
||||
|
||||
float intensity = min(1.0, cos((length(pos*2.0)+offset)/gl_TexCoord[0].x));
|
||||
float gradient = intensity * smoothstep(0.0, 2.0, intensity);
|
||||
|
||||
gradient *= smoothstep(1.0,0.67+r*0.33, 1.0-intensity);
|
||||
|
||||
gl_FragColor = gl_Color * gradient;
|
||||
}
|
||||
10
gource/data/shaders/bloom.vert
Normal file
10
gource/data/shaders/bloom.vert
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
varying vec3 pos;
|
||||
|
||||
void main()
|
||||
{
|
||||
pos = gl_Vertex.xyz - gl_MultiTexCoord0.yzw;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_Position = ftransform();
|
||||
}
|
||||
9
gource/data/shaders/shadow.frag
Normal file
9
gource/data/shaders/shadow.frag
Normal file
@@ -0,0 +1,9 @@
|
||||
uniform sampler2D tex;
|
||||
uniform float shadow_strength;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 colour = texture2D(tex,gl_TexCoord[0].st);
|
||||
|
||||
gl_FragColor = vec4(0.0, 0.0, 0.0, gl_Color.w * colour.w * shadow_strength);
|
||||
}
|
||||
6
gource/data/shaders/shadow.vert
Normal file
6
gource/data/shaders/shadow.vert
Normal file
@@ -0,0 +1,6 @@
|
||||
void main(void)
|
||||
{
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_Position = ftransform();
|
||||
}
|
||||
15
gource/data/shaders/text.frag
Normal file
15
gource/data/shaders/text.frag
Normal file
@@ -0,0 +1,15 @@
|
||||
uniform sampler2D tex;
|
||||
uniform float shadow_strength;
|
||||
uniform float texel_size;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float colour_alpha = texture2D(tex,gl_TexCoord[0].xy).w;
|
||||
float shadow_alpha = texture2D(tex,gl_TexCoord[0].xy - vec2(texel_size)).w * shadow_strength;
|
||||
|
||||
float combined_alpha = 1.0 - (1.0-shadow_alpha)*(1.0-colour_alpha);
|
||||
|
||||
if(combined_alpha > 0.0) colour_alpha /= combined_alpha;
|
||||
|
||||
gl_FragColor = gl_Color * vec4(vec3(colour_alpha), combined_alpha);
|
||||
}
|
||||
6
gource/data/shaders/text.vert
Normal file
6
gource/data/shaders/text.vert
Normal file
@@ -0,0 +1,6 @@
|
||||
void main(void)
|
||||
{
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_Position = ftransform();
|
||||
}
|
||||
BIN
gource/data/user.png
Normal file
BIN
gource/data/user.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
BIN
gource/glew32.dll
Normal file
BIN
gource/glew32.dll
Normal file
Binary file not shown.
BIN
gource/gource.exe
Normal file
BIN
gource/gource.exe
Normal file
Binary file not shown.
BIN
gource/libboost_filesystem-mt.dll
Normal file
BIN
gource/libboost_filesystem-mt.dll
Normal file
Binary file not shown.
BIN
gource/libbz2-1.dll
Normal file
BIN
gource/libbz2-1.dll
Normal file
Binary file not shown.
BIN
gource/libfreetype-6.dll
Normal file
BIN
gource/libfreetype-6.dll
Normal file
Binary file not shown.
BIN
gource/libgcc_s_seh-1.dll
Normal file
BIN
gource/libgcc_s_seh-1.dll
Normal file
Binary file not shown.
BIN
gource/libglib-2.0-0.dll
Normal file
BIN
gource/libglib-2.0-0.dll
Normal file
Binary file not shown.
BIN
gource/libgraphite2.dll
Normal file
BIN
gource/libgraphite2.dll
Normal file
Binary file not shown.
BIN
gource/libharfbuzz-0.dll
Normal file
BIN
gource/libharfbuzz-0.dll
Normal file
Binary file not shown.
BIN
gource/libiconv-2.dll
Normal file
BIN
gource/libiconv-2.dll
Normal file
Binary file not shown.
BIN
gource/libintl-8.dll
Normal file
BIN
gource/libintl-8.dll
Normal file
Binary file not shown.
BIN
gource/libjpeg-8.dll
Normal file
BIN
gource/libjpeg-8.dll
Normal file
Binary file not shown.
BIN
gource/liblzma-5.dll
Normal file
BIN
gource/liblzma-5.dll
Normal file
Binary file not shown.
BIN
gource/libpcre-1.dll
Normal file
BIN
gource/libpcre-1.dll
Normal file
Binary file not shown.
BIN
gource/libpng16-16.dll
Normal file
BIN
gource/libpng16-16.dll
Normal file
Binary file not shown.
BIN
gource/libstdc++-6.dll
Normal file
BIN
gource/libstdc++-6.dll
Normal file
Binary file not shown.
BIN
gource/libtiff-5.dll
Normal file
BIN
gource/libtiff-5.dll
Normal file
Binary file not shown.
BIN
gource/libwebp-7.dll
Normal file
BIN
gource/libwebp-7.dll
Normal file
Binary file not shown.
BIN
gource/libwinpthread-1.dll
Normal file
BIN
gource/libwinpthread-1.dll
Normal file
Binary file not shown.
BIN
gource/libzstd.dll
Normal file
BIN
gource/libzstd.dll
Normal file
Binary file not shown.
BIN
gource/zlib1.dll
Normal file
BIN
gource/zlib1.dll
Normal file
Binary file not shown.
201
json/HTTP.java
Normal file
201
json/HTTP.java
Normal file
@@ -0,0 +1,201 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
91
json/HTTPTokener.java
Normal file
91
json/HTTPTokener.java
Normal file
@@ -0,0 +1,91 @@
|
||||
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
json/JSONArray.java
Normal file
1252
json/JSONArray.java
Normal file
File diff suppressed because it is too large
Load Diff
50
json/JSONException.java
Normal file
50
json/JSONException.java
Normal file
@@ -0,0 +1,50 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
555
json/JSONML.java
Normal file
555
json/JSONML.java
Normal file
@@ -0,0 +1,555 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
2072
json/JSONObject.java
Normal file
2072
json/JSONObject.java
Normal file
File diff suppressed because it is too large
Load Diff
21
json/JSONString.java
Normal file
21
json/JSONString.java
Normal file
@@ -0,0 +1,21 @@
|
||||
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();
|
||||
}
|
||||
86
json/JSONStringer.java
Normal file
86
json/JSONStringer.java
Normal file
@@ -0,0 +1,86 @@
|
||||
package ninja.bytecode.shuriken.json;
|
||||
|
||||
|
||||
/*
|
||||
Copyright (c) 2006 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.io.StringWriter;
|
||||
|
||||
/**
|
||||
* JSONStringer provides a quick and convenient way of producing JSON text. The
|
||||
* texts produced strictly conform to JSON syntax rules. No whitespace is added,
|
||||
* so the results are ready for transmission or storage. Each instance of
|
||||
* JSONStringer can produce one JSON text.
|
||||
* <p>
|
||||
* A JSONStringer instance provides a <code>value</code> method for appending
|
||||
* values to the text, and a <code>key</code> method for adding keys before
|
||||
* values in objects. There are <code>array</code> and <code>endArray</code>
|
||||
* methods that make and bound array values, and <code>object</code> and
|
||||
* <code>endObject</code> methods which make and bound object values. All of
|
||||
* these methods return the JSONWriter instance, permitting cascade style. For
|
||||
* example,
|
||||
*
|
||||
* <pre>
|
||||
* myString = new JSONStringer().object().key("JSON").value("Hello, World!").endObject().toString();
|
||||
* </pre>
|
||||
*
|
||||
* which produces the string
|
||||
*
|
||||
* <pre>
|
||||
* {"JSON":"Hello, World!"}
|
||||
* </pre>
|
||||
* <p>
|
||||
* The first method called must be <code>array</code> or <code>object</code>.
|
||||
* There are no methods for adding commas or colons. JSONStringer adds them for
|
||||
* you. Objects and arrays can be nested up to 20 levels deep.
|
||||
* <p>
|
||||
* This can sometimes be easier than using a JSONObject to build a string.
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2008-09-18
|
||||
*/
|
||||
public class JSONStringer extends JSONWriter
|
||||
{
|
||||
/**
|
||||
* Make a fresh JSONStringer. It can be used to build one JSON text.
|
||||
*/
|
||||
public JSONStringer()
|
||||
{
|
||||
super(new StringWriter());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the JSON text. This method is used to obtain the product of the
|
||||
* JSONStringer instance. It will return <code>null</code> if there was a
|
||||
* problem in the construction of the JSON text (such as the calls to
|
||||
* <code>array</code> were not properly balanced with calls to
|
||||
* <code>endArray</code>).
|
||||
*
|
||||
* @return The JSON text.
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return this.mode == 'd' ? this.writer.toString() : null;
|
||||
}
|
||||
}
|
||||
504
json/JSONTokener.java
Normal file
504
json/JSONTokener.java
Normal file
@@ -0,0 +1,504 @@
|
||||
package ninja.bytecode.shuriken.json;
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A JSONTokener takes a source string and extracts characters and tokens from
|
||||
* it. It is used by the JSONObject and JSONArray constructors to parse JSON
|
||||
* source strings.
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2014-05-03
|
||||
*/
|
||||
public class JSONTokener
|
||||
{
|
||||
|
||||
private long character;
|
||||
private boolean eof;
|
||||
private long index;
|
||||
private long line;
|
||||
private char previous;
|
||||
private Reader reader;
|
||||
private boolean usePrevious;
|
||||
|
||||
/**
|
||||
* Construct a JSONTokener from a Reader.
|
||||
*
|
||||
* @param reader
|
||||
* A reader.
|
||||
*/
|
||||
public JSONTokener(Reader reader)
|
||||
{
|
||||
this.reader = reader.markSupported() ? reader : new BufferedReader(reader);
|
||||
this.eof = false;
|
||||
this.usePrevious = false;
|
||||
this.previous = 0;
|
||||
this.index = 0;
|
||||
this.character = 1;
|
||||
this.line = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONTokener from an InputStream.
|
||||
*
|
||||
* @param inputStream
|
||||
* The source.
|
||||
*/
|
||||
public JSONTokener(InputStream inputStream) throws JSONException
|
||||
{
|
||||
this(new InputStreamReader(inputStream));
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONTokener from a string.
|
||||
*
|
||||
* @param s
|
||||
* A source string.
|
||||
*/
|
||||
public JSONTokener(String s)
|
||||
{
|
||||
this(new StringReader(s));
|
||||
}
|
||||
|
||||
/**
|
||||
* Back up one character. This provides a sort of lookahead capability, so
|
||||
* that you can test for a digit or letter before attempting to parse the
|
||||
* next number or identifier.
|
||||
*/
|
||||
public void back() throws JSONException
|
||||
{
|
||||
if(this.usePrevious || this.index <= 0)
|
||||
{
|
||||
throw new JSONException("Stepping back two steps is not supported");
|
||||
}
|
||||
this.index -= 1;
|
||||
this.character -= 1;
|
||||
this.usePrevious = true;
|
||||
this.eof = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the hex value of a character (base16).
|
||||
*
|
||||
* @param c
|
||||
* A character between '0' and '9' or between 'A' and 'F' or
|
||||
* between 'a' and 'f'.
|
||||
* @return An int between 0 and 15, or -1 if c was not a hex digit.
|
||||
*/
|
||||
public static int dehexchar(char c)
|
||||
{
|
||||
if(c >= '0' && c <= '9')
|
||||
{
|
||||
return c - '0';
|
||||
}
|
||||
if(c >= 'A' && c <= 'F')
|
||||
{
|
||||
return c - ('A' - 10);
|
||||
}
|
||||
if(c >= 'a' && c <= 'f')
|
||||
{
|
||||
return c - ('a' - 10);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean end()
|
||||
{
|
||||
return this.eof && !this.usePrevious;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the source string still contains characters that next() can
|
||||
* consume.
|
||||
*
|
||||
* @return true if not yet at the end of the source.
|
||||
*/
|
||||
public boolean more() throws JSONException
|
||||
{
|
||||
this.next();
|
||||
if(this.end())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.back();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next character in the source string.
|
||||
*
|
||||
* @return The next character, or 0 if past the end of the source string.
|
||||
*/
|
||||
public char next() throws JSONException
|
||||
{
|
||||
int c;
|
||||
if(this.usePrevious)
|
||||
{
|
||||
this.usePrevious = false;
|
||||
c = this.previous;
|
||||
} else
|
||||
{
|
||||
try
|
||||
{
|
||||
c = this.reader.read();
|
||||
} catch(IOException exception)
|
||||
{
|
||||
throw new JSONException(exception);
|
||||
}
|
||||
|
||||
if(c <= 0)
|
||||
{ // End of stream
|
||||
this.eof = true;
|
||||
c = 0;
|
||||
}
|
||||
}
|
||||
this.index += 1;
|
||||
if(this.previous == '\r')
|
||||
{
|
||||
this.line += 1;
|
||||
this.character = c == '\n' ? 0 : 1;
|
||||
} else if(c == '\n')
|
||||
{
|
||||
this.line += 1;
|
||||
this.character = 0;
|
||||
} else
|
||||
{
|
||||
this.character += 1;
|
||||
}
|
||||
this.previous = (char) c;
|
||||
return this.previous;
|
||||
}
|
||||
|
||||
/**
|
||||
* Consume the next character, and check that it matches a specified
|
||||
* character.
|
||||
*
|
||||
* @param c
|
||||
* The character to match.
|
||||
* @return The character.
|
||||
* @throws JSONException
|
||||
* if the character does not match.
|
||||
*/
|
||||
public char next(char c) throws JSONException
|
||||
{
|
||||
char n = this.next();
|
||||
if(n != c)
|
||||
{
|
||||
throw this.syntaxError("Expected '" + c + "' and instead saw '" + n + "'");
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next n characters.
|
||||
*
|
||||
* @param n
|
||||
* The number of characters to take.
|
||||
* @return A string of n characters.
|
||||
* @throws JSONException
|
||||
* Substring bounds error if there are not n characters
|
||||
* remaining in the source string.
|
||||
*/
|
||||
public String next(int n) throws JSONException
|
||||
{
|
||||
if(n == 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
char[] chars = new char[n];
|
||||
int pos = 0;
|
||||
|
||||
while(pos < n)
|
||||
{
|
||||
chars[pos] = this.next();
|
||||
if(this.end())
|
||||
{
|
||||
throw this.syntaxError("Substring bounds error");
|
||||
}
|
||||
pos += 1;
|
||||
}
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next char in the string, skipping whitespace.
|
||||
*
|
||||
* @throws JSONException
|
||||
* @return A character, or 0 if there are no more characters.
|
||||
*/
|
||||
public char nextClean() throws JSONException
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
char c = this.next();
|
||||
if(c == 0 || c > ' ')
|
||||
{
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the characters up to the next close quote character. Backslash
|
||||
* processing is done. The formal JSON format does not allow strings in
|
||||
* single quotes, but an implementation is allowed to accept them.
|
||||
*
|
||||
* @param quote
|
||||
* The quoting character, either <code>"</code>
|
||||
* <small>(double quote)</small> or <code>'</code>
|
||||
* <small>(single quote)</small>.
|
||||
* @return A String.
|
||||
* @throws JSONException
|
||||
* Unterminated string.
|
||||
*/
|
||||
public String nextString(char quote) throws JSONException
|
||||
{
|
||||
char c;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
c = this.next();
|
||||
switch(c)
|
||||
{
|
||||
case 0:
|
||||
case '\n':
|
||||
case '\r':
|
||||
throw this.syntaxError("Unterminated string");
|
||||
case '\\':
|
||||
c = this.next();
|
||||
switch(c)
|
||||
{
|
||||
case 'b':
|
||||
sb.append('\b');
|
||||
break;
|
||||
case 't':
|
||||
sb.append('\t');
|
||||
break;
|
||||
case 'n':
|
||||
sb.append('\n');
|
||||
break;
|
||||
case 'f':
|
||||
sb.append('\f');
|
||||
break;
|
||||
case 'r':
|
||||
sb.append('\r');
|
||||
break;
|
||||
case 'u':
|
||||
sb.append((char) Integer.parseInt(this.next(4), 16));
|
||||
break;
|
||||
case '"':
|
||||
case '\'':
|
||||
case '\\':
|
||||
case '/':
|
||||
sb.append(c);
|
||||
break;
|
||||
default:
|
||||
throw this.syntaxError("Illegal escape.");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(c == quote)
|
||||
{
|
||||
return sb.toString();
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text up but not including the specified character or the end of
|
||||
* line, whichever comes first.
|
||||
*
|
||||
* @param delimiter
|
||||
* A delimiter character.
|
||||
* @return A string.
|
||||
*/
|
||||
public String nextTo(char delimiter) throws JSONException
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
char c = this.next();
|
||||
if(c == delimiter || c == 0 || c == '\n' || c == '\r')
|
||||
{
|
||||
if(c != 0)
|
||||
{
|
||||
this.back();
|
||||
}
|
||||
return sb.toString().trim();
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text up but not including one of the specified delimiter
|
||||
* characters or the end of line, whichever comes first.
|
||||
*
|
||||
* @param delimiters
|
||||
* A set of delimiter characters.
|
||||
* @return A string, trimmed.
|
||||
*/
|
||||
public String nextTo(String delimiters) throws JSONException
|
||||
{
|
||||
char c;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
c = this.next();
|
||||
if(delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r')
|
||||
{
|
||||
if(c != 0)
|
||||
{
|
||||
this.back();
|
||||
}
|
||||
return sb.toString().trim();
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next value. The value can be a Boolean, Double, Integer,
|
||||
* JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
|
||||
*
|
||||
* @throws JSONException
|
||||
* If syntax error.
|
||||
*
|
||||
* @return An object.
|
||||
*/
|
||||
public Object nextValue() throws JSONException
|
||||
{
|
||||
char c = this.nextClean();
|
||||
String string;
|
||||
|
||||
switch(c)
|
||||
{
|
||||
case '"':
|
||||
case '\'':
|
||||
return this.nextString(c);
|
||||
case '{':
|
||||
this.back();
|
||||
return new JSONObject(this);
|
||||
case '[':
|
||||
this.back();
|
||||
return new JSONArray(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle unquoted text. This could be the values true, false, or null,
|
||||
* or it can be a number. An implementation (such as this one) is
|
||||
* allowed to also accept non-standard forms.
|
||||
*
|
||||
* Accumulate characters until we reach the end of the text or a
|
||||
* formatting character.
|
||||
*/
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while(c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0)
|
||||
{
|
||||
sb.append(c);
|
||||
c = this.next();
|
||||
}
|
||||
this.back();
|
||||
|
||||
string = sb.toString().trim();
|
||||
if("".equals(string))
|
||||
{
|
||||
throw this.syntaxError("Missing value");
|
||||
}
|
||||
return JSONObject.stringToValue(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Skip characters until the next character is the requested character. If
|
||||
* the requested character is not found, no characters are skipped.
|
||||
*
|
||||
* @param to
|
||||
* A character to skip to.
|
||||
* @return The requested character, or zero if the requested character is
|
||||
* not found.
|
||||
*/
|
||||
public char skipTo(char to) throws JSONException
|
||||
{
|
||||
char c;
|
||||
try
|
||||
{
|
||||
long startIndex = this.index;
|
||||
long startCharacter = this.character;
|
||||
long startLine = this.line;
|
||||
this.reader.mark(1000000);
|
||||
do
|
||||
{
|
||||
c = this.next();
|
||||
if(c == 0)
|
||||
{
|
||||
this.reader.reset();
|
||||
this.index = startIndex;
|
||||
this.character = startCharacter;
|
||||
this.line = startLine;
|
||||
return c;
|
||||
}
|
||||
} while(c != to);
|
||||
} catch(IOException exception)
|
||||
{
|
||||
throw new JSONException(exception);
|
||||
}
|
||||
this.back();
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a JSONException to signal a syntax error.
|
||||
*
|
||||
* @param message
|
||||
* The error message.
|
||||
* @return A JSONException object, suitable for throwing
|
||||
*/
|
||||
public JSONException syntaxError(String message)
|
||||
{
|
||||
return new JSONException(message + this.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a printable string of this JSONTokener.
|
||||
*
|
||||
* @return " at {index} [character {character} line {line}]"
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return " at " + this.index + " [character " + this.character + " line " + this.line + "]";
|
||||
}
|
||||
}
|
||||
388
json/JSONWriter.java
Normal file
388
json/JSONWriter.java
Normal file
@@ -0,0 +1,388 @@
|
||||
package ninja.bytecode.shuriken.json;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
/*
|
||||
Copyright (c) 2006 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* JSONWriter provides a quick and convenient way of producing JSON text. The
|
||||
* texts produced strictly conform to JSON syntax rules. No whitespace is added,
|
||||
* so the results are ready for transmission or storage. Each instance of
|
||||
* JSONWriter can produce one JSON text.
|
||||
* <p>
|
||||
* A JSONWriter instance provides a <code>value</code> method for appending
|
||||
* values to the text, and a <code>key</code> method for adding keys before
|
||||
* values in objects. There are <code>array</code> and <code>endArray</code>
|
||||
* methods that make and bound array values, and <code>object</code> and
|
||||
* <code>endObject</code> methods which make and bound object values. All of
|
||||
* these methods return the JSONWriter instance, permitting a cascade style. For
|
||||
* example,
|
||||
*
|
||||
* <pre>
|
||||
* new JSONWriter(myWriter).object().key("JSON").value("Hello, World!").endObject();
|
||||
* </pre>
|
||||
*
|
||||
* which writes
|
||||
*
|
||||
* <pre>
|
||||
* {"JSON":"Hello, World!"}
|
||||
* </pre>
|
||||
* <p>
|
||||
* The first method called must be <code>array</code> or <code>object</code>.
|
||||
* There are no methods for adding commas or colons. JSONWriter adds them for
|
||||
* you. Objects and arrays can be nested up to 20 levels deep.
|
||||
* <p>
|
||||
* This can sometimes be easier than using a JSONObject to build a string.
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2011-11-24
|
||||
*/
|
||||
public class JSONWriter
|
||||
{
|
||||
private static final int maxdepth = 200;
|
||||
|
||||
/**
|
||||
* The comma flag determines if a comma should be output before the next
|
||||
* value.
|
||||
*/
|
||||
private boolean comma;
|
||||
|
||||
/**
|
||||
* The current mode. Values: 'a' (array), 'd' (done), 'i' (initial), 'k'
|
||||
* (key), 'o' (object).
|
||||
*/
|
||||
protected char mode;
|
||||
|
||||
/**
|
||||
* The object/array stack.
|
||||
*/
|
||||
private final JSONObject stack[];
|
||||
|
||||
/**
|
||||
* The stack top index. A value of 0 indicates that the stack is empty.
|
||||
*/
|
||||
private int top;
|
||||
|
||||
/**
|
||||
* The writer that will receive the output.
|
||||
*/
|
||||
protected Writer writer;
|
||||
|
||||
/**
|
||||
* Make a fresh JSONWriter. It can be used to build one JSON text.
|
||||
*/
|
||||
public JSONWriter(Writer w)
|
||||
{
|
||||
this.comma = false;
|
||||
this.mode = 'i';
|
||||
this.stack = new JSONObject[maxdepth];
|
||||
this.top = 0;
|
||||
this.writer = w;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a value.
|
||||
*
|
||||
* @param string
|
||||
* A string value.
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If the value is out of sequence.
|
||||
*/
|
||||
private JSONWriter append(String string) throws JSONException
|
||||
{
|
||||
if(string == null)
|
||||
{
|
||||
throw new JSONException("Null pointer");
|
||||
}
|
||||
if(this.mode == 'o' || this.mode == 'a')
|
||||
{
|
||||
try
|
||||
{
|
||||
if(this.comma && this.mode == 'a')
|
||||
{
|
||||
this.writer.write(',');
|
||||
}
|
||||
this.writer.write(string);
|
||||
} catch(IOException e)
|
||||
{
|
||||
throw new JSONException(e);
|
||||
}
|
||||
if(this.mode == 'o')
|
||||
{
|
||||
this.mode = 'k';
|
||||
}
|
||||
this.comma = true;
|
||||
return this;
|
||||
}
|
||||
throw new JSONException("Value out of sequence.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin appending a new array. All values until the balancing
|
||||
* <code>endArray</code> will be appended to this array. The
|
||||
* <code>endArray</code> method must be called to mark the array's end.
|
||||
*
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If the nesting is too deep, or if the object is started in
|
||||
* the wrong place (for example as a key or after the end of the
|
||||
* outermost array or object).
|
||||
*/
|
||||
public JSONWriter array() throws JSONException
|
||||
{
|
||||
if(this.mode == 'i' || this.mode == 'o' || this.mode == 'a')
|
||||
{
|
||||
this.push(null);
|
||||
this.append("[");
|
||||
this.comma = false;
|
||||
return this;
|
||||
}
|
||||
throw new JSONException("Misplaced array.");
|
||||
}
|
||||
|
||||
/**
|
||||
* End something.
|
||||
*
|
||||
* @param mode
|
||||
* Mode
|
||||
* @param c
|
||||
* Closing character
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If unbalanced.
|
||||
*/
|
||||
private JSONWriter end(char mode, char c) throws JSONException
|
||||
{
|
||||
if(this.mode != mode)
|
||||
{
|
||||
throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject.");
|
||||
}
|
||||
this.pop(mode);
|
||||
try
|
||||
{
|
||||
this.writer.write(c);
|
||||
} catch(IOException e)
|
||||
{
|
||||
throw new JSONException(e);
|
||||
}
|
||||
this.comma = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* End an array. This method most be called to balance calls to
|
||||
* <code>array</code>.
|
||||
*
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If incorrectly nested.
|
||||
*/
|
||||
public JSONWriter endArray() throws JSONException
|
||||
{
|
||||
return this.end('a', ']');
|
||||
}
|
||||
|
||||
/**
|
||||
* End an object. This method most be called to balance calls to
|
||||
* <code>object</code>.
|
||||
*
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If incorrectly nested.
|
||||
*/
|
||||
public JSONWriter endObject() throws JSONException
|
||||
{
|
||||
return this.end('k', '}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a key. The key will be associated with the next value. In an
|
||||
* object, every value must be preceded by a key.
|
||||
*
|
||||
* @param string
|
||||
* A key string.
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If the key is out of place. For example, keys do not belong
|
||||
* in arrays or if the key is null.
|
||||
*/
|
||||
public JSONWriter key(String string) throws JSONException
|
||||
{
|
||||
if(string == null)
|
||||
{
|
||||
throw new JSONException("Null key.");
|
||||
}
|
||||
if(this.mode == 'k')
|
||||
{
|
||||
try
|
||||
{
|
||||
this.stack[this.top - 1].putOnce(string, Boolean.TRUE);
|
||||
if(this.comma)
|
||||
{
|
||||
this.writer.write(',');
|
||||
}
|
||||
this.writer.write(JSONObject.quote(string));
|
||||
this.writer.write(':');
|
||||
this.comma = false;
|
||||
this.mode = 'o';
|
||||
return this;
|
||||
} catch(IOException e)
|
||||
{
|
||||
throw new JSONException(e);
|
||||
}
|
||||
}
|
||||
throw new JSONException("Misplaced key.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin appending a new object. All keys and values until the balancing
|
||||
* <code>endObject</code> will be appended to this object. The
|
||||
* <code>endObject</code> method must be called to mark the object's end.
|
||||
*
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If the nesting is too deep, or if the object is started in
|
||||
* the wrong place (for example as a key or after the end of the
|
||||
* outermost array or object).
|
||||
*/
|
||||
public JSONWriter object() throws JSONException
|
||||
{
|
||||
if(this.mode == 'i')
|
||||
{
|
||||
this.mode = 'o';
|
||||
}
|
||||
if(this.mode == 'o' || this.mode == 'a')
|
||||
{
|
||||
this.append("{");
|
||||
this.push(new JSONObject());
|
||||
this.comma = false;
|
||||
return this;
|
||||
}
|
||||
throw new JSONException("Misplaced object.");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Pop an array or object scope.
|
||||
*
|
||||
* @param c
|
||||
* The scope to close.
|
||||
* @throws JSONException
|
||||
* If nesting is wrong.
|
||||
*/
|
||||
private void pop(char c) throws JSONException
|
||||
{
|
||||
if(this.top <= 0)
|
||||
{
|
||||
throw new JSONException("Nesting error.");
|
||||
}
|
||||
char m = this.stack[this.top - 1] == null ? 'a' : 'k';
|
||||
if(m != c)
|
||||
{
|
||||
throw new JSONException("Nesting error.");
|
||||
}
|
||||
this.top -= 1;
|
||||
this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1] == null ? 'a' : 'k';
|
||||
}
|
||||
|
||||
/**
|
||||
* Push an array or object scope.
|
||||
*
|
||||
* @param jo
|
||||
* The scope to open.
|
||||
* @throws JSONException
|
||||
* If nesting is too deep.
|
||||
*/
|
||||
private void push(JSONObject jo) throws JSONException
|
||||
{
|
||||
if(this.top >= maxdepth)
|
||||
{
|
||||
throw new JSONException("Nesting too deep.");
|
||||
}
|
||||
this.stack[this.top] = jo;
|
||||
this.mode = jo == null ? 'a' : 'k';
|
||||
this.top += 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append either the value <code>true</code> or the value <code>false</code>
|
||||
* .
|
||||
*
|
||||
* @param b
|
||||
* A boolean.
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
*/
|
||||
public JSONWriter value(boolean b) throws JSONException
|
||||
{
|
||||
return this.append(b ? "true" : "false");
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a double value.
|
||||
*
|
||||
* @param d
|
||||
* A double.
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If the number is not finite.
|
||||
*/
|
||||
public JSONWriter value(double d) throws JSONException
|
||||
{
|
||||
return this.value(new Double(d));
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a long value.
|
||||
*
|
||||
* @param l
|
||||
* A long.
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
*/
|
||||
public JSONWriter value(long l) throws JSONException
|
||||
{
|
||||
return this.append(Long.toString(l));
|
||||
}
|
||||
|
||||
/**
|
||||
* Append an object value.
|
||||
*
|
||||
* @param object
|
||||
* The object to append. It can be null, or a Boolean, Number,
|
||||
* String, JSONObject, or JSONArray, or an object that implements
|
||||
* JSONString.
|
||||
* @return this
|
||||
* @throws JSONException
|
||||
* If the value is out of sequence.
|
||||
*/
|
||||
public JSONWriter value(Object object) throws JSONException
|
||||
{
|
||||
return this.append(JSONObject.valueToString(object));
|
||||
}
|
||||
}
|
||||
584
json/XML.java
Normal file
584
json/XML.java
Normal file
@@ -0,0 +1,584 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* This provides static methods to convert an XML text into a JSONObject, and to
|
||||
* covert a JSONObject into an XML text.
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2014-05-03
|
||||
*/
|
||||
public class XML
|
||||
{
|
||||
|
||||
/** The Character '&'. */
|
||||
public static final Character AMP = '&';
|
||||
|
||||
/** The Character '''. */
|
||||
public static final Character APOS = '\'';
|
||||
|
||||
/** The Character '!'. */
|
||||
public static final Character BANG = '!';
|
||||
|
||||
/** The Character '='. */
|
||||
public static final Character EQ = '=';
|
||||
|
||||
/** The Character '>'. */
|
||||
public static final Character GT = '>';
|
||||
|
||||
/** The Character '<'. */
|
||||
public static final Character LT = '<';
|
||||
|
||||
/** The Character '?'. */
|
||||
public static final Character QUEST = '?';
|
||||
|
||||
/** The Character '"'. */
|
||||
public static final Character QUOT = '"';
|
||||
|
||||
/** The Character '/'. */
|
||||
public static final Character SLASH = '/';
|
||||
|
||||
/**
|
||||
* Replace special characters with XML escapes:
|
||||
*
|
||||
* <pre>
|
||||
* & <small>(ampersand)</small> is replaced by &amp;
|
||||
* < <small>(less than)</small> is replaced by &lt;
|
||||
* > <small>(greater than)</small> is replaced by &gt;
|
||||
* " <small>(double quote)</small> is replaced by &quot;
|
||||
* </pre>
|
||||
*
|
||||
* @param string
|
||||
* The string to be escaped.
|
||||
* @return The escaped string.
|
||||
*/
|
||||
public static String escape(String string)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(string.length());
|
||||
for(int i = 0, length = string.length(); i < length; i++)
|
||||
{
|
||||
char c = string.charAt(i);
|
||||
switch(c)
|
||||
{
|
||||
case '&':
|
||||
sb.append("&");
|
||||
break;
|
||||
case '<':
|
||||
sb.append("<");
|
||||
break;
|
||||
case '>':
|
||||
sb.append(">");
|
||||
break;
|
||||
case '"':
|
||||
sb.append(""");
|
||||
break;
|
||||
case '\'':
|
||||
sb.append("'");
|
||||
break;
|
||||
default:
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw an exception if the string contains whitespace. Whitespace is not
|
||||
* allowed in tagNames and attributes.
|
||||
*
|
||||
* @param string
|
||||
* A string.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public static void noSpace(String string) throws JSONException
|
||||
{
|
||||
int i, length = string.length();
|
||||
if(length == 0)
|
||||
{
|
||||
throw new JSONException("Empty string.");
|
||||
}
|
||||
for(i = 0; i < length; i += 1)
|
||||
{
|
||||
if(Character.isWhitespace(string.charAt(i)))
|
||||
{
|
||||
throw new JSONException("'" + string + "' contains a space character.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan the content following the named tag, attaching it to the context.
|
||||
*
|
||||
* @param x
|
||||
* The XMLTokener containing the source string.
|
||||
* @param context
|
||||
* The JSONObject that will include the new material.
|
||||
* @param name
|
||||
* The tag name.
|
||||
* @return true if the close tag is processed.
|
||||
* @throws JSONException
|
||||
*/
|
||||
private static boolean parse(XMLTokener x, JSONObject context, String name) throws JSONException
|
||||
{
|
||||
char c;
|
||||
int i;
|
||||
JSONObject jsonobject = null;
|
||||
String string;
|
||||
String tagName;
|
||||
Object token;
|
||||
|
||||
// Test for and skip past these forms:
|
||||
// <!-- ... -->
|
||||
// <! ... >
|
||||
// <![ ... ]]>
|
||||
// <? ... ?>
|
||||
// Report errors for these forms:
|
||||
// <>
|
||||
// <=
|
||||
// <<
|
||||
|
||||
token = x.nextToken();
|
||||
|
||||
// <!
|
||||
|
||||
if(token == BANG)
|
||||
{
|
||||
c = x.next();
|
||||
if(c == '-')
|
||||
{
|
||||
if(x.next() == '-')
|
||||
{
|
||||
x.skipPast("-->");
|
||||
return false;
|
||||
}
|
||||
x.back();
|
||||
} else if(c == '[')
|
||||
{
|
||||
token = x.nextToken();
|
||||
if("CDATA".equals(token))
|
||||
{
|
||||
if(x.next() == '[')
|
||||
{
|
||||
string = x.nextCDATA();
|
||||
if(string.length() > 0)
|
||||
{
|
||||
context.accumulate("content", string);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
throw x.syntaxError("Expected 'CDATA['");
|
||||
}
|
||||
i = 1;
|
||||
do
|
||||
{
|
||||
token = x.nextMeta();
|
||||
if(token == null)
|
||||
{
|
||||
throw x.syntaxError("Missing '>' after '<!'.");
|
||||
} else if(token == LT)
|
||||
{
|
||||
i += 1;
|
||||
} else if(token == GT)
|
||||
{
|
||||
i -= 1;
|
||||
}
|
||||
} while(i > 0);
|
||||
return false;
|
||||
} else if(token == QUEST)
|
||||
{
|
||||
|
||||
// <?
|
||||
|
||||
x.skipPast("?>");
|
||||
return false;
|
||||
} else if(token == SLASH)
|
||||
{
|
||||
|
||||
// Close tag </
|
||||
|
||||
token = x.nextToken();
|
||||
if(name == null)
|
||||
{
|
||||
throw x.syntaxError("Mismatched close tag " + token);
|
||||
}
|
||||
if(!token.equals(name))
|
||||
{
|
||||
throw x.syntaxError("Mismatched " + name + " and " + token);
|
||||
}
|
||||
if(x.nextToken() != GT)
|
||||
{
|
||||
throw x.syntaxError("Misshaped close tag");
|
||||
}
|
||||
return true;
|
||||
|
||||
} else if(token instanceof Character)
|
||||
{
|
||||
throw x.syntaxError("Misshaped tag");
|
||||
|
||||
// Open tag <
|
||||
|
||||
} else
|
||||
{
|
||||
tagName = (String) token;
|
||||
token = null;
|
||||
jsonobject = new JSONObject();
|
||||
for(;;)
|
||||
{
|
||||
if(token == null)
|
||||
{
|
||||
token = x.nextToken();
|
||||
}
|
||||
|
||||
// attribute = value
|
||||
|
||||
if(token instanceof String)
|
||||
{
|
||||
string = (String) token;
|
||||
token = x.nextToken();
|
||||
if(token == EQ)
|
||||
{
|
||||
token = x.nextToken();
|
||||
if(!(token instanceof String))
|
||||
{
|
||||
throw x.syntaxError("Missing value");
|
||||
}
|
||||
jsonobject.accumulate(string, XML.stringToValue((String) token));
|
||||
token = null;
|
||||
} else
|
||||
{
|
||||
jsonobject.accumulate(string, "");
|
||||
}
|
||||
|
||||
// Empty tag <.../>
|
||||
|
||||
} else if(token == SLASH)
|
||||
{
|
||||
if(x.nextToken() != GT)
|
||||
{
|
||||
throw x.syntaxError("Misshaped tag");
|
||||
}
|
||||
if(jsonobject.length() > 0)
|
||||
{
|
||||
context.accumulate(tagName, jsonobject);
|
||||
} else
|
||||
{
|
||||
context.accumulate(tagName, "");
|
||||
}
|
||||
return false;
|
||||
|
||||
// Content, between <...> and </...>
|
||||
|
||||
} else if(token == GT)
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
token = x.nextContent();
|
||||
if(token == null)
|
||||
{
|
||||
if(tagName != null)
|
||||
{
|
||||
throw x.syntaxError("Unclosed tag " + tagName);
|
||||
}
|
||||
return false;
|
||||
} else if(token instanceof String)
|
||||
{
|
||||
string = (String) token;
|
||||
if(string.length() > 0)
|
||||
{
|
||||
jsonobject.accumulate("content", XML.stringToValue(string));
|
||||
}
|
||||
|
||||
// Nested element
|
||||
|
||||
} else if(token == LT)
|
||||
{
|
||||
if(parse(x, jsonobject, tagName))
|
||||
{
|
||||
if(jsonobject.length() == 0)
|
||||
{
|
||||
context.accumulate(tagName, "");
|
||||
} else if(jsonobject.length() == 1 && jsonobject.opt("content") != null)
|
||||
{
|
||||
context.accumulate(tagName, jsonobject.opt("content"));
|
||||
} else
|
||||
{
|
||||
context.accumulate(tagName, jsonobject);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
throw x.syntaxError("Misshaped tag");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to convert a string into a number, boolean, or null. If the string
|
||||
* can't be converted, return the string. This is much less ambitious than
|
||||
* JSONObject.stringToValue, especially because it does not attempt to
|
||||
* convert plus forms, octal forms, hex forms, or E forms lacking decimal
|
||||
* points.
|
||||
*
|
||||
* @param string
|
||||
* A String.
|
||||
* @return A simple JSON value.
|
||||
*/
|
||||
public static Object stringToValue(String string)
|
||||
{
|
||||
if("true".equalsIgnoreCase(string))
|
||||
{
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
if("false".equalsIgnoreCase(string))
|
||||
{
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
if("null".equalsIgnoreCase(string))
|
||||
{
|
||||
return JSONObject.NULL;
|
||||
}
|
||||
|
||||
// If it might be a number, try converting it, first as a Long, and then
|
||||
// as a
|
||||
// Double. If that doesn't work, return the string.
|
||||
|
||||
try
|
||||
{
|
||||
char initial = string.charAt(0);
|
||||
if(initial == '-' || (initial >= '0' && initial <= '9'))
|
||||
{
|
||||
Long value = new Long(string);
|
||||
if(value.toString().equals(string))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
} catch(Exception ignore)
|
||||
{
|
||||
try
|
||||
{
|
||||
Double value = new Double(string);
|
||||
if(value.toString().equals(string))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
} catch(Exception ignoreAlso)
|
||||
{
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a well-formed (but not necessarily valid) XML string into a
|
||||
* JSONObject. Some information may be lost in this transformation because
|
||||
* JSON is a data format and XML is a document format. XML uses elements,
|
||||
* attributes, and content text, while JSON uses unordered collections of
|
||||
* name/value pairs and arrays of values. JSON does not does not like to
|
||||
* distinguish between elements and attributes. Sequences of similar
|
||||
* elements are represented as JSONArrays. Content text may be placed in a
|
||||
* "content" member. Comments, prologs, DTDs, and <code><[ [ ]]></code>
|
||||
* are ignored.
|
||||
*
|
||||
* @param string
|
||||
* The source string.
|
||||
* @return A JSONObject containing the structured data from the XML string.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public static JSONObject toJSONObject(String string) throws JSONException
|
||||
{
|
||||
JSONObject jo = new JSONObject();
|
||||
XMLTokener x = new XMLTokener(string);
|
||||
while(x.more() && x.skipPast("<"))
|
||||
{
|
||||
parse(x, jo, null);
|
||||
}
|
||||
return jo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a JSONObject into a well-formed, element-normal XML string.
|
||||
*
|
||||
* @param object
|
||||
* A JSONObject.
|
||||
* @return A string.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public static String toString(Object object) throws JSONException
|
||||
{
|
||||
return toString(object, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a JSONObject into a well-formed, element-normal XML string.
|
||||
*
|
||||
* @param object
|
||||
* A JSONObject.
|
||||
* @param tagName
|
||||
* The optional name of the enclosing tag.
|
||||
* @return A string.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public static String toString(Object object, String tagName) throws JSONException
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int i;
|
||||
JSONArray ja;
|
||||
JSONObject jo;
|
||||
String key;
|
||||
Iterator<String> keys;
|
||||
int length;
|
||||
String string;
|
||||
Object value;
|
||||
if(object instanceof JSONObject)
|
||||
{
|
||||
|
||||
// Emit <tagName>
|
||||
|
||||
if(tagName != null)
|
||||
{
|
||||
sb.append('<');
|
||||
sb.append(tagName);
|
||||
sb.append('>');
|
||||
}
|
||||
|
||||
// Loop thru the keys.
|
||||
|
||||
jo = (JSONObject) object;
|
||||
keys = jo.keys();
|
||||
while(keys.hasNext())
|
||||
{
|
||||
key = keys.next();
|
||||
value = jo.opt(key);
|
||||
if(value == null)
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
string = value instanceof String ? (String) value : null;
|
||||
|
||||
// Emit content in body
|
||||
|
||||
if("content".equals(key))
|
||||
{
|
||||
if(value instanceof JSONArray)
|
||||
{
|
||||
ja = (JSONArray) value;
|
||||
length = ja.length();
|
||||
for(i = 0; i < length; i += 1)
|
||||
{
|
||||
if(i > 0)
|
||||
{
|
||||
sb.append('\n');
|
||||
}
|
||||
sb.append(escape(ja.get(i).toString()));
|
||||
}
|
||||
} else
|
||||
{
|
||||
sb.append(escape(value.toString()));
|
||||
}
|
||||
|
||||
// Emit an array of similar keys
|
||||
|
||||
} else if(value instanceof JSONArray)
|
||||
{
|
||||
ja = (JSONArray) value;
|
||||
length = ja.length();
|
||||
for(i = 0; i < length; i += 1)
|
||||
{
|
||||
value = ja.get(i);
|
||||
if(value instanceof JSONArray)
|
||||
{
|
||||
sb.append('<');
|
||||
sb.append(key);
|
||||
sb.append('>');
|
||||
sb.append(toString(value));
|
||||
sb.append("</");
|
||||
sb.append(key);
|
||||
sb.append('>');
|
||||
} else
|
||||
{
|
||||
sb.append(toString(value, key));
|
||||
}
|
||||
}
|
||||
} else if("".equals(value))
|
||||
{
|
||||
sb.append('<');
|
||||
sb.append(key);
|
||||
sb.append("/>");
|
||||
|
||||
// Emit a new tag <k>
|
||||
|
||||
} else
|
||||
{
|
||||
sb.append(toString(value, key));
|
||||
}
|
||||
}
|
||||
if(tagName != null)
|
||||
{
|
||||
|
||||
// Emit the </tagname> close tag
|
||||
|
||||
sb.append("</");
|
||||
sb.append(tagName);
|
||||
sb.append('>');
|
||||
}
|
||||
return sb.toString();
|
||||
|
||||
// XML does not have good support for arrays. If an array appears in
|
||||
// a place
|
||||
// where XML is lacking, synthesize an <array> element.
|
||||
|
||||
} else
|
||||
{
|
||||
if(object.getClass().isArray())
|
||||
{
|
||||
object = new JSONArray(object);
|
||||
}
|
||||
if(object instanceof JSONArray)
|
||||
{
|
||||
ja = (JSONArray) object;
|
||||
length = ja.length();
|
||||
for(i = 0; i < length; i += 1)
|
||||
{
|
||||
sb.append(toString(ja.opt(i), tagName == null ? "array" : tagName));
|
||||
}
|
||||
return sb.toString();
|
||||
} else
|
||||
{
|
||||
string = (object == null) ? "null" : escape(object.toString());
|
||||
return (tagName == null) ? "\"" + string + "\"" : (string.length() == 0) ? "<" + tagName + "/>" : "<" + tagName + ">" + string + "</" + tagName + ">";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
425
json/XMLTokener.java
Normal file
425
json/XMLTokener.java
Normal file
@@ -0,0 +1,425 @@
|
||||
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 XMLTokener extends the JSONTokener to provide additional methods for the
|
||||
* parsing of XML texts.
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2014-05-03
|
||||
*/
|
||||
public class XMLTokener extends JSONTokener
|
||||
{
|
||||
|
||||
/**
|
||||
* The table of entity values. It initially contains Character values for
|
||||
* amp, apos, gt, lt, quot.
|
||||
*/
|
||||
public static final java.util.HashMap<String, Character> entity;
|
||||
|
||||
static
|
||||
{
|
||||
entity = new java.util.HashMap<String, Character>(8);
|
||||
entity.put("amp", XML.AMP);
|
||||
entity.put("apos", XML.APOS);
|
||||
entity.put("gt", XML.GT);
|
||||
entity.put("lt", XML.LT);
|
||||
entity.put("quot", XML.QUOT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an XMLTokener from a string.
|
||||
*
|
||||
* @param s
|
||||
* A source string.
|
||||
*/
|
||||
public XMLTokener(String s)
|
||||
{
|
||||
super(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text in the CDATA block.
|
||||
*
|
||||
* @return The string up to the <code>]]></code>.
|
||||
* @throws JSONException
|
||||
* If the <code>]]></code> is not found.
|
||||
*/
|
||||
public String nextCDATA() throws JSONException
|
||||
{
|
||||
char c;
|
||||
int i;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
c = next();
|
||||
if(end())
|
||||
{
|
||||
throw syntaxError("Unclosed CDATA");
|
||||
}
|
||||
sb.append(c);
|
||||
i = sb.length() - 3;
|
||||
if(i >= 0 && sb.charAt(i) == ']' && sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>')
|
||||
{
|
||||
sb.setLength(i);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next XML outer token, trimming whitespace. There are two kinds of
|
||||
* tokens: the '<' character which begins a markup tag, and the content text
|
||||
* between markup tags.
|
||||
*
|
||||
* @return A string, or a '<' Character, or null if there is no more source
|
||||
* text.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public Object nextContent() throws JSONException
|
||||
{
|
||||
char c;
|
||||
StringBuilder sb;
|
||||
do
|
||||
{
|
||||
c = next();
|
||||
} while(Character.isWhitespace(c));
|
||||
if(c == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(c == '<')
|
||||
{
|
||||
return XML.LT;
|
||||
}
|
||||
sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
if(c == '<' || c == 0)
|
||||
{
|
||||
back();
|
||||
return sb.toString().trim();
|
||||
}
|
||||
if(c == '&')
|
||||
{
|
||||
sb.append(nextEntity(c));
|
||||
} else
|
||||
{
|
||||
sb.append(c);
|
||||
}
|
||||
c = next();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the next entity. These entities are translated to Characters:
|
||||
* <code>& ' > < "</code>.
|
||||
*
|
||||
* @param ampersand
|
||||
* An ampersand character.
|
||||
* @return A Character or an entity String if the entity is not recognized.
|
||||
* @throws JSONException
|
||||
* If missing ';' in XML entity.
|
||||
*/
|
||||
public Object nextEntity(char ampersand) throws JSONException
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
char c = next();
|
||||
if(Character.isLetterOrDigit(c) || c == '#')
|
||||
{
|
||||
sb.append(Character.toLowerCase(c));
|
||||
} else if(c == ';')
|
||||
{
|
||||
break;
|
||||
} else
|
||||
{
|
||||
throw syntaxError("Missing ';' in XML entity: &" + sb);
|
||||
}
|
||||
}
|
||||
String string = sb.toString();
|
||||
Object object = entity.get(string);
|
||||
return object != null ? object : ampersand + string + ";";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next XML meta token. This is used for skipping over
|
||||
* <!...> and <?...?> structures.
|
||||
*
|
||||
* @return Syntax characters (<code>< > / = ! ?</code>) are returned as
|
||||
* Character, and strings and names are returned as Boolean. We
|
||||
* don't care what the values actually are.
|
||||
* @throws JSONException
|
||||
* If a string is not properly closed or if the XML is badly
|
||||
* structured.
|
||||
*/
|
||||
public Object nextMeta() throws JSONException
|
||||
{
|
||||
char c;
|
||||
char q;
|
||||
do
|
||||
{
|
||||
c = next();
|
||||
} while(Character.isWhitespace(c));
|
||||
switch(c)
|
||||
{
|
||||
case 0:
|
||||
throw syntaxError("Misshaped meta tag");
|
||||
case '<':
|
||||
return XML.LT;
|
||||
case '>':
|
||||
return XML.GT;
|
||||
case '/':
|
||||
return XML.SLASH;
|
||||
case '=':
|
||||
return XML.EQ;
|
||||
case '!':
|
||||
return XML.BANG;
|
||||
case '?':
|
||||
return XML.QUEST;
|
||||
case '"':
|
||||
case '\'':
|
||||
q = c;
|
||||
for(;;)
|
||||
{
|
||||
c = next();
|
||||
if(c == 0)
|
||||
{
|
||||
throw syntaxError("Unterminated string");
|
||||
}
|
||||
if(c == q)
|
||||
{
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
default:
|
||||
for(;;)
|
||||
{
|
||||
c = next();
|
||||
if(Character.isWhitespace(c))
|
||||
{
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
switch(c)
|
||||
{
|
||||
case 0:
|
||||
case '<':
|
||||
case '>':
|
||||
case '/':
|
||||
case '=':
|
||||
case '!':
|
||||
case '?':
|
||||
case '"':
|
||||
case '\'':
|
||||
back();
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next XML Token. These tokens are found inside of angle brackets.
|
||||
* It may be one of these characters: <code>/ > = ! ?</code> or it may be a
|
||||
* string wrapped in single quotes or double quotes, or it may be a name.
|
||||
*
|
||||
* @return a String or a Character.
|
||||
* @throws JSONException
|
||||
* If the XML is not well formed.
|
||||
*/
|
||||
public Object nextToken() throws JSONException
|
||||
{
|
||||
char c;
|
||||
char q;
|
||||
StringBuilder sb;
|
||||
do
|
||||
{
|
||||
c = next();
|
||||
} while(Character.isWhitespace(c));
|
||||
switch(c)
|
||||
{
|
||||
case 0:
|
||||
throw syntaxError("Misshaped element");
|
||||
case '<':
|
||||
throw syntaxError("Misplaced '<'");
|
||||
case '>':
|
||||
return XML.GT;
|
||||
case '/':
|
||||
return XML.SLASH;
|
||||
case '=':
|
||||
return XML.EQ;
|
||||
case '!':
|
||||
return XML.BANG;
|
||||
case '?':
|
||||
return XML.QUEST;
|
||||
|
||||
// Quoted string
|
||||
|
||||
case '"':
|
||||
case '\'':
|
||||
q = c;
|
||||
sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
c = next();
|
||||
if(c == 0)
|
||||
{
|
||||
throw syntaxError("Unterminated string");
|
||||
}
|
||||
if(c == q)
|
||||
{
|
||||
return sb.toString();
|
||||
}
|
||||
if(c == '&')
|
||||
{
|
||||
sb.append(nextEntity(c));
|
||||
} else
|
||||
{
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
||||
// Name
|
||||
|
||||
sb = new StringBuilder();
|
||||
for(;;)
|
||||
{
|
||||
sb.append(c);
|
||||
c = next();
|
||||
if(Character.isWhitespace(c))
|
||||
{
|
||||
return sb.toString();
|
||||
}
|
||||
switch(c)
|
||||
{
|
||||
case 0:
|
||||
return sb.toString();
|
||||
case '>':
|
||||
case '/':
|
||||
case '=':
|
||||
case '!':
|
||||
case '?':
|
||||
case '[':
|
||||
case ']':
|
||||
back();
|
||||
return sb.toString();
|
||||
case '<':
|
||||
case '"':
|
||||
case '\'':
|
||||
throw syntaxError("Bad character in a name");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Skip characters until past the requested string. If it is not found, we
|
||||
* are left at the end of the source with a result of false.
|
||||
*
|
||||
* @param to
|
||||
* A string to skip past.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public boolean skipPast(String to) throws JSONException
|
||||
{
|
||||
boolean b;
|
||||
char c;
|
||||
int i;
|
||||
int j;
|
||||
int offset = 0;
|
||||
int length = to.length();
|
||||
char[] circle = new char[length];
|
||||
|
||||
/*
|
||||
* First fill the circle buffer with as many characters as are in the to
|
||||
* string. If we reach an early end, bail.
|
||||
*/
|
||||
|
||||
for(i = 0; i < length; i += 1)
|
||||
{
|
||||
c = next();
|
||||
if(c == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
circle[i] = c;
|
||||
}
|
||||
|
||||
/* We will loop, possibly for all of the remaining characters. */
|
||||
|
||||
for(;;)
|
||||
{
|
||||
j = offset;
|
||||
b = true;
|
||||
|
||||
/* Compare the circle buffer with the to string. */
|
||||
|
||||
for(i = 0; i < length; i += 1)
|
||||
{
|
||||
if(circle[j] != to.charAt(i))
|
||||
{
|
||||
b = false;
|
||||
break;
|
||||
}
|
||||
j += 1;
|
||||
if(j >= length)
|
||||
{
|
||||
j -= length;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we exit the loop with b intact, then victory is ours. */
|
||||
|
||||
if(b)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the next character. If there isn't one, then defeat is ours.
|
||||
*/
|
||||
|
||||
c = next();
|
||||
if(c == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* Shove the character in the circle buffer and advance the circle
|
||||
* offset. The offset is mod n.
|
||||
*/
|
||||
circle[offset] = c;
|
||||
offset += 1;
|
||||
if(offset >= length)
|
||||
{
|
||||
offset -= length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20473
lint/ChangeLog.txt
Normal file
20473
lint/ChangeLog.txt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lint/IrisPreGenerator.class
Normal file
BIN
lint/IrisPreGenerator.class
Normal file
Binary file not shown.
7680
lint/dictionary-classes.txt
Normal file
7680
lint/dictionary-classes.txt
Normal file
File diff suppressed because it is too large
Load Diff
27720
lint/dictionary-members.txt
Normal file
27720
lint/dictionary-members.txt
Normal file
File diff suppressed because it is too large
Load Diff
91
lint/obf.json
Normal file
91
lint/obf.json
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"input": "in.jar",
|
||||
"output": "out.jar",
|
||||
"script": "function isRemappingEnabledForClass(node) {\n return true;\n}\nfunction isObfuscatorEnabledForClass(node) {\n return true;\n}",
|
||||
"libraries": [
|
||||
"lib",
|
||||
"C:/Program Files/Java/jre1.8.0_221/lib"
|
||||
],
|
||||
"Crasher": {
|
||||
"Enabled": false,
|
||||
"Invalid Signatures": true,
|
||||
"Empty annotation spam": true
|
||||
},
|
||||
"InvokeDynamic": {
|
||||
"Enabled": false
|
||||
},
|
||||
"HWIDPRotection": {
|
||||
"Enabled": false,
|
||||
"HWID": ""
|
||||
},
|
||||
"Optimizer": {
|
||||
"Enabled": true,
|
||||
"Replace String.equals()": true,
|
||||
"Replace String.equalsIgnoreCase()": true,
|
||||
"Optimize static string calls": false
|
||||
},
|
||||
"LineNumberRemover": {
|
||||
"Enabled": true,
|
||||
"Rename local variables": true,
|
||||
"Remove Line Numbers": false,
|
||||
"Remove Debug Names": false,
|
||||
"Add Local Variables": false,
|
||||
"New SourceFile Name": ""
|
||||
},
|
||||
"StringEncryption": {
|
||||
"Enabled": true,
|
||||
"HideStrings": true,
|
||||
"AES": true
|
||||
},
|
||||
"NumberObfuscation": {
|
||||
"Enabled": true,
|
||||
"Extract to Array": true,
|
||||
"Obfuscate Zero": true,
|
||||
"Shift": true,
|
||||
"And": true,
|
||||
"Multiple Instructions": true
|
||||
},
|
||||
"ReferenceProxy": {
|
||||
"Enabled": false
|
||||
},
|
||||
"ShuffleMembers": {
|
||||
"Enabled": true
|
||||
},
|
||||
"InnerClassRemover": {
|
||||
"Enabled": true,
|
||||
"Remap": true,
|
||||
"Remove Metadata": true
|
||||
},
|
||||
"NameObfuscation": {
|
||||
"Enabled": false,
|
||||
"Excluded classes": "",
|
||||
"Excluded methods": "",
|
||||
"Excluded fields": ""
|
||||
},
|
||||
"General Settings": {
|
||||
"Custom dictionary": false,
|
||||
"Name dictionary": "hello,world"
|
||||
},
|
||||
"Packager": {
|
||||
"Enabled": false,
|
||||
"Use MainClass from the JAR manifest": true,
|
||||
"Main class": "HelloWorld"
|
||||
},
|
||||
"FlowObfuscator": {
|
||||
"Enabled": true,
|
||||
"Mangle Comparisons": false,
|
||||
"Replace GOTO": true,
|
||||
"Replace If": true,
|
||||
"Bad POP": false,
|
||||
"Bad Concat": false,
|
||||
"Mangle Switches": false,
|
||||
"Mangle Return": true,
|
||||
"Mangle Local Variables": false
|
||||
},
|
||||
"HideMembers": {
|
||||
"Enabled": false
|
||||
},
|
||||
"Inlining": {
|
||||
"Enabled": true
|
||||
}
|
||||
}
|
||||
91
lint/obfcap.json
Normal file
91
lint/obfcap.json
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"input": "in.jar",
|
||||
"output": "out.jar",
|
||||
"script": "function isRemappingEnabledForClass(node) {\n return true;\n}\nfunction isObfuscatorEnabledForClass(node) {\n return true;\n}",
|
||||
"libraries": [
|
||||
"lib",
|
||||
"C:/Program Files/Java/jre1.8.0_221/lib"
|
||||
],
|
||||
"Crasher": {
|
||||
"Enabled": false,
|
||||
"Invalid Signatures": true,
|
||||
"Empty annotation spam": true
|
||||
},
|
||||
"InvokeDynamic": {
|
||||
"Enabled": false
|
||||
},
|
||||
"HWIDPRotection": {
|
||||
"Enabled": false,
|
||||
"HWID": ""
|
||||
},
|
||||
"Optimizer": {
|
||||
"Enabled": false,
|
||||
"Replace String.equals()": false,
|
||||
"Replace String.equalsIgnoreCase()": true,
|
||||
"Optimize static string calls": false
|
||||
},
|
||||
"LineNumberRemover": {
|
||||
"Enabled": false,
|
||||
"Rename local variables": false,
|
||||
"Remove Line Numbers": false,
|
||||
"Remove Debug Names": false,
|
||||
"Add Local Variables": false,
|
||||
"New SourceFile Name": ""
|
||||
},
|
||||
"StringEncryption": {
|
||||
"Enabled": true,
|
||||
"HideStrings": true,
|
||||
"AES": false
|
||||
},
|
||||
"NumberObfuscation": {
|
||||
"Enabled": true,
|
||||
"Extract to Array": false,
|
||||
"Obfuscate Zero": false,
|
||||
"Shift": true,
|
||||
"And": true,
|
||||
"Multiple Instructions": false
|
||||
},
|
||||
"ReferenceProxy": {
|
||||
"Enabled": false
|
||||
},
|
||||
"ShuffleMembers": {
|
||||
"Enabled": false
|
||||
},
|
||||
"InnerClassRemover": {
|
||||
"Enabled": false,
|
||||
"Remap": false,
|
||||
"Remove Metadata": false
|
||||
},
|
||||
"NameObfuscation": {
|
||||
"Enabled": false,
|
||||
"Excluded classes": "",
|
||||
"Excluded methods": "",
|
||||
"Excluded fields": ""
|
||||
},
|
||||
"General Settings": {
|
||||
"Custom dictionary": false,
|
||||
"Name dictionary": "hello,world"
|
||||
},
|
||||
"Packager": {
|
||||
"Enabled": false,
|
||||
"Use MainClass from the JAR manifest": true,
|
||||
"Main class": "HelloWorld"
|
||||
},
|
||||
"FlowObfuscator": {
|
||||
"Enabled": false,
|
||||
"Mangle Comparisons": false,
|
||||
"Replace GOTO": true,
|
||||
"Replace If": false,
|
||||
"Bad POP": false,
|
||||
"Bad Concat": false,
|
||||
"Mangle Switches": false,
|
||||
"Mangle Return": false,
|
||||
"Mangle Local Variables": false
|
||||
},
|
||||
"HideMembers": {
|
||||
"Enabled": false
|
||||
},
|
||||
"Inlining": {
|
||||
"Enabled": false
|
||||
}
|
||||
}
|
||||
BIN
lint/obfuscator.jar
Normal file
BIN
lint/obfuscator.jar
Normal file
Binary file not shown.
9
lint/plugin.yml
Normal file
9
lint/plugin.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
name: Iris
|
||||
version: 1.0
|
||||
main: com.volmit.iris.Iris
|
||||
load: STARTUP
|
||||
commands:
|
||||
iris:
|
||||
aliases: [ir, irs]
|
||||
api-version: 1.16
|
||||
hotload-dependencies: false
|
||||
332
lint/proguard-backup.conf
Normal file
332
lint/proguard-backup.conf
Normal file
@@ -0,0 +1,332 @@
|
||||
-injars in.jar
|
||||
-outjars out.jar
|
||||
|
||||
-libraryjars 'C:\Program Files\Java\jre1.8.0_221\lib\rt.jar'
|
||||
-libraryjars lib
|
||||
|
||||
-dontshrink
|
||||
-dontoptimize
|
||||
-printmapping mapping.txt
|
||||
-obfuscationdictionary dictionary-members.txt
|
||||
-classobfuscationdictionary dictionary-classes.txt
|
||||
-useuniqueclassmembernames
|
||||
-flattenpackagehierarchy com.volmit.iris
|
||||
-repackageclasses com.volmit.iris
|
||||
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod
|
||||
-adaptclassstrings
|
||||
-adaptresourcefilecontents **.properties,META-INF/MANIFEST.MF,**.yml
|
||||
-dontnote
|
||||
-dontwarn
|
||||
|
||||
|
||||
|
||||
-keepclassmembers,allowshrinking class com.volmit.iris.object.* {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# Also keep - Enumerations. Keep the special static methods that are required in
|
||||
# enumeration classes.
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
# Also keep - Database drivers. Keep all implementations of java.sql.Driver.
|
||||
-keep class * extends java.sql.Driver
|
||||
|
||||
# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI,
|
||||
# along with the special 'createUI' method.
|
||||
-keep class * extends javax.swing.plaf.ComponentUI {
|
||||
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
|
||||
}
|
||||
|
||||
# Keep - Native method names. Keep all native class/method names.
|
||||
-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
# Remove - System method calls. Remove all invocations of System
|
||||
# methods without side effects whose return values are not used.
|
||||
-assumenosideeffects public class java.lang.System {
|
||||
public static long currentTimeMillis();
|
||||
static java.lang.Class getCallerClass();
|
||||
public static int identityHashCode(java.lang.Object);
|
||||
public static java.lang.SecurityManager getSecurityManager();
|
||||
public static java.util.Properties getProperties();
|
||||
public static java.lang.String getProperty(java.lang.String);
|
||||
public static java.lang.String getenv(java.lang.String);
|
||||
public static java.lang.String mapLibraryName(java.lang.String);
|
||||
public static java.lang.String getProperty(java.lang.String,java.lang.String);
|
||||
}
|
||||
|
||||
# Remove - Math method calls. Remove all invocations of Math
|
||||
# methods without side effects whose return values are not used.
|
||||
-assumenosideeffects public class java.lang.Math {
|
||||
public static double sin(double);
|
||||
public static double cos(double);
|
||||
public static double tan(double);
|
||||
public static double asin(double);
|
||||
public static double acos(double);
|
||||
public static double atan(double);
|
||||
public static double toRadians(double);
|
||||
public static double toDegrees(double);
|
||||
public static double exp(double);
|
||||
public static double log(double);
|
||||
public static double log10(double);
|
||||
public static double sqrt(double);
|
||||
public static double cbrt(double);
|
||||
public static double IEEEremainder(double,double);
|
||||
public static double ceil(double);
|
||||
public static double floor(double);
|
||||
public static double rint(double);
|
||||
public static double atan2(double,double);
|
||||
public static double pow(double,double);
|
||||
public static int round(float);
|
||||
public static long round(double);
|
||||
public static double random();
|
||||
public static int abs(int);
|
||||
public static long abs(long);
|
||||
public static float abs(float);
|
||||
public static double abs(double);
|
||||
public static int max(int,int);
|
||||
public static long max(long,long);
|
||||
public static float max(float,float);
|
||||
public static double max(double,double);
|
||||
public static int min(int,int);
|
||||
public static long min(long,long);
|
||||
public static float min(float,float);
|
||||
public static double min(double,double);
|
||||
public static double ulp(double);
|
||||
public static float ulp(float);
|
||||
public static double signum(double);
|
||||
public static float signum(float);
|
||||
public static double sinh(double);
|
||||
public static double cosh(double);
|
||||
public static double tanh(double);
|
||||
public static double hypot(double,double);
|
||||
public static double expm1(double);
|
||||
public static double log1p(double);
|
||||
}
|
||||
|
||||
# Remove - Number method calls. Remove all invocations of Number
|
||||
# methods without side effects whose return values are not used.
|
||||
-assumenosideeffects public class java.lang.* extends java.lang.Number {
|
||||
public static java.lang.String toString(byte);
|
||||
public static java.lang.Byte valueOf(byte);
|
||||
public static byte parseByte(java.lang.String);
|
||||
public static byte parseByte(java.lang.String,int);
|
||||
public static java.lang.Byte valueOf(java.lang.String,int);
|
||||
public static java.lang.Byte valueOf(java.lang.String);
|
||||
public static java.lang.Byte decode(java.lang.String);
|
||||
public int compareTo(java.lang.Byte);
|
||||
public static java.lang.String toString(short);
|
||||
public static short parseShort(java.lang.String);
|
||||
public static short parseShort(java.lang.String,int);
|
||||
public static java.lang.Short valueOf(java.lang.String,int);
|
||||
public static java.lang.Short valueOf(java.lang.String);
|
||||
public static java.lang.Short valueOf(short);
|
||||
public static java.lang.Short decode(java.lang.String);
|
||||
public static short reverseBytes(short);
|
||||
public int compareTo(java.lang.Short);
|
||||
public static java.lang.String toString(int,int);
|
||||
public static java.lang.String toHexString(int);
|
||||
public static java.lang.String toOctalString(int);
|
||||
public static java.lang.String toBinaryString(int);
|
||||
public static java.lang.String toString(int);
|
||||
public static int parseInt(java.lang.String,int);
|
||||
public static int parseInt(java.lang.String);
|
||||
public static java.lang.Integer valueOf(java.lang.String,int);
|
||||
public static java.lang.Integer valueOf(java.lang.String);
|
||||
public static java.lang.Integer valueOf(int);
|
||||
public static java.lang.Integer getInteger(java.lang.String);
|
||||
public static java.lang.Integer getInteger(java.lang.String,int);
|
||||
public static java.lang.Integer getInteger(java.lang.String,java.lang.Integer);
|
||||
public static java.lang.Integer decode(java.lang.String);
|
||||
public static int highestOneBit(int);
|
||||
public static int lowestOneBit(int);
|
||||
public static int numberOfLeadingZeros(int);
|
||||
public static int numberOfTrailingZeros(int);
|
||||
public static int bitCount(int);
|
||||
public static int rotateLeft(int,int);
|
||||
public static int rotateRight(int,int);
|
||||
public static int reverse(int);
|
||||
public static int signum(int);
|
||||
public static int reverseBytes(int);
|
||||
public int compareTo(java.lang.Integer);
|
||||
public static java.lang.String toString(long,int);
|
||||
public static java.lang.String toHexString(long);
|
||||
public static java.lang.String toOctalString(long);
|
||||
public static java.lang.String toBinaryString(long);
|
||||
public static java.lang.String toString(long);
|
||||
public static long parseLong(java.lang.String,int);
|
||||
public static long parseLong(java.lang.String);
|
||||
public static java.lang.Long valueOf(java.lang.String,int);
|
||||
public static java.lang.Long valueOf(java.lang.String);
|
||||
public static java.lang.Long valueOf(long);
|
||||
public static java.lang.Long decode(java.lang.String);
|
||||
public static java.lang.Long getLong(java.lang.String);
|
||||
public static java.lang.Long getLong(java.lang.String,long);
|
||||
public static java.lang.Long getLong(java.lang.String,java.lang.Long);
|
||||
public static long highestOneBit(long);
|
||||
public static long lowestOneBit(long);
|
||||
public static int numberOfLeadingZeros(long);
|
||||
public static int numberOfTrailingZeros(long);
|
||||
public static int bitCount(long);
|
||||
public static long rotateLeft(long,int);
|
||||
public static long rotateRight(long,int);
|
||||
public static long reverse(long);
|
||||
public static int signum(long);
|
||||
public static long reverseBytes(long);
|
||||
public int compareTo(java.lang.Long);
|
||||
public static java.lang.String toString(float);
|
||||
public static java.lang.String toHexString(float);
|
||||
public static java.lang.Float valueOf(java.lang.String);
|
||||
public static java.lang.Float valueOf(float);
|
||||
public static float parseFloat(java.lang.String);
|
||||
public static boolean isNaN(float);
|
||||
public static boolean isInfinite(float);
|
||||
public static int floatToIntBits(float);
|
||||
public static int floatToRawIntBits(float);
|
||||
public static float intBitsToFloat(int);
|
||||
public static int compare(float,float);
|
||||
public boolean isNaN();
|
||||
public boolean isInfinite();
|
||||
public int compareTo(java.lang.Float);
|
||||
public static java.lang.String toString(double);
|
||||
public static java.lang.String toHexString(double);
|
||||
public static java.lang.Double valueOf(java.lang.String);
|
||||
public static java.lang.Double valueOf(double);
|
||||
public static double parseDouble(java.lang.String);
|
||||
public static boolean isNaN(double);
|
||||
public static boolean isInfinite(double);
|
||||
public static long doubleToLongBits(double);
|
||||
public static long doubleToRawLongBits(double);
|
||||
public static double longBitsToDouble(long);
|
||||
public static int compare(double,double);
|
||||
public boolean isNaN();
|
||||
public boolean isInfinite();
|
||||
public int compareTo(java.lang.Double);
|
||||
public byte byteValue();
|
||||
public short shortValue();
|
||||
public int intValue();
|
||||
public long longValue();
|
||||
public float floatValue();
|
||||
public double doubleValue();
|
||||
public int compareTo(java.lang.Object);
|
||||
public boolean equals(java.lang.Object);
|
||||
public int hashCode();
|
||||
public java.lang.String toString();
|
||||
}
|
||||
|
||||
# Remove - String method calls. Remove all invocations of String
|
||||
# methods without side effects whose return values are not used.
|
||||
-assumenosideeffects public class java.lang.String {
|
||||
public static java.lang.String copyValueOf(char[]);
|
||||
public static java.lang.String copyValueOf(char[],int,int);
|
||||
public static java.lang.String valueOf(boolean);
|
||||
public static java.lang.String valueOf(char);
|
||||
public static java.lang.String valueOf(char[]);
|
||||
public static java.lang.String valueOf(char[],int,int);
|
||||
public static java.lang.String valueOf(double);
|
||||
public static java.lang.String valueOf(float);
|
||||
public static java.lang.String valueOf(int);
|
||||
public static java.lang.String valueOf(java.lang.Object);
|
||||
public static java.lang.String valueOf(long);
|
||||
public boolean contentEquals(java.lang.StringBuffer);
|
||||
public boolean endsWith(java.lang.String);
|
||||
public boolean equalsIgnoreCase(java.lang.String);
|
||||
public boolean equals(java.lang.Object);
|
||||
public boolean matches(java.lang.String);
|
||||
public boolean regionMatches(boolean,int,java.lang.String,int,int);
|
||||
public boolean regionMatches(int,java.lang.String,int,int);
|
||||
public boolean startsWith(java.lang.String);
|
||||
public boolean startsWith(java.lang.String,int);
|
||||
public byte[] getBytes();
|
||||
public byte[] getBytes(java.lang.String);
|
||||
public char charAt(int);
|
||||
public char[] toCharArray();
|
||||
public int compareToIgnoreCase(java.lang.String);
|
||||
public int compareTo(java.lang.Object);
|
||||
public int compareTo(java.lang.String);
|
||||
public int hashCode();
|
||||
public int indexOf(int);
|
||||
public int indexOf(int,int);
|
||||
public int indexOf(java.lang.String);
|
||||
public int indexOf(java.lang.String,int);
|
||||
public int lastIndexOf(int);
|
||||
public int lastIndexOf(int,int);
|
||||
public int lastIndexOf(java.lang.String);
|
||||
public int lastIndexOf(java.lang.String,int);
|
||||
public int length();
|
||||
public java.lang.CharSequence subSequence(int,int);
|
||||
public java.lang.String concat(java.lang.String);
|
||||
public java.lang.String replaceAll(java.lang.String,java.lang.String);
|
||||
public java.lang.String replace(char,char);
|
||||
public java.lang.String replaceFirst(java.lang.String,java.lang.String);
|
||||
public java.lang.String[] split(java.lang.String);
|
||||
public java.lang.String[] split(java.lang.String,int);
|
||||
public java.lang.String substring(int);
|
||||
public java.lang.String substring(int,int);
|
||||
public java.lang.String toLowerCase();
|
||||
public java.lang.String toLowerCase(java.util.Locale);
|
||||
public java.lang.String toString();
|
||||
public java.lang.String toUpperCase();
|
||||
public java.lang.String toUpperCase(java.util.Locale);
|
||||
public java.lang.String trim();
|
||||
}
|
||||
|
||||
# Remove - StringBuffer method calls. Remove all invocations of StringBuffer
|
||||
# methods without side effects whose return values are not used.
|
||||
-assumenosideeffects public class java.lang.StringBuffer {
|
||||
public java.lang.String toString();
|
||||
public char charAt(int);
|
||||
public int capacity();
|
||||
public int codePointAt(int);
|
||||
public int codePointBefore(int);
|
||||
public int indexOf(java.lang.String,int);
|
||||
public int lastIndexOf(java.lang.String);
|
||||
public int lastIndexOf(java.lang.String,int);
|
||||
public int length();
|
||||
public java.lang.String substring(int);
|
||||
public java.lang.String substring(int,int);
|
||||
}
|
||||
|
||||
# Remove - StringBuilder method calls. Remove all invocations of StringBuilder
|
||||
# methods without side effects whose return values are not used.
|
||||
-assumenosideeffects public class java.lang.StringBuilder {
|
||||
public java.lang.String toString();
|
||||
public char charAt(int);
|
||||
public int capacity();
|
||||
public int codePointAt(int);
|
||||
public int codePointBefore(int);
|
||||
public int indexOf(java.lang.String,int);
|
||||
public int lastIndexOf(java.lang.String);
|
||||
public int lastIndexOf(java.lang.String,int);
|
||||
public int length();
|
||||
public java.lang.String substring(int);
|
||||
public java.lang.String substring(int,int);
|
||||
}
|
||||
|
||||
# Remove debugging - Throwable_printStackTrace calls. Remove all invocations of
|
||||
# Throwable.printStackTrace().
|
||||
-assumenosideeffects public class java.lang.Throwable {
|
||||
public void printStackTrace();
|
||||
}
|
||||
|
||||
# Remove debugging - Thread_dumpStack calls. Remove all invocations of
|
||||
# Thread.dumpStack().
|
||||
-assumenosideeffects public class java.lang.Thread {
|
||||
public static void dumpStack();
|
||||
}
|
||||
|
||||
# Remove debugging - All logging API calls. Remove all invocations of the
|
||||
# logging API whose return values are not used.
|
||||
-assumenosideeffects public class java.util.logging.* {
|
||||
<methods>;
|
||||
}
|
||||
|
||||
# Remove debugging - All Log4j API calls. Remove all invocations of the
|
||||
# Log4j API whose return values are not used.
|
||||
-assumenosideeffects public class org.apache.log4j.** {
|
||||
<methods>;
|
||||
}
|
||||
47
lint/proguard.conf
Normal file
47
lint/proguard.conf
Normal file
@@ -0,0 +1,47 @@
|
||||
-injars in.jar
|
||||
-outjars out.jar
|
||||
|
||||
-libraryjars 'C:\Program Files\Java\jre1.8.0_221\lib\rt.jar'
|
||||
-libraryjars lib
|
||||
|
||||
-dontwarn org.slf4j.**
|
||||
-dontskipnonpubliclibraryclassmembers
|
||||
-dontshrink
|
||||
-optimizations !code/simplification/advanced,code/simplification/*
|
||||
-printmapping mapping.txt
|
||||
-obfuscationdictionary dictionary-members.txt
|
||||
-classobfuscationdictionary dictionary-classes.txt
|
||||
-useuniqueclassmembernames
|
||||
-flattenpackagehierarchy com.volmit.iris
|
||||
-repackageclasses com.volmit.iris
|
||||
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod
|
||||
-adaptclassstrings
|
||||
-adaptresourcefilecontents **.properties,META-INF/MANIFEST.MF,**.yml
|
||||
-verbose
|
||||
|
||||
|
||||
|
||||
-keepclassmembers,allowshrinking class com.volmit.iris.object.* {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# Also keep - Enumerations. Keep the special static methods that are required in
|
||||
# enumeration classes.
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
# Also keep - Database drivers. Keep all implementations of java.sql.Driver.
|
||||
-keep class * extends java.sql.Driver
|
||||
|
||||
# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI,
|
||||
# along with the special 'createUI' method.
|
||||
-keep class * extends javax.swing.plaf.ComponentUI {
|
||||
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
|
||||
}
|
||||
|
||||
# Keep - Native method names. Keep all native class/method names.
|
||||
-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
|
||||
native <methods>;
|
||||
}
|
||||
60
lint/proguard.conf2
Normal file
60
lint/proguard.conf2
Normal file
@@ -0,0 +1,60 @@
|
||||
-injars in.jar
|
||||
-outjars out.jar
|
||||
|
||||
-libraryjars 'C:\Program Files\Java\jre1.8.0_221\lib\rt.jar'
|
||||
-libraryjars lib
|
||||
|
||||
-dontskipnonpubliclibraryclassmembers
|
||||
-dontshrink
|
||||
-optimizations code/simplification/arithmetic,code/simplification/string,code/simplification/math
|
||||
-printmapping mapping.txt
|
||||
-obfuscationdictionary dictionary-members.txt
|
||||
-classobfuscationdictionary dictionary-classes.txt
|
||||
-useuniqueclassmembernames
|
||||
-flattenpackagehierarchy com.volmit.iris
|
||||
-repackageclasses com.volmit.iris
|
||||
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod
|
||||
-adaptclassstrings
|
||||
-adaptresourcefilecontents **.properties,META-INF/MANIFEST.MF,**.yml
|
||||
-verbose
|
||||
|
||||
|
||||
|
||||
-keepclasseswithmembers class com.volmit.iris.** {
|
||||
<fields>;
|
||||
<methods>;
|
||||
}
|
||||
|
||||
-keepclassmembers,allowshrinking class com.volmit.iris.object.* {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# Also keep - Enumerations. Keep the special static methods that are required in
|
||||
# enumeration classes.
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
# Also keep - Database drivers. Keep all implementations of java.sql.Driver.
|
||||
-keep class * extends java.sql.Driver
|
||||
|
||||
# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI,
|
||||
# along with the special 'createUI' method.
|
||||
-keep class * extends javax.swing.plaf.ComponentUI {
|
||||
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
|
||||
}
|
||||
|
||||
# Keep - Native method names. Keep all native class/method names.
|
||||
-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-assumenosideeffects public class * extends org.bukkit.plugin.java.JavaPlugin {
|
||||
<methods>;
|
||||
public <methods>;
|
||||
}
|
||||
|
||||
-assumenosideeffects public class * extends com.volmit.iris.util.VolmitPlugin {
|
||||
public <methods>;
|
||||
}
|
||||
BIN
lint/proguard.jar
Normal file
BIN
lint/proguard.jar
Normal file
Binary file not shown.
BIN
lint/proguardgui.jar
Normal file
BIN
lint/proguardgui.jar
Normal file
Binary file not shown.
20226
lint/renaming-log.xml
Normal file
20226
lint/renaming-log.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lint/retrace.jar
Normal file
BIN
lint/retrace.jar
Normal file
Binary file not shown.
78
lint/script.zkm
Normal file
78
lint/script.zkm
Normal file
@@ -0,0 +1,78 @@
|
||||
/*******************************************************************************/
|
||||
/* Generated by Zelix KlassMaster 13.0.0 ZKM Script Helper 2020.08.25 16:30:31 */
|
||||
/*******************************************************************************/
|
||||
|
||||
classpath "C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\ZKM.jar"
|
||||
"C:\Program Files\Java\jre1.8.0_221\lib\resources.jar"
|
||||
"C:\Program Files\Java\jre1.8.0_221\lib\rt.jar"
|
||||
"C:\Program Files\Java\jre1.8.0_221\lib\jsse.jar"
|
||||
"C:\Program Files\Java\jre1.8.0_221\lib\jce.jar"
|
||||
"C:\Program Files\Java\jre1.8.0_221\lib\charsets.jar"
|
||||
"C:\Program Files\Java\jre1.8.0_221\lib\jfr.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\bungeecord-api.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\craftbukkit-14.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\craftbukkit-1.15.2.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\craftbukkit-1.16.1.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\craftbukkit-1.16.2.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\lombok-1.18.10.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\slf4j-simp.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\zt-zip-1.14.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\worldedit-core-7.2.0-20200907.181948-146.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\worldedit-bukkit-7.2.0-20200907.181948-147.jar"
|
||||
"C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\lib\spigot.jar";
|
||||
|
||||
open "C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\in.jar";
|
||||
|
||||
trimExclude *.Iris and
|
||||
* extends com.volmit.iris.util.MortarCommand and
|
||||
*.* @com.volmit.iris.util.Command * and
|
||||
@com.volmit.iris.generator.legacy.post.Post *.* and
|
||||
@org.bukkit.event.EventHandler *.* and
|
||||
*.* @org.bukkit.event.EventHandler * and
|
||||
*.* @org.bukkit.event.EventHandler *(*) and
|
||||
*.* extends com.volmit.iris.util.IrisPostBlockFilter;
|
||||
|
||||
trim deleteSourceFileAttributes=false
|
||||
deleteDeprecatedAttributes=false
|
||||
deleteAnnotationAttributes=false
|
||||
deleteExceptionAttributes=false
|
||||
deleteUnknownAttributes=false;
|
||||
|
||||
exclude @com.volmit.iris.util.DontObfuscate *.* and
|
||||
*.* @com.volmit.iris.util.DontObfuscate * and
|
||||
*.* @com.volmit.iris.util.DontObfuscate *(*) and
|
||||
*.Iris and
|
||||
@org.bukkit.event.EventHandler *.* and
|
||||
*.* @org.bukkit.event.EventHandler * and
|
||||
*.* @org.bukkit.event.EventHandler *(*) and
|
||||
public *.^* and
|
||||
*.* public * and
|
||||
*.* protected * and
|
||||
*.* public *(*) and
|
||||
*.* protected *(*) and
|
||||
com.google.*. and
|
||||
*.TypeAdapter and
|
||||
com.google.gson.^TypeAdapter *(*) and
|
||||
com.google.gson.^* *(*) and
|
||||
*.* extends com.volmit.iris.util.IrisPostBlockFilter *(*) and
|
||||
*.PostBlockChunkGenerator * and
|
||||
*.PostBlockChunkGenerator *(*) and
|
||||
com.volmit.iris.generator.legacy.post.^* and
|
||||
com.volmit.iris.generator.legacy.post.;
|
||||
|
||||
obfuscate changeLogFileIn=""
|
||||
changeLogFileOut="ChangeLog.txt"
|
||||
keepInnerClassInfo=true
|
||||
obfuscateFlow=normal
|
||||
exceptionObfuscation=light
|
||||
encryptStringLiterals=flowObfuscate
|
||||
mixedCaseClassNames=false
|
||||
randomize=true
|
||||
localVariables=obfuscate
|
||||
lineNumbers=scramble
|
||||
autoReflectionHandling=normal
|
||||
obfuscateReferences=none
|
||||
methodParameterChanges=flowObfuscate
|
||||
keepBalancedLocks=true;
|
||||
|
||||
saveAll archiveCompression=all "C:\Users\cyberpwn\Documents\development\workspace\Iris\lint\out";
|
||||
BIN
lint/yguard.jar
Normal file
BIN
lint/yguard.jar
Normal file
Binary file not shown.
69
plains.json
Normal file
69
plains.json
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"children": [],
|
||||
"decorators": [],
|
||||
"objects": [],
|
||||
"name": "Plains",
|
||||
"layers": [
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 3,
|
||||
"palette": [
|
||||
"GRASS_BLOCK"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 1,
|
||||
"palette": [
|
||||
"DIRT"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 3,
|
||||
"palette": [
|
||||
"DIRT",
|
||||
"COARSE_DIRT"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 6,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 2341,
|
||||
"palette": [
|
||||
"STONE",
|
||||
"ANDESITE",
|
||||
"STONE"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
}
|
||||
],
|
||||
"childShrinkFactor": 1.55,
|
||||
"derivative": "THE_VOID",
|
||||
"auxiliaryGenerators": [
|
||||
{
|
||||
"offsetX": 0,
|
||||
"offsetZ": 0.01,
|
||||
"min": 1,
|
||||
"seed": 1336,
|
||||
"max": 5,
|
||||
"zoom": 3.065
|
||||
},
|
||||
{
|
||||
"offsetX": 0,
|
||||
"offsetZ": 0,
|
||||
"min": 1.01,
|
||||
"seed": 1339,
|
||||
"max": 2,
|
||||
"zoom": 1.6
|
||||
}
|
||||
],
|
||||
"highHeight": 3.66669,
|
||||
"lowHeight": 31.5
|
||||
}
|
||||
211
pom.xml
211
pom.xml
@@ -2,15 +2,19 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>bytecode.ninja</groupId>
|
||||
<groupId>com.volmit</groupId>
|
||||
<artifactId>Iris</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.3.2</version>
|
||||
<name>Iris</name>
|
||||
<properties>
|
||||
<skip.copy>false</skip.copy>
|
||||
<secretary.build>package</secretary.build>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<development.location>${user.home}\Documents\development\server\plugins\${project.name}.jar</development.location>
|
||||
<development.location.dan>${user.home}\Documents\development\server\plugins\${project.name}.jar</development.location.dan>
|
||||
<development.location.brian>D:\Dan\MinecraftDevelopment\server\plugins\${project.name}.jar</development.location.brian>
|
||||
<lint.in>${project.basedir}\lint\in.jar</lint.in>
|
||||
</properties>
|
||||
<build>
|
||||
<resources>
|
||||
@@ -22,7 +26,7 @@
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.txt</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.html</include>
|
||||
<include>**/*.json</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
@@ -38,67 +42,192 @@
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<minimizeJar>false</minimizeJar>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>runbatchfile</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>${skip.copy}</skip>
|
||||
<executable>${project.basedir}/scripts/copy.bat</executable>
|
||||
<arguments>
|
||||
<argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument>
|
||||
<argument>${development.location}</argument>
|
||||
</arguments>
|
||||
<compilerVersion>1.8</compilerVersion>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dan</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>runbatchfile</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${skip.copy}</skip>
|
||||
<executable>${project.basedir}/scripts/copy.bat</executable>
|
||||
<arguments>
|
||||
<argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument>
|
||||
<argument>${development.location.dan}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>brian</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>runbatchfile</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${skip.copy}</skip>
|
||||
<executable>${project.basedir}/scripts/copy.bat</executable>
|
||||
<arguments>
|
||||
<argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument>
|
||||
<argument>${development.location.brian}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>runbatchfile</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${skip.copy}</skip>
|
||||
<executable>${project.basedir}/scripts/release.bat</executable>
|
||||
<arguments>
|
||||
<argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument>
|
||||
<argument>${lint.in}</argument>
|
||||
<argument>${project.version}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>pub</id>
|
||||
<url>http://nexus.mpm.care/content/repositories/pub</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>volmit</id>
|
||||
<url>http://nexus.volmit.com/content/repositories/volmit</url>
|
||||
<url>http://repo.volmit.com/repository/volmit/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ninja.bytecode</groupId>
|
||||
<artifactId>Shuriken</artifactId>
|
||||
<version>1.0</version>
|
||||
<groupId>io.timeandspace</groupId>
|
||||
<artifactId>smoothie-map</artifactId>
|
||||
<version>2.0.2</version>
|
||||
</dependency>
|
||||
<!-- Spigot API -->
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- Paper API -->
|
||||
<dependency>
|
||||
<groupId>io.papermc</groupId>
|
||||
<artifactId>paperlib</artifactId>
|
||||
<version>1.0.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- NMS -->
|
||||
<dependency>
|
||||
<groupId>org.bukkit.craftbukkit</groupId>
|
||||
<artifactId>1.16.3</artifactId>
|
||||
<version>1.16.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>craftbukkit-1.14.4</artifactId>
|
||||
<groupId>cb</groupId>
|
||||
<version>1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/craftbukkit-1.14.4.jar</systemPath>
|
||||
<groupId>org.bukkit.craftbukkit</groupId>
|
||||
<artifactId>1.16.4</artifactId>
|
||||
<version>1.16.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- Hooks -->
|
||||
<dependency>
|
||||
<groupId>com.bergerkiller.bukkit</groupId>
|
||||
<artifactId>BKCommonLib</artifactId>
|
||||
<version>1.16.4-v2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.lumine.xikage</groupId>
|
||||
<artifactId>MythicMobs</artifactId>
|
||||
<version>4.9.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- Utilities -->
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>2.8.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.10</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.zeroturnaround</groupId>
|
||||
<artifactId>zt-zip</artifactId>
|
||||
<version>1.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
9
scripts/release.bat
Normal file
9
scripts/release.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@Echo off
|
||||
echo Apply Script: COPY
|
||||
echo F|xcopy /y /s /f /q "%1" "%2"
|
||||
echo F|xcopy /y /s /f /q "lint/in.jar" "release/latest/Origin-%3.jar"
|
||||
echo Starting the Washing Machine
|
||||
echo F|xcopy /y /s /f /q "lint/in.jar" "release/latest/Iris-%3.jar"
|
||||
cd release
|
||||
echo F|xcopy /y /s /f /q /E "latest" "%3/"
|
||||
rmdir /Q/S latest
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.minelazz.epicworldgenerator.structures;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.object.IrisObject;
|
||||
import com.volmit.iris.util.B;
|
||||
import com.volmit.iris.util.DontObfuscate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.util.BlockVector;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@DontObfuscate
|
||||
public class StructureObject implements Serializable
|
||||
{
|
||||
@DontObfuscate
|
||||
public static final String MESSAGE0 = "This was created from .ewg serialization files";
|
||||
|
||||
@DontObfuscate
|
||||
public static final String MESSAGE1 = "This is not copied code, it is intended to ";
|
||||
|
||||
@DontObfuscate
|
||||
public static final String MESSAGE2 = "be used so that people can convert EWG files";
|
||||
|
||||
@DontObfuscate
|
||||
public static final String MESSAGE3 = "into .IOB files (iris objects)";
|
||||
|
||||
@DontObfuscate
|
||||
public static IrisObject convert(File so) throws IOException, ClassNotFoundException
|
||||
{
|
||||
FileInputStream fin = new FileInputStream(so);
|
||||
ObjectInputStream in = new ObjectInputStream(fin);
|
||||
StructureObject o = (StructureObject) in.readObject();
|
||||
in.close();
|
||||
int maxX = 0;
|
||||
int maxY = 0;
|
||||
int maxZ = 0;
|
||||
int minX = 0;
|
||||
int minY = 0;
|
||||
int minZ = 0;
|
||||
|
||||
for(SOBlock i : o.blocks)
|
||||
{
|
||||
maxX = maxX < i.x ? i.x : maxX;
|
||||
maxY = maxY < i.y ? i.y : maxY;
|
||||
maxZ = maxZ < i.z ? i.z : maxZ;
|
||||
minX = minX > i.x ? i.x : minX;
|
||||
minY = minY > i.y ? i.y : minY;
|
||||
minZ = minZ > i.z ? i.z : minZ;
|
||||
}
|
||||
|
||||
IrisObject iob = new IrisObject(maxX - minX, maxY - minY, maxZ - minZ);
|
||||
|
||||
for(SOBlock i : o.blocks)
|
||||
{
|
||||
BlockData bdx = null;
|
||||
|
||||
if(i.blockData == null)
|
||||
{
|
||||
BlockData f = map(i.id, i.data);
|
||||
bdx = f == null ? null : f;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
bdx = B.get(i.blockData);
|
||||
}
|
||||
|
||||
if(bdx != null)
|
||||
{
|
||||
iob.getBlocks().put(new BlockVector(i.x, -i.y, i.z), bdx);
|
||||
}
|
||||
}
|
||||
|
||||
return iob;
|
||||
}
|
||||
|
||||
@DontObfuscate
|
||||
@SuppressWarnings("deprecation")
|
||||
private static final BlockData map(int id, int dat)
|
||||
{
|
||||
for(Material i : EnumSet.allOf(Material.class))
|
||||
{
|
||||
if(!i.isLegacy())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(i.getId() == id)
|
||||
{
|
||||
return Bukkit.getUnsafe().fromLegacy(i, (byte) dat);
|
||||
}
|
||||
}
|
||||
|
||||
Iris.warn("Unknown Type " + id + ":" + dat);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@DontObfuscate
|
||||
private static final long serialVersionUID = -905274143366977303L;
|
||||
|
||||
@DontObfuscate
|
||||
public SOBlock[] blocks;
|
||||
@DontObfuscate
|
||||
public String name;
|
||||
|
||||
@DontObfuscate
|
||||
public final class SOBlock implements Serializable
|
||||
{
|
||||
@DontObfuscate
|
||||
private static final long serialVersionUID = 2610063934261982315L;
|
||||
|
||||
@DontObfuscate
|
||||
public final int x;
|
||||
|
||||
@DontObfuscate
|
||||
public final int y;
|
||||
|
||||
@DontObfuscate
|
||||
public final int z;
|
||||
|
||||
@DontObfuscate
|
||||
public final int id;
|
||||
|
||||
@DontObfuscate
|
||||
public final int data;
|
||||
|
||||
@DontObfuscate
|
||||
public String meta;
|
||||
|
||||
@DontObfuscate
|
||||
public String blockData;
|
||||
|
||||
@DontObfuscate
|
||||
final StructureObject ref;
|
||||
|
||||
@DontObfuscate
|
||||
public SOBlock(StructureObject structureObject, int x, int y, int z, String string)
|
||||
{
|
||||
this.ref = structureObject;
|
||||
meta = null;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
id = -1;
|
||||
data = 0;
|
||||
blockData = string;
|
||||
}
|
||||
}
|
||||
}
|
||||
524
src/main/java/com/volmit/iris/Iris.java
Normal file
524
src/main/java/com/volmit/iris/Iris.java
Normal file
@@ -0,0 +1,524 @@
|
||||
package com.volmit.iris;
|
||||
|
||||
import com.volmit.iris.manager.*;
|
||||
import com.volmit.iris.manager.command.CommandIris;
|
||||
import com.volmit.iris.manager.command.PermissionIris;
|
||||
import com.volmit.iris.manager.link.BKLink;
|
||||
import com.volmit.iris.manager.link.CitizensLink;
|
||||
import com.volmit.iris.manager.link.MultiverseCoreLink;
|
||||
import com.volmit.iris.manager.link.MythicMobsLink;
|
||||
import com.volmit.iris.nms.INMS;
|
||||
import com.volmit.iris.object.IrisCompat;
|
||||
import com.volmit.iris.scaffold.IrisWorlds;
|
||||
import com.volmit.iris.scaffold.engine.EngineCompositeGenerator;
|
||||
import com.volmit.iris.util.*;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public class Iris extends VolmitPlugin
|
||||
{
|
||||
public static KList<GroupedExecutor> executors = new KList<>();
|
||||
public static Iris instance;
|
||||
public static ProjectManager proj;
|
||||
public static ConversionManager convert;
|
||||
public static WandManager wand;
|
||||
public static EditManager edit;
|
||||
public static IrisBoardManager board;
|
||||
public static BKLink linkBK;
|
||||
public static MultiverseCoreLink linkMultiverseCore;
|
||||
public static MythicMobsLink linkMythicMobs;
|
||||
public static CitizensLink linkCitizens;
|
||||
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
||||
public static boolean customModels = doesSupportCustomModels();
|
||||
public static boolean awareEntities = doesSupportAwareness();
|
||||
public static boolean biome3d = doesSupport3DBiomes();
|
||||
public static boolean lowMemoryMode = false;
|
||||
public static IrisCompat compat;
|
||||
public static FileWatcher configWatcher;
|
||||
|
||||
@Permission
|
||||
public static PermissionIris perm;
|
||||
|
||||
@com.volmit.iris.util.Command
|
||||
public CommandIris commandIris;
|
||||
|
||||
public Iris()
|
||||
{
|
||||
instance = this;
|
||||
INMS.get();
|
||||
IO.delete(new File("iris"));
|
||||
lowMemoryMode = Runtime.getRuntime().maxMemory() < 4000000000L; // 4 * 1000 * 1000 * 1000 // 4g
|
||||
}
|
||||
|
||||
public static int getThreadCount()
|
||||
{
|
||||
int tc = IrisSettings.get().getConcurrency().getThreadCount();
|
||||
|
||||
if(tc <= 0)
|
||||
{
|
||||
int p = Runtime.getRuntime().availableProcessors();
|
||||
|
||||
return p > 16 ? 16 : p < 4 ? 4 : p;
|
||||
}
|
||||
|
||||
return tc;
|
||||
}
|
||||
|
||||
private static boolean doesSupport3DBiomes()
|
||||
{
|
||||
try
|
||||
{
|
||||
int v = Integer.parseInt(Bukkit.getBukkitVersion().split("\\Q-\\E")[0].split("\\Q.\\E")[1]);
|
||||
|
||||
return v >= 15;
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean doesSupportCustomModels()
|
||||
{
|
||||
try
|
||||
{
|
||||
int v = Integer.parseInt(Bukkit.getBukkitVersion().split("\\Q-\\E")[0].split("\\Q.\\E")[1]);
|
||||
|
||||
return v >= 14;
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean doesSupportAwareness()
|
||||
{
|
||||
try
|
||||
{
|
||||
int v = Integer.parseInt(Bukkit.getBukkitVersion().split("\\Q-\\E")[0].split("\\Q.\\E")[1]);
|
||||
|
||||
return v >= 15;
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag(String subTag)
|
||||
{
|
||||
return C.BOLD + "" + C.DARK_GRAY + "[" + C.BOLD + "" + C.GREEN + "Iris" + C.BOLD + C.DARK_GRAY + "]" + C.RESET + "" + C.GRAY + ": ";
|
||||
}
|
||||
|
||||
public void onEnable()
|
||||
{
|
||||
instance = this;
|
||||
try {
|
||||
compat = IrisCompat.configured(getDataFile("compat.json"));
|
||||
} catch (IOException e){
|
||||
// Do nothing. Everything continues properly but the exception is still there.
|
||||
}
|
||||
proj = new ProjectManager();
|
||||
convert = new ConversionManager();
|
||||
wand = new WandManager();
|
||||
board = new IrisBoardManager();
|
||||
linkMultiverseCore = new MultiverseCoreLink();
|
||||
linkBK = new BKLink();
|
||||
linkMythicMobs = new MythicMobsLink();
|
||||
edit = new EditManager();
|
||||
configWatcher = new FileWatcher(getDataFile("settings.json"));
|
||||
J.a(() -> IO.delete(getTemp()));
|
||||
J.a(this::bstats);
|
||||
J.s(this::splash, 20);
|
||||
J.sr(this::tickQueue, 0);
|
||||
J.ar(this::checkConfigHotload, 50);
|
||||
PaperLib.suggestPaper(this);
|
||||
super.onEnable();
|
||||
}
|
||||
|
||||
private void checkConfigHotload() {
|
||||
if(configWatcher.checkModified())
|
||||
{
|
||||
IrisSettings.invalidate();
|
||||
IrisSettings.get();
|
||||
configWatcher.checkModified();
|
||||
Iris.info("Hotloaded settings.json");
|
||||
}
|
||||
}
|
||||
|
||||
public void onDisable()
|
||||
{
|
||||
if(IrisSettings.get().isStudio())
|
||||
{
|
||||
proj.close();
|
||||
|
||||
for(World i : Bukkit.getWorlds())
|
||||
{
|
||||
if(IrisWorlds.isIrisWorld(i))
|
||||
{
|
||||
IrisWorlds.access(i).close();
|
||||
}
|
||||
}
|
||||
|
||||
for(GroupedExecutor i : executors)
|
||||
{
|
||||
i.close();
|
||||
}
|
||||
}
|
||||
|
||||
executors.clear();
|
||||
board.disable();
|
||||
Bukkit.getScheduler().cancelTasks(this);
|
||||
HandlerList.unregisterAll((Plugin) this);
|
||||
super.onDisable();
|
||||
}
|
||||
|
||||
public static void sq(Runnable r)
|
||||
{
|
||||
synchronized(syncJobs)
|
||||
{
|
||||
syncJobs.queue(r);
|
||||
}
|
||||
}
|
||||
|
||||
private void tickQueue()
|
||||
{
|
||||
synchronized(Iris.syncJobs)
|
||||
{
|
||||
if(!Iris.syncJobs.hasNext())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
long ms = M.ms();
|
||||
|
||||
while(Iris.syncJobs.hasNext() && M.ms() - ms < 25)
|
||||
{
|
||||
try
|
||||
{
|
||||
Iris.syncJobs.next().run();
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void bstats()
|
||||
{
|
||||
if(IrisSettings.get().getGeneral().isPluginMetrics())
|
||||
{
|
||||
J.s(() -> {
|
||||
Metrics m = new Metrics(Iris.instance, 8757);
|
||||
|
||||
m.addCustomChart(new Metrics.SingleLineChart("custom_dimensions", new Callable<Integer>() {
|
||||
@Override
|
||||
public Integer call() throws Exception {
|
||||
return ProjectManager.countUniqueDimensions();
|
||||
}
|
||||
}));
|
||||
|
||||
m.addCustomChart(new Metrics.SimplePie("using_custom_dimensions", new Callable<String>() {
|
||||
@Override
|
||||
public String call() throws Exception {
|
||||
return ProjectManager.countUniqueDimensions() > 0 ? "Active Projects" : "No Projects";
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static File getTemp()
|
||||
{
|
||||
return instance.getDataFolder("cache", "temp");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
|
||||
{
|
||||
return super.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
public void imsg(CommandSender s, String msg)
|
||||
{
|
||||
s.sendMessage(C.GREEN + "[" + C.DARK_GRAY + "Iris" + C.GREEN + "]" + C.GRAY + ": " + msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id)
|
||||
{
|
||||
String dimension = IrisSettings.get().getGenerator().getDefaultWorldType();
|
||||
|
||||
if(id != null && !id.isEmpty())
|
||||
{
|
||||
dimension = id;
|
||||
Iris.info("Generator ID: " + id + " requested by bukkit/plugin. Assuming IrisDimension: " + id);
|
||||
}
|
||||
|
||||
return new EngineCompositeGenerator(dimension, true);
|
||||
}
|
||||
|
||||
public static void msg(String string)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(instance == null)
|
||||
{
|
||||
System.out.println("[Iris]: " + string);
|
||||
return;
|
||||
}
|
||||
|
||||
String msg = C.GRAY + "[" + C.GREEN + "Iris" + C.GRAY + "]: " + string;
|
||||
Bukkit.getConsoleSender().sendMessage(msg);
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
System.out.println("[Iris]: " + string);
|
||||
}
|
||||
}
|
||||
|
||||
public static File getCached(String name, String url)
|
||||
{
|
||||
String h = IO.hash(name + "@" + url);
|
||||
File f = Iris.instance.getDataFile("cache", h.substring(0, 2), h.substring(3, 5), h);
|
||||
|
||||
if(!f.exists())
|
||||
{
|
||||
try(BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f))
|
||||
{
|
||||
byte[] dataBuffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while((bytesRead = in.read(dataBuffer, 0, 1024)) != -1)
|
||||
{
|
||||
fileOutputStream.write(dataBuffer, 0, bytesRead);
|
||||
Iris.verbose("Aquiring " + name);
|
||||
}
|
||||
}
|
||||
|
||||
catch(IOException ignored)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return f.exists() ? f : null;
|
||||
}
|
||||
|
||||
public static String getNonCached(String name, String url)
|
||||
{
|
||||
String h = IO.hash(name + "*" + url);
|
||||
File f = Iris.instance.getDataFile("cache", h.substring(0, 2), h.substring(3, 5), h);
|
||||
|
||||
try(BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f))
|
||||
{
|
||||
byte[] dataBuffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while((bytesRead = in.read(dataBuffer, 0, 1024)) != -1)
|
||||
{
|
||||
fileOutputStream.write(dataBuffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
|
||||
catch(IOException ignored)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return IO.readAll(f);
|
||||
}
|
||||
|
||||
catch(IOException ignored)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static File getNonCachedFile(String name, String url)
|
||||
{
|
||||
String h = IO.hash(name + "*" + url);
|
||||
File f = Iris.instance.getDataFile("cache", h.substring(0, 2), h.substring(3, 5), h);
|
||||
|
||||
try(BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f))
|
||||
{
|
||||
byte[] dataBuffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while((bytesRead = in.read(dataBuffer, 0, 1024)) != -1)
|
||||
{
|
||||
fileOutputStream.write(dataBuffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
|
||||
catch(IOException ignored)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
public static void warn(String string)
|
||||
{
|
||||
msg(C.YELLOW + string);
|
||||
}
|
||||
|
||||
public static void error(String string)
|
||||
{
|
||||
msg(C.RED + string);
|
||||
}
|
||||
|
||||
public static void verbose(String string)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(IrisSettings.get().getGeneral().isVerbose())
|
||||
{
|
||||
msg(C.GRAY + string);
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
msg(C.GRAY + string);
|
||||
}
|
||||
}
|
||||
|
||||
public static void success(String string)
|
||||
{
|
||||
msg(C.GREEN + string);
|
||||
}
|
||||
|
||||
public static void info(String string)
|
||||
{
|
||||
msg(C.WHITE + string);
|
||||
}
|
||||
|
||||
public void hit(long hits2)
|
||||
{
|
||||
board.hits.put(hits2);
|
||||
}
|
||||
|
||||
public void splash()
|
||||
{
|
||||
if(!IrisSettings.get().getGeneral().isSplashLogoStartup())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// @NoArgsConstructor
|
||||
String padd = Form.repeat(" ", 8);
|
||||
String padd2 = Form.repeat(" ", 4);
|
||||
String[] info = {"", "", "", "", "", padd2 + C.GREEN + " Iris", padd2 + C.GRAY + " by " + C.randomColor() + "V" + C.randomColor() + "o" + C.randomColor() + "l" + C.randomColor() + "m" + C.randomColor() + "i" + C.randomColor() + "t" + C.randomColor() + "S" + C.randomColor() + "o" + C.randomColor() + "f" + C.randomColor() + "t" + C.randomColor() + "w" + C.randomColor() + "a" + C.randomColor() + "r" + C.randomColor() + "e", padd2 + C.GRAY + " v" + getDescription().getVersion(),
|
||||
};
|
||||
String[] splash = {padd + C.GRAY + " @@@@@@@@@@@@@@" + C.DARK_GRAY + "@@@", padd + C.GRAY + " @@&&&&&&&&&" + C.DARK_GRAY + "&&&&&&" + C.GREEN + " .(((()))). ", padd + C.GRAY + "@@@&&&&&&&&" + C.DARK_GRAY + "&&&&&" + C.GREEN + " .((((((())))))). ", padd + C.GRAY + "@@@&&&&&" + C.DARK_GRAY + "&&&&&&&" + C.GREEN + " ((((((((())))))))) " + C.GRAY + " @", padd + C.GRAY + "@@@&&&&" + C.DARK_GRAY + "@@@@@&" + C.GREEN + " ((((((((-))))))))) " + C.GRAY + " @@", padd + C.GRAY + "@@@&&" + C.GREEN + " ((((((({ })))))))) " + C.GRAY + " &&@@@", padd + C.GRAY + "@@" + C.GREEN + " ((((((((-))))))))) " + C.DARK_GRAY + "&@@@@@" + C.GRAY + "&&&&@@@", padd + C.GRAY + "@" + C.GREEN + " ((((((((())))))))) " + C.DARK_GRAY + "&&&&&" + C.GRAY + "&&&&&&&@@@", padd + C.GRAY + "" + C.GREEN + " '((((((()))))))' " + C.DARK_GRAY + "&&&&&" + C.GRAY + "&&&&&&&&@@@", padd + C.GRAY + "" + C.GREEN + " '(((())))' " + C.DARK_GRAY + "&&&&&&&&" + C.GRAY + "&&&&&&&@@", padd + C.GRAY + " " + C.DARK_GRAY + "@@@" + C.GRAY + "@@@@@@@@@@@@@@"
|
||||
};
|
||||
//@done
|
||||
Iris.info(Bukkit.getVersion());
|
||||
Iris.info(Bukkit.getBukkitVersion() + " bk");
|
||||
for(int i = 0; i < info.length; i++)
|
||||
{
|
||||
splash[i] += info[i];
|
||||
}
|
||||
|
||||
Iris.info("\n\n " + new KList<>(splash).toString("\n") + "\n");
|
||||
|
||||
if(lowMemoryMode)
|
||||
{
|
||||
Iris.verbose("* Low Memory mode Activated! For better performance, allocate 4gb or more to this server.");
|
||||
}
|
||||
|
||||
if(!biome3d)
|
||||
{
|
||||
Iris.verbose("* This version of minecraft does not support 3D biomes (1.15 and up). Iris will generate as normal, but biome colors will not vary underground & in the sky.");
|
||||
}
|
||||
|
||||
if(!customModels)
|
||||
{
|
||||
Iris.verbose("* This version of minecraft does not support custom model data in loot items (1.14 and up). Iris will generate as normal, but loot will not have custom models.");
|
||||
}
|
||||
|
||||
if(!doesSupportAwareness())
|
||||
{
|
||||
Iris.verbose("* This version of minecraft does not support entity awareness.");
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void later(NastyRunnable object)
|
||||
{
|
||||
Bukkit.getScheduler().scheduleAsyncDelayedTask(instance, () ->
|
||||
{
|
||||
try
|
||||
{
|
||||
object.run();
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}, RNG.r.i(100, 1200));
|
||||
}
|
||||
|
||||
public static int jobCount()
|
||||
{
|
||||
return syncJobs.size();
|
||||
}
|
||||
|
||||
public static void clearQueues()
|
||||
{
|
||||
synchronized(syncJobs)
|
||||
{
|
||||
syncJobs.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isMCA() {
|
||||
return IrisSettings.get().getGenerator().isMcaPregenerator();
|
||||
}
|
||||
}
|
||||
262
src/main/java/com/volmit/iris/IrisSettings.java
Normal file
262
src/main/java/com/volmit/iris/IrisSettings.java
Normal file
@@ -0,0 +1,262 @@
|
||||
package com.volmit.iris;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.volmit.iris.util.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@Data
|
||||
public class IrisSettings
|
||||
{
|
||||
public static transient IrisSettings settings;
|
||||
private IrisSettingsCache cache = new IrisSettingsCache();
|
||||
private IrisSettingsConcurrency concurrency = new IrisSettingsConcurrency();
|
||||
private IrisSettingsParallax parallax = new IrisSettingsParallax();
|
||||
private IrisSettingsGeneral general = new IrisSettingsGeneral();
|
||||
private IrisSettingsGUI gui = new IrisSettingsGUI();
|
||||
private IrisSettingsGenerator generator = new IrisSettingsGenerator();
|
||||
private IrisSettingsStudio studio = new IrisSettingsStudio();
|
||||
|
||||
@DontObfuscate
|
||||
public int configurationVersion = 3;
|
||||
|
||||
public boolean isStudio() {
|
||||
return getStudio().isStudio();
|
||||
}
|
||||
|
||||
public boolean isUseServerLaunchedGuis() {
|
||||
return getGui().isUseServerLaunchedGuis();
|
||||
}
|
||||
|
||||
public long getParallaxRegionEvictionMS() {
|
||||
return getParallax().getParallaxRegionEvictionMS();
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsCache
|
||||
{
|
||||
@DontObfuscate
|
||||
public int streamingCacheSize = 8192;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsConcurrency
|
||||
{
|
||||
@DontObfuscate
|
||||
public int threadCount = -1;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsParallax
|
||||
{
|
||||
@DontObfuscate
|
||||
public int parallaxRegionEvictionMS = 15000;
|
||||
|
||||
@DontObfuscate
|
||||
public int parallaxChunkEvictionMS = 5000;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsGeneral
|
||||
{
|
||||
|
||||
@DontObfuscate
|
||||
public boolean commandSounds = true;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean verbose = false;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean ignoreWorldEdit = false;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean disableNMS = false;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean pluginMetrics = true;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean splashLogoStartup = true;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsGUI
|
||||
{
|
||||
@DontObfuscate
|
||||
public boolean useServerLaunchedGuis = true;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean maximumPregenGuiFPS = false;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean localPregenGui = true;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsGenerator
|
||||
{
|
||||
@DontObfuscate
|
||||
public String defaultWorldType = "overworld";
|
||||
|
||||
@DontObfuscate
|
||||
public boolean mcaPregenerator = false;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean systemEffects = true;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean systemEntitySpawnOverrides = true;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean systemEntityInitialSpawns = true;
|
||||
|
||||
@DontObfuscate
|
||||
public int maxBiomeChildDepth = 5;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsStudio
|
||||
{
|
||||
|
||||
@DontObfuscate
|
||||
public boolean studio = true;
|
||||
|
||||
@DontObfuscate
|
||||
public boolean openVSCode = true;
|
||||
}
|
||||
|
||||
public static IrisSettings get()
|
||||
{
|
||||
if(settings != null)
|
||||
{
|
||||
return settings;
|
||||
}
|
||||
|
||||
IrisSettings defaults = new IrisSettings();
|
||||
JSONObject def = new JSONObject(new Gson().toJson(defaults));
|
||||
if(settings == null)
|
||||
{
|
||||
settings = new IrisSettings();
|
||||
|
||||
File s = Iris.instance.getDataFile("settings.json");
|
||||
|
||||
if(!s.exists())
|
||||
{
|
||||
try
|
||||
{
|
||||
IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4));
|
||||
}
|
||||
|
||||
catch(JSONException | IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
String ss = IO.readAll(s);
|
||||
settings = new Gson().fromJson(ss, IrisSettings.class);
|
||||
|
||||
J.a(() ->
|
||||
{
|
||||
try
|
||||
{
|
||||
JSONObject j = new JSONObject(ss);
|
||||
boolean u = false;
|
||||
for(String i : def.keySet())
|
||||
{
|
||||
if(!j.has(i))
|
||||
{
|
||||
u = true;
|
||||
j.put(i, def.get(i));
|
||||
Iris.warn("Adding new config key: " + i);
|
||||
}
|
||||
}
|
||||
|
||||
for(String i : new KSet<>(j.keySet()))
|
||||
{
|
||||
if(!def.has(i))
|
||||
{
|
||||
u = true;
|
||||
j.remove(i);
|
||||
Iris.warn("Removing unused config key: " + i);
|
||||
}
|
||||
}
|
||||
|
||||
if(u)
|
||||
{
|
||||
try
|
||||
{
|
||||
IO.writeAll(s, j.toString(4));
|
||||
Iris.info("Updated Configuration Files");
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable ee)
|
||||
{
|
||||
Iris.error("Configuration Error in settings.json! " + ee.getClass().getSimpleName() + ": " + ee.getMessage());
|
||||
Iris.warn("Attempting to fix configuration while retaining valid in-memory settings...");
|
||||
|
||||
try {
|
||||
IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4));
|
||||
Iris.info("Configuration Fixed!");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Iris.error("ERROR! CONFIGURATION IMPOSSIBLE TO READ! Using an unmodifiable configuration from memory. Please delete the settings.json at some point to try to restore configurability!");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
catch(Throwable ee)
|
||||
{
|
||||
Iris.error("Configuration Error in settings.json! " + ee.getClass().getSimpleName() + ": " + ee.getMessage());
|
||||
Iris.warn("Attempting to fix configuration while retaining valid in-memory settings...");
|
||||
|
||||
try {
|
||||
IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4));
|
||||
Iris.info("Configuration Fixed!");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Iris.error("ERROR! CONFIGURATION IMPOSSIBLE TO READ! Using an unmodifiable configuration from memory. Please delete the settings.json at some point to try to restore configurability!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!s.exists())
|
||||
{
|
||||
try
|
||||
{
|
||||
IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4));
|
||||
}
|
||||
|
||||
catch(JSONException | IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
public static void invalidate()
|
||||
{
|
||||
synchronized(settings)
|
||||
{
|
||||
settings = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
364
src/main/java/com/volmit/iris/generator/IrisComplex.java
Normal file
364
src/main/java/com/volmit/iris/generator/IrisComplex.java
Normal file
@@ -0,0 +1,364 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.google.common.util.concurrent.AtomicDouble;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.generator.actuator.IrisTerrainActuator;
|
||||
import com.volmit.iris.generator.modifier.IrisCaveModifier;
|
||||
import com.volmit.iris.generator.noise.CNG;
|
||||
import com.volmit.iris.manager.IrisDataManager;
|
||||
import com.volmit.iris.object.*;
|
||||
import com.volmit.iris.scaffold.data.DataProvider;
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.stream.ProceduralStream;
|
||||
import com.volmit.iris.scaffold.stream.interpolation.Interpolated;
|
||||
import com.volmit.iris.util.CaveResult;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.M;
|
||||
import com.volmit.iris.util.RNG;
|
||||
import lombok.Data;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@Data
|
||||
public class IrisComplex implements DataProvider
|
||||
{
|
||||
private RNG rng;
|
||||
private double fluidHeight;
|
||||
private IrisDataManager data;
|
||||
private KList<IrisGenerator> generators;
|
||||
private static final BlockData AIR = Material.AIR.createBlockData();
|
||||
private ProceduralStream<IrisRegion> regionStream;
|
||||
private ProceduralStream<InferredType> bridgeStream;
|
||||
private ProceduralStream<IrisBiome> landBiomeStream;
|
||||
private ProceduralStream<IrisBiome> caveBiomeStream;
|
||||
private ProceduralStream<IrisBiome> seaBiomeStream;
|
||||
private ProceduralStream<IrisBiome> shoreBiomeStream;
|
||||
private ProceduralStream<IrisBiome> baseBiomeStream;
|
||||
private ProceduralStream<IrisBiome> trueBiomeStream;
|
||||
private ProceduralStream<Biome> trueBiomeDerivativeStream;
|
||||
private ProceduralStream<Double> heightStream;
|
||||
private ProceduralStream<Double> objectChanceStream;
|
||||
private ProceduralStream<Double> maxHeightStream;
|
||||
private ProceduralStream<Double> overlayStream;
|
||||
private ProceduralStream<Double> heightFluidStream;
|
||||
private ProceduralStream<Integer> trueHeightStream;
|
||||
private ProceduralStream<Double> slopeStream;
|
||||
private ProceduralStream<RNG> rngStream;
|
||||
private ProceduralStream<RNG> chunkRngStream;
|
||||
private ProceduralStream<IrisDecorator> terrainSurfaceDecoration;
|
||||
private ProceduralStream<IrisDecorator> terrainCeilingDecoration;
|
||||
private ProceduralStream<IrisDecorator> terrainCaveSurfaceDecoration;
|
||||
private ProceduralStream<IrisDecorator> terrainCaveCeilingDecoration;
|
||||
private ProceduralStream<IrisDecorator> seaSurfaceDecoration;
|
||||
private ProceduralStream<IrisDecorator> shoreSurfaceDecoration;
|
||||
private ProceduralStream<BlockData> rockStream;
|
||||
private ProceduralStream<BlockData> fluidStream;
|
||||
|
||||
public ProceduralStream<IrisBiome> getBiomeStream(InferredType type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case CAVE:
|
||||
return caveBiomeStream;
|
||||
case LAND:
|
||||
return landBiomeStream;
|
||||
case SEA:
|
||||
return seaBiomeStream;
|
||||
case SHORE:
|
||||
return shoreBiomeStream;
|
||||
case DEFER:
|
||||
case LAKE:
|
||||
case RIVER:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IrisComplex(Engine engine)
|
||||
{
|
||||
int cacheSize = IrisSettings.get().getCache().getStreamingCacheSize();
|
||||
this.rng = new RNG(engine.getWorld().getSeed());
|
||||
this.data = engine.getData();
|
||||
double height = engine.getHeight();
|
||||
fluidHeight = engine.getDimension().getFluidHeight();
|
||||
generators = new KList<>();
|
||||
RNG rng = new RNG(engine.getWorld().getSeed());
|
||||
//@builder
|
||||
engine.getDimension().getRegions().forEach((i) -> data.getRegionLoader().load(i)
|
||||
.getAllBiomes(this).forEach((b) -> b
|
||||
.getGenerators()
|
||||
.forEach((c) -> registerGenerator(c.getCachedGenerator(this)))));
|
||||
overlayStream = ProceduralStream.ofDouble((x, z) -> 0D);
|
||||
engine.getDimension().getOverlayNoise().forEach((i) -> overlayStream.add((x, z) -> i.get(rng, x, z)));
|
||||
rngStream = ProceduralStream.of((x, z) -> new RNG(((x.longValue()) << 32) | (z.longValue() & 0xffffffffL))
|
||||
.nextParallelRNG(engine.getWorld().getSeed()), Interpolated.RNG);
|
||||
chunkRngStream = rngStream.blockToChunkCoords();
|
||||
rockStream = engine.getDimension().getRockPalette().getLayerGenerator(rng.nextParallelRNG(45), data).stream()
|
||||
.select(engine.getDimension().getRockPalette().getBlockData(data));
|
||||
fluidStream = engine.getDimension().getFluidPalette().getLayerGenerator(rng.nextParallelRNG(78), data).stream()
|
||||
.select(engine.getDimension().getFluidPalette().getBlockData(data));
|
||||
regionStream = engine.getDimension().getRegionStyle().create(rng.nextParallelRNG(883)).stream()
|
||||
.zoom(engine.getDimension().getRegionZoom())
|
||||
.selectRarity(engine.getDimension().getRegions())
|
||||
.convertCached((s) -> data.getRegionLoader().load(s)).cache2D(cacheSize);
|
||||
caveBiomeStream = regionStream.convert((r)
|
||||
-> engine.getDimension().getCaveBiomeStyle().create(rng.nextParallelRNG(1221)).stream()
|
||||
.zoom(r.getCaveBiomeZoom())
|
||||
.selectRarity(r.getCaveBiomes())
|
||||
.onNull("")
|
||||
.convertCached((s) -> {
|
||||
if(s.isEmpty())
|
||||
{
|
||||
return new IrisBiome();
|
||||
}
|
||||
|
||||
return data.getBiomeLoader().load(s)
|
||||
.setInferredType(InferredType.CAVE);
|
||||
})
|
||||
).convertAware2D(ProceduralStream::get).cache2D(cacheSize);
|
||||
landBiomeStream = regionStream.convert((r)
|
||||
-> engine.getDimension().getLandBiomeStyle().create(rng.nextParallelRNG(234234234)).stream()
|
||||
.zoom(r.getLandBiomeZoom())
|
||||
.selectRarity(r.getLandBiomes())
|
||||
.convertCached((s) -> data.getBiomeLoader().load(s)
|
||||
.setInferredType(InferredType.LAND))
|
||||
).convertAware2D(ProceduralStream::get)
|
||||
.cache2D(cacheSize);
|
||||
seaBiomeStream = regionStream.convert((r)
|
||||
-> engine.getDimension().getSeaBiomeStyle().create(rng.nextParallelRNG(11232323)).stream()
|
||||
.zoom(r.getSeaBiomeZoom())
|
||||
.selectRarity(r.getSeaBiomes())
|
||||
.convertCached((s) -> data.getBiomeLoader().load(s)
|
||||
.setInferredType(InferredType.SEA))
|
||||
).convertAware2D(ProceduralStream::get)
|
||||
.cache2D(cacheSize);
|
||||
shoreBiomeStream = regionStream.convert((r)
|
||||
-> engine.getDimension().getShoreBiomeStyle().create(rng.nextParallelRNG(7787845)).stream()
|
||||
.zoom(r.getShoreBiomeZoom())
|
||||
.selectRarity(r.getShoreBiomes())
|
||||
.convertCached((s) -> data.getBiomeLoader().load(s)
|
||||
.setInferredType(InferredType.SHORE))
|
||||
).convertAware2D(ProceduralStream::get).cache2D(cacheSize);
|
||||
bridgeStream = engine.getDimension().getContinentalStyle().create(rng.nextParallelRNG(234234565)).bake().scale(1D / engine.getDimension().getContinentZoom()).bake().stream()
|
||||
.convert((v) -> v >= engine.getDimension().getLandChance() ? InferredType.SEA : InferredType.LAND);
|
||||
baseBiomeStream = bridgeStream.convertAware2D((t, x, z) -> t.equals(InferredType.SEA)
|
||||
? seaBiomeStream.get(x, z) : landBiomeStream.get(x, z))
|
||||
.convertAware2D(this::implode).cache2D(cacheSize);
|
||||
heightStream = ProceduralStream.of((x, z) -> {
|
||||
IrisBiome b = baseBiomeStream.get(x, z);
|
||||
return getHeight(engine, b, x, z, engine.getWorld().getSeed());
|
||||
}, Interpolated.DOUBLE).cache2D(cacheSize);
|
||||
slopeStream = heightStream.slope(3).interpolate().bilinear(3, 3).cache2D(cacheSize);
|
||||
objectChanceStream = ProceduralStream.ofDouble((x, z) -> {
|
||||
AtomicDouble str = new AtomicDouble(1D);
|
||||
engine.getFramework().getEngineParallax().forEachFeature(x, z, (i)
|
||||
-> str.set(Math.min(str.get(), i.getObjectChanceModifier(x, z))));
|
||||
return str.get();
|
||||
});
|
||||
trueBiomeStream = heightStream
|
||||
.convertAware2D((h, x, z) ->
|
||||
fixBiomeType(h, baseBiomeStream.get(x, z),
|
||||
regionStream.get(x, z), x, z, fluidHeight)).cache2D(cacheSize);
|
||||
trueBiomeDerivativeStream = trueBiomeStream.convert(IrisBiome::getDerivative).cache2D(cacheSize);
|
||||
heightFluidStream = heightStream.max(fluidHeight).cache2D(cacheSize);
|
||||
maxHeightStream = ProceduralStream.ofDouble((x, z) -> height);
|
||||
terrainSurfaceDecoration = trueBiomeStream
|
||||
.convertAware2D((b, xx,zz) -> decorateFor(b, xx, zz, DecorationPart.NONE));
|
||||
terrainCeilingDecoration = trueBiomeStream
|
||||
.convertAware2D((b, xx,zz) -> decorateFor(b, xx, zz, DecorationPart.CEILING));
|
||||
terrainCaveSurfaceDecoration = caveBiomeStream
|
||||
.convertAware2D((b, xx,zz) -> decorateFor(b, xx, zz, DecorationPart.NONE));
|
||||
terrainCaveCeilingDecoration = caveBiomeStream
|
||||
.convertAware2D((b, xx,zz) -> decorateFor(b, xx, zz, DecorationPart.CEILING));
|
||||
shoreSurfaceDecoration = trueBiomeStream
|
||||
.convertAware2D((b, xx,zz) -> decorateFor(b, xx, zz, DecorationPart.SHORE_LINE));
|
||||
seaSurfaceDecoration = trueBiomeStream
|
||||
.convertAware2D((b, xx,zz) -> decorateFor(b, xx, zz, DecorationPart.SEA_SURFACE));
|
||||
trueHeightStream = ProceduralStream.of((x, z) -> {
|
||||
int rx = (int) Math.round(engine.modifyX(x));
|
||||
int rz = (int) Math.round(engine.modifyZ(z));
|
||||
int heightf = (int) Math.round(getHeightStream().get(rx, rz));
|
||||
int m = heightf;
|
||||
|
||||
if(engine.getDimension().isCarving())
|
||||
{
|
||||
if(engine.getDimension().isCarved(rx, m, rz, ((IrisTerrainActuator)engine.getFramework().getTerrainActuator()).getRng(), heightf))
|
||||
{
|
||||
m--;
|
||||
|
||||
while(engine.getDimension().isCarved(rx, m, rz, ((IrisTerrainActuator)engine.getFramework().getTerrainActuator()).getRng(), heightf))
|
||||
{
|
||||
m--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(engine.getDimension().isCaves())
|
||||
{
|
||||
KList<CaveResult> caves = ((IrisCaveModifier)engine.getFramework().getCaveModifier()).genCaves(rx, rz, 0, 0, null);
|
||||
boolean again = true;
|
||||
|
||||
while(again)
|
||||
{
|
||||
again = false;
|
||||
for(CaveResult i : caves)
|
||||
{
|
||||
if(i.getCeiling() > m && i.getFloor() < m)
|
||||
{
|
||||
m = i.getFloor();
|
||||
again = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
}, Interpolated.INT).cache2D(cacheSize);
|
||||
//@done
|
||||
}
|
||||
|
||||
private IrisDecorator decorateFor(IrisBiome b, double x, double z, DecorationPart part)
|
||||
{
|
||||
RNG rngc = chunkRngStream.get(x, z);
|
||||
|
||||
for(IrisDecorator i : b.getDecorators())
|
||||
{
|
||||
if(!i.getPartOf().equals(part))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
BlockData block = i.getBlockData(b, rngc, x, z, data);
|
||||
|
||||
if(block != null)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private IrisBiome implode(IrisBiome b, Double x, Double z)
|
||||
{
|
||||
if(b.getChildren().isEmpty())
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return implode(b, x, z, 3);
|
||||
}
|
||||
|
||||
private IrisBiome implode(IrisBiome b, Double x, Double z, int max)
|
||||
{
|
||||
if(max < 0)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
if(b.getChildren().isEmpty())
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
CNG childCell = b.getChildrenGenerator(rng, 123, b.getChildShrinkFactor());
|
||||
KList<IrisBiome> chx = b.getRealChildren(this).copy();
|
||||
chx.add(b);
|
||||
IrisBiome biome = childCell.fitRarity(chx, x, z);
|
||||
biome.setInferredType(b.getInferredType());
|
||||
return implode(biome, x, z, max - 1);
|
||||
}
|
||||
|
||||
private IrisBiome fixBiomeType(Double height, IrisBiome biome, IrisRegion region, Double x, Double z, double fluidHeight)
|
||||
{
|
||||
double sh = region.getShoreHeight(x, z);
|
||||
|
||||
if(height >= fluidHeight-1 && height <= fluidHeight + sh && !biome.isShore())
|
||||
{
|
||||
return shoreBiomeStream.get(x, z);
|
||||
}
|
||||
|
||||
if(height > fluidHeight + sh && !biome.isLand())
|
||||
{
|
||||
return landBiomeStream.get(x, z);
|
||||
}
|
||||
|
||||
if(height < fluidHeight && !biome.isAquatic())
|
||||
{
|
||||
return seaBiomeStream.get(x, z);
|
||||
}
|
||||
|
||||
if(height == fluidHeight && !biome.isShore())
|
||||
{
|
||||
return shoreBiomeStream.get(x, z);
|
||||
}
|
||||
|
||||
return biome;
|
||||
}
|
||||
|
||||
private double getHeight(Engine engine, IrisBiome b, double x, double z, long seed)
|
||||
{
|
||||
double h = 0;
|
||||
|
||||
for(IrisGenerator gen : generators)
|
||||
{
|
||||
double hi = gen.getInterpolator().interpolate(x, z, (xx, zz) ->
|
||||
{
|
||||
try
|
||||
{
|
||||
IrisBiome bx = baseBiomeStream.get(xx, zz);
|
||||
|
||||
return bx.getGenLinkMax(gen.getLoadKey());
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
Iris.warn("Failed to sample hi biome at " + xx + " " + zz + " using the generator " + gen.getLoadKey());
|
||||
}
|
||||
|
||||
return 0;
|
||||
});
|
||||
|
||||
double lo = gen.getInterpolator().interpolate(x, z, (xx, zz) ->
|
||||
{
|
||||
try
|
||||
{
|
||||
IrisBiome bx = baseBiomeStream.get(xx, zz);
|
||||
|
||||
return bx.getGenLinkMin(gen.getLoadKey());
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
Iris.warn("Failed to sample lo biome at " + xx + " " + zz + " using the generator " + gen.getLoadKey());
|
||||
}
|
||||
|
||||
return 0;
|
||||
});
|
||||
|
||||
h += M.lerp(lo, hi, gen.getHeight(x, z, seed + 239945));
|
||||
}
|
||||
|
||||
AtomicDouble noise = new AtomicDouble(h + fluidHeight + overlayStream.get(x,z));
|
||||
engine.getFramework().getEngineParallax().forEachFeature(x, z, (i)
|
||||
-> noise.set(i.filter(x, z, noise.get())));
|
||||
return Math.min(engine.getHeight(), Math.max(noise.get(), 0));
|
||||
}
|
||||
|
||||
private void registerGenerator(IrisGenerator cachedGenerator)
|
||||
{
|
||||
for(IrisGenerator i : generators)
|
||||
{
|
||||
if(i.getLoadKey().equals(cachedGenerator.getLoadKey()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
generators.add(cachedGenerator);
|
||||
}
|
||||
}
|
||||
154
src/main/java/com/volmit/iris/generator/IrisEngine.java
Normal file
154
src/main/java/com/volmit/iris/generator/IrisEngine.java
Normal file
@@ -0,0 +1,154 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.scaffold.engine.*;
|
||||
import com.volmit.iris.scaffold.hunk.Hunk;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.RNG;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class IrisEngine extends BlockPopulator implements Engine
|
||||
{
|
||||
@Getter
|
||||
private final EngineCompound compound;
|
||||
|
||||
@Getter
|
||||
private final EngineTarget target;
|
||||
|
||||
@Getter
|
||||
private final EngineFramework framework;
|
||||
|
||||
@Getter
|
||||
private final EngineEffects effects;
|
||||
|
||||
@Getter
|
||||
private final EngineWorldManager worldManager;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
private volatile int parallelism;
|
||||
|
||||
@Getter
|
||||
private final int index;
|
||||
|
||||
@Getter
|
||||
private final EngineMetrics metrics;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
private volatile int minHeight;
|
||||
private boolean failing;
|
||||
private boolean closed;
|
||||
private int cacheId;
|
||||
private final int art;
|
||||
|
||||
public IrisEngine(EngineTarget target, EngineCompound compound, int index)
|
||||
{
|
||||
Iris.info("Initializing Engine: " + target.getWorld().getName() + "/" + target.getDimension().getLoadKey() + " (" + target.getHeight() + " height)");
|
||||
metrics = new EngineMetrics(32);
|
||||
this.target = target;
|
||||
this.framework = new IrisEngineFramework(this);
|
||||
worldManager = new IrisWorldManager(this);
|
||||
this.compound = compound;
|
||||
minHeight = 0;
|
||||
failing = false;
|
||||
closed = false;
|
||||
this.index = index;
|
||||
cacheId = RNG.r.nextInt();
|
||||
effects = new IrisEngineEffects(this);
|
||||
art = J.ar(effects::tickRandomPlayer, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
J.car(art);
|
||||
closed = true;
|
||||
getWorldManager().close();
|
||||
getFramework().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClosed() {
|
||||
return closed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recycle() {
|
||||
getFramework().recycle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double modifyX(double x) {
|
||||
return x / getDimension().getTerrainZoom();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double modifyZ(double z) {
|
||||
return z / getDimension().getTerrainZoom();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(int x, int z, Hunk<BlockData> vblocks, Hunk<Biome> vbiomes) {
|
||||
try
|
||||
{
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
Hunk<BlockData> blocks = vblocks.synchronize().listen((xx,y,zz,t) -> catchBlockUpdates(x+xx,y+getMinHeight(),z+zz, t));
|
||||
getFramework().getEngineParallax().generateParallaxArea(x>>4, z>>4);
|
||||
getFramework().getBiomeActuator().actuate(x, z, vbiomes);
|
||||
getFramework().getTerrainActuator().actuate(x, z, blocks);
|
||||
getFramework().getCaveModifier().modify(x, z, blocks);
|
||||
getFramework().getRavineModifier().modify(x, z, blocks);
|
||||
getFramework().getPostModifier().modify(x, z, blocks);
|
||||
getFramework().getDecorantActuator().actuate(x, z, blocks);
|
||||
getFramework().getEngineParallax().insertParallax(x, z, blocks);
|
||||
getFramework().getDepositModifier().modify(x, z, blocks);
|
||||
getMetrics().getTotal().put(p.getMilliseconds());
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
fail("Failed to generate " + x + ", " + z, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populate(@NotNull World world, @NotNull Random random, @NotNull Chunk c)
|
||||
{
|
||||
getWorldManager().spawnInitialEntities(c);
|
||||
updateChunk(c);
|
||||
placeTiles(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String error, Throwable e) {
|
||||
failing = true;
|
||||
Iris.error(error);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFailed() {
|
||||
return failing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCacheID() {
|
||||
return cacheId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hotload() {
|
||||
cacheId = RNG.r.nextInt();
|
||||
}
|
||||
}
|
||||
328
src/main/java/com/volmit/iris/generator/IrisEngineCompound.java
Normal file
328
src/main/java/com/volmit/iris/generator/IrisEngineCompound.java
Normal file
@@ -0,0 +1,328 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.manager.IrisDataManager;
|
||||
import com.volmit.iris.nms.INMS;
|
||||
import com.volmit.iris.object.IrisDimension;
|
||||
import com.volmit.iris.object.IrisDimensionIndex;
|
||||
import com.volmit.iris.object.IrisPosition;
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineCompound;
|
||||
import com.volmit.iris.scaffold.engine.EngineData;
|
||||
import com.volmit.iris.scaffold.engine.EngineTarget;
|
||||
import com.volmit.iris.scaffold.hunk.Hunk;
|
||||
import com.volmit.iris.scaffold.parallel.BurstExecutor;
|
||||
import com.volmit.iris.scaffold.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.world.WorldSaveEvent;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class IrisEngineCompound implements EngineCompound {
|
||||
@Getter
|
||||
private final World world;
|
||||
|
||||
private final AtomicRollingSequence wallClock;
|
||||
|
||||
private Engine defaultEngine;
|
||||
|
||||
@Getter
|
||||
private final EngineData engineMetadata;
|
||||
|
||||
private final Engine[] engines;
|
||||
|
||||
@Getter
|
||||
private final MultiBurst burster;
|
||||
|
||||
@Getter
|
||||
private final KList<BlockPopulator> populators;
|
||||
|
||||
@Getter
|
||||
private final IrisDimension rootDimension;
|
||||
|
||||
@Getter
|
||||
private int threadCount;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean studio;
|
||||
|
||||
public IrisEngineCompound(World world, IrisDimension rootDimension, IrisDataManager data, int maximumThreads)
|
||||
{
|
||||
wallClock = new AtomicRollingSequence(32);
|
||||
this.rootDimension = rootDimension;
|
||||
Iris.info("Initializing Engine Composite for " + world.getName());
|
||||
this.world = world;
|
||||
engineMetadata = EngineData.load(getEngineMetadataFile());
|
||||
engineMetadata.setDimension(rootDimension.getLoadKey());
|
||||
engineMetadata.setLastVersion(Iris.instance.getDescription().getVersion());
|
||||
|
||||
|
||||
if(engineMetadata.getStrongholdPosition() == null)
|
||||
{
|
||||
if(!(world instanceof FakeWorld && world instanceof HeightedFakeWorld))
|
||||
{
|
||||
Object nmsWorld = new V(world).invoke("getHandle");
|
||||
Object chunkProvider = new V(nmsWorld).invoke("getChunkProvider");
|
||||
Object chunkGenerator = new V(chunkProvider).invoke("getChunkGenerator");
|
||||
try {
|
||||
Class<?> clazz = Class.forName("net.minecraft.server." + INMS.getNMSTag() + ".ChunkGenerator");
|
||||
Class<?> clazzSG = Class.forName("net.minecraft.server." + INMS.getNMSTag() + ".StructureGenerator");
|
||||
Class<?> clazzBP = Class.forName("net.minecraft.server." + INMS.getNMSTag() + ".BlockPosition");
|
||||
Object bp = clazz.getDeclaredMethod("findNearestMapFeature",
|
||||
nmsWorld.getClass(),
|
||||
clazzSG,
|
||||
clazzBP,
|
||||
int.class,
|
||||
boolean.class
|
||||
).invoke(chunkGenerator,
|
||||
nmsWorld,
|
||||
clazzSG.getDeclaredField("STRONGHOLD").get(null),
|
||||
clazzBP.getDeclaredField("ZERO").get(null),
|
||||
100,
|
||||
false
|
||||
);
|
||||
engineMetadata.setStrongholdPosition(new IrisPosition((int)new V(bp, false).invoke("getX"), (int)new V(bp, false).invoke("getY"), (int)new V(bp, false).invoke("getZ")));
|
||||
} catch (Throwable ignored) {
|
||||
engineMetadata.setStrongholdPosition(new IrisPosition(1337, 32, -1337));
|
||||
Iris.warn("Couldn't properly find the stronghold positon for this world. Is this headless mode?");
|
||||
}
|
||||
Iris.info("Stronghold: " + engineMetadata.getStrongholdPosition().toString());
|
||||
}
|
||||
}
|
||||
|
||||
saveEngineMetadata();
|
||||
populators = new KList<>();
|
||||
|
||||
if(rootDimension.getDimensionalComposite().isEmpty())
|
||||
{
|
||||
burster = null;
|
||||
engines = new Engine[]{new IrisEngine(new EngineTarget(world, rootDimension, data, 256, maximumThreads), this, 0)};
|
||||
defaultEngine = engines[0];
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
double totalWeight = 0D;
|
||||
engines = new Engine[rootDimension.getDimensionalComposite().size()];
|
||||
burster = engines.length > 1 ? new MultiBurst(engines.length) : null;
|
||||
int threadDist = (Math.max(2, maximumThreads - engines.length)) / engines.length;
|
||||
|
||||
if((threadDist * engines.length) + engines.length > maximumThreads)
|
||||
{
|
||||
Iris.warn("Using " + ((threadDist * engines.length) + engines.length) + " threads instead of the configured " + maximumThreads + " maximum thread count due to the requirements of this dimension!");
|
||||
}
|
||||
|
||||
for(IrisDimensionIndex i : rootDimension.getDimensionalComposite())
|
||||
{
|
||||
totalWeight += i.getWeight();
|
||||
}
|
||||
|
||||
int buf = 0;
|
||||
|
||||
for(int i = 0; i < engines.length; i++)
|
||||
{
|
||||
IrisDimensionIndex index = rootDimension.getDimensionalComposite().get(i);
|
||||
IrisDimension dimension = data.getDimensionLoader().load(index.getDimension());
|
||||
engines[i] = new IrisEngine(new EngineTarget(world, dimension, data.copy(), (int)Math.floor(256D * (index.getWeight() / totalWeight)), index.isInverted(), threadDist), this, i);
|
||||
engines[i].setMinHeight(buf);
|
||||
buf += engines[i].getHeight();
|
||||
|
||||
if(index.isPrimary())
|
||||
{
|
||||
defaultEngine = engines[i];
|
||||
}
|
||||
}
|
||||
|
||||
if(defaultEngine == null)
|
||||
{
|
||||
defaultEngine = engines[0];
|
||||
}
|
||||
}
|
||||
|
||||
for(Engine i : engines)
|
||||
{
|
||||
if(i instanceof BlockPopulator)
|
||||
{
|
||||
populators.add((BlockPopulator) i);
|
||||
}
|
||||
}
|
||||
|
||||
Iris.instance.registerListener(this);
|
||||
}
|
||||
|
||||
public IrisPosition getStrongholdPosition()
|
||||
{
|
||||
return engineMetadata.getStrongholdPosition();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void on(WorldSaveEvent e)
|
||||
{
|
||||
if(world != null &&e.getWorld().equals(world))
|
||||
{
|
||||
save();
|
||||
}
|
||||
}
|
||||
|
||||
public void printMetrics(CommandSender sender)
|
||||
{
|
||||
KMap<String, Double> totals = new KMap<>();
|
||||
KMap<String, Double> weights = new KMap<>();
|
||||
double masterWallClock = wallClock.getAverage();
|
||||
|
||||
for(int i = 0; i < getSize(); i++)
|
||||
{
|
||||
Engine e = getEngine(i);
|
||||
KMap<String, Double> timings = e.getMetrics().pull();
|
||||
double totalWeight = 0;
|
||||
double wallClock = e.getMetrics().getTotal().getAverage();
|
||||
|
||||
for(double j : timings.values())
|
||||
{
|
||||
totalWeight += j;
|
||||
}
|
||||
|
||||
for(String j : timings.k())
|
||||
{
|
||||
weights.put(e.getName() + "[" + e.getIndex() + "]." + j, (wallClock / totalWeight) * timings.get(j));
|
||||
}
|
||||
|
||||
totals.put(e.getName() + "[" + e.getIndex() + "]", wallClock);
|
||||
}
|
||||
|
||||
double mtotals = 0;
|
||||
|
||||
for(double i : totals.values())
|
||||
{
|
||||
mtotals+=i;
|
||||
}
|
||||
|
||||
for(String i : totals.k())
|
||||
{
|
||||
totals.put(i, (masterWallClock / mtotals) * totals.get(i));
|
||||
}
|
||||
|
||||
double v = 0;
|
||||
|
||||
for(double i : weights.values())
|
||||
{
|
||||
v+=i;
|
||||
}
|
||||
|
||||
for(String i : weights.k())
|
||||
{
|
||||
weights.put(i, weights.get(i) / v);
|
||||
}
|
||||
|
||||
sender.sendMessage("Total: " + C.BOLD + C.WHITE + Form.duration(masterWallClock, 0));
|
||||
|
||||
for(String i : totals.k())
|
||||
{
|
||||
sender.sendMessage(" Engine " + C.UNDERLINE + C.GREEN + i + C.RESET + ": " + C.BOLD + C.WHITE + Form.duration(totals.get(i), 0));
|
||||
}
|
||||
|
||||
sender.sendMessage("Details: ");
|
||||
|
||||
for(String i : weights.sortKNumber().reverse())
|
||||
{
|
||||
String befb = C.UNDERLINE +""+ C.GREEN + "" + i.split("\\Q[\\E")[0] + C.RESET + C.GRAY + "[";
|
||||
String num = C.GOLD + i.split("\\Q[\\E")[1].split("]")[0] + C.RESET + C.GRAY + "].";
|
||||
String afb = C.ITALIC +""+ C.AQUA + i.split("\\Q]\\E")[1].substring(1) + C.RESET + C.GRAY;
|
||||
|
||||
sender.sendMessage(" " + befb + num + afb + ": " + C.BOLD + C.WHITE + Form.pc(weights.get(i), 0));
|
||||
}
|
||||
}
|
||||
|
||||
private File getEngineMetadataFile() {
|
||||
return new File(world.getWorldFolder(), "iris/engine-metadata.json");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(int x, int z, Hunk<BlockData> blocks, Hunk<BlockData> postblocks, Hunk<Biome> biomes)
|
||||
{
|
||||
recycle();
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
if(engines.length == 1 && !getEngine(0).getTarget().isInverted())
|
||||
{
|
||||
engines[0].generate(x, z, blocks, biomes);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
int i;
|
||||
int offset = 0;
|
||||
BurstExecutor e = burster.burst();
|
||||
Runnable[] insert = new Runnable[engines.length];
|
||||
|
||||
for(i = 0; i < engines.length; i++)
|
||||
{
|
||||
Engine engine = engines[i];
|
||||
int doffset = offset;
|
||||
int height = engine.getTarget().getHeight();
|
||||
Hunk<BlockData> cblock = Hunk.newArrayHunk(16, height, 16);
|
||||
Hunk<Biome> cbiome = Hunk.newArrayHunk(16, height, 16);
|
||||
|
||||
if(engine.getTarget().isInverted())
|
||||
{
|
||||
cblock = cblock.invertY();
|
||||
cbiome = cbiome.invertY();
|
||||
}
|
||||
|
||||
engine.generate(x, z, cblock, cbiome);
|
||||
blocks.insert(0, doffset, 0, cblock);
|
||||
biomes.insert(0, doffset, 0, cbiome);
|
||||
offset += height;
|
||||
}
|
||||
}
|
||||
|
||||
wallClock.put(p.getMilliseconds());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return engines.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Engine getEngine(int index) {
|
||||
return engines[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveEngineMetadata() {
|
||||
engineMetadata.save(getEngineMetadataFile());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IrisDataManager getData(int height) {
|
||||
return getEngineForHeight(height).getData();
|
||||
}
|
||||
|
||||
//TODO: FAIL
|
||||
@Override
|
||||
public boolean isFailing() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Engine getDefaultEngine() {
|
||||
return defaultEngine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hotload() {
|
||||
for(int i = 0; i < getSize(); i++)
|
||||
{
|
||||
getEngine(i).hotload();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineAssignedComponent;
|
||||
import com.volmit.iris.scaffold.engine.EngineEffects;
|
||||
import com.volmit.iris.scaffold.engine.EnginePlayer;
|
||||
import com.volmit.iris.util.KMap;
|
||||
import com.volmit.iris.util.M;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
public class IrisEngineEffects extends EngineAssignedComponent implements EngineEffects {
|
||||
private KMap<UUID, EnginePlayer> players;
|
||||
private Semaphore limit;
|
||||
|
||||
public IrisEngineEffects(Engine engine) {
|
||||
super(engine, "FX");
|
||||
players = new KMap<>();
|
||||
limit = new Semaphore(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePlayerMap() {
|
||||
List<Player> pr = getEngine().getWorld().getPlayers();
|
||||
for(Player i : pr)
|
||||
{
|
||||
Location l = i.getLocation();
|
||||
boolean pcc = players.containsKey(i.getUniqueId());
|
||||
if(getEngine().contains(l))
|
||||
{
|
||||
if(!pcc)
|
||||
{
|
||||
players.put(i.getUniqueId(), new EnginePlayer(getEngine(), i));
|
||||
}
|
||||
}
|
||||
|
||||
else if(pcc)
|
||||
{
|
||||
players.remove(i.getUniqueId());
|
||||
}
|
||||
}
|
||||
|
||||
for(UUID i : players.k())
|
||||
{
|
||||
if(!pr.contains(players.get(i).getPlayer()))
|
||||
{
|
||||
players.remove(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickRandomPlayer() {
|
||||
if(limit.tryAcquire())
|
||||
{
|
||||
if(M.r(0.02))
|
||||
{
|
||||
updatePlayerMap();
|
||||
limit.release();
|
||||
return;
|
||||
}
|
||||
|
||||
if(players.isEmpty())
|
||||
{
|
||||
limit.release();
|
||||
return;
|
||||
}
|
||||
|
||||
double limitms = 1.5;
|
||||
int max = players.size();
|
||||
PrecisionStopwatch p = new PrecisionStopwatch();
|
||||
|
||||
while(max-- > 0 && M.ms() - p.getMilliseconds() < limitms)
|
||||
{
|
||||
players.v().getRandom().tick();
|
||||
}
|
||||
|
||||
limit.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
113
src/main/java/com/volmit/iris/generator/IrisEngineFramework.java
Normal file
113
src/main/java/com/volmit/iris/generator/IrisEngineFramework.java
Normal file
@@ -0,0 +1,113 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.generator.actuator.IrisBiomeActuator;
|
||||
import com.volmit.iris.generator.actuator.IrisDecorantActuator;
|
||||
import com.volmit.iris.generator.actuator.IrisTerrainActuator;
|
||||
import com.volmit.iris.generator.modifier.IrisCaveModifier;
|
||||
import com.volmit.iris.generator.modifier.IrisDepositModifier;
|
||||
import com.volmit.iris.generator.modifier.IrisPostModifier;
|
||||
import com.volmit.iris.generator.modifier.IrisRavineModifier;
|
||||
import com.volmit.iris.scaffold.engine.*;
|
||||
import com.volmit.iris.util.ChronoLatch;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class IrisEngineFramework implements EngineFramework {
|
||||
|
||||
@Getter
|
||||
private final Engine engine;
|
||||
|
||||
@Getter
|
||||
private final IrisComplex complex;
|
||||
|
||||
@Getter
|
||||
final EngineParallaxManager engineParallax;
|
||||
|
||||
@Getter
|
||||
private final EngineActuator<BlockData> terrainActuator;
|
||||
|
||||
@Getter
|
||||
private final EngineActuator<BlockData> decorantActuator;
|
||||
|
||||
@Getter
|
||||
private final EngineActuator<Biome> biomeActuator;
|
||||
|
||||
@Getter
|
||||
private final EngineModifier<BlockData> depositModifier;
|
||||
|
||||
@Getter
|
||||
private final EngineModifier<BlockData> caveModifier;
|
||||
|
||||
@Getter
|
||||
private final EngineModifier<BlockData> ravineModifier;
|
||||
|
||||
@Getter
|
||||
private final EngineModifier<BlockData> postModifier;
|
||||
|
||||
private final AtomicBoolean cleaning;
|
||||
private final ChronoLatch cleanLatch;
|
||||
|
||||
public IrisEngineFramework(Engine engine)
|
||||
{
|
||||
this.engine = engine;
|
||||
this.complex = new IrisComplex(getEngine());
|
||||
this.engineParallax = new IrisEngineParallax(getEngine());
|
||||
this.terrainActuator = new IrisTerrainActuator(getEngine());
|
||||
this.decorantActuator = new IrisDecorantActuator(getEngine());
|
||||
this.biomeActuator = new IrisBiomeActuator(getEngine());
|
||||
this.depositModifier = new IrisDepositModifier(getEngine());
|
||||
this.ravineModifier = new IrisRavineModifier(getEngine());
|
||||
this.caveModifier = new IrisCaveModifier(engine);
|
||||
this.postModifier = new IrisPostModifier(engine);
|
||||
cleaning = new AtomicBoolean(false);
|
||||
cleanLatch = new ChronoLatch(Math.max(10000, Math.min(IrisSettings.get().getParallax().getParallaxChunkEvictionMS(), IrisSettings.get().getParallax().getParallaxRegionEvictionMS())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void recycle() {
|
||||
if(!cleanLatch.flip())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (cleaning.get())
|
||||
{
|
||||
cleanLatch.flipDown();
|
||||
return;
|
||||
}
|
||||
|
||||
cleaning.set(true);
|
||||
|
||||
try
|
||||
{
|
||||
getEngine().getParallax().cleanup();
|
||||
getData().getObjectLoader().clean();
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
Iris.error("Cleanup failed!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
cleaning.lazySet(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
getEngineParallax().close();
|
||||
getTerrainActuator().close();
|
||||
getDecorantActuator().close();
|
||||
getBiomeActuator().close();
|
||||
getDepositModifier().close();
|
||||
getRavineModifier().close();
|
||||
getCaveModifier().close();
|
||||
getPostModifier().close();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineParallaxManager;
|
||||
import lombok.Getter;
|
||||
|
||||
public class IrisEngineParallax implements EngineParallaxManager {
|
||||
@Getter
|
||||
private final Engine engine;
|
||||
|
||||
@Getter
|
||||
private final int parallaxSize;
|
||||
|
||||
public IrisEngineParallax(Engine engine)
|
||||
{
|
||||
this.engine = engine;
|
||||
parallaxSize = computeParallaxSize();
|
||||
}
|
||||
}
|
||||
171
src/main/java/com/volmit/iris/generator/IrisWorldManager.java
Normal file
171
src/main/java/com/volmit/iris/generator/IrisWorldManager.java
Normal file
@@ -0,0 +1,171 @@
|
||||
package com.volmit.iris.generator;
|
||||
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.object.*;
|
||||
import com.volmit.iris.scaffold.cache.Cache;
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineAssignedWorldManager;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.RNG;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||
|
||||
public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
private boolean spawnable;
|
||||
|
||||
public IrisWorldManager(Engine engine) {
|
||||
super(engine);
|
||||
spawnable = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSave() {
|
||||
getEngine().getParallax().saveAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnInitialEntities(Chunk c) {
|
||||
RNG rng = new RNG(Cache.key(c));
|
||||
|
||||
getEngine().getParallaxAccess().getEntitiesR(c.getX(), c.getZ()).iterateSync((x,y,z,e) -> {
|
||||
if(e != null)
|
||||
{
|
||||
IrisEntity en = getData().getEntityLoader().load(e);
|
||||
|
||||
if(en != null){
|
||||
en.spawn(getEngine(), new Location(c.getWorld(), x+(c.getX()<<4),y,z+(c.getZ()<<4)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
int x = (c.getX() * 16) + rng.nextInt(15);
|
||||
int z = (c.getZ() * 16) + rng.nextInt(15);
|
||||
int y = getEngine().getHeight(x, z) + 1;
|
||||
IrisDimension dim = getDimension();
|
||||
IrisRegion region = getEngine().getRegion(x, z);
|
||||
IrisBiome above = getEngine().getSurfaceBiome(x, z);
|
||||
trySpawn(above.getEntityInitialSpawns(), c, rng);
|
||||
trySpawn(region.getEntityInitialSpawns(), c, rng);
|
||||
trySpawn(dim.getEntityInitialSpawns(), c, rng);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntitySpawn(EntitySpawnEvent e)
|
||||
{
|
||||
if(getTarget().getWorld() == null || !getTarget().getWorld().equals(e.getEntity().getWorld()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if(!IrisSettings.get().getGenerator().isSystemEntitySpawnOverrides())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int x = e.getEntity().getLocation().getBlockX();
|
||||
int y = e.getEntity().getLocation().getBlockY();
|
||||
int z = e.getEntity().getLocation().getBlockZ();
|
||||
|
||||
J.a(() ->
|
||||
{
|
||||
if(spawnable)
|
||||
{
|
||||
IrisDimension dim = getDimension();
|
||||
IrisRegion region = getEngine().getRegion(x, z);
|
||||
IrisBiome above = getEngine().getSurfaceBiome(x, z);
|
||||
IrisBiome bbelow = getEngine().getBiome(x, y, z);
|
||||
if(above.getLoadKey().equals(bbelow.getLoadKey()))
|
||||
{
|
||||
bbelow = null;
|
||||
}
|
||||
|
||||
IrisBiome below = bbelow;
|
||||
|
||||
J.s(() ->
|
||||
{
|
||||
if(below != null)
|
||||
{
|
||||
if(trySpawn(below.getEntitySpawnOverrides(), e))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(trySpawn(above.getEntitySpawnOverrides(), e))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(trySpawn(region.getEntitySpawnOverrides(), e))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(trySpawn(dim.getEntitySpawnOverrides(), e))
|
||||
{
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
catch(Throwable xe)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private boolean trySpawn(KList<IrisEntitySpawnOverride> s, EntitySpawnEvent e)
|
||||
{
|
||||
for(IrisEntitySpawnOverride i : s)
|
||||
{
|
||||
spawnable = false;
|
||||
|
||||
if(i.on(getEngine(), e.getLocation(), e.getEntityType(), e) != null)
|
||||
{
|
||||
e.setCancelled(true);
|
||||
e.getEntity().remove();
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
spawnable = true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void trySpawn(KList<IrisEntityInitialSpawn> s, Chunk c, RNG rng)
|
||||
{
|
||||
for(IrisEntityInitialSpawn i : s)
|
||||
{
|
||||
i.spawn(getEngine(), c, rng);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockBreak(BlockBreakEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlace(BlockPlaceEvent e) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.volmit.iris.generator.actuator;
|
||||
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineAssignedActuator;
|
||||
import com.volmit.iris.scaffold.hunk.Hunk;
|
||||
import com.volmit.iris.scaffold.parallel.BurstExecutor;
|
||||
import com.volmit.iris.scaffold.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
public class IrisBiomeActuator extends EngineAssignedActuator<Biome>
|
||||
{
|
||||
public IrisBiomeActuator(Engine engine) {
|
||||
super(engine, "Biome");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<Biome> h) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
int zf,hh;
|
||||
BurstExecutor burst = MultiBurst.burst.burst(h.getWidth() * h.getDepth());
|
||||
|
||||
for(int xf = 0; xf < h.getWidth(); xf++)
|
||||
{
|
||||
for(zf = 0; zf < h.getDepth(); zf++)
|
||||
{
|
||||
int xxf = xf;
|
||||
int zzf = zf;
|
||||
|
||||
burst.queue(() -> {
|
||||
Biome v = getComplex().getTrueBiomeStream().get(modX(xxf+x), modZ(zzf+z)).getDerivative();
|
||||
for(int i = 0; i < h.getHeight(); i++)
|
||||
{
|
||||
h.set(xxf, i, zzf, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
burst.complete();
|
||||
|
||||
getEngine().getMetrics().getBiome().put(p.getMilliseconds());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.volmit.iris.generator.actuator;
|
||||
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.RNG;
|
||||
import com.volmit.iris.generator.decorator.IrisCeilingDecorator;
|
||||
import com.volmit.iris.generator.decorator.IrisSeaSurfaceDecorator;
|
||||
import com.volmit.iris.generator.decorator.IrisShoreLineDecorator;
|
||||
import com.volmit.iris.generator.decorator.IrisSurfaceDecorator;
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineAssignedActuator;
|
||||
import com.volmit.iris.scaffold.engine.EngineDecorator;
|
||||
import com.volmit.iris.scaffold.hunk.Hunk;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class IrisDecorantActuator extends EngineAssignedActuator<BlockData>
|
||||
{
|
||||
private static final Predicate<BlockData> PREDICATE_SOLID = (b) -> b != null && !b.getMaterial().isAir() && !b.getMaterial().equals(Material.WATER) && !b.getMaterial().equals(Material.LAVA);
|
||||
private final RNG rng;
|
||||
@Getter
|
||||
private final EngineDecorator surfaceDecorator;
|
||||
@Getter
|
||||
private final EngineDecorator ceilingDecorator;
|
||||
@Getter
|
||||
private final EngineDecorator seaSurfaceDecorator;
|
||||
@Getter
|
||||
private final EngineDecorator shoreLineDecorator;
|
||||
private final boolean shouldRay;
|
||||
|
||||
public IrisDecorantActuator(Engine engine) {
|
||||
super(engine, "Decorant");
|
||||
shouldRay = shouldRayDecorate();
|
||||
this.rng = new RNG(engine.getTarget().getWorld().getSeed());
|
||||
surfaceDecorator = new IrisSurfaceDecorator(getEngine());
|
||||
ceilingDecorator = new IrisCeilingDecorator(getEngine());
|
||||
seaSurfaceDecorator = new IrisSeaSurfaceDecorator(getEngine());
|
||||
shoreLineDecorator = new IrisShoreLineDecorator(getEngine());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<BlockData> output) {
|
||||
if(!getEngine().getDimension().isDecorate())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
boolean solid;
|
||||
int emptyFor = 0;
|
||||
int lastSolid = 0;
|
||||
int j, realX, realZ, height;
|
||||
IrisBiome biome, cave;
|
||||
|
||||
for(int i = 0; i < output.getWidth(); i++)
|
||||
{
|
||||
for(j = 0; j < output.getDepth(); j++)
|
||||
{
|
||||
realX = (int) Math.round(modX(x + i));
|
||||
realZ = (int) Math.round(modZ(z + j));
|
||||
height = (int) Math.round(getComplex().getHeightStream().get(realX, realZ));
|
||||
biome = getComplex().getTrueBiomeStream().get(realX, realZ);
|
||||
cave = shouldRay ? getComplex().getCaveBiomeStream().get(realX, realZ) : null;
|
||||
|
||||
if(biome.getDecorators().isEmpty() && (cave == null || cave.getDecorators().isEmpty()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(height == getDimension().getFluidHeight())
|
||||
{
|
||||
getShoreLineDecorator().decorate(i, j,
|
||||
realX, (int) Math.round(modX(x + i+1)), (int) Math.round(modX(x + i-1)),
|
||||
realZ, (int) Math.round(modZ(z + j+1)), (int) Math.round(modZ(z + j-1)),
|
||||
output, biome, height, getEngine().getHeight() - height);
|
||||
}
|
||||
|
||||
else if(height < getDimension().getFluidHeight())
|
||||
{
|
||||
getSeaSurfaceDecorator().decorate(i, j, realX, realZ, output, biome, getDimension().getFluidHeight(), getEngine().getHeight() - getDimension().getFluidHeight());
|
||||
}
|
||||
|
||||
getSurfaceDecorator().decorate(i, j, realX, realZ, output, biome, height, getEngine().getHeight() - height);
|
||||
|
||||
if(cave != null && cave.getDecorators().isNotEmpty())
|
||||
{
|
||||
for(int k = height; k > 0; k--)
|
||||
{
|
||||
solid = PREDICATE_SOLID.test(output.get(i, k, j));
|
||||
|
||||
if(solid)
|
||||
{
|
||||
lastSolid = k;
|
||||
}
|
||||
|
||||
else {
|
||||
emptyFor++;
|
||||
}
|
||||
|
||||
if(solid && emptyFor > 0)
|
||||
{
|
||||
getCeilingDecorator().decorate(i, j, realX, realZ, output, cave, lastSolid, emptyFor);
|
||||
getSurfaceDecorator().decorate(i, j, realX, realZ, output, cave, k, emptyFor);
|
||||
emptyFor = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getEngine().getMetrics().getDecoration().put(p.getMilliseconds());
|
||||
}
|
||||
|
||||
private boolean shouldRayDecorate()
|
||||
{
|
||||
return getEngine().getDimension().isCarving() || getEngine().getDimension().isCaves() || getEngine().getDimension().isRavines();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.volmit.iris.generator.actuator;
|
||||
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.RNG;
|
||||
import com.volmit.iris.scaffold.engine.Engine;
|
||||
import com.volmit.iris.scaffold.engine.EngineAssignedActuator;
|
||||
import com.volmit.iris.scaffold.hunk.Hunk;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class IrisTerrainActuator extends EngineAssignedActuator<BlockData>
|
||||
{
|
||||
private static final BlockData AIR = Material.AIR.createBlockData();
|
||||
private static final BlockData BEDROCK = Material.BEDROCK.createBlockData();
|
||||
private static final BlockData CAVE_AIR = Material.CAVE_AIR.createBlockData();
|
||||
@Getter
|
||||
private final RNG rng;
|
||||
private final boolean hasUnder;
|
||||
|
||||
public IrisTerrainActuator(Engine engine) {
|
||||
super(engine, "Terrain");
|
||||
rng = new RNG(engine.getWorld().getSeed());
|
||||
hasUnder = getDimension().getUndercarriage() != null && !getDimension().getUndercarriage().getGenerator().isFlat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<BlockData> h) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
int i, zf, depth, realX, realZ, hf, he, b, fdepth;
|
||||
IrisBiome biome;
|
||||
KList<BlockData> blocks, fblocks;
|
||||
|
||||
for(int xf = 0; xf < h.getWidth(); xf++)
|
||||
{
|
||||
for(zf = 0; zf < h.getDepth(); zf++)
|
||||
{
|
||||
realX = (int) modX(xf + x);
|
||||
realZ = (int) modZ(zf + z);
|
||||
b = hasUnder ? (int) Math.round(getDimension().getUndercarriage().get(rng, realX, realZ)) : 0;
|
||||
he = (int) Math.round(Math.min(h.getHeight(), getComplex().getHeightStream().get(realX, realZ)));
|
||||
hf = (int) Math.round(Math.max(Math.min(h.getHeight(), getDimension().getFluidHeight()), he));
|
||||
biome = getComplex().getTrueBiomeStream().get(realX, realZ);
|
||||
blocks = null;
|
||||
fblocks = null;
|
||||
|
||||
if(hf < b)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(i = hf; i >= b; i--) {
|
||||
if (i >= h.getHeight())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(i == b)
|
||||
{
|
||||
if(getDimension().isBedrock())
|
||||
{
|
||||
h.set(xf, i, zf, BEDROCK);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(getDimension().isCarved(realX, i, realZ, rng, he))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(i > he && i <= hf)
|
||||
{
|
||||
fdepth = hf - i;
|
||||
|
||||
if(fblocks == null)
|
||||
{
|
||||
fblocks = biome.generateSeaLayers(realX, realZ, rng, hf - he, getData());
|
||||
}
|
||||
|
||||
if(fblocks.hasIndex(fdepth))
|
||||
{
|
||||
h.set(xf, i, zf, fblocks.get(fdepth));
|
||||
continue;
|
||||
}
|
||||
|
||||
h.set(xf, i, zf, getComplex().getFluidStream().get(realX, +realZ));
|
||||
continue;
|
||||
}
|
||||
|
||||
if(i <= he)
|
||||
{
|
||||
depth = he - i;
|
||||
if(blocks == null)
|
||||
{
|
||||
blocks = biome.generateLayers(realX, realZ, rng, (int)he, (int)he, getData(), getComplex());
|
||||
}
|
||||
|
||||
if(blocks.hasIndex(depth))
|
||||
{
|
||||
h.set(xf, i, zf, blocks.get(depth));
|
||||
continue;
|
||||
}
|
||||
|
||||
h.set(xf, i, zf, getComplex().getRockStream().get(realX, realZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getEngine().getMetrics().getTerrain().put(p.getMilliseconds());
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user