Compare commits
562 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2f98bdf63 | |||
| fd0a4c55ac | |||
| b0aa211464 | |||
| 14e7918ea0 | |||
| 524ea77ce5 | |||
| 9f763bcd6a | |||
| 166875283c | |||
| abb264bdf0 | |||
| 70aa5724a9 | |||
| 520d37f410 | |||
| 29c2756e75 | |||
| 6c278ea3b1 | |||
| b18460b825 | |||
| d0b50d9633 | |||
| c051b3584f | |||
| d4cad8f718 | |||
| f7bf05b62f | |||
| 840b0a7fe2 | |||
| 5369bf628a | |||
| 79d2269218 | |||
| f21c791269 | |||
| 11e58eecda | |||
| fbf13833a0 | |||
| 2528f4a725 | |||
| 6d6cbd8a44 | |||
| 2fe3c261b0 | |||
| 5086f40d03 | |||
| 7766c49cbd | |||
| c6d86cfa3b | |||
| 935cfec3d4 | |||
| ce2e64dc7e | |||
| 15774ffe2a | |||
| 218cb04696 | |||
| 45fc36543b | |||
| 554bb89690 | |||
| 2aa048b0cb | |||
| 570619b114 | |||
| fb3e47ec3f | |||
| 0f27dd79d7 | |||
| abe0e284aa | |||
| 7a97b9dcbf | |||
| 23c98e2253 | |||
| 06cce40ac6 | |||
| 7cd1a37914 | |||
| 8ca2052748 | |||
| ce4259d98f | |||
| d96ba5ae54 | |||
| 576d0f5666 | |||
| 877588ebed | |||
| 3bee25053f | |||
| a75d3ec5b0 | |||
| d5222ed20f | |||
| 875b5fffcc | |||
| d03a887620 | |||
| 6293cc8c27 | |||
| 847cfa3ca9 | |||
| 0361e5c69b | |||
| 654355c991 | |||
| 4712a77d00 | |||
| 57c5b2d5fc | |||
| a2949b8124 | |||
| 50c5701836 | |||
| 6fe0477ca7 | |||
| 18e075538d | |||
| b00e8a08e9 | |||
| ac4ab11a74 | |||
| c26631db57 | |||
| 1daa06fff4 | |||
| f3ef6f25f4 | |||
| ec012d9fd6 | |||
| fc90cf3377 | |||
| e1e42d1caf | |||
| 95ce29e355 | |||
| 0fd818b077 | |||
| ba59daf747 | |||
| b7d94c2ed1 | |||
| 7a057a8d53 | |||
| 49c6ab97a9 | |||
| ed0d80b37e | |||
| 9768728c92 | |||
| 0c68544f2f | |||
| 048b36f80d | |||
| 40f902e2f5 | |||
| b1f154a0ea | |||
| 628c9b071f | |||
| ed39b6181f | |||
| 1d6d712483 | |||
| 62ddb46674 | |||
| 73c4f0ffcd | |||
| 375cd44cbd | |||
| ce057525d3 | |||
| 01c879951c | |||
| 4f19f05f3b | |||
| 47f68c7ed3 | |||
| 39db421aa1 | |||
| f4b0c08822 | |||
| f17c3fa267 | |||
| 48d1005be6 | |||
| e71e8d1966 | |||
| 489b3d3ae1 | |||
| 81e6f55dbf | |||
| 1b162f10e6 | |||
| 301cce3d11 | |||
| e68d0d5c45 | |||
| b5e2019d28 | |||
| 2cf952fb76 | |||
| c7c5ab17bc | |||
| a98955530f | |||
| c63a509f9e | |||
| 84dca85447 | |||
| dac51a9eea | |||
| 8c3e8136be | |||
| 606c157958 | |||
| ba3677b641 | |||
| 8d78a1ad74 | |||
| 7c11bb4258 | |||
| 0d6ec3d836 | |||
| dee13a4ec4 | |||
| 9449433fe8 | |||
| 2c976c9fb1 | |||
| 90fdfbbe61 | |||
| a8df13fdd2 | |||
| f05eac2637 | |||
| 71e4cd6272 | |||
| 82c5de7dfe | |||
| 4ae30b3d47 | |||
| 8abefdcfd5 | |||
| 801a126de0 | |||
| 377d0fbe12 | |||
| 1ecf968668 | |||
| 9d11733444 | |||
| c43b985f4e | |||
| b7fea64925 | |||
| e62c6a5c55 | |||
| 116d7f4a3f | |||
| 0c36dc03a5 | |||
| c658269eb7 | |||
| defaea86f0 | |||
| f1564cc90b | |||
| 66feb0b9c2 | |||
| 93b57ae2e1 | |||
| 79bfa21115 | |||
| 5588b0d2fa | |||
| e9788acb46 | |||
| 8056a5b8bf | |||
| e5033a0c0f | |||
| e0ad956e34 | |||
| 32abe15b09 | |||
| 2b65e33aa7 | |||
| 9546f9cbc8 | |||
| bc6ab6c840 | |||
| 9834b20a9f | |||
| 752008e8ac | |||
| fbe81021c0 | |||
| ccbb071704 | |||
| 882c5399bd | |||
| dbe0461d5f | |||
| d3d166dd02 | |||
| d0dd1f38ff | |||
| 53300a3028 | |||
| 56303dd82a | |||
| d26cb41048 | |||
| a15aaa573d | |||
| 19d8c89bd8 | |||
| adba3e4c15 | |||
| 479ce8093e | |||
| 1ed6c619d9 | |||
| 825f439ffb | |||
| b1b487e63f | |||
| 2763a7ca75 | |||
| b4b1a2a549 | |||
| 5865317394 | |||
| b70c090e94 | |||
| a9f6b924c2 | |||
| 9c25a6450a | |||
| 448982fbaf | |||
| 2ee06c59f1 | |||
| d38711ca4b | |||
| c9b650fb7f | |||
| 3cef8b9a4f | |||
| d9d9f3dad8 | |||
| 44fe1eafb1 | |||
| 36fcc46445 | |||
| 64895ba521 | |||
| 589340f2db | |||
| de7d22766a | |||
| 568ff40df6 | |||
| 83c1a2fd63 | |||
| 17b5ba0ae1 | |||
| 4d4eeacbdd | |||
| 99dc644adf | |||
| f442ab56c0 | |||
| 9147b139c7 | |||
| 0e904a388c | |||
| 3723137fea | |||
| 71e54cc9ab | |||
| b4cf962a85 | |||
| 1a30f240ef | |||
| 4f2b8e6d8d | |||
| b3b5ac63c8 | |||
| 16abc0faa1 | |||
| 7165c086e4 | |||
| fa22a4f27b | |||
| 9c0f5865f6 | |||
| 1d0cb048cd | |||
| 641d399a8e | |||
| 32861e757d | |||
| 634738a1fc | |||
| 859cbb6161 | |||
| 6c960a81c0 | |||
| 1695c41ef2 | |||
| 8eabc6ad4c | |||
| a153ca1fe1 | |||
| cab9f7c830 | |||
| 6bb832a488 | |||
| 778c2f894e | |||
| e7dda9590a | |||
| 0483edd2f3 | |||
| 122ef4dce0 | |||
| e9d254f8c4 | |||
| 17aa85ad24 | |||
| 8e1dfd688e | |||
| 691d5caded | |||
| 31c089f82f | |||
| 8eceeb0226 | |||
| c178afa4b9 | |||
| 116df0d999 | |||
| 2617cd294d | |||
| 43b421042d | |||
| af69678545 | |||
| ef3cd4b43d | |||
| 4b27f39a04 | |||
| 53a2bf1748 | |||
| edec8bc0a2 | |||
| 066b23c785 | |||
| 85341f7a6d | |||
| 1f74f19cd9 | |||
| 232c727b4f | |||
| cd5da82d0c | |||
| b762c0561d | |||
| 9e0edd0cf3 | |||
| f144a9ebc1 | |||
| 29ef95387c | |||
| 0d79a856b2 | |||
| 84e90a7a9b | |||
| bd5054e762 | |||
| 63dea2515e | |||
| baa89edd03 | |||
| c45f9f442f | |||
| 9e13b27197 | |||
| 3c173685ea | |||
| 8eb70cbaed | |||
| 22167081f0 | |||
| 23d07aa92d | |||
| 578a9f9309 | |||
| bacdfa96e3 | |||
| c73c3f8490 | |||
| f4a8bfeb0a | |||
| 197e6e8178 | |||
| 48a8cdc365 | |||
| 171e6b9bcd | |||
| c2c8bf8613 | |||
| fce703579f | |||
| e98f17f63b | |||
| 120dddf844 | |||
| ca711bbc72 | |||
| cc4cb10307 | |||
| 88db5c9594 | |||
| 81bfa9a02b | |||
| ae72e627c5 | |||
| 131b2835e5 | |||
| 5b905a9ab3 | |||
| e90c7cd8a0 | |||
| 3b4a0ff4bc | |||
| 55cb4595bd | |||
| e91afc17a3 | |||
| 6a398e6514 | |||
| 51de347bdd | |||
| 72d6cb9697 | |||
| 4a025de9d6 | |||
| 6c8060fa87 | |||
| 0c0987b66b | |||
| 5a71e4015c | |||
| f68edcbfea | |||
| aefa0d6797 | |||
| 7e48c49e33 | |||
| 305a6bb459 | |||
| 28c8614550 | |||
| 1b48d61d3f | |||
| f282d78fb9 | |||
| 7f8b5579c5 | |||
| db786290e8 | |||
| 2c71d97c15 | |||
| bf1361c7c3 | |||
| f2bba7f3df | |||
| 62e5183c54 | |||
| c1a90c9350 | |||
| 0d0826f319 | |||
| 47541fa99c | |||
| 13638cedee | |||
| 4cdf31cfe8 | |||
| 3ff9a93066 | |||
| 083a036666 | |||
| 6bfa3a422e | |||
| 352abc40e6 | |||
| a0efe44e8d | |||
| 58d26dedd6 | |||
| 8d110e22dd | |||
| 4d6e11fdeb | |||
| 454b15ff60 | |||
| 321afa2a9e | |||
| 71ffbfb7b9 | |||
| 2ab7949ce5 | |||
| 28e1eaae77 | |||
| 30dda058fe | |||
| 0d16c037f5 | |||
| 7f50de17c0 | |||
| 67819b30eb | |||
| d2f4972693 | |||
| ad38722304 | |||
| 4da48c4c55 | |||
| 6542e9e889 | |||
| 2f7e3d43d1 | |||
| edaafb5cf0 | |||
| 81d1ed419e | |||
| 385e3dc964 | |||
| 9592cd80f3 | |||
| 7b153a8aad | |||
| acb299530d | |||
| 54c2213eb6 | |||
| 7c705015e6 | |||
| 1274a8e097 | |||
| bd1d0063e5 | |||
| af9b55ad6c | |||
| 97b86d69c4 | |||
| c6b4eacf03 | |||
| bcb21be848 | |||
| 562594de2f | |||
| 03a00bb7ca | |||
| e011ce3ee0 | |||
| 1dd6359c89 | |||
| e41abdd176 | |||
| b7a5bfd274 | |||
| c3abfb123d | |||
| dc3aa939db | |||
| 39391b944f | |||
| a6fc8f1702 | |||
| b0777789fd | |||
| 24a2a48deb | |||
| e08faa7943 | |||
| 76f28e648c | |||
| a000afbc60 | |||
| f49a79b54a | |||
| 3cf385c2a2 | |||
| a3e34c9738 | |||
| 1f63bdf124 | |||
| 44205664b5 | |||
| 8c91a84795 | |||
| 4af63758f2 | |||
| 969b02dc18 | |||
| 2111ad64c4 | |||
| e02deb2fb0 | |||
| 410e34b147 | |||
| 40d019d7e8 | |||
| 96755e6174 | |||
| 9cebd7ee54 | |||
| cfec32746d | |||
| bd5866787f | |||
| d9651bbd27 | |||
| fabe5d77ea | |||
| c67712d973 | |||
| a1f4442a53 | |||
| e6b140245b | |||
| 08336027b2 | |||
| 543b5ed49a | |||
| 3d86c5c5ee | |||
| 8e1009ab3f | |||
| 551a5f1a72 | |||
| 7e45a98e8f | |||
| 2664f96e0f | |||
| dde2bcc947 | |||
| 3e3e97385b | |||
| 05fba12038 | |||
| c1f2803c56 | |||
| 7006c669f0 | |||
| 7cd0c956f6 | |||
| 7c33dda11b | |||
| 5f9f0f23b8 | |||
| 284191a904 | |||
| 0ad60cd5d9 | |||
| 8485d1585a | |||
| 1cd2f75dd2 | |||
| bdc4fa4477 | |||
| ff7720a8d6 | |||
| 6829709123 | |||
| 0d355f675a | |||
| af2f0e8582 | |||
| 3362570123 | |||
| e008eb8a13 | |||
| 1f438d8f87 | |||
| 278ae04532 | |||
| 2d4f033891 | |||
| 1fd85f2249 | |||
| d966697ecb | |||
| 2e6c0ba356 | |||
| ebb47990f4 | |||
| 15fe39c1bb | |||
| 7bb0ec3148 | |||
| 6fcfacd346 | |||
| 48212ba746 | |||
| 7bf9ce141a | |||
| 2353bd7545 | |||
| 02ddf5773c | |||
| 3e37e9ee08 | |||
| b1b907bfe5 | |||
| d347dbd222 | |||
| 44527630da | |||
| df6ac6d740 | |||
| 2ce08f8957 | |||
| 1baa666d23 | |||
| e5e4551038 | |||
| 0cfbe09558 | |||
| 7d72e82325 | |||
| 3f823c58cc | |||
| 3932ea21c2 | |||
| c9d426e581 | |||
| 61c516df1d | |||
| 7e2019abd4 | |||
| f0f3614b9d | |||
| 573a284580 | |||
| 310c890474 | |||
| 8a309b56d9 | |||
| adc3f15c97 | |||
| 962f523af9 | |||
| dbc1ad4cb7 | |||
| 8b0f6a4414 | |||
| 502aaf6a8a | |||
| 5c644fbf5b | |||
| da60ca7560 | |||
| a5a56c7eb7 | |||
| ff8b1f24d0 | |||
| 904c1a7d71 | |||
| 02aca6f044 | |||
| b4ea632b93 | |||
| a2cc1c2913 | |||
| 522a799516 | |||
| 04e43ebec8 | |||
| 077d72c23b | |||
| cb95c45d76 | |||
| a9de079132 | |||
| 166cc55e3c | |||
| f36bffa4b7 | |||
| 6da1e75dad | |||
| 82d66ca392 | |||
| e98cf1f2b5 | |||
| 77bd333fff | |||
| b791a185a2 | |||
| c64d7fedd2 | |||
| d2f5c02238 | |||
| 9cfcf37fb3 | |||
| 84d36df388 | |||
| 880abd0124 | |||
| 72274bfd7d | |||
| 9640169be9 | |||
| 9daf0c7317 | |||
| a4df5a8ed8 | |||
| df3d20f94e | |||
| f3b40f51a2 | |||
| e3d7598501 | |||
| 596b822a5d | |||
| e9e7ac48b1 | |||
| 2e2254fbbd | |||
| 8bda3351b8 | |||
| 532f3adba8 | |||
| cc8b97f2fe | |||
| db31c54309 | |||
| 375e81b17d | |||
| 4fb9126d49 | |||
| ed2fca240e | |||
| f5549f2ebe | |||
| 18e9cfe2a5 | |||
| e4e6753a02 | |||
| 8e7855405d | |||
| 381cae7307 | |||
| e94d67916d | |||
| c98f9476cb | |||
| 6c36f3c7e9 | |||
| 877a89d17a | |||
| d325a69e3f | |||
| 08704aad2c | |||
| a80bb082b3 | |||
| fccd197cd5 | |||
| 2cfc2c81c8 | |||
| 6f4e105542 | |||
| 633b3f2033 | |||
| f0a62c813a | |||
| 21f03526f8 | |||
| 0e7a96d308 | |||
| 87572246a6 | |||
| 025484d5b4 | |||
| 15e4b1316e | |||
| e02eddc60e | |||
| 1e1ddd505b | |||
| 415f16507b | |||
| cb95978502 | |||
| 1b729f3fe7 | |||
| d84e097fa2 | |||
| 51ad901206 | |||
| 517925a207 | |||
| c5abc22c58 | |||
| 2330377212 | |||
| 9db56bbf87 | |||
| 52a90fec6c | |||
| 3630dc724d | |||
| 627bfbc007 | |||
| d9283e938b | |||
| ce4d50654d | |||
| 7568ab56f6 | |||
| bf58654a10 | |||
| e4576c7d51 | |||
| a1f07c075e | |||
| 84c4ad6cdd | |||
| 47aef1f349 | |||
| 1e7a25046a | |||
| 87a9e93278 | |||
| 2d3062008e | |||
| 8dcec7a1bd | |||
| d839b6e4bd | |||
| 0c155ac8cd | |||
| 271b193543 | |||
| e4ac25f4ce | |||
| 52f9e3e9e4 | |||
| 6bf32ff85c | |||
| 9bd432ad7f | |||
| 04fc4aa676 | |||
| 8ee4b8b4c9 | |||
| 5767668efa | |||
| 76b226b865 | |||
| 1788c18d59 | |||
| 2251cd4c25 | |||
| 781b588980 | |||
| 74ac4fe64f | |||
| 6d1f9803ce | |||
| 95d721e1a3 | |||
| d2f2a3b8aa | |||
| 768ce5b8fd | |||
| 3e9f741d62 | |||
| 133f007bde | |||
| a623a3bfab | |||
| 4157a39589 | |||
| 10e2873497 | |||
| d7ef6c8a72 | |||
| d29ba9d423 | |||
| 0c60395426 | |||
| 4ac1c0d4b3 | |||
| 9a0c9e9b7d | |||
| 79408c081a | |||
| 218411902e | |||
| a42f8367a4 | |||
| 02acfaa3ed | |||
| 9a2799e83b | |||
| 73e6ce75b0 |
@@ -0,0 +1 @@
|
|||||||
|
Distant Horizons logos © 2024 by Pankakes are licensed under CC BY-SA 4.0
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Distant Horizons
|
# <img src="https://gitlab.com/jeseibel/distant-horizons-core/-/raw/main/_Misc%20Files%2Flogo%20files%2Fnew%2FSVG%2FDistant-Horizons-Core.svg" height="128px">
|
||||||
|
|
||||||
This repo is for the Distant Horizons mod.
|
This repo is for the Distant Horizons mod.
|
||||||
The purpose of this submodule is to isolate code that isn't tied to a specific version of minecraft. This prevents us from having duplicate code; reducing errors and potentially helping us port to different versions faster and easier.
|
The purpose of this submodule is to isolate code that isn't tied to a specific version of minecraft. This prevents us from having duplicate code; reducing errors and helping us port to different versions faster and easier.
|
||||||
|
|
||||||
Check out the mod's main GitLab page here:
|
Check out the mod's main GitLab page here:
|
||||||
https://gitlab.com/jeseibel/distant-horizons
|
https://gitlab.com/jeseibel/distant-horizons
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
# Distant Horizons brand guidelines
|
||||||
|
|
||||||
|
To keep our look consistent and recognizable, we’ve created some simple guidelines for using our logos. We have a Primary logo, Core and API logos. Keep them cool 😎
|
||||||
|
|
||||||
|
|
||||||
|
## Logos
|
||||||
|
Please do not edit, change, distort, recolour, or reconfigure our logos.
|
||||||
|
|  |  |  |
|
||||||
|
|--|--|--|
|
||||||
|
|Primary [.png](/PNG/Distant-Horizons.png) [.svg](./SVG/Distant-Horizons-Logo.svg)| Core [.png](/PNG/Distant-Horizons-Core.png) [.svg](./SVG/Distant-Horizons-Core.svg) | API [.png](./PNG/Distant-Horizons-API.png) [.svg](./SVG/Distant-Horizons-API.svg) |
|
||||||
|
|
||||||
|
|
||||||
|
## Marks
|
||||||
|
Use these only when the Distant Horizons brand is clearly visible or has been well established elsewhere on the page or in the design. (When in doubt, use the other ones.)
|
||||||
|
|
||||||
|
> *Keep in mind the Distant Horizons API mark needs to be optically centered to align.*
|
||||||
|
|
||||||
|
<!-- |  |  |  |
|
||||||
|
|--|--|--|
|
||||||
|
|Primary [.png](/PNG/Distant-Horizons-Mark.png.png) [.svg](./SVG/Distant-Horizons-Mark.svg.svg)| Core [.png](/PNG/Distant-Horizons-Core-Mark.png.png) [.svg](./SVG/Distant-Horizons-Core-Mark.svg.svg) | API [.png](./PNG/Distant-Horizons-API-Mark.png.png) [.svg](./SVG/Distant-Horizons-API-Mark.svg.svg) | -->
|
||||||
|
|
||||||
|
| <img src="./PNG/Distant-Horizons-Mark.png" width="100"/> | <img src="./PNG/Distant-Horizons-Core-Mark.png" width="100"/> | <img src="./PNG/Distant-Horizons-API-Mark.png" width="100"/> |
|
||||||
|
|--|--|--|
|
||||||
|
|Primary [.png](/PNG/Distant-Horizons-Mark.png.png) [.svg](./SVG/Distant-Horizons-Mark.svg.svg)| Core [.png](/PNG/Distant-Horizons-Core-Mark.png.png) [.svg](./SVG/Distant-Horizons-Core-Mark.svg.svg) | API [.png](./PNG/Distant-Horizons-API-Mark.png.png) [.svg](./SVG/Distant-Horizons-API-Mark.svg.svg) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Spacing
|
||||||
|
Every logo needs room to breathe.
|
||||||
|
Ours needs the free space of the height and width of the letter **"H"** in Distant **H**orizons.
|
||||||
|
|
||||||
|
> *Some leeway is allowed for the Distant Horizons API mark due to it's shape.*
|
||||||
|
|
||||||
|
|  |  |
|
||||||
|
|--|--|
|
||||||
|
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
The logotype we are using in our logos is a modified [Karmatic Arcade font by Vic Fieger](https://www.dafont.com/karmatic-arcade.font?fpp=100&psize=s)
|
||||||
|
|
||||||
|
This branding guideline was influenced by [Discord's own](https://discord.com/branding)
|
||||||
|
|
||||||
|
Distant Horizons logos © 2024 by Pankakes are licensed under CC BY-SA 4.0
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 78 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 306.5 359.13"><defs><style>.cls-1{fill:#7ec138;}.cls-2{fill:#12af68;}.cls-3{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Logo_RGB_White" data-name="Logo RGB White"><path id="Outline" d="M175.21,356.1l123.72-71.92A15.22,15.22,0,0,0,306.5,271V126.5a22.32,22.32,0,0,0-11.1-19.29L173.18,36.13a18.26,18.26,0,0,0-18.36,0L32.59,107.21A22.31,22.31,0,0,0,21.5,126.5V271a15.22,15.22,0,0,0,7.56,13.15L152.78,356.1A22.29,22.29,0,0,0,175.21,356.1Z"/><g id="Right_Path_" data-name="Right <Path>"><path class="cls-1" d="M224.5,254.1v51.61a8,8,0,0,1-4,6.92l-44,25.4a4,4,0,0,1-6-3.46V283a8,8,0,0,1,4-6.92l44-25.41A4,4,0,0,1,224.5,254.1Z"/></g><g id="_Path_" data-name="<Path>"><path class="cls-2" d="M113.82,173.07l-11-6.36a4,4,0,0,0-6,3.46v51.72a8,8,0,0,0,4,6.92l11,6.35a4,4,0,0,0,6-3.46V180A8,8,0,0,0,113.82,173.07Z"/></g><g id="_Path_2" data-name="<Path>"><path class="cls-2" d="M129.26,150.11l11.19-6.46a4,4,0,0,0,0-6.93l-11.19-6.46a8,8,0,0,0-8,0l-11.2,6.46a4,4,0,0,0,0,6.93l11.2,6.46A8,8,0,0,0,129.26,150.11Z"/></g><g id="Right_Path_2" data-name="Right <Path>"><path class="cls-2" d="M170.5,244v12.74a4,4,0,0,0,6,3.46l44-25.4a8,8,0,0,0,4-6.92V215.15a4,4,0,0,0-6-3.46l-44,25.4A8,8,0,0,0,170.5,244Z"/></g><g id="Right_Path_3" data-name="Right <Path>"><path class="cls-1" d="M243.5,299.35l45-26a8,8,0,0,0,4-6.92V136.92a4,4,0,0,0-6-3.46l-45,26a8,8,0,0,0-4,6.92V295.89A4,4,0,0,0,243.5,299.35Z"/></g><g id="Left_Path_" data-name="Left <Path>"><path class="cls-2" d="M157.5,244v12.74a4,4,0,0,1-6,3.46l-11-6.35a8,8,0,0,1-4-6.92V234.2a4,4,0,0,1,6-3.46l11,6.35A8,8,0,0,1,157.5,244Z"/></g><g id="Left_Path_2" data-name="Left <Path>"><path class="cls-1" d="M153.5,276.08l-112-64.66a4,4,0,0,0-6,3.46v51.57a8,8,0,0,0,4,6.92L151.5,338a4,4,0,0,0,6-3.46V283A8,8,0,0,0,153.5,276.08Z"/></g><g id="_Path_3" data-name="<Path>"><path class="cls-3" d="M157.5,205v12.74a4,4,0,0,1-6,3.46l-11-6.36a8,8,0,0,1-4-6.92V195.23a4,4,0,0,1,6-3.46l11,6.35A8,8,0,0,1,157.5,205Z"/></g><path d="M91.15,171.19V235a16,16,0,0,1-24,13.85L11.59,216.81A23.27,23.27,0,0,1,0,196.73V132.89A16,16,0,0,1,24,119l55.56,32.07A23.24,23.24,0,0,1,91.15,171.19Z"/><g id="_Path_4" data-name="<Path>"><path class="cls-1" d="M14,138.09v58.64a9.17,9.17,0,0,0,4.6,8l51.05,29.48a5,5,0,0,0,7.5-4.33V171.19a9.18,9.18,0,0,0-4.59-8L21.5,133.76A5,5,0,0,0,14,138.09Z"/></g><g id="_Path_5" data-name="<Path>"><path class="cls-3" d="M170.5,217.78V205.05a8,8,0,0,1,4-6.93l11-6.35a4,4,0,0,1,6,3.46V208a8,8,0,0,1-4,6.93l-11,6.35A4,4,0,0,1,170.5,217.78Z"/></g><g id="_Path_6" data-name="<Path>"><path class="cls-2" d="M209.5,202.19l11-6.36a8,8,0,0,0,4-6.92V176.18a4,4,0,0,0-6-3.47l-11,6.36a8,8,0,0,0-4,6.93v12.72A4,4,0,0,0,209.5,202.19Z"/></g><path d="M300.65,84.93a15.94,15.94,0,0,1-7.92,13.73L245.5,125.91a20,20,0,0,1-20.06,0L164,90.44l-61.45,35.48a20.11,20.11,0,0,1-20.06,0L35.27,98.66a15.84,15.84,0,0,1,0-27.44L154,2.69a20,20,0,0,1,20.06,0l118.7,68.53A15.89,15.89,0,0,1,300.65,84.93Z"/><g id="_Path_7" data-name="<Path>"><path class="cls-2" d="M169,117.4l-11,6.34a4,4,0,0,0,0,6.93l44.93,26a8,8,0,0,0,8,0l11-6.35a4,4,0,0,0,0-6.93L177,117.4A8,8,0,0,0,169,117.4Z"/></g><g id="_Path_8" data-name="<Path>"><path class="cls-3" d="M168,187.21l11.19-6.46a4,4,0,0,0,0-6.93L168,167.36a8,8,0,0,0-8,0l-11.2,6.46a4,4,0,0,0,0,6.93l11.2,6.46A8,8,0,0,0,168,187.21Z"/></g><g id="_Path_9" data-name="<Path>"><path class="cls-1" d="M280.42,87.31l-44.73,25.82a8,8,0,0,1-8,0L168,78.66a8,8,0,0,0-8,0l-59.7,34.47a8,8,0,0,1-8,0L47.58,87.31a4,4,0,0,1,0-6.93L160,15.47a8,8,0,0,1,8,0L280.42,80.38A4,4,0,0,1,280.42,87.31Z"/></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 285 325.47"><defs><style>.cls-1{fill:#e13e1e;}.cls-2{fill:#f7a612;}.cls-3{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Logo_RGB_White" data-name="Logo RGB White"><path id="Outline" d="M153.72,322.45l123.71-71.93A15.22,15.22,0,0,0,285,237.36V92.84a22.32,22.32,0,0,0-11.1-19.29L151.68,2.47a18.31,18.31,0,0,0-18.36,0L11.1,73.55A22.32,22.32,0,0,0,0,92.84V237.35A15.2,15.2,0,0,0,7.57,250.5l123.71,71.94A22.31,22.31,0,0,0,153.72,322.45Z"/><g id="Right_Path_" data-name="Right <Path>"><path class="cls-1" d="M203,220.44v51.61a8,8,0,0,1-4,6.93l-44,25.39a4,4,0,0,1-6-3.46v-51.6a8,8,0,0,1,4-6.92L197,217A4,4,0,0,1,203,220.44Z"/></g><g id="Right_Path_2" data-name="Right <Path>"><path class="cls-2" d="M149,210.36v12.73a4,4,0,0,0,6,3.46l44-25.39a8,8,0,0,0,4-6.93V181.49a4,4,0,0,0-6-3.46l-44,25.4A8,8,0,0,0,149,210.36Z"/></g><g id="Right_Path_3" data-name="Right <Path>"><path class="cls-1" d="M222,265.69l45-26a8,8,0,0,0,4-6.93V103.26a4,4,0,0,0-6-3.46l-45,26a8,8,0,0,0-4,6.93V262.23A4,4,0,0,0,222,265.69Z"/></g><g id="Left_Path_" data-name="Left <Path>"><path class="cls-2" d="M136,210.36v12.73a4,4,0,0,1-6,3.46l-11-6.34a8,8,0,0,1-4-6.93V200.54a4,4,0,0,1,6-3.46l11,6.35A8,8,0,0,1,136,210.36Z"/></g><g id="Left_Path_2" data-name="Left <Path>"><path class="cls-1" d="M132,242.42,20,177.76a4,4,0,0,0-6,3.46v51.57a8,8,0,0,0,4,6.93l112,64.65a4,4,0,0,0,6-3.46V249.35A8,8,0,0,0,132,242.42Z"/></g><g id="_Path_" data-name="<Path>"><path class="cls-3" d="M136,171.39v12.73a4,4,0,0,1-6,3.46l-11-6.35a8,8,0,0,1-4-6.93V161.57a4,4,0,0,1,6-3.46l11,6.35A8,8,0,0,1,136,171.39Z"/></g><g id="_Path_2" data-name="<Path>"><path class="cls-2" d="M99,145.41l-11-6.35a4,4,0,0,0-6,3.46v51.71a8,8,0,0,0,4,6.93l11,6.34a4,4,0,0,0,6-3.46v-51.7A8,8,0,0,0,99,145.41Z"/></g><g id="_Path_3" data-name="<Path>"><path class="cls-1" d="M14.33,103.26V155a8,8,0,0,0,4,6.93l45,26a4,4,0,0,0,6-3.46v-51.7a8,8,0,0,0-4-6.93l-45-26A4,4,0,0,0,14.33,103.26Z"/></g><g id="_Path_4" data-name="<Path>"><path class="cls-3" d="M149,184.12V171.39a8,8,0,0,1,4-6.93l11-6.35a4,4,0,0,1,6,3.46V174.3a8,8,0,0,1-4,6.93l-11,6.35A4,4,0,0,1,149,184.12Z"/></g><g id="_Path_5" data-name="<Path>"><path class="cls-2" d="M188,168.53l11-6.35a8,8,0,0,0,4-6.93V142.52a4,4,0,0,0-6-3.47l-11,6.36a8,8,0,0,0-4,6.93v12.72A4,4,0,0,0,188,168.53Z"/></g><g id="_Path_6" data-name="<Path>"><path class="cls-1" d="M258.92,88.65l-44.73,25.82a8,8,0,0,1-8,0L146.5,80a8,8,0,0,0-8,0L78.8,114.47a8,8,0,0,1-8,0L26.08,88.65a4,4,0,0,1,0-6.93L138.5,16.82a8,8,0,0,1,8,0l112.42,64.9A4,4,0,0,1,258.92,88.65Z"/></g><g id="_Path_7" data-name="<Path>"><path class="cls-2" d="M138.5,94.74l-11,6.35a4,4,0,0,0,0,6.92l44.94,26a8,8,0,0,0,8,0l11-6.35a4,4,0,0,0,0-6.93L146.5,94.74A8,8,0,0,0,138.5,94.74Z"/></g><g id="_Path_8" data-name="<Path>"><path class="cls-2" d="M112.76,134.08,124,127.61a4,4,0,0,0,0-6.93l-11.19-6.46a8,8,0,0,0-8,0l-11.2,6.46a4,4,0,0,0,0,6.93l11.2,6.47A8,8,0,0,0,112.76,134.08Z"/></g><g id="_Path_9" data-name="<Path>"><path class="cls-3" d="M146.5,153.56l11.19-6.47a4,4,0,0,0,0-6.93L146.5,133.7a8,8,0,0,0-8,0l-11.19,6.46a4,4,0,0,0,0,6.93l11.19,6.47A8,8,0,0,0,146.5,153.56Z"/></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 285 325.47"><defs><style>.cls-1{fill:#38c138;}.cls-2{fill:#f6d182;}.cls-3{fill:#fff;}.cls-4{fill:#00a9f4;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Logo_RGB_White" data-name="Logo RGB White"><path id="Outline" d="M153.72,322.45l123.71-71.93A15.22,15.22,0,0,0,285,237.36V92.84a22.32,22.32,0,0,0-11.1-19.29L151.68,2.47a18.31,18.31,0,0,0-18.36,0L11.1,73.55A22.32,22.32,0,0,0,0,92.84V237.35A15.2,15.2,0,0,0,7.57,250.5l123.71,71.94A22.31,22.31,0,0,0,153.72,322.45Z"/><path id="Green" class="cls-1" d="M203,220.44v51.61a8,8,0,0,1-4,6.93l-44,25.39a4,4,0,0,1-6-3.46v-51.6a8,8,0,0,1,4-6.92L197,217A4,4,0,0,1,203,220.44Zm-54-10.08v12.73a4,4,0,0,0,6,3.46l44-25.39a8,8,0,0,0,4-6.93V181.49a4,4,0,0,0-6-3.46l-44,25.4A8,8,0,0,0,149,210.36Zm73,55.33,45-26a8,8,0,0,0,4-6.93V103.26a4,4,0,0,0-6-3.46l-45,26a8,8,0,0,0-4,6.93V262.23A4,4,0,0,0,222,265.69Z"/><path id="Yellow" class="cls-2" d="M136,210.36v12.73a4,4,0,0,1-6,3.46l-11-6.34a8,8,0,0,1-4-6.93V200.54a4,4,0,0,1,6-3.46l11,6.35A8,8,0,0,1,136,210.36Zm-4,32.06L20,177.76a4,4,0,0,0-6,3.46v51.57a8,8,0,0,0,4,6.93l112,64.65a4,4,0,0,0,6-3.46V249.35A8,8,0,0,0,132,242.42Z"/><g id="_Path_" data-name="<Path>"><path class="cls-3" d="M136,171.39v12.73a4,4,0,0,1-6,3.46l-11-6.35a8,8,0,0,1-4-6.93V161.57a4,4,0,0,1,6-3.46l11,6.35A8,8,0,0,1,136,171.39Z"/></g><g id="_Path_2" data-name="<Path>"><path class="cls-4" d="M99,145.41l-11-6.35a4,4,0,0,0-6,3.46v51.71a8,8,0,0,0,4,6.93l11,6.34a4,4,0,0,0,6-3.46v-51.7A8,8,0,0,0,99,145.41Z"/></g><g id="_Path_3" data-name="<Path>"><path class="cls-4" d="M14,103.26V155a8,8,0,0,0,4,6.93l45,26a4,4,0,0,0,6-3.46v-51.7a8,8,0,0,0-4-6.93l-45-26A4,4,0,0,0,14,103.26Z"/></g><g id="_Path_4" data-name="<Path>"><path class="cls-3" d="M149,184.12V171.39a8,8,0,0,1,4-6.93l11-6.35a4,4,0,0,1,6,3.46V174.3a8,8,0,0,1-4,6.93l-11,6.35A4,4,0,0,1,149,184.12Z"/></g><g id="_Path_5" data-name="<Path>"><path class="cls-4" d="M188,168.53l11-6.35a8,8,0,0,0,4-6.93V142.52a4,4,0,0,0-6-3.47l-11,6.36a8,8,0,0,0-4,6.93v12.72A4,4,0,0,0,188,168.53Z"/></g><g id="_Path_6" data-name="<Path>"><path class="cls-4" d="M258.92,88.65l-44.73,25.82a8,8,0,0,1-8,0L146.5,80a8,8,0,0,0-8,0L78.8,114.47a8,8,0,0,1-8,0L26.08,88.65a4,4,0,0,1,0-6.93L138.5,16.82a8,8,0,0,1,8,0l112.42,64.9A4,4,0,0,1,258.92,88.65Z"/></g><g id="_Path_7" data-name="<Path>"><path class="cls-4" d="M138.5,94.74l-11,6.35a4,4,0,0,0,0,6.92l44.94,26a8,8,0,0,0,8,0l11-6.35a4,4,0,0,0,0-6.93L146.5,94.74A8,8,0,0,0,138.5,94.74Z"/></g><g id="_Path_8" data-name="<Path>"><path class="cls-4" d="M112.76,134.08,124,127.61a4,4,0,0,0,0-6.93l-11.19-6.46a8,8,0,0,0-8,0l-11.2,6.46a4,4,0,0,0,0,6.93l11.2,6.47A8,8,0,0,0,112.76,134.08Z"/></g><g id="_Path_9" data-name="<Path>"><path class="cls-3" d="M146.5,153.56l11.19-6.47a4,4,0,0,0,0-6.93L146.5,133.7a8,8,0,0,0-8,0l-11.19,6.46a4,4,0,0,0,0,6.93l11.19,6.47A8,8,0,0,0,146.5,153.56Z"/></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
@@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
|
|
||||||
id "com.github.johnrengelman.shadow" version '7.1.2' apply false
|
id "com.github.johnrengelman.shadow" version '8.1.1' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ import com.seibel.distanthorizons.api.interfaces.events.IDhApiEventInjector;
|
|||||||
import com.seibel.distanthorizons.api.interfaces.factories.IDhApiWrapperFactory;
|
import com.seibel.distanthorizons.api.interfaces.factories.IDhApiWrapperFactory;
|
||||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||||
import com.seibel.distanthorizons.api.interfaces.override.worldGenerator.IDhApiWorldGeneratorOverrideRegister;
|
import com.seibel.distanthorizons.api.interfaces.override.worldGenerator.IDhApiWorldGeneratorOverrideRegister;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.render.IDhApiCustomRenderObjectFactory;
|
||||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.world.IDhApiLevelWrapper;
|
||||||
import com.seibel.distanthorizons.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
|
import com.seibel.distanthorizons.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
|
||||||
import com.seibel.distanthorizons.api.methods.override.DhApiWorldGeneratorOverrideRegister;
|
import com.seibel.distanthorizons.api.methods.override.DhApiWorldGeneratorOverrideRegister;
|
||||||
import com.seibel.distanthorizons.coreapi.ModInfo;
|
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||||
@@ -123,10 +125,16 @@ public class DhApi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to create wrappers for Minecraft objects needed by other Distant Horizons API methods.
|
* Used to create wrappers for Minecraft objects needed by other Distant Horizons API methods.
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public static IDhApiWrapperFactory wrapperFactory = null;
|
public static IDhApiWrapperFactory wrapperFactory = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to create custom renderable objects. <br>
|
||||||
|
* These objects can be added to the renderer in {@link IDhApiLevelWrapper}
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public static IDhApiCustomRenderObjectFactory customRenderObjectFactory = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -172,7 +180,7 @@ public class DhApi
|
|||||||
* This version should be updated whenever non-breaking fixes are added to the Distant Horizons API.
|
* This version should be updated whenever non-breaking fixes are added to the Distant Horizons API.
|
||||||
* @since API 1.0.0
|
* @since API 1.0.0
|
||||||
*/
|
*/
|
||||||
public static int getApiPatchVersion() { return ModInfo.API_PATH_VERSION; }
|
public static int getApiPatchVersion() { return ModInfo.API_PATCH_VERSION; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the mod's semantic version number in the format: Major.Minor.Patch
|
* Returns the mod's semantic version number in the format: Major.Minor.Patch
|
||||||
@@ -198,7 +206,7 @@ public class DhApi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the thread this method was called from is owned by Distant Horizons.
|
* Returns true if the thread this method was called from is owned by Distant Horizons.
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public static boolean isDhThread() { return Thread.currentThread().getName().startsWith(ModInfo.THREAD_NAME_PREFIX); }
|
public static boolean isDhThread() { return Thread.currentThread().getName().startsWith(ModInfo.THREAD_NAME_PREFIX); }
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package com.seibel.distanthorizons.api.enums;
|
|||||||
* CHUNK - Detail Level: 4, width 16 block, <br>
|
* CHUNK - Detail Level: 4, width 16 block, <br>
|
||||||
* REGION - Detail Level: 9, width 512 block <br> <br>
|
* REGION - Detail Level: 9, width 512 block <br> <br>
|
||||||
*
|
*
|
||||||
* Detail levels in Distant Horizons represent how large a section (of either LODs or MC chunks)
|
* Detail levels in Distant Horizons represent how large a LOD
|
||||||
* is, with the smallest being 0 (1 block wide). <br>
|
* is, with the smallest being 0 (1 block wide). <br>
|
||||||
* The width of a detail level can be calculated by putting the detail level to the power of 2. <br>
|
* The width of a detail level can be calculated by putting the detail level to the power of 2. <br>
|
||||||
* Example for the chunk detail level (4): 2^4 = 16 blocks wide <Br><br>
|
* Example for the chunk detail level (4): 2^4 = 16 blocks wide <Br><br>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* NONE, <br>
|
* NONE, <br>
|
||||||
* NON_COLLIDING, <br>
|
* NON_COLLIDING, <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiBlocksToAvoid
|
public enum EDhApiBlocksToAvoid
|
||||||
|
|||||||
@@ -22,14 +22,13 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
/**
|
/**
|
||||||
* UNCOMPRESSED <br>
|
* UNCOMPRESSED <br>
|
||||||
* LZ4 <br>
|
* LZ4 <br>
|
||||||
* ZSTD <br>
|
|
||||||
* XZ <br><br>
|
* XZ <br><br>
|
||||||
*
|
*
|
||||||
* Note: speed and compression ratios are examples
|
* Note: speed and compression ratios are examples
|
||||||
* and should only be used for estimated comparisons.
|
* and should only be used for estimated comparisons.
|
||||||
*
|
*
|
||||||
* @version 2024-3-16
|
* @version 2024-3-16
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiDataCompressionMode
|
public enum EDhApiDataCompressionMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package com.seibel.distanthorizons.api.enums.config;
|
package com.seibel.distanthorizons.api.enums.config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiGLErrorHandlingMode
|
public enum EDhApiGLErrorHandlingMode
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package com.seibel.distanthorizons.api.enums.config;
|
package com.seibel.distanthorizons.api.enums.config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiGlProfileMode
|
public enum EDhApiGlProfileMode
|
||||||
|
|||||||
@@ -23,13 +23,12 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* AUTO, <br>
|
* AUTO, <br>
|
||||||
* BUFFER_STORAGE, <br>
|
* BUFFER_STORAGE, <br>
|
||||||
* SUB_DATA, <br>
|
* SUB_DATA, <br>
|
||||||
* BUFFER_MAPPING, <br>
|
|
||||||
* DATA <br>
|
* DATA <br>
|
||||||
*
|
*
|
||||||
* @author Leetom
|
* @author Leetom
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
* @since API 1.1.0
|
* @since API 3.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiGpuUploadMethod
|
public enum EDhApiGpuUploadMethod
|
||||||
{
|
{
|
||||||
@@ -49,7 +48,10 @@ public enum EDhApiGpuUploadMethod
|
|||||||
* May end up storing buffers in System memory. <br>
|
* May end up storing buffers in System memory. <br>
|
||||||
* Fast rending if in GPU memory, slow if in system memory, <br>
|
* Fast rending if in GPU memory, slow if in system memory, <br>
|
||||||
* but won't stutter when uploading.
|
* but won't stutter when uploading.
|
||||||
|
*
|
||||||
|
* @deprecated not currently supported
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
BUFFER_MAPPING(true, false),
|
BUFFER_MAPPING(true, false),
|
||||||
|
|
||||||
/** Fast rendering but may stutter when uploading. */
|
/** Fast rendering but may stutter when uploading. */
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* FADE_TO_DIRT <br>
|
* FADE_TO_DIRT <br>
|
||||||
* AS_DIRT <br>
|
* AS_DIRT <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-7
|
* @version 2024-4-7
|
||||||
*/
|
*/
|
||||||
public enum EDhApiGrassSideRendering
|
public enum EDhApiGrassSideRendering
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* HIGH <br>
|
* HIGH <br>
|
||||||
* UNLIMITED <br>
|
* UNLIMITED <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiHorizontalQuality
|
public enum EDhApiHorizontalQuality
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* ENABLED <br>
|
* ENABLED <br>
|
||||||
* DISABLED <br>
|
* DISABLED <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiLodShading
|
public enum EDhApiLodShading
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiLoggerMode
|
public enum EDhApiLoggerMode
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import com.seibel.distanthorizons.coreapi.util.MathUtil;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @author Leonardo Amato
|
* @author Leonardo Amato
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiMaxHorizontalResolution
|
public enum EDhApiMaxHorizontalResolution
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* Determines how the multiplayer folders should be named.
|
* Determines how the multiplayer folders should be named.
|
||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiServerFolderNameMode
|
public enum EDhApiServerFolderNameMode
|
||||||
|
|||||||
@@ -1,14 +1,41 @@
|
|||||||
package com.seibel.distanthorizons.api.enums.config;
|
package com.seibel.distanthorizons.api.enums.config;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* AUTO, <br>
|
||||||
* STABLE, <br>
|
* STABLE, <br>
|
||||||
* NIGHTLY, <br><br>
|
* NIGHTLY, <br><br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.1.0
|
||||||
* @version 2024-4-6
|
* @version 2024-6-8
|
||||||
*/
|
*/
|
||||||
public enum EDhApiUpdateBranch
|
public enum EDhApiUpdateBranch
|
||||||
{
|
{
|
||||||
|
AUTO,
|
||||||
STABLE,
|
STABLE,
|
||||||
NIGHTLY
|
NIGHTLY;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the updateBranch value is {@link EDhApiUpdateBranch#AUTO}
|
||||||
|
* this method will convert it either to {@link EDhApiUpdateBranch#STABLE} or {@link EDhApiUpdateBranch#NIGHTLY}
|
||||||
|
* based on this jar's state. <Br><br>
|
||||||
|
*
|
||||||
|
* If updateBranch is {@link EDhApiUpdateBranch#STABLE} or {@link EDhApiUpdateBranch#NIGHTLY}
|
||||||
|
* it just returns.
|
||||||
|
*/
|
||||||
|
public static EDhApiUpdateBranch convertAutoToStableOrNightly(EDhApiUpdateBranch updateBranch)
|
||||||
|
{
|
||||||
|
if (updateBranch != EDhApiUpdateBranch.AUTO)
|
||||||
|
{
|
||||||
|
return updateBranch;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ModInfo.IS_DEV_BUILD ? EDhApiUpdateBranch.NIGHTLY : EDhApiUpdateBranch.STABLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* the vanilla Minecraft terrain.
|
* the vanilla Minecraft terrain.
|
||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed
|
@Deprecated // not currently in use, if the config this enum represents is re-implemented, the deprecated flag can be removed
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import com.seibel.distanthorizons.coreapi.util.MathUtil;
|
|||||||
*
|
*
|
||||||
* @author Leonardo Amato
|
* @author Leonardo Amato
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiVerticalQuality
|
public enum EDhApiVerticalQuality
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package com.seibel.distanthorizons.api.enums.config;
|
|||||||
* VISUALLY_EQUAL <br><br>
|
* VISUALLY_EQUAL <br><br>
|
||||||
*
|
*
|
||||||
* @version 2024-3-27
|
* @version 2024-3-27
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiWorldCompressionMode
|
public enum EDhApiWorldCompressionMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import com.seibel.distanthorizons.api.enums.config.DisallowSelectingViaConfigGui
|
|||||||
* HIGH, <br>
|
* HIGH, <br>
|
||||||
* EXTREME, <br>
|
* EXTREME, <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiQualityPreset
|
public enum EDhApiQualityPreset
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import com.seibel.distanthorizons.api.enums.config.DisallowSelectingViaConfigGui
|
|||||||
* BALANCED, <br>
|
* BALANCED, <br>
|
||||||
* AGGRESSIVE, <br>
|
* AGGRESSIVE, <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiThreadPreset
|
public enum EDhApiThreadPreset
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.seibel.distanthorizons.api.enums.rendering;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* contains the indices used by shaders to determine
|
||||||
|
* how different block types should be rendered. <br><br>
|
||||||
|
*
|
||||||
|
* UNKNOWN, <br>
|
||||||
|
* LEAVES, <br>
|
||||||
|
* STONE, <br>
|
||||||
|
* WOOD, <br>
|
||||||
|
* METAL, <br>
|
||||||
|
* DIRT, <br>
|
||||||
|
* LAVA, <br>
|
||||||
|
* DEEPSLATE, <br>
|
||||||
|
* SNOW, <br>
|
||||||
|
* SAND, <br>
|
||||||
|
* TERRACOTTA, <br>
|
||||||
|
* NETHER_STONE, <br>
|
||||||
|
* WATER, <br>
|
||||||
|
* GRASS, <br>
|
||||||
|
* AIR, <br>
|
||||||
|
* ILLUMINATED, <br>
|
||||||
|
*
|
||||||
|
* @author IMS
|
||||||
|
* @author James Seibel
|
||||||
|
* @since API 3.0.0
|
||||||
|
* @version 2024-7-11
|
||||||
|
*/
|
||||||
|
public enum EDhApiBlockMaterial
|
||||||
|
{
|
||||||
|
UNKNOWN(0),
|
||||||
|
LEAVES(1),
|
||||||
|
STONE(2),
|
||||||
|
WOOD(3),
|
||||||
|
METAL(4),
|
||||||
|
DIRT(5),
|
||||||
|
LAVA(6),
|
||||||
|
DEEPSLATE(7),
|
||||||
|
SNOW(8),
|
||||||
|
SAND(9),
|
||||||
|
TERRACOTTA(10),
|
||||||
|
NETHER_STONE(11),
|
||||||
|
WATER(12),
|
||||||
|
GRASS(13),
|
||||||
|
/** shouldn't normally be needed, but just in case */
|
||||||
|
AIR(14),
|
||||||
|
ILLUMINATED(15); // Max value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public final byte index;
|
||||||
|
|
||||||
|
EDhApiBlockMaterial(int index) { this.index = (byte)index;}
|
||||||
|
|
||||||
|
public static EDhApiBlockMaterial getFromIndex(int index)
|
||||||
|
{
|
||||||
|
for(EDhApiBlockMaterial material : EDhApiBlockMaterial.values())
|
||||||
|
{
|
||||||
|
if (material.index == index)
|
||||||
|
{
|
||||||
|
return material;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return EDhApiBlockMaterial.UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
* @author Leetom
|
* @author Leetom
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiDebugRendering
|
public enum EDhApiDebugRendering
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiFogColorMode
|
public enum EDhApiFogColorMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
* FOG_DISABLED <br>
|
* FOG_DISABLED <br>
|
||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2022-6-2
|
* @version 2022-6-2
|
||||||
*/
|
*/
|
||||||
public enum EDhApiFogDrawMode
|
public enum EDhApiFogDrawMode
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
*
|
*
|
||||||
* @author Leetom
|
* @author Leetom
|
||||||
* @version 2022-6-30
|
* @version 2022-6-30
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiFogFalloff
|
public enum EDhApiFogFalloff
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
*
|
*
|
||||||
* @author Leetom
|
* @author Leetom
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiHeightFogMixMode
|
public enum EDhApiHeightFogMixMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
*
|
*
|
||||||
* @author Leetom
|
* @author Leetom
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiHeightFogMode
|
public enum EDhApiHeightFogMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-30
|
* @version 2024-1-30
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiRenderPass
|
public enum EDhApiRenderPass
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
* Debug <br>
|
* Debug <br>
|
||||||
* Disabled <br>
|
* Disabled <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiRendererMode
|
public enum EDhApiRendererMode
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package com.seibel.distanthorizons.api.enums.rendering;
|
|||||||
* FAKE, <br>
|
* FAKE, <br>
|
||||||
* COMPLETE, <br>
|
* COMPLETE, <br>
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @version 2024-4-6
|
* @version 2024-4-6
|
||||||
*/
|
*/
|
||||||
public enum EDhApiTransparency
|
public enum EDhApiTransparency
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import java.util.function.Consumer;
|
|||||||
*
|
*
|
||||||
* @author Builderb0y, James Seibel
|
* @author Builderb0y, James Seibel
|
||||||
* @version 2023-12-21
|
* @version 2023-12-21
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public enum EDhApiWorldGeneratorReturnType
|
public enum EDhApiWorldGeneratorReturnType
|
||||||
{
|
{
|
||||||
@@ -40,7 +40,7 @@ public enum EDhApiWorldGeneratorReturnType
|
|||||||
* {@link IDhApiWorldGenerator#generateChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)}
|
* {@link IDhApiWorldGenerator#generateChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)}
|
||||||
* will be used when generating terrain.
|
* will be used when generating terrain.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
VANILLA_CHUNKS,
|
VANILLA_CHUNKS,
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public enum EDhApiWorldGeneratorReturnType
|
|||||||
* {@link IDhApiWorldGenerator#generateApiChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)}
|
* {@link IDhApiWorldGenerator#generateApiChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)}
|
||||||
* will be used when generating terrain.
|
* will be used when generating terrain.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
API_CHUNKS;
|
API_CHUNKS;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package com.seibel.distanthorizons.api.interfaces.block;
|
package com.seibel.distanthorizons.api.interfaces.block;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.enums.rendering.EDhApiBlockMaterial;
|
||||||
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,12 +31,25 @@ import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
|||||||
*/
|
*/
|
||||||
public interface IDhApiBlockStateWrapper extends IDhApiUnsafeWrapper
|
public interface IDhApiBlockStateWrapper extends IDhApiUnsafeWrapper
|
||||||
{
|
{
|
||||||
|
/** @since API 1.0.0 */
|
||||||
boolean isAir();
|
boolean isAir();
|
||||||
|
|
||||||
|
/** @since API 1.0.0 */
|
||||||
boolean isSolid();
|
boolean isSolid();
|
||||||
|
/** @since API 1.0.0 */
|
||||||
boolean isLiquid();
|
boolean isLiquid();
|
||||||
|
|
||||||
// TODO:
|
/**
|
||||||
// boolean hasNoCollision();
|
* Returns the full serialized form of the given block
|
||||||
// boolean noFaceIsFullFace();
|
* as defined by DH's serialization methods.
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
String getSerialString();
|
||||||
|
/**
|
||||||
|
* Returns the byte value representing the {@link EDhApiBlockMaterial} enum.
|
||||||
|
* @see EDhApiBlockMaterial
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
byte getMaterialId();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public interface IDhApiConfig
|
|||||||
IDhApiWorldGenerationConfig worldGenerator();
|
IDhApiWorldGenerationConfig worldGenerator();
|
||||||
IDhApiMultiplayerConfig multiplayer();
|
IDhApiMultiplayerConfig multiplayer();
|
||||||
IDhApiMultiThreadingConfig multiThreading();
|
IDhApiMultiThreadingConfig multiThreading();
|
||||||
IDhApiGpuBuffersConfig gpuBuffers();
|
|
||||||
// note: DON'T add the Auto Updater to this API. We only want the user's to have the ability to control when things are downloaded to their machines.
|
// note: DON'T add the Auto Updater to this API. We only want the user's to have the ability to control when things are downloaded to their machines.
|
||||||
//IDhApiLoggingConfig logging(); // TODO implement
|
//IDhApiLoggingConfig logging(); // TODO implement
|
||||||
IDhApiDebuggingConfig debugging();
|
IDhApiDebuggingConfig debugging();
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public interface IDhApiConfigValue<T>
|
|||||||
* Returns the value of the config if it was set by the API.
|
* Returns the value of the config if it was set by the API.
|
||||||
* Returns null if the config hasn't been set by the API.
|
* Returns null if the config hasn't been set by the API.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
T getApiValue();
|
T getApiValue();
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ public interface IDhApiConfigValue<T>
|
|||||||
* use the value set in the config menu.
|
* use the value set in the config menu.
|
||||||
*
|
*
|
||||||
* @return true if the value was set, false otherwise.
|
* @return true if the value was set, false otherwise.
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
boolean clearValue();
|
boolean clearValue();
|
||||||
|
|
||||||
|
|||||||
@@ -19,30 +19,28 @@
|
|||||||
|
|
||||||
package com.seibel.distanthorizons.api.interfaces.config.client;
|
package com.seibel.distanthorizons.api.interfaces.config.client;
|
||||||
|
|
||||||
import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod;
|
|
||||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Distant Horizons' OpenGL buffer configuration.
|
* Distant Horizons' generic rendering configuration. <br><br>
|
||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2023-6-14
|
* @version 2024-7-11
|
||||||
* @since API 1.0.0
|
* @since API 3.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiGpuBuffersConfig extends IDhApiConfigGroup
|
public interface IDhApiGenericRenderingConfig extends IDhApiConfigGroup
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
/** Defines how geometry data is uploaded to the GPU. */
|
* If enabled DH will render generic objects into its terrain pass. <br>
|
||||||
IDhApiConfigValue<EDhApiGpuUploadMethod> gpuUploadMethod();
|
* This includes: clouds, beacons, and API added objects.
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines how long we should wait after uploading one
|
|
||||||
* Megabyte of geometry data to the GPU before uploading
|
|
||||||
* the next Megabyte of data. <br>
|
|
||||||
* This can be set to a non-zero number to reduce stuttering caused by
|
|
||||||
* uploading buffers to the GPU.
|
|
||||||
*/
|
*/
|
||||||
IDhApiConfigValue<Integer> gpuUploadPerMegabyteInMilliseconds();
|
IDhApiConfigValue<Boolean> renderingEnabled();
|
||||||
|
|
||||||
|
/** If enabled DH will render beacon beams. */
|
||||||
|
IDhApiConfigValue<Boolean> beaconRenderingEnabled();
|
||||||
|
|
||||||
|
/** If enabled DH will render clouds. */
|
||||||
|
IDhApiConfigValue<Boolean> cloudRenderingEnabled();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
|||||||
IDhApiFogConfig fog();
|
IDhApiFogConfig fog();
|
||||||
IDhApiAmbientOcclusionConfig ambientOcclusion();
|
IDhApiAmbientOcclusionConfig ambientOcclusion();
|
||||||
IDhApiNoiseTextureConfig noiseTexture();
|
IDhApiNoiseTextureConfig noiseTexture();
|
||||||
|
IDhApiGenericRenderingConfig genericRendering();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -121,7 +122,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
|||||||
* Setting this to 0 will reduce/prevent holes in the world due to clipping to close to the camera
|
* Setting this to 0 will reduce/prevent holes in the world due to clipping to close to the camera
|
||||||
* but may cause overdraw issues with transparent or non-full blocks.
|
* but may cause overdraw issues with transparent or non-full blocks.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
IDhApiConfigValue<Double> overdrawPreventionRadius();
|
IDhApiConfigValue<Double> overdrawPreventionRadius();
|
||||||
|
|
||||||
@@ -158,7 +159,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
|||||||
/**
|
/**
|
||||||
* Determines how LODs should be shaded.
|
* Determines how LODs should be shaded.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
IDhApiConfigValue<EDhApiLodShading> lodShading();
|
IDhApiConfigValue<EDhApiLodShading> lodShading();
|
||||||
|
|
||||||
@@ -171,7 +172,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
|||||||
* start/stop rendering incorrectly based on the camera direction,
|
* start/stop rendering incorrectly based on the camera direction,
|
||||||
* but will also reduce FPS.
|
* but will also reduce FPS.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @see IDhApiGraphicsConfig#disableShadowFrustumCulling()
|
* @see IDhApiGraphicsConfig#disableShadowFrustumCulling()
|
||||||
*/
|
*/
|
||||||
IDhApiConfigValue<Boolean> disableFrustumCulling();
|
IDhApiConfigValue<Boolean> disableFrustumCulling();
|
||||||
@@ -183,7 +184,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
|
|||||||
*
|
*
|
||||||
* Disable this if shadows render incorrectly.
|
* Disable this if shadows render incorrectly.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
* @see IDhApiGraphicsConfig#disableFrustumCulling()
|
* @see IDhApiGraphicsConfig#disableFrustumCulling()
|
||||||
*/
|
*/
|
||||||
IDhApiConfigValue<Boolean> disableShadowFrustumCulling();
|
IDhApiConfigValue<Boolean> disableShadowFrustumCulling();
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.seibel.distanthorizons.api.interfaces.data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Can be used to drastically speed up repeat read operations in {@link IDhApiTerrainDataRepo}.
|
||||||
|
*
|
||||||
|
* @see IDhApiTerrainDataRepo
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-14
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public interface IDhApiTerrainDataCache
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Removes any data that's currently stored in this cache.
|
||||||
|
* This cane be done to free up memory or invalidate
|
||||||
|
* the cache so fresh data can be pulled in.
|
||||||
|
*/
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,6 +29,8 @@ import com.seibel.distanthorizons.api.objects.data.DhApiTerrainDataPoint;
|
|||||||
/**
|
/**
|
||||||
* Used to interface with Distant Horizons' terrain data.
|
* Used to interface with Distant Horizons' terrain data.
|
||||||
*
|
*
|
||||||
|
* @see IDhApiTerrainDataCache
|
||||||
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2023-6-22
|
* @version 2023-6-22
|
||||||
* @since API 1.0.0
|
* @since API 1.0.0
|
||||||
@@ -40,29 +42,50 @@ public interface IDhApiTerrainDataRepo
|
|||||||
// getters //
|
// getters //
|
||||||
//=========//
|
//=========//
|
||||||
|
|
||||||
/** Returns the terrain datapoint at the given block position, at/or containing the given Y position. */
|
/** @see IDhApiTerrainDataRepo#getSingleDataPointAtBlockPos(IDhApiLevelWrapper, int, int, int, IDhApiTerrainDataCache) */
|
||||||
DhApiResult<DhApiTerrainDataPoint> getSingleDataPointAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosY, int blockPosZ);
|
default DhApiResult<DhApiTerrainDataPoint> getSingleDataPointAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosY, int blockPosZ) { return this.getSingleDataPointAtBlockPos(levelWrapper, blockPosX, blockPosY, blockPosZ, null); }
|
||||||
/** Returns every datapoint in the column located at the given block X and Z position top to bottom. */
|
/**
|
||||||
DhApiResult<DhApiTerrainDataPoint[]> getColumnDataAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosZ);
|
* Returns the terrain datapoint at the given block position, at/or containing the given Y position.
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
DhApiResult<DhApiTerrainDataPoint> getSingleDataPointAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosY, int blockPosZ, IDhApiTerrainDataCache dataCache);
|
||||||
|
|
||||||
|
/** @see IDhApiTerrainDataRepo#getColumnDataAtBlockPos(IDhApiLevelWrapper, int, int, IDhApiTerrainDataCache) */
|
||||||
|
default DhApiResult<DhApiTerrainDataPoint[]> getColumnDataAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosZ) { return this.getColumnDataAtBlockPos(levelWrapper, blockPosX, blockPosZ, null); }
|
||||||
|
/**
|
||||||
|
* Returns every datapoint in the column located at the given block X and Z position top to bottom.
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
DhApiResult<DhApiTerrainDataPoint[]> getColumnDataAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosZ, IDhApiTerrainDataCache dataCache);
|
||||||
|
|
||||||
|
/** @see IDhApiTerrainDataRepo#getAllTerrainDataAtChunkPos(IDhApiLevelWrapper, int, int, IDhApiTerrainDataCache) */
|
||||||
|
default DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtChunkPos(IDhApiLevelWrapper levelWrapper, int chunkPosX, int chunkPosZ) { return this.getAllTerrainDataAtChunkPos(levelWrapper, chunkPosX, chunkPosZ, null); }
|
||||||
/**
|
/**
|
||||||
* Returns every datapoint in the given chunk's X and Z position. <br><br>
|
* Returns every datapoint in the given chunk's X and Z position. <br><br>
|
||||||
*
|
*
|
||||||
* The returned array is ordered: [relativeBlockX][relativeBlockZ][columnIndex] <br>
|
* The returned array is ordered: [relativeBlockX][relativeBlockZ][columnIndex] <br>
|
||||||
* RelativeBlockX/Z are relative to the block position closest to negative infinity in the chunk's position. <br>
|
* RelativeBlockX/Z are relative to the block position closest to negative infinity in the chunk's position. <br>
|
||||||
* The column data is ordered from top to bottom. Note: each column may have a different number of values. <br>
|
* The column data is ordered from top to bottom. Note: each column may have a different number of values. <br>
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
*/
|
*/
|
||||||
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtChunkPos(IDhApiLevelWrapper levelWrapper, int chunkPosX, int chunkPosZ);
|
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtChunkPos(IDhApiLevelWrapper levelWrapper, int chunkPosX, int chunkPosZ, IDhApiTerrainDataCache dataCache);
|
||||||
|
|
||||||
|
/** @see IDhApiTerrainDataRepo#getAllTerrainDataAtRegionPos(IDhApiLevelWrapper, int, int, IDhApiTerrainDataCache) */
|
||||||
|
default DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtRegionPos(IDhApiLevelWrapper levelWrapper, int regionPosX, int regionPosZ) { return this.getAllTerrainDataAtRegionPos(levelWrapper, regionPosX, regionPosZ, null); }
|
||||||
/**
|
/**
|
||||||
* Returns every datapoint in the given region's X and Z position. <br><br>
|
* Returns every datapoint in the given region's X and Z position. <br><br>
|
||||||
*
|
*
|
||||||
* The returned array is ordered: [relativeBlockX][relativeBlockZ][columnIndex] <br>
|
* The returned array is ordered: [relativeBlockX][relativeBlockZ][columnIndex] <br>
|
||||||
* RelativeBlockX/Z are relative to the block position closest to negative infinity in the region's position. <br>
|
* RelativeBlockX/Z are relative to the block position closest to negative infinity in the region's position. <br>
|
||||||
* The column data is ordered from top to bottom. Note: each column may have a different number of values. <br>
|
* The column data is ordered from top to bottom. Note: each column may have a different number of values. <br>
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
*/
|
*/
|
||||||
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtRegionPos(IDhApiLevelWrapper levelWrapper, int regionPosX, int regionPosZ);
|
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtRegionPos(IDhApiLevelWrapper levelWrapper, int regionPosX, int regionPosZ, IDhApiTerrainDataCache dataCache);
|
||||||
|
|
||||||
|
/** @see IDhApiTerrainDataRepo#getAllTerrainDataAtDetailLevelAndPos(IDhApiLevelWrapper, byte, int, int, IDhApiTerrainDataCache) */
|
||||||
|
default DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtRegionPos(IDhApiLevelWrapper levelWrapper, byte detailLevel, int posX, int posZ) { return this.getAllTerrainDataAtDetailLevelAndPos(levelWrapper, detailLevel, posX, posZ, null); }
|
||||||
/**
|
/**
|
||||||
* Returns every datapoint in the column located at the given detail level and X/Z position. <br>
|
* Returns every datapoint in the column located at the given detail level and X/Z position. <br>
|
||||||
* This can be used to return terrain data for non-standard sizes (IE 2x2 blocks or 2x2 chunks).
|
* This can be used to return terrain data for non-standard sizes (IE 2x2 blocks or 2x2 chunks).
|
||||||
@@ -71,20 +94,42 @@ public interface IDhApiTerrainDataRepo
|
|||||||
* Every increase doubles the width of the returned area. <br>
|
* Every increase doubles the width of the returned area. <br>
|
||||||
* Example values: 0 = block, 1 = 2x2 blocks, 2 = 4x4 blocks, ... 4 = chunk (16x16 blocks), ... 9 = region (512x512 blocks) <br>
|
* Example values: 0 = block, 1 = 2x2 blocks, 2 = 4x4 blocks, ... 4 = chunk (16x16 blocks), ... 9 = region (512x512 blocks) <br>
|
||||||
* See {@link EDhApiDetailLevel} for more information.
|
* See {@link EDhApiDetailLevel} for more information.
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
*/
|
*/
|
||||||
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtDetailLevelAndPos(IDhApiLevelWrapper levelWrapper, byte detailLevel, int posX, int posZ);
|
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtDetailLevelAndPos(IDhApiLevelWrapper levelWrapper, byte detailLevel, int posX, int posZ, IDhApiTerrainDataCache dataCache);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @see IDhApiTerrainDataRepo#raycast(IDhApiLevelWrapper, double, double, double, float, float, float, int, IDhApiTerrainDataCache) */
|
||||||
|
default DhApiResult<DhApiRaycastResult> raycast(
|
||||||
|
IDhApiLevelWrapper levelWrapper,
|
||||||
|
double rayOriginX, double rayOriginY, double rayOriginZ,
|
||||||
|
float rayDirectionX, float rayDirectionY, float rayDirectionZ,
|
||||||
|
int maxRayBlockLength)
|
||||||
|
{
|
||||||
|
return this.raycast(
|
||||||
|
levelWrapper,
|
||||||
|
rayOriginX, rayOriginY, rayOriginZ,
|
||||||
|
rayDirectionX, rayDirectionY, rayDirectionZ,
|
||||||
|
maxRayBlockLength,
|
||||||
|
null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the datapoint and position of the LOD
|
* Returns the datapoint and position of the LOD
|
||||||
* at the end of the given ray. <br><br>
|
* at the end of the given ray. <br><br>
|
||||||
*
|
*
|
||||||
* Will return "success" with a null datapoint if the ray reaches the max length without finding any data.
|
* Will return "success" with a null datapoint if the ray reaches the max length without finding any data.
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
*/
|
*/
|
||||||
DhApiResult<DhApiRaycastResult> raycast(
|
DhApiResult<DhApiRaycastResult> raycast(
|
||||||
IDhApiLevelWrapper levelWrapper,
|
IDhApiLevelWrapper levelWrapper,
|
||||||
double rayOriginX, double rayOriginY, double rayOriginZ,
|
double rayOriginX, double rayOriginY, double rayOriginZ,
|
||||||
float rayDirectionX, float rayDirectionY, float rayDirectionZ,
|
float rayDirectionX, float rayDirectionY, float rayDirectionZ,
|
||||||
int maxRayBlockLength);
|
int maxRayBlockLength,
|
||||||
|
IDhApiTerrainDataCache dataCache);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -98,15 +143,27 @@ public interface IDhApiTerrainDataRepo
|
|||||||
* Notes: <br>
|
* Notes: <br>
|
||||||
* - Only works if the given {@link IDhApiLevelWrapper} points to a loaded level. <br>
|
* - Only works if the given {@link IDhApiLevelWrapper} points to a loaded level. <br>
|
||||||
* - If the player travels to this chunk, or the chunk is updated in some other way; your data will be replaced
|
* - If the player travels to this chunk, or the chunk is updated in some other way; your data will be replaced
|
||||||
* by whatever the current chunk is. <br>
|
* by whatever the current chunk is. <br>
|
||||||
* - This method may not update the LOD data immediately. Any other chunks have
|
* - This method may not update the LOD data immediately. Any other chunks that have
|
||||||
* been queued to update, they will be handled first.
|
* been queued to update will be handled first.
|
||||||
*
|
*
|
||||||
* @param levelWrapper the level wrapper that the chunk should be saved to.
|
* @param levelWrapper the level wrapper that the chunk should be saved to.
|
||||||
* @param chunkObjectArray see {@link IDhApiWorldGenerator#generateChunks} for what objects are expected.
|
* @param chunkObjectArray see {@link IDhApiWorldGenerator#generateChunks} for what objects are expected.
|
||||||
* @throws ClassCastException if chunkObjectArray doesn't contain the right objects.
|
* @throws ClassCastException if chunkObjectArray doesn't contain the right objects.
|
||||||
* The exception will contain the expected object(s).
|
* The exception will contain the expected object(s).
|
||||||
*/
|
*/
|
||||||
public DhApiResult<Void> overwriteChunkDataAsync(IDhApiLevelWrapper levelWrapper, Object[] chunkObjectArray) throws ClassCastException;
|
DhApiResult<Void> overwriteChunkDataAsync(IDhApiLevelWrapper levelWrapper, Object[] chunkObjectArray) throws ClassCastException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//=========//
|
||||||
|
// helpers //
|
||||||
|
//=========//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a {@link IDhApiTerrainDataCache} backed by {@link java.lang.ref.SoftReference}'s.
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
IDhApiTerrainDataCache getSoftCache();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import java.io.IOException;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2023-12-16
|
* @version 2023-12-16
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiWrapperFactory
|
public interface IDhApiWrapperFactory
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ public interface IDhApiWrapperFactory
|
|||||||
* @throws ClassCastException if any of the given parameters is of the wrong type.
|
* @throws ClassCastException if any of the given parameters is of the wrong type.
|
||||||
* If thrown the error message will contain the list of expected object types in order.
|
* If thrown the error message will contain the list of expected object types in order.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
IDhApiBiomeWrapper getBiomeWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException;
|
IDhApiBiomeWrapper getBiomeWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException;
|
||||||
|
|
||||||
@@ -67,23 +67,46 @@ public interface IDhApiWrapperFactory
|
|||||||
* @throws ClassCastException if any of the given parameters is of the wrong type.
|
* @throws ClassCastException if any of the given parameters is of the wrong type.
|
||||||
* If thrown the error message will contain the list of expected object types in order.
|
* If thrown the error message will contain the list of expected object types in order.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
IDhApiBlockStateWrapper getBlockStateWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException;
|
IDhApiBlockStateWrapper getBlockStateWrapper(Object[] objectArray, IDhApiLevelWrapper levelWrapper) throws ClassCastException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link IDhApiBlockStateWrapper} representing air.
|
* Returns the {@link IDhApiBlockStateWrapper} representing air.
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
IDhApiBlockStateWrapper getAirBlockStateWrapper();
|
IDhApiBlockStateWrapper getAirBlockStateWrapper();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///**
|
/**
|
||||||
// * Specifically designed to be used with the API.
|
* Constructs a {@link IDhApiBiomeWrapper} for use by other DhApi methods.
|
||||||
// *
|
*
|
||||||
// * @throws ClassCastException with instructions on expected objects if the object couldn't be cast
|
* @param resourceLocationString example: "minecraft:plains"
|
||||||
// */
|
*
|
||||||
//IChunkWrapper createChunkWrapper(Object[] objectArray) throws ClassCastException;
|
* @param levelWrapper Expects a {@link IDhApiLevelWrapper} returned by one of DH's {@link DhApi.Delayed#worldProxy} methods. <br>
|
||||||
|
* A custom implementation of {@link IDhApiLevelWrapper} will not be accepted.
|
||||||
|
*
|
||||||
|
* @throws IOException if the resourceLocationString wasn't able to be parsed or converted into a valid {@link IDhApiBiomeWrapper}
|
||||||
|
* @throws ClassCastException if the wrong levelWrapper type was given
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
IDhApiBiomeWrapper getBiomeWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) throws IOException, ClassCastException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a {@link IDhApiBlockStateWrapper} for use by other DhApi methods.
|
||||||
|
* This returns the default blockstate for the given resource location.
|
||||||
|
*
|
||||||
|
* @param resourceLocationString examples: "minecraft:bedrock", "minecraft:stone", "minecraft:grass_block"
|
||||||
|
* @param levelWrapper Expects a {@link IDhApiBlockStateWrapper} returned by one of DH's {@link DhApi.Delayed#worldProxy} methods. <br>
|
||||||
|
* A custom implementation of {@link IDhApiBlockStateWrapper} will not be accepted.
|
||||||
|
*
|
||||||
|
* @throws IOException if the resourceLocationString wasn't able to be parsed or converted into a valid {@link IDhApiBlockStateWrapper}
|
||||||
|
* @throws ClassCastException if the wrong levelWrapper type was given
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
IDhApiBlockStateWrapper getDefaultBlockStateWrapper(String resourceLocationString, IDhApiLevelWrapper levelWrapper) throws IOException, ClassCastException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
|||||||
|
|
||||||
import com.seibel.distanthorizons.api.enums.EDhApiDetailLevel;
|
import com.seibel.distanthorizons.api.enums.EDhApiDetailLevel;
|
||||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f;
|
import com.seibel.distanthorizons.api.objects.math.DhApiMat4f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to determine if a LOD should be rendered or is outside the
|
* Used to determine if a LOD should be rendered or is outside the
|
||||||
@@ -29,7 +29,7 @@ import com.seibel.distanthorizons.coreapi.util.math.Mat4f;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-2-6
|
* @version 2024-2-6
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiCullingFrustum extends IDhApiOverrideable
|
public interface IDhApiCullingFrustum extends IDhApiOverrideable
|
||||||
{
|
{
|
||||||
@@ -41,7 +41,7 @@ public interface IDhApiCullingFrustum extends IDhApiOverrideable
|
|||||||
* @param worldMaxBlockY the highest block position this level allows.
|
* @param worldMaxBlockY the highest block position this level allows.
|
||||||
* @param worldViewProjection the projection matrix used in this render pass.
|
* @param worldViewProjection the projection matrix used in this render pass.
|
||||||
*/
|
*/
|
||||||
void update(int worldMinBlockY, int worldMaxBlockY, Mat4f worldViewProjection);
|
void update(int worldMinBlockY, int worldMaxBlockY, DhApiMat4f worldViewProjection);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns true if the LOD bounds intersect this frustum
|
* returns true if the LOD bounds intersect this frustum
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
|||||||
/**
|
/**
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-24
|
* @version 2024-1-24
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiFramebuffer extends IDhApiOverrideable
|
public interface IDhApiFramebuffer extends IDhApiOverrideable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Distant Horizons mod
|
||||||
|
* licensed under the GNU LGPL v3 License.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020-2023 James Seibel
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderableBoxGroup;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3d;
|
||||||
|
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||||
|
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBoxGroupShading;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see IDhApiShaderProgram
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-11
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public interface IDhApiGenericObjectShaderProgram extends IDhApiOverrideable
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this method is called that means this program has the highest priority as defined by {@link IDhApiOverrideable#getPriority()}
|
||||||
|
* and gets to decide if it wants to be used to render this frame or not. <br><br>
|
||||||
|
*
|
||||||
|
* If this method returns true then this program will be used for this frame. <br>
|
||||||
|
* If this returns false then the default DH {@link IDhApiGenericObjectShaderProgram} will be used instead.
|
||||||
|
*/
|
||||||
|
boolean overrideThisFrame();
|
||||||
|
|
||||||
|
/** @return the OpenGL ID for this shader program */
|
||||||
|
int getId();
|
||||||
|
|
||||||
|
/** Free any OpenGL objects owned by this program. */
|
||||||
|
void free();
|
||||||
|
|
||||||
|
/** Runs any necessary binding this program needs so rendering can be done. */
|
||||||
|
void bind(DhApiRenderParam renderEventParam);
|
||||||
|
/** Runs any necessary unbinding this program needs so rendering can be done by another program. */
|
||||||
|
void unbind();
|
||||||
|
|
||||||
|
/** Binds the given Vertex Buffer Object to this shader program for rendering. */
|
||||||
|
void bindVertexBuffer(int vbo);
|
||||||
|
|
||||||
|
|
||||||
|
/** sets up the necessary uniforms for rendering */
|
||||||
|
void fillIndirectUniformData(
|
||||||
|
DhApiRenderParam renderParameters,
|
||||||
|
DhApiRenderableBoxGroupShading shading, IDhApiRenderableBoxGroup boxGroup,
|
||||||
|
DhApiVec3d camPos);
|
||||||
|
|
||||||
|
/** sets up the necessary uniforms for rendering */
|
||||||
|
void fillSharedDirectUniformData(
|
||||||
|
DhApiRenderParam renderParameters,
|
||||||
|
DhApiRenderableBoxGroupShading shading, IDhApiRenderableBoxGroup boxGroup,
|
||||||
|
DhApiVec3d camPos);
|
||||||
|
void fillDirectUniformData(
|
||||||
|
DhApiRenderParam renderParameters,
|
||||||
|
IDhApiRenderableBoxGroup boxGroup, DhApiRenderableBox box,
|
||||||
|
DhApiVec3d camPos);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -21,13 +21,14 @@ package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
|||||||
|
|
||||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||||
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f;
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||||
import com.seibel.distanthorizons.coreapi.util.math.Vec3f;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @see IDhApiGenericObjectShaderProgram
|
||||||
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-24
|
* @version 2024-1-24
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiShaderProgram extends IDhApiOverrideable
|
public interface IDhApiShaderProgram extends IDhApiOverrideable
|
||||||
{
|
{
|
||||||
@@ -57,7 +58,7 @@ public interface IDhApiShaderProgram extends IDhApiOverrideable
|
|||||||
void fillUniformData(DhApiRenderParam renderParameters);
|
void fillUniformData(DhApiRenderParam renderParameters);
|
||||||
|
|
||||||
/** sets the vec3 that all DH verticies should be offset by when rendering */
|
/** sets the vec3 that all DH verticies should be offset by when rendering */
|
||||||
void setModelOffsetPos(Vec3f modelPos);
|
void setModelOffsetPos(DhApiVec3f modelPos);
|
||||||
|
|
||||||
/** Binds the given Vertex Buffer Object to this shader program for rendering. */
|
/** Binds the given Vertex Buffer Object to this shader program for rendering. */
|
||||||
void bindVertexBuffer(int vbo);
|
void bindVertexBuffer(int vbo);
|
||||||
|
|||||||
@@ -19,10 +19,6 @@
|
|||||||
|
|
||||||
package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
||||||
|
|
||||||
import com.seibel.distanthorizons.api.enums.EDhApiDetailLevel;
|
|
||||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
|
||||||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The culling frustum used during Distant Horizons' shadow pass
|
* The culling frustum used during Distant Horizons' shadow pass
|
||||||
* if another mod has enabled Distant Horizons' shadow
|
* if another mod has enabled Distant Horizons' shadow
|
||||||
@@ -35,7 +31,7 @@ import com.seibel.distanthorizons.coreapi.util.math.Mat4f;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-2-10
|
* @version 2024-2-10
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiShadowCullingFrustum extends IDhApiCullingFrustum
|
public interface IDhApiShadowCullingFrustum extends IDhApiCullingFrustum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ package com.seibel.distanthorizons.api.interfaces.override.worldGenerator;
|
|||||||
import com.seibel.distanthorizons.api.enums.EDhApiDetailLevel;
|
import com.seibel.distanthorizons.api.enums.EDhApiDetailLevel;
|
||||||
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
|
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
|
||||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||||
|
import com.seibel.distanthorizons.api.objects.data.DhApiChunk;
|
||||||
|
import com.seibel.distanthorizons.api.objects.data.DhApiTerrainDataPoint;
|
||||||
import com.seibel.distanthorizons.coreapi.util.BitShiftUtil;
|
import com.seibel.distanthorizons.coreapi.util.BitShiftUtil;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
@@ -77,13 +79,41 @@ public abstract class AbstractDhApiChunkWorldGenerator implements Closeable, IDh
|
|||||||
}, worldGeneratorThreadPool);
|
}, worldGeneratorThreadPool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final CompletableFuture<Void> generateApiChunks(
|
||||||
|
int chunkPosMinX,
|
||||||
|
int chunkPosMinZ,
|
||||||
|
byte granularity,
|
||||||
|
byte targetDataDetail,
|
||||||
|
EDhApiDistantGeneratorMode generatorMode,
|
||||||
|
ExecutorService worldGeneratorThreadPool,
|
||||||
|
Consumer<DhApiChunk> resultConsumer
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return CompletableFuture.runAsync(() ->
|
||||||
|
{
|
||||||
|
// TODO what does this mean?
|
||||||
|
int genChunkWidth = BitShiftUtil.powerOfTwo(granularity - 4);
|
||||||
|
|
||||||
|
for (int chunkX = chunkPosMinX; chunkX < chunkPosMinX + genChunkWidth; chunkX++)
|
||||||
|
{
|
||||||
|
for (int chunkZ = chunkPosMinZ; chunkZ < chunkPosMinZ + genChunkWidth; chunkZ++)
|
||||||
|
{
|
||||||
|
DhApiChunk apiChunk = this.generateApiChunk(chunkX, chunkZ, generatorMode);
|
||||||
|
resultConsumer.accept(apiChunk);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, worldGeneratorThreadPool);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called to generate terrain over a given area
|
* This method is called to generate terrain over a given area
|
||||||
* from a thread defined by Distant Horizons. <br><br>
|
* from a thread defined by Distant Horizons. <br><br>
|
||||||
*
|
*
|
||||||
* @param chunkPosX the chunk X position in the level (not to be confused with the chunk's BlockPos in the level)
|
* @param chunkPosX the chunk X position in the level (not to be confused with the chunk's BlockPos in the level)
|
||||||
* @param chunkPosZ the chunk Z position in the level (not to be confused with the chunk's BlockPos in the level)
|
* @param chunkPosZ the chunk Z position in the level (not to be confused with the chunk's BlockPos in the level)
|
||||||
* @param generatorMode how far into the world gen pipeline this method run. See {@link EDhApiDistantGeneratorMode} for additional documentation.
|
* @param generatorMode how far into the world gen pipeline this method should run. See {@link EDhApiDistantGeneratorMode} for additional documentation.
|
||||||
*
|
*
|
||||||
* @return See {@link IDhApiWorldGenerator#generateChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer) IDhApiWorldGenerator.generateChunks}
|
* @return See {@link IDhApiWorldGenerator#generateChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer) IDhApiWorldGenerator.generateChunks}
|
||||||
* for the list of Object's this method should return along with additional documentation.
|
* for the list of Object's this method should return along with additional documentation.
|
||||||
@@ -92,4 +122,21 @@ public abstract class AbstractDhApiChunkWorldGenerator implements Closeable, IDh
|
|||||||
*/
|
*/
|
||||||
public abstract Object[] generateChunk(int chunkPosX, int chunkPosZ, EDhApiDistantGeneratorMode generatorMode);
|
public abstract Object[] generateChunk(int chunkPosX, int chunkPosZ, EDhApiDistantGeneratorMode generatorMode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called to generate terrain over a given area
|
||||||
|
* from a thread defined by Distant Horizons. <br><br>
|
||||||
|
*
|
||||||
|
* @param chunkPosX the chunk X position in the level (not to be confused with the chunk's BlockPos in the level)
|
||||||
|
* @param chunkPosZ the chunk Z position in the level (not to be confused with the chunk's BlockPos in the level)
|
||||||
|
* @param generatorMode how far into the world gen pipeline this method should run. See {@link EDhApiDistantGeneratorMode} for additional documentation.
|
||||||
|
*
|
||||||
|
* @return A {@link DhApiChunk} with the generated {@link DhApiTerrainDataPoint} including air blocks.
|
||||||
|
* Note: if air blocks aren't included with the proper lighting, lower detail levels will appear as black/unlit.
|
||||||
|
*
|
||||||
|
* @see IDhApiWorldGenerator#generateApiChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public abstract DhApiChunk generateApiChunk(int chunkPosX, int chunkPosZ, EDhApiDistantGeneratorMode generatorMode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,11 +90,29 @@ public interface IDhApiWorldGenerator extends Closeable, IDhApiOverrideable
|
|||||||
*/
|
*/
|
||||||
default byte getMaxGenerationGranularity() { return (byte) (EDhApiDetailLevel.CHUNK.detailLevel + 2); }
|
default byte getMaxGenerationGranularity() { return (byte) (EDhApiDetailLevel.CHUNK.detailLevel + 2); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if the generator is unable to accept new generation requests.
|
* Starting in API 3.0.0 DH now handles future queuing/management internally. <br><br>
|
||||||
|
*
|
||||||
|
* Previous description: <br>
|
||||||
|
* true if the generator is unable to accept new generation requests. <br>
|
||||||
|
*
|
||||||
* @since API 1.0.0
|
* @since API 1.0.0
|
||||||
|
* @deprecated API 3.0.0
|
||||||
*/
|
*/
|
||||||
boolean isBusy();
|
@Deprecated
|
||||||
|
default boolean isBusy() { return false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only used if {@link #getReturnType()} returns {@link EDhApiWorldGeneratorReturnType#API_CHUNKS}. <Br>
|
||||||
|
* If true DH will run additional validation on the {@link DhApiChunk}'s returned. <Br>
|
||||||
|
* This should be disabled during release but should be enabled during development to help spot issues with your data format.
|
||||||
|
*
|
||||||
|
* @see #getReturnType()
|
||||||
|
* @see DhApiChunk
|
||||||
|
* @see EDhApiWorldGeneratorReturnType#API_CHUNKS
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
default boolean runApiChunkValidation() { return true; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -154,6 +172,7 @@ public interface IDhApiWorldGenerator extends Closeable, IDhApiOverrideable
|
|||||||
*
|
*
|
||||||
* After the {@link DhApiChunk} has been generated, it should be passed into the
|
* After the {@link DhApiChunk} has been generated, it should be passed into the
|
||||||
* resultConsumer's {@link Consumer#accept(Object)} method.
|
* resultConsumer's {@link Consumer#accept(Object)} method.
|
||||||
|
* Note: if air blocks aren't included in the with the {@link DhApiChunk} with proper lighting, lower detail levels will appear as black/unlit.
|
||||||
*
|
*
|
||||||
* @implNote the default implementation of this method throws an {@link UnsupportedOperationException},
|
* @implNote the default implementation of this method throws an {@link UnsupportedOperationException},
|
||||||
* and must be overridden when {@link #getReturnType()} returns {@link EDhApiWorldGeneratorReturnType#API_CHUNKS}.
|
* and must be overridden when {@link #getReturnType()} returns {@link EDhApiWorldGeneratorReturnType#API_CHUNKS}.
|
||||||
@@ -168,7 +187,7 @@ public interface IDhApiWorldGenerator extends Closeable, IDhApiOverrideable
|
|||||||
*
|
*
|
||||||
* @return a future that should run on the worldGeneratorThreadPool and complete once the given generation task has completed.
|
* @return a future that should run on the worldGeneratorThreadPool and complete once the given generation task has completed.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
default CompletableFuture<Void> generateApiChunks(
|
default CompletableFuture<Void> generateApiChunks(
|
||||||
int chunkPosMinX,
|
int chunkPosMinX,
|
||||||
@@ -189,7 +208,7 @@ public interface IDhApiWorldGenerator extends Closeable, IDhApiOverrideable
|
|||||||
* which means that {@link #generateChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)}
|
* which means that {@link #generateChunks(int, int, byte, byte, EDhApiDistantGeneratorMode, ExecutorService, Consumer)}
|
||||||
* will be invoked whenever Distant Horizons wants to generate terrain with this world generator.
|
* will be invoked whenever Distant Horizons wants to generate terrain with this world generator.
|
||||||
*
|
*
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
default EDhApiWorldGeneratorReturnType getReturnType() { return EDhApiWorldGeneratorReturnType.VANILLA_CHUNKS; }
|
default EDhApiWorldGeneratorReturnType getReturnType() { return EDhApiWorldGeneratorReturnType.VANILLA_CHUNKS; }
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.seibel.distanthorizons.api.interfaces.render;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3d;
|
||||||
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||||
|
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles creating
|
||||||
|
* {@link IDhApiRenderableBoxGroup} objects,
|
||||||
|
* which can be added via a {@link IDhApiCustomRenderRegister}.
|
||||||
|
*
|
||||||
|
* @see IDhApiCustomRenderRegister
|
||||||
|
* @see IDhApiRenderableBoxGroup
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-3
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public interface IDhApiCustomRenderObjectFactory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Creates a {@link IDhApiRenderableBoxGroup} from for the given {@link DhApiRenderableBox}
|
||||||
|
* where the box is positioned relative to the level's origin.
|
||||||
|
*
|
||||||
|
* @param resourceLocation A colon separated Resource Location string, similar to vanilla Minecraft, for example: "DistantHorizons:Clouds"
|
||||||
|
*
|
||||||
|
* @see DhApiRenderableBox
|
||||||
|
* @see IDhApiRenderableBoxGroup#getResourceLocationNamespace()
|
||||||
|
* @see IDhApiRenderableBoxGroup#getResourceLocationPath()
|
||||||
|
*
|
||||||
|
* @throws IllegalArgumentException if <code>resourceLocation</code> is null, isn't separated by a colon, or has multiple colons.
|
||||||
|
*/
|
||||||
|
IDhApiRenderableBoxGroup createForSingleBox(String resourceLocation, DhApiRenderableBox cube) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a {@link IDhApiRenderableBoxGroup} from the given list of {@link DhApiRenderableBox} where each
|
||||||
|
* one is positioned relative to given <code>originBlockPos</code>, which in turn is relative to the level's origin.
|
||||||
|
*
|
||||||
|
* @param resourceLocation A colon separated Resource Location string, similar to vanilla Minecraft, for example: "DistantHorizons:Clouds"
|
||||||
|
* @param originBlockPos The starting position for this {@link IDhApiRenderableBoxGroup}, can be changed during runtime.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @see DhApiRenderableBox
|
||||||
|
* @see IDhApiRenderableBoxGroup#getResourceLocationNamespace()
|
||||||
|
* @see IDhApiRenderableBoxGroup#getResourceLocationPath()
|
||||||
|
*
|
||||||
|
* @throws IllegalArgumentException if <code>resourceLocation</code> is null, isn't separated by a colon, or has multiple colons.
|
||||||
|
*/
|
||||||
|
IDhApiRenderableBoxGroup createRelativePositionedGroup(String resourceLocation, DhApiVec3d originBlockPos, List<DhApiRenderableBox> cubeList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a {@link IDhApiRenderableBoxGroup} from the given list of {@link DhApiRenderableBox} where each
|
||||||
|
* one is positioned relative to the level's origin.
|
||||||
|
*
|
||||||
|
* @param resourceLocation A colon separated Resource Location string, similar to vanilla Minecraft, for example: "DistantHorizons:Clouds"
|
||||||
|
*
|
||||||
|
* @see DhApiRenderableBox
|
||||||
|
* @see IDhApiRenderableBoxGroup#getResourceLocationNamespace()
|
||||||
|
* @see IDhApiRenderableBoxGroup#getResourceLocationPath()
|
||||||
|
*
|
||||||
|
* @throws IllegalArgumentException if <code>resourceLocation</code> is null, isn't separated by a colon, or has multiple colons.
|
||||||
|
*/
|
||||||
|
IDhApiRenderableBoxGroup createAbsolutePositionedGroup(String resourceLocation, List<DhApiRenderableBox> cubeList);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.seibel.distanthorizons.api.interfaces.render;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.DhApi;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.world.IDhApiLevelWrapper;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.world.IDhApiWorldProxy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles adding and removing
|
||||||
|
* {@link IDhApiRenderableBoxGroup} objects,
|
||||||
|
* from DH's renderer. <br><br>
|
||||||
|
*
|
||||||
|
* Can be accessed in
|
||||||
|
* {@link DhApi.Delayed#worldProxy} -> {@link IDhApiLevelWrapper}.
|
||||||
|
*
|
||||||
|
* @see IDhApiCustomRenderObjectFactory
|
||||||
|
* @see IDhApiRenderableBoxGroup
|
||||||
|
* @see IDhApiWorldProxy
|
||||||
|
* @see IDhApiLevelWrapper
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-3
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public interface IDhApiCustomRenderRegister
|
||||||
|
{
|
||||||
|
void add(IDhApiRenderableBoxGroup cubeGroup) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
IDhApiRenderableBoxGroup remove(long id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -26,7 +26,7 @@ import com.seibel.distanthorizons.api.objects.DhApiResult;
|
|||||||
* Used to interact with Distant Horizons' rendering system.
|
* Used to interact with Distant Horizons' rendering system.
|
||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2023-10-13
|
* @version 2024-7-27
|
||||||
* @since API 1.0.0
|
* @since API 1.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiRenderProxy
|
public interface IDhApiRenderProxy
|
||||||
@@ -39,10 +39,8 @@ public interface IDhApiRenderProxy
|
|||||||
* If this is called on a dedicated server it won't do anything and will return {@link DhApiResult#success} = false <Br><Br>
|
* If this is called on a dedicated server it won't do anything and will return {@link DhApiResult#success} = false <Br><Br>
|
||||||
*
|
*
|
||||||
* Background: <Br>
|
* Background: <Br>
|
||||||
* Distant Horizons has two different file formats: Full data and Render data. <Br>
|
* When rendering Distant Horizons bakes each block's color into the geometry that's rendered. <Br>
|
||||||
* - Full data files store the block, biome, etc. information and is the result of loading or generating new chunks. <Br>
|
* This improves rendering speed and VRAM size, but prevents dynamically changing LOD colors. <Br>
|
||||||
* - Render data files store LOD colors and are created using the Full data and currently loaded resource packs. <Br>
|
|
||||||
* This is the data cleared by this method.
|
|
||||||
*/
|
*/
|
||||||
DhApiResult<Boolean> clearRenderDataCache();
|
DhApiResult<Boolean> clearRenderDataCache();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.seibel.distanthorizons.api.interfaces.render;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.enums.config.EDhApiLodShading;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3d;
|
||||||
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||||
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3i;
|
||||||
|
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBox;
|
||||||
|
import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBoxGroupShading;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of {@link DhApiRenderableBox}'s that
|
||||||
|
* can be rendered to DH's terrain pass.
|
||||||
|
*
|
||||||
|
* @see DhApiRenderableBox
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-6-30
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public interface IDhApiRenderableBoxGroup extends List<DhApiRenderableBox>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A unique numerical ID used by DH during rendering.
|
||||||
|
* This can also be used to bind/unbind specific {@link IDhApiRenderableBoxGroup}'s from the renderer.
|
||||||
|
* @return the ID for this specific group
|
||||||
|
*/
|
||||||
|
long getId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to determine which mods have added what to the DH renderer.
|
||||||
|
* This can be used both by the F3 pie chart so you as a mod developer can profile your code
|
||||||
|
* or by shader developers who want to render your objects differently. <br><br>
|
||||||
|
*
|
||||||
|
* Should be used the same as a vanilla Minecraft ResourceLocation.
|
||||||
|
* For example if your mod named "Heavy Thunder" adds additional clouds named "Storm Front",
|
||||||
|
* your Resource Location would be something like "HeavyThunder:StormFront"
|
||||||
|
* and this method would return "HeavyThunder".
|
||||||
|
*/
|
||||||
|
String getResourceLocationNamespace();
|
||||||
|
/**
|
||||||
|
* Used to determine what type of object mods have added what to the DH renderer.
|
||||||
|
* This can be used both by the F3 pie chart so you as a mod developer can profile your code
|
||||||
|
* or by shader developers who want to render your objects differently. <br><br>
|
||||||
|
*
|
||||||
|
* Should be used the same as a vanilla Minecraft ResourceLocation.
|
||||||
|
* For example if your mod named "Heavy Thunder" adds additional clouds named "Storm Front",
|
||||||
|
* your Resource Location would be something like "HeavyThunder:StormFront"
|
||||||
|
* and this method would return "StormFront".
|
||||||
|
*/
|
||||||
|
String getResourceLocationPath();
|
||||||
|
|
||||||
|
/** Sets whether this group should render or not. */
|
||||||
|
void setActive(boolean active);
|
||||||
|
/** @return if active this group will render. */
|
||||||
|
boolean isActive();
|
||||||
|
|
||||||
|
/** Sets whether this group should render with Screen Space Ambient Occlusioning. */
|
||||||
|
void setSsaoEnabled(boolean ssaoEnabled);
|
||||||
|
/** @return if active this group will render with Screen Space Ambient Occlusioning. */
|
||||||
|
boolean isSsaoEnabled();
|
||||||
|
|
||||||
|
/** Sets where this group will render in the level. */
|
||||||
|
void setOriginBlockPos(DhApiVec3d pos);
|
||||||
|
/** @return the block position in the level that all {@see DhApiRenderableBox} will render relative to. */
|
||||||
|
DhApiVec3d getOriginBlockPos();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called right before this group is rendered. <br>
|
||||||
|
* This is a good place to change the origin or notify of any box changes.
|
||||||
|
*/
|
||||||
|
void setPreRenderFunc(Consumer<DhApiRenderParam> renderEventParam);
|
||||||
|
void setPostRenderFunc(Consumer<DhApiRenderParam> renderEventParam); // TODO name?
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If a cube's color, position, or other property is changed this method
|
||||||
|
* must be called for those changes to render. <br><br>
|
||||||
|
*
|
||||||
|
* Note: changing the group's position via {@link #setOriginBlockPos} doesn't
|
||||||
|
* require calling this method.
|
||||||
|
*/
|
||||||
|
void triggerBoxChange();
|
||||||
|
|
||||||
|
/** Only accepts values between 0 and 15 */
|
||||||
|
void setSkyLight(int skyLight);
|
||||||
|
int getSkyLight();
|
||||||
|
|
||||||
|
/** Only accepts values between 0 and 15 */
|
||||||
|
void setBlockLight(int blockLight);
|
||||||
|
int getBlockLight();
|
||||||
|
|
||||||
|
void setShading(DhApiRenderableBoxGroupShading shading);
|
||||||
|
DhApiRenderableBoxGroupShading getShading();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.seibel.distanthorizons.api.interfaces.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used for objects that need deep clones. <br>
|
||||||
|
* Replacement for {@link Cloneable}.
|
||||||
|
*
|
||||||
|
* @see Cloneable
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-12
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public interface IDhApiCopyable
|
||||||
|
{
|
||||||
|
/** Returns a deep clone of all parameters whenever possible. */
|
||||||
|
IDhApiCopyable copy();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,8 +28,6 @@ import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
|||||||
*/
|
*/
|
||||||
public interface IDhApiDimensionTypeWrapper extends IDhApiUnsafeWrapper
|
public interface IDhApiDimensionTypeWrapper extends IDhApiUnsafeWrapper
|
||||||
{
|
{
|
||||||
String getDimensionName();
|
|
||||||
|
|
||||||
boolean hasCeiling();
|
boolean hasCeiling();
|
||||||
|
|
||||||
boolean hasSkyLight();
|
boolean hasSkyLight();
|
||||||
|
|||||||
@@ -21,27 +21,42 @@ package com.seibel.distanthorizons.api.interfaces.world;
|
|||||||
|
|
||||||
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
import com.seibel.distanthorizons.api.interfaces.IDhApiUnsafeWrapper;
|
||||||
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiLevelType;
|
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiLevelType;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.render.IDhApiCustomRenderRegister;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can be either a Server or Client level.<br>
|
* Can be either a Server or Client level.<br>
|
||||||
* A level is equivalent to a dimension in vanilla Minecraft.
|
* A level is equivalent to a dimension in vanilla Minecraft.
|
||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2022-7-14
|
* @version 2024-7-28
|
||||||
* @since API 1.0.0
|
* @since API 1.0.0
|
||||||
*/
|
*/
|
||||||
public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
|
public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
|
||||||
{
|
{
|
||||||
IDhApiDimensionTypeWrapper getDimensionType();
|
IDhApiDimensionTypeWrapper getDimensionType();
|
||||||
|
|
||||||
|
/** @since API 4.0.0 */
|
||||||
|
String getDimensionName();
|
||||||
|
|
||||||
EDhApiLevelType getLevelType();
|
EDhApiLevelType getLevelType();
|
||||||
|
|
||||||
boolean hasCeiling();
|
boolean hasCeiling();
|
||||||
|
|
||||||
boolean hasSkyLight();
|
boolean hasSkyLight();
|
||||||
|
|
||||||
/** Returns the max block height of the level(?) */
|
/**
|
||||||
int getHeight();
|
* Deprecated, use {@link IDhApiLevelWrapper#getMaxHeight} instead. <br>
|
||||||
|
* Returns the max block height of the level.
|
||||||
|
*
|
||||||
|
* @see IDhApiLevelWrapper#getMaxHeight
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
default int getHeight() { return this.getMaxHeight(); }
|
||||||
|
/**
|
||||||
|
* Returns the max block height of the level
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
int getMaxHeight();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the lowest possible block position for the level. <br>
|
* Returns the lowest possible block position for the level. <br>
|
||||||
@@ -49,4 +64,12 @@ public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
|
|||||||
*/
|
*/
|
||||||
default int getMinHeight() { return 0; }
|
default int getMinHeight() { return 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will return null if called on the server,
|
||||||
|
* or if called before the renderer has been set up.
|
||||||
|
*
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
IDhApiCustomRenderRegister getRenderRegister();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,17 +26,20 @@ import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhAp
|
|||||||
/**
|
/**
|
||||||
* Fired after Distant Horizons finishes rendering a frame. <br>
|
* Fired after Distant Horizons finishes rendering a frame. <br>
|
||||||
* At this point DH will have also finished cleaning up any modifications it
|
* At this point DH will have also finished cleaning up any modifications it
|
||||||
* did to the OpenGL state, so the state should be back to Minecraft's defaults.
|
* did to the OpenGL state, so the state should be back to Minecraft's defaults. <br><br>
|
||||||
*
|
*
|
||||||
|
* Note: as of API v 3.0.0 no {@link DhApiRenderParam} is included in this event
|
||||||
|
* because the specific parameters may change
|
||||||
|
* depending on whether deferred rendering is enabled or not.
|
||||||
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-31
|
* @version 2024-7-14
|
||||||
* @see DhApiRenderParam
|
|
||||||
* @since API 1.0.0
|
* @since API 1.0.0
|
||||||
*/
|
*/
|
||||||
public abstract class DhApiAfterRenderEvent implements IDhApiEvent<DhApiRenderParam>
|
public abstract class DhApiAfterRenderEvent implements IDhApiEvent<Void>
|
||||||
{
|
{
|
||||||
/** Fired after Distant Horizons finishes rendering fake chunks. */
|
/** Fired after Distant Horizons finishes rendering fake chunks. */
|
||||||
public abstract void afterRender(DhApiEventParam<DhApiRenderParam> event);
|
public abstract void afterRender(DhApiEventParam<Void> event);
|
||||||
|
|
||||||
|
|
||||||
//=========================//
|
//=========================//
|
||||||
@@ -44,6 +47,6 @@ public abstract class DhApiAfterRenderEvent implements IDhApiEvent<DhApiRenderPa
|
|||||||
//=========================//
|
//=========================//
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void fireEvent(DhApiEventParam<DhApiRenderParam> event) { this.afterRender(event); }
|
public final void fireEvent(DhApiEventParam<Void> event) { this.afterRender(event); }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhAp
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-31
|
* @version 2024-1-31
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public abstract class DhApiBeforeApplyShaderRenderEvent implements IDhApiCancelableEvent<DhApiRenderParam>
|
public abstract class DhApiBeforeApplyShaderRenderEvent implements IDhApiCancelableEvent<DhApiRenderParam>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,9 +20,10 @@
|
|||||||
package com.seibel.distanthorizons.api.methods.events.abstractEvents;
|
package com.seibel.distanthorizons.api.methods.events.abstractEvents;
|
||||||
|
|
||||||
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiEvent;
|
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiEvent;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiEventParam;
|
||||||
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiEventParam;
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiEventParam;
|
||||||
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
import com.seibel.distanthorizons.coreapi.util.math.Vec3f;
|
import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called before Distant Horizons starts rendering a buffer. <br>
|
* Called before Distant Horizons starts rendering a buffer. <br>
|
||||||
@@ -30,7 +31,7 @@ import com.seibel.distanthorizons.coreapi.util.math.Vec3f;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2023-1-31
|
* @version 2023-1-31
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*
|
*
|
||||||
* @see DhApiBeforeRenderEvent
|
* @see DhApiBeforeRenderEvent
|
||||||
*/
|
*/
|
||||||
@@ -52,20 +53,29 @@ public abstract class DhApiBeforeBufferRenderEvent implements IDhApiEvent<DhApiB
|
|||||||
// parameter object //
|
// parameter object //
|
||||||
//==================//
|
//==================//
|
||||||
|
|
||||||
public static class EventParam extends DhApiRenderParam
|
public static class EventParam extends DhApiRenderParam implements IDhApiEventParam
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Measured in blocks.
|
* Measured in blocks.
|
||||||
* Should be applied to the model view matrix to move the buffer into its proper place.
|
* Should be applied to the model view matrix to move the buffer into its proper place.
|
||||||
*/
|
*/
|
||||||
public final Vec3f modelPos;
|
public final DhApiVec3f modelPos;
|
||||||
|
|
||||||
|
|
||||||
public EventParam(DhApiRenderParam parent, Vec3f modelPos)
|
public EventParam(DhApiRenderParam parent, DhApiVec3f modelPos)
|
||||||
{
|
{
|
||||||
super(parent);
|
super(parent);
|
||||||
this.modelPos = modelPos;
|
this.modelPos = modelPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EventParam copy()
|
||||||
|
{
|
||||||
|
return new EventParam(
|
||||||
|
this, this.modelPos.copy()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-22
|
* @version 2024-1-22
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public abstract class DhApiBeforeDeferredRenderEvent extends DhApiBeforeRenderEvent
|
public abstract class DhApiBeforeDeferredRenderEvent extends DhApiBeforeRenderEvent
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Distant Horizons mod
|
||||||
|
* licensed under the GNU LGPL v3 License.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020-2023 James Seibel
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.seibel.distanthorizons.api.methods.events.abstractEvents;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderableBoxGroup;
|
||||||
|
import com.seibel.distanthorizons.api.interfaces.world.IDhApiLevelWrapper;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiCancelableEvent;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiEventParam;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiCancelableEventParam;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before Distant Horizons starts rendering a generic object. <br>
|
||||||
|
* Canceling this event will prevent the triggering {@link IDhApiRenderableBoxGroup} from rendering this frame.
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-11
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public abstract class DhApiBeforeGenericObjectRenderEvent implements IDhApiCancelableEvent<DhApiBeforeGenericObjectRenderEvent.EventParam>
|
||||||
|
{
|
||||||
|
/** Fired before Distant Horizons renders a generic object. */
|
||||||
|
public abstract void beforeRender(DhApiCancelableEventParam<EventParam> event);
|
||||||
|
|
||||||
|
|
||||||
|
//=========================//
|
||||||
|
// internal DH API methods //
|
||||||
|
//=========================//
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void fireEvent(DhApiCancelableEventParam<EventParam> input) { this.beforeRender(input); }
|
||||||
|
|
||||||
|
|
||||||
|
//==================//
|
||||||
|
// parameter object //
|
||||||
|
//==================//
|
||||||
|
|
||||||
|
public static class EventParam extends DhApiRenderParam implements IDhApiEventParam
|
||||||
|
{
|
||||||
|
public final long boxGroupId;
|
||||||
|
public final String resourceLocationNamespace;
|
||||||
|
public final String resourceLocationPath;
|
||||||
|
|
||||||
|
|
||||||
|
public EventParam(
|
||||||
|
DhApiRenderParam renderParam,
|
||||||
|
IDhApiRenderableBoxGroup boxGroup
|
||||||
|
)
|
||||||
|
{
|
||||||
|
super(renderParam);
|
||||||
|
|
||||||
|
this.boxGroupId = boxGroup.getId();
|
||||||
|
this.resourceLocationNamespace = boxGroup.getResourceLocationNamespace();
|
||||||
|
this.resourceLocationPath = boxGroup.getResourceLocationPath();
|
||||||
|
}
|
||||||
|
public EventParam(
|
||||||
|
DhApiRenderParam renderParam,
|
||||||
|
long boxGroupId, String resourceLocationNamespace, String resourceLocationPath
|
||||||
|
)
|
||||||
|
{
|
||||||
|
super(renderParam);
|
||||||
|
|
||||||
|
this.boxGroupId = boxGroupId;
|
||||||
|
this.resourceLocationNamespace = resourceLocationNamespace;
|
||||||
|
this.resourceLocationPath = resourceLocationPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EventParam copy()
|
||||||
|
{
|
||||||
|
return new EventParam(
|
||||||
|
this,
|
||||||
|
this.boxGroupId, this.resourceLocationNamespace, this.resourceLocationPath
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Distant Horizons mod
|
||||||
|
* licensed under the GNU LGPL v3 License.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020-2023 James Seibel
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.seibel.distanthorizons.api.methods.events.abstractEvents;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiEvent;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiEventParam;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before Distant Horizons starts the cleanup process done after rendering generic objects. <br>
|
||||||
|
* This is called after all generic objects have finished rendering.
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-13
|
||||||
|
* @since API 3.0.0
|
||||||
|
*/
|
||||||
|
public abstract class DhApiBeforeGenericRenderCleanupEvent implements IDhApiEvent<DhApiRenderParam>
|
||||||
|
{
|
||||||
|
/** Fired before Distant Horizons starts the cleanup process once rendering has finished. */
|
||||||
|
public abstract void beforeCleanup(DhApiEventParam<DhApiRenderParam> event);
|
||||||
|
|
||||||
|
|
||||||
|
//=========================//
|
||||||
|
// internal DH API methods //
|
||||||
|
//=========================//
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void fireEvent(DhApiEventParam<DhApiRenderParam> event) { this.beforeCleanup(event); }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Distant Horizons mod
|
||||||
|
* licensed under the GNU LGPL v3 License.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020-2023 James Seibel
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.seibel.distanthorizons.api.methods.events.abstractEvents;
|
||||||
|
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.interfaces.IDhApiEvent;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiEventParam;
|
||||||
|
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before Distant Horizons has started setting up OpenGL objects for rendering generic objects. <br>
|
||||||
|
* If you want to modify already bound DH OpenGL objects try using {@link DhApiBeforeGenericObjectRenderEvent}.
|
||||||
|
*
|
||||||
|
* @author James Seibel
|
||||||
|
* @version 2024-7-12
|
||||||
|
* @since API 3.0.0
|
||||||
|
*
|
||||||
|
* @see DhApiBeforeGenericObjectRenderEvent
|
||||||
|
*/
|
||||||
|
public abstract class DhApiBeforeGenericRenderSetupEvent implements IDhApiEvent<DhApiRenderParam>
|
||||||
|
{
|
||||||
|
/** Fired before Distant Horizons has started setting up OpenGL objects for rendering generic objects. */
|
||||||
|
public abstract void beforeSetup(DhApiEventParam<DhApiRenderParam> input);
|
||||||
|
|
||||||
|
|
||||||
|
//=========================//
|
||||||
|
// internal DH API methods //
|
||||||
|
//=========================//
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void fireEvent(DhApiEventParam<DhApiRenderParam> input) { this.beforeSetup(input); }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,11 +29,11 @@ import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhAp
|
|||||||
*
|
*
|
||||||
* @author James Seibel
|
* @author James Seibel
|
||||||
* @version 2024-1-31
|
* @version 2024-1-31
|
||||||
* @since API 1.1.0
|
* @since API 2.0.0
|
||||||
*/
|
*/
|
||||||
public abstract class DhApiBeforeRenderCleanupEvent implements IDhApiEvent<DhApiRenderParam>
|
public abstract class DhApiBeforeRenderCleanupEvent implements IDhApiEvent<DhApiRenderParam>
|
||||||
{
|
{
|
||||||
/** Fired before Distant Horizons renders LODs. */
|
/** Fired before Distant Horizons starts the cleanup process once rendering has finished. */
|
||||||
public abstract void beforeCleanup(DhApiEventParam<DhApiRenderParam> event);
|
public abstract void beforeCleanup(DhApiEventParam<DhApiRenderParam> event);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||