Distance Extender (original title: voxelmap compatibility)#47
Distance Extender (original title: voxelmap compatibility)#47MamiyaOtaru wants to merge 4 commits intodslake:masterfrom MamiyaOtaru:master
Conversation
ensure that (!downloading && !saving) means it is safe to mess with chunk.isModified (instead of having a brief period where downloading is false but before saving is true)
distance extender as suggested by stellardawn I originally had ChunkProviderWDL inserted in between WorldClient and ChunProviderClient, which kept track of its own chunkmap/list, but decided it was best to just have it all in one class. Could have edited ChunkProviderClient, but I decided not to edit one more base class, so a lot of ChunkProviderClient is replicated in ChunkProviderWDL which may not be any better. It is a pretty simple class at any rate. And the whole thing could likely be done better, but it works (SP too!)
do disk IO of loading in a separate thread (and make references to chunkMap/Listing thread safe) Restrict chunkListing to chunks added via loadChunk (ie what would be there normally, ignoring what we load from disk). This saves chunk ticking (lighting recheck etc) on all those extra chunks, which aren't even really the real chunks as received from the server anyway. Their lighting was most likely worked out satisfactorily when they were saved. If not, they'll get ticked as we get closer and they are loaded the normal way anwyay
|
Hey MamiyaOtaru, thanks for this pull request and sorry for the long silence. Afaik cubic72 didn't have time to work on Minecraft mods and I haven't really followed the mod anymore for almost a year. I'll have a look at your code. So the problem is that VoxelMap uses the Changing VoxelMap to store the state in some mod-local data structure wouldn't work, would it? E.g. a You also included a distance extender in this PR. I'd rather test the two changes separately. Which changes are for voxelmap compatibility and which ones for the distance extender? Do I need the new ChunkProviderWDL for compatibility? I hope you still remember :) Again, sorry for the long wait and thanks! |
first tiny commit is to ensure that (!WDL.downloading && !WDL.saving) means it is safe for another mod (like VoxelMap) to mess with chunk.isModified instead of having a (very very) brief period where downloading is false but before saving is true
Second updates some methods and fields to mcptest, didn't touch anything in conf folder though :(
also adds Distance Extender functionality where Minecraft will actually listen to the render distance the user chooses in the video UI. Works in SP as is, and in SMP if a download is running (to be sure WDL.chunkLoader is the right one for that world - it's not set to null after download is stopped, even after world is switched. Could probably do something about that but eh