mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-05-20 16:50:28 +00:00
Compare commits
1368 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 414d5dae3b | |||
| d8377915d7 | |||
| a0b4841bf9 | |||
| 814d3fe7c2 | |||
| f71fbeda84 | |||
| 3bd78b9658 | |||
| b398febee3 | |||
| 5e0775850a | |||
| c9f19937c9 | |||
| bdb486188e | |||
| 320a7595f6 | |||
| 0706a4d0b7 | |||
| 193c09f60b | |||
| 7392a46118 | |||
| c445a0434d | |||
| 1655381413 | |||
| 351bdb26f2 | |||
| 859b968555 | |||
| 1c124e8b75 | |||
| 0d04f79cd4 | |||
| 5919d5f031 | |||
| 03241fa412 | |||
| 9eecaf71c8 | |||
| f5c73e926f | |||
| bea45ff030 | |||
| 2263e6722b | |||
| df6cdf37aa | |||
| 6010ea3bd6 | |||
| c8429141c8 | |||
| a15c5f2cca | |||
| 7becdf7f64 | |||
| 76173c1f31 | |||
| 3a47fd5aa9 | |||
| ddf1334f6f | |||
| bda3594025 | |||
| 1dbcb031ea | |||
| b407ca8821 | |||
| 0b0742d850 | |||
| 102828039d | |||
| a21eb2c3ba | |||
| 43874521db | |||
| 7f7dc23b09 | |||
| a2d8a5a259 | |||
| 1c5945706f | |||
| 480e41b99a | |||
| 276c78a329 | |||
| dd0ef7ea45 | |||
| d5fd653130 | |||
| 6da14f58df | |||
| 13ab02984b | |||
| fa8a66833e | |||
| 9d24e8a282 | |||
| 6df5aa112a | |||
| dd0c6b557d | |||
| 1522e6b57d | |||
| cefa4369f2 | |||
| d6b36f4d3f | |||
| 12c068b252 | |||
| 26152ec94e | |||
| 19861ec27b | |||
| fda44b8e99 | |||
| 1624c999ac | |||
| d43eccc442 | |||
| 7a44b74b61 | |||
| 220a981b05 | |||
| 987de074c6 | |||
| e356291bba | |||
| 12d78e0b73 | |||
| bc199d9b06 | |||
| 926e5a8ca9 | |||
| 4ad638983a | |||
| 90e127a512 | |||
| 9d12fe1bf1 | |||
| d09fe9b2a4 | |||
| f00766ea93 | |||
| 122e72e842 | |||
| b3f15b77ee | |||
| ec19c468a2 | |||
| 782a43ca53 | |||
| 8ec438ab15 | |||
| 002b311827 | |||
| 36e6d1270d | |||
| 07c8bfb29e | |||
| 63667f256b | |||
| abfd050acb | |||
| db93c9e2e9 | |||
| 1739c51ce6 | |||
| 9693fa641b | |||
| 167ab3146e | |||
| 5321662847 | |||
| 347e0d2bd1 | |||
| ca02187b0c | |||
| 649273db01 | |||
| fb3f90a9cd | |||
| 7430116fa9 | |||
| c8bb780312 | |||
| b25be7ae98 | |||
| 4567011313 | |||
| a24de0ab97 | |||
| f76ef93fe6 | |||
| c64266febb | |||
| 6da8c72593 | |||
| c13494ca03 | |||
| 19d4673afe | |||
| 7f09ee4af3 | |||
| f73366fcb3 | |||
| 074528003b | |||
| 22aa03cd51 | |||
| cb876d12f9 | |||
| 41d3e2f6b0 | |||
| 5cafd4999a | |||
| 4ec1ab7c16 | |||
| b19b85fd60 | |||
| 68f82fef02 | |||
| af4af84a48 | |||
| e882be2ba4 | |||
| 34868680c1 | |||
| 5bd70da0bc | |||
| e8ee7bc64f | |||
| 7f3a7645bd | |||
| 2790373071 | |||
| 8751346693 | |||
| f987ffa6d0 | |||
| d83e6f09a7 | |||
| 7b70478a7f | |||
| 363b70c1a6 | |||
| a3a4cf8251 | |||
| 47c284656b | |||
| 1ae9ae71de | |||
| 3b5e6b80d5 | |||
| fb26b02ad1 | |||
| 67d3af71bf | |||
| 672349f5b7 | |||
| aecb7201b8 | |||
| cdd7abc596 | |||
| 4c7179cfa2 | |||
| fb6f591f0b | |||
| 6cd60d3f4f | |||
| 507ea8bc88 | |||
| bbcd571156 | |||
| 321c50c417 | |||
| fe18d89580 | |||
| a15e45875e | |||
| bcc6e314eb | |||
| 789d5d1e23 | |||
| 9d540d471d | |||
| e16208bd76 | |||
| 579195481b | |||
| f297636c61 | |||
| 2fdada2121 | |||
| 1613ea843d | |||
| 169ed64568 | |||
| 9d687208c9 | |||
| 6d0a32f251 | |||
| 7d70b8fcdf | |||
| 89b03aa3fb | |||
| 696ee07c33 | |||
| 55030450b5 | |||
| be9e817c88 | |||
| 2f9387fbf0 | |||
| 4da5ce748d | |||
| f659c32749 | |||
| cdcbd28aa0 | |||
| 8ae457b251 | |||
| 9bf7b373b1 | |||
| b3f92410e0 | |||
| 6ea11de2fd | |||
| ad9cc1afcb | |||
| ec14666c6d | |||
| 2517b74951 | |||
| fe68aa6279 | |||
| a753351137 | |||
| 2e2f9d854d | |||
| 76b6c0a984 | |||
| 1f9a51fc40 | |||
| 1039bf6001 | |||
| 109b5e38cd | |||
| ea60b30321 | |||
| 8898bbd5c4 | |||
| a56d1818c8 | |||
| 7f050b37a4 | |||
| 2948f25b50 | |||
| a91a5019f8 | |||
| 82169f0921 | |||
| 9359ba0c97 | |||
| ba53923e8c | |||
| deb1063592 | |||
| 2ea16f68a2 | |||
| 2175ea849f | |||
| b630ab6531 | |||
| 8eddffb0a6 | |||
| 953318d9c0 | |||
| 6f1938ef82 | |||
| 1d6d63b399 | |||
| d8a5951f6e | |||
| 185df6e8a4 | |||
| 315da531b7 | |||
| ec26e7b1b0 | |||
| 7363a305af | |||
| bff0106e65 | |||
| 089eac9dc5 | |||
| a0a15802e4 | |||
| dce3742fcb | |||
| 502d2b5814 | |||
| 36ce88af0a | |||
| 3f42b9ab3e | |||
| facd878788 | |||
| 9713a7a7ba | |||
| a030fb93f3 | |||
| 67c45b7be3 | |||
| af1520eb83 | |||
| 7932a97985 | |||
| 5c92316725 | |||
| a28f46eca3 | |||
| 36838d8938 | |||
| 662196c7a6 | |||
| d8bbc95c1e | |||
| 57658d2268 | |||
| 73fd1c9edd | |||
| d054be5f25 | |||
| 5a85099357 | |||
| f7a5066008 | |||
| 5a8f5aa29c | |||
| d0434ef05e | |||
| 5c3cd73c03 | |||
| 6f03cfa600 | |||
| 4c4df28adb | |||
| de4376dd9c | |||
| f27e732b39 | |||
| 90e60ca6aa | |||
| 2373174132 | |||
| 6158cda740 | |||
| 6285b7646b | |||
| 299bf0dae8 | |||
| fe60e12f16 | |||
| c71445d3e5 | |||
| feea26dea7 | |||
| 12540f3a2c | |||
| a6324ae6e2 | |||
| e63d675549 | |||
| 1349d5b00e | |||
| 6be4c0b7c6 | |||
| 7b9a473275 | |||
| 137206884c | |||
| 5ea08eb898 | |||
| d6e2acce38 | |||
| 7b1853823c | |||
| c8bb9bbfeb | |||
| 3a7edcb1e4 | |||
| 0ff6a9cce1 | |||
| d807abb165 | |||
| c1dfcafa1d | |||
| 7a554a1fdb | |||
| 7fef7125fe | |||
| 4c25a8f909 | |||
| a8d4354851 | |||
| f9a199f177 | |||
| 04d78c1e32 | |||
| 4dc04131f4 | |||
| e7af30350b | |||
| 165642806c | |||
| 9673ab8ce1 | |||
| 24a4ff4044 | |||
| d997fc69bf | |||
| 03e4636ef9 | |||
| 458fc422de | |||
| 04bdd0b4a3 | |||
| 785323f3f6 | |||
| d036ed289c | |||
| 96b52f9a3e | |||
| f0441cbefc | |||
| 6f40e7b1f5 | |||
| 3bf8fe7901 | |||
| 7acfc5e3d0 | |||
| 913e7fd6df | |||
| a70641e01b | |||
| ac99d89e96 | |||
| fc63798103 | |||
| 1a3a7df3f7 | |||
| 46f64b5434 | |||
| 4447005b43 | |||
| 15f749bfe9 | |||
| 11f161d546 | |||
| 04e998748d | |||
| 40cd6607b2 | |||
| 4b4c26eb84 | |||
| d5601229ac | |||
| ebc81b196a | |||
| d10e2050cb | |||
| cd208cbd18 | |||
| d4e678fd65 | |||
| 03b96816c9 | |||
| d3a080127a | |||
| 3fecbe5d1d | |||
| 4a893cf081 | |||
| a2dac6dfca | |||
| bc96006c4b | |||
| d4112e46c7 | |||
| ec28f613d3 | |||
| 3a94c5287c | |||
| 689fe0bc70 | |||
| 84e7d11156 | |||
| 1194cca485 | |||
| ced5a05370 | |||
| 6cff6db152 | |||
| be55f4a62d | |||
| f57c5f39b9 | |||
| 180aae6e34 | |||
| 0f638b0317 | |||
| 6b191ac00b | |||
| b52dcf2f15 | |||
| 62cf861c22 | |||
| fec5b138d2 | |||
| f4f595425a | |||
| fc2ce229ed | |||
| 3c4c8c62b2 | |||
| deedfb1f8d | |||
| 3261e7451f | |||
| 98a0c9e052 | |||
| 453e1ebb87 | |||
| c65ea812ed | |||
| c26418b5ba | |||
| b626b74624 | |||
| ff329b2d18 | |||
| 6f5cca5e4e | |||
| 1e5a0bb93f | |||
| 78735ec769 | |||
| 887b17a421 | |||
| d43f226f2d | |||
| 53b5ee2ca9 | |||
| 3ec536dc03 | |||
| 2f5751cda7 | |||
| f0e3b1aa1d | |||
| 72f0b07a38 | |||
| 810340dbfb | |||
| f4820e5a06 | |||
| 55733b0e28 | |||
| 5bae639923 | |||
| a673f961b3 | |||
| a66641cb8a | |||
| b1589ed046 | |||
| 60edef989c | |||
| 646d8970aa | |||
| 2e6b62d690 | |||
| 0bd6ff9469 | |||
| 9e7bab340e | |||
| 2cd71cdcd3 | |||
| 319df9e638 | |||
| 9d2ae0a828 | |||
| d94ddb3e76 | |||
| cb4b537a2f | |||
| 2705e7d6a2 | |||
| b3594b2479 | |||
| 8cd2554d3a | |||
| 95e6479505 | |||
| 34e78ab55e | |||
| 089af42623 | |||
| 7a38284158 | |||
| 7fa2e8251e | |||
| bac5557873 | |||
| 2745bb8ba3 | |||
| 26d91a715c | |||
| 19672b1083 | |||
| c21038a21e | |||
| d2aa7cf5d5 | |||
| f12d23b4cb | |||
| 0dfde174ad | |||
| 27d9716c5d | |||
| 589158ee71 | |||
| dea68d0ede | |||
| 61d03a7022 | |||
| 3be90cab53 | |||
| cf88c51fda | |||
| 6f7b7a2336 | |||
| cfaa2f33ae | |||
| 9b6247dcb8 | |||
| 113568da9b | |||
| 52295af5a7 | |||
| 43f77f1531 | |||
| 0ba02719c0 | |||
| 9664e003c6 | |||
| 519956dc11 | |||
| d09ef5052a | |||
| 3f539b1e30 | |||
| 3dc564c0f7 | |||
| f61883547e | |||
| f8b0f03d11 | |||
| d0c9145aad | |||
| b36955a10a | |||
| 40e28c5e4b | |||
| b609a0ba63 | |||
| 8dcd50d3fb | |||
| 719ea83bcd | |||
| 6ca9ba029b | |||
| e1abc67989 | |||
| 6a1cc16dc3 | |||
| 1ac903cf91 | |||
| 2f55206cf0 | |||
| 43395fef08 | |||
| 99d64fec36 | |||
| 66a5cce399 | |||
| 88dfb299a5 | |||
| 25073199f0 | |||
| 5c4ef3f23b | |||
| 9c3b6ea8bd | |||
| 7ca0be40dd | |||
| da26a1c54e | |||
| 01351883d1 | |||
| 4acfeab948 | |||
| 04725698e8 | |||
| 52a269b686 | |||
| 39f5aef0c5 | |||
| b8e1e99b84 | |||
| fe28fcedd1 | |||
| 27a54101e7 | |||
| 7f1963a367 | |||
| 6f8a7d6364 | |||
| 9221a4f1ae | |||
| d4a784ddb5 | |||
| 888e9e8def | |||
| a89b250765 | |||
| e7a2758722 | |||
| d2298240ed | |||
| dea12d3056 | |||
| b4f464c428 | |||
| 7fcce19897 | |||
| 58a5160d53 | |||
| 9f37285c9a | |||
| 8213d23d72 | |||
| fb63e38862 | |||
| d4d1a4434e | |||
| d8eeeded60 | |||
| 1a50060ff0 | |||
| 0441837b19 | |||
| 7c30437031 | |||
| 3da777459e | |||
| 32b0cd0b26 | |||
| 1ad08a599d | |||
| 1777dc1aca | |||
| 3ea6724e6c | |||
| 25339ca4ef | |||
| 3364a75cec | |||
| 19d482f249 | |||
| 2b2aa493b1 | |||
| 54f4722297 | |||
| e9dc7d3db6 | |||
| 5c66dd4f17 | |||
| 46c6113020 | |||
| bff7e44984 | |||
| 7834509390 | |||
| 8ff022cbc8 | |||
| 6755054c97 | |||
| 62520af8e7 | |||
| 215a1e0e86 | |||
| 8a000137a2 | |||
| f4873f7569 | |||
| 445bf3d053 | |||
| bf5e8d903c | |||
| abd3683a49 | |||
| 22c97ca390 | |||
| 9880f488e5 | |||
| 7cd60d6d4e | |||
| ca3a9180be | |||
| bce7a181bd | |||
| 43307b737c | |||
| 4ecb08619f | |||
| edb5e316ba | |||
| a3cbf9a945 | |||
| 002c7037f1 | |||
| 3386570439 | |||
| d880d95637 | |||
| 966e1eb2a6 | |||
| 56029851f0 | |||
| 4306b179bb | |||
| cbb746c752 | |||
| da0fb7dd15 | |||
| ff4cbda294 | |||
| 9fa660409d | |||
| dc1f1a0339 | |||
| ab9f98994d | |||
| 03ecf6197a | |||
| 0acff143fb | |||
| c4de7e578a | |||
| 18d071128d | |||
| 255e4396dd | |||
| c26f4dfc2f | |||
| 9838a4ce0b | |||
| cf30f3d067 | |||
| 4bac67b8d7 | |||
| c0b55c3e4e | |||
| f69fdbe37e | |||
| 918ff28ed4 | |||
| 2906a4f891 | |||
| d4d2b659dc | |||
| 89657e362a | |||
| 9631b1b578 | |||
| f380247613 | |||
| 686680d731 | |||
| e34e2dd0b2 | |||
| 24b8fc859c | |||
| 506f59f8af | |||
| fa0bd103f3 | |||
| a5f879ae7a | |||
| bb888380aa | |||
| 7495a6b4a1 | |||
| cf214cc274 | |||
| 10f633be9a | |||
| 43aa3fc086 | |||
| efd1665c1d | |||
| 40e950732b | |||
| b15ec9a215 | |||
| 2316043c1e | |||
| ec20387aea | |||
| 85e4c0eca1 | |||
| fa01c47f43 | |||
| b85880fc92 | |||
| d5dc37629e | |||
| b3e2685564 | |||
| b948202ef2 | |||
| 9ba544bf71 | |||
| 82dfe652e0 | |||
| 392ad207d9 | |||
| 01e47b0bab | |||
| c7cbf11631 | |||
| afdb4fbfa2 | |||
| ef8a5b1453 | |||
| 1f56673c77 | |||
| 0ad0355250 | |||
| 8d3b3c7024 | |||
| b63ea99167 | |||
| 33288c057c | |||
| 6027c282ab | |||
| 0068f69982 | |||
| 9df379644b | |||
| 492939b5d1 | |||
| 20d45a4b1e | |||
| db70b6c88c | |||
| 1cee01a36c | |||
| a9c252f91c | |||
| 86ad5b5041 | |||
| c1c2ab6df8 | |||
| 7061328cc7 | |||
| 3f56da3a65 | |||
| 16fcf09c78 | |||
| cba3388cb1 | |||
| 94611913c3 | |||
| fa164e5281 | |||
| ec3b0e5d04 | |||
| 4c63c2681f | |||
| dd661feaf1 | |||
| 1f17bfff1b | |||
| 809a0b375d | |||
| d55b3415ac | |||
| edcb818842 | |||
| 1e429e1bb3 | |||
| 3472859afb | |||
| 444324e7c6 | |||
| 4908c7bb73 | |||
| 26025ec276 | |||
| 3b3905b513 | |||
| ce3d09cf2e | |||
| 5dd00db8d2 | |||
| 2dc7b50141 | |||
| b2ebcc63aa | |||
| f45bc0a0cc | |||
| bbe53cbca3 | |||
| 7354155c52 | |||
| 62b60fcdb3 | |||
| c1acfee910 | |||
| 5287323865 | |||
| b09d0e42aa | |||
| a3f14061dd | |||
| 557098de17 | |||
| 2fdb96a850 | |||
| d93d064d97 | |||
| ae76fb7dc4 | |||
| 2626afd066 | |||
| c0042cfb6b | |||
| a549d2ef34 | |||
| 4aa20c32b8 | |||
| ce7033b4ca | |||
| 41a54f4b25 | |||
| f96740f1fa | |||
| 8844cd5069 | |||
| 800d846af4 | |||
| 95d50a0391 | |||
| 5a83eab1fe | |||
| bac026a1f4 | |||
| 65482c493a | |||
| a05f837ca2 | |||
| 6fbb5d712e | |||
| 2c9d195474 | |||
| b663d34320 | |||
| 43095d0df1 | |||
| 47e0dc862c | |||
| 460b11b9c8 | |||
| d974a72cb9 | |||
| e86f37fdfb | |||
| 2ed120dc4c | |||
| 973ae785f4 | |||
| 4835813e2e | |||
| 632409050b | |||
| 9d991dbb97 | |||
| cddf7c20e4 | |||
| 5fd2fc59f4 | |||
| 97d7ccacbf | |||
| 242e56b1d8 | |||
| 4c7aa11353 | |||
| cac84ffe03 | |||
| cf66e1e226 | |||
| fa647e1e2c | |||
| 4203121d40 | |||
| 82fe6d5aa4 | |||
| 32db83f091 | |||
| 0ab949174a | |||
| 2bfaa95a81 | |||
| 96de1554f1 | |||
| f83dcd802c | |||
| 808aa50f5f | |||
| e00271e493 | |||
| 76bf245e16 | |||
| 9b52277d9a | |||
| 1209842bcd | |||
| 596ac1c389 | |||
| 9551a1e875 | |||
| 37e441206a | |||
| 5376f7e22e | |||
| 77bb04e91f | |||
| 97aa9d9a91 | |||
| 526049523f | |||
| 1186fc6624 | |||
| a1b3680643 | |||
| 501399919f | |||
| 725d57d967 | |||
| a821501392 | |||
| d3458148bd | |||
| df4da810ec | |||
| 8f47c84c8e | |||
| f61a544a57 | |||
| 3217d66c69 | |||
| fd48f5f110 | |||
| 77a4c95c4a | |||
| dbc60b1d82 | |||
| ed942bb997 | |||
| 6866084872 | |||
| 4c77419dcd | |||
| ecba6e0843 | |||
| 86dcb476f1 | |||
| 13e0857882 | |||
| bf93a9239c | |||
| 2d18aab709 | |||
| a1359da374 | |||
| f7bda835f9 | |||
| 7595896831 | |||
| 6614d19845 | |||
| 6209b86560 | |||
| a30859a3d4 | |||
| ddbb46289b | |||
| 64c35a9609 | |||
| f21069ab2e | |||
| 457729b832 | |||
| 756f04a0b3 | |||
| 5ee32cc3ba | |||
| 955558bc21 | |||
| c43a872c23 | |||
| de41b92d5d | |||
| 03091230ed | |||
| a8c88915ea | |||
| 4cd4720101 | |||
| 3b9280b19c | |||
| 2d27e07441 | |||
| 20a5762d2e | |||
| 146f71f704 | |||
| 1d4b0bc100 | |||
| 138ee0a448 | |||
| 2c8cae9d45 | |||
| 061d2b6493 | |||
| e71df936ab | |||
| f4253acb78 | |||
| c12518fa49 | |||
| 4704b2ebf7 | |||
| 89fdfdfb34 | |||
| 35d85f2aa3 | |||
| c0368f1c6d | |||
| abc069046c | |||
| 46d0b08068 | |||
| f7ea81cb51 | |||
| a7e3a0286e | |||
| 6da8924868 | |||
| d9dd6afe4b | |||
| dfec26f789 | |||
| d13be5e159 | |||
| 51c5f70d64 | |||
| 05b1902c06 | |||
| f4ae2cac68 | |||
| ea3995afce | |||
| c41d60c38f | |||
| 19edcbddd5 | |||
| 4f65555e82 | |||
| 9956cab507 | |||
| fddf0c51b7 | |||
| e2a52afb67 | |||
| c8c3a33912 | |||
| b178f69e47 | |||
| 049a56fcb0 | |||
| 2d41dd8f08 | |||
| aa9e33af1d | |||
| 02870805c7 | |||
| e493825ab7 | |||
| 762b248641 | |||
| f81ccee020 | |||
| 3561e5f30f | |||
| c67817b9d2 | |||
| 756619edb6 | |||
| ee1c889d54 | |||
| 9f3dcf07b6 | |||
| 93a2f103f7 | |||
| 3ea12ceeab | |||
| ce8ec51ae4 | |||
| 54bb4ef109 | |||
| 59b655ce5d | |||
| 9ea8dc7eee | |||
| df2c654192 | |||
| 4c1e1bb7d5 | |||
| 5542dee7b7 | |||
| eee54f507e | |||
| 6f1b1611ab | |||
| 205499220d | |||
| a0c5631eba | |||
| 9323abc788 | |||
| 632f898dc8 | |||
| 8737b0d984 | |||
| bcb68853d5 | |||
| 8823d6d65e | |||
| 5d3a2b6e84 | |||
| 23fb7753ab | |||
| f8e7e343cb | |||
| e5f4c5dc8d | |||
| 8a10867e5f | |||
| da366a75e8 | |||
| eb4bf74cc6 | |||
| 168c0ced13 | |||
| 5d4bdb431b | |||
| 40188c671f | |||
| f396e0e5eb | |||
| 942a8c9c8b | |||
| 414dcdae3e | |||
| 1195a6676f | |||
| 5501f53056 | |||
| 41d6e1c648 | |||
| 5397df57b8 | |||
| aa0de88821 | |||
| bd3136ca92 | |||
| 339413c0de | |||
| 31b55ca682 | |||
| aaf0830d66 | |||
| f78ee70609 | |||
| 9c1a35f444 | |||
| f4716cb28f | |||
| b3e3c28276 | |||
| 4eadbb7d83 | |||
| 7b3b341627 | |||
| 89267ce8cb | |||
| 78e3575d9b | |||
| e671ef783f | |||
| 91144dc8f8 | |||
| 5ac7257517 | |||
| 9f4f9702a6 | |||
| 01d169256e | |||
| 7a703ad091 | |||
| 4202875675 | |||
| 4237657dad | |||
| 75cb6be36f | |||
| 88a7397bbe | |||
| ce9273c7e8 | |||
| 653a414ac1 | |||
| 2080db21ca | |||
| a6a1810b4a | |||
| da4aebe498 | |||
| 03ebafc7b6 | |||
| a78e64a9bb | |||
| 6374b0ab08 | |||
| 473ed45dee | |||
| d96d834a08 | |||
| f756ebef44 | |||
| e6931a53d6 | |||
| 58b5f3a5fe | |||
| 8a933609ee | |||
| ba4a50e234 | |||
| f8e8ce8bc2 | |||
| 0013d4e682 | |||
| 9a97f1178d | |||
| e6a551d84d | |||
| 92921430d8 | |||
| 20c905aae4 | |||
| ec0730ef73 | |||
| e4576b3405 | |||
| c5800970a8 | |||
| 8f88b1c156 | |||
| 1360994a67 | |||
| e00b28d27e | |||
| c5ff5c101d | |||
| b1a1001c49 | |||
| 77d5162e73 | |||
| 709180de13 | |||
| 5182651947 | |||
| 7f33fb20ed | |||
| c9f49fb06f | |||
| d065f78c0a | |||
| 2e8cd54ac2 | |||
| 28222c074e | |||
| 1b70766a17 | |||
| cda2d4688c | |||
| 5028582198 | |||
| 5458564cfa | |||
| 7f11373f75 | |||
| f9ca8d139b | |||
| 6f287a1894 | |||
| 6f4251796e | |||
| 5ad349e350 | |||
| ec4e0694a4 | |||
| 6ab8cd5b5b | |||
| b3868bd750 | |||
| ff8181bbfa | |||
| 074ad44bca | |||
| 9a6c34a2d5 | |||
| ce3c0f105e | |||
| 58162027a9 | |||
| 39400cce0a | |||
| 819d795c23 | |||
| d6b5f60b18 | |||
| 1f16a82a8d | |||
| 51fa58b481 | |||
| bed8c561a4 | |||
| fdb2441b1a | |||
| bf5be91868 | |||
| 06956a7a2d | |||
| a584ac2401 | |||
| 513c6a647f | |||
| 5a85aced45 | |||
| 41933b84a0 | |||
| 67aae87754 | |||
| 13346daa6a | |||
| 5e9b841cac | |||
| 5820fe1db3 | |||
| f5c0174473 | |||
| 31b583910e | |||
| fac4cb43a8 | |||
| 0f39d64d72 | |||
| 5fc012f7ba | |||
| f773ca2322 | |||
| 52c56af02c | |||
| 22d6fdf293 | |||
| b1256427a2 | |||
| 026a6066d3 | |||
| 0cd5898107 | |||
| a5d101ff61 | |||
| c1b04d1772 | |||
| 0d58201e3f | |||
| 939121dea6 | |||
| c44d26cc18 | |||
| c047209b86 | |||
| f989e4dc89 | |||
| c8c3ab312b | |||
| dc52dd635b | |||
| 4e97ba6da9 | |||
| c0d26256af | |||
| 7828de74aa | |||
| 01396e739c | |||
| e4c1a056ae | |||
| 613e9c0c54 | |||
| c5a174ba7a | |||
| 72296cf960 | |||
| 265449c5a7 | |||
| 1125b498ec | |||
| a28f3fa660 | |||
| 5a6b7ac4c1 | |||
| 7f988dcf26 | |||
| 7c177d568b | |||
| 12af19edba | |||
| 924bc6e469 | |||
| 4569a9ed13 | |||
| 4ca2f0c08d | |||
| 4a47815be7 | |||
| dd446b3034 | |||
| 0fcc0f798c | |||
| 1637644bdd | |||
| 2b114f225e | |||
| 32746e8dd9 | |||
| d29c1e572e | |||
| bb6dcb3880 | |||
| 3c56813d6b | |||
| 5c0482e972 | |||
| 83f981111a | |||
| 4171768cc9 | |||
| df2acfaa40 | |||
| 533380107b | |||
| 9c2b844290 | |||
| 98c1fea7fd | |||
| 415df211ed | |||
| ac09e059fc | |||
| 268cc7c48b | |||
| 358bd350b5 | |||
| a328ff2f2a | |||
| 46a08e49f5 | |||
| 05cd0b625c | |||
| 5e940187d9 | |||
| 8b196716a4 | |||
| 6025e0f557 | |||
| e00209c99c | |||
| 03e9f6b882 | |||
| fab8c90e92 | |||
| 3b719d0880 | |||
| 45dbe45fb4 | |||
| 76f2a3fbc4 | |||
| 5e761c3e29 | |||
| 6d51da3118 | |||
| 839f429806 | |||
| e533180dab | |||
| 40b9c6c08c | |||
| c8c9247dfe | |||
| 7f8749239f | |||
| 2b84967e05 | |||
| 6446f9b4a7 | |||
| 5933f97f93 | |||
| d670fc904f | |||
| 33371675e1 | |||
| bd91506069 | |||
| 393a92730f | |||
| 5ff016ea1f | |||
| 84b8df6d96 | |||
| 353999aa45 | |||
| 4a4e7e42cc | |||
| 06cd1dc562 | |||
| 48296fb14a | |||
| b3a4c3af19 | |||
| c0773be780 | |||
| 79df7eed21 | |||
| 14ce12f08e | |||
| 7cfa96f925 | |||
| 4131b45c6f | |||
| 4bf31d863e | |||
| 92db30e181 | |||
| 0f152f9281 | |||
| 7ca779f845 | |||
| 76a2d08906 | |||
| 161b047c39 | |||
| 8309ad665e | |||
| b6e414f944 | |||
| 36db83b253 | |||
| c4e641069d | |||
| 5e40fbbf07 | |||
| 8a47a01dd8 | |||
| e41587dbd9 | |||
| d5de91a864 | |||
| f8cf61e281 | |||
| 7323b051db | |||
| 72f86e68e8 | |||
| 5f9b21ea09 | |||
| dd44839bd3 | |||
| b8cec40317 | |||
| 19f781af31 | |||
| af825761c7 | |||
| 490fed8c2c | |||
| 85efa44673 | |||
| 985443e228 | |||
| 213182e2ab | |||
| 76eb0f3fe0 | |||
| a2f3752c31 | |||
| 4aebb83b0c | |||
| 7418d67b09 | |||
| 565266992f | |||
| 1863ba29fc | |||
| e600b50a11 | |||
| 762c3064d9 | |||
| b99fabcf1d | |||
| af248ee14a | |||
| c834d80206 | |||
| 66fb481ac2 | |||
| 7858cc34c2 | |||
| e306a0fd09 | |||
| 02d61d0764 | |||
| dddf644c34 | |||
| a8266f99b1 | |||
| 2fb30322ff | |||
| d05fdeb94c | |||
| dfec463765 | |||
| f6967be95f | |||
| 82fa9abe15 | |||
| 1d6cdf9eaa | |||
| 89f52a22c8 | |||
| dca0891e00 | |||
| bd4812ef2b | |||
| ce62f1d7ac | |||
| da5d3fe0ce | |||
| 3318161c44 | |||
| 25acda4410 | |||
| 115bb414c0 | |||
| 708ef16a1c | |||
| 8b501ddcde | |||
| 5b8beebaa3 | |||
| 7b6d195615 | |||
| 9e830abb90 | |||
| 01d0d4c00a | |||
| 4b21fcd80a | |||
| af5b316326 | |||
| beb18c6e2c | |||
| 09c1957ab6 | |||
| b2c3498a32 | |||
| 20de531c8f | |||
| 6d1dd3acbf | |||
| 346a8826aa | |||
| 25f6f3dbe1 | |||
| 87f7af1e1b | |||
| 764344b4ef | |||
| d327909389 | |||
| c1fdfa94f1 | |||
| d65c700bb9 | |||
| cbc2885c16 | |||
| 8fd3530653 | |||
| 244f0fba11 | |||
| 56a0d5d15b | |||
| ca8cc8bc66 | |||
| 627f1b75d6 | |||
| 18731a5aa0 | |||
| 4bd943ae7b | |||
| e04d363123 | |||
| d1c018690d | |||
| 54f732176d | |||
| fb32531584 | |||
| 5c9a9c7dfa | |||
| fc46c8bd4d | |||
| f28759d07a | |||
| 93c33ca455 | |||
| 9c50dc2ef9 | |||
| 883124d8ab | |||
| 1ee2b180d4 | |||
| e6e2c62474 | |||
| 5df511a940 | |||
| 462b0af225 | |||
| 5c469ed378 | |||
| c59ab5d917 | |||
| 8a10a9807d | |||
| 623a4dea4f | |||
| 18d7408f53 | |||
| 462b6f4198 | |||
| 1049bb901d | |||
| 999c9b565d | |||
| 27aeb73157 | |||
| 12ff9cc146 | |||
| f114baebd6 | |||
| 11a6546064 | |||
| 771e42d1a8 | |||
| 5e3c12298b | |||
| a5dd4a63d1 | |||
| 9fbe117f78 | |||
| 3429165aca | |||
| 9310114c0e | |||
| 141b4f86ae | |||
| 67ffd91641 | |||
| 9a94485c91 | |||
| 28b6fe49bb | |||
| 308ba887a3 | |||
| d2a1901f44 | |||
| 64391f3abc | |||
| e47b3f0397 | |||
| c6ff808cce | |||
| e9d0c14eee | |||
| 23d8a0aeeb | |||
| 512edae9c6 | |||
| 25ae2b3c9b | |||
| 44176f7ee6 | |||
| 47cad8a30b | |||
| 4ad2db3ca8 | |||
| 24a5a9425e | |||
| 1cdf4478b8 | |||
| b67814d68a | |||
| 5a64424b16 | |||
| 32b3b4cd3f | |||
| d0a24f7041 | |||
| aa406d9b8b | |||
| a38eba2916 | |||
| aec1d671fa | |||
| 26504d6d83 | |||
| 87a1b0bf5a | |||
| bd0726db37 | |||
| 75fbda5a9f | |||
| ee093397d3 | |||
| 3c12a98ef3 | |||
| fff918e0ee | |||
| 1536a13d3c | |||
| b26847f250 | |||
| c7d3e5294a | |||
| 86d42a03a0 | |||
| bf4a831781 | |||
| 90cc88f05f | |||
| 315230af27 | |||
| fed24920f8 | |||
| a785d7b892 | |||
| de9eb26ebc | |||
| a5105f9f9d | |||
| 0fef1619d2 | |||
| b209c49877 | |||
| ddc218c4d4 | |||
| 77f348912f | |||
| 6bac82da25 | |||
| a51727b636 | |||
| ec722014e6 | |||
| 256761eb5b | |||
| 07731c06c0 | |||
| 556584f9f5 | |||
| 61c93b47ca | |||
| 044aa738a3 | |||
| 8da2b63f31 | |||
| ce033b0956 | |||
| a9df684b80 | |||
| 356771bcea | |||
| 166c0f7dfb | |||
| aa41cc4d3d | |||
| 0c3e3f2bc6 | |||
| 792b6efd12 | |||
| 122fbd841c | |||
| ad5823055d | |||
| 92afe1c9ab | |||
| 1826adf1c2 | |||
| 97f6cda4ad | |||
| bccfcdf9a1 | |||
| 8049824170 | |||
| 99acadaf59 | |||
| 2be4b36d1a | |||
| c283f37390 | |||
| d21d448947 | |||
| d16c28aebd | |||
| ce45bacc6f | |||
| a68b85c522 | |||
| 7d0149b59d | |||
| 447c82f74a | |||
| 8db263e19b | |||
| 7cf34dbd8a | |||
| 283495832f | |||
| f6312a01d7 | |||
| c7d43142f2 | |||
| c4da858095 | |||
| 5ff47bad18 | |||
| 18819ae53d | |||
| ddc2cea427 | |||
| bc17597923 | |||
| 49f3c16a38 | |||
| 5db1494341 | |||
| cccb706ad5 | |||
| c6d7d1a947 | |||
| 9685dbbb9d | |||
| a18d459343 | |||
| 4b5013231c | |||
| a04bcf5b23 | |||
| 1c579e8e5b | |||
| bbab6e39ff | |||
| 2e68a0db5d | |||
| abc59901c1 | |||
| aaa0c99524 | |||
| 0780539326 | |||
| c8434e73ef | |||
| 058ec9f24d | |||
| 7127943298 | |||
| 9adc03d56b | |||
| 5d6b060dee | |||
| fc82eff93b | |||
| 1c316e52a9 | |||
| 76afd54d3c | |||
| 7fe7dac57a | |||
| 63e59692e2 | |||
| 405a96034c | |||
| e9dc7428b8 | |||
| b4342a36aa | |||
| 1158ae958a | |||
| 062c9b5efb | |||
| 66e8647517 | |||
| f47b975fe7 | |||
| e5d9ae62fa | |||
| 9c1eab04b9 | |||
| 72d4370878 | |||
| 88da796923 | |||
| 2ab4ed871c | |||
| 0ecd275c56 | |||
| 4f40bcbe5e | |||
| cb7b3de48c | |||
| 13fbb9bf54 | |||
| be8ed913e5 | |||
| fe17683d27 | |||
| 7d72a91bb7 | |||
| 7a75f20a2c | |||
| 8a7499d874 | |||
| adc5f0becc | |||
| 6d710ca442 | |||
| 7cbf8dffbe | |||
| e1cb46c8fd | |||
| 8b97d74e0a | |||
| c4f927e72c | |||
| 2880c29f8c | |||
| 474962db39 | |||
| f970838ecf | |||
| 29e2746e72 | |||
| 1ce884d1c7 | |||
| 24697ae60f | |||
| 53c554f25c | |||
| d1af8c1224 | |||
| 9ac098f1ca | |||
| 300fe10da5 | |||
| b33c8d6b77 | |||
| b06a755154 | |||
| 817b962c4a | |||
| 56c52e860d | |||
| fd89c1128a | |||
| beec1a97d4 | |||
| b955e3d9b9 | |||
| b12079694c | |||
| 7a83584317 | |||
| 1c4cc090af | |||
| a614d7dddd | |||
| ae21b8305a | |||
| 6f6767ab86 | |||
| ee35c371ec | |||
| 4d59c27a13 | |||
| 0dc0742e81 | |||
| 3b0abb7a20 | |||
| 42231cf319 | |||
| 11c8025ef4 | |||
| eda976bb5d | |||
| 49c445d0f7 | |||
| 875e1feafe | |||
| 5f5504100b | |||
| 2215c8a98c | |||
| ebe887def0 | |||
| 1dded41311 | |||
| 6db4755109 | |||
| a01dee9a27 | |||
| 582bde8d0e | |||
| f609727afb | |||
| a058f1c58b | |||
| 70abf69dc7 | |||
| 269ec257b5 | |||
| 2c15a9fc0c | |||
| 0826246cbe | |||
| a3add9b20f | |||
| 6c20b5911f | |||
| d779b3ea27 | |||
| 618e7ed12e | |||
| d84dd3a526 | |||
| 27dbd494bd | |||
| 15100caf32 | |||
| 4e9c7e0b91 | |||
| 0261ecdcbb | |||
| 5bf699cba9 | |||
| 7ee1d2c391 | |||
| 5c9c47d078 | |||
| af5309ff21 | |||
| c7539dc5dd | |||
| 4b2c2d8ba2 | |||
| ee529a5973 | |||
| 3e04dc6b46 | |||
| dbf4b4dd3b | |||
| 560fdf17fa | |||
| 7a61a2548b | |||
| 31361286b5 | |||
| abd29c1cb4 | |||
| 9f4e120283 | |||
| d9f585e4b2 | |||
| f4456f46a7 | |||
| 3dc27f2b0a | |||
| 95e39324c7 | |||
| 392ba59741 | |||
| 26228d2c71 | |||
| 8f58ba17a8 | |||
| 75f39640b0 | |||
| 42dcc159e9 | |||
| 791faa6dfd | |||
| aea2b23fc3 | |||
| 47438b7db9 | |||
| df3d3c6398 | |||
| 1457a10b0b | |||
| 2b6e8eb67c | |||
| 11cb11bc2b | |||
| bb5552c8bc | |||
| 8f5a9b7b8e | |||
| 7e365c351d | |||
| a0f0206ed8 | |||
| 554628c486 | |||
| 37c2d945ec | |||
| 59a24ef37f | |||
| ad58a1efeb | |||
| 682b155deb | |||
| 0e0d84fea7 | |||
| 4ceb4e22d4 | |||
| 2ae2801058 | |||
| 5189aa5003 | |||
| 87cc2d01cb | |||
| f86fe4db32 | |||
| 1940309954 | |||
| d946ea9b15 | |||
| 0f8ce8966a | |||
| c9b2c83dc4 | |||
| 2d24a7bf00 | |||
| 4c80a71bca | |||
| 264f1df172 | |||
| 5b17d87a97 | |||
| 0e4df43ddb | |||
| 3d7796d8c3 | |||
| 4e647620f0 | |||
| a38fcef6f1 | |||
| b5fdeef535 | |||
| 5d3ae11374 | |||
| 7db75ab21b | |||
| 3d12af6b21 | |||
| 601eb3e7ff | |||
| 5754a95f48 | |||
| b3e76f6485 | |||
| 47b3278f96 | |||
| 27e31fef9f | |||
| 3807b8c277 | |||
| 7db83c1dee | |||
| 496cd486b1 | |||
| 034f1072bf | |||
| b5c99c87e1 | |||
| c5fe86272e | |||
| 15840302e0 | |||
| 0f526ca616 | |||
| bc3d694f7f | |||
| 7f880c23b8 | |||
| 7c6aa3a425 | |||
| 9636c808fe | |||
| f49ba88cb4 | |||
| 0cbc225408 | |||
| f85d047ee6 | |||
| f033b8219c | |||
| 1357e7f84e | |||
| 3eaab219f1 | |||
| ce97732da7 | |||
| 7fe2fa493e | |||
| 78acf59f98 | |||
| 1c0954d0cf | |||
| fe6ea9511b | |||
| 1c9c183d66 | |||
| 67ff426894 | |||
| 6eb5c0e0ec | |||
| 4e11d5c1cf | |||
| 155b293b61 | |||
| 282bfe9c5d | |||
| 4ddace2a92 | |||
| 4b7b0ee7e9 | |||
| af6ba33921 | |||
| 622e65e7a5 | |||
| 2f9f89042c | |||
| 538000ed32 | |||
| fe676db0ce | |||
| 30e89a0b69 | |||
| 8e49f7ec26 | |||
| 86088d1dcd | |||
| 5c6ea59d30 | |||
| f364420007 | |||
| 96ff875d2b | |||
| 717ece9d1f | |||
| 013216ad8c | |||
| 16d8d56832 | |||
| 06d9fa1d98 | |||
| 59141f99bd | |||
| dbbe7dbd0d | |||
| c46161fc87 | |||
| 70ec483581 |
+352
-105
@@ -6,144 +6,158 @@ end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
max_line_length = 120
|
||||
max_line_length = 140
|
||||
tab_width = 4
|
||||
ij_continuation_indent_size = 8
|
||||
ij_formatter_off_tag = @formatter:off
|
||||
ij_formatter_on_tag = @formatter:on
|
||||
ij_formatter_tags_enabled = false
|
||||
ij_smart_tabs = false
|
||||
ij_visual_guides = 140
|
||||
ij_wrap_on_typing = false
|
||||
|
||||
[*.java]
|
||||
ij_visual_guides = none
|
||||
ij_java_align_consecutive_assignments = false
|
||||
ij_java_align_consecutive_variable_declarations = false
|
||||
ij_java_align_group_field_declarations = false
|
||||
ij_java_align_multiline_annotation_parameters = false
|
||||
ij_java_align_multiline_array_initializer_expression = false
|
||||
ij_java_align_multiline_assignment = false
|
||||
ij_java_align_multiline_binary_operation = false
|
||||
ij_java_align_multiline_chained_methods = false
|
||||
ij_java_align_multiline_extends_list = false
|
||||
ij_java_align_multiline_annotation_parameters = true
|
||||
ij_java_align_multiline_array_initializer_expression = true
|
||||
ij_java_align_multiline_assignment = true
|
||||
ij_java_align_multiline_binary_operation = true
|
||||
ij_java_align_multiline_chained_methods = true
|
||||
ij_java_align_multiline_extends_list = true
|
||||
ij_java_align_multiline_for = true
|
||||
ij_java_align_multiline_method_parentheses = false
|
||||
ij_java_align_multiline_method_parentheses = true
|
||||
ij_java_align_multiline_parameters = true
|
||||
ij_java_align_multiline_parameters_in_calls = false
|
||||
ij_java_align_multiline_parenthesized_expression = false
|
||||
ij_java_align_multiline_parameters_in_calls = true
|
||||
ij_java_align_multiline_parenthesized_expression = true
|
||||
ij_java_align_multiline_records = true
|
||||
ij_java_align_multiline_resources = true
|
||||
ij_java_align_multiline_ternary_operation = false
|
||||
ij_java_align_multiline_text_blocks = false
|
||||
ij_java_align_multiline_throws_list = false
|
||||
ij_java_align_subsequent_simple_methods = false
|
||||
ij_java_align_throws_keyword = false
|
||||
ij_java_annotation_parameter_wrap = off
|
||||
ij_java_array_initializer_new_line_after_left_brace = false
|
||||
ij_java_array_initializer_right_brace_on_new_line = false
|
||||
ij_java_array_initializer_wrap = off
|
||||
ij_java_assert_statement_colon_on_next_line = false
|
||||
ij_java_assert_statement_wrap = off
|
||||
ij_java_assignment_wrap = off
|
||||
ij_java_align_multiline_ternary_operation = true
|
||||
ij_java_align_multiline_text_blocks = true
|
||||
ij_java_align_multiline_throws_list = true
|
||||
ij_java_align_subsequent_simple_methods = true
|
||||
ij_java_align_throws_keyword = true
|
||||
ij_java_annotation_parameter_wrap = on_every_item
|
||||
ij_java_array_initializer_new_line_after_left_brace = true
|
||||
ij_java_array_initializer_right_brace_on_new_line = true
|
||||
ij_java_array_initializer_wrap = normal
|
||||
ij_java_assert_statement_colon_on_next_line = true
|
||||
ij_java_assert_statement_wrap = on_every_item
|
||||
ij_java_assignment_wrap = normal
|
||||
ij_java_binary_operation_sign_on_next_line = false
|
||||
ij_java_binary_operation_wrap = off
|
||||
ij_java_binary_operation_wrap = normal
|
||||
ij_java_blank_lines_after_anonymous_class_header = 0
|
||||
ij_java_blank_lines_after_class_header = 0
|
||||
ij_java_blank_lines_after_imports = 1
|
||||
ij_java_blank_lines_after_imports = 2
|
||||
ij_java_blank_lines_after_package = 1
|
||||
ij_java_blank_lines_around_class = 1
|
||||
ij_java_blank_lines_around_class = 2
|
||||
ij_java_blank_lines_around_field = 0
|
||||
ij_java_blank_lines_around_field_in_interface = 0
|
||||
ij_java_blank_lines_around_initializer = 1
|
||||
ij_java_blank_lines_around_initializer = 0
|
||||
ij_java_blank_lines_around_method = 1
|
||||
ij_java_blank_lines_around_method_in_interface = 1
|
||||
ij_java_blank_lines_before_class_end = 0
|
||||
ij_java_blank_lines_before_imports = 1
|
||||
ij_java_blank_lines_before_method_body = 0
|
||||
ij_java_blank_lines_before_package = 0
|
||||
ij_java_blank_lines_before_package = 1
|
||||
ij_java_block_brace_style = end_of_line
|
||||
ij_java_block_comment_at_first_column = true
|
||||
ij_java_builder_methods = none
|
||||
ij_java_call_parameters_new_line_after_left_paren = false
|
||||
ij_java_call_parameters_right_paren_on_new_line = false
|
||||
ij_java_call_parameters_wrap = off
|
||||
ij_java_call_parameters_wrap = normal
|
||||
ij_java_case_statement_on_separate_line = true
|
||||
ij_java_catch_on_new_line = false
|
||||
ij_java_class_annotation_wrap = split_into_lines
|
||||
ij_java_class_brace_style = end_of_line
|
||||
ij_java_class_count_to_use_import_on_demand = 30
|
||||
ij_java_class_names_in_javadoc = 1
|
||||
ij_java_class_count_to_use_import_on_demand = 200
|
||||
ij_java_class_names_in_javadoc = 3
|
||||
ij_java_do_not_indent_top_level_class_members = false
|
||||
ij_java_do_not_wrap_after_single_annotation = false
|
||||
ij_java_do_while_brace_force = never
|
||||
ij_java_doc_add_blank_line_after_description = true
|
||||
ij_java_doc_add_blank_line_after_param_comments = false
|
||||
ij_java_doc_add_blank_line_after_return = false
|
||||
ij_java_doc_add_blank_line_after_param_comments = true
|
||||
ij_java_doc_add_blank_line_after_return = true
|
||||
ij_java_doc_add_p_tag_on_empty_lines = true
|
||||
ij_java_doc_align_exception_comments = true
|
||||
ij_java_doc_align_param_comments = true
|
||||
ij_java_doc_do_not_wrap_if_one_line = false
|
||||
ij_java_doc_enable_formatting = true
|
||||
ij_java_doc_enable_leading_asterisks = true
|
||||
ij_java_doc_indent_on_continuation = false
|
||||
ij_java_doc_indent_on_continuation = true
|
||||
ij_java_doc_keep_empty_lines = true
|
||||
ij_java_doc_keep_empty_parameter_tag = true
|
||||
ij_java_doc_keep_empty_return_tag = true
|
||||
ij_java_doc_keep_empty_throws_tag = true
|
||||
ij_java_doc_keep_invalid_tags = true
|
||||
ij_java_doc_param_description_on_new_line = false
|
||||
ij_java_doc_preserve_line_breaks = false
|
||||
ij_java_doc_preserve_line_breaks = true
|
||||
ij_java_doc_use_throws_not_exception_tag = true
|
||||
ij_java_else_on_new_line = false
|
||||
ij_java_enum_constants_wrap = off
|
||||
ij_java_extends_keyword_wrap = off
|
||||
ij_java_extends_list_wrap = off
|
||||
ij_java_entity_dd_suffix = EJB
|
||||
ij_java_entity_eb_suffix = Bean
|
||||
ij_java_entity_hi_suffix = Home
|
||||
ij_java_entity_lhi_prefix = Local
|
||||
ij_java_entity_lhi_suffix = Home
|
||||
ij_java_entity_li_prefix = Local
|
||||
ij_java_entity_pk_class = java.lang.String
|
||||
ij_java_entity_vo_suffix = VO
|
||||
ij_java_enum_constants_wrap = split_into_lines
|
||||
ij_java_extends_keyword_wrap = normal
|
||||
ij_java_extends_list_wrap = on_every_item
|
||||
ij_java_field_annotation_wrap = split_into_lines
|
||||
ij_java_finally_on_new_line = false
|
||||
ij_java_for_brace_force = never
|
||||
ij_java_for_statement_new_line_after_left_paren = false
|
||||
ij_java_for_statement_right_paren_on_new_line = false
|
||||
ij_java_for_statement_wrap = off
|
||||
ij_java_for_statement_wrap = on_every_item
|
||||
ij_java_generate_final_locals = false
|
||||
ij_java_generate_final_parameters = false
|
||||
ij_java_if_brace_force = never
|
||||
ij_java_imports_layout = *,|,javax.**,java.**,|,$*
|
||||
ij_java_imports_layout = *, |, javax.**, java.**, |, com.dfsek.terra.**, |, $org.junit.jupiter.api.Assertions.**, |, $*
|
||||
ij_java_indent_case_from_switch = true
|
||||
ij_java_insert_inner_class_imports = false
|
||||
ij_java_insert_inner_class_imports = true
|
||||
ij_java_insert_override_annotation = true
|
||||
ij_java_keep_blank_lines_before_right_brace = 2
|
||||
ij_java_keep_blank_lines_between_package_declaration_and_header = 2
|
||||
ij_java_keep_blank_lines_between_package_declaration_and_header = 1
|
||||
ij_java_keep_blank_lines_in_code = 2
|
||||
ij_java_keep_blank_lines_in_declarations = 2
|
||||
ij_java_keep_builder_methods_indents = true
|
||||
ij_java_keep_control_statement_in_one_line = true
|
||||
ij_java_keep_first_column_comment = true
|
||||
ij_java_keep_indents_on_empty_lines = false
|
||||
ij_java_keep_first_column_comment = false
|
||||
ij_java_keep_indents_on_empty_lines = true
|
||||
ij_java_keep_line_breaks = true
|
||||
ij_java_keep_multiple_expressions_in_one_line = false
|
||||
ij_java_keep_simple_blocks_in_one_line = false
|
||||
ij_java_keep_simple_blocks_in_one_line = true
|
||||
ij_java_keep_simple_classes_in_one_line = false
|
||||
ij_java_keep_simple_lambdas_in_one_line = false
|
||||
ij_java_keep_simple_methods_in_one_line = false
|
||||
ij_java_keep_simple_lambdas_in_one_line = true
|
||||
ij_java_keep_simple_methods_in_one_line = true
|
||||
ij_java_label_indent_absolute = false
|
||||
ij_java_label_indent_size = 0
|
||||
ij_java_lambda_brace_style = end_of_line
|
||||
ij_java_layout_static_imports_separately = true
|
||||
ij_java_line_comment_add_space = false
|
||||
ij_java_line_comment_at_first_column = true
|
||||
ij_java_message_dd_suffix = EJB
|
||||
ij_java_message_eb_suffix = Bean
|
||||
ij_java_method_annotation_wrap = split_into_lines
|
||||
ij_java_method_brace_style = end_of_line
|
||||
ij_java_method_call_chain_wrap = off
|
||||
ij_java_method_call_chain_wrap = on_every_item
|
||||
ij_java_method_parameters_new_line_after_left_paren = false
|
||||
ij_java_method_parameters_right_paren_on_new_line = false
|
||||
ij_java_method_parameters_wrap = off
|
||||
ij_java_method_parameters_wrap = normal
|
||||
ij_java_modifier_list_wrap = false
|
||||
ij_java_names_count_to_use_import_on_demand = 3
|
||||
ij_java_names_count_to_use_import_on_demand = 50
|
||||
ij_java_new_line_after_lparen_in_record_header = false
|
||||
ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
|
||||
ij_java_parameter_annotation_wrap = off
|
||||
ij_java_packages_to_use_import_on_demand = $org.junit.jupiter.api.Assertions.*
|
||||
ij_java_parameter_annotation_wrap = on_every_item
|
||||
ij_java_parentheses_expression_new_line_after_left_paren = false
|
||||
ij_java_parentheses_expression_right_paren_on_new_line = false
|
||||
ij_java_place_assignment_sign_on_next_line = false
|
||||
ij_java_prefer_longer_names = true
|
||||
ij_java_prefer_parameters_wrap = false
|
||||
ij_java_prefer_parameters_wrap = true
|
||||
ij_java_record_components_wrap = normal
|
||||
ij_java_repeat_synchronized = true
|
||||
ij_java_replace_instanceof_and_cast = false
|
||||
@@ -151,8 +165,15 @@ ij_java_replace_null_check = true
|
||||
ij_java_replace_sum_lambda_with_method_ref = true
|
||||
ij_java_resource_list_new_line_after_left_paren = false
|
||||
ij_java_resource_list_right_paren_on_new_line = false
|
||||
ij_java_resource_list_wrap = off
|
||||
ij_java_resource_list_wrap = on_every_item
|
||||
ij_java_rparen_on_new_line_in_record_header = false
|
||||
ij_java_session_dd_suffix = EJB
|
||||
ij_java_session_eb_suffix = Bean
|
||||
ij_java_session_hi_suffix = Home
|
||||
ij_java_session_lhi_prefix = Local
|
||||
ij_java_session_lhi_suffix = Home
|
||||
ij_java_session_li_prefix = Local
|
||||
ij_java_session_si_suffix = Service
|
||||
ij_java_space_after_closing_angle_bracket_in_type_argument = false
|
||||
ij_java_space_after_colon = true
|
||||
ij_java_space_after_comma = true
|
||||
@@ -162,7 +183,7 @@ ij_java_space_after_quest = true
|
||||
ij_java_space_after_type_cast = true
|
||||
ij_java_space_before_annotation_array_initializer_left_brace = false
|
||||
ij_java_space_before_annotation_parameter_list = false
|
||||
ij_java_space_before_array_initializer_left_brace = true
|
||||
ij_java_space_before_array_initializer_left_brace = false
|
||||
ij_java_space_before_catch_keyword = true
|
||||
ij_java_space_before_catch_left_brace = true
|
||||
ij_java_space_before_catch_parentheses = false
|
||||
@@ -196,7 +217,7 @@ ij_java_space_before_while_keyword = true
|
||||
ij_java_space_before_while_left_brace = true
|
||||
ij_java_space_before_while_parentheses = false
|
||||
ij_java_space_inside_one_line_enum_braces = false
|
||||
ij_java_space_within_empty_array_initializer_braces = false
|
||||
ij_java_space_within_empty_array_initializer_braces = true
|
||||
ij_java_space_within_empty_method_call_parentheses = false
|
||||
ij_java_space_within_empty_method_parentheses = false
|
||||
ij_java_spaces_around_additive_operators = true
|
||||
@@ -213,8 +234,8 @@ ij_java_spaces_around_type_bounds_in_type_parameters = true
|
||||
ij_java_spaces_around_unary_operator = false
|
||||
ij_java_spaces_within_angle_brackets = false
|
||||
ij_java_spaces_within_annotation_parentheses = false
|
||||
ij_java_spaces_within_array_initializer_braces = false
|
||||
ij_java_spaces_within_braces = false
|
||||
ij_java_spaces_within_array_initializer_braces = true
|
||||
ij_java_spaces_within_braces = true
|
||||
ij_java_spaces_within_brackets = false
|
||||
ij_java_spaces_within_cast_parentheses = false
|
||||
ij_java_spaces_within_catch_parentheses = false
|
||||
@@ -223,80 +244,276 @@ ij_java_spaces_within_if_parentheses = false
|
||||
ij_java_spaces_within_method_call_parentheses = false
|
||||
ij_java_spaces_within_method_parentheses = false
|
||||
ij_java_spaces_within_parentheses = false
|
||||
ij_java_spaces_within_record_header = false
|
||||
ij_java_spaces_within_switch_parentheses = false
|
||||
ij_java_spaces_within_synchronized_parentheses = false
|
||||
ij_java_spaces_within_try_parentheses = false
|
||||
ij_java_spaces_within_while_parentheses = false
|
||||
ij_java_special_else_if_treatment = true
|
||||
ij_java_subclass_name_suffix = Impl
|
||||
ij_java_ternary_operation_signs_on_next_line = false
|
||||
ij_java_ternary_operation_wrap = off
|
||||
ij_java_ternary_operation_signs_on_next_line = true
|
||||
ij_java_ternary_operation_wrap = on_every_item
|
||||
ij_java_test_name_suffix = Test
|
||||
ij_java_throws_keyword_wrap = off
|
||||
ij_java_throws_list_wrap = off
|
||||
ij_java_throws_keyword_wrap = normal
|
||||
ij_java_throws_list_wrap = normal
|
||||
ij_java_use_external_annotations = false
|
||||
ij_java_use_fq_class_names = false
|
||||
ij_java_use_relative_indents = false
|
||||
ij_java_use_single_class_imports = true
|
||||
ij_java_variable_annotation_wrap = off
|
||||
ij_java_variable_annotation_wrap = on_every_item
|
||||
ij_java_visibility = public
|
||||
ij_java_while_brace_force = never
|
||||
ij_java_while_on_new_line = false
|
||||
ij_java_wrap_comments = false
|
||||
ij_java_wrap_comments = true
|
||||
ij_java_wrap_first_method_in_call_chain = false
|
||||
ij_java_wrap_long_lines = false
|
||||
ij_java_wrap_long_lines = true
|
||||
|
||||
[{*.gradle.kts,*.kt,*.kts,*.main.kts}]
|
||||
ij_kotlin_align_in_columns_case_branch = false
|
||||
[.editorconfig]
|
||||
ij_visual_guides = none
|
||||
ij_editorconfig_align_group_field_declarations = false
|
||||
ij_editorconfig_space_after_colon = false
|
||||
ij_editorconfig_space_after_comma = true
|
||||
ij_editorconfig_space_before_colon = false
|
||||
ij_editorconfig_space_before_comma = false
|
||||
ij_editorconfig_spaces_around_assignment_operators = true
|
||||
|
||||
[{*.gant, *.gradle, *.groovy, *.gson, *.gy}]
|
||||
ij_visual_guides = none
|
||||
ij_groovy_align_group_field_declarations = false
|
||||
ij_groovy_align_multiline_array_initializer_expression = false
|
||||
ij_groovy_align_multiline_assignment = false
|
||||
ij_groovy_align_multiline_binary_operation = false
|
||||
ij_groovy_align_multiline_chained_methods = false
|
||||
ij_groovy_align_multiline_extends_list = false
|
||||
ij_groovy_align_multiline_for = true
|
||||
ij_groovy_align_multiline_list_or_map = true
|
||||
ij_groovy_align_multiline_method_parentheses = false
|
||||
ij_groovy_align_multiline_parameters = true
|
||||
ij_groovy_align_multiline_parameters_in_calls = false
|
||||
ij_groovy_align_multiline_resources = true
|
||||
ij_groovy_align_multiline_ternary_operation = false
|
||||
ij_groovy_align_multiline_throws_list = false
|
||||
ij_groovy_align_named_args_in_map = true
|
||||
ij_groovy_align_throws_keyword = false
|
||||
ij_groovy_array_initializer_new_line_after_left_brace = false
|
||||
ij_groovy_array_initializer_right_brace_on_new_line = false
|
||||
ij_groovy_array_initializer_wrap = off
|
||||
ij_groovy_assert_statement_wrap = off
|
||||
ij_groovy_assignment_wrap = off
|
||||
ij_groovy_binary_operation_wrap = off
|
||||
ij_groovy_blank_lines_after_class_header = 0
|
||||
ij_groovy_blank_lines_after_imports = 1
|
||||
ij_groovy_blank_lines_after_package = 1
|
||||
ij_groovy_blank_lines_around_class = 1
|
||||
ij_groovy_blank_lines_around_field = 0
|
||||
ij_groovy_blank_lines_around_field_in_interface = 0
|
||||
ij_groovy_blank_lines_around_method = 1
|
||||
ij_groovy_blank_lines_around_method_in_interface = 1
|
||||
ij_groovy_blank_lines_before_imports = 1
|
||||
ij_groovy_blank_lines_before_method_body = 0
|
||||
ij_groovy_blank_lines_before_package = 0
|
||||
ij_groovy_block_brace_style = end_of_line
|
||||
ij_groovy_block_comment_at_first_column = true
|
||||
ij_groovy_call_parameters_new_line_after_left_paren = false
|
||||
ij_groovy_call_parameters_right_paren_on_new_line = false
|
||||
ij_groovy_call_parameters_wrap = off
|
||||
ij_groovy_catch_on_new_line = false
|
||||
ij_groovy_class_annotation_wrap = split_into_lines
|
||||
ij_groovy_class_brace_style = end_of_line
|
||||
ij_groovy_class_count_to_use_import_on_demand = 5
|
||||
ij_groovy_do_while_brace_force = never
|
||||
ij_groovy_else_on_new_line = false
|
||||
ij_groovy_enum_constants_wrap = off
|
||||
ij_groovy_extends_keyword_wrap = off
|
||||
ij_groovy_extends_list_wrap = off
|
||||
ij_groovy_field_annotation_wrap = split_into_lines
|
||||
ij_groovy_finally_on_new_line = false
|
||||
ij_groovy_for_brace_force = never
|
||||
ij_groovy_for_statement_new_line_after_left_paren = false
|
||||
ij_groovy_for_statement_right_paren_on_new_line = false
|
||||
ij_groovy_for_statement_wrap = off
|
||||
ij_groovy_if_brace_force = never
|
||||
ij_groovy_import_annotation_wrap = 2
|
||||
ij_groovy_imports_layout = *, |, javax.**, java.**, |, $*
|
||||
ij_groovy_indent_case_from_switch = true
|
||||
ij_groovy_indent_label_blocks = true
|
||||
ij_groovy_insert_inner_class_imports = false
|
||||
ij_groovy_keep_blank_lines_before_right_brace = 2
|
||||
ij_groovy_keep_blank_lines_in_code = 2
|
||||
ij_groovy_keep_blank_lines_in_declarations = 2
|
||||
ij_groovy_keep_control_statement_in_one_line = true
|
||||
ij_groovy_keep_first_column_comment = true
|
||||
ij_groovy_keep_indents_on_empty_lines = false
|
||||
ij_groovy_keep_line_breaks = true
|
||||
ij_groovy_keep_multiple_expressions_in_one_line = false
|
||||
ij_groovy_keep_simple_blocks_in_one_line = false
|
||||
ij_groovy_keep_simple_classes_in_one_line = true
|
||||
ij_groovy_keep_simple_lambdas_in_one_line = true
|
||||
ij_groovy_keep_simple_methods_in_one_line = true
|
||||
ij_groovy_label_indent_absolute = false
|
||||
ij_groovy_label_indent_size = 0
|
||||
ij_groovy_lambda_brace_style = end_of_line
|
||||
ij_groovy_layout_static_imports_separately = true
|
||||
ij_groovy_line_comment_add_space = false
|
||||
ij_groovy_line_comment_at_first_column = true
|
||||
ij_groovy_method_annotation_wrap = split_into_lines
|
||||
ij_groovy_method_brace_style = end_of_line
|
||||
ij_groovy_method_call_chain_wrap = off
|
||||
ij_groovy_method_parameters_new_line_after_left_paren = false
|
||||
ij_groovy_method_parameters_right_paren_on_new_line = false
|
||||
ij_groovy_method_parameters_wrap = off
|
||||
ij_groovy_modifier_list_wrap = false
|
||||
ij_groovy_names_count_to_use_import_on_demand = 3
|
||||
ij_groovy_parameter_annotation_wrap = off
|
||||
ij_groovy_parentheses_expression_new_line_after_left_paren = false
|
||||
ij_groovy_parentheses_expression_right_paren_on_new_line = false
|
||||
ij_groovy_prefer_parameters_wrap = false
|
||||
ij_groovy_resource_list_new_line_after_left_paren = false
|
||||
ij_groovy_resource_list_right_paren_on_new_line = false
|
||||
ij_groovy_resource_list_wrap = off
|
||||
ij_groovy_space_after_assert_separator = true
|
||||
ij_groovy_space_after_colon = true
|
||||
ij_groovy_space_after_comma = true
|
||||
ij_groovy_space_after_comma_in_type_arguments = true
|
||||
ij_groovy_space_after_for_semicolon = true
|
||||
ij_groovy_space_after_quest = true
|
||||
ij_groovy_space_after_type_cast = true
|
||||
ij_groovy_space_before_annotation_parameter_list = false
|
||||
ij_groovy_space_before_array_initializer_left_brace = false
|
||||
ij_groovy_space_before_assert_separator = false
|
||||
ij_groovy_space_before_catch_keyword = true
|
||||
ij_groovy_space_before_catch_left_brace = true
|
||||
ij_groovy_space_before_catch_parentheses = true
|
||||
ij_groovy_space_before_class_left_brace = true
|
||||
ij_groovy_space_before_closure_left_brace = true
|
||||
ij_groovy_space_before_colon = true
|
||||
ij_groovy_space_before_comma = false
|
||||
ij_groovy_space_before_do_left_brace = true
|
||||
ij_groovy_space_before_else_keyword = true
|
||||
ij_groovy_space_before_else_left_brace = true
|
||||
ij_groovy_space_before_finally_keyword = true
|
||||
ij_groovy_space_before_finally_left_brace = true
|
||||
ij_groovy_space_before_for_left_brace = true
|
||||
ij_groovy_space_before_for_parentheses = true
|
||||
ij_groovy_space_before_for_semicolon = false
|
||||
ij_groovy_space_before_if_left_brace = true
|
||||
ij_groovy_space_before_if_parentheses = true
|
||||
ij_groovy_space_before_method_call_parentheses = false
|
||||
ij_groovy_space_before_method_left_brace = true
|
||||
ij_groovy_space_before_method_parentheses = false
|
||||
ij_groovy_space_before_quest = true
|
||||
ij_groovy_space_before_switch_left_brace = true
|
||||
ij_groovy_space_before_switch_parentheses = true
|
||||
ij_groovy_space_before_synchronized_left_brace = true
|
||||
ij_groovy_space_before_synchronized_parentheses = true
|
||||
ij_groovy_space_before_try_left_brace = true
|
||||
ij_groovy_space_before_try_parentheses = true
|
||||
ij_groovy_space_before_while_keyword = true
|
||||
ij_groovy_space_before_while_left_brace = true
|
||||
ij_groovy_space_before_while_parentheses = true
|
||||
ij_groovy_space_in_named_argument = true
|
||||
ij_groovy_space_in_named_argument_before_colon = false
|
||||
ij_groovy_space_within_empty_array_initializer_braces = false
|
||||
ij_groovy_space_within_empty_method_call_parentheses = false
|
||||
ij_groovy_spaces_around_additive_operators = true
|
||||
ij_groovy_spaces_around_assignment_operators = true
|
||||
ij_groovy_spaces_around_bitwise_operators = true
|
||||
ij_groovy_spaces_around_equality_operators = true
|
||||
ij_groovy_spaces_around_lambda_arrow = true
|
||||
ij_groovy_spaces_around_logical_operators = true
|
||||
ij_groovy_spaces_around_multiplicative_operators = true
|
||||
ij_groovy_spaces_around_regex_operators = true
|
||||
ij_groovy_spaces_around_relational_operators = true
|
||||
ij_groovy_spaces_around_shift_operators = true
|
||||
ij_groovy_spaces_within_annotation_parentheses = false
|
||||
ij_groovy_spaces_within_array_initializer_braces = false
|
||||
ij_groovy_spaces_within_braces = true
|
||||
ij_groovy_spaces_within_brackets = false
|
||||
ij_groovy_spaces_within_cast_parentheses = false
|
||||
ij_groovy_spaces_within_catch_parentheses = false
|
||||
ij_groovy_spaces_within_for_parentheses = false
|
||||
ij_groovy_spaces_within_gstring_injection_braces = false
|
||||
ij_groovy_spaces_within_if_parentheses = false
|
||||
ij_groovy_spaces_within_list_or_map = false
|
||||
ij_groovy_spaces_within_method_call_parentheses = false
|
||||
ij_groovy_spaces_within_method_parentheses = false
|
||||
ij_groovy_spaces_within_parentheses = false
|
||||
ij_groovy_spaces_within_switch_parentheses = false
|
||||
ij_groovy_spaces_within_synchronized_parentheses = false
|
||||
ij_groovy_spaces_within_try_parentheses = false
|
||||
ij_groovy_spaces_within_tuple_expression = false
|
||||
ij_groovy_spaces_within_while_parentheses = false
|
||||
ij_groovy_special_else_if_treatment = true
|
||||
ij_groovy_ternary_operation_wrap = off
|
||||
ij_groovy_throws_keyword_wrap = off
|
||||
ij_groovy_throws_list_wrap = off
|
||||
ij_groovy_use_flying_geese_braces = false
|
||||
ij_groovy_use_fq_class_names = false
|
||||
ij_groovy_use_fq_class_names_in_javadoc = true
|
||||
ij_groovy_use_relative_indents = false
|
||||
ij_groovy_use_single_class_imports = true
|
||||
ij_groovy_variable_annotation_wrap = off
|
||||
ij_groovy_while_brace_force = never
|
||||
ij_groovy_while_on_new_line = false
|
||||
ij_groovy_wrap_long_lines = false
|
||||
|
||||
[{*.gql, *.graphql, *.graphqls}]
|
||||
ij_visual_guides = none
|
||||
|
||||
[{*.kt, *.kts}]
|
||||
ij_visual_guides = none
|
||||
ij_kotlin_align_in_columns_case_branch = true
|
||||
ij_kotlin_align_multiline_binary_operation = false
|
||||
ij_kotlin_align_multiline_extends_list = false
|
||||
ij_kotlin_align_multiline_method_parentheses = false
|
||||
ij_kotlin_align_multiline_extends_list = true
|
||||
ij_kotlin_align_multiline_method_parentheses = true
|
||||
ij_kotlin_align_multiline_parameters = true
|
||||
ij_kotlin_align_multiline_parameters_in_calls = false
|
||||
ij_kotlin_align_multiline_parameters_in_calls = true
|
||||
ij_kotlin_allow_trailing_comma = false
|
||||
ij_kotlin_allow_trailing_comma_on_call_site = false
|
||||
ij_kotlin_assignment_wrap = off
|
||||
ij_kotlin_assignment_wrap = normal
|
||||
ij_kotlin_blank_lines_after_class_header = 0
|
||||
ij_kotlin_blank_lines_around_block_when_branches = 0
|
||||
ij_kotlin_blank_lines_around_block_when_branches = 1
|
||||
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
|
||||
ij_kotlin_block_comment_at_first_column = true
|
||||
ij_kotlin_call_parameters_new_line_after_left_paren = false
|
||||
ij_kotlin_call_parameters_right_paren_on_new_line = false
|
||||
ij_kotlin_call_parameters_wrap = off
|
||||
ij_kotlin_call_parameters_new_line_after_left_paren = true
|
||||
ij_kotlin_call_parameters_right_paren_on_new_line = true
|
||||
ij_kotlin_call_parameters_wrap = on_every_item
|
||||
ij_kotlin_catch_on_new_line = false
|
||||
ij_kotlin_class_annotation_wrap = split_into_lines
|
||||
ij_kotlin_continuation_indent_for_chained_calls = true
|
||||
ij_kotlin_continuation_indent_for_expression_bodies = true
|
||||
ij_kotlin_continuation_indent_in_argument_lists = true
|
||||
ij_kotlin_continuation_indent_in_elvis = true
|
||||
ij_kotlin_continuation_indent_in_if_conditions = true
|
||||
ij_kotlin_continuation_indent_in_parameter_lists = true
|
||||
ij_kotlin_continuation_indent_in_supertype_lists = true
|
||||
ij_kotlin_continuation_indent_for_chained_calls = false
|
||||
ij_kotlin_continuation_indent_for_expression_bodies = false
|
||||
ij_kotlin_continuation_indent_in_argument_lists = false
|
||||
ij_kotlin_continuation_indent_in_elvis = false
|
||||
ij_kotlin_continuation_indent_in_if_conditions = false
|
||||
ij_kotlin_continuation_indent_in_parameter_lists = false
|
||||
ij_kotlin_continuation_indent_in_supertype_lists = false
|
||||
ij_kotlin_else_on_new_line = false
|
||||
ij_kotlin_enum_constants_wrap = off
|
||||
ij_kotlin_extends_list_wrap = off
|
||||
ij_kotlin_field_annotation_wrap = split_into_lines
|
||||
ij_kotlin_enum_constants_wrap = on_every_item
|
||||
ij_kotlin_extends_list_wrap = normal
|
||||
ij_kotlin_field_annotation_wrap = on_every_item
|
||||
ij_kotlin_finally_on_new_line = false
|
||||
ij_kotlin_if_rparen_on_new_line = false
|
||||
ij_kotlin_if_rparen_on_new_line = true
|
||||
ij_kotlin_import_nested_classes = false
|
||||
ij_kotlin_imports_layout = *, java.*, javax.*, kotlin.**
|
||||
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
|
||||
ij_kotlin_keep_blank_lines_before_right_brace = 2
|
||||
ij_kotlin_keep_blank_lines_before_right_brace = 1
|
||||
ij_kotlin_keep_blank_lines_in_code = 2
|
||||
ij_kotlin_keep_blank_lines_in_declarations = 2
|
||||
ij_kotlin_keep_first_column_comment = true
|
||||
ij_kotlin_keep_indents_on_empty_lines = false
|
||||
ij_kotlin_keep_indents_on_empty_lines = true
|
||||
ij_kotlin_keep_line_breaks = true
|
||||
ij_kotlin_lbrace_on_next_line = false
|
||||
ij_kotlin_line_comment_add_space = false
|
||||
ij_kotlin_line_comment_at_first_column = true
|
||||
ij_kotlin_method_annotation_wrap = split_into_lines
|
||||
ij_kotlin_method_call_chain_wrap = off
|
||||
ij_kotlin_method_parameters_new_line_after_left_paren = false
|
||||
ij_kotlin_method_parameters_right_paren_on_new_line = false
|
||||
ij_kotlin_method_parameters_wrap = off
|
||||
ij_kotlin_name_count_to_use_star_import = 5
|
||||
ij_kotlin_name_count_to_use_star_import_for_members = 3
|
||||
ij_kotlin_parameter_annotation_wrap = off
|
||||
ij_kotlin_method_annotation_wrap = on_every_item
|
||||
ij_kotlin_method_call_chain_wrap = normal
|
||||
ij_kotlin_method_parameters_new_line_after_left_paren = true
|
||||
ij_kotlin_method_parameters_right_paren_on_new_line = true
|
||||
ij_kotlin_method_parameters_wrap = on_every_item
|
||||
ij_kotlin_name_count_to_use_star_import = 2147483647
|
||||
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
|
||||
ij_kotlin_packages_to_use_import_on_demand = java.util.*, kotlinx.android.synthetic.*, io.ktor.*
|
||||
ij_kotlin_parameter_annotation_wrap = on_every_item
|
||||
ij_kotlin_space_after_comma = true
|
||||
ij_kotlin_space_after_extend_colon = true
|
||||
ij_kotlin_space_after_type_colon = true
|
||||
@@ -315,33 +532,63 @@ ij_kotlin_spaces_around_equality_operators = true
|
||||
ij_kotlin_spaces_around_function_type_arrow = true
|
||||
ij_kotlin_spaces_around_logical_operators = true
|
||||
ij_kotlin_spaces_around_multiplicative_operators = true
|
||||
ij_kotlin_spaces_around_range = false
|
||||
ij_kotlin_spaces_around_range = true
|
||||
ij_kotlin_spaces_around_relational_operators = true
|
||||
ij_kotlin_spaces_around_unary_operator = false
|
||||
ij_kotlin_spaces_around_when_arrow = true
|
||||
ij_kotlin_variable_annotation_wrap = off
|
||||
ij_kotlin_variable_annotation_wrap = on_every_item
|
||||
ij_kotlin_while_on_new_line = false
|
||||
ij_kotlin_wrap_elvis_expressions = 1
|
||||
ij_kotlin_wrap_expression_body_functions = 0
|
||||
ij_kotlin_wrap_expression_body_functions = 1
|
||||
ij_kotlin_wrap_first_method_in_call_chain = false
|
||||
|
||||
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}]
|
||||
indent_size = 2
|
||||
ij_json_keep_blank_lines_in_code = 0
|
||||
[{*.graphqlconfig, *.har, *.jsb2, *.jsb3, *.json, .babelrc, .eslintrc, .stylelintrc, bowerrc, jest.config, mcmod.info, pack.mcmeta}]
|
||||
ij_visual_guides = none
|
||||
ij_json_keep_blank_lines_in_code = 1
|
||||
ij_json_keep_indents_on_empty_lines = false
|
||||
ij_json_keep_line_breaks = true
|
||||
ij_json_space_after_colon = true
|
||||
ij_json_space_after_comma = true
|
||||
ij_json_space_before_colon = true
|
||||
ij_json_space_before_comma = false
|
||||
ij_json_spaces_within_braces = false
|
||||
ij_json_spaces_within_brackets = false
|
||||
ij_json_spaces_within_braces = true
|
||||
ij_json_spaces_within_brackets = true
|
||||
ij_json_wrap_long_lines = false
|
||||
|
||||
[{*.yaml,*.yml}]
|
||||
[{*.markdown, *.md}]
|
||||
max_line_length = 80
|
||||
ij_visual_guides = 80
|
||||
ij_markdown_force_one_space_after_blockquote_symbol = true
|
||||
ij_markdown_force_one_space_after_header_symbol = true
|
||||
ij_markdown_force_one_space_after_list_bullet = true
|
||||
ij_markdown_force_one_space_between_words = true
|
||||
ij_markdown_keep_indents_on_empty_lines = false
|
||||
ij_markdown_max_lines_around_block_elements = 1
|
||||
ij_markdown_max_lines_around_header = 1
|
||||
ij_markdown_max_lines_between_paragraphs = 1
|
||||
ij_markdown_min_lines_around_block_elements = 1
|
||||
ij_markdown_min_lines_around_header = 1
|
||||
ij_markdown_min_lines_between_paragraphs = 1
|
||||
|
||||
[{*.properties, spring.handlers, spring.schemas}]
|
||||
ij_visual_guides = none
|
||||
ij_properties_align_group_field_declarations = false
|
||||
ij_properties_keep_blank_lines = false
|
||||
ij_properties_key_value_delimiter = equals
|
||||
ij_properties_spaces_around_key_value_delimiter = false
|
||||
|
||||
[{*.yaml, *.yml}]
|
||||
indent_size = 2
|
||||
ij_visual_guides = none
|
||||
ij_yaml_align_values_properties = do_not_align
|
||||
ij_yaml_autoinsert_sequence_marker = true
|
||||
ij_yaml_block_mapping_on_new_line = false
|
||||
ij_yaml_indent_sequence_value = true
|
||||
ij_yaml_keep_indents_on_empty_lines = true
|
||||
ij_yaml_keep_line_breaks = true
|
||||
ij_yaml_space_before_colon = true
|
||||
ij_yaml_sequence_on_new_line = false
|
||||
ij_yaml_space_before_colon = false
|
||||
ij_yaml_spaces_within_braces = true
|
||||
ij_yaml_spaces_within_brackets = true
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Global owners, automatically request review when pull request is submitted
|
||||
* @dfsek @solonovamax
|
||||
|
||||
# Platforms
|
||||
## dfsek wrote the majority of the platform impls
|
||||
/platforms/bukkit/ @dfsek
|
||||
/platforms/fabric/ @dfsek
|
||||
/platforms/forge/ @dfsek
|
||||
/platforms/sponge/ @dfsek
|
||||
## solonovamax is working on the region generator (unless duplexsystem takes it over)
|
||||
/platforms/region/ @solonovamax
|
||||
|
||||
# Common
|
||||
/common/ @dfsek @solonovamax
|
||||
|
||||
# Gradle Stuff
|
||||
## Most gradle stuff was written by solonovamax
|
||||
/buildSrc/ @solonovamax
|
||||
*.gradle.kts @solonovamax
|
||||
@@ -0,0 +1,105 @@
|
||||
---
|
||||
name: "Bug Report"
|
||||
about: "Open a bug report to help us identify issues with Terra."
|
||||
title: "[Bug] <Put your title here>"
|
||||
labels: "Type: Bug, Status: Pending"
|
||||
assignees: ""
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
##############################################################################
|
||||
## WARNING! ##
|
||||
## IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN YOUR ISSUE BEING CLOSED ##
|
||||
##############################################################################
|
||||
-->
|
||||
|
||||
## Pre-Issue Checklist
|
||||
|
||||
<!--
|
||||
Please go through this checklist item by item and make sure you have successfully completed each of these steps.
|
||||
- You must be on the LATEST version of Terra to receive any support. There is no support for older versions of Terra.
|
||||
- Make sure that this is not a *specific* compatibility issue with another terrain generation mod.
|
||||
Do not request *specific* compatibility with mods or plugins (e.g. "Compatibility with TechCraft v7").
|
||||
That should be implemented in an addon, **not** in the main project.
|
||||
*General* compatibility (e.g. "Ability to pull Vanilla/Modded features from parent biomes") will be considered in the main project.
|
||||
- Make sure that there are no already existing issues open with your problem. If you open a duplicate, it will be closed as such.
|
||||
- Make sure that it is actually Terra causing the issue, and not another mod/plugin.
|
||||
You can do this by testing to see if you can recreate the issue without Terra installed.
|
||||
- Make sure that this is not an issue with a specific Terra *pack* or Terra *addon*, and instead applies to all of Terra.
|
||||
- Make sure that you attach a copy of the latest.log file.
|
||||
Putting *just* the exception IS NOT ENOUGH. We need to be able to check that there wasn't anything else before that caused it.
|
||||
- Make sure that you have filled out all the required information and given descriptions of everything.
|
||||
|
||||
You must put an x in all the boxes you have completed. (Like this: [x])
|
||||
|
||||
To make sure that your issue is rendered properly, you may check the "Preview" tab (below the title) to see a rendered version of it before you submit it.
|
||||
-->
|
||||
|
||||
- [ ] I have checked that I am on the latest version of Terra.
|
||||
- [ ] I have searched the github issue tracker for similar issues, including closed ones.
|
||||
- [ ] I have made sure that this is not a bug with another mod or plugin, and it is Terra that is causing the issue.
|
||||
- [ ] I have checked that this is an issue with Terra and not an issue with the pack I am using.
|
||||
<!-- If this is an issue with the default Terra pack, please open an issue on the pack repo: https://github.com/PolyhedralDev/TerraDefaultConfig/issues/new -->
|
||||
- [ ] I have attached a copy of the `latest.log` file
|
||||
- [ ] I have filled out and provided all the appropriate information.
|
||||
|
||||
## Environment
|
||||
|
||||
<!-- You can fill out the different items by putting the correct value beside each cell. -->
|
||||
|
||||
| Name | Value |
|
||||
|------------------------------|-------|
|
||||
| Terra Version | <!-- Put your Terra version here. (remove the comment) -->
|
||||
| Platform / Platform Version | <!-- Put your platform and platform version here. (remove the comment) (eg. Spigot, Fabric, Paper, etc.) (If you are using the Region generator, put that here instead) -->
|
||||
| Any External Plugins or Mods | <!-- Put a list of all the plugins or mods you have installed here. (remove the comment) (Make sure to NOT include any new lines) -->
|
||||
| Terra Packs In Use | <!-- Put a list of all the Terra packs you have installed here. (remove the comment) (Make sure to NOT include any new lines) (/te packs may be used to get a list) -->
|
||||
| Terra Addons In Use | <!-- Put a list of all the Terra addons you have installed here. (remove the comment) (Make sure to NOT include any new lines) (/te addons may be used to get a list) -->
|
||||
|
||||
## Issue Description
|
||||
|
||||
<!--
|
||||
Put a quick description of the issue here.
|
||||
Example: 'When generating terrain, something causes the chunks to not load properly', etc.
|
||||
-->
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!--
|
||||
Describe what you were doing when this happened.
|
||||
Make sure to include ALL information. Including anything you were doing before that may have caused it.
|
||||
-->
|
||||
|
||||
1. <!-- Put step #1 here. -->
|
||||
2. <!-- Put step #2 here. -->
|
||||
3. <!-- etc. -->
|
||||
|
||||
### Expected behavior
|
||||
|
||||
<!-- Describe what you think *should* happen here: -->
|
||||
|
||||
### Actual behavior
|
||||
|
||||
<!-- Describe what *actually* happens here: -->
|
||||
<!-- example: When I do _______, it actually does _______ -->
|
||||
|
||||
### Full stacktrace
|
||||
|
||||
<details>
|
||||
<summary>Exception Stacktrace</summary>
|
||||
|
||||
<!--
|
||||
If Terra logs an exception, please put it in the following section: (You will find any error logs in your console, or your latest.log)
|
||||
Note: this *must* be included, in ADDITION to the latest.log file.
|
||||
-->
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Additional details
|
||||
|
||||
<!-- Any other information you think should be added -->
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
name: "Feature Request"
|
||||
about: "Give us suggestions of features we could add to Terra."
|
||||
title: "[Feature] <Put your title here>"
|
||||
labels: "Type: Enhancement, Status: Pending"
|
||||
assignees: ""
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
########################################################################################
|
||||
## WARNING! ##
|
||||
## IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN YOUR FEATURE REQUEST BEING CLOSED ##
|
||||
########################################################################################
|
||||
-->
|
||||
|
||||
### Pre-Request Checklist
|
||||
|
||||
<!--
|
||||
Please go through this checklist item by item and make sure you have successfully completed each of these steps.
|
||||
- You must be on the LATEST version of Terra to make sure your feature hasn't been added yet.
|
||||
- Make sure that there are no already existing feature requests similar to yours. (Including closed!) If you open a duplicate, it will be closed as such.
|
||||
- Make sure that this is actually in the scope of Terra.
|
||||
- Make sure that this is not a feature request that should be made for a specific Terra *pack*, and instead applies to all of Terra.
|
||||
- Make sure that you attach a copy of the latest.log file, if there are any exceptions thrown in the console.
|
||||
Putting *just* the exception IS NOT ENOUGH. We need to be able to check that there wasn't anything else before that caused it.
|
||||
|
||||
You must put an x in all the boxes you have completed. (Like this: [x])
|
||||
|
||||
To make sure that your issue is rendered properly, you may check the "Preview" tab (below the title) to see a rendered version of it before you submit it.
|
||||
-->
|
||||
|
||||
- [ ] I have checked that I am on the latest version of Terra.
|
||||
- [ ] I have searched github for similar features requests, including closed ones, and found none.
|
||||
- [ ] I believe this is within the scope of Terra.
|
||||
- [ ] This feature request is for *all* of Terra, and isn't something that should be implemented by a pack or addon.
|
||||
|
||||
## Feature Description
|
||||
|
||||
<!--
|
||||
Quickly describe the basics of your feature request.
|
||||
Example: 'More noise presets should be added to Terra.'
|
||||
-->
|
||||
|
||||
### What Problem Does This Solve?
|
||||
|
||||
<!--
|
||||
Describe here what the issue is that you have.
|
||||
Examples: 'When I do _______, it annoys me that _______ does _______.' or 'There is not enough customization in _______ to do _______.'
|
||||
NOTE: This should NOT be used for a bug report. If this is unintentional, then please submit a bug report instead.
|
||||
-->
|
||||
|
||||
### A Solution You'd Like
|
||||
|
||||
<!-- Provide a clear and accurate description of how you would like this to be solved. -->
|
||||
|
||||
### Alternative Solutions
|
||||
|
||||
<!-- Provide a description of alternatives you have considered to this. -->
|
||||
|
||||
1. <!-- Alternative #1. -->
|
||||
2. <!-- Alternative #2. -->
|
||||
3. <!-- Alternative #3. -->
|
||||
|
||||
### Additonal Context
|
||||
|
||||
<!--
|
||||
Is there any additional context you would like to add?
|
||||
If not, you may remove this section.
|
||||
-->
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: "Other Issue"
|
||||
about: "Use this template if your issue doesn't accurately fit into any of the other categories."
|
||||
title: ""
|
||||
labels: "Type: Question, Status: Pending"
|
||||
assignees: ""
|
||||
|
||||
---
|
||||
|
||||
## Describe the issue
|
||||
|
||||
<!-- Please describe the issue as clearly and as concisely as possible, without missing any details. -->
|
||||
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Which Issue Template do I Choose?
|
||||
url: https://github.com/PolyhedralDev/Terra/wiki/How-To-Choose-An-Issue-Template
|
||||
about: Click this if you don't know which issue template to select. This will help you make sure you choose the right one and provide enough information for us to help you.
|
||||
- name: Terra Wiki
|
||||
url: https://github.com/PolyhedralDev/Terra/wiki
|
||||
about: Documentation for all things Terra.
|
||||
- name: Join the Support Discord
|
||||
url: https://discord.dfsek.com
|
||||
about: If you have a basic support question, join the Discord instead.
|
||||
@@ -0,0 +1,114 @@
|
||||
# Pull Request
|
||||
|
||||
## Brief description.
|
||||
|
||||
<!-- Please provide a brief description of the goals of your PR -->
|
||||
|
||||
<!--
|
||||
###########################################################################
|
||||
## WARNING! ##
|
||||
## IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN YOUR PR BEING CLOSED ##
|
||||
###########################################################################
|
||||
-->
|
||||
<!--
|
||||
Please go through this checklist item by item and make sure you have successfully completed each of these steps.
|
||||
- Your pull request MUST be either on the latest version of Terra, or on a branch for a future release.
|
||||
- Make sure that there are no already existing PRs that fix this. If so, it will be closed as a duplicate.
|
||||
- Make sure that this change is actually within the scope of Terra and is something a terrain generator should be doing.
|
||||
- Make sure that this is not an issue with a specific Terra *pack*, and instead applies to all of Terra.
|
||||
- Make sure that you have filled out all the required information and given descriptions of everything.
|
||||
-->
|
||||
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
|
||||
|
||||
### What Issues Does This Fix?
|
||||
|
||||
<!--
|
||||
Put Fix #XXXX or Closes #XXXX here if there are any open issues that this PR fixes.
|
||||
This is to automatically close the relevant issues.
|
||||
You may remove this if there is no issue for this PR.
|
||||
But unless this is a very small change, you should make an issue for it.
|
||||
-->
|
||||
|
||||
## Licensing
|
||||
|
||||
<!-- In order to be accepted, your changes must be under the GPLv3 license. Please check one of the following: -->
|
||||
|
||||
- [ ] I am the original author of this code, and I am willing to release it under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
||||
- [ ] I am not the original author of this code, but it is in public domain or released
|
||||
under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) or a compatible license.
|
||||
<!--
|
||||
Please provide reliable evidence of this.
|
||||
NOTE: for compatible licenses, you must make sure to add the included license somewhere in the program, if so required.
|
||||
(And even if it's not required, it's still nice to do it. Also add attribution somewhere.)
|
||||
-->
|
||||
|
||||
## Goal of the PR
|
||||
|
||||
<!--
|
||||
What is the goal of the PR?
|
||||
Put a checklist here of what has been done
|
||||
(and what *hasn't*, but you plan to do),
|
||||
so we can easily know what was changed.
|
||||
Note: this is only required for PRs that add new features.
|
||||
If your PR is not adding new features, only fixing bugs or adding translations, then you may delete this section.
|
||||
-->
|
||||
|
||||
- [ ] <!-- First thing -->
|
||||
- [ ] <!-- A requirement of the first thing. -->
|
||||
- [ ] <!-- A second requirement of the first thing. -->
|
||||
- [ ] <!-- Second thing -->
|
||||
- [ ] <!-- etc. -->
|
||||
|
||||
## Affects of the PR
|
||||
|
||||
<!---
|
||||
What types of changes does your code introduce? (Select any that apply. You may select multiple.)
|
||||
You must put an x in all the boxes that it applies to. (Like this: [x])
|
||||
-->
|
||||
|
||||
#### Types of changes
|
||||
|
||||
- [ ] Bug Fix <!-- Anything which fixes an issue in Terra. -->
|
||||
- [ ] Build system <!-- Anything which pretain to the build system. -->
|
||||
- [ ] Documentation <!-- Anything which adds or improves documentation for existing features. -->
|
||||
- [ ] New Feature <!-- Anything which adds new functionality to Terra. -->
|
||||
- [ ] Performance <!-- Anything which is imrpoves the performance of Terra. -->
|
||||
- [ ] Refactoring <!-- Anything which does not add any new code, only moves code around. -->
|
||||
- [ ] Repository <!-- Anything which affects the repository. Eg. changes to the `README.md` file. -->
|
||||
- [ ] Revert <!-- Anything which reverts previous commits. -->
|
||||
- [ ] Style <!-- Anything which updates style. -->
|
||||
- [ ] Tests <!-- Anything which adds or updates tests. -->
|
||||
- [ ] Translation <!-- Anything which is internationalizing the Terra program to other languages. -->
|
||||
|
||||
#### Compatiblity
|
||||
|
||||
- [ ] Breaking change <!-- A fix, or a feature, that breaks some previous functionality to Terra. -->
|
||||
- [ ] Non-Breaking change.
|
||||
<!--
|
||||
A change which does not break *any* previous functionality of Terra.
|
||||
(ie. is backwards compatible and will work with *any* previously existing supported features.
|
||||
Note: if a feature is annotated with @Incubating, @Preview, @Experimental,
|
||||
or is in a package called something similar to the previous annotations,
|
||||
then you may push breaking changes to only THOSE parts of Terra.)
|
||||
-->
|
||||
|
||||
#### Contribution Guidelines.
|
||||
|
||||
- [ ] I have read the [`CONTRIBUTING.md`](https://github.com/PolyhedralDev/Terra/blob/master/CONTRIBUTING.md) document in the root of the
|
||||
git repository.
|
||||
- [ ] My code follows the code style for this
|
||||
project. <!-- There is an included `.editorconfig` file in the base of the repo. Please use a plugin for your IDE of choice that follows those settings. -->
|
||||
|
||||
#### Documentation
|
||||
|
||||
- [ ] My change requires a change to the documentation.
|
||||
- [ ] I have updated the documentation accordingly.
|
||||
|
||||
#### Testing
|
||||
|
||||
- [ ] I have added tests to cover my changes.
|
||||
- [ ] All new and existing tests passed.
|
||||
<!--
|
||||
If it only introduces small changes, you don't need to add tests.
|
||||
But if you add big changes, you should probably at least write *some* testing, where applicable.
|
||||
-->
|
||||
@@ -1,39 +0,0 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Build Terra
|
||||
run: gradle shadowJar
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Package
|
||||
path: build/libs
|
||||
|
||||
- name: Publish release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
prerelease: false
|
||||
files: |
|
||||
build/libs/Terra-*-shaded.jar
|
||||
|
||||
+13
-9
@@ -52,6 +52,7 @@ gradle-app.setting
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
*.hprof
|
||||
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
@@ -84,14 +85,14 @@ hs_err_pid*
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
.idea/artifacts
|
||||
.idea/compiler.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/modules.xml
|
||||
.idea/*.iml
|
||||
.idea/modules
|
||||
*.iml
|
||||
*.ipr
|
||||
.idea/artifacts
|
||||
.idea/compiler.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/modules.xml
|
||||
.idea/**.iml
|
||||
.idea/modules
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
@@ -136,4 +137,7 @@ build
|
||||
.idea/modules/**.iml
|
||||
|
||||
!lib/*.jar
|
||||
.idea/Terra.iml
|
||||
/run/
|
||||
idea/**
|
||||
|
||||
testDir/
|
||||
Generated
-8
@@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
Generated
-6
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
-6
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
-18
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="/usr/share/java/gradle" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<Languages>
|
||||
<language minSize="54" name="Java" />
|
||||
</Languages>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="NonSerializableObjectPassedToObjectStream" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SerialVersionUIDNotStaticFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SerializableHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreAnonymousInnerClasses" value="false" />
|
||||
<option name="superClassString" value="java.awt.Component" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreAnonymousInnerClasses" value="false" />
|
||||
<option name="superClassString" value="java.awt.Component" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SerializableStoresNonSerializable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TransientFieldInNonSerializableClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TransientFieldNotInitialized" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
Generated
-85
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="papermc" />
|
||||
<option name="name" value="papermc" />
|
||||
<option name="url" value="https://papermc.io/repo/repository/maven-public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="parsii.local" />
|
||||
<option name="name" value="parsii" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/../parsii/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="local" />
|
||||
<option name="name" value="local" />
|
||||
<option name="url" value="file:lib" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="aikar" />
|
||||
<option name="name" value="aikar" />
|
||||
<option name="url" value="https://repo.aikar.co/content/groups/aikar/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="enginehub-maven" />
|
||||
<option name="name" value="enginehub-maven" />
|
||||
<option name="url" value="http://maven.enginehub.org/repo/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="spigotmc-repo" />
|
||||
<option name="name" value="spigotmc-repo" />
|
||||
<option name="url" value="https://hub.spigotmc.org/nexus/content/repositories/snapshots/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="enginehub" />
|
||||
<option name="name" value="enginehub" />
|
||||
<option name="url" value="https://maven.enginehub.org/repo/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="minecraft-repo" />
|
||||
<option name="name" value="minecraft-repo" />
|
||||
<option name="url" value="https://libraries.minecraft.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="gaea.local" />
|
||||
<option name="name" value="gaea" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/../Gaea/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="gaea.local" />
|
||||
<option name="name" value="gaea-local" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/../Gaea/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="CodeMC" />
|
||||
<option name="name" value="CodeMC" />
|
||||
<option name="url" value="https://repo.codemc.org/repository/maven-public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenLocal" />
|
||||
<option name="name" value="MavenLocal" />
|
||||
<option name="url" value="file:$MAVEN_REPOSITORY$/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
Generated
-25
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0">
|
||||
<entry_point TYPE="field" FQNAME="com.dfsek.terra.util.StructureTypeEnum NETHER_FORTRESS" />
|
||||
</entry_points>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
-124
@@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
Generated
-6
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,449 @@
|
||||
# Terra Community Code of Conduct
|
||||
|
||||
# TL;DR
|
||||
|
||||
Polyhedral Development is dedicated to providing a harassment-free experience
|
||||
for everyone, regardless of gender, gender identity and expression, preferred
|
||||
pronouns, sexual orientation, disability, physical appearance, age, race,
|
||||
religion, etc. We do not tolerate harassment of participants in any form.
|
||||
|
||||
This code of conduct applies to all Terra community spaces, including the github
|
||||
discussions tab, our [community discord server](https://discord.gg/PXUEbbF),
|
||||
the [community subreddit](https://reddit.com/r/TerraGenerator), or any other
|
||||
Terra space, both online and off. Anyone in violation of this code, as
|
||||
determined by the applicable moderators, may be subject to verbal warning,
|
||||
expulsion from these spaces, or future events and activities for an undetermined
|
||||
amount of time.
|
||||
|
||||
Some Terra community spaces may have additional rules in place, which will be
|
||||
made clearly available to all participants. Participants are responsible for
|
||||
knowing and abiding by these rules.
|
||||
|
||||
# Longer version
|
||||
|
||||
Polyhedral Development is dedicated to providing a harassment-free experience
|
||||
for everyone. We do not tolerate harassment of participants in any form.
|
||||
|
||||
## When and How to Use These Guidelines
|
||||
|
||||
This code of conduct applies to all Terra community spaces, both online and off.
|
||||
This applies to the github discussion tab, the
|
||||
[Polyhedral Development community discord server](https://discord.gg/PXUEbbF),
|
||||
and any other Terra community. In addition, we may choose to invoke them in
|
||||
instances of harassment outside the Terra communities, and we will punish the
|
||||
responsible individuals appropriately. We will not tolerate harassment in any
|
||||
form, even outside of Terra.
|
||||
|
||||
Some Terra spaces may have additional rules in place, which will be made clearly
|
||||
available to participants. Participants are responsible for knowing and abiding
|
||||
by these rules, in addition to this code of conduct.
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
The following behaviors are expected of all members of the Terra community:
|
||||
|
||||
### Be Respectful
|
||||
|
||||
Value each other's ideas, styles and viewpoints. We may not always agree, but
|
||||
disagreement is no excuse for poor manners. Be open to different possibilities
|
||||
and to being wrong. Be respectful in all interactions and communications,
|
||||
especially when debating the merits of different options. Be aware of your
|
||||
impact and how intense interactions may be affecting people. Be direct,
|
||||
constructive and positive. Take responsibility for your impact, and your
|
||||
mistakes – if someone says they have been harmed through your words or actions,
|
||||
listen carefully, apologize sincerely, and correct the behavior going forward.
|
||||
|
||||
#### Be Prepared to Admit When You are Wrong
|
||||
|
||||
Any member of the Terra community should always be open to new ideas and must
|
||||
always be open to the possibility of being wrong. Nobody can always be right,
|
||||
and we are only human; we are
|
||||
[fallible](https://www.merriam-webster.com/dictionary/fallible) by nature.
|
||||
It is okay to make mistakes, but we must be willing to admit when we make one.
|
||||
|
||||
### Be Direct but Professional
|
||||
|
||||
We are likely to have some discussions about if and when criticism is respectful
|
||||
and when it's not. We must be able to speak directly when we disagree and when
|
||||
we think we need to improve. We cannot withhold hard truths. Doing so
|
||||
respectfully is hard, doing so when others don't seem to be listening is harder,
|
||||
and hearing such comments when one is the recipient can be even harder still. We
|
||||
need to be honest and direct, as well as respectful.
|
||||
|
||||
### Be Inclusive
|
||||
|
||||
Seek diverse perspectives. Diversity of views and of people on teams powers
|
||||
innovation, even if it is not always comfortable. Encourage all voices. Help new
|
||||
perspectives be heard and listen actively. If you find yourself dominating a
|
||||
discussion, it is especially important to step back and encourage other voices
|
||||
to join in. Be aware of how much time is taken up by dominant members of the
|
||||
group. Provide alternative ways to contribute or participate when possible.
|
||||
|
||||
Be inclusive of everyone in an interaction, respecting and facilitating people's
|
||||
participation whether they are:
|
||||
|
||||
- Not native language speakers
|
||||
- Coming from a different culture
|
||||
- Using pronouns other than "he", "she", or "they"
|
||||
- Living in a different time zone
|
||||
- Facing other challenges to participate
|
||||
- Or anything else. Be respectful of *everyone* at *all times*.
|
||||
|
||||
Think about how you might facilitate alternative ways to contribute or
|
||||
participate. If you find yourself dominating a discussion, step back. Make way
|
||||
for other voices and listen actively to them.
|
||||
|
||||
### Understand Different Perspectives
|
||||
|
||||
Our goal should not be to "win" every disagreement or argument. A more
|
||||
productive goal is to be open to ideas that make our own ideas better. Strive to
|
||||
be an example for inclusive thinking. "Winning" is when different perspectives
|
||||
make our work richer and stronger. That means, you must pay attention to all
|
||||
ideas proposed. Don't disregard one without giving it the attention it deserves.
|
||||
|
||||
### Appreciate and Accommodate Our Similarities and Differences
|
||||
|
||||
People come from many cultures and backgrounds. Cultural differences can
|
||||
encompass everything from official religious observances to personal habits to
|
||||
clothing. Be respectful of anyone with different cultural practices, attitudes
|
||||
and beliefs. Work to eliminate your own biases, prejudices and discriminatory
|
||||
practices. Think of others' needs from their point of view. Use preferred
|
||||
titles (including pronouns<sup>[\[1\]](#1)</sup>) and the appropriate tone of
|
||||
voice. Respect people's right to privacy and confidentiality. Be open to
|
||||
learning from and educating others as well as educating yourself; it is
|
||||
unrealistic to expect someone to know the cultural practices of every ethnic and
|
||||
cultural group. Therefore we must be ready to correct someone if they make a
|
||||
mistake, and must be ready ourselves to change and learn if we make a mistake.
|
||||
|
||||
### Lead by Example
|
||||
|
||||
By matching your actions with your words, you become a person others want to
|
||||
follow. Your actions influence others to behave and respond in ways that are
|
||||
valuable and appropriate for our organizational outcomes. Design your community
|
||||
and your work for inclusion. Hold yourself and others accountable for inclusive
|
||||
behaviors.
|
||||
|
||||
## Behavior That Will Not Be Tolerated
|
||||
|
||||
The following behaviors are considered to be unacceptable and will not be
|
||||
tolerated:
|
||||
|
||||
### Violence and Threats of Violence
|
||||
|
||||
Violence and threats of violence are not acceptable - online or offline. This
|
||||
includes incitement of violence toward any individual, including encouraging a
|
||||
person to commit self-harm, engage in self-harm, or put themselves in a negative
|
||||
position (e.g. one which can lead to an increase of depression, etc.).
|
||||
|
||||
### Personal Attacks
|
||||
|
||||
Conflicts will inevitably arise, but frustration should never turn into a
|
||||
personal attack. It is not okay to insult, demean or belittle others. Attacking
|
||||
someone for their opinions, beliefs and ideas is not acceptable. It is important
|
||||
to speak directly when we disagree and when we think we need to improve, but
|
||||
such discussions must be conducted respectfully and professionally, remaining
|
||||
focused on the issue at hand.
|
||||
|
||||
### Derogatory Language
|
||||
|
||||
Offensive, unwelcome, or hurtful comments related to:
|
||||
|
||||
- Gender
|
||||
- Gender identity or expression
|
||||
- Preferred pronouns<sup>[\[1\]](#1)</sup>
|
||||
- Marital status
|
||||
- Sex
|
||||
- Sexual orientation or identity
|
||||
- Native language
|
||||
- Age
|
||||
- (Dis)ability
|
||||
- Mental illness
|
||||
- Neuro(a)typicality
|
||||
- Race and/or ethnicity
|
||||
- Physical appearance
|
||||
- A person's lifestyle choices or practices,
|
||||
- A person's physical condition
|
||||
- A person's mental condition
|
||||
- Socioeconomic status
|
||||
- Religion
|
||||
- Employment
|
||||
- Or anything really. Just don't be offensive towards people, insult them, or
|
||||
make unwanted comments.
|
||||
|
||||
is not acceptable. This includes deliberately referring to someone by a gender
|
||||
that they do not identify with, and/or questioning the legitimacy of an
|
||||
individual's gender identity. If you're unsure if a word is derogatory, don't
|
||||
use it. This also includes repeated subtle and/or indirect discrimination; when
|
||||
asked to stop, stop the behavior in question.
|
||||
|
||||
### Unwelcome Sexual Attention or Physical Contact
|
||||
|
||||
Unwelcome sexual attention or unwelcome physical contact is not acceptable. This
|
||||
includes sexualized comments, jokes or imagery in interactions, communications
|
||||
or presentation materials, as well as inappropriate touching, groping, or sexual
|
||||
advances. Additionally, touching a person without permission, including
|
||||
sensitive areas such as their hair, pregnant stomach, mobility device (
|
||||
wheelchair, scooter, etc) or tattoos is unacceptable. This includes physically
|
||||
blocking or intimidating another person. Physical contact or simulated physical
|
||||
contact (e.g. emojis like ":​kiss:", ":hug:", or ":kiss_mark:", textual
|
||||
descriptions like "\*hug\*", "\*backrub\*", or "\*kisses you\*", etc.) without
|
||||
affirmative consent or after a request to stop will not be accepted.
|
||||
|
||||
### Sexual Behaviour Where it is Not Appropriate
|
||||
|
||||
Uninvited or off-topic sexual images, text, or behaviour in spaces where they're
|
||||
not appropriate will not be accepted whatsoever. We are an open community, which
|
||||
means spaces must be appropriate for all ages, and everybody must feel
|
||||
comfortable. Discussion of sexual things, will be prohibited unless otherwise
|
||||
noted.
|
||||
|
||||
### Discussion of Sensitive Topics
|
||||
|
||||
Discussion of sensitive topics when asked to stop, or when not appropriate.
|
||||
Including, but not limited to:
|
||||
|
||||
- Anything sexual
|
||||
- Gore
|
||||
- Suicide
|
||||
- Self harm
|
||||
- Anything related to death
|
||||
- Or really anything that someone may be sensitive about.
|
||||
|
||||
shall not be tolerated. As a community for all ages and all kinds of people, we
|
||||
must cater to everyone, and must make sure everyone feels comfortable here.
|
||||
Repeatedly breaking someone else's boundaries will not be tolerated.
|
||||
|
||||
### Disruptive Behavior
|
||||
|
||||
Sustained disruption of events, forums, or meetings, online or otherwise,
|
||||
including talks and presentations, will not be tolerated. This includes:
|
||||
|
||||
- 'Talking over', 'heckling', or otherwise disrupting speakers.
|
||||
- Making derogatory comments about someone else's choices, pushing people to do
|
||||
something they do not wish to do, talking about their choices or personal
|
||||
preferences to others, or pressuring them to do something they don't wish to -
|
||||
physically or through jeering.
|
||||
- Behaviour that intentionally disrupts an event.
|
||||
- Otherwise influencing actions that may cause hostility in the session.
|
||||
|
||||
### Influencing Unacceptable Behavior
|
||||
|
||||
We will treat influencing or leading such activities the same way we treat the
|
||||
activities themselves, and thus the same consequences apply. To make someone do
|
||||
something bad is the same thing as if you were to do it yourself, and we will
|
||||
not tolerate it.
|
||||
|
||||
### Stalking or Following
|
||||
|
||||
Stalking or following in any form (offline or online) is unnacceptable. In
|
||||
addition, you may not take pictures or record video of others without their
|
||||
express permission or when asked to stop. Any individual may also request for
|
||||
you to delete all footage you have of them, even if you took it with their prior
|
||||
consent.
|
||||
|
||||
### Publication of Personal Information
|
||||
|
||||
The publication of personally identifying information (commonly known
|
||||
as "[doxxing](https://en.wikipedia.org/wiki/Doxing)") is directly prohibited.
|
||||
You may not publish information that someone wants to keep private, unless it is
|
||||
necessary to protect vulnerable people from intentional abuse. Addditionally,
|
||||
you may not deliberately "out" any aspect of a person's identity without their
|
||||
consent, this includes gender, pronouns, sexual identity, etc.
|
||||
|
||||
Unless it pretains to a case of harassment, as outlined here, in which case some
|
||||
personally identifying information may need to be brought up in private with the
|
||||
appropriate moderation team to help aid our efforts in keeping the community
|
||||
safe.
|
||||
|
||||
### Deliberate Misuse of Pronouns<sup>[\[1\]](#1)</sup> or Names
|
||||
|
||||
As an inclusive community, we must respect everyone. That means respecting the
|
||||
pronouns or names they wish for us to use. Deliberate misgendering, misuse of
|
||||
preferred pronouns<sup>[\[1\]](#1)</sup>, or use of 'dead' or rejected names is
|
||||
not to be tolerated. (If someone
|
||||
*accidentally* uses the incorrect pronouns, gender, or name, politely ask them
|
||||
to use the correct pronouns/gender/name. But if they are to continue using the
|
||||
incorrect pronouns, gender, or name, then you should escalate and report them to
|
||||
us.)
|
||||
|
||||
### Not Stopping After Multiple Requests
|
||||
|
||||
If someone asks you to stop doing something, then you should stop. Continuing to
|
||||
do it may be considered harassment, and can lead you to be removed from our
|
||||
community.
|
||||
|
||||
## Complains We May Ignore
|
||||
|
||||
Additionally, Terra prioritizes marginalized people's safety over privileged
|
||||
people's comfort. We reserve the right to ignore complaints regarding:
|
||||
|
||||
- Claims of discrimination against non-marginalized or oppressed groups (eg.
|
||||
being 'superphobic', meaning to not support people who are
|
||||
'superstraight', which is a dog whistle for transphobic groups, or being '
|
||||
cisphobic' without large amounts of evidence, etc.), or claims of
|
||||
discrimination with no evidence. (Basically, don't report 'cisphobia' to us,
|
||||
because it doesn't exist. But if someone is mocking you or making fun of you
|
||||
for being cis, and it is *really* getting out of hand, then do tell us.)
|
||||
- Reasonable communication of boundaries, such as "leave me alone," "go away,"
|
||||
or "I'm not discussing this with you." (If someone is asking you to stop, that
|
||||
is not reason for you to report them as harassing you.)
|
||||
- Communicating in a 'tone' you don't
|
||||
find [congenial](https://www.thefreedictionary.com/congenial). (You may not
|
||||
report someone for harassment for being 'annoyed with you' or 'talking sternly
|
||||
to you')
|
||||
- Criticizing or calling out racist, sexist, discriminatory, or otherwise
|
||||
oppressive behavior or assumptions. (You may not say that someone is harassing
|
||||
you if they are telling you to stop discriminating against someone.)
|
||||
- Disagreements that do not qualify as harassment. If you have a simple
|
||||
disagreement with someone, and they have not been discriminating to anyone, in
|
||||
any form, then we will not take action against them. Two people are allowed to
|
||||
disagree on things without it getting toxic.
|
||||
|
||||
We may also additionally choose to enact punishment for submitting a complaint
|
||||
in bad-faith or without adequate justification, if we deem necessary; if you're
|
||||
submitting a complaint just to troll or to annoy people, we may choose to have
|
||||
you banned or removed from the community spaces. Don't waste our time.
|
||||
|
||||
In order to protect volunteers from abuse and burnout, we reserve the right to
|
||||
reject any report we believe to have been made in bad faith or with misintent.
|
||||
Reports intended to silence legitimate criticism may be deleted without
|
||||
response.
|
||||
|
||||
## Reporting
|
||||
|
||||
Terra has a global moderation team which is currently comprised of the following
|
||||
members:
|
||||
|
||||
- solonovamax
|
||||
-
|
||||
discord: [@solonovamax#6983](https://discord.com/channels/@me/566146322273402881)*
|
||||
- github: [@solonovamax](https://github.com/solonovamax)
|
||||
-
|
||||
email: [solonovamax@12oclockpoint.com](mailto:solonovamax@12oclockpoint.com)
|
||||
- dfsek
|
||||
-
|
||||
discord: [@dfsek#4208](https://discord.com/channels/@me/378350362236682240)*
|
||||
- github: [@dfsek](https://github.com/dfsek)
|
||||
- email: [dfsek@protonmail.com](mailto:dfsek@protonmail.com)
|
||||
- duplex (duplexsystem)
|
||||
-
|
||||
discord: [@Duplex#0797](https://discord.com/channels/@me/356822848641171456)*
|
||||
- github: [@duplexsystem](https://github.com/duplexsystem)
|
||||
- email: [duplexsys@protonmail.com](mailto:duplexsys@protonmail.com)
|
||||
|
||||
\* The preferred method of communication is through discord. Although we will
|
||||
still be responsive on the other platforms, we will be more responsive on
|
||||
discord.
|
||||
|
||||
These are people you can contact for anything regarding this code of conduct.
|
||||
|
||||
If you are being harassed by a member of the Terra community, or by someone in a
|
||||
Terra community space, notice that someone else is being harassed, or have any
|
||||
other concerns, please contact a moderator of the platform it occurred on, or
|
||||
someone on the global moderation team. If the person who is harassing you is on
|
||||
the global moderation team, they
|
||||
will [recuse](https://www.thefreedictionary.com/recuse) themselves from handling
|
||||
your incident. (Meaning: if you are reporting someone on the team, they will not
|
||||
be involved in the discussion.) We will respond within a reasonable time frame,
|
||||
but generally within about 1 day.
|
||||
|
||||
This code of conduct applies to Terra community spaces, but if you are being
|
||||
harassed by a member of Terra *outside* our spaces, we still want to know about
|
||||
it as we may choose to take action within our community. We will take all
|
||||
good-faith reports seriously and will always attempt to handle them
|
||||
appropriately. This includes harassment outside our spaces and harassment that
|
||||
took place at any point in time. The moderation team reserves the right to
|
||||
exclude people from Terra communities based on their past behavior, including
|
||||
behavior outside Terra spaces and behavior towards people who are not in Terra.
|
||||
|
||||
Note: although we only have the ability to moderate official community spaces,
|
||||
if you are being harassed by someone in a non-official community space, and the
|
||||
moderation team of that platform refuses to do anything to help you (or even if
|
||||
they *do* help you), then you should notify us so that we may take appropriate
|
||||
action.
|
||||
|
||||
We will respect confidentiality requests for the purpose of protecting victims
|
||||
of abuse. At our discretion, we may publicly name a person which we have
|
||||
received harassment complaints about, or privately warn third parties about
|
||||
them, but only if we believe that doing so will increase the safety of Terra
|
||||
community members or the general public. We will not name harassment victims or
|
||||
reporters of harassment
|
||||
(assuming the report was made in good-faith) without their explicit consent; all
|
||||
reports will remain anonymous by default.
|
||||
|
||||
## Consequences of Unacceptable Behavior
|
||||
|
||||
Participants asked to stop any harassing behavior are expected to comply
|
||||
immediately. Whether or not you comply immediately, you may still face
|
||||
consequences for you actions, but if the harasser doesn't comply immediately
|
||||
then we may choose to take additional actions to protect the Terra community
|
||||
members or the individual being harassed.
|
||||
|
||||
Violation of this code can result in being asked to leave an event or online
|
||||
space, either temporarily or for the duration of the event, or being banned from
|
||||
participation in spaces, or future events and activities in perpetuity. If a
|
||||
participant engages in harassing behavior, the global moderation team may take
|
||||
any action they deem appropriate, up to and including expulsion from all Terra
|
||||
community spaces and identification of the participant as a harasser to other
|
||||
Terra community members or the general public. Bad behavior from any community
|
||||
member, including those with decision-making authority, will not be tolerated.
|
||||
|
||||
In addition, any participants who abuse the reporting process will be considered
|
||||
to be in violation of these guidelines and subject to consequences. False
|
||||
reporting, especially to retaliate or exclude, will not be accepted or
|
||||
tolerated.
|
||||
|
||||
## Questions
|
||||
|
||||
if you have further questions for anything not addressed here, you may open an
|
||||
issue on this github repo, or contact a member of the global moderation team.
|
||||
|
||||
## License and Attribution
|
||||
|
||||
This set of guidelines is distributed under a
|
||||
[Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/)
|
||||
.
|
||||
|
||||
These guidelines have been adapted from
|
||||
[Mozilla's Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/)
|
||||
, which were adapted from:
|
||||
|
||||
- Mozilla's original Community Participation Guidelines
|
||||
- The [Ubuntu Code of Conduct](https://ubuntu.com/community/code-of-conduct)
|
||||
-
|
||||
|
||||
Mozilla's [View Source Conference Code of Conduct](https://viewsourceconf.org/berlin-2016/code-of-conduct/)
|
||||
|
||||
- And
|
||||
the [Rust Language Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
|
||||
|
||||
which in turn were based
|
||||
on [Stumptown Syndicate's Citizen Code of Conduct](http://citizencodeofconduct.org/)
|
||||
, along with some adapted text from
|
||||
the [LGBTQ in Technology Code of Conduct](https://lgbtq.technology/coc.html) and
|
||||
the [WisCon code of conduct](http://wiscon.net/policies/anti-harassment/code-of-conduct/)
|
||||
.
|
||||
|
||||
It was then modified by solonovamax with various inclusions from
|
||||
the [LGBTQ in Technology Code of Conduct](https://lgbtq.technology/coc.html) and
|
||||
a few other sources.
|
||||
|
||||
## Notes
|
||||
|
||||
#### \[1\]
|
||||
|
||||
You provide a set of pronouns that everyone is comfortable addressing you with.
|
||||
Although some people are comfortable
|
||||
using [neopronouns](https://www.mypronouns.org/neopronouns), not everyone is.
|
||||
Therefore, if you use neopronouns, you should have at *least*
|
||||
one set of more common pronouns (One of he/him, she/her, or they/them; it
|
||||
doesn't matter which one. Anyone who doesn't respect your basic pronouns will be
|
||||
removed from the community.) that people may use, should they so choose, as some
|
||||
people are not comfortable
|
||||
using [neopronouns](https://www.mypronouns.org/neopronouns). But if someone
|
||||
refuses to use your more common pronouns, you should report them to us.
|
||||
Additionally, you may not ask people to use unreasonable pronouns, such as '
|
||||
acab/acabself', 'that/bitch', 'ur/mom', or
|
||||
'dream/dreamself' (pronouns related to real people, eg. the minecraft youtuber '
|
||||
dreamwastaken'). Doing so will be considered mockery of individuals who use
|
||||
non-standard pronouns and is very disrespectful.
|
||||
+400
@@ -0,0 +1,400 @@
|
||||
# Contributing to Terra
|
||||
|
||||
First off, thank you for considering contributing to Terra. It's people like you
|
||||
that make Terra such a great tool.
|
||||
|
||||
Following these guidelines helps to effectively use the time of the developers
|
||||
managing and developing this open source project, making it more enjoyable for
|
||||
all of us.
|
||||
|
||||
Terra is an open source project and we love to receive contributions from our
|
||||
community, you! There are many ways to contribute, from writing tutorials or
|
||||
blog posts, improving the documentation, submitting bug reports and feature
|
||||
requests or writing code which can be incorporated into Terra.
|
||||
|
||||
The following is a set of guidelines for contributing to Terra and its packages,
|
||||
which are hosted in
|
||||
the [PolyhedralDev Organization](https://github.com/PolyhedralDev) on GitHub.
|
||||
These are mostly guidelines, not rules. Use your best judgment, and feel free to
|
||||
propose changes to this document in a pull request.
|
||||
|
||||
#### Table Of Contents
|
||||
|
||||
[Code of Conduct](#code-of-conduct)
|
||||
|
||||
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
|
||||
|
||||
[Getting Started](#getting-started)
|
||||
|
||||
- [Your First Contribution](#your-first-contribution)
|
||||
- [Reporting Bugs](#reporting-bugs)
|
||||
- [Before Submitting A Bug Report](#before-submitting-a-bug-report)
|
||||
- [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a-good-bug-report)
|
||||
- [Suggesting Enhancements](#suggesting-enhancements)
|
||||
- [Before Submitting An Enhancement Suggestion](#before-submitting-an-enhancement-suggestion)
|
||||
- [How Do I Submit A (Good) Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
|
||||
- [Pull Requests](#pull-requests)
|
||||
- [Before Submitting A Pull Request](#before-submitting-a-pull-request)
|
||||
- [How Do I Submit A (Good) Pull Request?](#how-do-i-submit-a-good-pull-request)
|
||||
|
||||
[Styleguides](#styleguides)
|
||||
|
||||
- [Git Commits](#git-commits)
|
||||
- [Committing](#committing)
|
||||
- [Git Commit Messages](#git-commit-messages)
|
||||
- [Code Styleguide](#code-styleguide)
|
||||
- [Documentation Styleguide](#documentation-styleguide)
|
||||
- TODO
|
||||
|
||||
[Coding Pratices](#coding-practices)
|
||||
|
||||
- [Compatibility](#compatibility)
|
||||
- [General Compatibility](#general-compatibility)
|
||||
- [Specific Compatibility](#specific-compatibility)
|
||||
- [Platform-Agnostic Design](#platform-agnostic-design)
|
||||
- [Data-Driven](#data-driven)
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project and everyone participating in it is governed by
|
||||
the [Terra of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected
|
||||
to uphold this code. Please report unacceptable behavior
|
||||
to [Terra global moderation team](CODE_OF_CONDUCT.md#Reporting).
|
||||
|
||||
## I don't want to read this whole thing I just have a question!!!
|
||||
|
||||
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
|
||||
|
||||
We have an official discord server where you can request help from various users
|
||||
|
||||
- [The official PolyhedralDev discord server](https://discord.dfsek.com)
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Your First Contribution
|
||||
|
||||
Unsure where to begin contributing to Terra? You can start by looking through "
|
||||
beginner" and "help wanted" issues:
|
||||
|
||||
- [Beginner issues](https://github.com/PolyhedralDev/Terra/labels/Note%3A%20Good%20First%20Issue)
|
||||
- issues which should be friendly to anyone new to terra.
|
||||
- [Help wanted issues](https://github.com/PolyhedralDev/Terra/labels/Note%3A%20Help%20Wanted)
|
||||
- issues which should be a bit more involved than "beginner" issues.
|
||||
|
||||
New to github? Working on your first Pull Request? Check
|
||||
out [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
|
||||
to get you up on your feet.
|
||||
|
||||
At this point, you're ready to make your changes! Feel free to ask for help;
|
||||
everyone is a beginner at first!
|
||||
|
||||
If a maintainer asks you to "rebase" your PR, they're saying that a lot of code
|
||||
has changed, and that you need to update your branch so it's easier to merge.
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
This section guides you through submitting a bug report for Terra. Following
|
||||
these guidelines helps maintainers and the community understand your report, and
|
||||
spend their time fixing the issue instead of understanding what you mean.
|
||||
|
||||
Before creating bug reports, please
|
||||
check [this list](#before-submitting-a-bug-report) as you might find out that
|
||||
you don't need to create one. When you are creating a bug report,
|
||||
please [include as many details as possible](#how-do-i-submit-a-good-bug-report)
|
||||
.
|
||||
|
||||
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
|
||||
|
||||
#### Before Submitting A Bug Report
|
||||
|
||||
- Join the [discord server](https://discord.dfsek.com) to help resolve simple
|
||||
issues.
|
||||
- You must be on the LATEST version of Terra to receive any support. There is no
|
||||
support for older versions of Terra.
|
||||
- Make sure that this is not a *specific* compatibility issue with another
|
||||
terrain generation mod. Do not request *specific* compatibility with mods or
|
||||
plugins (e.g. "Compatibility with TechCraft v7"). That should be implemented
|
||||
in an addon, **not** in the main project.
|
||||
*General* compatibility (e.g. "Ability to pull Vanilla/Modded features from
|
||||
parent biomes") will be considered in the main project.
|
||||
- Search for
|
||||
any [already existing issues](https://github.com/PolyhedralDev/Terra/issues?q=is%3Aissue+)
|
||||
open with your problem. If you open a duplicate, it will be closed as such.
|
||||
- Make sure that it is actually Terra causing the issue, and not another
|
||||
mod/plugin. You can do this by testing to see if you can recreate the issue
|
||||
without Terra installed.
|
||||
- Double check that this is not an issue with a specific Terra *pack* or Terra *
|
||||
addon*, and instead applies to all of Terra.
|
||||
- Include a copy of the latest.log file. Putting *just* the exception is not
|
||||
enough. We need to be able to check that there wasn't anything else before
|
||||
that caused it.
|
||||
- Be sure to fill out all the required information and give descriptions of
|
||||
everything.
|
||||
|
||||
#### How Do I Submit A (Good) Bug Report?
|
||||
|
||||
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/)
|
||||
. [Create an issue](https://github.com/PolyhedralDev/Terra/issues/new) and
|
||||
provide the prerequisite information by filling in the Bug Report template.
|
||||
|
||||
Explain the problem and include additional details to help maintainers reproduce
|
||||
the problem:
|
||||
|
||||
- **Use a clear and descriptive title** for the issue to identify the problem.
|
||||
- **Describe the exact steps which reproduce the problem** in as many details as
|
||||
possible. When listing steps, **don't just say what you did, but explain how
|
||||
you did it**.
|
||||
- **Provide specific examples to demonstrate the steps**.
|
||||
- **Describe the behavior you observed after following the steps** and point out
|
||||
what exactly is the problem with that behavior.
|
||||
- **Explain which behavior you expected to see instead and why.**
|
||||
- **If the problem wasn't triggered by a specific action**, describe what you
|
||||
were doing before the problem happened and share more information using the
|
||||
guidelines below.
|
||||
|
||||
Include details about your configuration and environment:
|
||||
|
||||
- **Which version of Terra are you using?** You can get the exact version by
|
||||
running `/te version`.
|
||||
- **What's the name and version of the platform you're using**? (eg. Spigot,
|
||||
Fabric, Paper, etc.)
|
||||
- **Which external plugins or mods do you have installed?**
|
||||
- **Which Terra packs do you have installed?** You can get that list by
|
||||
running `/te packs`.
|
||||
- **Which Terra addons do you have installed?** You can get that list by
|
||||
running `/te addons`.
|
||||
|
||||
### Suggesting Enhancements
|
||||
|
||||
This section guides you through submitting an enhancement suggestion for Terra,
|
||||
including completely new features and minor improvements to existing
|
||||
functionality. Following these guidelines helps maintainers and the community
|
||||
understand your suggestion and find related suggestions.
|
||||
|
||||
Before creating enhancement suggestions, please
|
||||
check [this list](#before-submitting-an-enhancement-suggestion) as you might
|
||||
find out that you don't need to create one. When you are creating an enhancement
|
||||
suggestion,
|
||||
please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion)
|
||||
.
|
||||
|
||||
#### Before Submitting An Enhancement Suggestion
|
||||
|
||||
- You must be on the **LATEST** version of Terra to make sure your feature
|
||||
hasn't been added yet.
|
||||
- Search for
|
||||
any [already existing issues](https://github.com/PolyhedralDev/Terra/issues?q=is%3Aissue+) (
|
||||
Including closed!) with your problem. If you open a duplicate, it will be
|
||||
closed as such.
|
||||
- Verify that this is actually within the scope of Terra.
|
||||
- Be sure that this is not a feature request that should be made for a specific
|
||||
Terra *pack*, and instead applies to all of Terra.
|
||||
- Be sure that this is not something that should be implemented as a Terra
|
||||
addon, and instead applies to all of Terra.
|
||||
- Make sure that you attach a copy of the latest.log file, if there are any
|
||||
exceptions thrown in the console. Putting *just* the exception
|
||||
**is not enough**. We need to be able to check that there wasn't anything else
|
||||
before that caused it.
|
||||
|
||||
#### How Do I Submit A (Good) Enhancement Suggestion?
|
||||
|
||||
Enhancement suggestions are tracked
|
||||
as [GitHub issues](https://guides.github.com/features/issues/). Create an issue
|
||||
on our main repository and provide the following information:
|
||||
|
||||
- **Use a clear and descriptive title** for the issue to identify the
|
||||
suggestion.
|
||||
- **Provide a step-by-step description of the suggested enhancement** in as many
|
||||
details as possible.
|
||||
- **Provide specific examples to demonstrate the steps**.
|
||||
- **Describe the current behavior** and **explain which behavior you expected to
|
||||
see instead** and why.
|
||||
- **Explain why this enhancement would be useful** to most Terra users and isn't
|
||||
something that can or should be implemented as an addon.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
This section guides you through submitting a pull request for Terra.
|
||||
|
||||
While the prerequisites above must be satisfied prior to having your pull
|
||||
request reviewed, the reviewer(s) may ask you to complete additional design
|
||||
work, tests, or other changes before your pull request can be ultimately
|
||||
accepted.
|
||||
|
||||
#### Before Submitting A Pull Request
|
||||
|
||||
- You must be on the **LATEST** version of Terra to make sure your feature
|
||||
hasn't been added yet.
|
||||
- Search for
|
||||
any [already existing issues](https://github.com/PolyhedralDev/Terra/issues?q=is%3Aissue+) (
|
||||
Including closed!) with your problem. If you open a duplicate, it will be
|
||||
closed as such.
|
||||
- Verify that this is actually within the scope of Terra.
|
||||
- Be sure that this is not a feature request that should be made for a specific
|
||||
Terra *pack*, and instead applies to all of Terra.
|
||||
- Be sure that this is not something that should be implemented as a Terra
|
||||
addon, and instead applies to all of Terra.
|
||||
- Make sure that you attach a copy of the latest.log file, if there are any
|
||||
exceptions thrown in the console. Putting *just* the exception **is not
|
||||
enough**. We need to be able to check that there wasn't anything else before
|
||||
that caused it.
|
||||
|
||||
#### How Do I Submit A (Good) Pull Request?
|
||||
|
||||
Pull Requests are tracked
|
||||
as [GitHub Pull Requests](https://guides.github.com/activities/forking/#making-a-pull-request)
|
||||
. Create a pr on our main repository and provide the following information:
|
||||
|
||||
- **Use a clear and descriptive title** to identify the pull request.
|
||||
- **State what this pull request adds/fixes**.
|
||||
- **Be sure that you are the owner of the code you contributed** or that it can
|
||||
be licensed under the GPLv3.
|
||||
- **Provide a description goals and non-goals of the pull request** in as many
|
||||
details as possible.
|
||||
- **Describe the current behavior** and **explain which behavior you expected to
|
||||
see instead** and why.
|
||||
- **Explain why this enhancement would be useful** to most Terra users and isn't
|
||||
something that can or should be implemented as an addon.
|
||||
|
||||
## Styleguides
|
||||
|
||||
### Git Commits
|
||||
|
||||
Following this is not mandatory, but rather a set of guidelines. As long as your
|
||||
commit messages aren't absolutely awful, it's probably fine. But it would be
|
||||
nice if you followed them.
|
||||
|
||||
#### Committing
|
||||
|
||||
When you commit code, try to avoid committing large amounts of code in a single
|
||||
go. Splitting up code into smaller commits is much nicer and makes it easier to
|
||||
trace a feature to a single commit.
|
||||
|
||||
Try to stick to one feature/fix/etc. per commit. A good rule of thumb is if you
|
||||
need to use the word "and" in the subject line, then it should probably™ be two
|
||||
commits.
|
||||
|
||||
#### Git Commit Messages
|
||||
|
||||
- Subject line must fit the following format: `<type>: <short summary>`. Type
|
||||
must be one of the following:
|
||||
- Build: Changes that affect the build system or external dependencies.
|
||||
- Docs: Documentation only changes.
|
||||
- Feat: A new feature.
|
||||
- Fix: A bug fix.
|
||||
- Perf: Performance improvements.
|
||||
- Refactor: Refactoring sections of the codebase.
|
||||
- Repo: Changes to the repository structure that do not affect code. (Eg.
|
||||
modification of the `README.md` file, etc.)
|
||||
- Revert: Revert a previous commit.
|
||||
- Style: Code style updates.
|
||||
- Test: Anything related to testing.
|
||||
- Trans: Translation and localization of Terra to other languages.
|
||||
- WIP: Work in progress.
|
||||
- Separate the subject line from the body with a single blank line.
|
||||
- Do not end subject line with a period.
|
||||
- Limit the subject line to 50 or less.
|
||||
- The subject line and all body lines should be in sentence case.
|
||||
- Use the present tense. ("Add feature" not "Added feature")
|
||||
- Use the imperative mood. ("Move cursor to..." not "Moves cursor to...")
|
||||
- Reference relevant issues and pull requests in the body.
|
||||
|
||||
>
|
||||
> Here is a template you can follow:
|
||||
> ```
|
||||
> Capitalized, short (50 chars or less) summary
|
||||
>
|
||||
> More detailed explanatory text, if necessary. Wrap it to about 72
|
||||
> characters or so. In some contexts, the first line is treated as
|
||||
> the subject of the commit and the rest of the text as the body. The
|
||||
> blank line separating the summary from the body is critical (unless
|
||||
> you omit the body entirely); various tools like `log`, `shortlog` and
|
||||
> `rebase` can get confused if you run the two together.
|
||||
>
|
||||
> Explain the problem that this commit is solving. Focus on why you are
|
||||
> making this change as opposed to how (the code explains that). Are
|
||||
> there side effects or other unintuitive consequences of this
|
||||
> change? Here's the place to explain them.
|
||||
>
|
||||
>
|
||||
> Further paragraphs come after blank lines.
|
||||
> - Bullet points are okay, too
|
||||
> - Typically a hyphen or asterisk is used for the bullet, followed
|
||||
> by a single space, with blank lines in between, but conventions vary
|
||||
> here
|
||||
> - Use a hanging indent
|
||||
>
|
||||
> Reference any relevant issues at the bottom, like so:
|
||||
>
|
||||
> Resolves: #123
|
||||
> See also: #456, #789
|
||||
> ```
|
||||
|
||||
### Code Styleguide
|
||||
|
||||
Use an IDE with support for `.editorconfig` files. There is an included
|
||||
editorconfig file in the base of the project so that your IDE should
|
||||
automatically use the correct code style settings.
|
||||
|
||||
### Documentation Styleguide
|
||||
|
||||
TODO
|
||||
|
||||
## Coding Practices
|
||||
|
||||
### Compatibility
|
||||
|
||||
#### General Compatibility
|
||||
|
||||
General compatibility (example: injection of Vanilla structures/features/carvers
|
||||
into packs) is acceptable in the main project.
|
||||
|
||||
- General compatibility features should be *disabled by default*. Having things
|
||||
auto-injected causes unpredictable behaviour that is annoying to diagnose.
|
||||
General-compatibility options should have config values attached which are
|
||||
disabled by default.
|
||||
- These config options should also be *simple to use*. Think of the people who
|
||||
will be using these compatibility options. They want to flick a switch and
|
||||
have things be compatible. That means that a majority of compatibility options
|
||||
should stay in `pack.yml`, to make it simple to go into a pack and turn on
|
||||
specific compatibilities. This does *not* mean that more advanced
|
||||
compatibility options are off the table, for example, look at Feature
|
||||
compatibility, where features can either be automatically injected, *or*
|
||||
configured individually per Terra biome, depending on how much control the
|
||||
user wants.
|
||||
|
||||
#### Specific Compatibility
|
||||
|
||||
Specific compatibility should *not* be put in the main project. (Example: Adding
|
||||
the ability to generate TechCraft v7's doo-dads with a TerraScript function)
|
||||
|
||||
Having specific compatibilities leads to tons of extra dependencies to keep
|
||||
track of, as well as adding lots of additional stuff to maintain. It quickly
|
||||
becomes a mess. Especially when most users will never need to use this feature.
|
||||
|
||||
We have designed an addon API for exactly this purpose. **Specific
|
||||
compatibilities are welcome and encouraged, in the form of addons.**
|
||||
|
||||
### Platform-Agnostic Design
|
||||
|
||||
Terra must, at all times, remain platform agnostic. This means it must be able
|
||||
to run on theoretically any voxel based platform. Including non-minecraft games
|
||||
like Terasology.
|
||||
|
||||
When adding a new feature to `common`, make no assumptions about what platform
|
||||
it'll be running on.
|
||||
|
||||
Examples:
|
||||
|
||||
- Don't assume the world height is 256.
|
||||
- Don't assume that a specific block, item, or entity exists. (Eg. don't assume
|
||||
there exists a block called `minecraft:grass_block`)
|
||||
|
||||
### Data-Driven
|
||||
|
||||
When adding a new feature, make it abstract. Don't make assumptions about "
|
||||
specific use cases." If you can only think of a few use cases, your idea should
|
||||
probably be generalized.
|
||||
|
||||
You must use configs effectively. Make configs that are *powerful* but also *
|
||||
make sense* and are \[easy\] to use.
|
||||
@@ -1,25 +1,58 @@
|
||||
# Terra
|
||||
Terra is a data-driven world generator based on [Gaea](https://github.com/PolyhedralDev/Gaea). Find out more on our
|
||||
[Spigot page](https://www.spigotmc.org/resources/85151/)!
|
||||
|
||||
## Building and running Terra
|
||||
To build, simply run `./gradlew build` on Linux/MacOS, or `gradlew.bat build` on Windows.
|
||||
This will produce a jar in `build/libs` called `Terra-[CURRENT VERSION].jar`.
|
||||
You can put this right into your plugins dir, along with the correct Gaea version.
|
||||
Terra is an incredibly powerful free & open-source data-driven,
|
||||
platform-agnostic world generator. It allows you to create a world exactly to
|
||||
your specifications, with no knowledge of Java required.
|
||||
|
||||
## Downloads:
|
||||
|
||||
* Paper+ servers (Paper, Tuinity, Purpur,
|
||||
etc): [SpigotMC](https://www.spigotmc.org/resources/85151/)
|
||||
* Fabric: [Modrinth](https://modrinth.com/mod/terra)
|
||||
/ [CurseForge](https://www.curseforge.com/minecraft/mc-mods/terra-world-generator)
|
||||
|
||||
## Building and Running Terra
|
||||
|
||||
To build, simply run `./gradlew build` (`gradlew.bat build` on Windows). This
|
||||
will build all platforms, and produce JARs in `platforms/<platform>/build/libs`
|
||||
|
||||
### Production JARs:
|
||||
|
||||
* Bukkit: `Terra-<version>-shaded.jar`
|
||||
* Fabric: `Terra-<version>-shaded-mapped.jar`
|
||||
|
||||
### Building a Specific Platform
|
||||
|
||||
To build a specific platform, run `gradlew :platforms:<platform>:build`.
|
||||
|
||||
JARs are produced in `platforms/<platform>/build/libs`.
|
||||
|
||||
### Running Minecraft in the IDE
|
||||
|
||||
To run Minecraft with Terra in the IDE (for testing) use the following tasks:
|
||||
|
||||
* Bukkit
|
||||
* `installPaper` - Install a [Paper](https://github.com/PaperMC/Paper) test
|
||||
server. (Only needs to be run once).
|
||||
* `installPurpur` - Install a [Purpur](https://github.com/pl3xgaming/Purpur)
|
||||
test server. (Only needs to be run once).
|
||||
* `runPaper` - Run the Paper test server with Terra (`installPaper` must
|
||||
have been run previously).
|
||||
* `runPurpur` - Run the Purpur test server with Terra (`installPurpur` must
|
||||
have been run previously).
|
||||
* Fabric
|
||||
* `runClient` - Run a Minecraft Fabric client with Terra installed.
|
||||
* `runServer` - Run a Minecraft Fabric server with Terra installed.
|
||||
|
||||
If you would like to test it with a default server config, just run `./gradlew setupServer` or
|
||||
`./gradlew.bat setupServer` to set up the server, then `./gradlew testWithPaper` or `gradlew.bat testWithPaper` to run
|
||||
the server. If you want a clean installation of the server, re-run the `setupServer` task.
|
||||
This will download a default server config from [here](https://github.com/PolyhedralDev/WorldGenTestServer)
|
||||
and install the server in the `target/server` directory, along with all the needed plugins.
|
||||
|
||||
**Note: You will need to adjust the `NAME` variable `bukkit.yml` of the test server if you are not using the default
|
||||
Terra config.**
|
||||
|
||||
## Contributing
|
||||
Contributions are welcome! If you want to see a feature in Terra, please, open an issue, or implement it yourself and
|
||||
submit a PR!
|
||||
Join the discord [here](https://discord.gg/PXUEbbF) if you would like to talk more about the project!
|
||||
|
||||
Contributions are welcome! If you want to see a feature in Terra, please, open
|
||||
an issue, or implement it yourself and submit a PR!
|
||||
Join the discord [here](https://discord.gg/PXUEbbF) if you would like to talk
|
||||
more about the project!
|
||||
|
||||
## Beta
|
||||
Terra is still in beta! While it is stable, it is not feature-complete. There is a lot to be added!
|
||||
|
||||
Terra is still in beta! While it is stable, it is not feature-complete. There is
|
||||
a lot to be added!
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="CheckStyle-IDEA-Module">
|
||||
<option name="configuration">
|
||||
<map />
|
||||
</option>
|
||||
</component>
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
||||
+32
-222
@@ -1,208 +1,49 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.net.URL
|
||||
import java.nio.channels.Channels
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.nio.file.StandardCopyOption
|
||||
//import java.util.zip.ZipFile
|
||||
import java.util.zip.ZipInputStream
|
||||
import com.dfsek.terra.configureCompilation
|
||||
import com.dfsek.terra.configureDependencies
|
||||
import com.dfsek.terra.configureDistribution
|
||||
import com.dfsek.terra.configurePublishing
|
||||
import com.dfsek.terra.getGitHash
|
||||
|
||||
plugins {
|
||||
java
|
||||
maven
|
||||
id("com.github.johnrengelman.shadow").version("6.1.0")
|
||||
}
|
||||
val versionObj = Version("6", "0", "0", true)
|
||||
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs("lib")
|
||||
allprojects {
|
||||
version = versionObj
|
||||
group = "com.dfsek.terra"
|
||||
|
||||
configureDependencies()
|
||||
configureCompilation()
|
||||
configurePublishing()
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.isFork = true
|
||||
options.isIncremental = true
|
||||
}
|
||||
maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
|
||||
maven { url = uri("http://maven.enginehub.org/repo/") }
|
||||
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
||||
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
|
||||
// maven { url = uri("https://maven.pkg.github.com/solonovamax/Gaea") }
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
val versionObj = Version("1", "5", "0", true)
|
||||
|
||||
version = versionObj
|
||||
|
||||
dependencies {
|
||||
val gaeaVersion = "1.14.3"
|
||||
compileOnly(name = "Gaea-${gaeaVersion}", group = "")
|
||||
testImplementation(name = "Gaea-${gaeaVersion}", group = "")
|
||||
|
||||
compileOnly("org.jetbrains:annotations:20.1.0")
|
||||
|
||||
implementation("commons-io:commons-io:2.4")
|
||||
implementation("org.apache.commons:commons-imaging:1.0-alpha2")
|
||||
|
||||
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT")
|
||||
implementation("org.bstats:bstats-bukkit:1.7")
|
||||
|
||||
compileOnly("com.googlecode.json-simple:json-simple:1.1")
|
||||
|
||||
implementation(name = "parsii-1.2.1", group = "")
|
||||
|
||||
compileOnly("org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT")
|
||||
implementation("io.papermc:paperlib:1.0.5")
|
||||
|
||||
implementation("net.jafama:jafama:2.3.2")
|
||||
|
||||
|
||||
// JUnit.
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
||||
}
|
||||
|
||||
val compileJava: JavaCompile by tasks
|
||||
val mainSourceSet: SourceSet = sourceSets["main"]
|
||||
|
||||
val tokenizeJavaSources = task<Copy>(name = "tokenizeJavaSources") {
|
||||
from(mainSourceSet.allSource) {
|
||||
include("**/plugin.yml")
|
||||
println("version: $versionObj")
|
||||
val tokens = mapOf("VERSION" to versionObj.toString())
|
||||
|
||||
filter(org.apache.tools.ant.filters.ReplaceTokens::class, "tokens" to tokens)
|
||||
}
|
||||
into("build/tokenizedSources")
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
|
||||
|
||||
compileJava.apply {
|
||||
dependsOn(tokenizeJavaSources)
|
||||
|
||||
options.encoding = "UTF-8"
|
||||
doFirst {
|
||||
options.compilerArgs = mutableListOf("-Xlint:all")
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
|
||||
maxHeapSize = "2G"
|
||||
ignoreFailures = false
|
||||
failFast = true
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() - 1).takeIf { it > 0 } ?: 1
|
||||
|
||||
reports.html.required.set(false)
|
||||
reports.junitXml.required.set(false)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
|
||||
maxHeapSize = "4G"
|
||||
ignoreFailures = false
|
||||
failFast = true
|
||||
maxParallelForks = 12
|
||||
}
|
||||
|
||||
tasks.named<ShadowJar>("shadowJar") {
|
||||
from(tokenizeJavaSources.destinationDir)
|
||||
|
||||
archiveClassifier.set("shaded")
|
||||
archiveBaseName.set("Terra")
|
||||
setVersion(project.version)
|
||||
relocate("org.apache.commons", "com.dfsek.terra.lib.commons")
|
||||
relocate("org.bstats.bukkit", "com.dfsek.terra.lib.bstats")
|
||||
relocate("parsii", "com.dfsek.terra.lib.parsii")
|
||||
relocate("io.papermc.lib", "com.dfsek.terra.lib.paperlib")
|
||||
relocate("net.jafama", "com.dfsek.terra.lib.jafama")
|
||||
minimize {
|
||||
exclude(project(":"))
|
||||
afterEvaluate {
|
||||
project(":platforms").subprojects.forEach { // Platform projects are where distribution happens
|
||||
it.configureDistribution()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.build {
|
||||
dependsOn(tasks.shadowJar)
|
||||
// dependsOn(testWithPaper)
|
||||
// testWithPaper.mustRunAfter(tasks.shadowJar)
|
||||
}
|
||||
|
||||
val testDir = "target/server/"
|
||||
|
||||
val setupServer = tasks.create("setupServer") {
|
||||
dependsOn(tasks.shadowJar)
|
||||
doFirst {
|
||||
// clean
|
||||
file("${testDir}/").deleteRecursively()
|
||||
file("${testDir}/plugins").mkdirs()
|
||||
|
||||
// Downloading latest paper jar.
|
||||
val paperUrl = URL("https://papermc.io/api/v1/paper/1.16.4/latest/download")
|
||||
val paperReadableByteChannel = Channels.newChannel(paperUrl.openStream())
|
||||
val paperFile = file("${testDir}/paper.jar")
|
||||
val paperFileOutputStream = paperFile.outputStream()
|
||||
val paperFileChannel = paperFileOutputStream.channel
|
||||
paperFileChannel.transferFrom(paperReadableByteChannel, 0, Long.MAX_VALUE)
|
||||
|
||||
// Cloning test setup.
|
||||
gitClone("https://github.com/PolyhedralDev/WorldGenTestServer")
|
||||
// Copying plugins
|
||||
Files.move(Paths.get("WorldGenTestServer/plugins"),
|
||||
Paths.get("$testDir/plugins"),
|
||||
StandardCopyOption.REPLACE_EXISTING)
|
||||
// Copying config
|
||||
val serverText = URL("https://raw.githubusercontent.com/PolyhedralDev/WorldGenTestServer/master/server.properties").readText()
|
||||
file("${testDir}/server.properties").writeText(serverText)
|
||||
val bukkitText = URL("https://raw.githubusercontent.com/PolyhedralDev/WorldGenTestServer/master/bukkit.yml").readText()
|
||||
file("${testDir}/bukkit.yml").writeText(bukkitText.replace("\${world}", "world").replace("\${gen}", "Terra:DEFAULT"))
|
||||
|
||||
File("${testDir}/eula.txt").writeText("eula=true")
|
||||
|
||||
// clean up
|
||||
file("WorldGenTestServer").deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
val downloadDefaultPacks = tasks.create("downloadDefaultPacks") {
|
||||
doFirst {
|
||||
// Downloading latest paper jar.
|
||||
// if (file("${buildDir}/resources/main/packs/default").exists() && file("${buildDir}/resources/main/packs/nether").exists())
|
||||
// return@doFirst
|
||||
// else
|
||||
file("${buildDir}/resources/main/packs/").deleteRecursively()
|
||||
|
||||
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraDefaultConfig/releases/download/latest/default.zip")
|
||||
downloadAndUnzipPack(defaultPackUrl)
|
||||
val netherPackUrl = URL("https://github.com/PolyhedralDev/TerraDefaultConfig/releases/download/latest/nether.zip")
|
||||
downloadAndUnzipPack(netherPackUrl)
|
||||
}
|
||||
}
|
||||
tasks.processResources.get().dependsOn(downloadDefaultPacks)
|
||||
|
||||
val testWithPaper = task<JavaExec>(name = "testWithPaper") {
|
||||
standardInput = System.`in`
|
||||
dependsOn(tasks.shadowJar)
|
||||
// Copy Terra into dir
|
||||
doFirst {
|
||||
copy {
|
||||
from("${buildDir}/libs/Terra-${versionObj}.jar")
|
||||
into("${testDir}/plugins/")
|
||||
}
|
||||
}
|
||||
|
||||
main = "io.papermc.paperclip.Paperclip"
|
||||
jvmArgs = listOf("-XX:+UseG1GC", "-XX:+ParallelRefProcEnabled", "-XX:MaxGCPauseMillis=200",
|
||||
"-XX:+UnlockExperimentalVMOptions", "-XX:+DisableExplicitGC", "-XX:+AlwaysPreTouch",
|
||||
"-XX:G1NewSizePercent=30", "-XX:G1MaxNewSizePercent=40", "-XX:G1HeapRegionSize=8M",
|
||||
"-XX:G1ReservePercent=20", "-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4",
|
||||
"-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90",
|
||||
"-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem",
|
||||
"-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs",
|
||||
"-Daikars.new.flags=true", "-DIReallyKnowWhatIAmDoingISwear")
|
||||
maxHeapSize = "2G"
|
||||
args = listOf("nogui")
|
||||
workingDir = file("${testDir}/")
|
||||
classpath = files("${testDir}/paper.jar")
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Version class that does version stuff.
|
||||
*/
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
class Version(val major: String, val minor: String, val revision: String, val preRelease: Boolean = false) {
|
||||
|
||||
|
||||
override fun toString(): String {
|
||||
return if (!preRelease)
|
||||
"$major.$minor.$revision"
|
||||
@@ -210,34 +51,3 @@ class Version(val major: String, val minor: String, val revision: String, val pr
|
||||
"$major.$minor.$revision-BETA+${getGitHash()}"
|
||||
}
|
||||
}
|
||||
|
||||
fun getGitHash(): String {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
fun gitClone(name: String) {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine = mutableListOf("git", "clone", name)
|
||||
standardOutput = stdout
|
||||
}
|
||||
}
|
||||
|
||||
fun downloadAndUnzipPack(packUrl: URL) {
|
||||
ZipInputStream(packUrl.openStream()).use { zip ->
|
||||
while (true) {
|
||||
val entry = zip.nextEntry ?: break
|
||||
if (entry.isDirectory)
|
||||
file("${buildDir}/resources/main/packs/${entry.name}").mkdirs()
|
||||
else
|
||||
file("${buildDir}/resources/main/packs/${entry.name}").outputStream().use { output ->
|
||||
output.write(zip.readBytes())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
kotlin("jvm") version embeddedKotlinVersion
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"implementation"("com.github.jengelman.gradle.plugins:shadow:+")
|
||||
"implementation"("org.yaml:snakeyaml:1.27")
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import java.io.File
|
||||
import java.util.function.Predicate
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
import kotlin.streams.asStream
|
||||
|
||||
|
||||
/**
|
||||
* Configures a directory where addons will be put.
|
||||
*/
|
||||
fun Project.addonDir(dir: File, task: Task) {
|
||||
task.doFirst {
|
||||
dir.parentFile.mkdirs()
|
||||
matchingAddons(dir) {
|
||||
it.name.startsWith("Terra-") // Assume everything that starts with Terra- is a core addon.
|
||||
}.forEach {
|
||||
println("Deleting old addon: " + it.absolutePath)
|
||||
it.delete()
|
||||
}
|
||||
project(":common:addons").subprojects.forEach { addonProject ->
|
||||
val jar = (addonProject.tasks.named("jar").get() as Jar)
|
||||
|
||||
val target = File(dir, jar.archiveFileName.get())
|
||||
|
||||
val base = "${jar.archiveBaseName.get()}-${project.version}"
|
||||
|
||||
println("Copying addon ${jar.archiveFileName.get()} to ${target.absolutePath}. Base name: $base")
|
||||
|
||||
jar.archiveFile.orNull?.asFile?.copyTo(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun matchingAddons(dir: File, matcher: Predicate<File>): Set<File> {
|
||||
val matching = HashSet<File>()
|
||||
dir.walk().maxDepth(1).asStream().filter(matcher).forEach(matching::add)
|
||||
return matching
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import java.io.ByteArrayOutputStream
|
||||
import org.gradle.api.Project
|
||||
|
||||
fun Project.getGitHash(): String {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
fun Project.gitClone(name: String) {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine = mutableListOf("git", "clone", name)
|
||||
standardOutput = stdout
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
import org.gradle.api.tasks.javadoc.Javadoc
|
||||
import org.gradle.kotlin.dsl.apply
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.filter
|
||||
import org.gradle.kotlin.dsl.getByName
|
||||
import org.gradle.kotlin.dsl.register
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import org.gradle.language.jvm.tasks.ProcessResources
|
||||
|
||||
fun Project.configureCompilation() {
|
||||
apply(plugin = "maven-publish")
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "java-library")
|
||||
apply(plugin = "idea")
|
||||
|
||||
configure<JavaPluginExtension> {
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
doFirst {
|
||||
options.compilerArgs.add("-Xlint:all")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<ProcessResources> {
|
||||
include("**/*.*")
|
||||
filter<org.apache.tools.ant.filters.ReplaceTokens>(
|
||||
"tokens" to mapOf(
|
||||
"VERSION" to project.version.toString(),
|
||||
"DESCRIPTION" to project.properties["terra.description"],
|
||||
"WIKI" to project.properties["terra.wiki"],
|
||||
"SOURCE" to project.properties["terra.source"],
|
||||
"ISSUES" to project.properties["terra.issues"],
|
||||
"LICENSE" to project.properties["terra.license"]
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks.withType<Jar> {
|
||||
archiveBaseName.set("Terra-${archiveBaseName.get()}")
|
||||
from("../LICENSE", "../../LICENSE")
|
||||
}
|
||||
|
||||
tasks.register<Jar>("sourcesJar") {
|
||||
archiveClassifier.set("sources")
|
||||
}
|
||||
|
||||
tasks.register<Jar>("javadocJar") {
|
||||
dependsOn("javadoc")
|
||||
archiveClassifier.set("javadoc")
|
||||
from(tasks.getByName<Javadoc>("javadoc").destinationDir)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.apply
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.invoke
|
||||
import org.gradle.kotlin.dsl.project
|
||||
import org.gradle.kotlin.dsl.repositories
|
||||
|
||||
fun Project.configureDependencies() {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "java-library")
|
||||
|
||||
configurations {
|
||||
val shaded = create("shaded")
|
||||
val shadedApi = create("shadedApi")
|
||||
shaded.extendsFrom(shadedApi)
|
||||
getByName("api").extendsFrom(shadedApi)
|
||||
val shadedImplementation = create("shadedImplementation")
|
||||
shaded.extendsFrom(shadedImplementation)
|
||||
getByName("implementation").extendsFrom(shadedImplementation)
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url = uri("https://maven.enginehub.org/repo/") }
|
||||
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
||||
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
|
||||
maven { url = uri("https://maven.fabricmc.net/") }
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
||||
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
||||
|
||||
"compileOnly"("com.google.guava:guava:30.0-jre")
|
||||
"testImplementation"("com.google.guava:guava:30.0-jre")
|
||||
}
|
||||
|
||||
if (project(":common:addons").subprojects.contains(this)) { // If this is an addon project, depend on the API.
|
||||
dependencies {
|
||||
"compileOnly"(project(":common:api"))
|
||||
"testImplementation"(project(":common:api"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileOutputStream
|
||||
import java.io.FileWriter
|
||||
import java.net.URL
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipOutputStream
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.BasePluginExtension
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
import org.gradle.kotlin.dsl.apply
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.gradle.kotlin.dsl.named
|
||||
import org.yaml.snakeyaml.DumperOptions
|
||||
import org.yaml.snakeyaml.Yaml
|
||||
|
||||
fun Project.configureDistribution() {
|
||||
apply(plugin = "com.github.johnrengelman.shadow")
|
||||
|
||||
val downloadDefaultPacks = tasks.create("downloadDefaultPacks") {
|
||||
group = "terra"
|
||||
doFirst {
|
||||
file("${buildDir}/resources/main/packs/").deleteRecursively()
|
||||
|
||||
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraDefaultConfig/releases/download/latest/default.zip")
|
||||
downloadPack(defaultPackUrl, project)
|
||||
val netherPackUrl = URL("https://github.com/PolyhedralDev/TerraDefaultConfig/releases/download/latest/nether.zip")
|
||||
downloadPack(netherPackUrl, project)
|
||||
}
|
||||
}
|
||||
|
||||
val installAddons = tasks.create("installAddons") {
|
||||
group = "terra"
|
||||
project(":common:addons").subprojects.forEach {
|
||||
it.afterEvaluate {
|
||||
dependsOn(it.tasks.getByName("build")) // Depend on addon JARs
|
||||
}
|
||||
}
|
||||
|
||||
doFirst {
|
||||
// The addons are copied into a JAR because of a ShadowJar bug
|
||||
// which expands *all* JARs, even resource ones, into the fat JAR.
|
||||
// To get around this, we copy all addon JARs into a *new* JAR,
|
||||
// then, ShadowJar expands the newly created JAR, putting the original
|
||||
// JARs where they should go.
|
||||
//
|
||||
// https://github.com/johnrengelman/shadow/issues/111
|
||||
val dest = File(buildDir, "/resources/main/addons.jar")
|
||||
dest.parentFile.mkdirs()
|
||||
|
||||
val zip = ZipOutputStream(FileOutputStream(dest))
|
||||
|
||||
project(":common:addons").subprojects.forEach { addonProject ->
|
||||
val jar = (addonProject.tasks.named("jar").get() as Jar)
|
||||
println("Packaging addon ${jar.archiveFileName.get()} to ${dest.absolutePath}.")
|
||||
|
||||
val entry = ZipEntry("addons/${jar.archiveFileName.get()}")
|
||||
zip.putNextEntry(entry)
|
||||
FileInputStream(jar.archiveFile.get().asFile).copyTo(zip)
|
||||
zip.closeEntry()
|
||||
}
|
||||
zip.close()
|
||||
}
|
||||
}
|
||||
|
||||
val generateResourceManifest = tasks.create("generateResourceManifest") {
|
||||
group = "terra"
|
||||
dependsOn(downloadDefaultPacks)
|
||||
dependsOn(installAddons)
|
||||
doFirst {
|
||||
val resources = HashMap<String, MutableList<String>>()
|
||||
val packsDir = File("${project.buildDir}/resources/main/packs/")
|
||||
|
||||
packsDir.walkTopDown().forEach {
|
||||
if (it.isDirectory || !it.name.endsWith(".zip")) return@forEach
|
||||
resources.computeIfAbsent("packs") { ArrayList() }.add(it.name)
|
||||
}
|
||||
|
||||
val langDir = File("${project(":common:implementation").buildDir}/resources/main/lang/")
|
||||
|
||||
langDir.walkTopDown().forEach {
|
||||
if (it.isDirectory || !it.name.endsWith(".yml")) return@forEach
|
||||
resources.computeIfAbsent("lang") { ArrayList() }.add(it.name)
|
||||
}
|
||||
|
||||
project(":common:addons").subprojects.forEach { addonProject ->
|
||||
val jar = (addonProject.tasks.named("jar").get() as Jar).archiveFileName.get()
|
||||
resources.computeIfAbsent("addons") { ArrayList() }.add(jar)
|
||||
}
|
||||
|
||||
val options = DumperOptions()
|
||||
options.indent = 2
|
||||
options.indentWithIndicator = true
|
||||
options.indicatorIndent = 2
|
||||
options.isPrettyFlow = true
|
||||
options.defaultFlowStyle = DumperOptions.FlowStyle.BLOCK
|
||||
options.defaultScalarStyle = DumperOptions.ScalarStyle.DOUBLE_QUOTED
|
||||
|
||||
val yaml = Yaml(options)
|
||||
|
||||
val manifest = File("${project.buildDir}/resources/main/resources.yml")
|
||||
|
||||
if (manifest.exists()) manifest.delete()
|
||||
manifest.createNewFile()
|
||||
yaml.dump(resources, FileWriter(manifest))
|
||||
}
|
||||
}
|
||||
|
||||
tasks["processResources"].dependsOn(generateResourceManifest)
|
||||
|
||||
tasks.named<ShadowJar>("shadowJar") {
|
||||
// Tell shadow to download the packs
|
||||
dependsOn(downloadDefaultPacks)
|
||||
|
||||
configurations = listOf(project.configurations["shaded"])
|
||||
|
||||
archiveClassifier.set("shaded")
|
||||
setVersion(project.version)
|
||||
relocate("org.apache.commons", "com.dfsek.terra.lib.commons")
|
||||
relocate("org.objectweb.asm", "com.dfsek.terra.lib.asm")
|
||||
relocate("org.json", "com.dfsek.terra.lib.json")
|
||||
relocate("org.yaml", "com.dfsek.terra.lib.yaml")
|
||||
}
|
||||
|
||||
configure<BasePluginExtension> {
|
||||
archivesName.set(project.name)
|
||||
}
|
||||
|
||||
tasks.named<DefaultTask>("build") {
|
||||
dependsOn(tasks["shadowJar"])
|
||||
}
|
||||
}
|
||||
|
||||
fun downloadPack(packUrl: URL, project: Project) {
|
||||
val fileName = packUrl.file.substring(packUrl.file.lastIndexOf("/"))
|
||||
val file = File("${project.buildDir}/resources/main/packs/${fileName}")
|
||||
file.parentFile.mkdirs()
|
||||
file.outputStream().write(packUrl.readBytes())
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.create
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.gradle.kotlin.dsl.maven
|
||||
import org.gradle.kotlin.dsl.provideDelegate
|
||||
|
||||
fun Project.configurePublishing() {
|
||||
configure<PublishingExtension> {
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
artifact(tasks["sourcesJar"])
|
||||
artifact(tasks["jar"])
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
val mavenUrl = "https://repo.codemc.io/repository/maven-releases/"
|
||||
//val mavenSnapshotUrl = "https://repo.codemc.io/repository/maven-snapshots/"
|
||||
|
||||
maven(mavenUrl) {
|
||||
val mavenUsername: String? by project
|
||||
val mavenPassword: String? by project
|
||||
if (mavenUsername != null && mavenPassword != null) {
|
||||
credentials {
|
||||
username = mavenUsername
|
||||
password = mavenPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# Core Addons
|
||||
|
||||
This directory contains the modularized "core addons" that implement Terra's
|
||||
default behavior.
|
||||
@@ -0,0 +1,10 @@
|
||||
# api-features
|
||||
|
||||
Contains the API for feature generation.
|
||||
|
||||
This API implemented in:
|
||||
|
||||
* `config-feature`
|
||||
* `generation-stage-feature`
|
||||
* `config-locators`
|
||||
* `config-distributors`
|
||||
@@ -0,0 +1,2 @@
|
||||
dependencies {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# biome-provider-image
|
||||
|
||||
Implements and registers the `IMAGE` biome provider, a biome provider which
|
||||
generates biomes from an image, using the `color` attribute of biomes.
|
||||
|
||||
This addon registers the provider type, and all associated config options.
|
||||
@@ -0,0 +1,2 @@
|
||||
dependencies {
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.dfsek.terra.addons.biome.image;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class ImageBiomeProvider implements BiomeProvider {
|
||||
private final Map<Color, TerraBiome> colorBiomeMap = new HashMap<>();
|
||||
private final BufferedImage image;
|
||||
private final int resolution;
|
||||
private final Align align;
|
||||
|
||||
public ImageBiomeProvider(Set<TerraBiome> registry, BufferedImage image, int resolution, Align align) {
|
||||
this.image = image;
|
||||
this.resolution = resolution;
|
||||
this.align = align;
|
||||
registry.forEach(biome -> colorBiomeMap.put(new Color(biome.getColor()), biome));
|
||||
}
|
||||
|
||||
private static int distance(Color a, Color b) {
|
||||
return FastMath.abs(a.getRed() - b.getRed()) + FastMath.abs(a.getGreen() - b.getGreen()) + FastMath.abs(a.getBlue() - b.getBlue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBiome(int x, int z, long seed) {
|
||||
x /= resolution;
|
||||
z /= resolution;
|
||||
Color color = align.getColor(image, x, z);
|
||||
return colorBiomeMap.get(colorBiomeMap.keySet()
|
||||
.stream()
|
||||
.reduce(colorBiomeMap.keySet().stream().findAny().orElseThrow(IllegalStateException::new),
|
||||
(running, element) -> {
|
||||
int d1 = distance(color, running);
|
||||
int d2 = distance(color, element);
|
||||
return d1 < d2 ? running : element;
|
||||
}));
|
||||
}
|
||||
|
||||
public enum Align {
|
||||
CENTER {
|
||||
@Override
|
||||
public Color getColor(BufferedImage image, int x, int z) {
|
||||
return new Color(image.getRGB(FastMath.floorMod(x - image.getWidth() / 2, image.getWidth()),
|
||||
FastMath.floorMod(z - image.getHeight() / 2, image.getHeight())));
|
||||
}
|
||||
},
|
||||
NONE {
|
||||
@Override
|
||||
public Color getColor(BufferedImage image, int x, int z) {
|
||||
return new Color(image.getRGB(FastMath.floorMod(x, image.getWidth()), FastMath.floorMod(z, image.getHeight())));
|
||||
}
|
||||
};
|
||||
|
||||
public abstract Color getColor(BufferedImage image, int x, int z);
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.dfsek.terra.addons.biome.image;
|
||||
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.addon.TerraAddon;
|
||||
import com.dfsek.terra.api.addon.annotations.Addon;
|
||||
import com.dfsek.terra.api.addon.annotations.Author;
|
||||
import com.dfsek.terra.api.addon.annotations.Version;
|
||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
import com.dfsek.terra.api.registry.CheckedRegistry;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
@Addon("biome-provider-image")
|
||||
@Author("Terra")
|
||||
@Version("1.0.0")
|
||||
public class ImageBiomeProviderAddon extends TerraAddon {
|
||||
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
|
||||
};
|
||||
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry = event.getPack().getOrCreateRegistry(
|
||||
PROVIDER_REGISTRY_KEY);
|
||||
providerRegistry.register("IMAGE", () -> new ImageProviderTemplate(event.getPack().getRegistry(TerraBiome.class)));
|
||||
})
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.dfsek.terra.addons.biome.image;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Default;
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.dfsek.terra.api.registry.Registry;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class ImageProviderTemplate implements ObjectTemplate<BiomeProvider> {
|
||||
private final Registry<TerraBiome> biomes;
|
||||
@Value("resolution")
|
||||
@Default
|
||||
private final int resolution = 1;
|
||||
@Value("image.name")
|
||||
private BufferedImage image;
|
||||
@Value("image.align")
|
||||
private ImageBiomeProvider.Align align;
|
||||
|
||||
public ImageProviderTemplate(Registry<TerraBiome> set) {
|
||||
this.biomes = set;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeProvider get() {
|
||||
return new ImageBiomeProvider(new HashSet<>(biomes.entries()), image, resolution, align);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# biome-provider-pipeline
|
||||
|
||||
Implements the Biome Pipeline, a procedural biome provider that uses a series
|
||||
of "stages" to apply "mutations" to a 2D grid of biomes.
|
||||
|
||||
This addon registers the `PIPELINE` biome provider type, and all associated
|
||||
configurations.
|
||||
@@ -0,0 +1,2 @@
|
||||
dependencies {
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeExpander;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.api.vector.Vector2;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class BiomeHolderImpl implements BiomeHolder {
|
||||
private final Vector2 origin;
|
||||
private final int width;
|
||||
private final int offset;
|
||||
private TerraBiome[][] biomes;
|
||||
|
||||
public BiomeHolderImpl(int width, Vector2 origin) {
|
||||
width += 4;
|
||||
this.width = width;
|
||||
biomes = new TerraBiome[width][width];
|
||||
this.origin = origin;
|
||||
this.offset = 2;
|
||||
}
|
||||
|
||||
private BiomeHolderImpl(TerraBiome[][] biomes, Vector2 origin, int width, int offset) {
|
||||
this.biomes = biomes;
|
||||
this.origin = origin;
|
||||
this.width = width;
|
||||
this.offset = 2 * offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeHolder expand(BiomeExpander expander, long seed) {
|
||||
TerraBiome[][] old = biomes;
|
||||
int newWidth = width * 2 - 1;
|
||||
|
||||
biomes = new TerraBiome[newWidth][newWidth];
|
||||
|
||||
for(int x = 0; x < width; x++) {
|
||||
for(int z = 0; z < width; z++) {
|
||||
biomes[x * 2][z * 2] = old[x][z];
|
||||
if(z != width - 1)
|
||||
biomes[x * 2][z * 2 + 1] = expander.getBetween(x + origin.getX(), z + 1 + origin.getZ(), seed, old[x][z],
|
||||
old[x][z + 1]);
|
||||
if(x != width - 1)
|
||||
biomes[x * 2 + 1][z * 2] = expander.getBetween(x + 1 + origin.getX(), z + origin.getZ(), seed, old[x][z],
|
||||
old[x + 1][z]);
|
||||
if(x != width - 1 && z != width - 1)
|
||||
biomes[x * 2 + 1][z * 2 + 1] = expander.getBetween(x + 1 + origin.getX(), z + 1 + origin.getZ(), seed, old[x][z],
|
||||
old[x + 1][z + 1], old[x][z + 1], old[x + 1][z]);
|
||||
}
|
||||
}
|
||||
return new BiomeHolderImpl(biomes, origin.setX(origin.getX() * 2 - 1).setZ(origin.getZ() * 2 - 1), newWidth, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mutate(BiomeMutator mutator, long seed) {
|
||||
for(int x = 0; x < width; x++) {
|
||||
for(int z = 0; z < width; z++) {
|
||||
BiomeMutator.ViewPoint viewPoint = new BiomeMutator.ViewPoint(this, x, z);
|
||||
biomes[x][z] = mutator.mutate(viewPoint, x + origin.getX(), z + origin.getZ(), seed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fill(BiomeSource source, long seed) {
|
||||
for(int x = 0; x < width; x++) {
|
||||
for(int z = 0; z < width; z++) {
|
||||
biomes[x][z] = source.getBiome(origin.getX() + x, origin.getZ() + z, seed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBiome(int x, int z) {
|
||||
x += offset;
|
||||
z += offset;
|
||||
return getBiomeRaw(x, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBiomeRaw(int x, int z) {
|
||||
if(x >= width || z >= width || x < 0 || z < 0) return null;
|
||||
return biomes[x][z];
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.api.vector.Vector2;
|
||||
|
||||
|
||||
public class BiomePipeline {
|
||||
private final BiomeSource source;
|
||||
private final List<Stage> stages;
|
||||
private final int size;
|
||||
private final int init;
|
||||
|
||||
private BiomePipeline(BiomeSource source, List<Stage> stages, int size, int init) {
|
||||
this.source = source;
|
||||
this.stages = stages;
|
||||
this.size = size;
|
||||
this.init = init;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get biomes in a chunk
|
||||
*
|
||||
* @param x Chunk X coord
|
||||
* @param z Chunk Z coord
|
||||
*
|
||||
* @return BiomeHolder containing biomes.
|
||||
*/
|
||||
public BiomeHolder getBiomes(int x, int z, long seed) {
|
||||
BiomeHolder holder = new BiomeHolderImpl(init, new Vector2(x * (init - 1), z * (init - 1)));
|
||||
holder.fill(source, seed);
|
||||
for(Stage stage : stages) holder = stage.apply(holder, seed);
|
||||
return holder;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public static final class BiomePipelineBuilder {
|
||||
private final int init;
|
||||
List<Stage> stages = new ArrayList<>();
|
||||
private int expand;
|
||||
|
||||
public BiomePipelineBuilder(int init) {
|
||||
this.init = init;
|
||||
expand = init;
|
||||
}
|
||||
|
||||
public BiomePipeline build(BiomeSource source) {
|
||||
for(Stage stage : stages) {
|
||||
if(stage.isExpansion()) expand = expand * 2 - 1;
|
||||
}
|
||||
|
||||
return new BiomePipeline(source, stages, expand, init);
|
||||
}
|
||||
|
||||
public BiomePipelineBuilder addStage(Stage stage) {
|
||||
stages.add(stage);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline;
|
||||
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.BiomePipelineTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.NoiseSourceTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.expander.ExpanderStageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.BorderListMutatorTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.BorderMutatorTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.ReplaceListMutatorTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.ReplaceMutatorTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.SmoothMutatorTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.addon.TerraAddon;
|
||||
import com.dfsek.terra.api.addon.annotations.Addon;
|
||||
import com.dfsek.terra.api.addon.annotations.Author;
|
||||
import com.dfsek.terra.api.addon.annotations.Version;
|
||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
import com.dfsek.terra.api.registry.CheckedRegistry;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
@Addon("biome-provider-pipeline")
|
||||
@Author("Terra")
|
||||
@Version("1.0.0")
|
||||
public class BiomePipelineAddon extends TerraAddon {
|
||||
|
||||
public static final TypeKey<Supplier<ObjectTemplate<BiomeSource>>> SOURCE_REGISTRY_KEY = new TypeKey<>() {
|
||||
};
|
||||
|
||||
public static final TypeKey<Supplier<ObjectTemplate<Stage>>> STAGE_REGISTRY_KEY = new TypeKey<>() {
|
||||
};
|
||||
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
|
||||
};
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry = event.getPack().getOrCreateRegistry(
|
||||
PROVIDER_REGISTRY_KEY);
|
||||
providerRegistry.register("PIPELINE", () -> new BiomePipelineTemplate(main));
|
||||
})
|
||||
.then(event -> {
|
||||
CheckedRegistry<Supplier<ObjectTemplate<BiomeSource>>> sourceRegistry = event.getPack().getOrCreateRegistry(
|
||||
SOURCE_REGISTRY_KEY);
|
||||
sourceRegistry.register("NOISE", NoiseSourceTemplate::new);
|
||||
})
|
||||
.then(event -> {
|
||||
CheckedRegistry<Supplier<ObjectTemplate<Stage>>> stageRegistry = event.getPack().getOrCreateRegistry(STAGE_REGISTRY_KEY);
|
||||
stageRegistry.register("FRACTAL_EXPAND", ExpanderStageTemplate::new);
|
||||
stageRegistry.register("SMOOTH", SmoothMutatorTemplate::new);
|
||||
stageRegistry.register("REPLACE", ReplaceMutatorTemplate::new);
|
||||
stageRegistry.register("REPLACE_LIST", ReplaceListMutatorTemplate::new);
|
||||
stageRegistry.register("BORDER", BorderMutatorTemplate::new);
|
||||
stageRegistry.register("BORDER_LIST", BorderListMutatorTemplate::new);
|
||||
})
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import net.jafama.FastMath;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class BiomePipelineProvider implements BiomeProvider {
|
||||
private final LoadingCache<SeededVector, BiomeHolder> holderCache;
|
||||
private final BiomePipeline pipeline;
|
||||
private final int resolution;
|
||||
private final NoiseSampler mutator;
|
||||
private final double noiseAmp;
|
||||
|
||||
public BiomePipelineProvider(BiomePipeline pipeline, TerraPlugin main, int resolution, NoiseSampler mutator, double noiseAmp) {
|
||||
this.resolution = resolution;
|
||||
this.mutator = mutator;
|
||||
this.noiseAmp = noiseAmp;
|
||||
holderCache = CacheBuilder.newBuilder()
|
||||
.maximumSize(main == null ? 32 : main.getTerraConfig().getProviderCache())
|
||||
.build(
|
||||
new CacheLoader<SeededVector, BiomeHolder>() {
|
||||
@Override
|
||||
public BiomeHolder load(@NotNull SeededVector key) {
|
||||
return pipeline.getBiomes(key.x, key.z, key.seed);
|
||||
}
|
||||
}
|
||||
);
|
||||
this.pipeline = pipeline;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBiome(int x, int z, long seed) {
|
||||
x += mutator.getNoiseSeeded(seed + 1, x, z) * noiseAmp;
|
||||
z += mutator.getNoiseSeeded(seed + 2, x, z) * noiseAmp;
|
||||
|
||||
|
||||
x = FastMath.floorToInt(FastMath.floorDiv(x, resolution));
|
||||
|
||||
z = FastMath.floorToInt(FastMath.floorDiv(z, resolution));
|
||||
|
||||
int fdX = FastMath.floorDiv(x, pipeline.getSize());
|
||||
int fdZ = FastMath.floorDiv(z, pipeline.getSize());
|
||||
return holderCache.getUnchecked(new SeededVector(fdX, fdZ, seed)).getBiome(x - fdX * pipeline.getSize(),
|
||||
z - fdZ * pipeline.getSize());
|
||||
}
|
||||
|
||||
private static final class SeededVector {
|
||||
private final int x;
|
||||
private final int z;
|
||||
private final long seed;
|
||||
|
||||
private SeededVector(int x, int z, long seed) {
|
||||
this.x = x;
|
||||
this.z = z;
|
||||
this.seed = seed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 0;
|
||||
result = 31 * result + ((int) (seed ^ (seed >>> 32)));
|
||||
result = 31 * result + x;
|
||||
result = 31 * result + z;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof SeededVector)) return false;
|
||||
SeededVector that = (SeededVector) obj;
|
||||
|
||||
return this.seed == that.seed && this.x == that.x && this.z == that.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.api;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public interface BiomeExpander {
|
||||
TerraBiome getBetween(double x, double z, long seed, TerraBiome... others);
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.api;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public interface BiomeHolder {
|
||||
BiomeHolder expand(BiomeExpander expander, long seed);
|
||||
|
||||
void mutate(BiomeMutator mutator, long seed);
|
||||
|
||||
void fill(BiomeSource source, long seed);
|
||||
|
||||
TerraBiome getBiome(int x, int z);
|
||||
|
||||
TerraBiome getBiomeRaw(int x, int z);
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.api;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public interface BiomeMutator {
|
||||
TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed);
|
||||
|
||||
class ViewPoint {
|
||||
private final BiomeHolder biomes;
|
||||
private final int offX;
|
||||
private final int offZ;
|
||||
|
||||
public ViewPoint(BiomeHolder biomes, int offX, int offZ) {
|
||||
this.biomes = biomes;
|
||||
this.offX = offX;
|
||||
this.offZ = offZ;
|
||||
}
|
||||
|
||||
|
||||
public TerraBiome getBiome(int x, int z) {
|
||||
return biomes.getBiomeRaw(x + offX, z + offZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.api;
|
||||
|
||||
public interface Stage {
|
||||
BiomeHolder apply(BiomeHolder in, long seed);
|
||||
|
||||
boolean isExpansion();
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Default;
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.BiomePipeline;
|
||||
import com.dfsek.terra.addons.biome.pipeline.BiomePipelineProvider;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
@SuppressWarnings({ "FieldMayBeFinal", "unused" })
|
||||
public class BiomePipelineTemplate extends BiomeProviderTemplate {
|
||||
private final TerraPlugin main;
|
||||
@Value("pipeline.initial-size")
|
||||
@Default
|
||||
private @Meta int initialSize = 2;
|
||||
|
||||
@Value("pipeline.stages")
|
||||
private @Meta List<@Meta Stage> stages;
|
||||
|
||||
@Value("pipeline.source")
|
||||
private @Meta BiomeSource source;
|
||||
|
||||
public BiomePipelineTemplate(TerraPlugin main) {
|
||||
this.main = main;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeProvider get() {
|
||||
BiomePipeline.BiomePipelineBuilder biomePipelineBuilder = new BiomePipeline.BiomePipelineBuilder(initialSize);
|
||||
stages.forEach(biomePipelineBuilder::addStage);
|
||||
BiomePipeline pipeline = biomePipelineBuilder.build(source);
|
||||
return new BiomePipelineProvider(pipeline, main, resolution, blend, blendAmp);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.exception.LoadException;
|
||||
import com.dfsek.tectonic.loading.ConfigLoader;
|
||||
import com.dfsek.tectonic.loading.TypeLoader;
|
||||
|
||||
import java.lang.reflect.AnnotatedType;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.BiomePipelineProvider;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class BiomeProviderLoader implements TypeLoader<BiomeProvider> {
|
||||
@Override
|
||||
public BiomeProvider load(AnnotatedType t, Object c, ConfigLoader loader) throws LoadException {
|
||||
return loader.loadType(BiomePipelineProvider.class, c); // TODO: actually implement this lol
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Default;
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvider> {
|
||||
@Value("resolution")
|
||||
@Default
|
||||
protected @Meta int resolution = 1;
|
||||
@Value("blend.noise")
|
||||
@Default
|
||||
protected @Meta NoiseSampler blend = NoiseSampler.zero();
|
||||
@Value("blend.amplitude")
|
||||
@Default
|
||||
protected @Meta double blendAmp = 0d;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.NoiseSource;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class NoiseSourceTemplate extends SourceTemplate {
|
||||
@Value("noise")
|
||||
private @Meta NoiseSampler noise;
|
||||
|
||||
@Value("biomes")
|
||||
private @Meta ProbabilityCollection<@Meta TerraBiome> biomes;
|
||||
|
||||
@Override
|
||||
public BiomeSource get() {
|
||||
return new NoiseSource(biomes, noise);
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
|
||||
|
||||
|
||||
public abstract class SourceTemplate implements ObjectTemplate<BiomeSource> {
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
|
||||
|
||||
public abstract class StageTemplate implements ObjectTemplate<Stage> {
|
||||
@Value("noise")
|
||||
protected @Meta NoiseSampler noise;
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage.expander;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.expand.FractalExpander;
|
||||
import com.dfsek.terra.addons.biome.pipeline.stages.ExpanderStage;
|
||||
|
||||
|
||||
public class ExpanderStageTemplate extends StageTemplate {
|
||||
@Override
|
||||
public Stage get() {
|
||||
return new ExpanderStage(new FractalExpander(noise));
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.mutator.BorderListMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class BorderListMutatorTemplate extends StageTemplate {
|
||||
@Value("from")
|
||||
private @Meta String from;
|
||||
|
||||
@Value("default-replace")
|
||||
private @Meta String defaultReplace;
|
||||
|
||||
@Value("default-to")
|
||||
private @Meta ProbabilityCollection<@Meta TerraBiome> defaultTo;
|
||||
|
||||
@Value("replace")
|
||||
private @Meta Map<@Meta TerraBiome, @Meta ProbabilityCollection<@Meta TerraBiome>> replace;
|
||||
|
||||
|
||||
@Override
|
||||
public Stage get() {
|
||||
return new MutatorStage(new BorderListMutator(replace, from, defaultReplace, noise, defaultTo));
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.mutator.BorderMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class BorderMutatorTemplate extends StageTemplate {
|
||||
@Value("from")
|
||||
private @Meta String from;
|
||||
|
||||
@Value("replace")
|
||||
private @Meta String replace;
|
||||
|
||||
@Value("to")
|
||||
private @Meta ProbabilityCollection<@Meta TerraBiome> to;
|
||||
|
||||
@Override
|
||||
public Stage get() {
|
||||
return new MutatorStage(new BorderMutator(from, replace, noise, to));
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.mutator.ReplaceListMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ReplaceListMutatorTemplate extends StageTemplate {
|
||||
@Value("default-from")
|
||||
private @Meta String defaultFrom;
|
||||
|
||||
@Value("default-to")
|
||||
private @Meta ProbabilityCollection<@Meta TerraBiome> defaultTo;
|
||||
|
||||
@Value("to")
|
||||
private @Meta Map<@Meta TerraBiome, @Meta ProbabilityCollection<@Meta TerraBiome>> replace;
|
||||
|
||||
@Override
|
||||
public Stage get() {
|
||||
return new MutatorStage(new ReplaceListMutator(replace, defaultFrom, defaultTo, noise));
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.mutator.ReplaceMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ReplaceMutatorTemplate extends StageTemplate {
|
||||
@Value("from")
|
||||
private @Meta String from;
|
||||
|
||||
@Value("to")
|
||||
private @Meta ProbabilityCollection<@Meta TerraBiome> to;
|
||||
|
||||
@Override
|
||||
public Stage get() {
|
||||
return new MutatorStage(new ReplaceMutator(from, to, noise));
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
|
||||
import com.dfsek.terra.addons.biome.pipeline.mutator.SmoothMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
|
||||
|
||||
|
||||
public class SmoothMutatorTemplate extends StageTemplate {
|
||||
@Override
|
||||
public Stage get() {
|
||||
return new MutatorStage(new SmoothMutator(noise));
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.expand;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeExpander;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.MathUtil;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class FractalExpander implements BiomeExpander {
|
||||
private final NoiseSampler sampler;
|
||||
|
||||
public FractalExpander(NoiseSampler sampler) {
|
||||
this.sampler = sampler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBetween(double x, double z, long seed, TerraBiome... others) {
|
||||
return others[MathUtil.normalizeIndex(sampler.getNoiseSeeded(seed, x, z), others.length)];
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.mutator;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class BorderListMutator implements BiomeMutator {
|
||||
private final String border;
|
||||
private final NoiseSampler noiseSampler;
|
||||
private final ProbabilityCollection<TerraBiome> replaceDefault;
|
||||
private final String defaultReplace;
|
||||
private final Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace;
|
||||
|
||||
public BorderListMutator(Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace, String border, String defaultReplace,
|
||||
NoiseSampler noiseSampler, ProbabilityCollection<TerraBiome> replaceDefault) {
|
||||
this.border = border;
|
||||
this.noiseSampler = noiseSampler;
|
||||
this.replaceDefault = replaceDefault;
|
||||
this.defaultReplace = defaultReplace;
|
||||
this.replace = replace;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
|
||||
TerraBiome origin = viewPoint.getBiome(0, 0);
|
||||
if(origin.getTags().contains(defaultReplace)) {
|
||||
for(int xi = -1; xi <= 1; xi++) {
|
||||
for(int zi = -1; zi <= 1; zi++) {
|
||||
if(xi == 0 && zi == 0) continue;
|
||||
TerraBiome current = viewPoint.getBiome(xi, zi);
|
||||
if(current == null) continue;
|
||||
if(current.getTags().contains(border)) {
|
||||
if(replace.containsKey(origin)) {
|
||||
TerraBiome biome = replace.get(origin).get(noiseSampler, x, z, seed);
|
||||
return biome == null ? origin : biome;
|
||||
}
|
||||
TerraBiome biome = replaceDefault.get(noiseSampler, x, z, seed);
|
||||
return biome == null ? origin : biome;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return origin;
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.mutator;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class BorderMutator implements BiomeMutator {
|
||||
private final String border;
|
||||
private final NoiseSampler noiseSampler;
|
||||
private final ProbabilityCollection<TerraBiome> replace;
|
||||
private final String replaceTag;
|
||||
|
||||
public BorderMutator(String border, String replaceTag, NoiseSampler noiseSampler, ProbabilityCollection<TerraBiome> replace) {
|
||||
this.border = border;
|
||||
this.noiseSampler = noiseSampler;
|
||||
this.replace = replace;
|
||||
this.replaceTag = replaceTag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
|
||||
TerraBiome origin = viewPoint.getBiome(0, 0);
|
||||
if(origin.getTags().contains(replaceTag)) {
|
||||
for(int xi = -1; xi <= 1; xi++) {
|
||||
for(int zi = -1; zi <= 1; zi++) {
|
||||
if(xi == 0 && zi == 0) continue;
|
||||
TerraBiome current = viewPoint.getBiome(xi, zi);
|
||||
if(current == null) continue;
|
||||
if(current.getTags().contains(border)) {
|
||||
TerraBiome biome = replace.get(noiseSampler, x, z, seed);
|
||||
return biome == null ? origin : biome;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return origin;
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.mutator;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class ReplaceListMutator implements BiomeMutator {
|
||||
private final Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace;
|
||||
private final NoiseSampler sampler;
|
||||
private final ProbabilityCollection<TerraBiome> replaceDefault;
|
||||
private final String defaultTag;
|
||||
|
||||
public ReplaceListMutator(Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace, String defaultTag,
|
||||
ProbabilityCollection<TerraBiome> replaceDefault, NoiseSampler sampler) {
|
||||
this.replace = replace;
|
||||
this.sampler = sampler;
|
||||
this.defaultTag = defaultTag;
|
||||
this.replaceDefault = replaceDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
|
||||
TerraBiome center = viewPoint.getBiome(0, 0);
|
||||
if(replace.containsKey(center)) {
|
||||
TerraBiome biome = replace.get(center).get(sampler, x, z, seed);
|
||||
return biome == null ? viewPoint.getBiome(0, 0) : biome;
|
||||
}
|
||||
if(viewPoint.getBiome(0, 0).getTags().contains(defaultTag)) {
|
||||
TerraBiome biome = replaceDefault.get(sampler, x, z, seed);
|
||||
return biome == null ? viewPoint.getBiome(0, 0) : biome;
|
||||
}
|
||||
return center;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.mutator;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class ReplaceMutator implements BiomeMutator {
|
||||
private final String replaceableTag;
|
||||
private final ProbabilityCollection<TerraBiome> replace;
|
||||
private final NoiseSampler sampler;
|
||||
|
||||
public ReplaceMutator(String replaceable, ProbabilityCollection<TerraBiome> replace, NoiseSampler sampler) {
|
||||
this.replaceableTag = replaceable;
|
||||
this.replace = replace;
|
||||
this.sampler = sampler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
|
||||
if(viewPoint.getBiome(0, 0).getTags().contains(replaceableTag)) {
|
||||
TerraBiome biome = replace.get(sampler, x, z, seed);
|
||||
return biome == null ? viewPoint.getBiome(0, 0) : biome;
|
||||
}
|
||||
return viewPoint.getBiome(0, 0);
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.mutator;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.MathUtil;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class SmoothMutator implements BiomeMutator {
|
||||
|
||||
private final NoiseSampler sampler;
|
||||
|
||||
public SmoothMutator(NoiseSampler sampler) {
|
||||
this.sampler = sampler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
|
||||
TerraBiome top = viewPoint.getBiome(1, 0);
|
||||
TerraBiome bottom = viewPoint.getBiome(-1, 0);
|
||||
TerraBiome left = viewPoint.getBiome(0, 1);
|
||||
TerraBiome right = viewPoint.getBiome(0, -1);
|
||||
|
||||
|
||||
boolean vert = Objects.equals(top, bottom) && top != null;
|
||||
boolean horiz = Objects.equals(left, right) && left != null;
|
||||
|
||||
if(vert && horiz) {
|
||||
return MathUtil.normalizeIndex(sampler.getNoiseSeeded(seed, x, z), 2) == 0 ? left : top;
|
||||
}
|
||||
|
||||
if(vert) return top;
|
||||
if(horiz) return left;
|
||||
|
||||
return viewPoint.getBiome(0, 0);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.source;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public interface BiomeSource {
|
||||
TerraBiome getBiome(double x, double z, long seed);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.source;
|
||||
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class NoiseSource implements BiomeSource {
|
||||
private final ProbabilityCollection<TerraBiome> biomes;
|
||||
private final NoiseSampler sampler;
|
||||
|
||||
public NoiseSource(ProbabilityCollection<TerraBiome> biomes, NoiseSampler sampler) {
|
||||
this.biomes = biomes;
|
||||
this.sampler = sampler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBiome(double x, double z, long seed) {
|
||||
return biomes.get(sampler, x, z, seed);
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.stages;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeExpander;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
|
||||
|
||||
public class ExpanderStage implements Stage {
|
||||
private final BiomeExpander expander;
|
||||
|
||||
public ExpanderStage(BiomeExpander expander) {
|
||||
this.expander = expander;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeHolder apply(BiomeHolder in, long seed) {
|
||||
return in.expand(expander, seed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExpansion() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
FRACTAL
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.stages;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
|
||||
|
||||
public class MutatorStage implements Stage {
|
||||
private final BiomeMutator mutator;
|
||||
|
||||
public MutatorStage(BiomeMutator mutator) {
|
||||
this.mutator = mutator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeHolder apply(BiomeHolder in, long seed) {
|
||||
in.mutate(mutator, seed);
|
||||
return in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExpansion() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
REPLACE,
|
||||
REPLACE_LIST,
|
||||
BORDER,
|
||||
BORDER_LIST,
|
||||
SMOOTH
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# biome-provider-single
|
||||
|
||||
Registers and configures the `SINGLE` biome provider, a biome provider which
|
||||
accepts a single biome to generate continuously.
|
||||
@@ -0,0 +1,2 @@
|
||||
dependencies {
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.dfsek.terra.addons.biome.single;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class SingleBiomeProvider implements BiomeProvider {
|
||||
private final TerraBiome biome;
|
||||
|
||||
public SingleBiomeProvider(TerraBiome biome) {
|
||||
this.biome = biome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome getBiome(int x, int z, long seed) {
|
||||
return biome;
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.dfsek.terra.addons.biome.single;
|
||||
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.addon.TerraAddon;
|
||||
import com.dfsek.terra.api.addon.annotations.Addon;
|
||||
import com.dfsek.terra.api.addon.annotations.Author;
|
||||
import com.dfsek.terra.api.addon.annotations.Version;
|
||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
import com.dfsek.terra.api.registry.CheckedRegistry;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
@Addon("biome-provider-single")
|
||||
@Author("Terra")
|
||||
@Version("1.0.0")
|
||||
public class SingleBiomeProviderAddon extends TerraAddon {
|
||||
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
|
||||
};
|
||||
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry = event.getPack().getOrCreateRegistry(
|
||||
PROVIDER_REGISTRY_KEY);
|
||||
providerRegistry.register("SINGLE", SingleBiomeProviderTemplate::new);
|
||||
})
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.dfsek.terra.addons.biome.single;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class SingleBiomeProviderTemplate implements ObjectTemplate<BiomeProvider> {
|
||||
@Value("biome")
|
||||
private @Meta TerraBiome biome;
|
||||
|
||||
@Override
|
||||
public BiomeProvider get() {
|
||||
return new SingleBiomeProvider(biome);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# chunk-generator-noise-3d
|
||||
|
||||
Registers the `NOISE_3D` chunk generator, a chunk generator which uses biomes'
|
||||
samplers in 3D to generate chunk data.
|
||||
@@ -0,0 +1,2 @@
|
||||
dependencies {
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Default;
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteInfo;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
|
||||
|
||||
public class BiomePaletteTemplate implements ObjectTemplate<PaletteInfo> {
|
||||
@Value("slant")
|
||||
@Default
|
||||
private final @Meta SlantHolder slant;
|
||||
@Value("palette")
|
||||
private @Meta PaletteHolder palette;
|
||||
@Value("ocean.level")
|
||||
private @Meta int seaLevel;
|
||||
|
||||
@Value("ocean.palette")
|
||||
private @Meta Palette oceanPalette;
|
||||
|
||||
@Override
|
||||
public PaletteInfo get() {
|
||||
return new PaletteInfo(palette, slant, oceanPalette, seaLevel);
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.generators.NoiseChunkGenerator3D;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolderLoader;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolderLoader;
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.addon.TerraAddon;
|
||||
import com.dfsek.terra.api.addon.annotations.Addon;
|
||||
import com.dfsek.terra.api.addon.annotations.Author;
|
||||
import com.dfsek.terra.api.addon.annotations.Version;
|
||||
import com.dfsek.terra.api.event.events.config.ConfigurationLoadEvent;
|
||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.generator.ChunkGeneratorProvider;
|
||||
|
||||
|
||||
@Addon("chunk-generator-noise-3d")
|
||||
@Author("Terra")
|
||||
@Version("1.0.0")
|
||||
public class NoiseChunkGenerator3DAddon extends TerraAddon {
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
event.getPack().getOrCreateRegistry(ChunkGeneratorProvider.class).register("NOISE_3D",
|
||||
pack -> new NoiseChunkGenerator3D(pack, main));
|
||||
event.getPack()
|
||||
.applyLoader(SlantHolder.class, new SlantHolderLoader())
|
||||
.applyLoader(PaletteHolder.class, new PaletteHolderLoader());
|
||||
})
|
||||
.failThrough();
|
||||
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigurationLoadEvent.class)
|
||||
.then(event -> {
|
||||
if(event.is(TerraBiome.class)) {
|
||||
event.getLoadedObject(TerraBiome.class).getContext().put(event.load(new BiomePaletteTemplate()).get());
|
||||
}
|
||||
})
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteInfo;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
|
||||
import com.dfsek.terra.api.util.MathUtil;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
import com.dfsek.terra.api.world.generator.Sampler;
|
||||
|
||||
|
||||
public final class PaletteUtil {
|
||||
public static Palette getPalette(int x, int y, int z, GenerationSettings c, Sampler sampler, PaletteInfo paletteInfo) {
|
||||
SlantHolder slant = paletteInfo.getSlantHolder();
|
||||
if(slant != null) {
|
||||
double slope = MathUtil.derivative(sampler, x, y, z);
|
||||
if(slope > slant.getMinSlope()) {
|
||||
return slant.getPalette(slope).getPalette(y);
|
||||
}
|
||||
}
|
||||
|
||||
return paletteInfo.getPaletteHolder().getPalette(y);
|
||||
}
|
||||
}
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.generators;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.PaletteUtil;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.Sampler3D;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteInfo;
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
import com.dfsek.terra.api.block.state.properties.base.Properties;
|
||||
import com.dfsek.terra.api.block.state.properties.enums.Direction;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.profiler.ProfileFrame;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.BiomeGrid;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.generator.ChunkData;
|
||||
import com.dfsek.terra.api.world.generator.ChunkGenerator;
|
||||
import com.dfsek.terra.api.world.generator.GenerationStage;
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
import com.dfsek.terra.api.world.generator.Sampler;
|
||||
|
||||
|
||||
public class NoiseChunkGenerator3D implements ChunkGenerator {
|
||||
private final ConfigPack configPack;
|
||||
private final TerraPlugin main;
|
||||
private final List<GenerationStage> generationStages = new ArrayList<>();
|
||||
|
||||
private final BlockState air;
|
||||
|
||||
public NoiseChunkGenerator3D(ConfigPack c, TerraPlugin main) {
|
||||
this.configPack = c;
|
||||
this.main = main;
|
||||
this.air = main.getWorldHandle().air();
|
||||
c.getStages().forEach(stage -> generationStages.add(stage.newInstance(c)));
|
||||
}
|
||||
|
||||
@SuppressWarnings("try")
|
||||
static void biomes(@NotNull World world, int chunkX, int chunkZ, @NotNull BiomeGrid biome, TerraPlugin main) {
|
||||
try(ProfileFrame ignore = main.getProfiler().profile("biomes")) {
|
||||
int xOrig = (chunkX << 4);
|
||||
int zOrig = (chunkZ << 4);
|
||||
long seed = world.getSeed();
|
||||
BiomeProvider grid = world.getBiomeProvider();
|
||||
for(int x = 0; x < 4; x++) {
|
||||
for(int z = 0; z < 4; z++) {
|
||||
int cx = xOrig + (x << 2);
|
||||
int cz = zOrig + (z << 2);
|
||||
TerraBiome b = grid.getBiome(cx, cz, seed);
|
||||
|
||||
biome.setBiome(cx, cz, b.getVanillaBiomes().get(b.getGenerator().getBiomeNoise(), cx, 0, cz, world.getSeed()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("try")
|
||||
public ChunkData generateChunkData(@NotNull World world, Random random, int chunkX, int chunkZ, ChunkData chunk) {
|
||||
try(ProfileFrame ignore = main.getProfiler().profile("chunk_base_3d")) {
|
||||
BiomeProvider grid = world.getBiomeProvider();
|
||||
|
||||
int xOrig = (chunkX << 4);
|
||||
int zOrig = (chunkZ << 4);
|
||||
|
||||
Sampler sampler = world.getConfig().getSamplerCache().getChunk(chunkX, chunkZ);
|
||||
|
||||
long seed = world.getSeed();
|
||||
|
||||
for(int x = 0; x < 16; x++) {
|
||||
for(int z = 0; z < 16; z++) {
|
||||
int paletteLevel = 0;
|
||||
|
||||
int cx = xOrig + x;
|
||||
int cz = zOrig + z;
|
||||
|
||||
TerraBiome biome = grid.getBiome(cx, cz, seed);
|
||||
|
||||
PaletteInfo paletteInfo = biome.getContext().get(PaletteInfo.class);
|
||||
|
||||
if(paletteInfo == null) {
|
||||
main.logger().info("null palette: " + biome.getID());
|
||||
}
|
||||
|
||||
GenerationSettings generationSettings = biome.getGenerator();
|
||||
|
||||
int sea = paletteInfo.getSeaLevel();
|
||||
Palette seaPalette = paletteInfo.getOcean();
|
||||
|
||||
boolean justSet = false;
|
||||
BlockState data = null;
|
||||
for(int y = world.getMaxHeight() - 1; y >= world.getMinHeight(); y--) {
|
||||
if(sampler.sample(x, y, z) > 0) {
|
||||
justSet = true;
|
||||
|
||||
data = PaletteUtil.getPalette(x, y, z, generationSettings, sampler, paletteInfo).get(paletteLevel, cx, y, cz,
|
||||
seed);
|
||||
chunk.setBlock(x, y, z, data);
|
||||
|
||||
paletteLevel++;
|
||||
} else if(y <= sea) {
|
||||
chunk.setBlock(x, y, z, seaPalette.get(sea - y, x + xOrig, y, z + zOrig, seed));
|
||||
|
||||
justSet = false;
|
||||
paletteLevel = 0;
|
||||
} else {
|
||||
|
||||
justSet = false;
|
||||
paletteLevel = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return chunk;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateBiomes(@NotNull World world, @NotNull Random random, int chunkX, int chunkZ, @NotNull BiomeGrid biome) {
|
||||
biomes(world, chunkX, chunkZ, biome, main);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, World world, int elevationSmooth) {
|
||||
return new Sampler3D(chunkX, chunkZ, provider, world, elevationSmooth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigPack getConfigPack() {
|
||||
return configPack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraPlugin getMain() {
|
||||
return main;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GenerationStage> getGenerationStages() {
|
||||
return generationStages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getBlock(World world, int x, int y, int z) {
|
||||
BiomeProvider provider = world.getBiomeProvider();
|
||||
TerraBiome biome = provider.getBiome(x, z, world.getSeed());
|
||||
Sampler sampler = world.getConfig().getSamplerCache().get(x, z);
|
||||
|
||||
PaletteInfo paletteInfo = biome.getContext().get(PaletteInfo.class);
|
||||
Palette palette = PaletteUtil.getPalette(x, y, z, biome.getGenerator(), sampler, paletteInfo);
|
||||
int fdX = FastMath.floorMod(x, 16);
|
||||
int fdZ = FastMath.floorMod(z, 16);
|
||||
double noise = sampler.sample(fdX, y, fdZ);
|
||||
if(noise > 0) {
|
||||
int level = 0;
|
||||
for(int yi = world.getMaxHeight() - 1; yi > y; yi--) {
|
||||
if(sampler.sample(fdX, yi, fdZ) > 0) level++;
|
||||
else level = 0;
|
||||
}
|
||||
return palette.get(level, x, y, z, world.getSeed());
|
||||
} else if(y <= paletteInfo.getSeaLevel()) {
|
||||
return paletteInfo.getOcean().get(paletteInfo.getSeaLevel() - y, x, y, z, world.getSeed());
|
||||
} else return air;
|
||||
}
|
||||
|
||||
private boolean placeStair(BlockState orig, ChunkData chunk, Vector3 block, double thresh, Sampler sampler, BlockState stairNew) {
|
||||
|
||||
if(sampler.sample(block.getBlockX() - 0.55, block.getY(), block.getZ()) > thresh) {
|
||||
stairNew.set(Properties.DIRECTION, Direction.WEST);
|
||||
} else if(sampler.sample(block.getBlockX(), block.getY(), block.getZ() - 0.55) > thresh) {
|
||||
stairNew.set(Properties.DIRECTION, Direction.NORTH);
|
||||
} else if(sampler.sample(block.getBlockX(), block.getY(), block.getZ() + 0.55) > thresh) {
|
||||
stairNew.set(Properties.DIRECTION, Direction.SOUTH);
|
||||
} else if(sampler.sample(block.getX() + 0.55, block.getY(), block.getZ()) > thresh) {
|
||||
stairNew.set(Properties.DIRECTION, Direction.EAST);
|
||||
} else stairNew = null;
|
||||
if(stairNew != null) {
|
||||
stairNew.setIfPresent(Properties.WATERLOGGED, orig.getBlockType().isWater());
|
||||
chunk.setBlock(block.getBlockX(), block.getBlockY(), block.getBlockZ(), stairNew);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.dfsek.terra.api.util.mutable.MutableInteger;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.generator.ChunkInterpolator;
|
||||
|
||||
|
||||
/**
|
||||
* Class to abstract away the Interpolators needed to generate a chunk.<br>
|
||||
* Contains method to get interpolated noise at a coordinate within the chunk.
|
||||
*/
|
||||
public class ChunkInterpolator2D implements ChunkInterpolator {
|
||||
private final Interpolator[][] interpGrid = new Interpolator[4][4];
|
||||
private final BiFunction<GenerationSettings, Vector3, Double> noiseGetter;
|
||||
|
||||
/**
|
||||
* Instantiates a 3D ChunkInterpolator3D at a pair of chunk coordinates.
|
||||
*
|
||||
* @param chunkX X coordinate of the chunk.
|
||||
* @param chunkZ Z coordinate of the chunk.
|
||||
* @param provider Biome Provider to use for biome fetching.
|
||||
*/
|
||||
public ChunkInterpolator2D(World w, int chunkX, int chunkZ, BiomeProvider provider,
|
||||
BiFunction<GenerationSettings, Vector3, Double> noiseGetter) {
|
||||
this.noiseGetter = noiseGetter;
|
||||
int xOrigin = chunkX << 4;
|
||||
int zOrigin = chunkZ << 4;
|
||||
|
||||
long seed = w.getSeed();
|
||||
|
||||
double[][] noiseStorage = new double[5][5];
|
||||
|
||||
for(int x = 0; x < 5; x++) {
|
||||
for(int z = 0; z < 5; z++) {
|
||||
GenerationSettings generationSettings = provider.getBiome(xOrigin + (x << 2), zOrigin + (z << 2), seed).getGenerator();
|
||||
Map<GenerationSettings, MutableInteger> genMap = new HashMap<>();
|
||||
|
||||
int step = generationSettings.getBlendStep();
|
||||
int blend = generationSettings.getBlendDistance();
|
||||
|
||||
for(int xi = -blend; xi <= blend; xi++) {
|
||||
for(int zi = -blend; zi <= blend; zi++) {
|
||||
genMap.computeIfAbsent(
|
||||
provider.getBiome(xOrigin + (x << 2) + (xi * step), zOrigin + (z << 2) + (zi * step), seed).getGenerator(),
|
||||
g -> new MutableInteger(0)).increment(); // Increment by 1
|
||||
}
|
||||
}
|
||||
|
||||
noiseStorage[x][z] = computeNoise(genMap, (x << 2) + xOrigin, 0, (z << 2) + zOrigin);
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x < 4; x++) {
|
||||
for(int z = 0; z < 4; z++) {
|
||||
interpGrid[x][z] = new Interpolator(
|
||||
noiseStorage[x][z],
|
||||
noiseStorage[x + 1][z],
|
||||
noiseStorage[x][z + 1],
|
||||
noiseStorage[x + 1][z + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int reRange(int value, int high) {
|
||||
return FastMath.max(FastMath.min(value, high), 0);
|
||||
}
|
||||
|
||||
public double computeNoise(GenerationSettings generationSettings, double x, double y, double z) {
|
||||
return noiseGetter.apply(generationSettings, new Vector3(x, y, z));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the noise at a pair of internal chunk coordinates.
|
||||
*
|
||||
* @param x The internal X coordinate (0-15).
|
||||
* @param z The internal Z coordinate (0-15).
|
||||
*
|
||||
* @return double - The interpolated noise at the coordinates.
|
||||
*/
|
||||
@Override
|
||||
public double getNoise(double x, double y, double z) {
|
||||
return interpGrid[reRange(((int) x) / 4, 3)][reRange(((int) z) / 4, 3)].bilerp((x % 4) / 4, (z % 4) / 4);
|
||||
}
|
||||
|
||||
public double getNoise(int x, int y, int z) {
|
||||
return interpGrid[x / 4][z / 4].bilerp((double) (x % 4) / 4, (double) (z % 4) / 4);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.dfsek.terra.api.util.mutable.MutableInteger;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.generator.ChunkInterpolator;
|
||||
|
||||
|
||||
/**
|
||||
* Class to abstract away the Interpolators needed to generate a chunk.<br>
|
||||
* Contains method to get interpolated noise at a coordinate within the chunk.
|
||||
*/
|
||||
public class ChunkInterpolator3D implements ChunkInterpolator {
|
||||
private final Interpolator3[][][] interpGrid;
|
||||
private final BiFunction<GenerationSettings, Vector3, Double> noiseGetter;
|
||||
|
||||
private final int min;
|
||||
private final int max;
|
||||
|
||||
/**
|
||||
* Instantiates a 3D ChunkInterpolator3D at a pair of chunk coordinates.
|
||||
*
|
||||
* @param chunkX X coordinate of the chunk.
|
||||
* @param chunkZ Z coordinate of the chunk.
|
||||
* @param provider Biome Provider to use for biome fetching.
|
||||
*/
|
||||
public ChunkInterpolator3D(World w, int chunkX, int chunkZ, BiomeProvider provider,
|
||||
BiFunction<GenerationSettings, Vector3, Double> noiseGetter) {
|
||||
this.noiseGetter = noiseGetter;
|
||||
int xOrigin = chunkX << 4;
|
||||
int zOrigin = chunkZ << 4;
|
||||
|
||||
this.max = w.getMaxHeight();
|
||||
this.min = w.getMinHeight();
|
||||
int range = max - min + 1;
|
||||
|
||||
int size = range >> 2;
|
||||
|
||||
interpGrid = new Interpolator3[4][size][4];
|
||||
|
||||
double[][][] noiseStorage = new double[5][5][size + 1];
|
||||
|
||||
long seed = w.getSeed();
|
||||
|
||||
for(int x = 0; x < 5; x++) {
|
||||
for(int z = 0; z < 5; z++) {
|
||||
GenerationSettings generationSettings = provider.getBiome(xOrigin + (x << 2), zOrigin + (z << 2), seed).getGenerator();
|
||||
Map<GenerationSettings, MutableInteger> genMap = new HashMap<>();
|
||||
|
||||
int step = generationSettings.getBlendStep();
|
||||
int blend = generationSettings.getBlendDistance();
|
||||
|
||||
for(int xi = -blend; xi <= blend; xi++) {
|
||||
for(int zi = -blend; zi <= blend; zi++) {
|
||||
genMap.computeIfAbsent(
|
||||
provider.getBiome(xOrigin + (x << 2) + (xi * step), zOrigin + (z << 2) + (zi * step), seed).getGenerator(),
|
||||
g -> new MutableInteger(0)).increment(); // Increment by 1
|
||||
}
|
||||
}
|
||||
|
||||
for(int y = 0; y < size + 1; y++) {
|
||||
noiseStorage[x][z][y] = computeNoise(genMap, (x << 2) + xOrigin, (y << 2) + min, (z << 2) + zOrigin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x < 4; x++) {
|
||||
for(int z = 0; z < 4; z++) {
|
||||
for(int y = 0; y < size; y++) {
|
||||
interpGrid[x][y][z] = new Interpolator3(
|
||||
noiseStorage[x][z][y],
|
||||
noiseStorage[x + 1][z][y],
|
||||
noiseStorage[x][z][y + 1],
|
||||
noiseStorage[x + 1][z][y + 1],
|
||||
noiseStorage[x][z + 1][y],
|
||||
noiseStorage[x + 1][z + 1][y],
|
||||
noiseStorage[x][z + 1][y + 1],
|
||||
noiseStorage[x + 1][z + 1][y + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int reRange(int value, int high) {
|
||||
return FastMath.max(FastMath.min(value, high), 0);
|
||||
}
|
||||
|
||||
public double computeNoise(GenerationSettings generationSettings, double x, double y, double z) {
|
||||
return noiseGetter.apply(generationSettings, new Vector3(x, y, z));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the noise at a pair of internal chunk coordinates.
|
||||
*
|
||||
* @param x The internal X coordinate (0-15).
|
||||
* @param z The internal Z coordinate (0-15).
|
||||
*
|
||||
* @return double - The interpolated noise at the coordinates.
|
||||
*/
|
||||
@Override
|
||||
public double getNoise(double x, double y, double z) {
|
||||
return interpGrid[reRange(((int) x) / 4, 3)][(FastMath.max(FastMath.min(((int) y), max), min) - min) / 4][reRange(((int) z) / 4,
|
||||
3)].trilerp(
|
||||
(x % 4) / 4, (y % 4) / 4, (z % 4) / 4);
|
||||
}
|
||||
|
||||
public double getNoise(int x, int y, int z) {
|
||||
return interpGrid[x / 4][(y - min) / 4][z / 4].trilerp((double) (x % 4) / 4, (double) (y % 4) / 4, (double) (z % 4) / 4);
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
||||
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.biome.GenerationSettings;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public class ElevationInterpolator {
|
||||
private final double[][] values = new double[18][18];
|
||||
|
||||
public ElevationInterpolator(World world, int chunkX, int chunkZ, BiomeProvider provider, int smooth) {
|
||||
int xOrigin = chunkX << 4;
|
||||
int zOrigin = chunkZ << 4;
|
||||
|
||||
long seed = world.getSeed();
|
||||
|
||||
GenerationSettings[][] gens = new GenerationSettings[18 + 2 * smooth][18 + 2 * smooth];
|
||||
|
||||
// Precompute generators.
|
||||
for(int x = -1 - smooth; x <= 16 + smooth; x++) {
|
||||
for(int z = -1 - smooth; z <= 16 + smooth; z++) {
|
||||
gens[x + 1 + smooth][z + 1 + smooth] = provider.getBiome(xOrigin + x, zOrigin + z, seed).getGenerator();
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = -1; x <= 16; x++) {
|
||||
for(int z = -1; z <= 16; z++) {
|
||||
double noise = 0;
|
||||
double div = 0;
|
||||
for(int xi = -smooth; xi <= smooth; xi++) {
|
||||
for(int zi = -smooth; zi <= smooth; zi++) {
|
||||
GenerationSettings gen = gens[x + 1 + smooth + xi][z + 1 + smooth + zi];
|
||||
noise += gen.getElevationSampler().getNoiseSeeded(seed, xOrigin + x, zOrigin + z) * gen.getElevationWeight();
|
||||
div += gen.getElevationWeight();
|
||||
}
|
||||
}
|
||||
values[x + 1][z + 1] = noise / div;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double getElevation(int x, int z) {
|
||||
return values[x + 1][z + 1];
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
||||
|
||||
/**
|
||||
* Class for bilinear interpolation of values arranged on a unit square.
|
||||
*/
|
||||
public class Interpolator {
|
||||
private final double v0, v1, v2, v3;
|
||||
|
||||
/**
|
||||
* Constructs an interpolator with given values as vertices of a unit square.
|
||||
*
|
||||
* @param v0 - (0,0)
|
||||
* @param v1 - (1,0)
|
||||
* @param v2 - (0,1)
|
||||
* @param v3 - (1,1)
|
||||
*/
|
||||
public Interpolator(double v0, double v1, double v2, double v3) {
|
||||
this.v0 = v0;
|
||||
this.v1 = v1;
|
||||
this.v2 = v2;
|
||||
this.v3 = v3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1D Linear interpolation between 2 points 1 unit apart.
|
||||
*
|
||||
* @param t - Distance from v0. Total distance between v0 and v1 is 1 unit.
|
||||
* @param v0 - Value at v0.
|
||||
* @param v1 - Value at v1.
|
||||
*
|
||||
* @return double - The interpolated value.
|
||||
*/
|
||||
public static double lerp(double t, double v0, double v1) {
|
||||
return v0 + t * (v1 - v0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 2D Bilinear interpolation between 4 points on a unit square.
|
||||
*
|
||||
* @param s - X value
|
||||
* @param t - Z value
|
||||
*
|
||||
* @return double - The interpolated value.
|
||||
*/
|
||||
public double bilerp(double s, double t) {
|
||||
double v01 = lerp(s, v0, v1);
|
||||
double v23 = lerp(s, v2, v3);
|
||||
return lerp(t, v01, v23);
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
||||
|
||||
/**
|
||||
* Class for bilinear interpolation of values arranged on a unit square.
|
||||
*/
|
||||
public class Interpolator3 {
|
||||
private final Interpolator bottom;
|
||||
private final Interpolator top;
|
||||
|
||||
/**
|
||||
* Constructs an interpolator with given values as vertices of a unit cube.
|
||||
* * @param _000 The value at <code>(t, u, v) = (0, 0, 0)</code>.
|
||||
* * @param _100 The value at <code>(t, u, v) = (1, 0, 0)</code>.
|
||||
* * @param _010 The value at <code>(t, u, v) = (0, 1, 0)</code>.
|
||||
* * @param _110 The value at <code>(t, u, v) = (1, 1, 0)</code>.
|
||||
* * @param _001 The value at <code>(t, u, v) = (0, 0, 1)</code>.
|
||||
* * @param _101 The value at <code>(t, u, v) = (1, 0, 1)</code>.
|
||||
* * @param _011 The value at <code>(t, u, v) = (0, 1, 1)</code>.
|
||||
* * @param _111 The value at <code>(t, u, v) = (1, 1, 1)</code>.
|
||||
*/
|
||||
public Interpolator3(double _000, double _100,
|
||||
double _010, double _110,
|
||||
double _001, double _101,
|
||||
double _011, double _111) {
|
||||
this.top = new Interpolator(_000, _010, _001, _011);
|
||||
this.bottom = new Interpolator(_100, _110, _101, _111);
|
||||
}
|
||||
|
||||
public double trilerp(double x, double y, double z) {
|
||||
return Interpolator.lerp(x, top.bilerp(y, z), bottom.bilerp(y, z));
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.samplers;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation.ChunkInterpolator3D;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation.ElevationInterpolator;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.generator.Sampler;
|
||||
|
||||
|
||||
public class Sampler3D implements Sampler {
|
||||
private final ChunkInterpolator3D interpolator;
|
||||
private final ElevationInterpolator elevationInterpolator;
|
||||
|
||||
public Sampler3D(int x, int z, BiomeProvider provider, World world, int elevationSmooth) {
|
||||
this.interpolator = new ChunkInterpolator3D(world, x, z, provider, (generator, coord) -> generator.getBaseSampler()
|
||||
.getNoiseSeeded(coord,
|
||||
world.getSeed()));
|
||||
this.elevationInterpolator = new ElevationInterpolator(world, x, z, provider, elevationSmooth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double sample(double x, double y, double z) {
|
||||
return interpolator.getNoise(x, y, z) + elevationInterpolator.getElevation(FastMath.roundToInt(x), FastMath.roundToInt(z));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double sample(int x, int y, int z) {
|
||||
return interpolator.getNoise(x, y, z) + elevationInterpolator.getElevation(FastMath.roundToInt(x), FastMath.roundToInt(z));
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.palette;
|
||||
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
|
||||
|
||||
public class PaletteHolder {
|
||||
private final Palette[] palettes;
|
||||
private final int offset;
|
||||
|
||||
protected PaletteHolder(Palette[] palettes, int offset) {
|
||||
this.palettes = palettes;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Palette getPalette(int y) {
|
||||
int index = y + offset;
|
||||
return index >= 0
|
||||
? index < palettes.length
|
||||
? palettes[index]
|
||||
: palettes[palettes.length - 1]
|
||||
: palettes[0];
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.palette;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
|
||||
|
||||
public class PaletteHolderBuilder {
|
||||
private final TreeMap<Integer, Palette> paletteMap = new TreeMap<>();
|
||||
|
||||
public PaletteHolderBuilder add(int y, Palette palette) {
|
||||
paletteMap.put(y, palette);
|
||||
return this;
|
||||
}
|
||||
|
||||
public PaletteHolder build() {
|
||||
|
||||
int min = FastMath.min(paletteMap.keySet().stream().min(Integer::compareTo).orElse(0), 0);
|
||||
int max = FastMath.max(paletteMap.keySet().stream().max(Integer::compareTo).orElse(255), 255);
|
||||
|
||||
Palette[] palettes = new Palette[paletteMap.lastKey() + 1 - min];
|
||||
for(int y = min; y <= FastMath.max(paletteMap.lastKey(), max); y++) {
|
||||
Palette d = null;
|
||||
for(Map.Entry<Integer, Palette> e : paletteMap.entrySet()) {
|
||||
if(e.getKey() >= y) {
|
||||
d = e.getValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(d == null) throw new IllegalArgumentException("No palette for Y=" + y);
|
||||
palettes[y - min] = d;
|
||||
}
|
||||
return new PaletteHolder(palettes, -min);
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.palette;
|
||||
|
||||
import com.dfsek.tectonic.exception.LoadException;
|
||||
import com.dfsek.tectonic.loading.ConfigLoader;
|
||||
import com.dfsek.tectonic.loading.TypeLoader;
|
||||
|
||||
import java.lang.reflect.AnnotatedType;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
|
||||
|
||||
public class PaletteHolderLoader implements TypeLoader<PaletteHolder> {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public PaletteHolder load(AnnotatedType type, Object o, ConfigLoader configLoader) throws LoadException {
|
||||
List<Map<String, Integer>> palette = (List<Map<String, Integer>>) o;
|
||||
PaletteHolderBuilder builder = new PaletteHolderBuilder();
|
||||
for(Map<String, Integer> layer : palette) {
|
||||
for(Map.Entry<String, Integer> entry : layer.entrySet()) {
|
||||
builder.add(entry.getValue(), configLoader.loadType(Palette.class, entry.getKey()));
|
||||
}
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.palette;
|
||||
|
||||
import com.dfsek.terra.api.properties.Properties;
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
|
||||
|
||||
public class PaletteInfo implements Properties {
|
||||
private final PaletteHolder paletteHolder;
|
||||
private final SlantHolder slantHolder;
|
||||
private final Palette ocean;
|
||||
|
||||
private final int seaLevel;
|
||||
|
||||
public PaletteInfo(PaletteHolder paletteHolder, SlantHolder slantHolder, Palette ocean, int seaLevel) {
|
||||
this.paletteHolder = paletteHolder;
|
||||
this.slantHolder = slantHolder;
|
||||
this.ocean = ocean;
|
||||
this.seaLevel = seaLevel;
|
||||
}
|
||||
|
||||
public Palette getOcean() {
|
||||
return ocean;
|
||||
}
|
||||
|
||||
public PaletteHolder getPaletteHolder() {
|
||||
return paletteHolder;
|
||||
}
|
||||
|
||||
public SlantHolder getSlantHolder() {
|
||||
return slantHolder;
|
||||
}
|
||||
|
||||
public int getSeaLevel() {
|
||||
return seaLevel;
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.palette;
|
||||
|
||||
|
||||
import java.util.TreeMap;
|
||||
|
||||
|
||||
public class SlantHolder {
|
||||
private final TreeMap<Double, PaletteHolder> layers;
|
||||
private final double minSlope;
|
||||
|
||||
public SlantHolder(TreeMap<Double, PaletteHolder> layers, double minSlope) {
|
||||
this.layers = layers;
|
||||
this.minSlope = minSlope;
|
||||
}
|
||||
|
||||
public PaletteHolder getPalette(double slope) {
|
||||
return layers.floorEntry(slope).getValue();
|
||||
}
|
||||
|
||||
public double getMinSlope() {
|
||||
return minSlope;
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.palette;
|
||||
|
||||
import com.dfsek.tectonic.exception.LoadException;
|
||||
import com.dfsek.tectonic.loading.ConfigLoader;
|
||||
import com.dfsek.tectonic.loading.TypeLoader;
|
||||
|
||||
import java.lang.reflect.AnnotatedType;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class SlantHolderLoader implements TypeLoader<SlantHolder> {
|
||||
@Override
|
||||
public SlantHolder load(AnnotatedType type, Object o, ConfigLoader configLoader) throws LoadException {
|
||||
List<Map<Object, Object>> layers = (List<Map<Object, Object>>) o;
|
||||
TreeMap<Double, PaletteHolder> slantLayers = new TreeMap<>();
|
||||
double minThreshold = Double.MAX_VALUE;
|
||||
|
||||
for(Map<Object, Object> layer : layers) {
|
||||
double threshold = ((Number) layer.get("threshold")).doubleValue();
|
||||
if(threshold < minThreshold) minThreshold = threshold;
|
||||
slantLayers.put(threshold, configLoader.loadType(PaletteHolder.class, layer.get("palette")));
|
||||
}
|
||||
|
||||
return new SlantHolder(slantLayers, minThreshold);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# config-biome
|
||||
|
||||
Registers the default configuration for Terra Biomes, `BIOME`.
|
||||
@@ -0,0 +1,2 @@
|
||||
dependencies {
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
import com.dfsek.terra.addons.biome.holder.PaletteHolder;
|
||||
import com.dfsek.terra.addons.biome.holder.PaletteHolderLoader;
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.addon.TerraAddon;
|
||||
import com.dfsek.terra.api.addon.annotations.Addon;
|
||||
import com.dfsek.terra.api.addon.annotations.Author;
|
||||
import com.dfsek.terra.api.addon.annotations.Version;
|
||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
|
||||
|
||||
@Addon("config-biome")
|
||||
@Author("Terra")
|
||||
@Version("1.0.0")
|
||||
public class BiomeAddon extends TerraAddon {
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
event.getPack().registerConfigType(new BiomeConfigType(event.getPack()), "BIOME", 5);
|
||||
event.getPack().applyLoader(PaletteHolder.class, new PaletteHolderLoader());
|
||||
})
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
import com.dfsek.tectonic.exception.LoadException;
|
||||
import com.dfsek.tectonic.loading.TypeLoader;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.config.ConfigFactory;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.config.ConfigType;
|
||||
import com.dfsek.terra.api.registry.OpenRegistry;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class BiomeConfigType implements ConfigType<BiomeTemplate, TerraBiome> {
|
||||
public static final TypeKey<TerraBiome> BIOME_TYPE_TOKEN = new TypeKey<>() {
|
||||
};
|
||||
private final BiomeFactory factory;
|
||||
|
||||
public BiomeConfigType(ConfigPack pack) {
|
||||
this.factory = new BiomeFactory(pack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier<OpenRegistry<TerraBiome>> registrySupplier(ConfigPack pack) {
|
||||
return () -> pack.getRegistryFactory().create(registry -> (TypeLoader<TerraBiome>) (t, c, loader) -> {
|
||||
if(c.equals("SELF")) return null;
|
||||
TerraBiome obj = registry.get((String) c);
|
||||
if(obj == null)
|
||||
throw new LoadException("No such " + t.getType().getTypeName() + " matching \"" + c + "\" was found in this registry.");
|
||||
return obj;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeTemplate getTemplate(ConfigPack pack, TerraPlugin main) {
|
||||
return new BiomeTemplate(pack, main);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigFactory<BiomeTemplate, TerraBiome> getFactory() {
|
||||
return factory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeKey<TerraBiome> getTypeKey() {
|
||||
return BIOME_TYPE_TOKEN;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.config.ConfigFactory;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.world.biome.TerraBiome;
|
||||
|
||||
|
||||
public class BiomeFactory implements ConfigFactory<BiomeTemplate, TerraBiome> {
|
||||
private final ConfigPack pack;
|
||||
|
||||
public BiomeFactory(ConfigPack pack) {
|
||||
this.pack = pack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerraBiome build(BiomeTemplate template, TerraPlugin main) {
|
||||
UserDefinedGenerationSettings generator = new UserDefinedGenerationSettings(template.getNoiseEquation(),
|
||||
template.getElevationEquation(),
|
||||
template.getCarvingEquation(), template.getBiomeNoise(),
|
||||
template.getElevationWeight(),
|
||||
template.getBlendDistance(), template.getBlendStep(),
|
||||
template.getBlendWeight());
|
||||
return new UserDefinedBiome(template.getVanilla(), generator, template);
|
||||
}
|
||||
}
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
import com.dfsek.tectonic.annotations.Default;
|
||||
import com.dfsek.tectonic.annotations.Final;
|
||||
import com.dfsek.tectonic.annotations.Value;
|
||||
import com.dfsek.tectonic.config.ValidatedConfigTemplate;
|
||||
import com.dfsek.tectonic.exception.ValidationException;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.block.BlockType;
|
||||
import com.dfsek.terra.api.config.AbstractableTemplate;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
import com.dfsek.terra.api.world.biome.Biome;
|
||||
import com.dfsek.terra.api.world.generator.Palette;
|
||||
|
||||
|
||||
@SuppressWarnings({ "FieldMayBeFinal", "unused" })
|
||||
public class BiomeTemplate implements AbstractableTemplate, ValidatedConfigTemplate {
|
||||
private final ConfigPack pack;
|
||||
|
||||
@Value("id")
|
||||
@Final
|
||||
private @Meta String id;
|
||||
|
||||
@Value("extends")
|
||||
@Final
|
||||
@Default
|
||||
private List<String> extended = Collections.emptyList();
|
||||
|
||||
@Value("variables")
|
||||
@Default
|
||||
private @Meta Map<String, @Meta Double> variables = new HashMap<>();
|
||||
|
||||
@Value("beta.carving.equation")
|
||||
@Default
|
||||
private @Meta NoiseSampler carvingEquation = NoiseSampler.zero();
|
||||
|
||||
@Value("vanilla")
|
||||
private @Meta ProbabilityCollection<Biome> vanilla;
|
||||
|
||||
@Value("biome-noise")
|
||||
@Default
|
||||
private @Meta NoiseSampler biomeNoise = NoiseSampler.zero();
|
||||
|
||||
@Value("blend.distance")
|
||||
@Default
|
||||
private @Meta int blendDistance = 3;
|
||||
|
||||
@Value("blend.weight")
|
||||
@Default
|
||||
private @Meta double blendWeight = 1;
|
||||
|
||||
@Value("blend.step")
|
||||
@Default
|
||||
private @Meta int blendStep = 4;
|
||||
|
||||
@Value("noise")
|
||||
private @Meta NoiseSampler noiseEquation;
|
||||
|
||||
@Value("ocean.level")
|
||||
@Default
|
||||
private @Meta int seaLevel = 62;
|
||||
|
||||
@Value("elevation.equation")
|
||||
@Default
|
||||
private @Meta NoiseSampler elevationEquation = NoiseSampler.zero();
|
||||
|
||||
@Value("elevation.weight")
|
||||
@Default
|
||||
private @Meta double elevationWeight = 1;
|
||||
|
||||
@Value("slabs.enable")
|
||||
@Default
|
||||
private @Meta boolean doSlabs = false;
|
||||
|
||||
@Value("slabs.threshold")
|
||||
@Default
|
||||
private @Meta double slabThreshold = 0.0075D;
|
||||
|
||||
@Value("slabs.palettes")
|
||||
@Default
|
||||
private @Meta Map<@Meta BlockType, @Meta Palette> slabPalettes;
|
||||
|
||||
@Value("slabs.stair-palettes")
|
||||
@Default
|
||||
private @Meta Map<@Meta BlockType, @Meta Palette> stairPalettes;
|
||||
|
||||
@Value("interpolate-elevation")
|
||||
@Default
|
||||
private @Meta boolean interpolateElevation = true;
|
||||
|
||||
@Value("color")
|
||||
@Final
|
||||
@Default
|
||||
private @Meta int color = 0;
|
||||
|
||||
@Value("tags")
|
||||
@Default
|
||||
private @Meta Set<@Meta String> tags = new HashSet<>();
|
||||
|
||||
@Value("colors")
|
||||
@Default
|
||||
private @Meta Map<String, @Meta Integer> colors = new HashMap<>();
|
||||
// Plain ol' map, so platforms can decide what to do with colors (if anything).
|
||||
|
||||
public BiomeTemplate(ConfigPack pack, TerraPlugin main) {
|
||||
this.pack = pack;
|
||||
}
|
||||
|
||||
public boolean interpolateElevation() {
|
||||
return interpolateElevation;
|
||||
}
|
||||
|
||||
public boolean doSlabs() {
|
||||
return doSlabs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validate() throws ValidationException {
|
||||
color |= 0xff000000; // Alpha adjustment
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<String> getExtended() {
|
||||
return extended;
|
||||
}
|
||||
|
||||
public Set<String> getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public Map<String, Integer> getColors() {
|
||||
return colors;
|
||||
}
|
||||
|
||||
public double getBlendWeight() {
|
||||
return blendWeight;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public int getBlendDistance() {
|
||||
return blendDistance;
|
||||
}
|
||||
|
||||
public double getSlabThreshold() {
|
||||
return slabThreshold;
|
||||
}
|
||||
|
||||
public Map<BlockType, Palette> getSlabPalettes() {
|
||||
return slabPalettes;
|
||||
}
|
||||
|
||||
public Map<BlockType, Palette> getStairPalettes() {
|
||||
return stairPalettes;
|
||||
}
|
||||
|
||||
public NoiseSampler getBiomeNoise() {
|
||||
return biomeNoise;
|
||||
}
|
||||
|
||||
public NoiseSampler getElevationEquation() {
|
||||
return elevationEquation;
|
||||
}
|
||||
|
||||
public NoiseSampler getCarvingEquation() {
|
||||
return carvingEquation;
|
||||
}
|
||||
|
||||
public ConfigPack getPack() {
|
||||
return pack;
|
||||
}
|
||||
|
||||
public int getSeaLevel() {
|
||||
return seaLevel;
|
||||
}
|
||||
|
||||
public String getID() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ProbabilityCollection<Biome> getVanilla() {
|
||||
return vanilla;
|
||||
}
|
||||
|
||||
public NoiseSampler getNoiseEquation() {
|
||||
return noiseEquation;
|
||||
}
|
||||
|
||||
public double getElevationWeight() {
|
||||
return elevationWeight;
|
||||
}
|
||||
|
||||
public int getBlendStep() {
|
||||
return blendStep;
|
||||
}
|
||||
|
||||
public Map<String, Double> getVariables() {
|
||||
return variables;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
|
||||
import com.dfsek.paralithic.functions.dynamic.DynamicFunction;
|
||||
|
||||
|
||||
public class BlankFunction implements DynamicFunction {
|
||||
private final int args;
|
||||
|
||||
public BlankFunction(int args) {
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double eval(double... d) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArgNumber() {
|
||||
return args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStateless() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user