Compare commits

...

1038 Commits

Author SHA1 Message Date
Ran e9fc666de5 Made forge actually run! Renamed com.seibel.lod.core to com.seibel.lod.coreapi 2023-05-01 19:27:51 +06:00
James Seibel 64a1120be2 Rename Sparse/Spotty Full data sources to High/LowDetailIncomplete
I liked the terms "sparse" and "spotty", however the difference between the two based on their names was not obvious, which made differentiating between the two difficult.
2023-04-23 15:30:01 -05:00
James Seibel be5d5ec404 refactoring and commenting 2023-04-23 14:57:08 -05:00
James Seibel 9ea5aba0ab rename SingleFullDataAccessor -> SingleColumnFullDataAccessor 2023-04-23 14:51:13 -05:00
James Seibel e1c0299368 refactor and document FullData sample methods 2023-04-23 14:50:38 -05:00
James Seibel 20dc5032ad Rename, refactor, and document FullData Accessors 2023-04-22 12:45:42 -05:00
James Seibel d8e5d588d9 Rename and refactor several FullData source/view files 2023-04-22 11:04:10 -05:00
James Seibel ecbadfb8c6 organize the fullData package 2023-04-22 09:19:49 -05:00
James Seibel 6103625911 Start adding WorldGenStep to full data sources 2023-04-22 08:43:20 -05:00
James Seibel f136fe9bde full data minor refactoring 2023-04-22 08:29:15 -05:00
James Seibel 3a4743b717 Replace all WorldGenStep Enums with the API version 2023-04-20 19:59:27 -05:00
James Seibel 553a125614 refactor and minor fixes for FullData 2023-04-20 19:46:19 -05:00
James Seibel eb5da6fa4d Fix RenderSection overlap and holes 2023-04-17 21:40:45 -05:00
James Seibel 158b7561bc update lodQuadTree calls 2023-04-15 16:38:40 -05:00
James Seibel 45a2e67341 separate isSectionEnabled and isSectionLoaded 2023-04-15 16:35:00 -05:00
James Seibel 6e67ce307e separate LodRenderSection load/enable methods 2023-04-15 16:33:16 -05:00
coolGi 7e3a5181d5 Merge remote-tracking branch 'origin/main' 2023-04-15 01:44:05 +09:30
coolGi b03ea39338 Deprecated getGameDirectory from IMinecraftClientWrapper. Use IMinecraftSharedWrapper.getInstallationDirectory() instead. 2023-04-15 01:36:53 +09:30
James Seibel 63e75fb508 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2023-04-10 21:18:49 -05:00
James Seibel 3d413b072b minor ParsedColumnData refactor 2023-04-10 21:18:21 -05:00
coolGi e017d3d599 Disabled lodBias by default 2023-04-11 00:13:04 +09:30
James Seibel 5c9170d13b temporary world Gen Queue out of bounds fixes 2023-04-08 16:01:47 -05:00
James Seibel e48e7fbf7a minor refactoring 2023-04-08 15:59:32 -05:00
James Seibel 39778fe944 Fix LodQuadTree out of bounds error 2023-04-08 13:16:50 -05:00
James Seibel 85a0e75786 Refactor QuadTree DoSquaresOverlap() and add UnitTest 2023-04-08 11:01:35 -05:00
James Seibel df646bb87c minor LodQuadTree refactor 2023-04-08 10:27:31 -05:00
James Seibel b11d1c4b3e Improve QuadNode.getChildValueCount() 2023-04-08 10:21:03 -05:00
James Seibel b013d93908 fix world generator not being started corrected in DhClientServerLevel 2023-04-08 10:19:22 -05:00
James Seibel 4d9264321c Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2023-04-03 21:33:46 -05:00
James Seibel 5f84f01fb8 Fix world gen queue and rendering for new QuadTree Iterators 2023-04-03 21:33:42 -05:00
James Seibel 3d13f6f46f Fix and update QuadTree/Node iterators 2023-04-03 21:18:25 -05:00
James Seibel 90295b7dcf Fix QuadNode.getDirectChildNodeIterator() 2023-04-02 21:31:17 -05:00
James Seibel d2a0057919 Replace consumer based QuadTree iteration with Iterators
This drastically improves debugging, because lambda consumers cause the stack trace to become messy very quickly.
2023-04-02 19:39:47 -05:00
coolGi 146a2d38cb Reverted back to using swing for the base run jar 2023-03-31 19:47:32 +10:30
James Seibel 45b410806b refactor worldGenQueue removeOutOfRangeTasks 2023-03-30 19:28:24 -05:00
James Seibel afc045dd4c Fix holes when moving around the world 2023-03-30 07:26:25 -05:00
James Seibel 8856843830 minor refactoring 2023-03-29 07:09:41 -05:00
James Seibel afd18ef56c add a TODO for areChildRenderSectionsLoaded 2023-03-27 21:20:21 -05:00
James Seibel 4f496958fb add TODO comments 2023-03-27 21:12:25 -05:00
James Seibel 82fe7c099d refactoring quadTree/Node, RenderSection, and ColRenderSource 2023-03-27 21:11:09 -05:00
James Seibel 779d93700f temporary fix for missing LOD corners 2023-03-27 20:11:15 -05:00
coolGi 7d060d8b85 Fixed up some things to do with the Java screen 2023-03-26 17:31:53 +10:30
coolGi f4c1c9ebbf Moved OS getting utils to its own Platform enum. 2023-03-26 16:03:02 +10:30
coolGi cb88a48d78 Changed default config values and fixed up lang for Lod bias. 2023-03-26 12:53:11 +10:30
James Seibel 3ffd4e9ff6 rename QuadNode .forEachDirectChildNode() 2023-03-25 18:44:09 -05:00
James Seibel ba64241774 Fix render sections incorrectly disabling/enabling when moving 2023-03-25 18:43:49 -05:00
James Seibel 1b682580fd Merge the data structure in LodQuadTree and RenderBufferHandler
This prevents needing to sync both data structures, reducing the chance for things to go wrong
2023-03-25 16:18:22 -05:00
James Seibel 7b795af7b3 update the quadTree tests to support the dynamical detail tree 2023-03-25 11:45:04 -05:00
James Seibel eec8db6223 make the quad tree max detail level dynamic 2023-03-25 11:44:47 -05:00
James Seibel a465a8da9d Replace WorldGen and LodQuadTree with the new QuadTree<T>
There are some issues for the render tree, but the world gen tree appears to be working correctly
2023-03-25 09:25:13 -05:00
James Seibel 0b05ced5b9 Add QuadTree toString() and getChildCountAtPos() 2023-03-25 09:23:24 -05:00
James Seibel a985e1c542 Fix quadNode getChildByIndex inconsistent with DhSectionPos 2023-03-25 07:43:55 -05:00
James Seibel 8a32d7f84a Add the ability to limit how deep a quad tree can go 2023-03-23 21:04:27 -05:00
James Seibel d4b6ec74a8 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2023-03-23 07:24:53 -05:00
James Seibel cda265b07f Add SquareIntersectTest 2023-03-23 07:24:49 -05:00
James Seibel 57fec0f805 Fix QuadTree adjacent position issues 2023-03-23 07:13:09 -05:00
coolGi 04b12a2715 New ui frame now shows 2023-03-23 19:25:19 +10:30
coolGi 63950edc96 Sava commit for the new Config UI 2023-03-23 18:08:36 +10:30
James Seibel 515ebb8c99 Fix QuadTree boundary issues and add tests 2023-03-20 20:12:27 -05:00
James Seibel 03acb159e0 separate a quadTree test 2023-03-20 19:55:12 -05:00
James Seibel 837f7d6b5f QuadTree refactoring and fixes 2023-03-20 19:52:13 -05:00
James Seibel ea8076db97 remove unused QuadTree code 2023-03-20 19:52:00 -05:00
James Seibel 38ff3b6942 QuadTree test refactoring 2023-03-20 19:50:45 -05:00
James Seibel 29b5cd9a50 Move SectionPos tests into their own file 2023-03-20 19:50:18 -05:00
James Seibel 4e0254154f Overhaul the QuadTree object
Previously the quad tree was closer to a 3D array than a traditional quadTree. This change brings it closer to a traditional quad tree.
2023-03-20 07:16:35 -05:00
James Seibel adf5d3eb14 fix LodQuadTree compiling and in-mobile functionality 2023-03-18 21:57:54 -05:00
James Seibel 3c4faf1cd0 incomplete LodQuadTree tick modification 2023-03-18 18:14:48 -05:00
James Seibel bf2ae21c21 Improve LodQuadTree assert messages 2023-03-18 09:53:45 -05:00
James Seibel 32e11062df Add a rough diagram to LodQuadTree 2023-03-18 09:50:59 -05:00
coolGi 7d2ab7f589 Updated logo svg so they can be defined in variables 2023-03-18 12:30:33 +10:30
coolGi aac99f1682 Fixed up more things to do with JavaFX, and added some extra stuff for the MinecraftScreen 2023-03-17 22:29:28 +10:30
coolGi 64bed83ddb Removed FlatLaf (which was used for theming) and replaced it with JavaFX 2023-03-17 19:45:18 +10:30
James Seibel 333dc4d0e0 add a message to a LodQuadTree assert 2023-03-16 07:55:30 -05:00
James Seibel d7338a7bb7 update world gen queue comments 2023-03-16 07:26:08 -05:00
James Seibel 0ddd68b6e6 Refactor worldGeneratorQueue thread and comments 2023-03-15 22:25:34 -05:00
James Seibel a9583a6227 Make world gen task queuing async 2023-03-14 22:12:06 -05:00
James Seibel 2020cae17a fix halfSize being the same for every detail level
This may not set the halfSize to the right value, but it is better than having a value of "10" for everything like before
2023-03-14 22:03:30 -05:00
James Seibel af3916b089 refactoring 2023-03-14 21:43:31 -05:00
James Seibel df0a5f5bd0 finish the world generatior 2023-03-14 07:30:42 -05:00
James Seibel 44e280e8b7 fix a class missing exception 2023-03-14 07:24:07 -05:00
James Seibel b6ef754d61 rename DhLodPos overlaps() -> overlapsExactly() 2023-03-12 18:50:58 -05:00
James Seibel 579302f643 start replacing WorldGenQueue's backend with a QuadTree
previously it was a list that grew too quickly for large distances
2023-03-12 18:45:51 -05:00
James Seibel cb23fddd53 add try catch to ServerApi 2023-03-12 17:53:07 -05:00
James Seibel 2f99de7900 remove unused imports 2023-03-12 17:51:46 -05:00
James Seibel 6056d7f7d1 refactoring 2023-03-11 21:10:42 -06:00
James Seibel 586c550c80 fix potential ColumnBox empty data point error 2023-03-11 21:10:09 -06:00
James Seibel 4b5bfe6799 Fix the QuadTree not updating when new LODs are generated 2023-03-11 12:02:22 -06:00
James Seibel 45cc0f38be fix incorrect commit for DhClientServerWorld 2023-03-11 12:01:54 -06:00
James Seibel 3c72765c9a refactoring 2023-03-11 12:00:08 -06:00
James Seibel ded7dde42a Fix generated data not saving 2023-03-11 11:00:37 -06:00
James Seibel 3510facd1e refactor fullDataMetaFile 2023-03-11 11:00:14 -06:00
James Seibel c5c298708f refactoring 2023-03-11 10:37:02 -06:00
James Seibel d687ec892a refactoring/renaming 2023-03-11 09:50:33 -06:00
James Seibel dbfde9f637 Fix files not saving 2023-03-10 22:49:11 -06:00
James Seibel f2be1bd034 rename Steps -> EGenerationStep 2023-03-10 22:00:26 -06:00
James Seibel dd8ee36487 replace OutputStream's with BufferedOutputStream for performance 2023-03-09 21:43:54 -06:00
James Seibel e5116e1ec9 Require Buffered Streams everywhere for performance 2023-03-09 21:02:48 -06:00
James Seibel ce472729d6 append Dh to unclosableStreams and refactor 2023-03-09 07:14:48 -06:00
James Seibel f691f016bc Fix file loaders not getting interrupted on level close 2023-03-07 20:39:07 -06:00
James Seibel 380f92e105 reformat fullDataMetaFile 2023-03-06 21:32:44 -06:00
James Seibel 7ab60df578 Fix QuadTree ringList removal assertion 2023-03-06 21:25:54 -06:00
James Seibel 03822f9e74 Add QuadTree.treeMaxDetailLevel 2023-03-06 20:58:40 -06:00
James Seibel b760a16416 Revert "Simplify Config auto complete"
This reverts commit 1a1d6370f9.
2023-03-06 20:50:17 -06:00
James Seibel e3567c923a Default vanillaOverdraw to "always" instead of "dynamic" 2023-03-06 20:39:57 -06:00
James Seibel 1a1d6370f9 Simplify Config auto complete
Make ConfigCategories private instead of public.
2023-03-06 20:39:42 -06:00
James Seibel a517e6997b refactor ColumnRenderBuffer 2023-03-06 20:30:59 -06:00
James Seibel b63c4b9e7e Remove deprecated ILodConfigWrapperSingleton, use Config instead 2023-03-06 07:44:49 -06:00
James Seibel 5bb14820b6 Add try-catch blocks to LodQuadTree and RenderBufferHandler
To prevent either system from out-right crashing if something goes wrong
2023-03-05 22:07:41 -06:00
James Seibel f09bfa7cfd Auto remove world gen tasks that are outside DH's render distance 2023-03-05 18:38:03 -06:00
James Seibel 825f424ae0 refactor GeneratedFullDateFileHandler 2023-03-05 18:29:21 -06:00
James Seibel 48ae72e0ce Refactor DhChunkPos and add isChunkPosBetween() 2023-03-05 18:28:42 -06:00
James Seibel 94de6380e8 refactor DhClientServerLevel 2023-03-05 18:28:23 -06:00
James Seibel 43de87be0d Limit QuadTree concurrently loading LodRenderSections 2023-03-04 21:15:50 -06:00
James Seibel 067730379f prepend "DH-" to all threads using ThreadUtil 2023-03-04 20:09:04 -06:00
James Seibel 32456c3110 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2023-03-04 20:06:50 -06:00
James Seibel 12cbcd9159 Fix threadUtil relativepriority 2023-03-04 20:06:36 -06:00
James Seibel 04e25499ac refactor EventLoop 2023-03-04 20:06:17 -06:00
coolGi 3158620440 Quick fix up to distantGeneratorMode lang 2023-03-05 12:13:32 +10:30
coolGi c65e8c068c Notification in the config if there is going to be an update on close 2023-03-05 11:57:56 +10:30
James Seibel cc4ffaf415 Move threading from LodUtil to ThreadUtil 2023-03-04 14:37:31 -06:00
James Seibel 1a047e14b6 refactor LodRenderSection and LodQuadTree 2023-03-04 14:23:42 -06:00
James Seibel daf4d8b975 refactor MovableGridRingList 2023-03-04 14:20:57 -06:00
James Seibel d35befdf8e Make QuadTree load renderSections from lowest detailLevel to highest
IE start with near sections and move out
2023-03-04 11:49:25 -06:00
James Seibel 6c9c6c9e99 Refactor LodQuadTree 2023-03-04 11:48:25 -06:00
James Seibel 51e5408bb6 Refactor GLProxy 2023-03-04 10:10:19 -06:00
James Seibel b967d94ece refactor LodQuadTree tick methods 2023-03-04 09:58:46 -06:00
James Seibel 07d92f95cb comment out "Merging data from..." logs 2023-03-02 21:34:49 -06:00
James Seibel 075364b26a refactor ChunkToLodBuilder and improve its level changing logic 2023-03-02 21:17:32 -06:00
James Seibel b53c6d8c76 Fix changing dimensions preventing chunk updates 2023-03-02 21:01:43 -06:00
James Seibel 209ccdae76 Add ClientServerWorld level dim type assertion 2023-03-02 20:45:14 -06:00
James Seibel 6beac75c0f comment out "loading render source" log 2023-03-02 20:44:49 -06:00
James Seibel 3fbc2bdb1c Fix render cache folder not being used by ClientRenderState 2023-03-02 20:44:36 -06:00
James Seibel ab92a5ba42 minor reformatting 2023-03-02 07:45:36 -06:00
James Seibel 382b006210 Fix high CPU usage when not moving
Refreshing the render source isn't necessary since it will automatically be updated whenever a given chunk is updated. (and because we don't currently have a versioning system to prevent re-loading the same data)
2023-03-02 07:33:40 -06:00
James Seibel 022a288c97 comment out height_map vertical option
and minor refactoring/commenting
2023-03-01 07:46:37 -06:00
James Seibel 9f601ea6b3 Fix reading/writing files after leaving the world
May have issues in Client-only mode
2023-03-01 07:31:40 -06:00
James Seibel cc474caf33 refactor and comment 2023-02-28 21:43:08 -06:00
coolGi 70369fa468 Removed api build.gradle 2023-02-28 16:57:45 +10:30
James Seibel 42d3e38daa Fix gradle mystery compiler error
Specifically fixes core gradle being unable to access packages found in API
2023-02-27 20:38:40 -06:00
coolGi 1234e47f55 Removed build.gradle for core 2023-02-27 22:32:24 +10:30
coolGi c44c501cd8 Maybe fixed bug with gradle??? 2023-02-27 21:11:37 +10:30
James Seibel 9a27cc1e65 implement ClientApi.clientChunkSaveEvent() 2023-02-26 16:33:58 -06:00
James Seibel 381d3fe216 Move shared Dh(Server)ClientLevel code into AbstractDhClientLevel
This fixes DhServerClientLevel's crashing
2023-02-25 21:31:18 -06:00
James Seibel 2376baf936 prevent potential null pointers in ServerApi 2023-02-25 21:29:56 -06:00
James Seibel be0ce75ceb refactor and prevent a potential null pointer in DhClientWorld 2023-02-25 21:27:35 -06:00
James Seibel ea41fbc664 make DhClientServerLevel extends DhClientLevel 2023-02-25 17:17:27 -06:00
James Seibel 5579b1dc95 equalize DhClientLevel and DhClientServerLevel 2023-02-25 15:43:20 -06:00
James Seibel 8d5926fb2d Add very rough client World support 2023-02-25 15:29:40 -06:00
James Seibel 03752509e7 improve ClientApi logging 2023-02-25 15:28:38 -06:00
James Seibel e7d16b2109 refactor DhClientServerWorld 2023-02-25 15:27:31 -06:00
James Seibel 54252d10f5 minor refactor 2023-02-25 14:29:22 -06:00
James Seibel 19d8306094 move DhClientServerLevel.RenderState into its own file 2023-02-25 10:58:03 -06:00
James Seibel 373b354b20 Add additional shutdown logging 2023-02-25 10:57:27 -06:00
James Seibel b9edf2ef93 Hard shutdown the world generator, don't wait 2023-02-25 10:22:45 -06:00
James Seibel b4ffd65fbc remove deprecated getServerFolderName() 2023-02-25 09:02:42 -06:00
James Seibel eaee05df3f Change the default multiplayer save mode to "name_only"
This is done to prevent issues with Realms
2023-02-25 08:56:40 -06:00
coolGi 7403657d83 Removed classifier's as they are no longer needed in gradle 18 2023-02-24 19:08:53 +10:30
coolGi 2a7e5ef9c9 Suppressed unchecked warning 2023-02-24 18:00:48 +10:30
James Seibel e0cc271cf1 Fix world generator not closing 2023-02-23 20:19:15 -06:00
James Seibel 5174c71363 Downgrade to Java 8 2023-02-23 19:27:29 -06:00
James Seibel af9215c849 Fix exceptions when closing a world 2023-02-21 21:25:06 -06:00
James Seibel acd78a6067 update a comment in ColumnRenderSource 2023-02-21 19:59:48 -06:00
James Seibel 5c0aef32c1 Partially fix LODs disappearing when moving 2023-02-21 19:56:18 -06:00
James Seibel 924465a788 comment out a couple debug loggers 2023-02-19 17:16:39 -06:00
James Seibel cf34457d20 remove duplicate renameCorruptedFile() code 2023-02-19 12:30:14 -06:00
James Seibel 0615a2917c refactoring 2023-02-18 20:25:25 -06:00
James Seibel 4a3b4a1e23 Move FileUtil into the util package 2023-02-18 20:00:21 -06:00
James Seibel 553c348a0d enable atomic move in MetaDataContainerFile 2023-02-18 18:19:52 -06:00
James Seibel be036fe67a rename MetaData -> BaseMetaData and AbstractMDF -> AbstractMDContainerF
The difference between MetaData and AbstractMetaDataFile wasn't obvious, this should make it a bit more clear
2023-02-18 18:02:44 -06:00
James Seibel 070cdc13e2 rename package dataType -> dataObjects and re-arange children 2023-02-18 17:07:36 -06:00
James Seibel 6ac762d415 remove AbstractRenderSourceLoader
There was only one type of RenderSource so it didn't make sense to keep it
2023-02-18 16:46:17 -06:00
James Seibel 40db02cce3 rename RenderFileHandler -> RenderSourceFileHandler 2023-02-18 16:41:21 -06:00
James Seibel cabc1d1de9 Remove unused array from ColumnRenderSource 2023-02-18 16:20:11 -06:00
James Seibel 5e12edb251 Delete IColumnDataType and refactor ColumnRenderSource
ColumnRenderSource was the only object that inherited it
2023-02-18 16:17:11 -06:00
James Seibel 42623b4583 improve FullDataPointUtil and RenderDataPointUtil header comments 2023-02-18 13:48:30 -06:00
James Seibel 5dfd8d3738 Fix RenderDataPointUtil capitalization 2023-02-18 13:34:05 -06:00
James Seibel 031bde07dd rename ColumnFormatUtil -> RenderDatapointUtil and move to util package 2023-02-18 13:33:09 -06:00
James Seibel 3f91c479f4 rename FullDataPoint -> FullDataPointUtil and move to util package 2023-02-18 13:10:17 -06:00
James Seibel 5afbe961e7 rename ColumnFormat -> ColumnFormatUtil 2023-02-18 12:37:47 -06:00
James Seibel f8e3665e14 Remove unused methods from ColumnFormat 2023-02-18 12:36:54 -06:00
James Seibel 01ebf690f0 refactor ColumnFormat 2023-02-18 12:34:05 -06:00
James Seibel 6f743380dc add long to bitShiftUtil 2023-02-18 12:32:06 -06:00
James Seibel 73edce1580 IColumnDataView minor refactor 2023-02-18 12:01:23 -06:00
James Seibel 3dbc0ee5cd Remove IRenderSource
There was only ColumnRenderSource and several pieces of logic required there to only be ColumnRenderSource, so it didn't make sense to keep the interface.
2023-02-18 12:01:15 -06:00
James Seibel a35a797ce0 move buffer building objects into datatype.render.bufferbuilding 2023-02-18 11:33:09 -06:00
James Seibel 912a7687c3 refactor columnArrayView and interface 2023-02-18 11:25:09 -06:00
James Seibel 16c6dffdd6 Move files into Full and Render dataType packages 2023-02-18 09:53:16 -06:00
James Seibel 3b621ac497 rename/refactor FullDataSource loaders 2023-02-18 09:45:56 -06:00
James Seibel 271bdb9f12 Move Full data sources into their own package 2023-02-18 09:36:59 -06:00
James Seibel fbcf687ef9 rename ChunkSizedFullData -> ChunkSizedFullDataSource 2023-02-18 09:30:12 -06:00
James Seibel e4b5a7cb93 rename several FullData objects 2023-02-18 09:28:58 -06:00
James Seibel 0832555ec0 minor SparesFullDataSource refactoring 2023-02-18 09:28:49 -06:00
James Seibel 13d4c74367 remove unused args in LodRenderSection 2023-02-18 09:13:05 -06:00
James Seibel a97f9cf9b4 Comment out metaData versioning 2023-02-18 08:55:50 -06:00
James Seibel 1916ad49c4 Improve RenderMetaDataFile constructors 2023-02-18 08:55:28 -06:00
James Seibel b16ae15f94 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2023-02-18 07:21:38 -06:00
coolGi e695c18871 Added ability to change vanilla's lod bias 2023-02-18 20:00:39 +10:30
James Seibel 3a1e9adab2 refactor render file and renderBufferHandler 2023-02-17 18:35:29 -06:00
James Seibel c95b0849e3 refactor RenderBufferHandler 2023-02-17 14:37:14 -06:00
James Seibel 0e9f7eb653 minor LodRenderer refactoring 2023-02-17 14:36:33 -06:00
James Seibel 95c59b775a improve RenderSection.reload() and implement isLoading() 2023-02-17 14:36:12 -06:00
James Seibel 4e6d69860b refactor RenderFile classes 2023-02-17 14:35:24 -06:00
James Seibel dc7ddfd527 refactoring 2023-02-17 14:29:23 -06:00
James Seibel 1675d01dfb implement ColumnRenderLoader isEmpty 2023-02-17 14:26:15 -06:00
James Seibel 1adeaad231 rename IDhLevel methods 2023-02-16 14:58:27 -06:00
James Seibel d6397d6444 Improve the casting around SharedApi.currentWorld 2023-02-16 11:30:11 -06:00
James Seibel 449aaf2d3a DhClientServer Level/World refactoring 2023-02-16 10:11:47 -06:00
James Seibel 97440d7a71 Server/Client/Shared Api refactoring 2023-02-16 10:11:27 -06:00
James Seibel d62e709c48 add a fixme comment 2023-02-16 09:53:06 -06:00
James Seibel a1123e89ce Improve Render File format and reading/writing 2023-02-16 09:46:47 -06:00
James Seibel bd9bfd7d0f refactoring 2023-02-16 09:23:20 -06:00
coolGi 49b345776f Merge remote-tracking branch 'origin/new_buildsystem' 2023-02-15 17:08:08 +10:30
James Seibel 7bc8b46ac0 Use the buffer builder thread config on startup
modified config values after start are ignored for now
2023-02-14 20:35:23 -06:00
James Seibel 7e2b5e65be reformatting and renaming 2023-02-14 20:34:28 -06:00
James Seibel c71ca6fd27 reformatting 2023-02-13 21:22:56 -06:00
James Seibel f76eb3c1b2 attempt to prevent an issue for full data with a lot of vertical slices 2023-02-13 21:22:45 -06:00
James Seibel 92a8e16375 refactoring 2023-02-13 21:02:06 -06:00
James Seibel 0cb46c9b57 rename objects from data -> fullData
Also rename SpottyDataSource to singleChunkDataSource
2023-02-13 20:43:55 -06:00
James Seibel 4697f942e2 up the version number from 1.7.0 -> 2.0.0 2023-02-13 20:26:48 -06:00
James Seibel 6ff1d92ce1 rename dataFile -> fullDataFile 2023-02-13 20:24:31 -06:00
James Seibel 228ba2b2e2 Improve corrupted Data File handling 2023-02-13 20:03:54 -06:00
James Seibel 5116cef99a file handling refactoring 2023-02-12 17:48:22 -06:00
coolGi 0c6e620406 Fabric now builds (and works outside the build environment) 2023-02-12 20:11:53 +10:30
James Seibel 41b9e1b404 Fix SparseDataSource array out of bounds exception when reading files 2023-02-11 21:04:36 -06:00
James Seibel 38dc13a34a refactor SparseDataSource read/write data methods 2023-02-11 21:02:37 -06:00
coolGi 5ec91475a4 Made API Jar name use mod_version instead of versionStr 2023-02-12 13:02:56 +10:30
James Seibel 6441f2aa6c Add vertical quality config listener and Api clearRenderCache 2023-02-09 20:24:53 -06:00
James Seibel 1b137eae50 Fix changing vertical quality not updating render data 2023-02-08 07:31:57 -06:00
James Seibel 6a2298dff9 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2023-02-07 07:03:21 -06:00
coolGi 3efeea8987 Optimised the lod noise and added drop off for it 2023-02-07 19:33:46 +10:30
coolGi 0f5efa2036 Merge remote-tracking branch 'origin/main' 2023-02-07 18:44:14 +10:30
coolGi d67cb6b2a9 Fixed up some maths when checking weather a number is valid in the config 2023-02-07 18:34:52 +10:30
James Seibel c001943a5e DataMetaFile and RenderSection minor changes 2023-02-06 07:08:44 -06:00
James Seibel 19e618ea00 Add heightmap vertical quality 2023-02-05 16:38:00 -06:00
James Seibel a08cd3107f Fix generatorMode localizations 2023-02-05 16:37:34 -06:00
James Seibel 8cc9636fa7 update todo comment 2023-02-04 22:51:32 -06:00
James Seibel f44230df40 minor comment updating in LodQuadTree 2023-02-04 22:22:48 -06:00
James Seibel c94cf2a6ec Improve naming/documentation for LodRenderSource/Provider 2023-02-04 22:16:30 -06:00
James Seibel d5a8e1eb1b Refactor LodQuadTree 2023-02-04 22:01:47 -06:00
James Seibel e3caab440a refactor MovableGridRingList 2023-02-04 15:49:44 -06:00
James Seibel 1adf6e0582 reformat movableGridRingList 2023-02-04 15:05:16 -06:00
coolGi 7f5a533827 Updated the lang to the tooltip for noise intensity 2023-01-31 01:35:31 +10:30
coolGi ee8c698d77 Made it so shader auto updates when noise settings change 2023-01-28 20:52:09 +10:30
coolGi deaef0b88d Added support for multiple shaders to be loaded 2023-01-25 19:42:53 +10:30
coolGi 226fa90561 Added noise to the lod's 2023-01-24 18:13:04 +10:30
James Seibel 8b9a2f80b7 add comments to DhBlockPos and Pos2D 2023-01-22 19:56:35 -06:00
James Seibel 365371c5b9 Refactor WorldGenerationQueue 2023-01-22 19:56:24 -06:00
James Seibel e698df0b19 Rename DhLodPos getters to make them more specific 2023-01-22 17:23:44 -06:00
James Seibel fde9f6f129 rename AbstractWorldGenTaskTracker.isValid -> isMemoryAddressValid 2023-01-22 17:12:23 -06:00
James Seibel a249631d76 Rename world generator task objects 2023-01-22 17:09:10 -06:00
James Seibel 3359d6c619 refactor Pos2D 2023-01-21 13:24:13 -06:00
James Seibel ab1967b17f Fix WorldGen crash when closing world with incomplete tasks 2023-01-19 07:49:49 -06:00
James Seibel 3de68248de Fix the world generator running slowly
Thanks for finding the issue Leetom!
2023-01-18 07:52:16 -06:00
James Seibel e631785c9c refactor FullDataSource.neededForPos -> firstDataPosCanAffectSecond
Many thanks to Leetom for explaining the method
2023-01-18 07:40:07 -06:00
James Seibel 7f79f4d39d refactor GenDataFileHandler.onCreateDataFile() 2023-01-18 07:23:36 -06:00
James Seibel 29cf0ead7d refactor and rename selfSearch() -> getDataFilesForPosition() 2023-01-18 07:22:58 -06:00
James Seibel 597cd4629f rename DhSectionPos.sectionDetail -> sectionDetailLevel 2023-01-16 07:54:11 -06:00
James Seibel 59d5b475c5 Remove unused AtomicReference<WorldGenerationQueue> from GeneratedDataFileHandler 2023-01-15 17:19:19 -06:00
James Seibel 7bc6b673ea reformat DataFileHandler 2023-01-15 17:18:48 -06:00
James Seibel 2b930f3fd7 refactor Core world gen queuing 2023-01-15 16:57:42 -06:00
James Seibel 0b6b14177e Minor render object reformatting 2023-01-14 11:11:06 -06:00
James Seibel a27e9bac0c Move ColumnRenderSource file parsing into ColumnRenderLoader 2023-01-13 07:50:21 -06:00
James Seibel 7ea614f257 reformat render source files 2023-01-13 07:09:16 -06:00
James Seibel 723a5f8281 rename RenderBuffer -> AbstractRenderBuffer 2023-01-10 21:47:11 -06:00
James Seibel 98fde3de74 Update the Readme 2023-01-08 20:12:56 -06:00
James Seibel 9b7dfa81da Remove unused methods from EVerticalQuality and DetailDistanceUtil 2023-01-02 13:40:25 -06:00
James Seibel 1a761aad4c Delete the deprecated LevelPosUtil (use DhLodPos or DhSectionPos instead) 2023-01-02 11:18:10 -06:00
James Seibel 9e3f729c8f Replace LevelPosUtil.convert() with DhLodPos.convertToDetailLevel() 2023-01-02 11:13:31 -06:00
James Seibel 7311664acd comment MetaData 2022-12-25 21:45:46 -06:00
James Seibel b02a2d0008 rename MetaDataFile -> AbstractMetaDataFile 2022-12-25 21:42:27 -06:00
James Seibel e26ac63dff Refactor MetaData and MetaDataFile 2022-12-25 21:42:00 -06:00
James Seibel b96622f1cd refactor the AbstractSaveStructure classes 2022-12-17 16:22:21 -06:00
James Seibel 763476e648 Move level (subDim) matching into its own package 2022-12-17 09:48:06 -06:00
James Seibel c0c4cf8b56 Partially update LevelToFileMatcher (File reading incomplete) 2022-12-17 09:44:14 -06:00
James Seibel 575bd5b1e6 Minor refactors for LevelToFileMatcher and PlayerData 2022-12-11 21:32:33 -06:00
James Seibel 38a8c73311 Minor MetaFile reformatting 2022-12-11 17:28:07 -06:00
James Seibel c3c170d07a Add the generatorMode to IDhApiWorldGenerator.generate() 2022-12-10 22:08:16 -06:00
James Seibel 0ab0aeeec6 rename EDistanceGenerationMode -> EDhApiDistantGeneratorMode
This includes moving it into the API and renaming NONE -> PRE_EXISTING_ONLY
2022-12-10 22:07:54 -06:00
James Seibel bf698ad7b9 Make IDhApiEventInjector extend IDependencyInjector<IDhApiEvent>
Some methods were missing when using the API
2022-12-10 21:05:51 -06:00
James Seibel d792031c57 Use bound API World Generators 2022-12-10 11:17:50 -06:00
James Seibel eff161fb24 Remove IWorldGenerator (everything is handled in IDhApiWorldGen) 2022-12-10 09:34:19 -06:00
James Seibel 1489cb0bdb Rename IChunkGenerator -> IWorldGenerator 2022-12-08 21:36:03 -06:00
James Seibel 434abcf1ae Set up the world generator interface for use with the API 2022-12-08 21:32:19 -06:00
James Seibel 581515efc4 Add EDhApiDetailLevel as a reference on DH detail levels 2022-12-05 22:08:01 -06:00
James Seibel 79441b0bdd Remove LodUtil.CEILED_DIMENSION_MAX_RENDER_DISTANCE
Reasoning: The value isn't in use anywhere, we shouldn't be setting a max value anyway since people can get on dimension roofs anyway, and it would be better to allow per-dimension values instead
2022-12-05 22:07:28 -06:00
James Seibel 24260a057a Prep the IChunkGenerator/BatchGenerator for using the API 2022-12-03 19:45:44 -06:00
coolGi 6fd47f360c Fix to issue 446. (special characters in folder name causes crash) 2022-12-01 21:32:37 +10:30
James Seibel be28ed8319 Separate inner classes and refactor world generator code 2022-11-25 17:11:54 -06:00
James Seibel 007e993148 reformat chunk generator code 2022-11-25 15:58:53 -06:00
James Seibel eb0bb8a67d Add a few missing comments to DhLoggerBuilder 2022-11-25 15:57:41 -06:00
James Seibel 00c7f7adaf Minor WorldGeneratorInjector refactoring 2022-11-25 10:08:47 -06:00
James Seibel 0a806c1218 Minor refactoring and Event Test fixes 2022-11-25 09:51:59 -06:00
James Seibel d6a83c8b61 Fix event related null pointer issues 2022-11-24 23:09:00 -06:00
James Seibel 0647d212d6 Fix Event tests not failing correctly 2022-11-24 22:32:37 -06:00
James Seibel 840b02c2db reformat DependencyInjector and ApiEventInjector 2022-11-24 22:32:12 -06:00
James Seibel 2b1837e812 Move Optifine code out of ReflectionHandler and into AbstractOptifineAccessor 2022-11-24 19:09:52 -06:00
James Seibel 4a7af41397 Put delayed objects in DhApiMain into a Delayed class
also improve a few comments
2022-11-24 18:24:13 -06:00
James Seibel aad3a5d2a3 rename DhApiResult.errorMessage -> message 2022-11-24 18:11:16 -06:00
James Seibel 0f06fedb95 rename DhApiEventInjector -> ApiEventInjector
This renaming was because the injector isn't designed to be used from the API, only internally; and externally available objects all start with "DhApi"
2022-11-24 18:05:07 -06:00
James Seibel 6ca2da3f7f Add one time API events (IE setup events)
This allows users to bind to setup events after they've happened and still have the event fire. This is useful for setup since mod load order isn't defined.
2022-11-21 19:26:14 -06:00
James Seibel 1b5a10591b Add IDhApiWorldProxy 2022-11-20 20:39:52 -06:00
James Seibel a935c648e2 un-deprecate McClientWrapper.getWrappedClientWorld()
This was originally done due to splitting up the code into server and client, however this object is just for the client so it shouldn't be an issue.
2022-11-20 20:27:04 -06:00
James Seibel 2ce8692d84 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-11-19 19:06:46 -06:00
James Seibel 0249894386 Add raycasting methods to IDhApiTerrainDataRepo 2022-11-19 18:59:55 -06:00
James Seibel c2d8e16bc0 remove API debug code from ClientApi 2022-11-19 17:03:31 -06:00
James Seibel e6c833a643 Add raycasting to DhApiTerrainDataRepo 2022-11-19 17:02:26 -06:00
James Seibel 1e235f0cd6 Add DhApiVec3i and DhApiRaycastResult objects 2022-11-19 17:02:04 -06:00
James Seibel d3e293db2c Improve the raycasting tests and fix a few directional issues 2022-11-19 17:01:29 -06:00
James Seibel 6eb97f654c Add RayCastUtil and unit tests 2022-11-19 10:20:14 -06:00
coolGi b64fdf214e Added the ChangelogScreen. New changelog screen done 2022-11-18 19:12:25 +10:30
coolGi 77519bde9d Updated updater screen (thanks a lot to Pankakes#0686) 2022-11-17 21:44:43 +10:30
James Seibel 103a03c90f partially functional raycasting 2022-11-16 22:35:56 -06:00
James Seibel d31013a680 Make the API TerrainRepo return all blocks in a given section instead of a single column 2022-11-14 21:40:40 -06:00
James Seibel d283922741 Minor refactoring 2022-11-14 21:39:38 -06:00
James Seibel 60af4429eb Add a couple missing parameters 2022-11-13 22:13:29 -06:00
James Seibel c67079c928 Rename FullDataPoint getDepth() -> getHeight() and getY() -> getBottomY() 2022-11-13 22:11:21 -06:00
James Seibel cd1c12be12 Implement DhApiTerrainDataPointRepo get methods 2022-11-13 21:49:26 -06:00
James Seibel 1099f5ec24 Add IDhApi Biome and BlockState Wrapper objects 2022-11-13 21:45:35 -06:00
James Seibel d723a1fa84 Add a optional payload to DhApiResult 2022-11-13 21:42:11 -06:00
James Seibel 0bd5730128 Add IDhLevel.getFileHandler() 2022-11-13 16:36:50 -06:00
James Seibel f11752da96 Refactor Dh Client/Server/ClientServer Level objects 2022-11-13 16:33:30 -06:00
James Seibel 51601e710a Add DhLodPos getSectionRelative and getSectionPos methods 2022-11-12 20:12:18 -06:00
James Seibel 3dfaed4409 Add a demo/debug method to DhApiTerrainDataRepo 2022-11-12 12:57:40 -06:00
James Seibel 571ecc5e9c minorly reformat IFullDataView 2022-11-12 12:35:37 -06:00
James Seibel c9947d0250 Remove LagSpikeCatcher from ClientApi 2022-11-12 12:35:03 -06:00
James Seibel 53813020d4 Add tryGet() and getMapping() to IDataSource objects 2022-11-12 12:00:22 -06:00
James Seibel 904288e6ec Refactor DataSources 2022-11-12 11:05:59 -06:00
James Seibel 244a1c273c refactor colorUtil 2022-11-10 07:48:48 -06:00
James Seibel 60112e9bce update a constructor comment 2022-11-10 07:48:31 -06:00
James Seibel 378c064629 Add DhBlockPos and DhChunkPos constructors to DhSectionPos 2022-11-10 07:47:59 -06:00
James Seibel 2429cbbb52 Add BitShiftUtil square() and pow() 2022-11-06 21:40:21 -06:00
James Seibel 8099925dc2 Refactor/comment DhSectionPos, DhLodPos, and DhLodUnit
Also add BitShiftUtil to hold bit shift operation aliases for easier reading
2022-11-06 21:25:37 -06:00
James Seibel ae7dd5ba7e minor formatting/comment updates 2022-11-06 16:59:00 -06:00
coolGi 4c2a2fffc1 Merge remote-tracking branch 'origin/main' 2022-11-04 17:35:52 +10:30
coolGi 87e40c0723 Added a lang auto formatter and a missing lang detector and fixed up the lang formatting and added missing options 2022-11-04 17:35:24 +10:30
Morippi 1965785ff6 small fix to cave culling 2022-11-03 18:59:08 +01:00
morippi 1caf6b03b4 I made some error with the commits 2022-11-03 17:51:21 +01:00
James Seibel f1ed837610 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-10-31 22:16:16 -05:00
James Seibel cddf27be45 Rename DhWorld -> AbstractDhWorld and WorldEnv -> EWorldEnv 2022-10-31 20:28:58 -05:00
coolGi b9abfaa573 Resized the logo to be an aspect ratio of 2:1 and updated auto-updater's text 2022-10-30 18:35:45 +10:30
coolGi ed0b03a680 Updated readme to add/remove the libraries we use 2022-10-29 09:16:35 +00:00
coolGi 56f02af579 Finished the self updater 2022-10-28 10:07:46 +10:30
coolGi c091566a86 Added the self updater to forge and fixed standalone jar 2022-10-21 17:31:52 +10:30
coolGi 2e9d118ab9 Added the self updater to forge 2022-10-20 22:47:14 +10:30
James Seibel f85d25900b Merge remote-tracking branch 'refs/remotes/origin/main' 2022-10-05 22:39:11 -05:00
James Seibel 2ec7cc8c6d Refactor ColumnRenderSource 2022-10-05 22:21:10 -05:00
coolGi b1ff93bb91 Changed out the json library with something that we already have 2022-10-04 17:24:25 +10:30
James Seibel ce991cd912 Basic refactoring 2022-10-02 22:22:54 -05:00
James Seibel b8af1794a6 rename FullDataPointIdMap setAndGetId -> addIfNotPresentAndGetId 2022-10-02 21:42:02 -05:00
James Seibel 9fcced23e4 Refactor GLProxy and GLMessage 2022-10-01 23:32:30 -05:00
James Seibel 54e35f0907 Refactor GLProxy 2022-10-01 22:03:05 -05:00
TomTheFurry 8d8de8692b FINALLY fix the issue where some data isn't saved and etc 2022-10-01 15:02:23 +08:00
James Seibel b34778952a rename FullFormat -> FullDataPoint and IdBiomeBlockStateMap -> FullDataPointIdMap
Also refactor FullDataPointIdMap
2022-09-30 21:21:26 -05:00
James Seibel a082f2ae86 basic reformatting 2022-09-30 20:20:22 -05:00
James Seibel 8b1cb258b4 Add interface and abstract prefixes to a few datatype objects 2022-09-29 22:38:23 -05:00
James Seibel 58be4da5ca Auto format and move around a few comments 2022-09-29 22:15:15 -05:00
James Seibel 956f13c674 Add "Dh" prefix to DistantHorizons Worlds 2022-09-29 21:50:47 -05:00
James Seibel 1f6f03745a Add "Dh" prefix to DistantHorizons levels 2022-09-29 21:49:11 -05:00
coolGi 52b26c2046 Fixed up some listener stuff in the config 2022-09-25 12:24:41 +09:30
coolGi 825c72d572 Merge remote-tracking branch 'origin/main' 2022-09-19 19:07:13 +09:30
coolGi dd11b89bb9 Added a way of just running the config ui by itself so I can do quicker tests 2022-09-19 19:07:07 +09:30
TomTheFurry 905e73fd1c Continue improving stabilises of the system 2022-09-19 14:54:45 +08:00
TomTheFurry 4158573129 Add render source flag debug mode & fix sparse source to render source transform bug 2022-09-19 12:28:39 +08:00
TomTheFurry b4ea8854a8 Fix critical issue causing chunk to lod build extremely slow, and also partly fix sparse data source loading (where I used wrong array instead of loaded data array.) Also improve ChunkToLodBuilder building loops to support multithreaded building 2022-09-18 16:30:39 +08:00
coolGi 22628983a7 Merge remote-tracking branch 'origin/main' 2022-09-18 15:31:17 +09:30
coolGi afd88470d8 Added some api notes and moved JarMain to the jar folder 2022-09-18 15:31:07 +09:30
TomTheFurry 2e773279b7 Rework the Level data member organization and make world gen enable/disable based on settings 2022-09-18 13:58:02 +08:00
TomTheFurry f91629bf21 Make it build again 2022-09-18 12:55:26 +08:00
James Seibel 47645a6346 Add worldGen, Override, and DataRepo variables to DhApiMain 2022-09-16 23:57:55 -05:00
James Seibel 52ed3c8733 Rearrange API packages 2022-09-16 23:41:57 -05:00
James Seibel 6c249335c5 Move some API objects into the DhApiMain object 2022-09-16 23:24:25 -05:00
James Seibel d0f43a6760 re-add level event parameters 2022-09-16 22:55:21 -05:00
James Seibel 9adf2a75f8 Make Core Level Wrappers implement API wrappers 2022-09-16 22:55:03 -05:00
TomTheFurry fc5cb6796b Clean up transparency and buffer render orders. 2022-09-16 17:54:08 +08:00
James Seibel 690dd319cb Set up the API config 2022-09-15 20:31:41 -05:00
James Seibel 541fbbb36b Remove "config" from API config method names
IE getFogConfig()
The additional config was already implied.
2022-09-15 20:30:49 -05:00
James Seibel 14bd059a88 implement and modify API config interfaces 2022-09-15 19:33:25 -05:00
TomTheFurry 6fc31192c2 No longer saving empty files & rework isEmpty flag to be more stable & work on genQueue issue
Note: Known half fixed issue where in large render distance, the genQueue will block server thread for ages to build up gen request index.
2022-09-16 00:18:26 +08:00
James Seibel ec738aea22 Re-add api event tests 2022-09-13 21:56:03 -05:00
James Seibel 92a98aba96 Hook up the API events (some are missing parameter objects) 2022-09-13 21:44:00 -05:00
James Seibel f6a1901ef8 Move several Dependency Injectors into the API 2022-09-13 21:38:57 -05:00
James Seibel cceb2c38e4 Fix several API packages missing from "methods" 2022-09-13 20:00:54 -05:00
James Seibel 6e229b86b0 fix the semantic version number 2022-09-13 07:42:32 -05:00
TomTheFurry 4d09441399 Start trying to get chunk updating to work... 2022-09-13 12:17:37 +08:00
James Seibel c80a5b102d Move config enums into API and setup groundwork for config interfacing 2022-09-12 22:16:13 -05:00
James Seibel 4f1203b32c Flip API -> Core dependency to Core -> API
Very rough, a decent amount of the API isn't hooked up to anything.
2022-09-12 21:53:55 -05:00
TomTheFurry 1bfc6db8b4 Fixed some bugs when moving across dimensions 2022-09-13 00:09:29 +08:00
TomTheFurry 54d41bfc3f Rename 'io' package to 'file' 2022-09-12 23:39:58 +08:00
TomTheFurry 0914b825fe Move ParsedIp class into 'util.objects' 2022-09-12 22:48:58 +08:00
TomTheFurry 3f23ef960b Reorganize all the classes and move them around to make more sense and be easier to navigate. Also removed/unwrapped the 'a7' temp package. 2022-09-12 22:43:06 +08:00
TomTheFurry dfc75f2a65 Nuke no longer used files and fix bugs where I'm using the wrong class for doing data formats 2022-09-12 22:13:20 +08:00
James Seibel f2c19ef3a3 comment out failing unit test 2022-09-11 22:41:14 -05:00
James Seibel 14b855ada6 Fix incorrect API tests (and move them to the API sub-project) 2022-09-11 22:25:22 -05:00
James Seibel d21e334e15 move Client/Server API back into the Core sub-project 2022-09-10 20:02:50 -05:00
James Seibel ba701eb014 Fix the level API events 2022-09-10 17:10:48 -05:00
TomTheFurry 0a70ec9986 Fix region load bug & fix corrupt file load error handling & fix downsampling bug & fix sparse failing to save the promoted version 2022-09-11 00:12:22 +08:00
coolGi 050d88dd13 Made the config abstract (so it can be used by other mods using our api) 2022-09-09 23:12:20 +09:30
TomTheFurry 1b0c97ffca Fix adj sections rendering quad merge bug 2022-09-09 14:37:03 +08:00
TomTheFurry 1dadf056da Fix lighting 2022-09-09 14:16:57 +08:00
James Seibel e61da323d8 suppress a couple unchecked cast warnings 2022-09-08 21:42:21 -05:00
James Seibel 2328f44e3a Fix API injector tests 2022-09-08 21:31:36 -05:00
James Seibel b0b5007341 Fix API Event Injector tests 2022-09-08 21:04:54 -05:00
James Seibel 35b00165a2 Partially implement/uncomment worldGeneratorOverride 2022-09-08 20:51:49 -05:00
James Seibel 659c62d4b4 Move worldGen Api Enums into the API sub-project 2022-09-08 20:15:54 -05:00
TomTheFurry 0e001dd2d3 *Kinda* working now. Async the updateCache to io thread, and fix stream close issue 2022-09-08 22:31:24 +08:00
TomTheFurry 00a18352d8 Fixed various bugs & Add some info to be logged to F3 2022-09-08 21:18:22 +08:00
TomTheFurry a53bdc6abf Finish the previous merge issue 2022-09-08 17:41:31 +08:00
James Seibel cecd01b7d9 Merge 2022-09-07 07:47:18 -05:00
James Seibel 09ceab5c70 Comment out API/API test code so we can get everything compiling 2022-09-07 07:37:07 -05:00
James Seibel 53ded97714 Move Core API items into the api.external.coreImplement package 2022-09-06 22:22:27 -05:00
James Seibel 5a2366eb13 Move CoreDhApiRenderParam into a better package 2022-09-06 22:10:09 -05:00
James Seibel 5e775e4c88 move The ConfigWrapper to the API sub-project 2022-09-06 21:39:51 -05:00
James Seibel 75b23ee904 Move and update API Events to the API sub-project 2022-09-06 21:25:11 -05:00
James Seibel dbae5a3b05 Move DhApiEventRegister to API sub-project 2022-09-05 21:41:32 -05:00
James Seibel b5a05bfe21 Add CoreDhApiRenderParam and move DhApiRenderParam to the API Sub-project 2022-09-05 21:38:52 -05:00
James Seibel 71f55ef0e3 Add (core)Mat4f -> DhApiMat4f constructor 2022-09-05 21:38:05 -05:00
James Seibel f323eaf666 Remove DhApiMat4f from Mat4f 2022-09-05 21:12:00 -05:00
James Seibel 7ee113ddff Replace the override priority enum with an int 2022-09-05 21:11:29 -05:00
James Seibel f61d113493 Move config API Enums to the API sub-project 2022-09-05 19:28:57 -05:00
James Seibel eaadd6fc71 Move API Interfaces into the API sub-project 2022-09-05 19:18:33 -05:00
James Seibel 89a46ae5e1 Move misc API items into the API sub-project 2022-09-05 19:14:43 -05:00
James Seibel 7a00ba09a2 Move API tests to the API sub-project 2022-09-05 18:53:12 -05:00
James Seibel 9eefd53fdc Fix test compiling in API
TODO: why do we need manifold to compile the API when any test file is present?
2022-09-05 16:08:40 -05:00
James Seibel 17d2e61688 Start moving API files to the API sub-project 2022-09-05 11:46:13 -05:00
James Seibel e24aa32cce Make public loggers private 2022-09-05 11:37:00 -05:00
James Seibel b33f7bbabd add commonInterface sub-project 2022-09-05 11:27:16 -05:00
James Seibel 758b5b6db6 Remove apiInterface and coreShared sub-projects 2022-09-05 11:27:01 -05:00
James Seibel 1f8bd81958 Remove dependencies on ClientApi.LOGGER
each class should have it's own logger instead
2022-09-05 11:25:46 -05:00
TomTheFurry 950a1d34ea Overhaul how files and partially loaded sources are handled
Note: Currently it DOES render, it just... requires the ENTIRE area to be generated. This bug will be fixed... tomorrow. I hope. (It's like 11:35pm here so gimme a break!)
2022-09-05 23:36:51 +08:00
coolGi bcc65b8153 Fixed issue when setting a config value in the file to a different type breaks game. 2022-09-02 15:59:00 +09:30
coolGi a5ade02dec Fixed issue #390 (problems with BCLib fog) 2022-09-02 15:14:03 +09:30
coolGi 1aaae5c1da Started work on auto updater screen 2022-09-02 12:12:50 +09:30
coolGi cf62774a78 Added auto updater lang 2022-09-02 10:41:38 +09:30
James Seibel 2fdf2b9cfc rename coreApiCommon -> coreShared 2022-08-30 21:50:33 -05:00
James Seibel 55463f2377 add apiInterface and coreApiCommon subprojects
Currently they are just shells and they may be renamed later
2022-08-30 07:54:57 -05:00
James Seibel 43d53e71c9 rename/reorganize the "_Msic Files" folder 2022-08-30 07:46:40 -05:00
James Seibel 14d0e65c68 Move the api sub-project into core 2022-08-30 07:39:59 -05:00
James Seibel 9799b0a263 move core into a folder named "core"
This is so we can have multiple sub-projects in the core repo
2022-08-30 07:36:19 -05:00
Morippi 519a4c1452 Added configs for transparency (currently I'm faking the light for ocean floor) 2022-08-25 11:23:49 +02:00
Morippi 30959cfdd0 fixed water "walls" 2022-08-25 00:03:47 +02:00
Morippi 717c33078f Added section ordering (by position) + small fixes on transparency 2022-08-24 23:02:27 +02:00
Morippi 8b877a5f1a Divided transparent from opaque in the rendering (transparent are not rendering for some reason) 2022-08-24 21:54:56 +02:00
Morippi 427105189b small fixes + removed lodBox 2022-08-24 16:32:01 +02:00
Morippi 821feae1d5 Improved ocean floor adjCulling 2022-08-24 15:43:46 +02:00
Morippi 29c5d70171 enabled and fixed ocean floor (light not working correctly) 2022-08-24 15:15:21 +02:00
Morippi 5e91824c7d Disabled fake floor 2022-08-24 13:53:06 +02:00
Morippi 9575429296 Fixed transparency and added some boolean to disable it 2022-08-24 13:35:51 +02:00
Morippi 22f9d20aae another small fix (sorry) 2022-08-24 13:16:55 +02:00
Morippi 45ec219bb5 Small fix 2022-08-24 13:16:09 +02:00
Morippi ae0eb0fd91 Redoing everything on transparency, I hope I'm not breaking anything 2022-08-24 13:15:01 +02:00
James Seibel 3785426793 Add Server save API Event 2022-08-23 22:43:24 -05:00
James Seibel d1126afc44 Add DhWorld.GetAllLevels() and ILevel.GetLevelWrapper() 2022-08-23 22:43:08 -05:00
James Seibel f203679de4 Add Client/Server load/unload events
Add client level save event
stub out server level save event
2022-08-23 21:32:46 -05:00
James Seibel e2d90f6627 Remove module-info
We are going to use a separate (intellij?) module instead for the API
2022-08-23 21:18:38 -05:00
TomTheFurry 75ab228e46 Created SparseDataSource 2022-08-23 13:27:33 +08:00
James Seibel 0b7bd84af5 Implement DhApi Before/After render events 2022-08-21 22:40:34 -05:00
James Seibel 322ccee672 Add helper methods to Mat4f objects 2022-08-21 22:37:56 -05:00
James Seibel 9c669c2fe6 Move Render helper methods into RenderUtil
Also refactor said methods along with ClientApit
2022-08-21 22:37:09 -05:00
James Seibel c69b7d14bf Simplify ClientApi rendering method 2022-08-20 22:38:50 -05:00
James Seibel ae60c8e974 Move logToChat to IMcClientWrapper 2022-08-20 18:27:33 -05:00
James Seibel 5819d8c3f3 Auto-format 2022-08-20 18:25:36 -05:00
James Seibel a179fb9ff9 auto-format ClientApi 2022-08-20 18:14:01 -05:00
James Seibel c491a36b71 Re-add the "here be dragons" dev build message 2022-08-20 18:03:12 -05:00
TomTheFurry 78ccb8aaf2 Making multi-level works a bit better... Needs more changes to work well though... 2022-08-20 21:24:42 +08:00
TomTheFurry 90fe892291 Bypass critical issue with map() returned buffer holding the file open til GC. 2022-08-20 20:56:17 +08:00
TomTheFurry b80bfe813c Fix bugs in CQCPTree 2022-08-20 15:49:12 +08:00
TomTheFurry 0dafdc527a Continue fixing gen related issues 2022-08-18 19:46:35 +08:00
TomTheFurry 1cc00b7174 Did the generation stuff change 2022-08-18 18:29:04 +08:00
James Seibel 3995e07d91 Stub out a potential fix for #287 (optifine resolution) 2022-08-16 20:29:12 -05:00
coolGi 04220584b3 Added an onModify to the config 2022-08-16 17:10:34 +09:30
James Seibel b13203c62e Fix a few DhApiResult constructors 2022-08-15 22:24:26 -05:00
James Seibel 68ef9126ed Hook up DhApiWorldGeneratorOverrideRegister
set up Dependency Injectors for clearing their bound items.
add simplified constructors for DhApiResult
2022-08-15 22:21:08 -05:00
James Seibel c7a84831e9 Replace system.out in DhApiEventInjector 2022-08-15 21:56:10 -05:00
Ran 633ad1f490 Add module-info.java 2022-08-15 13:37:26 +00:00
TomTheFurry 1fc6487374 Start rework on the generationQueue system so that it hooks directly into base DataFileHandler instead of watching for PlaceHolder obj.
This also means a hyper complex concurrent customized quad tree implementation... So, great.
2022-08-14 23:42:41 +08:00
James Seibel d3732306a6 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-08-13 17:39:05 -05:00
James Seibel 25d4b8ab3d Improve the curvature shader with code from stduhpf
Currently untested and the old code is still included
2022-08-13 17:38:48 -05:00
TomTheFurry e5f3e2e7b0 Start working on a new concurrent container... 2022-08-13 14:35:44 +08:00
TomTheFurry 43ec3a081d Make multi-level works again! 2022-08-10 20:47:10 +08:00
TomTheFurry 88ccc76045 First fix on light & impl render source direct write 2022-08-09 16:08:54 +08:00
TomTheFurry 6a49a100e7 Fixed multiple major RAM issues. Next one is the 100/s reload issue... 2022-08-08 23:00:30 +08:00
coolGi 6c8a7ef989 Merge remote-tracking branch 'origin/main' 2022-08-06 20:33:51 +09:30
coolGi 6aab2d287c Added an auto updater when game starts 2022-08-06 20:32:09 +09:30
TomTheFurry d58cd204cc Implemented untested FullDataType serialize & deserialize 2022-08-06 00:08:16 +08:00
coolGi be74011e5e Made jar use modrinth instead of gitlab 2022-08-05 21:53:44 +09:30
TomTheFurry f6e5bdbd2f Fixed block color & improve close 2022-08-04 20:03:43 +08:00
TomTheFurry 9a8145ff45 Fixed all the data view bugs 2022-08-04 19:07:32 +08:00
James Seibel 46bc17e9ac Add (commented out) module-info.java 2022-08-02 21:40:14 -05:00
TomTheFurry 6fe2b6f331 Something renders! And introduce mem leaks, missing texture color, and inverted lights! What a great set of features! 2022-07-30 16:06:54 +08:00
TomTheFurry 823da76896 Fix forge wrong proxies, fix generator shutdown, fix batch gen incorrect timeout, 2022-07-30 00:11:36 +08:00
morippi 2e833136f6 Added new merged (it's commented out, when build is working we can test it) 2022-07-28 14:54:29 +02:00
TomTheFurry f08e7974cd Fix up all file IO bugs, FullFormat bugs, FullToColumn bugs, & Tree assert issues 2022-07-28 19:33:47 +08:00
James Seibel 64ee49de03 Finish the WorldGenInjector tests 2022-07-27 21:58:27 -05:00
James Seibel c29289d602 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-07-27 07:53:22 -05:00
James Seibel b9cd99cb6c Add basic unit tests for WorldGenInjector 2022-07-27 07:53:19 -05:00
TomTheFurry 6862f5667b Improve generationQueue and add more and better logging and fix double close on DhLevels 2022-07-27 14:49:03 +08:00
James Seibel 30aba99c27 Add WorldGeneratorInjector and start unit tests 2022-07-26 22:09:49 -05:00
James Seibel a49512f750 Add generic typing to OverrideInjector 2022-07-26 21:24:52 -05:00
TomTheFurry 89e2d10f24 Fixed 1 wrong logging 2022-07-26 23:36:49 +08:00
TomTheFurry 2abb117d2e remove ghost imports.... 2022-07-26 23:31:28 +08:00
TomTheFurry c110e268b8 Fixed IO bugs 2022-07-26 23:14:28 +08:00
TomTheFurry 78c6ae3b90 Hey Fixed more maths! 2022-07-26 22:20:26 +08:00
TomTheFurry 50810c7406 Fixed realllly wrong maths 2022-07-26 21:54:32 +08:00
TomTheFurry e903ec53f5 Continue fixing bugs... Lots of bugs. 2022-07-26 20:17:26 +08:00
TomTheFurry a4546c63e3 Fix bunches of bugs. Quad tree ticks! Gen call is fired! Chunk gen works! Next to fix: File updates 2022-07-26 17:06:50 +08:00
TomTheFurry 50c5d044f1 Trying and failing to find a bug. Gonna call it a night. 2022-07-26 01:04:01 +08:00
TomTheFurry 5947716a6a Resolving one by one many bugs lying around 2022-07-26 00:13:00 +08:00
coolGi 85fec37bed Removed some jank code 2022-07-25 23:11:01 +09:30
TomTheFurry 49769d0aac Fix stuff so fabric works and no crash. Sadly nothing renders though... 2022-07-25 21:23:36 +08:00
James Seibel d7b73f378e Fix ApiEnum test failures 2022-07-25 07:46:25 -05:00
TomTheFurry ff2763df9e Rework forge to new a1.7 structure. Minecraft runs and it builds. But crash on loading into world due to... weirdness 2022-07-25 19:44:11 +08:00
TomTheFurry 973be40324 Fix and port batch generator to new Generator API. Now if we just fix up forge, and there's no bugs (impossible), then there's enough implemented to finally have something shown! Yay! 2022-07-25 13:38:33 +08:00
TomTheFurry 5f486b6258 Work on world generator integration to a1.7 rework 2022-07-23 16:40:19 +08:00
James Seibel cdbee5e239 Add a missing test case and fix a typing issue with dependencyInjector 2022-07-21 21:25:17 -05:00
cola98765 b95f095721 why did I root the alpha? 2022-07-21 18:35:27 +02:00
TomTheFurry 5b1568e9a6 Fixing stuff towards successful builds. Now stuck on thinking how the world gen stuff should return and apply the gen chunk to data though... 2022-07-21 17:40:27 +08:00
James Seibel 109f2ea7a4 Finish OverrideInjector and add unit tests 2022-07-20 07:11:46 -05:00
James Seibel 0e73aa1820 More test refactoring 2022-07-20 07:00:11 -05:00
James Seibel c4a9a72118 More refactoring 2022-07-19 20:22:11 -05:00
James Seibel d5f7818252 Refactor/Clean Dependency tests before adding Override tests 2022-07-19 19:57:03 -05:00
James Seibel 3f89c485e1 Add OverrideInjector 2022-07-19 19:46:17 -05:00
James Seibel c11f63f606 DependencyInjector children fixes 2022-07-19 19:40:06 -05:00
coolGi 1c2a4a43d0 Merge remote-tracking branch 'origin/main' 2022-07-18 15:16:30 +09:30
coolGi adc51bab9a Added runnable and performance impact to the config 2022-07-18 15:16:22 +09:30
James Seibel dc466e61d1 Add DhApi Client/Server Save events (and fix other events) 2022-07-17 20:48:28 -05:00
James Seibel 02157d52f6 Add DhApi level load/unload objects 2022-07-17 20:40:31 -05:00
James Seibel 299a7c67f0 Rename DhApi event Parameter objects 2022-07-17 20:33:50 -05:00
James Seibel 484c95e26a Make event parameter objects internal classes 2022-07-17 20:29:29 -05:00
James Seibel 45f7ca2954 Add DhApi Before/After Init Event objects 2022-07-17 20:15:07 -05:00
James Seibel a7c3f9ec20 Add DhApi Before/After Render Event objects 2022-07-17 20:09:14 -05:00
James Seibel c7e4781a95 Add unit tests for the DependencyInjectors 2022-07-16 22:40:14 -05:00
James Seibel 9a8ed301cb Rename SingletonHandler -> SingletonInjector
This was done with all Dependency Injection objects because there was a name conflict with DhApi event handlers. (This new name is also more specific and makes sense for dependency injection).
2022-07-16 22:09:22 -05:00
James Seibel 8c0767523d Add DhApiEventHandler and hook up EventRegister
add supporting event interface objects
refactor api.implementaion.interfaces
2022-07-16 22:06:29 -05:00
James Seibel 88915ca92f Improve DependencyHandler for DhApiEventHandler support
Specifically dependencyHandler can now optionally store multiple implementations for each dependency interface.
2022-07-16 22:02:37 -05:00
James Seibel 207eded4b4 Improve anotherQuestion docker documentation 2022-07-16 20:48:14 -05:00
James Seibel c01fc2ed86 Remove DhApi worldGenerator unregister methods
Also fix capitalization for the register methods
2022-07-15 22:07:32 -05:00
James Seibel 3d19fec723 Revamp DependencyHandler
The dependency handlers are now singletons instead of static, this prevents almost all duplicate code as each handler can now extend the parent DependencyHandler.

Handlers no longer have to finish binding before being used, and they no longer have to call runDelayedSetup() before being used either. However dependencies that have circular references still need the runDelayedSetup() method to be called at somepoint; there will just be a warning if they are get() before that setup was done.
2022-07-15 21:58:48 -05:00
James Seibel 6b5c14cdd9 fix a typo 2022-07-15 07:17:12 -05:00
James Seibel 1bd3ce8809 Major API Package refactor 2022-07-14 22:15:07 -05:00
James Seibel e6937d010f Start setting up the DhApi world generator overriding 2022-07-14 21:54:06 -05:00
James Seibel 51de4da845 Minor cosmetic/warning changes/fixes 2022-07-14 21:44:46 -05:00
James Seibel b1c6ff9588 Improve DhApi event handling names and organization 2022-07-14 07:48:46 -05:00
James Seibel 889e983cc5 Continue setting up the DhApi Rendering events 2022-07-13 22:06:52 -05:00
James Seibel 4f6433ee0f Improve IDhApi Render events 2022-07-13 21:24:11 -05:00
James Seibel e04f1d9dd5 Start adding a event API system 2022-07-13 07:54:34 -05:00
James Seibel 9673150fa1 Rename and add DhApi to a few classes 2022-07-13 07:30:22 -05:00
James Seibel 32747baadf Create the outline for the TerrainDataApi methods and objects 2022-07-11 22:14:14 -05:00
James Seibel 6629ec9dc0 Set up the API packages for data and overriding
data - getting/setting terrain data
overriding - overriding DH systems
2022-07-11 21:31:33 -05:00
James Seibel 9a91b8f306 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-07-11 20:56:37 -05:00
James Seibel 78fe3923e2 DhApi config refactoring 2022-07-11 20:56:34 -05:00
coolGi cca82fd67a Changed the design to the installer GUI 2022-07-11 16:06:29 +09:30
coolGi cd10fc013a Save commit 2022-07-10 23:34:05 +09:30
coolGi 7c6b4ef059 Merge remote-tracking branch 'origin/main' 2022-07-10 16:37:54 +09:30
coolGi 172a6d9239 Made version numbers more readable in jar 2022-07-10 16:37:42 +09:30
James Seibel ed312cb45e Add AnotherQuestion Docker setup instructions 2022-07-09 17:39:03 -05:00
coolGi d617d2b91d Added an auto installer (works with everything except when downloading from cursedforge cus it is being annoying) 2022-07-08 21:01:42 +09:30
James Seibel 027406ffca Fix a few misc DhApi's and comment World Gen DhApi 2022-07-05 21:49:35 -05:00
James Seibel 267da77a0a Update DhApi Threading comments 2022-07-05 21:35:18 -05:00
James Seibel e9c558eefe Improve/fix DhApi Multiplayer 2022-07-05 21:28:35 -05:00
James Seibel 9434275e51 Move some comments and improve DhApi Debugging 2022-07-05 21:23:42 -05:00
James Seibel cedffb03d8 Update the DhApi buffer comments and move one item
Geometry rebuild frequency is more of a graphic setting than a buffer setting.
2022-07-05 21:17:22 -05:00
James Seibel 2f9404e203 Improve the DhApi fog comments and add types 2022-07-05 21:12:32 -05:00
James Seibel f277121148 Add renderingEnabled to DhApi Graphics Config 2022-07-05 20:35:43 -05:00
James Seibel 5c6a511c42 Polish and fix DhApiGraphics
Add types to the generics
Add comments to the methods
Fix a incorrect type
2022-07-05 20:21:11 -05:00
James Seibel 890904cfe8 rename ERendererType -> ERendererMode
The enum didn't change what type of renderer was used, it just changed how the renderer was used (on/off/debug).
2022-07-04 23:01:23 -05:00
James Seibel c98ae392eb Clean up the headers for the API methods 2022-07-04 22:49:09 -05:00
James Seibel 6a6ab4bd78 add instructions to setup a docker runner 2022-07-04 22:09:18 -05:00
TomTheFurry ab7b97b29c Start nuking old files + work on FullData -> ColumnData logic 2022-07-04 00:18:00 +08:00
James Seibel 32fd3b6084 Add API Geometry Config 2022-07-02 22:42:17 -05:00
James Seibel e0947d3490 Add API Debug Config 2022-07-02 22:11:52 -05:00
James Seibel 0adf9b31cf Fix an incorrect API config generic type 2022-07-02 22:03:13 -05:00
James Seibel aabf087f55 Api threading config comments 2022-07-02 22:02:04 -05:00
James Seibel bff4797ab4 Add a missing graphic api method 2022-07-02 21:57:30 -05:00
James Seibel 6386cc5d88 Add Multiplayer config API 2022-07-02 21:52:09 -05:00
James Seibel d92b1f1032 Add World generator API config 2022-07-01 22:02:57 -05:00
James Seibel 1855e27d29 Rename and move EFogSettings -> FogSettings
It wasn't an enum so the prefix and package were wrong
2022-07-01 21:35:01 -05:00
James Seibel 957466b419 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-07-01 21:21:56 -05:00
James Seibel 3f757e8c32 Add DhApiGraphics settings 2022-07-01 21:21:54 -05:00
TomTheFurry 932146eea8 Milestone!! Both fabric:runclient & fabric:runserver now works!!!!! (in 1.18.2 for now) 2022-07-01 18:17:07 +08:00
TomTheFurry 1c63dd5183 It now able to join level without error spams! 2022-07-01 17:05:52 +08:00
TomTheFurry bdc8384c49 It... builds? 2022-07-01 15:05:55 +08:00
James Seibel c77f8e254b Add more DhApiGraphic configs 2022-06-30 22:51:05 -05:00
James Seibel 9299e2d53f Add Fog Config API methods 2022-06-30 22:16:37 -05:00
James Seibel 00118ea885 Add GenericEnumConverter 2022-06-30 20:37:00 -05:00
James Seibel 50dc8efafc Add converters to DhApiConfig
This allows Core and Api to use different objects.
2022-06-30 07:55:20 -05:00
coolGi 2399583841 Added network stuff to standalone jar 2022-06-26 20:28:32 +09:30
TomTheFurry 82ef1581dd Finish up 99% of file & cache handling + creation + management + many things 2022-06-25 23:12:17 +08:00
coolGi 2bb78fcc88 Forgot to push this 2022-06-24 22:53:22 +09:30
coolGi a374d58907 Added more stuff for the standalone installer 2022-06-24 22:50:21 +09:30
TomTheFurry 13b820e17a If this serializer stuff works first try than I'm surprised 2022-06-23 22:46:25 +08:00
coolGi 30248dcaac Added svg logo and started work on the installer 2022-06-23 23:13:44 +09:30
TomTheFurry 66c9feda6e Missed that 2022-06-23 21:20:50 +08:00
TomTheFurry 7cda3251eb Continue on the full data stuff 2022-06-23 21:18:13 +08:00
TomTheFurry 0df4011a9a Full Data Source half done! 2022-06-23 18:30:33 +08:00
TomTheFurry bc194f8e6c Start working on Full Datatype 2022-06-23 16:37:28 +08:00
TomTheFurry 491f8bea4c Cleanup 2022-06-23 13:23:41 +08:00
TomTheFurry b780a975ee Finish up the level split of 3 type of levels: ClientOnly, ClientServer, and ServerOnly 2022-06-23 13:22:16 +08:00
TomTheFurry 74e58f5043 Finish up the level split of 3 type of levels: ClientOnly, ClientServer, and ServerOnly 2022-06-23 11:19:57 +08:00
TomTheFurry 04bc771c6d Continue refactoring, and starting to hook up all the loose pieces 2022-06-22 22:13:08 +08:00
TomTheFurry dc1c130fb9 2nd Refactor started. Split to 3 type world structure 2022-06-22 20:43:00 +08:00
TomTheFurry 976e36e80c Moved a7 package 2022-06-22 17:01:11 +08:00
coolGi 1d4c292e06 Made jar run without fabric api 2022-06-19 14:41:20 +09:30
James Seibel 602d2c4016 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-06-16 19:57:41 -05:00
TomTheFurry fd58b10800 Merge branch 'FixTypos' into 'main'
Fix typos

See merge request jeseibel/distant-horizons-core!6
2022-06-16 13:28:59 +00:00
svr333 9ada9cc463 Fix typos 2022-06-16 13:51:37 +02:00
TomTheFurry 9ffc6e5a93 Continue chipping on it 2022-06-16 14:23:10 +08:00
TomTheFurry 742f8b53bb Continue work on the complex concurrent file system 2022-06-15 22:17:59 +08:00
unknown b2942f51e2 Work on async data system 2022-06-14 15:30:21 +08:00
James Seibel b13559b172 remove api version numbers and other renaming 2022-06-13 21:19:47 -05:00
coolGi 37384d8b8b Started work on 1.19 for main branch 2022-06-13 15:58:51 +09:30
coolGi fef487f698 Removed most cases of LodConfigWrapperSingleton 2022-06-11 22:27:15 +09:30
coolGi 33f999d139 Fixed a small bug fixing crash when config directory dosnt exist 2022-06-11 19:24:26 +09:30
James Seibel c880d80925 Extract a interface for DhApiConfig
DhApiConfig (and objects like it) should use interface wrapper combos so to prevent issues for implementing devs.
2022-06-09 21:32:19 -05:00
James Seibel 6a15705b51 Prepend "E" to all enums
Similar to how "I" is prepended to all interfaces.

Also Intellij appears to have removed some unneeded imports.
2022-06-09 21:07:08 -05:00
James Seibel fb83a2eaf9 Move several Api Enums back into Core 2022-06-09 20:59:33 -05:00
James Seibel 1743aad851 Add Api Enum Unit tests 2022-06-09 20:54:18 -05:00
James Seibel 6df38f9c7c Replace DhApiFogColorMode with FogColorMode 2022-06-09 20:52:33 -05:00
James Seibel 8c31236ccd Start adding API tests 2022-06-06 22:25:33 -05:00
coolGi 2410ad9f23 Why did this rename itself 2022-06-03 17:18:55 +09:30
coolGi cd721277e7 Merge branch 'tmp'
# Conflicts:
#	src/main/java/com/seibel/lod/core/config/types/ConfigEntry.java
2022-06-03 17:16:25 +09:30
coolGi e497b5f9e8 Renamed Main to ForgeMain and added some config ui comment stuff 2022-06-03 17:13:28 +09:30
James Seibel 83fac52334 Revamp the API to use API objects and enums 2022-06-02 22:33:52 -05:00
TomTheFurry 4d2e68e4e5 Fix up multiple errors and init issues everywhere 2022-06-02 17:38:19 +08:00
TomTheFurry 145260bf6d Fixup some init order errors and work on able to enter world. 2022-06-02 13:54:15 +08:00
TomTheFurry d5e24ad2bb Rework fabric hooks to use more fabric api if possible
(Since, honestly, their hooks location is way better when it exists...)
2022-06-02 12:57:32 +08:00
TomTheFurry f4f186ff78 Working on actually hook up events to use new one 2022-06-01 22:55:57 +08:00
TomTheFurry 94b20a363d Hey, Core builds now! (No clue what would happen though) 2022-05-30 22:35:58 +08:00
James Seibel e862124c68 Make API setters return success booleans 2022-05-28 18:22:09 -05:00
James Seibel 8133620fcf Add a couple missing helper methods to the config 2022-05-26 20:28:28 -05:00
James Seibel 1182a0cac3 Rename ConfigEntry.useApiOverwrite ->allowApiOverride 2022-05-26 20:28:14 -05:00
coolGi2007 1809721665 Why dosnt F3Screen not have a .java at the end of its name? 2022-05-26 09:25:06 +00:00
coolGi e8f79f8bec Added some stuff for the f3 screen 2022-05-26 08:48:58 +00:00
coolGi 030fb3b667 Refactored some config stuff and removed annotations 2022-05-26 17:55:16 +09:30
TomTheFurry 1dd947e573 Quick merge fix 2022-05-26 12:45:37 +08:00
TomTheFurry f35cf673e1 Working on connecting the dots with a7 stuff 2022-05-26 12:40:29 +08:00
James Seibel 510df79f90 Move Config into the config package 2022-05-25 21:55:53 -05:00
TomTheFurry 83540cf2d5 Clean up some stuff 2022-05-26 10:33:24 +08:00
TomTheFurry a10e82651d First I think somewhat prob should work renderbuffer impl? 2022-05-25 22:44:47 +08:00
TomTheFurry 987dfbc87f Continue work on Saving the data.. 2022-05-23 20:20:27 +08:00
TomTheFurry b391252c03 Continue work on Saving the data. 2022-05-21 14:46:17 +08:00
TomTheFurry af82e4a6d4 Fix up QuadTree 2022-05-17 19:48:49 +08:00
TomTheFurry 37a8183176 Make everything use renamed ColumnDataPoint 2022-05-17 19:06:19 +08:00
TomTheFurry 3e5d27505c Finish up the ColumnDatatype and related copy and stuff 2022-05-17 18:52:50 +08:00
TomTheFurry e0280cc038 The very start of file management. 2022-05-15 14:38:50 +08:00
TomTheFurry ad1e3ef62a Fix some slight stuff 2022-05-14 14:21:23 +08:00
TomTheFurry 8e296f98d7 Complete the dynamic section data detail offset quad tree. (Untested) 2022-05-13 14:10:33 +08:00
Morippi 8e524a915c changed some names 2022-05-12 19:44:00 +02:00
TomTheFurry 3ea3df62e9 Start impl the dynamic section data detail offset 2022-05-12 19:08:28 +08:00
TomTheFurry cb85e396f0 Trash unneeded stuff 2022-05-12 18:21:18 +08:00
TomTheFurry a6165d56b6 Mark a thing so people switch over 2022-05-12 18:13:09 +08:00
TomTheFurry 4d352b012f Continue making the structure of data 2022-05-12 13:34:27 +08:00
James Seibel d7962fbb4e Add the prefix "DhApi" to the external api classes 2022-05-11 19:11:43 -05:00
Morippi 4a0a541fff changed a function name 2022-05-11 16:26:41 +02:00
Morippi 67e32d31ac fixed a small error 2022-05-11 15:28:06 +02:00
Morippi 57cd396920 Modified the update to work with new merge 2022-05-11 15:03:46 +02:00
Morippi 1336997ce0 Added merge data to RenderDataContainer 2022-05-11 14:55:23 +02:00
Morippi d99b6270a6 Merge remote-tracking branch 'origin/main' into main 2022-05-11 14:54:22 +02:00
Morippi 9caed982e3 Added merge data to RenderDataContainer 2022-05-11 14:54:13 +02:00
coolGi e13c331f0a Now a triangle in the config screen (until you resize the window, then it crashes) 2022-05-11 12:23:05 +00:00
TomTheFurry 3044a25adc Continue making the basic structure of data thing 2022-05-11 18:27:58 +08:00
TomTheFurry c797b5397b Hooked up the stuff with buffer thingy 2022-05-11 17:39:25 +08:00
TomTheFurry 0c52fe8364 Continue work on buffer managements 2022-05-11 17:19:32 +08:00
Morippi 786e00e88f small fixes 2022-05-11 09:52:20 +02:00
Morippi e8b964d8b7 Added Air lod container 2022-05-11 09:35:42 +02:00
Morippi 3f6a2d5195 Added Air lod container 2022-05-11 09:33:57 +02:00
Morippi c01f81b4ad Added new comment + improved merge 2022-05-10 22:30:13 +02:00
Morippi d8bb79c533 Added Comments to the quadTree Class 2022-05-10 21:50:42 +02:00
James Seibel 2e9d95d29c remove "border" from the overdraw tooltip 2022-05-09 20:38:18 -05:00
Morippi 5b4643a5ae Added ProtoSection class 2022-05-09 18:12:23 +02:00
Morippi 8e0566c4f1 Changed DhChunk 2022-05-09 18:03:21 +02:00
TomTheFurry a872547d72 Start to work on actual rendering side of things. 2022-05-09 16:23:40 +08:00
TomTheFurry ff181761c2 Complete v1 of the QuadTree stuff. Good sturcturing too I would say ;) 2022-05-09 14:47:13 +08:00
coolGi 909707214f Set up theming for standalone jar and moved shadow stuff to main gradle 2022-05-08 15:28:43 +09:30
coolGi 1ba3647b6b Changed my name to coolGi 2022-05-07 22:36:44 +09:30
coolGi 586786fd18 Moved everything out of LodConfigWrapper (pls dont use this) 2022-05-07 22:28:09 +09:30
TomTheFurry c4258ca96c Continue a7 dev focused on qTree 2022-05-07 16:58:38 +08:00
TomTheFurry 037e890d0d Make some more change, (and also lost my changes... rip) 2022-05-06 15:02:45 +08:00
Morippi 961c936f92 Started working on lodSection, LodQUadTree and DhChunk (not completed) 2022-05-04 23:18:34 +02:00
James Seibel f8292e8daa Set the api version to 0.0 (since it hasn't been released yet) 2022-05-03 21:27:55 -05:00
TomTheFurry 06281321d0 Add new a1.7 rebuild first step 2022-05-03 19:22:36 +08:00
TomTheFurry 09a9e98937 Renamed RegionPos to DHRegionPos as per the suggestion 2022-05-03 14:21:52 +08:00
TomTheFurry b4bad71813 Del ChunkPosWrapper & BlockPosWrapper, Create DHChunkPos & DHBlockPos, and also their related changes so it runs. 2022-05-03 14:06:26 +08:00
CodeF53 5ddf4f6ddf Typos 2022-05-01 10:34:41 -06:00
CodeF53 79224bdca3 Add a toggle for avoided blocks tint. Close #281
This is off by default

Additional comments in #tech-talk:
https://discord.com/channels/881614130614767666/902896965354930217/970351193928921139
2022-05-01 09:59:36 -06:00
TomTheFurry 10943e0d7d Added pre merge quads for more performance!!!! 2022-05-01 16:05:05 +08:00
TomTheFurry 031539bd31 Added dataView system so no longer need to copy arrays around 2022-05-01 14:19:51 +08:00
TomTheFurry be7a077367 Improved throwable logging for two custom logger 2022-05-01 13:14:29 +08:00
coolGi2007 e116b891a8 Some api stuff for config and updated readme to add json 2022-04-29 23:30:25 +09:30
coolGi2007 4310721640 New config finally done 2022-04-29 14:18:29 +09:30
coolGi2007 2888091b47 Merge remote-tracking branch 'origin/newConfig' into HEAD
# Conflicts:
#	src/main/java/com/seibel/lod/core/Config.java
#	src/main/java/com/seibel/lod/core/JarMain.java
#	src/main/java/com/seibel/lod/core/config/ConfigBase.java
#	src/main/java/com/seibel/lod/core/config/file/ConfigFileHandling.java
#	src/main/java/com/seibel/lod/core/config/types/ConfigEntry.java
#	src/main/java/com/seibel/lod/core/util/SingletonHandler.java
#	src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java
#	src/main/resources/assets/lod/lang/en_us.json
2022-04-29 10:52:19 +09:30
coolGi2007 600314e419 FINALLY! CLASSIC CONFIG GUI DONE 2022-04-28 14:17:27 +00:00
coolGi2007 768bd88982 (core didnt push) Fixed number values and got closer to completing the classic gui 2022-04-28 10:33:05 +00:00
James Seibel 7ee05282dd Remove invalid preprocessors from Core
Core can't use preprocessors
2022-04-27 21:56:00 -05:00
coolGi2007 417c3fcf8b Some api stuff for servers and stopped people setting invalid values trough file 2022-04-27 18:33:06 +09:30
James Seibel 76ac0ad3ff Add the first draft of the DH Api 2022-04-26 22:04:21 -05:00
James Seibel 170042620a use the dev preprocessor to display the dev build warning 2022-04-26 21:31:02 -05:00
coolGi2007 529777360b Add classic config GUI part 2/3 2022-04-25 15:02:18 +09:30
James Seibel f5d48ebcd3 Prep for the external DH API
All files previously in the "api" package have been moved to "api.internal"
2022-04-24 19:18:41 -05:00
James Seibel ad0eb208ea Replace the ApiShared Logger with class specific loggers
This should make the logs easier to understand.
2022-04-24 19:13:18 -05:00
James Seibel babc65217c minor refactors 2022-04-24 17:19:16 -05:00
James Seibel 5a79fac6b1 Update the licensing file
I forgot there was a file in Core
2022-04-24 16:46:57 -05:00
James Seibel bc0afd2bd5 Change the license from GPL to LGPL 2022-04-24 15:28:45 -05:00
coolGi2007 3fb4d631ac Even more abstraction to config stuff 2022-04-24 15:49:49 +10:00
James Seibel 83a2fa86d9 update the version number to 1.7.0a-dev
And re-enable the experimental build warning
2022-04-22 22:28:20 -05:00
James Seibel f0f18993d1 Update the mod version in ModInfo 2022-04-22 21:17:29 -05:00
James Seibel 026816053c Remove the experimental build warning 2022-04-22 21:08:04 -05:00
James Seibel 0d3c005e0f Slightly improve the wording in en_us 2022-04-22 20:38:08 -05:00
TomTheFurry a93c04a654 Updated some config defaults and min/maxs 2022-04-22 21:11:35 +08:00
TomTheFurry 1601f0d19f Add the cave culling switch logic 2022-04-22 21:07:10 +08:00
coolGi2007 1f80084377 Fixed not running 2022-04-21 10:58:23 +10:00
coolGi2007 69e0cfe97a Commit part 1 of trying to make the gui work vanilla 2022-04-21 10:17:55 +10:00
sasanaps@hotmail.com 85f16e749a Commit to fix 1 thing 2022-04-20 20:20:58 +10:00
sasanaps@hotmail.com a3bbdc421f Just a commit to save the progress 2022-04-20 20:00:33 +10:00
TomTheFurry 6ad6ecc731 Ops. 2022-04-18 16:11:38 +08:00
TomTheFurry 29fab65ee9 Improve overlapped quads handling + fix minLevel being used to clamp getMaxVerticalData(), causing invalid sized containers being added to incorrect detail level slot in a region. 2022-04-18 15:57:14 +08:00
TomTheFurry a3022d2c64 Fix critical mem leak in BlockDetail + Add spaced out worldGenThread + make worldGenUpdate update once per 10 ticks + Semi-impl proper EarthCurveRatio limits + make worldGenThreads terminate faster + impl temp bypass to stop deadlocks on BufferFactory destroy() + fix chat logging messages with Throwable twice 2022-04-17 18:07:50 +08:00
TomTheFurry d2fef22719 Add config settings for earthCurve thingy 2022-04-15 19:15:55 +08:00
TomTheFurry 1cb27f2f78 Fix dumb mistake + change a bit of stuff 2022-04-15 18:46:38 +08:00
TomTheFurry 892570a442 Add curve shader + fix/change ibo upload 2022-04-15 18:25:58 +08:00
TomTheFurry 705060fa97 Fix multiple little bugs 2022-04-15 16:48:49 +08:00
James Seibel b98082980b Merge 2022-04-14 19:37:35 -05:00
James Seibel d3b1635538 Reformat LodFogConfig 2022-04-14 19:36:19 -05:00
TomTheFurry 73f9edc091 Fix GpuUploadMethod that use mapping to use DynamicDraw instead of StaticDraw 2022-04-14 18:17:39 +08:00
TomTheFurry 7f6d123292 '*Fixed*' the T-junction pixel issue... kinda. 2022-04-14 17:00:21 +08:00
TomTheFurry ca64027b0c Rework cortex's ibo, and the buffer objects. 2022-04-14 15:42:37 +08:00
James Seibel 175c48a49e auto-format 2022-04-13 21:57:48 -05:00
James Seibel 6f75197085 auto-format 2022-04-13 21:46:31 -05:00
James Seibel c1d6541729 auto-format and fix version date formats 2022-04-13 21:23:05 -05:00
James Seibel 0905f60034 Merge branch 'MCRcortex/distant-horizons-core-IBO' 2022-04-13 21:07:50 -05:00
James Seibel f012ac44a7 Reformat comment and optimize the bind/unbind calls 2022-04-13 21:06:47 -05:00
mcrcortex c19e2613b4 Swapped GL 4.3 direct state accesses with GL 3.1 core features 2022-04-13 23:24:36 +10:00
mcrcortex 351decad34 Removed accidental imports 2022-04-13 23:18:13 +10:00
mcrcortex d22057e1b1 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core into IBO 2022-04-13 23:12:04 +10:00
mcrcortex a7e174cf74 Changed to using IBO drawElements for quads 2022-04-13 23:07:02 +10:00
TomTheFurry d88e0f5e9c Make far fog start at vanilla render distance + make fog multiply caps with inverse near fog if near fog is disabled 2022-04-13 15:00:29 +08:00
TomTheFurry 743e504ccc Fix Sodium non-fabulious causing lightmap flicker + add more log for load/unload world + no longer unloading world 3 times on exit due to sub-dim stuff 2022-04-13 14:14:02 +08:00
TomTheFurry 633b229d2e More logging & fix 1.16 getminbuildheight & improve blockdetailmap caching for waterlogged blocks 2022-04-13 13:38:36 +08:00
TomTheFurry ee803e10b5 Ops. Shouldn't comment out this two lines 2022-04-13 12:36:29 +08:00
TomTheFurry 3df603a0e2 Make the glProxy OpenGL version logging a bit better 2022-04-13 12:10:11 +08:00
James Seibel ce7217bad5 update the version number in ModInfo 2022-04-11 07:15:51 -05:00
James Seibel 3e42541fe9 Refactor LodQuadBuilder 2022-04-09 21:28:30 -05:00
James Seibel ff1c6cad2a auto-format 2022-04-09 11:08:15 -05:00
James Seibel 2bba421a5b auto-format 2022-04-09 10:54:13 -05:00
TomTheFurry 1fd1082a80 Add back 1.16.5 TerraForged basic support 2022-04-09 15:47:47 +08:00
TomTheFurry 25d2b9df7b Fix lightmap, again. 2022-04-09 15:21:59 +08:00
James Seibel 7eb0d62f75 Fix a typo in the license header 2022-04-06 22:28:34 -05:00
James Seibel 4fc816838d Update the license years 2022-04-06 22:24:32 -05:00
James Seibel 22bc6b5c9a Add the copyright header to files missing it 2022-04-06 22:21:41 -05:00
James Seibel 2e282433cc replace unnecessary error logs with info logs 2022-04-06 21:08:57 -05:00
James Seibel e76735a509 re-add the dev build warning 2022-04-06 21:04:44 -05:00
James Seibel 29aa95437e Replace the config button icon
Thanks Sjmarf!
2022-04-04 22:06:56 -05:00
coolGi2007 8296b006b4 Fixed stuff and made core use mc 1.16 version of log4j 2022-04-04 18:49:45 +09:30
TomTheFurry 02b0637adc Maybe fixed the light again? 2022-04-04 12:01:00 +08:00
TomTheFurry 9f12cc9528 Fix dumb stuff costing performance on world gen 2022-04-03 16:01:53 +08:00
TomTheFurry 0981870ea3 Fix up big blocks missing side faces 2022-04-03 13:06:08 +08:00
TomTheFurry 347383f440 Disabled framebuffer fix for now making optifine shaders to work again 2022-04-02 22:24:16 +08:00
TomTheFurry 4209937c35 Fix coolGi's java-8 port 2022-04-02 22:18:40 +08:00
TomTheFurry f877030eca Make lightmap fix works with Optifine shaders? 2022-04-02 21:09:52 +08:00
coolGi2007 a12f2e9e01 Made lots of things use java 8 and added access wideners for different versions 2022-04-02 19:29:01 +10:30
TomTheFurry 6d12acc30a Fix flickering lightmap by redo lightmap system 2022-04-02 15:25:10 +08:00
TomTheFurry 4bac38c99f MacOS Patch!??????? 2022-04-01 19:36:50 +08:00
James Seibel 3259f502e8 Fix the default folder selection if sub-dimensions are disabled 2022-03-31 21:23:31 -05:00
James Seibel aa3cde0537 Fix invalid files that use the server port 2022-03-30 21:18:53 -05:00
James Seibel e3018485ed Add additional logging to getFileBasePath 2022-03-30 19:56:58 -05:00
TomTheFurry 5a58fa92b3 Add debugging info for lodWorld 2022-03-30 19:52:27 +08:00
TomTheFurry 8a76c8cadc Make DataPointUtil's WORLD HEIGHT a final again 2022-03-30 18:56:10 +08:00
TomTheFurry 7f9b035665 Fix race & stuck playerData in sub-dim, add dataPoint verify 2022-03-30 18:38:48 +08:00
cola98765 368238821b change XZ setting 3 -> 1 made it easier to change it with static at the start of the file 2022-03-30 11:55:01 +02:00
James Seibel 4c984c5c10 Close #140 (no rendering if world named "No World Loaded" ) 2022-03-29 20:48:59 -05:00
coolGi2007 b431670255 Abstracted alot of stuff to do with the screen 2022-03-29 15:54:22 +10:30
TomTheFurry 7c935bb581 I think test renderer is now more correct? 2022-03-29 13:09:29 +08:00
CodeF53 3e825c11c4 small nitpicky changes to Lang Files 2022-03-28 19:24:28 -06:00
TomTheFurry 11982d701c Add RendererType & Debug Renderer + fix Logger bug 2022-03-28 17:04:06 +08:00
James Seibel 21d8f1124c Fix a null pointer error when moving empty folders 2022-03-27 21:49:20 -05:00
James Seibel b4009336a3 Fix old folders not moving if sub-dims are disabled 2022-03-27 00:09:32 -05:00
James Seibel a2d2e5d87b Make multi-Dim similarity = 0 disable the new system
By default the old system of 1 world per dimension is used
2022-03-26 23:15:47 -05:00
coolGi2007 0b28257f2f Added a warning when you try to run the jar 2022-03-27 13:54:05 +10:30
James Seibel f97815cac7 Update a log message in Sub-Dim 2022-03-26 21:34:36 -05:00
James Seibel 53c518b307 Fix incorrect files/folders crashing the sub-dim system 2022-03-26 21:27:16 -05:00
James Seibel 03f5a086f0 Automatically move old files to the new sub-dim system 2022-03-26 20:50:57 -05:00
James Seibel bc72142659 Merge for SubDim 2022-03-26 11:39:17 -05:00
TomTheFurry de51efc866 Fix logger bug, vertQual.next/pre missing ULTRA, subdim array compare 2022-03-26 23:31:04 +08:00
James Seibel 0658106822 Partially fix SubDimensionFinder 2022-03-26 10:20:01 -05:00
TomTheFurry 5178aa7def Overhaul Logging system to support runtime config switching 2022-03-26 18:55:02 +08:00
coolGi2007 6f7b1ac223 Allowed use of hash map rather than using MultiOption 2022-03-26 20:07:12 +10:30
coolGi2007 db2636946e Added a way to put multiple options into 1 item and added some code for standalone jar 2022-03-25 17:26:26 +10:30
James Seibel a80f69f522 Use a SubDimCompare object to compare subDims
This still needs cleaning, but it is going in the right direction.
2022-03-24 22:56:06 -05:00
James Seibel 665a5a8bee Lower the subDim vertical quality back to LOW 2022-03-23 21:14:40 -05:00
James Seibel 8a851a70c7 rename LodDimFileHelper -> LodSubDimFolderFinder 2022-03-23 20:59:48 -05:00
James Seibel 621bf7341d Improve logging and potentially fix a few substring crashes 2022-03-23 20:58:50 -05:00
James Seibel 4820c11f8e Move a few objects to the objects.opengl package 2022-03-22 21:51:26 -05:00
James Seibel ebc4ee2ab7 auto-format before editing 2022-03-22 21:50:22 -05:00
TomTheFurry 95c5854d8f Add CaveCullingHeight + 'Fun' mode into config 2022-03-22 18:23:52 +08:00
CodeF53 fe798bf90c Skylight culling below Y
https://canary.discord.com/channels/881614130614767666/881748253228531772/955696258754961429
2022-03-22 00:21:49 -06:00
TomTheFurry 4a2a6fb4bd Fix 0 size quad bug + improve black face filling 2022-03-22 13:05:22 +08:00
James Seibel ef80271f09 Fix an incorrect array index 2022-03-21 21:21:09 -05:00
tom lee 6a5263a8f4 Add overdraw offset setting 2022-03-21 17:29:10 +08:00
tom lee 260ba1a70e Fix color mixing issue 2022-03-21 16:55:36 +08:00
tom lee ca625f9f8b Remove Manifold from core. Remove use of awt.Colors.
Removing awt.Colors due to it being just slow. And unneeded to import
entire awt lib just because of Color.

Removed Manifold from core due to Manifold java compiler has quite some
bugs, and it is causing crashes on inferring a generic class args on
inline Iterator class def. Core arn't needing those preprocessor
features anyways.
2022-03-21 15:13:26 +08:00
tom lee 4f2bf9b834 Add overdraw offset 2022-03-20 23:18:08 +08:00
tom lee 467f4a260f Forgot to turn back on the greedy meshing 2022-03-20 16:30:28 +08:00
tom lee 21253d1308 Add Cave Culling setting + cleanup + fix leo's adjData 2022-03-20 16:26:50 +08:00
tom lee 8f534fb51c Fix/Improve Near Clip Plane + add pow2 function 2022-03-20 13:41:28 +08:00
James Seibel 6cd0281d0e Merge in multi-dim support 2022-03-19 12:38:42 -05:00
James Seibel df73d1d275 Re-Add the brightness/saturation config 2022-03-19 11:00:28 -05:00
tom lee 804738cfe5 Accedentally moved a folder. Ops 2022-03-19 22:33:36 +08:00
tom lee 254d908807 Nuke old WorldGen, reorganize and improve all GridList util 2022-03-19 22:30:27 +08:00
James Seibel 9fa7fa843d Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-03-18 23:56:29 -05:00
James Seibel 82065cd1ce Add a config for the MultiDimension Similarity 2022-03-18 23:56:25 -05:00
James Seibel d0da822813 make the dimFileHelper run async 2022-03-18 22:01:29 -05:00
James Seibel 595aa79eb6 Fix crashing in singleplayer 2022-03-18 22:01:05 -05:00
James Seibel 8cdc0fc830 Remove a few unneeded imports 2022-03-17 23:08:52 -05:00
James Seibel c869047b30 Closes #134 (Add multi dimension support)
I still need to add a config and multithreading (to prevent stuttering when changing dimensions).
2022-03-17 23:08:42 -05:00
TomTheFurry 2907c8e3e7 Fixed a deadlock on shutting down BufferBuilders 2022-03-16 18:52:55 +08:00
TomTheFurry 4097cf7619 ADVANCED FOGGGGGGGGGGGGGGGG~~~~~~~~~~~~~~~~ 2022-03-16 18:52:55 +08:00
TomTheFurry cf519c02be Pushed the stuff leetom did on my macbook 2022-03-15 21:17:07 +10:30
TomTheFurry 4f563c2be5 Add proper multi FrameBuffer support(And fix MacOS?) 2022-03-15 16:38:39 +08:00
TomTheFurry e8de59a226 Fixup MixinUtilBackgroudThread+more render log 2022-03-15 18:48:27 +10:30
TomTheFurry 323da0b12c Improve GLMessage Parser 2022-03-15 12:37:51 +08:00
TomTheFurry 1c0e7839c0 Add Advanced Fog config entries. Actual impl is a todo. 2022-03-15 00:00:35 +08:00
TomTheFurry d2056d824f Slight cleanup of lodRenderer 2022-03-14 16:22:19 +08:00
TomTheFurry 7da2b90611 Fix hasCliffFace() not crossing chunk boundaries.
Also temp added cave culling. Need logic to provide better cave culling.
2022-03-14 15:10:04 +08:00
TomTheFurry f1eb06bbb1 Fix nullptr exception on calling clear(d) with d being null (Thx @HyperSoop) 2022-03-14 14:36:42 +08:00
James Seibel 78a1cc3330 Auto Format 2022-03-13 21:08:29 -05:00
TomTheFurry fbd8f48433 Improved getMaximumRenderedChunk and fix GLMessage on forge 2022-03-13 22:57:06 +08:00
TomTheFurry 49cc46dc25 Update Config defaults 2022-03-13 16:15:28 +08:00
TomTheFurry 1c7d87b9d3 Add new config: Biome Blending 2022-03-13 15:39:34 +08:00
coolGi2007 2fa54347ea Renamed some stuff and updated core 2022-03-13 14:31:33 +10:30
James Seibel bca2b61800 Close #207 (re-add brightness/contrast configs) 2022-03-09 23:06:15 -06:00
TomTheFurry c9cabd8a32 Rework BlockDetail and stuff. 2022-03-08 23:26:41 +08:00
TomTheFurry 538df6000c Fixup that one line. With comments 2022-03-08 17:04:16 +08:00
TomTheFurry d731424e93 Fix it so I think java8 now works...? (Javadoc won't tell me versions) 2022-03-08 16:04:38 +08:00
James Seibel 510058b7df Closes #217 (Change Server Folder Name)
Adds multiple options for formatting the server folder name.
If LODs have already been generated with a previous setting the files will have to be transferred to the new folder.
2022-03-07 22:15:52 -06:00
James Seibel 05e70416b7 Manual refactoring 2022-03-07 06:34:06 -06:00
James Seibel d5eb094256 Replace constant values with their enum representations 2022-03-07 06:28:48 -06:00
James Seibel b7aa341961 Auto Format 2022-03-07 06:28:23 -06:00
James Seibel 3f091af3f8 Rename MinecraftWrapper -> MinecraftClientWrapper 2022-03-05 18:26:47 -06:00
James Seibel 566eb3651f remove WorldWrapper.isEmpty()
It wasn't used and there was a comment saying not to use it
2022-03-05 18:14:03 -06:00
James Seibel 58392a8ac1 Update the DependencyHandler to support circular references 2022-03-05 17:34:19 -06:00
James Seibel 2149da59df Replace string.strip() with string.trim() 2022-03-03 19:34:09 -06:00
coolGi2007 e41b19ba2e Fixed 1.16 (tough someone needs to fix core/objects/opengl/RenderRegion to work with java8) 2022-03-03 17:39:14 +10:30
James Seibel d84d535896 Refactor the dependency injectors 2022-03-01 21:19:45 -06:00
coolGi2007 509c9cb21c Getting ready for gui (SOMEONE, please fix core/config/file/ConfigFileHandling line 80) 2022-02-28 18:23:27 +10:30
tom lee e6f8c0d65f Cleanup Error logging + Polish OpenGL Error/Warning/Message handling 2022-02-27 17:01:03 +08:00
tom lee 7db3789bc2 Fix Overdraw Circles & Void chunk error spam due to genMode+1 2022-02-26 16:15:11 +08:00
coolGi2007 711658fe38 Finished file handling (all that is needed to fix it is to fix line 80 in core/config/file/ConfigFileHandling.java) 2022-02-26 04:48:43 +00:00
tom lee 8d18ba861e Fix missing move. Also moved needRegenBuffer flag to RenderRegion 2022-02-25 15:13:39 +08:00
tom lee 6e63e39cd8 Patch the merge commit cause I used wrong files and also -1 level bug 2022-02-24 22:27:21 +08:00
tom lee 1dcc973a24 Overhaul Rendering Buffer Management
+ Merging with Leo's fix to adjData and stuff
2022-02-24 21:59:20 +08:00
coolGi2007 ffa6bb5653 Sorry Ran, I accidentally somehow reloved your commit before 2022-02-24 11:56:16 +00:00
coolGi2007 44a16ef4fe Started more work on the new config system (file handling) 2022-02-24 06:47:12 +00:00
Morippi 7ad2e82646 Added comments 2022-02-23 18:26:35 +01:00
Morippi f32dfbcbe7 Added comments 2022-02-23 18:24:59 +01:00
Morippi 18b7835c4c Small fix to the region circle border 2022-02-23 17:16:05 +01:00
Morippi c5f23dabb2 Removed border from details circles and regions 2022-02-23 16:38:19 +01:00
tom lee d6ba5205ad Too many changes. See details:
- Fix new block color with tint system slowdown
- Fix leaves block color
- Fix rgba not translating to rgb properly
  - Which changed water color to be darker
- Optimized quad merging to be faster
- Fix All types of gray color texture issue
- Fix Textures that rely on BlockState
- Fix All types of tint
- (?)Create Model perhaps no longer purple
- Fixed LodBufferBuilder always in single thread mode
2022-02-22 23:10:49 +08:00
Morippi 6948e4e437 Alpha now uses max value in merge and not average value 2022-02-22 11:54:24 +01:00
tom lee d39912e235 Fix init error by moving bufferFactory to ClientApi 2022-02-22 11:35:42 +08:00
Ran fa3d07edb5 Put logger in ApiShared.java 2022-02-21 17:34:51 +06:00
Ran bf4eb954d3 Merge remote-tracking branch 'origin/main' into main
# Conflicts:
#	src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java
2022-02-21 17:29:40 +06:00
Ran 1ddf2091b1 Put logger in ApiShared.java 2022-02-21 17:27:53 +06:00
tom lee 4708da8e8f Rework block color/shape stuff 2022-02-21 19:19:44 +08:00
Ran 59fa6eed73 Add protocol version 2022-02-21 09:21:27 +00:00
coolGi2007 0edca2402d Renamed RunMain to JarMain 2022-02-20 22:23:03 +00:00
Ran 081958db59 Update src/main/java/com/seibel/lod/core/config/ConfigBase.java 2022-02-20 13:17:35 +00:00
cola98765 59bf66ec58 wireframe again hides the culled faces, to maintain parity as to what is actually rendered in different modes. 2022-02-20 14:09:03 +01:00
coolGi2007 a14046ef88 Added something so you can run the jar(dosnt do anything yet) 2022-02-20 11:43:41 +00:00
cola98765 cff317937f removed dummy enum. made genmode a byte where it's not an enum 2022-02-20 11:50:58 +01:00
cola98765 cead0346ad probable fix 2022-02-20 11:03:29 +01:00
cola98765 f3f3c3d54d gen mode + 1 of what was before 2022-02-20 10:54:17 +01:00
tom lee 9765da97a6 Reorder lodData, now this is the new Version 9 2022-02-20 17:34:24 +08:00
tom lee 57f5ad5ea0 Fix fog using vert instead of per frag. Oh and impl greedy meshing 2022-02-20 16:11:31 +08:00
coolGi2007 83ec6f4da2 Updated some stuff 2022-02-20 07:30:07 +00:00
coolGi2007 6ff797c1cc Updated core 2022-02-20 13:22:06 +10:30
coolGi2007 d04247094a Added some stuff to the new config init 2022-02-20 13:12:01 +10:30
Morippi 3cd71c1c69 Fixed down (and Up even if not visible) shade 2022-02-20 00:48:55 +01:00
cola98765 d79c873145 reorganised datapoint. added full 4096 world height support 2022-02-20 00:21:25 +01:00
tom lee 401cbbd8eb Fix resource leaks from missing close() on stream (Thx Boston!!!!!) 2022-02-20 01:00:32 +08:00
tom lee a1652fe68a Add and improve buffer upload methods 2022-02-20 00:42:27 +08:00
tom lee c450f5b960 I think render fps pref improved??? 2022-02-19 22:14:24 +08:00
coolGi2007 bcf8237131 Removed new config stuff 2022-02-19 08:14:49 +00:00
tom lee 3e7fed7ad4 Start rework to allow individual render region swapping 2022-02-18 14:56:54 +08:00
James Seibel fd81a8e067 Update the version number to 1.6.2a 2022-02-17 20:11:00 -06:00
cola98765 891cfdf4a9 added squared color averaging to merge 2022-02-17 18:05:45 +01:00
TomTheFurry b1795079b8 Merge branch 'render_test' into 'main'
Merge the Render test branch with improvements

See merge request jeseibel/distant-horizons-core!4
2022-02-17 14:20:12 +00:00
TomTheFurry 8e347959e1 Merge the Render test branch with improvements 2022-02-17 14:20:12 +00:00
cola98765 acd5116223 close #188; fix lang parts in #189 2022-02-15 11:21:22 +01:00
James Seibel 2ba7c6be6e Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-02-13 07:37:19 -06:00
coolGi2007 77492a8abf Updated config and lang 2022-02-13 03:32:51 +00:00
James Seibel a0c7ebedcf Prepare for 1.6.1a 2022-02-12 12:01:20 -06:00
tom lee ae752c6f63 Fixed it so it works with Java 8 2022-02-12 22:47:49 +08:00
tom lee fbbccf4739 Add a DummyRunExecutorService 2022-02-12 21:57:54 +08:00
coolGi2007 cf1c371311 Re added some stuff so the gui still works 2022-02-12 10:24:00 +00:00
coolGi2007 87ff857b59 Added some stuff for new config (not redy yet so dont use) 2022-02-12 09:24:52 +00:00
James Seibel 50819c30da Update the version number to 1.6.1a-pre and re-enable dev code 2022-02-11 22:07:23 -06:00
James Seibel 67f12c136c I accidently removed the "a" 2022-02-11 20:00:32 -06:00
James Seibel b35db97abc Change the version number and comment out the debug code for a1.6.0 2022-02-11 19:58:18 -06:00
coolGi2007 241447d55a Updated lang 2022-02-11 09:29:08 +00:00
coolGi2007 5d72d321db Removed 1 line from the lang 2022-02-11 05:36:28 +00:00
tom lee 595b8ecbb5 Fixed hash bug for ChunkPos & incorrect shink causing overdraw issue 2022-02-11 13:34:04 +08:00
tom lee f422df6280 Cleanup debug logging and get rid of unused functions in vertContainer 2022-02-11 12:39:40 +08:00
coolGi2007 14d3418651 Removed cloud stuff (forgot to remove before) 2022-02-11 04:12:01 +00:00
James Seibel f7da53622c Slightly improve the tooltips for the config GUI 2022-02-10 22:05:58 -06:00
Morippi e5a636fccb Added Ultra setting to vertical quality and changed the others 2022-02-10 15:10:41 +01:00
tom lee 080d33baf1 Changed defaults and removed unneeded configs 2022-02-10 21:40:15 +08:00
tom lee d8c082ba42 Fixed stuck futures if BufferBuild throws exception in the Runnable 2022-02-10 17:05:48 +08:00
tom lee b169e246b4 Make BufferUpload & BufferBuild use CompletableFuture Pipeline 2022-02-10 16:13:49 +08:00
tom lee 07d4050502 Fix many stuff. See list below:
1. Fixed seeing previous dim's lod after going though a portal
2. Fixed changing VertQual live causes many issues (now force a reload)
3. Fixed loading old lod files with smaller than expected vert data
   causing the data container to be incorrectly sized
4. Improved BufferBuilder to use less RAM and cleanup
5. Shink BufferBuilder on calling end()
2022-02-10 14:50:33 +08:00
tom lee c70d2a27f2 Make alwaysDrawAtMaxQuality not do anything in here 2022-02-10 11:31:21 +08:00
tom lee 4919c0cabb Impl a better fix for Leo's mentioned issue 2022-02-10 11:21:53 +08:00
coolGi2007 40a8f228ac Removed config and saved it locally till after 1.6 gets released 2022-02-10 02:27:27 +00:00
cola98765 1b711e2b66 fixed what Leo started 2022-02-09 22:48:36 +01:00
Morippi 104d4a7400 Tried to fix the render distance min detail bug 2022-02-09 22:01:17 +01:00
cola98765 01870e4875 changed hasCliffFace so it works better with chunk borders 2022-02-09 18:32:34 +01:00
cola98765 7203acf628 fix connected lods 2022-02-09 18:25:06 +01:00
tom lee cbcb7ca6ac General update/polish. (Add more pref dumpping) 2022-02-09 18:03:49 +08:00
tom lee 1b27161518 Make Far Pos gen no longer saves all detail level, speed up far gen tons 2022-02-08 13:41:19 +08:00
tom lee b51cb7ca51 Fixed detail level stuck at 0 in far pos caused by overflow issues 2022-02-07 14:01:33 +08:00
James Seibel 1e08fc51ec Delete a1.4_Rendering_Flow_Diagram.drawio
It wasn't turning out how I was hoping.
2022-02-06 23:13:47 +00:00
James Seibel c2d4475d44 Add a few missing items to a1.6_Flow_Diagram_Overview.drawio 2022-02-06 23:08:11 +00:00
James Seibel ddefb5f67a Improve the coloring in a1.6_Flow_Diagram_Overview.drawio 2022-02-06 22:44:44 +00:00
James Seibel 8bdb3146ed Added a1.6_Flow_Diagram_Overview.drawio 2022-02-06 22:39:41 +00:00
tom lee 8860e46d9b Patch up stuff so changing DETAIL_OPTIONS should work without errors 2022-02-06 22:54:21 +08:00
tom lee a73da4102a Add DebugMode: DRAW_WIREFRAME 2022-02-06 22:07:37 +08:00
tom lee bb8df761bb Added dump memory stats for Buffers 2022-02-06 21:33:13 +08:00
coolGi2007 e459994d6d Getting config ready for after 1.6 gets released 2022-02-06 12:41:29 +00:00
tom lee 65f16463ec Added Memory Stat Dumping via pressing p 2022-02-06 18:07:53 +08:00
tom lee 31717ad202 Changed how key events work 2022-02-06 14:57:43 +08:00
tom lee de4dd44209 Clean up generics 2022-02-06 13:38:36 +08:00
coolGi2007 6c73f8b723 What is T??????????????????? 2022-02-06 05:19:23 +00:00
coolGi2007 67a171da56 Update ConfigEntry 2022-02-06 05:00:25 +00:00
coolGi2007 09b2d952b6 Removed the actual texture (Add these back when doing clouds) 2022-02-05 09:31:28 +00:00
coolGi2007 255d2adbb0 Removed cloud stuff 2022-02-05 09:21:52 +00:00
tom lee 069978ee1d Removed one default in wrapper. 2022-02-05 16:06:46 +08:00
tom lee aff7e90e37 Tweeked values for RAM check to make it actaully run 2022-02-05 14:35:27 +08:00
tom lee 1032f550ed Optimize some performance. Now less lag spikes and stuff
Also fixed the WorldGen Disable not working issue
2022-02-04 14:32:04 +08:00
tom lee ac32697204 Make the expend low RAM skip no longer skip the updates. 2022-02-04 00:31:45 +08:00
tom lee 95220d4fd7 Add failsafe for low RAM issue. 2022-02-04 00:11:53 +08:00
tom lee 068622895f BatchGen: Refactor the experGen into proper generator 2022-02-03 16:46:49 +08:00
coolGi2007 a0dd0d5aca Added some stuff to get ready for the new config 2022-02-03 03:41:54 +00:00
tom lee ca81ed1efe Solve most race issue around the move(), making world hole less likely 2022-02-02 15:55:16 +08:00
coolGi2007 35ab1ce47f Maybe fixed something? 2022-02-02 02:39:04 +00:00
James Seibel c5aeac5091 Remove the Seizure warning 2022-02-02 01:11:17 +00:00
tom lee 834cfe2e10 Add stack dump for threadFactory 2022-01-31 00:23:15 +08:00
tom lee 99ca5f6bc6 Fix crash on exit due to no shutdown for cutAndExpend thread
Also tweeked the values of vertQual on larger blocks to better support floating
islands.
2022-01-30 15:30:09 +08:00
tom lee 4bcb6c0acd Fixed bug on incorrect walls for overdraw prevention thingy 2022-01-27 14:07:09 +08:00
coolGi2007 4f63fbb14d Fixed issue 162 (renamed stuff) 2022-01-27 02:36:35 +00:00
cola98765 522a74e6e3 fixed mergeMultiData and lodBuilder with connected lods 2022-01-26 09:25:33 +01:00
cola98765 6ef789c087 removed /2 in merge multi data. now that we support a lot of connected lods it's needed 2022-01-26 09:07:00 +01:00
tom lee 410fe684ec Changed how blockUpdate works 2022-01-25 18:25:46 +08:00
tom lee 43feb2d7fe Forgot about GenPriority. Updated it + fixed now BALANCED mode issue 2022-01-25 17:08:01 +08:00
tom lee 7fa99ea070 WorldGen Config Overhaul + General cleanup 2022-01-25 16:26:34 +08:00
coolGi2007 bdd877abe8 Added FileComment 2022-01-25 04:54:53 +00:00
tom lee b2d5e18fe4 Raised distance limits to 8192. HYPER EXPERIMENTAL!!! 2022-01-24 23:36:40 +08:00
tom lee 880be5ed60 Fixed a NEAR_FIRST bug I introduced 2022-01-24 23:02:31 +08:00
tom lee 90440f3e06 Tweaked a bit around the FAR_FIRST gen stuff 2022-01-24 22:56:35 +08:00
tom lee c3abb9c46b Errr....
1. Make VerticalQuality overall is higher.
2. Rework how FAR_FIRST works.
3. Clean up some stuff.
2022-01-24 21:02:55 +08:00
tom lee ab3880a5e5 Trash ThreadMapUtil replaced by ThreadLocal. Trash an unused class 2022-01-23 23:15:08 +08:00
tom lee f939839941 Added Thread Priorities. Hopefully no more stealing TPS. 2022-01-23 21:19:08 +08:00
tom lee e9e2af2807 Add optimization on getPosToGenerate. 2022-01-23 19:09:09 +08:00
James Seibel a5a4a3e6e2 Set the default Generation Priority to NEAR_FIRST closes #160 2022-01-22 22:03:52 -06:00
tom lee 9e7703ac53 Fixed void chunks. Changed thread defaults. Added LagCatchers in render 2022-01-22 18:10:07 +08:00
tom lee 9580335692 Fixed Buffer leaks, cleanup Debug logging 2022-01-22 16:09:58 +08:00
tom lee 608dc443dc Removed using the slice() func, but haven't found the mem leaks 2022-01-21 23:55:40 +08:00
tom lee 14e72c68cb Added sub buffers. Greatly reducing fps stutters 2022-01-20 22:53:17 +08:00
tom lee dc0e48ae2a Renamed stuff so the underWaterFog also applies for other special fog 2022-01-20 21:54:10 +08:00
tom lee 0bfb47cc68 Fixed issue in FAR_FIRST where it can overlaod Ram resources 2022-01-20 20:02:55 +08:00
tom lee c69569c95f Fixed Critical Vanilla Save corrupt issue. Fixed? world gen not starting 2022-01-20 19:27:32 +08:00
tom lee 914a76297d New save structure. No more multi folders for Generation Mode
This also includes a converter that runs on "Joining World..." text. It
may stuck on that screen for a while, but it is indeed merging and
updating the old saves.

The old saves file after update is not deleted. Instead, the folders are
renamed so that you still have a way to recover old saves in case the
converter failed.
2022-01-19 23:28:56 +08:00
tom lee 22e47b9734 Reworked lodBuilder. Make it faster. 2022-01-19 18:59:55 +08:00
tom lee 930113a6f9 Add support for OptifineAccessor, and decrease light issue on forge 2022-01-19 13:50:53 +08:00
tom lee 6c77164a65 Fixed PosToGenerate issue 2022-01-18 22:34:23 +08:00
cola98765 546d60f1fc resolved warnings. part 3 2022-01-18 11:29:01 +01:00
cola98765 6b6d011cd5 resolved warnings. part 2 2022-01-18 11:00:07 +01:00
cola98765 7bf54d20c0 resolved warnings. now more carefully. 2022-01-18 10:38:31 +01:00
jas35484 bba7f34d46 Add the minor version number 1.6a -> 1.6.0a
Why do I always remember these things after I have done all of them?
2022-01-17 20:33:00 -06:00
jas35484 ade5500c6d I forgot CurseForge doesn't like a1.X.Y versioning, changed to 1.X.Ya 2022-01-17 20:29:31 -06:00
jas35484 a3bd2ed70b Increment the version from 'a1.5.4' to 'a1.6-pre' 2022-01-17 20:23:47 -06:00
cola98765 43304da80b small fix 2022-01-17 16:30:09 +01:00
cola98765 7d53da40ec Revert "resolved couple warnings. If it causes problems just revert it."
This reverts commit 4702aa7888.
2022-01-17 16:27:36 +01:00
cola98765 bd489a66c7 whatever... deprecation is too hard for me 2022-01-17 15:50:24 +01:00
tom lee a50ef74a5e Fixed a bug in posToGenerate and the buffer now reset on too far away 2022-01-17 22:03:35 +08:00
cola98765 4702aa7888 resolved couple warnings. If it causes problems just revert it. 2022-01-17 14:18:12 +01:00
cola98765 57a6483aec cleaned up code around connected lods. not sure if fixed anything, but it's working for me. 2022-01-17 12:43:18 +01:00
cola98765 31cb1ef401 cleaned up code around light 2022-01-17 10:53:36 +01:00
tom lee be5b5de170 Fix issues with generation filling up RAM 2022-01-16 17:33:20 +08:00
tom lee f665a8b8f6 Add empty StarlightAccessor for now 2022-01-15 21:54:35 +08:00
tom lee 0c4de076ca Add/Fix issue with writeData and Cut causing data loss 2022-01-15 18:59:02 +08:00
coolGi2007 4c122512ac Added more languages 2022-01-14 04:53:15 +00:00
tom lee 976874e7a3 Nuked the old removeLegacyFog due to it failing on Sodium 2022-01-13 22:24:39 +08:00
tom lee bb22ad58bc Fix critical crash on Multiplayer. 2022-01-12 18:01:15 +08:00
tom lee 0b2be5580f Changed ClientChunkLoad to work properly 2022-01-12 16:15:26 +08:00
coolGi2007 02143d0951 Why dont you have a .java? 2022-01-11 08:44:03 +00:00
coolGi2007 3ebdfd6e87 Added a mod checker to check if mod exists 2022-01-11 08:23:14 +00:00
James Seibel 3caf8facf9 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-01-10 18:08:06 -06:00
tom lee efd1d67f3f Render: Fixed mistakes and added more GridList stuff 2022-01-10 22:04:52 +08:00
coolGi2007 ee2c6e2a06 Added a cloud warning to the lang 2022-01-10 04:50:05 +00:00
tom lee d1e1970c18 Added ModAccessor sturcture for adding mod compats 2022-01-09 14:56:49 +08:00
tom lee 943a2d5cad Remove default light hack. Try the first patch to get light work 2022-01-09 00:25:58 +08:00
tom lee e5f5d33db9 Add missing default 2022-01-08 22:53:07 +08:00
tom lee 8b761ca31a Made IChunkWrapper also has the ability to return light data 2022-01-08 22:51:23 +08:00
tom lee a402fa5f0b Update lang file 2022-01-07 19:08:18 +08:00
tom lee d4123a44ed Add DropoffQuality 2022-01-07 18:58:29 +08:00
tom lee cba75123c7 Fixed Overdraw, mergeVertData error, wrong vanillaDist math. 2022-01-07 15:50:42 +08:00
tom lee 5ac51dd2a5 Fixed accidentally using java 9+ features. Now java 7 should work 2022-01-07 13:28:12 +08:00
coolGi2007 a8d52c1059 Updated lang 2022-01-06 09:58:00 +00:00
tom lee c664564fb0 Fixed FAR_FIRST gen. Impl proper cleanups on many place. 2022-01-06 16:27:28 +08:00
tom lee 1a5fd87346 Fixed saving. Guarrantee save is complete on exit. Trashed some logging
Also, tried (keyword: tried) fixing the FAR_FIRST generation.
2022-01-06 00:07:19 +08:00
tom lee e71660eb41 Fixed generation issues and buffer now update more aggresively 2022-01-05 19:18:23 +08:00
cola98765 d9dc33a105 added gen mode debug view 2022-01-05 10:53:56 +01:00
James Seibel 4bf004ae6b Add class_diagram.drawio 2022-01-05 05:26:39 +00:00
tom lee f9871ef16d WorldGen: Now no longer gen all chunks in higher than chunk details 2022-01-04 18:57:25 +08:00
tom lee 054988851d CutExpend: Fixed Cut bugs and some general fix to LodFileHandler stuff. 2022-01-04 16:43:21 +08:00
coolGi2007 44bcc5ae01 Added lower qulity clouds 2022-01-04 07:50:02 +00:00
tom lee 3b475886ef Buffers: Fixed critical render bugs and vertex buffer leaks 2022-01-04 15:10:41 +08:00
James Seibel ff6edec461 Merge branch 'main' of https://gitlab.com/jeseibel/distant-horizons-core 2022-01-03 21:23:31 -06:00
James Seibel ae7e416810 Add a missing comment 2022-01-03 21:20:46 -06:00
tom lee d72805d1fe Buffers: Basically redid the buffer management
Note: Backface Culling currently disabled
2022-01-03 00:04:54 +08:00
coolGi2007 f80c43385a Removed category annotation 2022-01-02 06:13:41 +00:00
coolGi2007 219ad9c45a Turned off custom clouds till it is fixed 2022-01-02 03:07:05 +00:00
James Seibel 662a1ec8bc Add a partially completed rendering flow diagram 2022-01-01 15:46:10 +00:00
cola98765 e60a0526ca even tho it is not used yet, updated texture so patterns are closer in size to vanilla 2022-01-01 15:05:21 +01:00
cola98765 1266ed6dc1 fixed updateData 2022-01-01 13:31:21 +01:00
tom lee 816c4fa76a BufferFactory: Added static bool for enabling time logging 2022-01-01 16:48:19 +08:00
tom lee 975c24c8a9 AMD: Fixed AMD render issue due to vertex data alignments 2022-01-01 15:25:37 +08:00
tom lee 4db3b7b729 LodRenderer: Add support for underwater fog 2022-01-01 13:50:59 +08:00
tom lee 32e341fe4f Reordered and chopped up some config desc 2022-01-01 12:12:08 +08:00
tom lee 0ce249ab17 Fixed up cloud configs and removed @nullable for 1.16.5 build 2021-12-31 21:44:46 +08:00
tom lee f9372c6a07 Save/Load: Fixed locking up files due to try-catch-resoure issue 2021-12-31 20:59:14 +08:00
coolGi2007 6ea7ecd215 Moved some resources to core 2021-12-31 10:40:40 +00:00
tom lee 6a828ee931 Load: Fixed load error on missing middle level data 2021-12-31 17:25:08 +08:00
tom lee e8d25daabf BufferUpload: Fixed bug on 0 size data not updating vert count 2021-12-31 17:01:40 +08:00
tom lee 7c8b073b02 Save: Fixed critical bug causing 0KB files on new world 2021-12-31 16:09:29 +08:00
coolGi2007 b623fc530f Abstracting clouds 2021-12-31 07:20:59 +00:00
tom lee 5fdf09209c Fixed Config names 2021-12-30 22:03:53 +08:00
cola98765 515afe4d45 moved where last pos is saved 2021-12-30 14:58:05 +01:00
cola98765 7f5eea865e made config for minimum back side culling distance. actual value is using prev player pos so on long flights it works better. 2021-12-30 13:19:46 +01:00
cola98765 13d6232790 made connected lods dependant on Vertical Quality config. 2021-12-30 12:04:40 +01:00
467 changed files with 40220 additions and 15039 deletions
+165
View File
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
+9
View File
@@ -16,3 +16,12 @@ It should be automatically included when pulling the full mod.
XZ for Java (data compression)\
https://tukaani.org/xz/java.html
Json & Toml for Java (config handling)\
https://github.com/TheElectronWill/night-config
SVG Salamander for SVG's\
https://github.com/blackears/svgSalamander
FlatLaf for theming (for development testing, may remove later)\
https://www.formdev.com/flatlaf/
@@ -0,0 +1,46 @@
The following is short tutorial to setup and register a gitlab runner in a docker container on windows.
Docker can be installed via a installer from their website and these instructions assume that has already been done.
longer tutorials can be found at the following links:
https://faun.pub/gitlab-runner-setup-run-in-docker-container-on-windows-44fee102d02e
https://datawookie.dev/blog/2021/03/install-gitlab-runner-with-docker/
1. install the gitlab runner
run the following command in powershell, changing the config file location if need be
Note: This will NOT work in git bash, only powershell
docker run -d --name gitlab-runner --restart always -v C:\DistantHorizonsWorkspace\Docker\config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest
2. to make sure the docker container was set up correctly run:
docker container list
it will display the docker containers that have been created
3. start and register the runner
run the following command in powershell. change the <ITEM>'s to whatever they should be for the runner you are creating.
docker run --rm -t -i -v C:\gitlab-runner\config:/etc/gitlab-runner gitlab/gitlab-runner register --non-interactive --executor "docker" --docker-image alpine:latest --url "https://gitlab.com/" --registration-token "<TOKEN>" --description "<DESCRIPTION THAT SHOWS UP ON GITLAB>" --run-untagged="true" --locked="false"
4. done
at this point the runner should be up and running, to confirm this go to your:
gitlab project -> settings (on the left menu bar) -> CI/CD -> Runners
and you should see the newly registered runner (the description should show up under the runner's auto generated ID)
Additional commands:
manual registering (shouldn't be needed)
docker exec -it gitlab-runner gitlab-runner register
list gitlab runner info
docker exec -it gitlab-runner gitlab-runner list
list all commands the runner can use
(replace "help" with whatever command you want to use)
docker exec -it gitlab-runner gitlab-runner help
@@ -0,0 +1,221 @@
<mxfile host="app.diagrams.net" modified="2022-02-06T23:07:56.707Z" agent="5.0 (Windows)" etag="McdhDnDn_b3JSW_6sAfD" version="16.5.3" type="gitlab">
<diagram id="xLs7mM1S-vncSruOQYJG" name="Page-1">
<mxGraphModel dx="2854" dy="971" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<object label="Background" id="1">
<mxCell parent="0" />
</object>
<mxCell id="bW8zysbPbXfA33rAzGtO-46" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFE9CC;strokeColor=#d79b00;shadow=0;" vertex="1" parent="1">
<mxGeometry x="400" y="300" width="720" height="320" as="geometry" />
</mxCell>
<mxCell id="ZgqzLkNpqH_WLmXpxmUH-3" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFE9CC;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="30" y="10" width="1090" height="290" as="geometry" />
</mxCell>
<mxCell id="lUieYn43trCVNQSoQYE8-16" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#CBF2CB;strokeColor=#06962D;gradientColor=none;" parent="1" vertex="1">
<mxGeometry x="-680" y="70" width="200" height="220" as="geometry" />
</mxCell>
<mxCell id="lUieYn43trCVNQSoQYE8-18" value="Minecraft &lt;br&gt;Version Specific" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#CBF2CB;strokeColor=#06962D;gradientColor=none;" parent="1" vertex="1">
<mxGeometry x="-680" y="10" width="200" height="60" as="geometry" />
</mxCell>
<mxCell id="gNZkowd1tYjNP-PxMyY5-1" value="Minecraft" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#A5E8A5;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="-650" y="205" width="140" height="50" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeWidth=3;" parent="1" source="lUieYn43trCVNQSoQYE8-14" target="XNAtI1EKQKx7pIlif8ke-22" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="lUieYn43trCVNQSoQYE8-14" value="Mod API&lt;br&gt;(Forge or Fabric)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#A5E8A5;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="-650" y="90" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="ZgqzLkNpqH_WLmXpxmUH-2" value="Distant Horizons Core&lt;br&gt;(Version Independent)" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFE9CC;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="450" y="10" width="220" height="60" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-1" target="XNAtI1EKQKx7pIlif8ke-11" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="10" y="120" />
<mxPoint x="10" y="176" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-72" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontColor=#FFFFFF;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-11" target="bW8zysbPbXfA33rAzGtO-39" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="134" y="90" />
<mxPoint x="1000" y="90" />
</Array>
<mxPoint x="997.5" y="165.0000000000001" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-1" value="Wrappers&lt;br&gt;Or&lt;br&gt;&lt;div&gt;DH-Object&lt;/div&gt;" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFD7B0;strokeColor=#d79b00;rounded=0;labelBackgroundColor=none;" parent="1" vertex="1">
<mxGeometry x="-170" y="80" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-3" target="XNAtI1EKQKx7pIlif8ke-21" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-3" value="Mixins" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#A5E8A5;strokeColor=#82b366;rounded=0;labelBackgroundColor=none;" parent="1" vertex="1">
<mxGeometry x="-470" y="190" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-4" value="" style="endArrow=classic;html=1;rounded=0;strokeWidth=3;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="gNZkowd1tYjNP-PxMyY5-1" target="XNAtI1EKQKx7pIlif8ke-3" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-420" y="130" as="sourcePoint" />
<mxPoint x="-220" y="-25" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-5" target="XNAtI1EKQKx7pIlif8ke-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-5" value="Wrappers&lt;br&gt;Or&lt;br&gt;&lt;div&gt;DH-Object&lt;/div&gt;" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFD7B0;strokeColor=#d79b00;rounded=0;labelBackgroundColor=none;" parent="1" vertex="1">
<mxGeometry x="-170" y="190" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-60" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontColor=#FFFFFF;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-11" target="XNAtI1EKQKx7pIlif8ke-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-63" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontColor=#FFFFFF;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-11" target="lUieYn43trCVNQSoQYE8-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-11" value="core.api" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="60" y="165" width="147.5" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-21" target="XNAtI1EKQKx7pIlif8ke-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-21" value="" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#C7C7C7;strokeColor=#666666;fontColor=#333333;rounded=0;labelBackgroundColor=none;" parent="1" vertex="1">
<mxGeometry x="-320" y="175" width="120" height="85" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-22" target="XNAtI1EKQKx7pIlif8ke-1" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-22" value="" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#C7C7C7;strokeColor=#666666;fontColor=#333333;rounded=0;labelBackgroundColor=none;" parent="1" vertex="1">
<mxGeometry x="-320" y="90" width="120" height="85" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-28" value="&lt;div&gt;Wrapper&lt;/div&gt;&lt;div&gt;Factory&lt;br&gt;&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;fontColor=default;" parent="1" vertex="1">
<mxGeometry x="-290" y="110" width="60" height="130" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeWidth=3;" edge="1" parent="1" source="XNAtI1EKQKx7pIlif8ke-31" target="bW8zysbPbXfA33rAzGtO-39">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-31" value="GPU Buffer building" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="710" y="165" width="130" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-67" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;fontColor=#FFFFFF;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-33" target="XNAtI1EKQKx7pIlif8ke-54" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-33" value="Lod Building" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="290" y="165" width="120" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-52" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="460" y="110" width="200" height="175" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-25" value="" style="group" vertex="1" connectable="0" parent="XNAtI1EKQKx7pIlif8ke-52">
<mxGeometry width="200" height="175" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-53" value="LOD Storage" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="bW8zysbPbXfA33rAzGtO-25" vertex="1">
<mxGeometry width="200" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-54" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFF4E8;strokeColor=#d79b00;" parent="bW8zysbPbXfA33rAzGtO-25" vertex="1">
<mxGeometry y="45" width="200" height="130" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-55" value="Memory Storage" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" parent="bW8zysbPbXfA33rAzGtO-25" vertex="1">
<mxGeometry x="10" y="115" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-56" value="&lt;div&gt;File Storage&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" parent="bW8zysbPbXfA33rAzGtO-25" vertex="1">
<mxGeometry x="10" y="60" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-61" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="130" y="310" width="220" height="200" as="geometry" />
</mxCell>
<mxCell id="lUieYn43trCVNQSoQYE8-13" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#C7C7C7;strokeColor=#666666;fontColor=#333333;" parent="XNAtI1EKQKx7pIlif8ke-61" vertex="1">
<mxGeometry y="70" width="220" height="130" as="geometry" />
</mxCell>
<mxCell id="lUieYn43trCVNQSoQYE8-19" value="Distant Horizons&lt;br&gt;(Version dependent)" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#C7C7C7;strokeColor=#666666;fontColor=#333333;" parent="XNAtI1EKQKx7pIlif8ke-61" vertex="1">
<mxGeometry width="220" height="70" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-19" value="Chunk Generation" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#EBEBEB;strokeColor=#666666;fontColor=#333333;" parent="XNAtI1EKQKx7pIlif8ke-61" vertex="1">
<mxGeometry x="12.5" y="80" width="195" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-29" value="&lt;div&gt;Chunk loading from file&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#EBEBEB;strokeColor=#666666;fontColor=#333333;" parent="XNAtI1EKQKx7pIlif8ke-61" vertex="1">
<mxGeometry x="12.5" y="140" width="195" height="45" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-64" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontColor=#FFFFFF;strokeWidth=3;" parent="1" source="lUieYn43trCVNQSoQYE8-19" target="XNAtI1EKQKx7pIlif8ke-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="XNAtI1EKQKx7pIlif8ke-66" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontColor=#FFFFFF;strokeWidth=3;" parent="1" source="XNAtI1EKQKx7pIlif8ke-54" target="XNAtI1EKQKx7pIlif8ke-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-23" value="" style="group" vertex="1" connectable="0" parent="1">
<mxGeometry x="455" y="324" width="210" height="270" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-16" value="Memory Storage" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-23">
<mxGeometry width="210" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-17" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFF4E8;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-23">
<mxGeometry y="45" width="210" height="225" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-18" value="dimension" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-23">
<mxGeometry x="10.5" y="110" width="189" height="40" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-19" value="World" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-23">
<mxGeometry x="10.5" y="60" width="189" height="40" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-21" value="Region" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-23">
<mxGeometry x="10.5" y="160" width="189" height="40" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-22" value="Level Container&lt;br&gt;(Long primitive)" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-23">
<mxGeometry x="10.5" y="210" width="189" height="40" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-26" value="" style="group" vertex="1" connectable="0" parent="1">
<mxGeometry x="680" y="419" width="200" height="175" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-27" value="Config System" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-26">
<mxGeometry width="200" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-28" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFF4E8;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-26">
<mxGeometry y="45" width="200" height="130" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-29" value="Config GUI" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-26">
<mxGeometry x="10" y="115" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-30" value="Config File" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-26">
<mxGeometry x="10" y="60" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-38" value="" style="group" vertex="1" connectable="0" parent="1">
<mxGeometry x="900" y="165" width="200" height="175" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-39" value="Rendering" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-38">
<mxGeometry width="200" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-40" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFF4E8;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-38">
<mxGeometry y="45" width="200" height="130" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-41" value="Cloud Rendering" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-38">
<mxGeometry x="10" y="115" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-42" value="LOD Rendering" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-38">
<mxGeometry x="10" y="60" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-47" value="" style="group" vertex="1" connectable="0" parent="1">
<mxGeometry x="900" y="419" width="200" height="175" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-32" value="Mod Support" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-47">
<mxGeometry width="200" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-33" value="" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFF4E8;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-47">
<mxGeometry y="45" width="200" height="130" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-34" value="Mod API" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-47">
<mxGeometry x="10" y="115" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-35" value="&lt;div&gt;Mod Accessors&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#FFD7B0;strokeColor=#d79b00;" vertex="1" parent="bW8zysbPbXfA33rAzGtO-47">
<mxGeometry x="10" y="60" width="180" height="45" as="geometry" />
</mxCell>
<mxCell id="bW8zysbPbXfA33rAzGtO-20" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="XNAtI1EKQKx7pIlif8ke-55" target="bW8zysbPbXfA33rAzGtO-16">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="410" y="-36" as="sourcePoint" />
<mxPoint x="360" y="-86" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-01-04T16:15:44.618Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62" etag="-Vdo5wDmcYQvA_9MRiBE" version="16.0.0" type="google"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7V1db5s6GP41kbaLTHxDLpt063aWHfWs2zrtzgtOwhnBOcZpm/36Y2M7CRg60mGoNEuVGt44Bvw876eNGbmzzcMVBtv1BxTDdORY8cPIvRw5jmPZDv3HJHsuCQIhWOEk5iL7KLhJfkIhtIR0l8QwLzUkCKUk2ZaFC5RlcEFKMoAxui83W6K0fNYtWEFFcLMAqSq9TWKy5tLICY/ytzBZreWZ7WDCv9kA2VjcSb4GMbo/EbmvR+4MI0T4p83DDKZs8OS43L7b36bzH8HVX//k/4HP0/ef/v4y5p29Oecnh1vAMCNP7prcfA4vxsv3wY+3YTb+mb27Dq/GchhyspcDBmM6fuIQYbJGK5SB9PVROsVol8WQdWvRo2ObOUJbKrSp8F9IyF6QAewIoqI12aTi25xg9APOUIowlcRwCXYpvbEpzOILBjkVZiiDXPImSVNxKn6t7AIr2P5iYES7HO3wAj4yGq4vCArwCpLHGk4O+FPFgWgDCd7TH2KYApLclS8PCAavDu0OP71GCb1wxxLa5kqqCV1z/KjcBb8D8atTrNWOXlmu51Ga+1HgWGGp28NpZLf8fpVu6YeTuzuKCmKdQTJpCvol2eBkmrQkk+f2QiYvsp5MplJHftAzffw/kT6cFS3oE9i90Cd0PB22KLLakYliAfYnzbasQa6DbtIJ3IF0JwZvjuJbhGngUeVhfp9sUlCwY4kyIinJ+APSZJXRzwtKB0jd3PQOYpLQuORCfEEYEaeLdZLGc7BHO4ZxTsDihzyarhFOftJuwdFvAkwEY52g1OKG/VJQE8OctrmWTLQrog/godRwDnIiBAuUpmCbJ98Pt7GhcCTZFBGCNiXms9uBD0/gvspUGWt6Fe8nqXF/jNtsaXvWJzFbFDSTu8SOs6kQKFQYOVMWhSaQhaEXTD/3W6jwgo4MUeIcYUaW1IZURJIrKVySRqbkW7BIstW8aHPpHSUfxUgwEaK/XaaF1VoncQyzwhQSQACHlOEnVIdeqD+lf3RAZ9Yrf+TTC5/RY/t4TP9Yc0xmKKP3ApICXUj5cg8ZZ9pR4REtU7kgsQ/aQe9ogz6sgb6CcpoU6HGUZXJhPwniDQWr8FsC00+FlxrbCu6uirtbg3EKvsP0GuUJSRDrH/O2FewHg9d3Wmq2LnSjBsWm3a9R/IIp9Uuj3/oIELQ07fr0e1Ln5S+TDcxypjLG0/fo6d22dLBlNapzPniqRRjzqtQyWeXcFMzhHUzzWSEyJuF8k9BQNHkuLt92nRoOzJzRhZUy5GdM/ajLxydsOMoMHzrmQ9sYQRsfPNuEgPrgDaNhQ0BPVXYTAvZJgGhoex+5CqjPoK7YNDcyei71Rr+TcnVzPa++iuhblXKkVZnt+kX7wPcqhOFX0GnpUI7haVLxeJRg0ooO04qD+ThEEGpacShrl0yMdAbdexmvNq0o4skbuGCuWSQXH9AdM+BXOInnCR1PJyjUfn7SkspWhSngjtt4pHM9UtNMW3MGUk8XbRGnOvVgIs7O4K1JKGrh1RZxNs0m7LYxIHBOg84YUj+RFjpPFWKL8q/83zcRid4hegaj9x0To6b61K/eR6qX4MygkZjhxCCcqMlO+uWEbzVyIvuEoUlIO4f8UFweDvOmmsRiRwzmWjB31TJUv5jbVlNYkEPyEWYxxHTs36Rglb8wFl8nFQJvaCrYdYsOBBWuYAYxYJG14YJ+LkyGDgn9usmHggrgDl4mmOwPRQEDfsdlAHvw2K+mjohYkRi+BRlN2fGIndq1j8U0U1LUU1L0K6tgA9tuxw1taxL9unDB1Ija6n7T7MWZJUBdNSJfXZbEzX6KQGwsvibU3aEjv6Ap2Wfe3sCuCfbB636BGuSV53uMa+9vtjDyWtLBtxxdfFDrP2y28GTYCzBY3icfjzEG4RyD0PSs1HOZAAxVgzAWt8qgMfBrhb/tBKE+f6DmfeOi+lO4g2s29WPQ14V+zYLEntFXY/8y+t8M+trQt62hc4Cw3vkL+C9PZoELFnzfEzMf1D0N3KFzglBNBRkNtqJkckmHlBMgp2EhMUvBNPHAHzwUVNeCnYaCRx6wQTEs0MOCaOiIMKxfP7pgyBkK9JESWkOHhWF9UpCyUxsK9EGB4cvDdesDzZxPZ1WfljGfrkmfqGmuny8MrqwA5cHg18Onb/wTVTSIT6vHL40l6J4pQzuDoO4JAbFS+PokRXhh0O8e/cngfqBpqSBF/8tJYmDQ7x59t/XDZNrQb1odSNGfyYTAQK8Bem/wYkDTfkUU+rlMBAz0GqCXVdnhng1qXBpiPL529CdDx3th03qw3Hh83eh7ztDxXvjI8wDG4+uE3h882Gvy+Lnx+HqhD4cO9iaBguofvC+NXEjf05785+5L41U3LRY5etO+NNX2bmhVCKNhX5pIrRs8upehWWd6PpVbP0JyeDPKrwyMvs0uIzWuYFNKG/AgY8rySkMxsdT8zJHxOr/yOlwFn+/K00n9cgO+8WWCFyn8COIE7XLDiv5YMfiC1Kgu/TQTjx3B23bFqa55x0lTesnnHc1Gx3pgH3xrGds2GcapGkQtMwxNL2ryJuUA0ZfHT34lTv15qlti+uIdF2230JTvfdKaqkzUusccxdMdTSfM9pn9Jiqtt890K2+G6nBvHLMF9+84Iq5Mv5106Io/bEsNQKiy802PjLbr1faxUzHvrRc46FN3WRkx6v4kdRf69Hz1XTLHxJ18OKy+As/fhE1Vy+luuYTYhGVDGOogGtxQuyYu+y1DzTVqAENND48vLOc52/G17+7r/wE=</diagram></mxfile>

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

+64
View File
@@ -0,0 +1,64 @@
<?xml version="1.0" standalone="yes"?>
<svg xmlns="http://www.w3.org/2000/svg" width="2040" height="2040">
<!-- Distant Horizons logo in svg format -->
<!-- Converted svg made by coolGi -->
<!-- Made by hand so there may be inaccuracies -->
<!--
Colors used
Blue: "fill:#465AA8"
Green: "fill:#5C7E3C"
Wierd green: "fill:#DCD7AA"
-->
<!-- Big Blue -->
<polygon points="1018.5,15 1434,255 1018.5,486 603,255" style="fill:#465AA8" />
<polygon points="1460,270 1875.5,509.5 1460,750 1045,509" style="fill:#465AA8" />
<polygon points="1889,531.5 1889,1012 1473,1252 1473,772" style="fill:#465AA8" />
<!-- Big Green -->
<polygon points="577,269 992,510 577,750 162,509.5" style="fill:#5C7E3C" />
<polygon points="149,532 564,772 564,1252 149,1012" style="fill:#5C7E3C" />
<polygon points="1889,1041 1889,1522 1474,1762 1473,1281" style="fill:#5C7E3C" />
<!-- Big Wierd Green -->
<polygon points="149,1042 564,1282 564,1762 149,1522" style="fill:#DCD7AA" />
<polygon points="590,1297 1006,1537 1006,2017 590,1777" style="fill:#DCD7AA" />
<polygon points="1031,1537 1447,1297 1447,1777 1031,2017" style="fill:#DCD7AA" />
<!-- Mid Blue -->
<polygon points="1239.5,652 1434,764.5 1239.5,877 1045,764.5" style="fill:#465AA8" />
<polygon points="1447,787 1447,1012 1252,1125 1252,899" style="fill:#465AA8" />
<!-- Mid Green -->
<polygon points="1018.5,525 1214,637 1018.5,749 824,637" style="fill:#5C7E3C" />
<polygon points="798,652 992,764.5 798,877 603,764.5" style="fill:#5C7E3C" />
<polygon points="590,787 785,899 785,1125 590,1012" style="fill:#5C7E3C" />
<polygon points="1447,1042 1447,1267 1252,1380 1252,1154" style="fill:#5C7E3C" />
<polygon points="1226,1170 1226,1395 1031,1507 1031,1282" style="fill:#5C7E3C" />
<!-- Mid Wierd Green -->
<polygon points="590,1042 785,1154 785,1379 590,1267" style="fill:#DCD7AA" />
<polygon points="811,1169 1006,1282 1006,1507 811,1395" style="fill:#DCD7AA" />
<!-- Out Small Blue -->
<polygon points="1018.5,779.5 1103,828 1018.5,877 934,828" style="fill:#465AA8" />
<polygon points="1129,843 1214,892 1129,941 1044,892" style="fill:#465AA8" />
<polygon points="1226,914 1226,1012 1142,1061 1142,963" style="fill:#465AA8" />
<polygon points="1226,1042 1226,1140 1142,1188 1142,1090" style="fill:#465AA8" />
<polygon points="1116,1105 1116,1203 1031,1252 1031,1154" style="fill:#465AA8" />
<!-- Out Small Green -->
<polygon points="908,843 993,892 908,941 823,892" style="fill:#5C7E3C" />
<polygon points="811,914 895,963 895,1061 811,1012" style="fill:#5C7E3C" />
<polygon points="921,1105 1006,1154 1006,1252 921,1203" style="fill:#5C7E3C" />
<!-- Out Small Wierd Green -->
<polygon points="811,1042 895,1090 895,1188 811,1140" style="fill:#DCD7AA" />
<!-- In Small Blue -->
<polygon points="1116,978 1116,1076 1031,1125 1031,1027" style="fill:#465AA8" />
<!-- In Small Green -->
<polygon points="1018.5,907 1103,956 1018.5,1004 934,956" style="fill:#5C7E3C" />
<polygon points="921,978 1006,1027 1006,1125 921,1076" style="fill:#5C7E3C" />
</svg>

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

@@ -0,0 +1,4 @@
FROM anapsix/alpine-java
MAINTAINER Ran
COPY anotherquestion-1.0-SNAPSHOT.jar /home/anotherquestion-1.0-SNAPSHOT.jar
CMD ["java","-jar","/home/anotherquestion-1.0-SNAPSHOT.jar"]
View File
-1
View File
@@ -1 +0,0 @@
<mxfile host="app.diagrams.net" modified="2021-12-22T02:14:44.485Z" agent="5.0 (Windows)" etag="8Lz4CpREcKLpQpROSPVl" version="16.0.3" type="gitlab"><diagram id="xLs7mM1S-vncSruOQYJG" name="Page-1">xZVNj5swEIZ/DcetAJdkc2yTbXvZVaQcuunNtSfgrsGRcRbor6+Jx4BDom3VSr1Enmc+7HnHOBFZl+1nTY/Fo+IgozTmbUQ2UZou71P724POAZIlDuRacIcmYCd+AsIY6UlwqINAo5Q04hhCpqoKmAkY1Vo1YdhByXDXI81hBnaMyjn9KrgpHL3P4pF/AZEXfuckRk9JfTCCuqBcNRNEHiKy1koZtyrbNcheO6+Ly/t0wzscTENlfichf/r2ohqemP2Pp+3dtn3s9tkdVnml8oQNCwOlJeioTeeV0OpUceiLxRH52BQ2cHekrPc2dvSWFaaU1krsEsuCNtDePG8yqGBvD6gSjO5sCCasUDe8OMl7tJtxDInXtpiMYIGM4uTzofIojl2gPn+gVXpLq/TvtDoIKddKKn3OJYcDLBizvDZavcDEw5er73H8b9QlSSjv4n+rS2bqzlSFin/oP2lrMUnrWrBQyFB1aIV5Rk+/3vf8XYbWpp2EbTpvVLaV56nhspaZt8e8s+UT3VmBzx6Ti3nYftRJM3j7kzRU52Deuo7z+U4GmF2Zn2caJDXiNTzutaHiDlslbCM3r89Q15dwbWLW9FW6LLS4+MxXF4WcDrNC5zs2tH3t2llzfFxd+PgPRR5+AQ==</diagram></mxfile>
@@ -0,0 +1,93 @@
package com.seibel.lod.api;
import com.seibel.lod.api.interfaces.config.IDhApiConfig;
import com.seibel.lod.api.interfaces.override.IDhApiOverrideable;
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGeneratorOverrideRegister;
import com.seibel.lod.api.interfaces.render.IDhApiRenderProxy;
import com.seibel.lod.api.interfaces.world.IDhApiWorldProxy;
import com.seibel.lod.api.methods.override.DhApiWorldGeneratorOverrideRegister;
import com.seibel.lod.coreapi.DependencyInjection.ApiEventInjector;
import com.seibel.lod.coreapi.DependencyInjection.OverrideInjector;
import com.seibel.lod.coreapi.ModInfo;
import com.seibel.lod.api.interfaces.data.IDhApiTerrainDataRepo;
import com.seibel.lod.api.interfaces.events.IDhApiEventInjector;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IOverrideInjector;
/**
* This is the masthead of the API, almost everything you could want to do
* can be achieved from here. <br>
* For example: you can access singletons which handle the config or event binding. <br><br>
*
* <strong>Q:</strong> Why should I use this class instead of just getting the API singleton I need? <br>
*
* <strong>A:</strong> This way there is a lower chance of your code breaking if we change something on our end.
* For example, if we realized there is a much better way of handling dependency injection we would keep the
* interface the same so your code doesn't have to change. Whereas if you were directly referencing
* the concrete object we replaced, there would be issues.
*
* @author James Seibel
* @version 2023-2-9
*/
public class DhApiMain
{
/**
* <strong>WARNING:</strong>
* All objects in this class will be null until after DH initializes for the first time. <br><br>
*
* Bind a custom {@link com.seibel.lod.api.methods.events.abstractEvents.DhApiAfterDhInitEvent DhApiAfterDhInitEvent}
* to {@link DhApiMain#events ApiCoreInjectors.events} in order to be notified when this class can
* be safely used.
*/
public static class Delayed
{
/** Used to interact with Distant Horizons' Configs. */
public static IDhApiConfig configs = null;
/**
* Used to interact with Distant Horizons' terrain data.
* Designed to be used in conjunction with {@link DhApiMain.Delayed#worldProxy}.
*/
public static IDhApiTerrainDataRepo terrainRepo = null;
/**
* Used to interact with Distant Horizons' currently loaded world.
* Designed to be used in conjunction with {@link DhApiMain.Delayed#terrainRepo}.
*/
public static IDhApiWorldProxy worldProxy = null;
/** Used to interact with Distant Horizons' rendering system. */
public static IDhApiRenderProxy renderProxy = null;
}
// always available //
/** Used to bind/unbind Distant Horizons Api events. */
public static final IDhApiEventInjector events = ApiEventInjector.INSTANCE;
/** Used to bind/unbind Distant Horizons Api events. */
public static final IDhApiWorldGeneratorOverrideRegister worldGenOverrides = DhApiWorldGeneratorOverrideRegister.INSTANCE;
/** Used to bind overrides to change Distant Horizons' core behavior. */
public static final IOverrideInjector<IDhApiOverrideable> overrides = OverrideInjector.INSTANCE;
/** This version should only be updated when breaking changes are introduced to the Distant Horizons API. */
public static int getApiMajorVersion() { return ModInfo.API_MAJOR_VERSION; }
/** This version should be updated whenever new methods are added to the Distant Horizons API. */
public static int getApiMinorVersion() { return ModInfo.API_MINOR_VERSION; }
/**
* Returns the mod's semantic version number in the format: Major.Minor.Patch
* with optional extensions "-a" for alpha, "-b" for beta, and -dev for unstable development builds. <br>
* Examples: "1.6.9-a", "1.7.0-a-dev", "2.1.0-b", "3.0.0", "3.1.4-dev"
*/
public static String getModVersion() { return ModInfo.VERSION; }
/** Returns true if the mod is a development version, false if it is a release version. */
public static boolean getIsDevVersion() { return ModInfo.IS_DEV_BUILD; }
/** Returns the network protocol version. */
public static int getNetworkProtocolVersion() { return ModInfo.PROTOCOL_VERSION; }
}
@@ -0,0 +1 @@
The external api package holds any code that interfaces between Distant Horizons and other mods or projects.
@@ -0,0 +1,52 @@
package com.seibel.lod.api.enums;
/**
* BLOCK - Detail Level: 0, width 1 block, <br>
* CHUNK - Detail Level: 4, width 16 block, <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)
* 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>
* Example for the chunk detail level (4): 2^4 = 16 blocks wide <Br><br>
*
* This enum doesn't contain all valid detail levels, only those most likely to be needed.
* Detail levels 1,2,3, ... 255 are all technically valid detail levels
* (although anything beyond {@link EDhApiDetailLevel#REGION} may be difficult deal with).
*
* @author James Seibel
* @version 2022-12-5
*/
public enum EDhApiDetailLevel
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/**
* detail level: 0 <Br>
* width in Blocks: 1
*/
BLOCK(0, 1),
/**
* detail level: 4 <Br>
* width in Blocks: 16
*/
CHUNK(4, 16),
/**
* detail level: 9 <Br>
* width in Blocks: 512
*/
REGION(9, 512);
public final byte detailLevel;
public final byte widthInBlocks;
EDhApiDetailLevel(int detailLevel, int widthInBlocks)
{
this.detailLevel = (byte) detailLevel;
this.widthInBlocks = (byte) widthInBlocks;
}
}
@@ -0,0 +1,53 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* NONE, <br>
* NON_FULL, <br>
* NO_COLLISION, <br>
* BOTH, <br>
*
* @author Leonardo Amato
* @version 2022-7-1
*/
public enum EBlocksToAvoid
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
NONE(false, false),
NON_FULL(true, false),
NO_COLLISION(false, true),
BOTH(true, true);
public final boolean nonFull;
public final boolean noCollision;
EBlocksToAvoid(boolean nonFull, boolean noCollision)
{
this.nonFull = nonFull;
this.noCollision = noCollision;
}
}
@@ -1,36 +1,39 @@
/*
* This file is part of the Distant Horizon mod (formerly the LOD Mod),
* licensed under the GNU GPL v3 License.
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020 James Seibel
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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 General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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.lod.core.enums.config;
package com.seibel.lod.api.enums.config;
/**
* CONSTANT <br>
* FREQUENT <br>
* NORMAL <br>
* RARE <br>
* <br>
* Determines how fast the buffers need to be regenerated
* RARE <br> <br>
*
* Determines how fast the buffers should be regenerated
*
* @author Leonardo Amato
* @version 9-25-2021
*/
public enum BufferRebuildTimes
public enum EBufferRebuildTimes
{
CONSTANT(0, 0, 0, 1),
FREQUENT(1000, 500, 2500, 1),
NORMAL(2000, 1000, 5000, 4),
@@ -42,7 +45,7 @@ public enum BufferRebuildTimes
public final int chunkChangeTimeout;
public final int playerMoveDistance;
BufferRebuildTimes(int playerMoveTimeout, int renderedChunkTimeout, int chunkChangeTimeout, int playerMoveDistance)
EBufferRebuildTimes(int playerMoveTimeout, int renderedChunkTimeout, int chunkChangeTimeout, int playerMoveDistance)
{
this.playerMoveTimeout = playerMoveTimeout;
this.renderedChunkTimeout = renderedChunkTimeout;
@@ -0,0 +1,47 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* AUTO <br>
* Near_First <br>
* Far_First <br> <br>
*
* Determines which LODs should have priority when generating
* outside the normal view distance.
*
* @author Leonardo Amato
* @version 12-1-2021
*/
public enum EGenerationPriority
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/** NEAR_FIRST when connected to servers and BALANCED when on single player */
AUTO,
NEAR_FIRST,
BALANCED,
FAR_FIRST
}
@@ -0,0 +1,78 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* AUTO, <br>
* BUFFER_STORAGE, <br>
* SUB_DATA, <br>
* BUFFER_MAPPING, <br>
* DATA <br>
*
* @author Leetom
* @author James Seibel
* @version 2022-7-2
*/
public enum EGpuUploadMethod
{
/** Picks the best option based on the GPU the user has. */
AUTO(false, false),
// commented out since it isn't currently in use
//BUFFER_STORAGE_MAPPING(true, true),
/**
* Default for NVIDIA if OpenGL 4.5 is supported. <br>
* Fast rendering, no stuttering.
*/
BUFFER_STORAGE(false, true),
/**
* Backup option for NVIDIA. <br>
* Fast rendering but may stutter when uploading.
*/
SUB_DATA(false, false),
/**
* Default option for AMD/Intel. <br>
* May end up storing buffers in System memory. <br>
* Fast rending if in GPU memory, slow if in system memory, <br>
* but won't stutter when uploading.
*/
BUFFER_MAPPING(true, false),
/**
* Backup option for AMD/Intel. <br>
* Fast rendering but may stutter when uploading.
*/
DATA(false, false);
public final boolean useEarlyMapping;
public final boolean useBufferStorage;
EGpuUploadMethod(boolean useEarlyMapping, boolean useBufferStorage)
{
this.useEarlyMapping = useEarlyMapping;
this.useBufferStorage = useBufferStorage;
}
}
@@ -1,37 +1,42 @@
/*
* This file is part of the Distant Horizon mod (formerly the LOD Mod),
* licensed under the GNU GPL v3 License.
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020 James Seibel
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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 General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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.lod.core.enums.config;
package com.seibel.lod.api.enums.config;
/**
* Lowest <br>
* Low <br>
* Medium <br>
* High <br>
* <br>
* this indicates the base of the quadratic function we use for the quality drop off
* LOWEST <br>
* LOW <br>
* MEDIUM <br>
* HIGH <br> <br>
*
* this indicates the base of the quadratic function we use for the quality drop-off
*
* @author Leonardo Amato
* @version 9-29-2021
*/
public enum HorizontalQuality
public enum EHorizontalQuality
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/** 1.0 AKA Linear */
LOWEST(1.0f),
@@ -46,7 +51,7 @@ public enum HorizontalQuality
public final double quadraticBase;
HorizontalQuality(double distanceUnit)
EHorizontalQuality(double distanceUnit)
{
this.quadraticBase = distanceUnit;
}
@@ -1,41 +1,41 @@
/*
* This file is part of the Distant Horizon mod (formerly the LOD Mod),
* licensed under the GNU GPL v3 License.
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020 James Seibel
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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 General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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.lod.core.enums.config;
package com.seibel.lod.api.enums.config;
import java.util.ArrayList;
import java.util.Collections;
import com.seibel.lod.core.util.LodUtil;
import com.seibel.lod.coreapi.util.MathUtil;
/**
* chunk <Br>
* half_chunk <Br>
* four_blocks <br>
* two_blocks <Br>
* block <br>
* BLOCK <Br>
* TWO_BLOCKS <Br>
* FOUR_BLOCKS <br>
* HALF_CHUNK <Br>
* CHUNK <br>
*
* @author James Seibel
* @author Leonardo Amato
* @version 9-25-2021
* @version 2022-7-5
*/
public enum HorizontalResolution
public enum EHorizontalResolution
{
/** render 256 LODs for each chunk */
BLOCK(16, 0),
@@ -85,12 +85,12 @@ public enum HorizontalResolution
* 2nd dimension: An array of all LodDetails that are less than or <br>
* equal to that detailLevel
*/
private static HorizontalResolution[][] lowerDetailArrays;
private static EHorizontalResolution[][] lowerDetailArrays;
HorizontalResolution(int newLengthCount, int newDetailLevel)
EHorizontalResolution(int newLengthCount, int newDetailLevel)
{
detailLevel = (byte) newDetailLevel;
dataPointLengthCount = newLengthCount;
@@ -129,20 +129,20 @@ public enum HorizontalResolution
* Returns an array of all LodDetails that have a detail level
* that is less than or equal to the given LodDetail
*/
public static HorizontalResolution[] getSelfAndLowerDetails(HorizontalResolution detail)
public static EHorizontalResolution[] getSelfAndLowerDetails(EHorizontalResolution detail)
{
if (lowerDetailArrays == null)
{
// run first time setup
lowerDetailArrays = new HorizontalResolution[HorizontalResolution.values().length][];
lowerDetailArrays = new EHorizontalResolution[EHorizontalResolution.values().length][];
// go through each LodDetail
for (HorizontalResolution currentDetail : HorizontalResolution.values())
for (EHorizontalResolution currentDetail : EHorizontalResolution.values())
{
ArrayList<HorizontalResolution> lowerDetails = new ArrayList<>();
ArrayList<EHorizontalResolution> lowerDetails = new ArrayList<>();
// find the details lower than currentDetail
for (HorizontalResolution compareDetail : HorizontalResolution.values())
for (EHorizontalResolution compareDetail : EHorizontalResolution.values())
{
if (currentDetail.detailLevel <= compareDetail.detailLevel)
{
@@ -154,7 +154,7 @@ public enum HorizontalResolution
Collections.sort(lowerDetails);
Collections.reverse(lowerDetails);
lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new HorizontalResolution[lowerDetails.size()]);
lowerDetailArrays[currentDetail.detailLevel] = lowerDetails.toArray(new EHorizontalResolution[lowerDetails.size()]);
}
}
@@ -162,11 +162,11 @@ public enum HorizontalResolution
}
/** Returns what detail level should be used at a given distance and maxDistance. */
public static HorizontalResolution getDetailForDistance(HorizontalResolution maxDetailLevel, int distance, int maxDistance)
public static EHorizontalResolution getDetailForDistance(EHorizontalResolution maxDetailLevel, int distance, int maxDistance)
{
HorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel);
EHorizontalResolution[] lowerDetails = getSelfAndLowerDetails(maxDetailLevel);
int distanceBetweenDetails = maxDistance / lowerDetails.length;
int index = LodUtil.clamp(0, distance / distanceBetweenDetails, lowerDetails.length - 1);
int index = MathUtil.clamp(0, distance / distanceBetweenDetails, lowerDetails.length - 1);
return lowerDetails[index];
@@ -1,23 +1,23 @@
/*
* This file is part of the Distant Horizon mod (formerly the LOD Mod),
* licensed under the GNU GPL v3 License.
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020 James Seibel
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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 General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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.lod.core.enums.config;
package com.seibel.lod.api.enums.config;
/**
* Low <br>
@@ -29,7 +29,7 @@ package com.seibel.lod.core.enums.config;
* @author Leonardo Amato
* @version 9-25-2021
*/
public enum HorizontalScale
public enum EHorizontalScale
{
/** Lods are 2D with heightMap */
LOW(64),
@@ -42,7 +42,7 @@ public enum HorizontalScale
public final int distanceUnit;
HorizontalScale(int distanceUnit)
EHorizontalScale(int distanceUnit)
{
this.distanceUnit = distanceUnit;
}
@@ -0,0 +1,40 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* FAST, <br>
* FANCY,
*
* @author Leetom
* @version 2022-7-1
*/
public enum ELightGenerationMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/** Fake light values using a height map */
FAST,
/** Run the lighting engine though the chunk to generate proper light values */
FANCY
}
@@ -0,0 +1,45 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
import org.apache.logging.log4j.Level;
public enum ELoggerMode
{
DISABLED(Level.OFF, Level.OFF),
LOG_ALL_TO_FILE(Level.ALL, Level.OFF),
LOG_ERROR_TO_CHAT(Level.ALL, Level.ERROR),
LOG_WARNING_TO_CHAT(Level.ALL, Level.WARN),
LOG_INFO_TO_CHAT(Level.ALL, Level.INFO),
LOG_DEBUG_TO_CHAT(Level.ALL, Level.DEBUG),
LOG_ALL_TO_CHAT(Level.ALL, Level.ALL),
LOG_ERROR_TO_CHAT_AND_FILE(Level.ERROR, Level.ERROR),
LOG_WARNING_TO_CHAT_AND_FILE(Level.WARN, Level.WARN),
LOG_INFO_TO_CHAT_AND_FILE(Level.INFO, Level.INFO),
LOG_DEBUG_TO_CHAT_AND_FILE(Level.DEBUG, Level.DEBUG),
LOG_WARNING_TO_CHAT_AND_INFO_TO_FILE(Level.INFO, Level.WARN),
LOG_ERROR_TO_CHAT_AND_INFO_TO_FILE(Level.INFO, Level.ERROR),
;
public final Level levelForFile;
public final Level levelForChat;
ELoggerMode(Level levelForFile, Level levelForChat) {
this.levelForFile = levelForFile;
this.levelForChat = levelForChat;
}
}
@@ -0,0 +1,72 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2022 Tom Lee (TomTheFurry)
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* AUTO, <br>
* NAME_ONLY, <br>
* NAME_IP, <br>
* NAME_IP_PORT, <br> <br>
*
* Determines how the multiplayer folders should be named.
*
* @author James Seibel
* @version 2022-7-1
*/
public enum EServerFolderNameMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/**
* NAME_IP for LAN connections <Br>
* NAME_IP_PORT for all others
*/
AUTO,
/** Only use the server name */
NAME_ONLY,
/**
* {SERVER_NAME} IP {IP} <br>
* Example: Minecraft Server IP 192.168.1.40
*/
NAME_IP,
/**
* {SERVER_NAME} IP {IP}:{PORT} <br>
* Example: Minecraft Server IP 192.168.1.40:25565
*/
NAME_IP_PORT,
/**
* {SERVER_NAME} IP {IP} <br>
* Example: Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5 <Br> <br>
*
* Not normally recommended, since the game version can change if the
* server installs paper or some other jar. <br>
* This is just here to provide backwards compatibility.
*/
NAME_IP_PORT_MC_VERSION;
}
@@ -0,0 +1,41 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* NONE, GAME_SHADING
*
* @author James Seibel
* @version 7-25-2020
*/
public enum EShadingMode
{
/**
* LODs will have darker sides and bottoms to simulate
* Minecraft's fast lighting.
*/
GAME_SHADING,
/**
* LODs will use ambient occlusion to mimic Minecraft's
* Fancy lighting.
*/
AMBIENT_OCCLUSION
}
@@ -0,0 +1,54 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* NEVER, <br>
* DYNAMIC, <br>
* ALWAYS <br> <br>
*
* This represents how far the LODs should overlap with
* the vanilla Minecraft terrain.
*
* @author James Seibel
* @version 2022-6-30
*/
public enum EVanillaOverdraw
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/**
* Don't draw LODs where a minecraft chunk could be.
* Use Overdraw Offset to tweak the border thickness.
*/
NEVER,
/**
* Draw LODs over the farther minecraft chunks.
* Dynamically decides the border thickness
*/
DYNAMIC,
/** Draw LODs over all minecraft chunks. */
ALWAYS,
}
@@ -0,0 +1,88 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.config;
/**
* heightmap <br>
* multi_lod <br>
*
* @author Leonardo Amato
* @version 2023-2-5
*/
public enum EVerticalQuality
{
// HEIGHT_MAP(new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }), // commented out for now since it causes issues with transparency, may be re-added if the transparency issue is fixed
LOW(new int[] { 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1 }),
MEDIUM(new int[] { 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1 }),
HIGH(new int[] { 8, 6, 4, 2, 2, 2, 2, 1, 1, 1, 1 }),
ULTRA(new int[] { 16, 8, 4, 2, 2, 2, 2, 1, 1, 1, 1 });
public final int[] maxVerticalData;
EVerticalQuality(int[] maxVerticalData) { this.maxVerticalData = maxVerticalData; }
/** returns null if out of range */
public static EVerticalQuality previous(EVerticalQuality mode)
{
switch (mode)
{
case ULTRA:
return EVerticalQuality.HIGH;
case HIGH:
return EVerticalQuality.MEDIUM;
case MEDIUM:
return EVerticalQuality.LOW;
case LOW:
default:
return null;
}
}
/** returns null if out of range */
public static EVerticalQuality next(EVerticalQuality mode)
{
switch (mode)
{
case MEDIUM:
return EVerticalQuality.HIGH;
case LOW:
return EVerticalQuality.MEDIUM;
case HIGH:
return EVerticalQuality.ULTRA;
case ULTRA:
default:
return null;
}
}
public int calculateMaxVerticalData(byte dataDetail)
{
if (dataDetail >= this.maxVerticalData.length)
{
dataDetail = (byte) (this.maxVerticalData.length - 1);
}
return this.maxVerticalData[dataDetail];
}
}
@@ -0,0 +1,112 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* OFF, <br>
* SHOW_WIREFRAME, <br>
* SHOW_DETAIL, <br>
* SHOW_DETAIL_WIREFRAME, <br>
* SHOW_GENMODE, <br>
* SHOW_GENMODE_WIREFRAME, <br>
* SHOW_OVERLAPPING_QUADS, <br>
* SHOW_OVERLAPPING_QUADS_WIREFRAME, <br>
* SHOW_RENDER_SOURCE_FLAG, <br>
* SHOW_RENDER_SOURCE_FLAG_WIREFRAME, <br>
*
* @author Leetom
* @author James Seibel
* @version 2022-7-2
*/
public enum EDebugMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/** LODs are rendered normally */
OFF,
/** LOD draws in wireframe. */
SHOW_WIREFRAME,
/** LOD colors are based on their detail */
SHOW_DETAIL,
/** LOD colors are based on their detail, and draws in wireframe. */
SHOW_DETAIL_WIREFRAME,
/** LOD colors are based on their gen mode. */
SHOW_GENMODE,
/** LOD colors are based on their gen mode, and draws in wireframe. */
SHOW_GENMODE_WIREFRAME,
/** Only draw overlapping LOD quads. */
SHOW_OVERLAPPING_QUADS,
/** Only draw overlapping LOD quads, and draws in wireframe. */
SHOW_OVERLAPPING_QUADS_WIREFRAME,
/** LOD colors are based on renderSource flags. */
SHOW_RENDER_SOURCE_FLAG,
/** LOD colors are based on renderSource flags, and draws in wireframe. */
SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
/** returns the next debug mode */
// Deprecated: use DebugMode.next() instead
@Deprecated
public EDebugMode getNext()
{
return next(this);
}
public static EDebugMode next(EDebugMode type) {
switch (type) {
case OFF: return SHOW_WIREFRAME;
case SHOW_WIREFRAME: return SHOW_DETAIL;
case SHOW_DETAIL: return SHOW_DETAIL_WIREFRAME;
case SHOW_DETAIL_WIREFRAME: return SHOW_GENMODE;
case SHOW_GENMODE: return SHOW_GENMODE_WIREFRAME;
case SHOW_GENMODE_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
case SHOW_OVERLAPPING_QUADS: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
case SHOW_RENDER_SOURCE_FLAG: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
default: return OFF;
}
}
public static EDebugMode previous(EDebugMode type) {
switch (type) {
case OFF: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
case SHOW_RENDER_SOURCE_FLAG_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE_WIREFRAME;
case SHOW_GENMODE_WIREFRAME: return SHOW_GENMODE;
case SHOW_GENMODE: return SHOW_DETAIL_WIREFRAME;
case SHOW_DETAIL_WIREFRAME: return SHOW_DETAIL;
case SHOW_DETAIL: return SHOW_WIREFRAME;
default: return OFF;
}
}
}
@@ -1,42 +1,46 @@
/*
* This file is part of the Distant Horizon mod (formerly the LOD Mod),
* licensed under the GNU GPL v3 License.
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020 James Seibel
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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 General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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.lod.core.enums.rendering;
package com.seibel.lod.api.enums.rendering;
/**
* USE_DEFAULT_FOG_COLOR, <br>
* USE_SKY_COLOR, <br>
*
* @author James Seibel
* @version 11-27-2021
* @version 2022-6-9
*/
public enum FogColorMode
public enum EFogColorMode
{
// Reminder:
// when adding items: up the API minor version
// when removing items: up the API major version
/** Fog uses Minecraft's fog color. */
USE_WORLD_FOG_COLOR,
/**
* Replicates the effect of the clear sky mod.
* Making the fog blend in with the sky better
* For it to look good you need one of the following mods:
* https://www.curseforge.com/minecraft/mc-mods/clear-skies
* https://www.curseforge.com/minecraft/mc-mods/clear-skies-forge-port
* For it to look good you need one of those mods
*/
USE_SKY_COLOR,
}
@@ -0,0 +1,37 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* NEAR, FAR, or NEAR_AND_FAR.
*
* @author James Seibel
* @version 2022-6-2
*/
public enum EFogDistance
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
NEAR,
FAR,
NEAR_AND_FAR
}
@@ -0,0 +1,45 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* USE_OPTIFINE_FOG_SETTING, <br>
* FOG_ENABLED, <br>
* FOG_DISABLED <br>
*
* @author James Seibel
* @version 2022-6-2
*/
public enum EFogDrawMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/**
* Use whatever Fog setting optifine is using.
* If optifine isn't installed this defaults to FOG_ENABLED.
*/
USE_OPTIFINE_SETTING,
FOG_ENABLED,
FOG_DISABLED;
}
@@ -0,0 +1,22 @@
package com.seibel.lod.api.enums.rendering;
/**
* LINEAR, <br>
* EXPONENTIAL, <br>
* EXPONENTIAL_SQUARED <br>
*
* @author Leetom
* @version 2022-6-30
*/
public enum EFogFalloff
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
LINEAR,
EXPONENTIAL,
EXPONENTIAL_SQUARED,
// TEXTURE_BASED, // TODO: Impl this
}
@@ -1,23 +1,23 @@
/*
* This file is part of the Distant Horizon mod (formerly the LOD Mod),
* licensed under the GNU GPL v3 License.
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020 James Seibel
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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 General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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.lod.core.enums.rendering;
package com.seibel.lod.api.enums.rendering;
/**
* Minecraft, Lod_Builder, None
@@ -25,7 +25,7 @@ package com.seibel.lod.core.enums.rendering;
* @author James Seibel
* @version 10-1-2021
*/
public enum GLProxyContext
public enum EGLProxyContext
{
/** Minecraft's render thread */
MINECRAFT,
@@ -0,0 +1,49 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* BASIC <br>
* IGNORE_HEIGHT <br>
* ADDITION <br>
* MAX <br>
* MULTIPLY <br>
* INVERSE_MULTIPLY <br>
* LIMITED_ADDITION <br>
* MULTIPLY_ADDITION <br>
* INVERSE_MULTIPLY_ADDITION <br>
* AVERAGE <br>
*
* @author Leetom
* @version 2022-4-14
*/
public enum EHeightFogMixMode
{
BASIC,
IGNORE_HEIGHT,
ADDITION,
MAX,
MULTIPLY,
INVERSE_MULTIPLY,
LIMITED_ADDITION,
MULTIPLY_ADDITION,
INVERSE_MULTIPLY_ADDITION,
AVERAGE,
}
@@ -0,0 +1,57 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* ABOVE_CAMERA, <br>
* BELOW_CAMERA, <br>
* ABOVE_AND_BELOW_CAMERA, <br>
* ABOVE_SET_HEIGHT, <br>
* BELOW_SET_HEIGHT, <br>
* ABOVE_AND_BELOW_SET_HEIGHT, <br>
*
* @author Leetom
* @version 6-30-2022
*/
public enum EHeightFogMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
ABOVE_CAMERA(true, true, false),
BELOW_CAMERA(true, false, true),
ABOVE_AND_BELOW_CAMERA(true, true, true),
ABOVE_SET_HEIGHT(false, true, false),
BELOW_SET_HEIGHT(false, false, true),
ABOVE_AND_BELOW_SET_HEIGHT(false, true, true);
public final boolean basedOnCamera;
public final boolean above;
public final boolean below;
EHeightFogMode(boolean basedOnCamera, boolean above, boolean below)
{
this.basedOnCamera = basedOnCamera;
this.above = above;
this.below = below;
}
}
@@ -0,0 +1,63 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* Default
* Debug
* Disabled
*
* @version 2022-6-2
*/
public enum ERendererMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
DEFAULT,
DEBUG,
DISABLED;
/** Used by the config GUI to cycle through the available rendering options */
public static ERendererMode next(ERendererMode type)
{
switch (type)
{
case DEFAULT: return DEBUG;
case DEBUG: return DISABLED;
default: return DEFAULT;
}
}
/** Used by the config GUI to cycle through the available rendering options */
public static ERendererMode previous(ERendererMode type)
{
switch (type)
{
case DEFAULT: return DISABLED;
case DEBUG: return DEFAULT;
default: return DEBUG;
}
}
}
@@ -0,0 +1,55 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.rendering;
/**
* OFF, <br>
* SHOW_WIREFRAME, <br>
* SHOW_DETAIL, <br>
* SHOW_DETAIL_WIREFRAME, <br>
* SHOW_GENMODE, <br>
* SHOW_GENMODE_WIREFRAME, <br>
* SHOW_OVERLAPPING_QUADS, <br>
* SHOW_OVERLAPPING_QUADS_WIREFRAME, <br>
*
* @author Leetom
* @author James Seibel
* @version 2022-7-2
*/
public enum ETransparency
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
DISABLED(false, false),
FAKE(true, true),
COMPLETE(true, false);
public final boolean tranparencyEnabled;
public final boolean fakeTransparencyEnabled;
ETransparency(boolean tranparencyEnabled, boolean fakeTransparencyEnabled)
{
this.tranparencyEnabled = tranparencyEnabled;
this.fakeTransparencyEnabled = fakeTransparencyEnabled;
}
}
@@ -0,0 +1,142 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.enums.worldGeneration;
/**
* PRE_EXISTING_ONLY <br>
* BIOME_ONLY <br>
* BIOME_ONLY_SIMULATE_HEIGHT <br>
* SURFACE <br>
* FEATURES <br>
* FULL <br><br>
*
* In order of fastest to slowest.
*
* @author James Seibel
* @author Leonardo Amato
* @version 2022-12-10
*/
public enum EDhApiDistantGeneratorMode
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
/** Don't generate any new terrain, just generate LODs for already generated chunks. */
PRE_EXISTING_ONLY((byte) 1),
/**
* Only generate the biomes and use biome
* grass/foliage color, water color, or ice color
* to generate the color. <br>
* Doesn't generate height, everything is shown at sea level. <br>
* Multithreaded - Fastest (2-5 ms)
*/
BIOME_ONLY((byte) 2),
/**
* Same as BIOME_ONLY, except instead
* of always using sea level as the LOD height
* different biome types (mountain, ocean, forest, etc.)
* use predetermined heights to simulate having height data.
*/
BIOME_ONLY_SIMULATE_HEIGHT((byte) 3),
/**
* Generate the world surface,
* this does NOT include caves, trees,
* or structures. <br>
* Multithreaded - Faster (10-20 ms)
*/
SURFACE((byte) 4),
/**
* Generate including structures.
* NOTE: This may cause world generation bugs or instability,
* since some features can cause concurrentModification exceptions. <br>
* Multithreaded - Fast (15-20 ms)
*/
FEATURES((byte) 5),
/**
* Ask the server to generate/load each chunk.
* This is the most compatible, but causes server/simulation lag.
* This will also show player made structures if you
* are adding the mod on a pre-existing world. <br>
* Single-threaded - Slow (15-50 ms, with spikes up to 200 ms)
*/
FULL((byte) 6);
public static final EDhApiDistantGeneratorMode RENDERABLE = EDhApiDistantGeneratorMode.BIOME_ONLY;
/** The higher the number the more complete the generation is. */
public final byte complexity;
EDhApiDistantGeneratorMode(byte complexity) { this.complexity = complexity; }
/** returns null if out of range */
public static EDhApiDistantGeneratorMode previous(EDhApiDistantGeneratorMode mode)
{
switch (mode)
{
case FULL:
return EDhApiDistantGeneratorMode.FEATURES;
case FEATURES:
return EDhApiDistantGeneratorMode.SURFACE;
case SURFACE:
return EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT;
case BIOME_ONLY_SIMULATE_HEIGHT:
return EDhApiDistantGeneratorMode.BIOME_ONLY;
case BIOME_ONLY:
return EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY;
case PRE_EXISTING_ONLY:
default:
return null;
}
}
/** returns null if out of range */
public static EDhApiDistantGeneratorMode next(EDhApiDistantGeneratorMode mode)
{
switch (mode)
{
case FEATURES:
return EDhApiDistantGeneratorMode.FULL;
case SURFACE:
return EDhApiDistantGeneratorMode.FEATURES;
case BIOME_ONLY_SIMULATE_HEIGHT:
return EDhApiDistantGeneratorMode.SURFACE;
case BIOME_ONLY:
return EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT;
case PRE_EXISTING_ONLY:
return EDhApiDistantGeneratorMode.BIOME_ONLY;
case FULL:
default:
return null;
}
}
}
@@ -0,0 +1,16 @@
package com.seibel.lod.api.enums.worldGeneration;
/**
* SERVER_LEVEL, <br>
* CLIENT_LEVEL, <br>
* UNKNOWN <br>
*
* @author James Seibel
* @version 2022-7-13
*/
public enum EDhApiLevelType
{
SERVER_LEVEL,
CLIENT_LEVEL,
UNKNOWN
}
@@ -0,0 +1,31 @@
package com.seibel.lod.api.enums.worldGeneration;
/**
* MULTI_THREADED, <br>
* SINGLE_THREADED, <br>
* SERVER_THREAD, <br>
*
* @author James Seibel
* @version 7-14-2022
*/
public enum EDhApiWorldGenThreadMode
{
/**
* This world generator can be run on an unlimited number
* of concurrent threads.
*/
MULTI_THREADED,
/**
* This world generator can only be run on one thread at
* a time, however that thread can run concurrently
* to Minecraft's server thread.
*/
SINGLE_THREADED,
/**
* This world generator can only be run on Minecraft's
* server thread.
*/
SERVER_THREAD,
}
@@ -0,0 +1,52 @@
package com.seibel.lod.api.enums.worldGeneration;
/**
* EMPTY, <br>
* STRUCTURE_START, <br>
* STRUCTURE_REFERENCE, <br>
* BIOMES, <br>
* NOISE, <br>
* SURFACE, <br>
* CARVERS, <br>
* LIQUID_CARVERS, <br>
* FEATURES, <br>
* LIGHT, <br>
*
* @author James Seibel
* @version 2023-4-20
*/
public enum EDhApiWorldGenerationStep
{
EMPTY(0),
STRUCTURE_START(1),
STRUCTURE_REFERENCE(2),
BIOMES(3),
NOISE(4),
SURFACE(5),
CARVERS(6),
LIQUID_CARVERS(7),
FEATURES(8),
LIGHT(9);
/** used when serializing this enum. */
public final byte value;
EDhApiWorldGenerationStep(int value) { this.value = (byte) value; }
/** @return null if the value doesn't correspond to a {@link EDhApiWorldGenerationStep}. */
public static EDhApiWorldGenerationStep fromValue(int value)
{
for (EDhApiWorldGenerationStep genStep : EDhApiWorldGenerationStep.values())
{
if (genStep.value == value)
{
return genStep;
}
}
return null;
}
}
@@ -0,0 +1,26 @@
package com.seibel.lod.api.interfaces;
/**
* The Distant Horizons' API objects can't cover
* every potential use case. Sometimes developers just need
* the base Minecraft Objects.
*
* @author James Seibel
* @version 2022-9-16
*/
public interface IDhApiUnsafeWrapper
{
/**
* Returns the Minecraft object this wrapper contains. <br>
* <strong>Warning</strong>: This object will be Minecraft
* version dependent and may change without notice. <br> <br>
*
* In order to cast this object to something usable, you may want
* to use <code>obj.getClass()</code> when in your IDE
* in order to determine what object this method returns for
* the specific version of Minecraft you are developing for.
*/
Object getWrappedMcObject_UNSAFE();
}
@@ -0,0 +1,31 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.block;
import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
/**
* @author James Seibel
* @version 3-5-2022
*/
public interface IDhApiBiomeWrapper extends IDhApiUnsafeWrapper
{
String getName();
}
@@ -0,0 +1,15 @@
package com.seibel.lod.api.interfaces.block;
import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
/**
* A Minecraft version independent way of handling Blocks.
*
* @author James Seibel
* @version 2022-11-12
*/
public interface IDhApiBlockStateWrapper extends IDhApiUnsafeWrapper
{
boolean isAir();
}
@@ -0,0 +1,25 @@
package com.seibel.lod.api.interfaces.config;
import com.seibel.lod.api.interfaces.config.both.IDhApiWorldGenerationConfig;
import com.seibel.lod.api.interfaces.config.client.IDhApiBuffersConfig;
import com.seibel.lod.api.interfaces.config.client.IDhApiGraphicsConfig;
import com.seibel.lod.api.interfaces.config.client.IDhApiMultiplayerConfig;
import com.seibel.lod.api.interfaces.config.client.IDhApiThreadingConfig;
/**
* This interfaces holds all of the config groups
* the API has access to for easy access to all config values.
*
* @author James Seibel
* @version 9-15-2022
*/
public interface IDhApiConfig
{
IDhApiWorldGenerationConfig getWorldGeneratorConfig();
IDhApiBuffersConfig getBufferConfig();
IDhApiGraphicsConfig getGraphicsConfig();
IDhApiMultiplayerConfig getMultiplayerConfig();
IDhApiThreadingConfig getThreadingConfig();
}
@@ -0,0 +1,15 @@
package com.seibel.lod.api.interfaces.config;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IBindable;
/**
* This interface is just used to organize API config groups so
* they can be more easily handled together.
*
* @author James Seibel
* @version 9-15-2022
*/
public interface IDhApiConfigGroup extends IBindable
{
}
@@ -0,0 +1,51 @@
package com.seibel.lod.api.interfaces.config;
/**
* An interface for Distant Horizon's Config.
*
* @param <T> The data type of this config.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiConfigValue<T>
{
/**
* Returns the active value for this config. <br>
* Returns the True value if either the config cannot be overridden by
* the API or if it hasn't been set by the API.
*/
public T getValue();
/**
* Returns the value held by this config. <br>
* This is the value stored in the config file.
*/
public T getTrueValue();
/**
* Returns the value of the config if it was set by the API.
* Returns null if the config wasn't set by the API.
*/
public T getApiValue();
/**
* Sets the config's value. <br>
* If the newValue is set to null then the config
* will revert to using the True Value.<br>
* If the config cannot be set via the API this method will return false.
*
* @return true if the value was set, false otherwise.
*/
public boolean setValue(T newValue);
/** Returns true if this config can be set via the API, false otherwise. */
public boolean getCanBeOverrodeByApi();
/** Returns the default value for this config. */
public T getDefaultValue();
/** Returns the max value for this config, null if there is no max. */
public T getMaxValue();
/** Returns the min value for this config, null if there is no min. */
public T getMinValue();
}
@@ -0,0 +1,77 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.both;
import com.seibel.lod.api.enums.config.EBlocksToAvoid;
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.lod.api.enums.config.EGenerationPriority;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.enums.config.ELightGenerationMode;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' world generation configuration. <br><br>
*
* Note: Fake chunks are NOT saved in Minecraft's vanilla save system.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiWorldGenerationConfig extends IDhApiConfigGroup
{
/**
* Defines whether fake chunks will be generated
* outside Minecraft's vanilla render distance.
*/
IDhApiConfigValue<Boolean> getEnableDistantWorldGeneration();
/** Defines to what level fake chunks will be generated. */
IDhApiConfigValue<EDhApiDistantGeneratorMode> getDistantGeneratorMode();
/** Defines how generated fake chunks will be lit. */
IDhApiConfigValue<ELightGenerationMode> getLightingMode();
/** Defines the order in which fake chunks will be generated. */
IDhApiConfigValue<EGenerationPriority> getGenerationPriority();
/**
* Defines what blocks will be ignored when generating LODs. <br><br>
*
* TODO if this isn't deprecated before 1.7 it should probably be moved to the graphics tab
* @deprecated this method won't be needed once we transition to an ID based save system <br>
* (vs the color based system we have currently)
*/
@Deprecated
IDhApiConfigValue<EBlocksToAvoid> getBlocksToAvoid();
/**
* Defines if the color of avoided blocks will color the block below them. <Br>
* (IE: if flowers are avoided should they color the grass below them?)
*
* TODO if this isn't deprecated before 1.7 it should probably be moved to the graphics tab
* @deprecated this method won't be needed once we transition to an ID based save system <br>
* (vs the color based system we have currently)
*/
@Deprecated
IDhApiConfigValue<Boolean> getTintWithAvoidedBlocks();
}
@@ -0,0 +1,47 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.client;
import com.seibel.lod.api.enums.config.EGpuUploadMethod;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
/**
* Distant Horizons' OpenGL buffer configuration.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiBuffersConfig extends IDhApiConfigGroup
{
/** Defines how geometry data is uploaded to the GPU. */
IDhApiConfigValue<EGpuUploadMethod> getGpuUploadMethod();
/**
* 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> getBufferUploadTimeoutPerMegabyteInMilliseconds();
}
@@ -0,0 +1,41 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.client;
import com.seibel.lod.api.enums.rendering.EDebugMode;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' debug configuration.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiDebuggingConfig extends IDhApiConfigGroup
{
/** Can be used to debug the standard fake chunk rendering. */
IDhApiConfigValue<EDebugMode> getDebugRenderMode();
/** If enabled debug keybindings can be used. */
IDhApiConfigValue<Boolean> getEnableDebugKeybindings();
}
@@ -0,0 +1,138 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.client;
import com.seibel.lod.api.enums.config.*;
import com.seibel.lod.api.enums.rendering.ERendererMode;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' graphics/rendering configuration.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
{
//========================//
// basic graphic settings //
//========================//
/** The distance is the radius measured in chunks. */
IDhApiConfigValue<Integer> getChunkRenderDistance();
/**
* Simplified version of {@link IDhApiGraphicsConfig#getRenderingMode()}
* that only enables/disables the fake chunk rendering. <br><br>
*
* Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingMode()}'s value.
*/
IDhApiConfigValue<Boolean> getRenderingEnabled();
/**
* Can be used to enable/disable fake chunk rendering or enable the debug renderer. <br><br>
*
* The debug renderer is used to confirm rendering is working at and will draw
* a single multicolor rhombus on the screen in skybox space (AKA behind MC's rendering). <br><br>
*
* Changing this config also changes {@link IDhApiGraphicsConfig#getRenderingEnabled()}'s value.
*/
IDhApiConfigValue<ERendererMode> getRenderingMode();
//==================//
// graphic settings //
//==================//
/** Defines how detailed fake chunks are in the horizontal direction */
IDhApiConfigValue<EHorizontalResolution> getMaxDetailLevel();
/** Defines how detailed fake chunks are in the vertical direction */
IDhApiConfigValue<EVerticalQuality> getVerticalQuality();
/** Modifies the quadratic function fake chunks use for horizontal quality drop-off. */
IDhApiConfigValue<EHorizontalQuality> getHorizontalQualityDropoff();
/**
* The same as vanilla Minecraft's biome blending. <br><br>
*
* 0 = blending of 1x1 aka off <br>
* 1 = blending of 3x3 <br>
* 2 = blending of 5x5 <br>
* ... <br>
*/
IDhApiConfigValue<Integer> getBiomeBlending();
//===========================//
// advanced graphic settings //
//===========================//
/** If directional culling is disabled fake chunks will be rendered behind the camera. */
IDhApiConfigValue<Boolean> getDisableDirectionalCulling();
/** Determines how fake chunks are rendered in comparison to vanilla MC's chunks. */
IDhApiConfigValue<EVanillaOverdraw> getVanillaOverdraw();
/** Modifies how far the vanilla overdraw is rendered in chunks. */
IDhApiConfigValue<Integer> getVanillaOverdrawOffset();
/**
* If enabled the near clip plane is extended to reduce
* overdraw and improve Z-fighting at extreme render distances. <br>
* Disabling this reduces holes in the world due to the near clip plane
* being too close to the camera and the terrain not being covered by vanilla terrain.
*/
IDhApiConfigValue<Boolean> getUseExtendedNearClipPlane();
/**
* Modifies how bright fake chunks are. <br>
* This is done when generating the vertex data and is applied before any shaders.
*/
IDhApiConfigValue<Double> getBrightnessMultiplier();
/**
* Modifies how saturated fake chunks are. <br>
* This is done when generating the vertex data and is applied before any shaders.
*/
IDhApiConfigValue<Double> getSaturationMultiplier();
/** Defines if Distant Horizons should attempt to cull fake chunk cave geometry. */
IDhApiConfigValue<Boolean> getCaveCullingEnabled();
/** Defines what height cave culling should be used below if enabled. */
IDhApiConfigValue<Integer> getCaveCullingHeight();
/** This ratio is relative to Earth's real world curvature. */
IDhApiConfigValue<Integer> getEarthCurvatureRatio();
/** If enabled vanilla chunk rendering is disabled and only fake chunks are rendered. */
IDhApiConfigValue<Boolean> getEnableLodOnlyMode();
/** Defines how often the geometry should be rebuilt when the player moves. */
IDhApiConfigValue<EBufferRebuildTimes> getGeometryRebuildFrequency();
}
@@ -0,0 +1,130 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.client;
import com.seibel.lod.api.enums.rendering.*;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
/**
* Distant Horizons' fog configuration. <br><br>
*
* Note: unless an option explicitly states that it modifies
* Minecraft's vanilla rendering (like DisableVanillaFog)
* these settings will only affect Distant horizons' fog.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiGraphicsFogConfig extends IDhApiConfigGroup
{
//====================//
// basic fog settings //
//====================//
/** Defines at what distance fog is rendered on fake chunks. */
IDhApiConfigValue<EFogDistance> getFogDistance();
/** Should be used to enable/disable fog rendering. */
IDhApiConfigValue<EFogDrawMode> getFogRender();
/** Can be used to enable support with mods that change vanilla MC's fog color. */
IDhApiConfigValue<EFogColorMode> getFogColor();
/**
* If enabled attempts to disable vanilla MC's fog on real chunks. <br>
* May not play nice with other fog editing mods.
*/
IDhApiConfigValue<Boolean> getDisableVanillaFog();
//=======================//
// advanced fog settings //
//=======================//
/**
* Defines where the fog starts as a percent of the
* fake chunks render distance radius. <br>
* Can be greater than the fog end distance to invert the fog direction. <br> <br>
*
* 0.0 = fog starts at the camera <br>
* 1.0 = fog starts at the edge of the fake chunk render distance <br>
*/
IDhApiConfigValue<Double> getFogStartDistance();
/**
* Defines where the fog ends as a percent of the radius
* of the fake chunks render distance. <br>
* Can be less than the fog start distance to invert the fog direction. <br> <br>
*
* 0.0 = fog ends at the camera <br>
* 1.0 = fog ends at the edge of the fake chunk render distance <br>
*/
IDhApiConfigValue<Double> getFogEndDistance();
/** Defines how opaque the fog is at its thinnest point. */
IDhApiConfigValue<Double> getFogMinThickness();
/** Defines how opaque the fog is at its thickest point. */
IDhApiConfigValue<Double> getFogMaxThickness();
/** Defines how the fog changes in thickness. */
IDhApiConfigValue<EFogFalloff> getFogFalloff();
/** Defines the fog density. */
IDhApiConfigValue<Double> getFogDensity();
//=====================//
// height fog settings //
//=====================//
/** Defines how the height fog mixes. */
IDhApiConfigValue<EHeightFogMixMode> getHeightFogMixMode();
/** Defines how the height fog is drawn relative to the camera or world. */
IDhApiConfigValue<EHeightFogMode> getHeightFogMode();
/**
* Defines the height fog's base height if {@link IDhApiGraphicsFogConfig#getHeightFogMode()}
* is set to use a specific height.
*/
IDhApiConfigValue<Double> getHeightFogBaseHeight();
/** Defines the height fog's starting height as a percent of the world height. */
IDhApiConfigValue<Double> getHeightFogStartingHeightPercent();
/** Defines the height fog's ending height as a percent of the world height. */
IDhApiConfigValue<Double> getHeightFogEndingHeightPercent();
/** Defines how opaque the height fog is at its thinnest point. */
IDhApiConfigValue<Double> getHeightFogMinThickness();
/** Defines how opaque the height fog is at its thickest point. */
IDhApiConfigValue<Double> getHeightFogMaxThickness();
/** Defines how the height fog changes in thickness. */
IDhApiConfigValue<EFogFalloff> getHeightFogFalloff();
/** Defines the height fog's density. */
IDhApiConfigValue<Double> getHeightFogDensity();
}
@@ -0,0 +1,53 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.client;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.enums.config.EServerFolderNameMode;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' client-side multiplayer configuration.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiMultiplayerConfig extends IDhApiConfigGroup
{
/**
* Defines how multiplayer server folders are named. <br>
* Note: Changing this while connected to a multiplayer world will cause undefined behavior!
*/
IDhApiConfigValue<EServerFolderNameMode> getFolderSavingMode();
/**
* Defines the necessary similarity (as a percent) that two potential levels
* need in order to be considered the same. <br> <br>
*
* Setting this to zero causes every level of a specific dimension type to be consider
* the same level. <br>
* Setting this to a non-zero value allows for usage in servers that user Multiverse
* or similar mods.
*/
IDhApiConfigValue<Double> getMultiverseSimilarityRequirement();
}
@@ -0,0 +1,64 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.config.client;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.api.interfaces.config.IDhApiConfigGroup;
/**
* Distant Horizons' threading configuration.
*
* @author James Seibel
* @version 2022-9-15
*/
public interface IDhApiThreadingConfig extends IDhApiConfigGroup
{
/**
* Defines how many world generator threads are used to generate
* terrain outside Minecraf's vanilla render distance. <br>
* <br>
* If the number of threads is less than 1 it will be treated as a percentage
* representing how often the single thread will actively generate terrain. <br> <br>
*
* 0.1 = 1 thread active 10% of the time <br>
* 0.5 = 1 thread active 50% of the time <br>
* 1.0 = 1 thread active 100% of the time <br>
* 1.5 = 2 threads active 100% of the time (partial values are rounded up) <br>
* 2.0 = 2 threads active 100% of the time <br>
*
* @deprecated this (and the related config) should be replaced with an int
* count of threads and then a double percent active config.
*/
@Deprecated
IDhApiConfigValue<Double> getWorldGeneratorThread();
// TODO the above should be replaced with these
// IDhApiConfig<Integer> getWorldGeneratorThreadConfig()
// { return new DhApiConfig<>(Threading.numberOfWorldGenerationThreads); }
// IDhApiConfig<Double> getWorldGeneratorThreadActivePercentConfig()
// { return new DhApiConfig<>(Threading.ToBeDetermined); }
/** Defines how many buffer (GPU Terrain data) builder threads are used. */
IDhApiConfigValue<Integer> getBufferBuilderThread();
}
@@ -0,0 +1,64 @@
package com.seibel.lod.api.interfaces.data;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.objects.DhApiResult;
import com.seibel.lod.api.objects.data.DhApiRaycastResult;
import com.seibel.lod.api.objects.data.DhApiTerrainDataPoint;
/**
* Used to interface with Distant Horizons' terrain data.
*
* @author James Seibel
* @version 2022-11-19
*/
public interface IDhApiTerrainDataRepo
{
/** Returns the terrain datapoint at the given block position, at or containing the given Y position. */
DhApiResult<DhApiTerrainDataPoint> getSingleDataPointAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosY, int blockPosZ);
/** 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 every datapoint in the given chunk's X and Z position. <br><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>
* The column data is ordered from top to bottom. Note: each column may have a different number of values. <br>
*/
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtChunkPos(IDhApiLevelWrapper levelWrapper, int chunkPosX, int chunkPosZ);
/**
* Returns every datapoint in the given region's X and Z position. <br><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>
* The column data is ordered from top to bottom. Note: each column may have a different number of values. <br>
*/
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtRegionPos(IDhApiLevelWrapper levelWrapper, int regionPosX, int regionPosZ);
/**
* 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).
*
* @param detailLevel a positive byte defining the detail level of the returned data. <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)
*/
DhApiResult<DhApiTerrainDataPoint[][][]> getAllTerrainDataAtDetailLevelAndPos(IDhApiLevelWrapper levelWrapper, byte detailLevel, int posX, int posZ);
/**
* Returns the datapoint and position of the LOD
* 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.
*/
DhApiResult<DhApiRaycastResult> raycast(IDhApiLevelWrapper levelWrapper,
double rayOriginX, double rayOriginY, double rayOriginZ,
float rayDirectionX, float rayDirectionY, float rayDirectionZ,
int maxRayBlockLength);
}
@@ -0,0 +1,54 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.events;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IDependencyInjector;
/**
* This class takes care of dependency injection for API events.
*
* @author James Seibel
* @version 2022-9-13
*/
public interface IDhApiEventInjector extends IDependencyInjector<IDhApiEvent>
{
/**
* Unlinks the given event handler, preventing the handler from being called in the future.
*
* @throws IllegalArgumentException if the implementation object doesn't implement the interface
* @return true if the handler was unbound, false if the handler wasn't bound.
*/
// Note to self: Don't try adding a generic type to IDhApiEvent, the constructor won't accept it
boolean unbind(Class<? extends IDhApiEvent> dependencyInterface, Class<? extends IDhApiEvent> dependencyClassToRemove) throws IllegalArgumentException;
/**
* Fires all bound events of the given type (does nothing if no events are bound).
*
* @param abstractEvent event type
* @param eventParameterObject event parameter
* @return if any of bound event handlers returned that this event should be canceled.
* @param <T> the parameter type taken by the event handlers.
*/
<T, U extends IDhApiEvent<T>> boolean fireAllEvents(Class<U> abstractEvent, T eventParameterObject);
}
@@ -0,0 +1,31 @@
package com.seibel.lod.api.interfaces.override;
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.enums.worldGeneration.EDhApiWorldGenThreadMode;
import com.seibel.lod.api.interfaces.world.IDhApiChunkWrapper;
/**
* @author James Seibel
* @version 2022-9-8
*/
public abstract class AbstractDhApiWorldGenerator implements IDhApiOverrideable
{
/** Returns which thread chunk generation requests can be created on. */
public abstract EDhApiWorldGenThreadMode getThreadingMode();
public EDhApiWorldGenThreadMode getCoreThreadingMode()
{
return this.getThreadingMode();
}
public abstract IDhApiChunkWrapper generateChunk(int chunkPosX, int chunkPosZ, IDhApiLevelWrapper serverLevelWrapper, EDhApiDistantGeneratorMode maxStepToGenerate);
public final IDhApiChunkWrapper generateCoreChunk(int chunkPosX, int chunkPosZ, IDhApiLevelWrapper serverLevelWrapper, EDhApiDistantGeneratorMode maxStepToGenerate)
{
// TODO probably need to change the return type
return null; //generateChunk(chunkPosX, chunkPosZ, null, generationStepEnumConverter.convertToApiType(maxStepToGenerate));
}
}
@@ -0,0 +1,20 @@
package com.seibel.lod.api.interfaces.override;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IBindable;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IOverrideInjector;
/**
* Implemented by all DhApi objects that can be overridden.
*
* @author James Seibel
* @version 2022-9-5
*/
public interface IDhApiOverrideable extends IBindable
{
/**
* Higher (larger numerical) priorities override lower (smaller numerical) priorities . <br>
* For most developers this can be left at the default.
*/
default int getPriority() { return IOverrideInjector.DEFAULT_NON_CORE_OVERRIDE_PRIORITY; }
}
@@ -0,0 +1,126 @@
package com.seibel.lod.api.interfaces.override.worldGenerator;
import com.seibel.lod.api.enums.EDhApiDetailLevel;
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.lod.api.enums.worldGeneration.EDhApiWorldGenThreadMode;
import com.seibel.lod.api.interfaces.override.IDhApiOverrideable;
import java.io.Closeable;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
/**
* @author James Seibel
* @version 2022-12-10
*/
public interface IDhApiWorldGenerator extends Closeable, IDhApiOverrideable
{
//============//
// parameters //
//============//
/**
* Returns which thread chunk generation requests will be run on. <br>
* TODO: only {@link EDhApiWorldGenThreadMode#SINGLE_THREADED} is currently supported
*/
EDhApiWorldGenThreadMode getThreadingMode();
/**
* Defines the smallest datapoint size that can be generated at a time. <br>
* Minimum detail level is 0 (1 block) <br>
* Default detail level is 0 <br>
* For more information on what detail levels represent see: {@link EDhApiDetailLevel}. <br><br>
*
* TODO: System currently only supports 1x1 block per data.
*
* @see EDhApiDetailLevel
*/
default byte getMinDataDetailLevel() { return EDhApiDetailLevel.BLOCK.detailLevel; }
/**
* Defines the largest datapoint size that can be generated at a time. <br>
* Minimum detail level is 0 (1 block) <br>
* Default detail level is 0 <br>
* For more information on what detail levels represent see: {@link EDhApiDetailLevel}.
*
* @see EDhApiDetailLevel
*/
default byte getMaxDataDetailLevel() { return EDhApiDetailLevel.BLOCK.detailLevel; }
/**
* When creating generation requests the system will attempt to group nearby tasks together. <br><br>
* What is the minimum size a single generation call can batch together? <br>
*
* Minimum detail level is 4 (the size of a MC chunk) <br>
* Default detail level is 4 <br>
* For more information on what detail levels represent see: {@link EDhApiDetailLevel}.
*
* @see EDhApiDetailLevel
*/
default byte getMinGenerationGranularity() { return EDhApiDetailLevel.CHUNK.detailLevel; }
/**
* When creating generation requests the system will attempt to group nearby tasks together. <br><br>
* What is the maximum size a single generation call can batch together? <br>
*
* Minimum detail level is 4 (the size of a MC chunk) <br>
* Default detail level is 6 (4x4 chunks) <br>
* For more information on what detail levels represent see: {@link EDhApiDetailLevel}.
*
* @see EDhApiDetailLevel
*/
default byte getMaxGenerationGranularity() { return (byte) (EDhApiDetailLevel.CHUNK.detailLevel + 2); }
/** Returns true if the generator is unable to accept new generation requests. */
boolean isBusy();
//=================//
// world generator //
//=================//
/**
* This method is called by Distant Horizons to generate terrain over a given area
* from a thread defined by {@link IDhApiWorldGenerator#getThreadingMode}. <br><br>
*
* After a chunk has been generated it (and any necessary supporting objects as listed below) should be passed into the
* resultConsumer's {@link Consumer#accept} method. If the Consumer is given the wrong data
* type(s) it will throw a {@link ClassCastException} with a list of what objects it was expecting. <br>
* <strong>Note:</strong> these objects are minecraft version dependent and will change without notice!
* Please run your generator in game at least once to confirm the objects you are returning are correct. <br><br>
*
* Consumer expected inputs for each minecraft version (in order): <br>
* <strong>1.18:</strong> {@link net.minecraft.world.level.chunk.ChunkAccess} and {@link net.minecraft.world.level.LevelReader} <br>
*
* @throws ClassCastException if incompatible objects are passed into the resultConsumer.
*/
CompletableFuture<Void> generateChunks(int chunkPosMinX, int chunkPosMinZ,
byte granularity, byte targetDataDetail, EDhApiDistantGeneratorMode generatorMode,
Consumer<Object[]> resultConsumer) throws ClassCastException;
//===============//
// event methods //
//===============//
/**
* Called before a new generator task is started. <br>
* This can be used to run cleanup on existing tasks before new tasks are started.
*/
void preGeneratorTaskStart();
//===========//
// overrides //
//===========//
// This is overridden to remove the "throws IOException"
// that is present in the default Closeable.close() method
@Override
void close();
}
@@ -0,0 +1,23 @@
package com.seibel.lod.api.interfaces.override.worldGenerator;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.objects.DhApiResult;
/**
* Handles adding world generator overrides.
*
* @author James Seibel
* @version 2022-12-10
*/
public interface IDhApiWorldGeneratorOverrideRegister
{
/**
* Registers the given world generator for the given level. <Br> <Br>
*
* Only one world generator can be registered for a specific level at a given time. <Br>
* If another world generator has already been registered, DhApiResult will return
* the name of the previously registered generator and success = false.
*/
DhApiResult<Void> registerWorldGeneratorOverride(IDhApiLevelWrapper levelWrapper, IDhApiWorldGenerator worldGenerator);
}
@@ -0,0 +1,47 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.render;
import com.seibel.lod.api.objects.DhApiResult;
/**
* Used to interact with Distant Horizons rendering systems.
*
* @author James Seibel
* @version 2023-2-8
*/
public interface IDhApiRenderProxy
{
/**
* Forces any cached render data to be deleted and regenerated.
* This is generally called whenever resource packs are changed or specific
* rendering settings are changed in Distant Horizon's config. <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>
* Distant Horizons has two different file formats: Full data and Render data. <Br>
* - Full data files store the block, biome, etc. information and is the result of loading or generating new chunks. <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();
}
@@ -0,0 +1,68 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.world;
import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
/**
* @author James Seibel
* @version 2022-7-14
*/
public interface IDhApiChunkWrapper extends IDhApiUnsafeWrapper
{
/** Returns the absolute Y coordinate of the highest block for the given relative X and Z coordinates. */
int getMaxY(int relativeX, int relativeZ);
/** Returns the maximum absolute block position in the X direction. */
int getMaxX();
/** Returns the maximum absolute block position in the Z direction. */
int getMaxZ();
/** Returns the absolute Y coordinate of the lowest block for the given relative X and Z coordinates. */
int getMinY(int relativeX, int relativeZ);
/** Returns the minimum absolute block position in the X direction. */
int getMinX();
/** Returns the minimum absolute block position in the Z direction. */
int getMinZ();
/**
* Returns true if this chunk's lighting has been built. <br>
* Note: for some versions of Minecraft this value may be unreliable.
*/
boolean isLightCorrect();
/** TODO what side of the block should this return the light for? */
default int getBlockLight(int x, int y, int z) {return -1;}
/** TODO what side of the block should this return the light for? */
default int getSkyLight(int x, int y, int z) {return -1;}
/**
* Returns true if chunks exist in all 4 cardinal and 4 ordinal directions
* relative to this chunk. <br>
* IE: returns true if there are chunks to the North, South, East, West, NE, SE, SW, and NW
* of this chunk.
*/
boolean doNearbyChunksExist();
// TODO these will probably need replacing once 1.7's ID system is done
//IBlockStateWrapper getBlockState(int x, int y, int z);
//IBiomeWrapper getBiome(int x, int y, int z);
}
@@ -0,0 +1,35 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.world;
import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
/**
* @author James Seibel
* @version 2022-7-14
*/
public interface IDhApiDimensionTypeWrapper extends IDhApiUnsafeWrapper
{
String getDimensionName();
boolean hasCeiling();
boolean hasSkyLight();
}
@@ -0,0 +1,50 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.world;
import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
import com.seibel.lod.api.enums.worldGeneration.EDhApiLevelType;
/**
* Can be either a Server or Client level.
*
* @author James Seibel
* @version 2022-7-14
*/
public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
{
IDhApiDimensionTypeWrapper getDimensionType();
EDhApiLevelType getLevelType();
boolean hasCeiling();
boolean hasSkyLight();
/** Returns the max block height of the level(?) */
int getHeight();
/**
* Returns the lowest possible block position for the level. <br>
* For MC versions before 1.18 this will return 0.
*/
default int getMinHeight() { return 0; }
}
@@ -0,0 +1,62 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.interfaces.world;
import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
/**
* Used to interact with Distant Horizons current world.
*
* @author James Seibel
* @version 2022-11-20
*/
public interface IDhApiWorldProxy
{
/** Returns true if a world is loaded. */
boolean worldLoaded();
/**
* In singleplayer this will return the level the player is currently in. <br>
* In multiplayer this will return null.
*
* @throws IllegalStateException if no world is loaded
*/
IDhApiLevelWrapper getSinglePlayerLevel() throws IllegalStateException;
/** @throws IllegalStateException if no world is loaded */
Iterable<IDhApiLevelWrapper> getAllLoadedLevelWrappers() throws IllegalStateException;
/**
* In the case of servers running multiverse there may be multiple levels for the same dimensionType.
*
* @throws IllegalStateException if no world is loaded
*/
Iterable<IDhApiLevelWrapper> getAllLoadedLevelsForDimensionType(IDhApiDimensionTypeWrapper dimensionTypeWrapper) throws IllegalStateException;
/**
* Returns any dimensions that have names containing the given string (case-insensitive). <br>
* In the case of servers running multiverse there may be multiple levels for the same dimensionType.
*
* @throws IllegalStateException if no world is loaded
*/
Iterable<IDhApiLevelWrapper> getAllLoadedLevelsWithDimensionNameLike(String dimensionName) throws IllegalStateException;
}
@@ -0,0 +1,51 @@
package com.seibel.lod.api.methods.events;
import com.seibel.lod.api.objects.DhApiResult;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.coreapi.DependencyInjection.ApiEventInjector;
/**
* Handles adding/removing event handlers.
*
* @author James Seibel
* @version 2022-9-16
*/
public class DhApiEventRegister
{
/**
* Registers the given event handler. <Br>
* Only one eventHandler of a specific class can be registered at a time.
* If multiple of the same eventHandler are added DhApiResult will return
* the name of the already added handler and success = false.
*/
public static DhApiResult<Void> on(Class<? extends IDhApiEvent> eventInterface, IDhApiEvent eventHandlerImplementation)
{
try
{
ApiEventInjector.INSTANCE.bind(eventInterface, eventHandlerImplementation);
return DhApiResult.createSuccess();
}
catch (IllegalStateException e)
{
return DhApiResult.createFail(e.getMessage());
}
}
/**
* Unregisters the given event handler for this event if one has been registered. <br>
* If no eventHandler of the given class has been registered the result will return
* success = false.
*/
public static DhApiResult<Void> off(Class<? extends IDhApiEvent> eventInterface, Class<IDhApiEvent> eventHandlerClass)
{
if (ApiEventInjector.INSTANCE.unbind(eventInterface, eventHandlerClass))
{
return DhApiResult.createSuccess();
}
else
{
return DhApiResult.createFail("No event handler [" + eventHandlerClass.getSimpleName() + "] was bound for the event [" + eventInterface.getSimpleName() + "].");
}
}
}
@@ -0,0 +1,3 @@
The events api package holds objects and methods for listening to events fired by Distant Horizons'.
Each interface should only contain one method and that method should match the name of the file. This is done so Developers can mix and match what events they want their classes to handle.
@@ -0,0 +1,31 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiAfterDhInitEvent implements IDhApiEvent<Void>
{
/** Fired after Distant Horizons finishes its initial setup on Minecraft startup. */
public abstract void afterDistantHorizonsInit();
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(Void ignoredParam)
{
this.afterDistantHorizonsInit();
return false;
}
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(false, true);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
}
@@ -0,0 +1,45 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.methods.events.sharedParameterObjects.DhApiRenderParam;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiAfterRenderEvent implements IDhApiEvent<DhApiAfterRenderEvent.EventParam>
{
/** Fired after Distant Horizons finishes rendering fake chunks. */
public abstract void afterRender(EventParam input);
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(EventParam input)
{
this.afterRender(input);
return false;
}
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(false, false);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
//==================//
// parameter object //
//==================//
public static class EventParam extends DhApiRenderParam
{
public EventParam(DhApiRenderParam parent)
{
super(parent.mcProjectionMatrix, parent.mcModelViewMatrix, parent.dhProjectionMatrix, parent.dhModelViewMatrix, parent.partialTicks);
}
}
}
@@ -0,0 +1,33 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiBeforeDhInitEvent implements IDhApiEvent<Void>
{
/** Fired before Distant Horizons starts its initial setup on Minecraft startup. */
public abstract void beforeDistantHorizonsInit();
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(Void ignoredParam)
{
this.beforeDistantHorizonsInit();
return false;
}
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(false, true);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
}
@@ -0,0 +1,45 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.methods.events.sharedParameterObjects.DhApiRenderParam;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiBeforeRenderEvent implements IDhApiEvent<DhApiBeforeRenderEvent.EventParam>
{
/**
* Fired before Distant Horizons renders fake chunks.
*
* @return whether the event should be canceled or not.
*/
public abstract boolean beforeRender(EventParam input);
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(EventParam input) { return this.beforeRender(input); }
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(true, false);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
//==================//
// parameter object //
//==================//
public static class EventParam extends DhApiRenderParam
{
public EventParam(DhApiRenderParam parent)
{
super(parent.mcProjectionMatrix, parent.mcModelViewMatrix, parent.dhProjectionMatrix, parent.dhModelViewMatrix, parent.partialTicks);
}
}
}
@@ -0,0 +1,46 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiLevelLoadEvent implements IDhApiEvent<DhApiLevelLoadEvent.EventParam>
{
/** Fired after Distant Horizons loads a new level. */
public abstract void onLevelLoad(EventParam input);
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(EventParam input)
{
this.onLevelLoad(input);
return false;
}
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(false, false);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
//==================//
// parameter object //
//==================//
public static class EventParam
{
/** The newly loaded level. */
public final IDhApiLevelWrapper levelWrapper;
public EventParam(IDhApiLevelWrapper newLevelWrapper) { this.levelWrapper = newLevelWrapper; }
}
}
@@ -0,0 +1,46 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiLevelSaveEvent implements IDhApiEvent<DhApiLevelSaveEvent.EventParam>
{
/** Fired after Distant Horizons saves LOD data for the server. */
public abstract void onLevelSave(EventParam input);
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(EventParam input)
{
this.onLevelSave(input);
return false;
}
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(false, false);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
//==================//
// parameter object //
//==================//
public static class EventParam
{
/** The saved level. */
public final IDhApiLevelWrapper levelWrapper;
public EventParam(IDhApiLevelWrapper newLevelWrapper) { this.levelWrapper = newLevelWrapper; }
}
}
@@ -0,0 +1,45 @@
package com.seibel.lod.api.methods.events.abstractEvents;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
/**
* @author James Seibel
* @version 2022-11-21
*/
public abstract class DhApiLevelUnloadEvent implements IDhApiEvent<DhApiLevelUnloadEvent.EventParam>
{
/** Fired before Distant Horizons unloads a level. */
public abstract void onLevelUnload(EventParam input);
//=========================//
// internal DH API methods //
//=========================//
@Override
public final boolean fireEvent(EventParam input)
{
this.onLevelUnload(input);
return false;
}
public final static DhApiEventDefinition EVENT_DEFINITION = new DhApiEventDefinition(false, false);
@Override
public final DhApiEventDefinition getEventDefinition() { return EVENT_DEFINITION; }
//==================//
// parameter object //
//==================//
public static class EventParam
{
/** The recently unloaded level. */
public final IDhApiLevelWrapper levelWrapper;
public EventParam(IDhApiLevelWrapper newLevelWrapper) { this.levelWrapper = newLevelWrapper; }
}
}
@@ -0,0 +1,52 @@
package com.seibel.lod.api.methods.events.interfaces;
import com.seibel.lod.api.objects.events.DhApiEventDefinition;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IBindable;
/**
* The interface used by all DH Api events.
*
* @param <T> This is the datatype that will be passed into the event handler's method.
*
* @author James Seibel
* @version 2022-11-20
*/
public interface IDhApiEvent<T> extends IBindable
{
//==========//
// external //
//==========//
/**
* Returns true if the event should be automatically unbound
* after firing. <br>
* Can be useful for one time setup events or waiting for a specific game state. <br> <Br>
*
* Defaults to False
* IE: The event will not be removed after firing and will continue firing until removed.
*/
default boolean removeAfterFiring() { return false; };
//==========//
// internal //
//==========//
/**
* The event definition includes meta information about how the event will behave. <br>
* For example: if the event is cancelable or not.
*/
DhApiEventDefinition getEventDefinition();
/**
* Called internally by Distant Horizons when the event happens.
* This method shouldn't directly be overridden and
* should call a more specific method instead.
*
* @param input the parameter object passed in from the event source. Can be null.
* @return whether the event should be canceled or not.
* A canceled event will still fire the other event handlers that are queued.
*/
boolean fireEvent(T input);
}
@@ -0,0 +1,42 @@
package com.seibel.lod.api.methods.events.sharedParameterObjects;
import com.seibel.lod.coreapi.util.math.Mat4f;
/**
* Parameter passed into Render events.
*
* @author James Seibel
* @version 2022-9-5
*/
public class DhApiRenderParam
{
/** The projection matrix Minecraft is using to render this frame. */
public final Mat4f mcProjectionMatrix;
/** The model view matrix Minecraft is using to render this frame. */
public final Mat4f mcModelViewMatrix;
/** The projection matrix Distant Horizons is using to render this frame. */
public final Mat4f dhProjectionMatrix;
/** The model view matrix Distant Horizons is using to render this frame. */
public final Mat4f dhModelViewMatrix;
/** Indicates how far into this tick the frame is. */
public final float partialTicks;
public DhApiRenderParam(
Mat4f newMcProjectionMatrix, Mat4f newMcModelViewMatrix,
Mat4f newDhProjectionMatrix, Mat4f newDhModelViewMatrix,
float newPartialTicks)
{
this.mcProjectionMatrix = newMcProjectionMatrix;
this.mcModelViewMatrix = newMcModelViewMatrix;
this.dhProjectionMatrix = newDhProjectionMatrix;
this.dhModelViewMatrix = newDhModelViewMatrix;
this.partialTicks = newPartialTicks;
}
}
@@ -0,0 +1,37 @@
package com.seibel.lod.api.methods.override;
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGenerator;
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGeneratorOverrideRegister;
import com.seibel.lod.api.interfaces.world.IDhApiLevelWrapper;
import com.seibel.lod.api.objects.DhApiResult;
import com.seibel.lod.coreapi.DependencyInjection.WorldGeneratorInjector;
/**
* Handles adding world generator overrides.
*
* @author James Seibel
* @version 2022-12-10
*/
public class DhApiWorldGeneratorOverrideRegister implements IDhApiWorldGeneratorOverrideRegister
{
public static DhApiWorldGeneratorOverrideRegister INSTANCE = new DhApiWorldGeneratorOverrideRegister();
private DhApiWorldGeneratorOverrideRegister() { }
@Override
public DhApiResult<Void> registerWorldGeneratorOverride(IDhApiLevelWrapper levelWrapper, IDhApiWorldGenerator worldGenerator)
{
try
{
WorldGeneratorInjector.INSTANCE.bind(levelWrapper, worldGenerator);
return DhApiResult.createSuccess();
}
catch (Exception e)
{
return DhApiResult.createFail(e.getMessage());
}
}
}
@@ -0,0 +1 @@
The overide api package holds objects and methods for overriding Distant Horizons' backend systems, so they can be replaced and improved.
@@ -0,0 +1,51 @@
package com.seibel.lod.api.objects;
/**
* Allows for more descriptive non-critical failure states.
*
* @param <T> The payload type this result contains, can be Void if the result is just used to notify success/failure.
*
* @author James Seibel
* @version 2022-11-24
*/
public class DhApiResult<T>
{
/** True if the action succeeded, false otherwise. */
public final boolean success;
/**
* If the action failed this will contain the reason as to why. <br>
* If the action was successful this will generally be the empty string.
*/
public final String message;
/**
* Whatever object the API Method generated/returned. <br>
* Will be null/Void if this result is just used to notify success/failure.
*/
public final T payload;
// these constructors are private because the create... methods below are easier to understand
private DhApiResult(boolean success, String message) { this(success, message, null); }
private DhApiResult(boolean success, String message, T payload)
{
this.success = success;
// don't allow null messages, in the case of a null message return the empty string to prevent potential null pointers
this.message = (message == null) ? "" : message;
this.payload = payload;
}
public static <Pt> DhApiResult<Pt> createSuccess() { return new DhApiResult<>(true, ""); }
public static <Pt> DhApiResult<Pt> createSuccess(Pt payload) { return new DhApiResult<Pt>(true, "", payload); }
// There is no createSuccess(String message) method because it would be too easy to confuse with createSuccess(Pt payload) when returning null
public static <Pt> DhApiResult<Pt> createSuccess(String message, Pt payload) { return new DhApiResult<Pt>(true, message, payload); }
public static <Pt> DhApiResult<Pt> createFail() { return new DhApiResult<>(false, ""); }
public static <Pt> DhApiResult<Pt> createFail(String message) { return new DhApiResult<>(false, message); }
public static <Pt> DhApiResult<Pt> createFail(String message, Pt payload) { return new DhApiResult<Pt>(false, message, payload); }
}
@@ -0,0 +1,75 @@
package com.seibel.lod.api.objects.config;
import com.seibel.lod.api.interfaces.config.IDhApiConfigValue;
import com.seibel.lod.coreapi.interfaces.config.IConfigEntry;
import com.seibel.lod.coreapi.interfaces.config.IConverter;
import com.seibel.lod.coreapi.util.converters.DefaultConverter;
/**
* A wrapper used to interface with Distant Horizon's Config. <br> <br>
*
* When using this object you need to explicitly define the generic types,
* otherwise Intellij won't do any type checking and the wrong types can be used. <br>
* For example a method returning IDhApiConfig<Integer> when the config should be a Boolean.
*
* @param <apiType> The datatype you, an API dev will use.
* @param <coreType> The datatype Distant Horizons uses in the background; implementing developers can ignore this.
*
* @author James Seibel
* @version 2022-6-30
*/
public class DhApiConfigValue<coreType, apiType> implements IDhApiConfigValue<apiType>
{
private final IConfigEntry<coreType> configEntry;
private final IConverter<coreType, apiType> configConverter;
/**
* This constructor should only be called internally. <br>
* There is no reason for API users to create this object. <br><br>
*
* Uses the default object converter, this requires coreType and apiType to be the same.
*/
@SuppressWarnings("unchecked") // DefaultConverter's cast is safe
public DhApiConfigValue(IConfigEntry<coreType> newConfigEntry)
{
this.configEntry = newConfigEntry;
this.configConverter = (IConverter<coreType, apiType>) new DefaultConverter<coreType>();
}
/**
* This constructor should only be called internally. <br>
* There is no reason for API users to create this object. <br><br>
*/
public DhApiConfigValue(IConfigEntry<coreType> newConfigEntry, IConverter<coreType, apiType> newConverter)
{
this.configEntry = newConfigEntry;
this.configConverter = newConverter;
}
public apiType getValue() { return this.configConverter.convertToApiType(this.configEntry.get()); }
public apiType getTrueValue() { return this.configConverter.convertToApiType(this.configEntry.getTrueValue()); }
public apiType getApiValue() { return this.configConverter.convertToApiType(this.configEntry.getApiValue()); }
public boolean setValue(apiType newValue)
{
if (this.configEntry.getAllowApiOverride())
{
this.configEntry.setApiValue(this.configConverter.convertToCoreType(newValue));
return true;
}
else
{
return false;
}
}
public boolean getCanBeOverrodeByApi() { return this.configEntry.getAllowApiOverride(); }
public apiType getDefaultValue() { return this.configConverter.convertToApiType(configEntry.getDefaultValue()); }
public apiType getMaxValue() { return this.configConverter.convertToApiType(this.configEntry.getMax()); }
public apiType getMinValue() { return this.configConverter.convertToApiType(this.configEntry.getMin()); }
}
@@ -0,0 +1,36 @@
package com.seibel.lod.api.objects.data;
import com.seibel.lod.api.objects.math.DhApiVec3i;
import com.seibel.lod.coreapi.util.math.Vec3i;
/**
* Holds a single datapoint of terrain data
* and the block position from the raycast.
*
* @author James Seibel
* @version 2022-11-19
*/
public class DhApiRaycastResult
{
/**
* LOD position of this raycast. <br><br>
*
* <strong>Note: </strong>
* This will NOT be the exact block position if the LOD the ray
* hits is more than one block tall. In that case this will
* be the bottom block position for that LOD.
*/
public final DhApiVec3i pos;
/** The LOD data at this position. */
public final DhApiTerrainDataPoint dataPoint;
public DhApiRaycastResult(DhApiTerrainDataPoint dataPoint, Vec3i blockPos)
{
this.dataPoint = dataPoint;
this.pos = blockPos;
}
}
@@ -0,0 +1,44 @@
package com.seibel.lod.api.objects.data;
import com.seibel.lod.api.interfaces.block.IDhApiBiomeWrapper;
import com.seibel.lod.api.interfaces.block.IDhApiBlockStateWrapper;
/**
* Holds a single datapoint of terrain data.
*
* @author James Seibel
* @version 2022-11-13
*/
public class DhApiTerrainDataPoint
{
/**
* 0 = block <br>
* 1 = 2x2 blocks <br>
* 2 = 4x4 blocks <br>
* 4 = chunk (16x16 blocks) <br>
* 9 = region (512x512 blocks) <br>
*/
public final byte detailLevel;
public final int lightLevel;
public final int topYBlockPos;
public final int bottomYBlockPos;
public final IDhApiBlockStateWrapper blockStateWrapper;
public final IDhApiBiomeWrapper biomeWrapper;
public DhApiTerrainDataPoint(byte detailLevel, int lightLevel, int topYBlockPos, int bottomYBlockPos, IDhApiBlockStateWrapper blockStateWrapper, IDhApiBiomeWrapper biomeWrapper)
{
this.detailLevel = detailLevel;
this.lightLevel = lightLevel;
this.topYBlockPos = topYBlockPos;
this.bottomYBlockPos = bottomYBlockPos;
this.blockStateWrapper = blockStateWrapper;
this.biomeWrapper = biomeWrapper;
}
}
@@ -0,0 +1,55 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.objects.events;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.HashMap;
/**
* The event definition includes meta information about how the event will behave.
*
* @author James Seibel
* @version 2022-11-20
*/
public class DhApiEventDefinition
{
/** True if the event can be canceled. */
public final boolean isCancelable;
/**
* True if the event will only ever be fired once. <Br>
* An example of this would be initial setup methods, DH won't run its initial setup more than once. <br><br>
*
* If a handler is bound for a one time event after the event has been fired, the handler will be immediately fired.
*/
public final boolean isOneTimeEvent;
public DhApiEventDefinition(boolean isCancelable, boolean isOneTimeEvent)
{
this.isCancelable = isCancelable;
this.isOneTimeEvent = isOneTimeEvent;
}
}
@@ -0,0 +1,92 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.api.objects.math;
/**
* Often used to store block positions or any other
* position in 3D space.
*
* @author James Seibel
* @version 2022-11-19
*/
public class DhApiVec3i
{
public int x;
public int y;
public int z;
/** creates a Vec3 at (0,0,0) */
public DhApiVec3i()
{
this.x = 0;
this.y = 0;
this.z = 0;
}
public DhApiVec3i(int x, int y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
{
return true;
}
else if (obj != null && this.getClass() == obj.getClass())
{
DhApiVec3i Vec3f = (DhApiVec3i) obj;
if (Float.compare(Vec3f.x, this.x) != 0)
{
return false;
}
else if (Float.compare(Vec3f.y, this.y) != 0)
{
return false;
}
else
{
return Float.compare(Vec3f.z, this.z) == 0;
}
}
else
{
return false;
}
}
@Override
public int hashCode()
{
int i = Float.floatToIntBits(this.x);
i = 31 * i + Float.floatToIntBits(this.y);
return 31 * i + Float.floatToIntBits(this.z);
}
@Override
public String toString() { return "[" + this.x + ", " + this.y + ", " + this.z + "]"; }
}
@@ -0,0 +1,155 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.coreapi.DependencyInjection;
import com.seibel.lod.api.methods.events.interfaces.IDhApiEvent;
import com.seibel.lod.coreapi.events.ApiEventDefinitionHandler;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IBindable;
import com.seibel.lod.api.interfaces.events.IDhApiEventInjector;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.HashMap;
/**
* This class takes care of dependency injection for API events.
*
* @author James Seibel
* @version 2022-11-24
*/
public class ApiEventInjector extends DependencyInjector<IDhApiEvent> implements IDhApiEventInjector // Note to self: Don't try adding a generic type to IDhApiEvent, the constructor won't accept it
{
public static final ApiEventInjector INSTANCE = new ApiEventInjector();
private static final Logger LOGGER = LogManager.getLogger(ApiEventInjector.class.getSimpleName());
private final HashMap<Class<? extends IDhApiEvent>, Object> firedOneTimeEventParamsByEventInterface = new HashMap<>();
private ApiEventInjector() { super(IDhApiEvent.class, true); }
@SuppressWarnings("unchecked")
@Override
public void bind(Class<? extends IDhApiEvent> abstractEvent, IDhApiEvent eventImplementation) throws IllegalStateException, IllegalArgumentException
{
// is this a one time event?
if (ApiEventDefinitionHandler.INSTANCE.getEventDefinition(abstractEvent).isOneTimeEvent)
{
// has this one time event been fired yet?
if (this.firedOneTimeEventParamsByEventInterface.containsKey(abstractEvent))
{
// the one time event has happened, fire the handler
// this has to be an unsafe cast since the hash map can't hold the generic objects
Object parameter = this.firedOneTimeEventParamsByEventInterface.get(abstractEvent);
eventImplementation.fireEvent(parameter);
}
}
// bind the event handler
super.bind(abstractEvent, eventImplementation);
}
@Override
public boolean unbind(Class<? extends IDhApiEvent> abstractEvent, Class<? extends IDhApiEvent> eventClassToRemove) throws IllegalArgumentException
{
// make sure the given dependency implements the necessary interfaces
boolean implementsInterface = this.checkIfClassImplements(eventClassToRemove, abstractEvent) ||
this.checkIfClassExtends(eventClassToRemove, abstractEvent);
boolean implementsBindable = this.checkIfClassImplements(eventClassToRemove, this.bindableInterface);
// display any errors
if (!implementsInterface)
{
throw new IllegalArgumentException("The event handler [" + eventClassToRemove.getSimpleName() + "] doesn't implement or extend: [" + abstractEvent.getSimpleName() + "].");
}
if (!implementsBindable)
{
throw new IllegalArgumentException("The event handler [" + eventClassToRemove.getSimpleName() + "] doesn't implement the interface: [" + IBindable.class.getSimpleName() + "].");
}
// actually remove the dependency
if (this.dependencies.containsKey(abstractEvent))
{
ArrayList<IDhApiEvent> dependencyList = this.dependencies.get(abstractEvent);
int indexToRemove = -1;
for(int i = 0; i < dependencyList.size(); i++)
{
IBindable dependency = dependencyList.get(i);
if (dependency.getClass().equals(eventClassToRemove))
{
indexToRemove = i;
break;
}
}
if (indexToRemove != -1)
{
return dependencyList.remove(indexToRemove) != null;
}
}
// no item was removed
return false;
}
@Override
public <T, U extends IDhApiEvent<T>> boolean fireAllEvents(Class<U> abstractEvent, T eventParameterObject)
{
boolean cancelEvent = false;
// if this is a one time event, record that it was called
if (ApiEventDefinitionHandler.INSTANCE.getEventDefinition(abstractEvent).isOneTimeEvent &&
!this.firedOneTimeEventParamsByEventInterface.containsKey(abstractEvent))
{
this.firedOneTimeEventParamsByEventInterface.put(abstractEvent, eventParameterObject);
}
// fire each bound event
ArrayList<U> eventList = this.getAll(abstractEvent);
for (IDhApiEvent<T> event : eventList)
{
if (event != null)
{
try
{
// fire each event and record if any of them
// request to cancel the event.
cancelEvent |= event.fireEvent(eventParameterObject);
}
catch (Exception e)
{
LOGGER.error("Exception thrown by event handler [" + event.getClass().getSimpleName() + "] for event type [" + abstractEvent.getSimpleName() + "], error:" + e.getMessage(), e);
}
}
}
return cancelEvent;
}
}
@@ -0,0 +1,205 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.coreapi.DependencyInjection;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IBindable;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IDependencyInjector;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/**
* This class takes care of tracking objects used in dependency injection.
*
* @param <BindableType> extends IBindable and defines what interfaces this dependency handler can deal with.
* @author James Seibel
* @version 2022-11-24
*/
public class DependencyInjector<BindableType extends IBindable> implements IDependencyInjector<BindableType> // Note to self: Don't try adding a generic type to IDhApiEvent, the constructor won't accept it
{
protected final Map<Class<? extends BindableType>, ArrayList<BindableType>> dependencies = new HashMap<>();
/** Internal class reference to BindableType since we can't get it any other way. */
protected final Class<? extends BindableType> bindableInterface;
protected final boolean allowDuplicateBindings;
public DependencyInjector(Class<BindableType> newBindableInterface)
{
this.bindableInterface = newBindableInterface;
this.allowDuplicateBindings = false;
}
public DependencyInjector(Class<BindableType> newBindableInterface, boolean newAllowDuplicateBindings)
{
this.bindableInterface = newBindableInterface;
this.allowDuplicateBindings = newAllowDuplicateBindings;
}
@Override
public void bind(Class<? extends BindableType> dependencyInterface, BindableType dependencyImplementation) throws IllegalStateException, IllegalArgumentException
{
// duplicate check if requested
if (this.dependencies.containsKey(dependencyInterface) && !this.allowDuplicateBindings)
{
throw new IllegalStateException("The dependency [" + dependencyInterface.getSimpleName() + "] has already been bound.");
}
// make sure the given dependency implements the necessary interfaces
boolean implementsInterface = this.checkIfClassImplements(dependencyImplementation.getClass(), dependencyInterface) ||
this.checkIfClassExtends(dependencyImplementation.getClass(), dependencyInterface);
boolean implementsBindable = this.checkIfClassImplements(dependencyImplementation.getClass(), this.bindableInterface);
// display any errors
if (!implementsInterface)
{
throw new IllegalArgumentException("The dependency [" + dependencyImplementation.getClass().getSimpleName() + "] doesn't implement or extend: [" + dependencyInterface.getSimpleName() + "].");
}
if (!implementsBindable)
{
throw new IllegalArgumentException("The dependency [" + dependencyImplementation.getClass().getSimpleName() + "] doesn't implement the interface: [" + IBindable.class.getSimpleName() + "].");
}
// make sure the hashSet has an array to hold the dependency
if (!this.dependencies.containsKey(dependencyInterface))
{
this.dependencies.put(dependencyInterface, new ArrayList<BindableType>());
}
// add the dependency
this.dependencies.get(dependencyInterface).add(dependencyImplementation);
}
@Override
public boolean checkIfClassImplements(Class<?> classToTest, Class<?> interfaceToLookFor)
{
// check the parent class (if applicable)
if (classToTest.getSuperclass() != Object.class && classToTest.getSuperclass() != null)
{
if (this.checkIfClassImplements(classToTest.getSuperclass(), interfaceToLookFor))
{
return true;
}
}
// check interfaces
for (Class<?> implementationInterface : classToTest.getInterfaces())
{
// recurse to check interface parents if necessary
if (implementationInterface.getInterfaces().length != 0)
{
if (this.checkIfClassImplements(implementationInterface, interfaceToLookFor))
{
return true;
}
}
if (implementationInterface.equals(interfaceToLookFor))
{
return true;
}
}
return false;
}
@Override
public boolean checkIfClassExtends(Class<?> classToTest, Class<?> extensionToLookFor) { return extensionToLookFor.isAssignableFrom(classToTest); }
@SuppressWarnings("unchecked")
@Override
public <T extends BindableType> T get(Class<T> interfaceClass) throws ClassCastException
{
return (T) this.getInternalLogic(interfaceClass, false).get(0);
}
@Override
public <T extends BindableType> ArrayList<T> getAll(Class<T> interfaceClass) throws ClassCastException
{
return this.getInternalLogic(interfaceClass, false);
}
@Override
public <T extends BindableType> T get(Class<T> interfaceClass, boolean allowIncompleteDependencies) throws ClassCastException
{
return (T) this.getInternalLogic(interfaceClass, allowIncompleteDependencies).get(0);
}
/**
* Always returns a list of size 1 or greater,
* if no dependencies have been bound the list will contain null.
*/
@SuppressWarnings("unchecked")
private <T extends BindableType> ArrayList<T> getInternalLogic(Class<T> interfaceClass, boolean allowIncompleteDependencies) throws ClassCastException
{
ArrayList<BindableType> dependencyList = this.dependencies.get(interfaceClass);
if (dependencyList != null && dependencyList.size() != 0)
{
// check if each dependencies' delayed setup has been completed
for (IBindable dependency : dependencyList)
{
if (!dependency.getDelayedSetupComplete() && !allowIncompleteDependencies)
{
// a warning can be used here instead if desired
//this.logger.warn("Got dependency of type [" + interfaceClass.getSimpleName() + "], but the dependency's delayed setup hasn't been run!");
throw new IllegalStateException("Got dependency of type [" + interfaceClass.getSimpleName() + "], but the dependency's delayed setup hasn't been run!");
}
}
return (ArrayList<T>) dependencyList;
}
// return an empty list to prevent null pointers
ArrayList<T> emptyList = new ArrayList<T>();
emptyList.add(null);
return emptyList;
}
/** Removes all bound dependencies. */
@Override
public void clear() { this.dependencies.clear(); }
/** Runs delayed setup for any dependencies that require it. */
@Override
public void runDelayedSetup()
{
for (Class<? extends BindableType> interfaceKey : this.dependencies.keySet())
{
IBindable concreteObject = this.get(interfaceKey, true);
if (!concreteObject.getDelayedSetupComplete())
{
concreteObject.finishDelayedSetup();
}
}
}
}
@@ -0,0 +1,132 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 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.lod.coreapi.DependencyInjection;
import com.seibel.lod.api.interfaces.override.IDhApiOverrideable;
import com.seibel.lod.coreapi.interfaces.dependencyInjection.IOverrideInjector;
import com.seibel.lod.coreapi.util.StringUtil;
import java.util.HashMap;
/**
* This class takes care of dependency injection for overridable objects. <Br>
* This is done so other mods can override our methods to improve features down the line.
*
* @author James Seibel
* @version 2022-9-8
*/
public class OverrideInjector implements IOverrideInjector<IDhApiOverrideable>
{
public static final OverrideInjector INSTANCE = new OverrideInjector();
private final HashMap<Class<? extends IDhApiOverrideable>, OverridePriorityListContainer> overrideContainerByInterface = new HashMap<>();
/**
* This is used to determine if an override is part of Distant Horizons'
* Core or not.
* This probably isn't the best way of going about this, but it works for now.
*/
private final String corePackagePath;
public OverrideInjector()
{
String thisPackageName = this.getClass().getPackage().getName();
int secondPackageEndingIndex = StringUtil.nthIndexOf(thisPackageName, ".", 3);
this.corePackagePath = thisPackageName.substring(0, secondPackageEndingIndex); // this should be "com.seibel.lod"
}
public OverrideInjector(String newCorePackagePath) { this.corePackagePath = newCorePackagePath; }
@Override
public void bind(Class<? extends IDhApiOverrideable> dependencyInterface, IDhApiOverrideable dependencyImplementation) throws IllegalStateException, IllegalArgumentException
{
// make sure a override container exists
OverridePriorityListContainer overrideContainer = this.overrideContainerByInterface.get(dependencyInterface);
if (overrideContainer == null)
{
overrideContainer = new OverridePriorityListContainer();
this.overrideContainerByInterface.put(dependencyInterface, overrideContainer);
}
// validate the new override //
// check if this override is a core override
if (dependencyImplementation.getPriority() == CORE_PRIORITY)
{
// this claims to be a core override, is that true?
String packageName = dependencyImplementation.getClass().getPackage().getName();
if (!packageName.startsWith(this.corePackagePath))
{
throw new IllegalArgumentException("Only Distant Horizons internal objects can use the Override Priority [" + CORE_PRIORITY + "]. Please use a higher number.");
}
}
// make sure the override has a valid priority
else if (dependencyImplementation.getPriority() < MIN_NON_CORE_OVERRIDE_PRIORITY)
{
throw new IllegalArgumentException("Invalid priority value [" + dependencyImplementation.getPriority() + "], override priorities must be [" + MIN_NON_CORE_OVERRIDE_PRIORITY + "] or greater.");
}
// check if an override already exists with this priority
IDhApiOverrideable existingOverride = overrideContainer.getOverrideWithPriority(dependencyImplementation.getPriority());
if (existingOverride != null)
{
throw new IllegalStateException("An override already exists with the priority [" + dependencyImplementation.getPriority() + "].");
}
// bind the override
overrideContainer.addOverride(dependencyImplementation);
}
@Override
@SuppressWarnings("unchecked")
public <T extends IDhApiOverrideable> T get(Class<T> interfaceClass) throws ClassCastException
{
OverridePriorityListContainer overrideContainer = this.overrideContainerByInterface.get(interfaceClass);
return overrideContainer != null ? (T) overrideContainer.getOverrideWithHighestPriority() : null;
}
@Override
@SuppressWarnings("unchecked")
public <T extends IDhApiOverrideable> T get(Class<T> interfaceClass, int priority) throws ClassCastException
{
OverridePriorityListContainer overrideContainer = this.overrideContainerByInterface.get(interfaceClass);
return overrideContainer != null ? (T) overrideContainer.getOverrideWithPriority(priority) : null;
}
@Override
public void clear() { this.overrideContainerByInterface.clear(); }
}

Some files were not shown because too many files have changed in this diff Show More