kami-blue / client

ARCHIVED - KAMI Blue: a continuation of 1.12.2 KAMI
https://kamiblue.org
GNU Lesser General Public License v3.0
363 stars 378 forks source link

local chunks cache feature #1941

Open Dejniel opened 3 years ago

Dejniel commented 3 years ago

Is your feature request related to a problem? Please describe. increase draw distance finding chests and signs on the entire map Describe the solution you'd like Is they any way to add chunks cache? I mean... Holding the map locally downloaded from active chunks or taken from generator

I would like to increase render distance even if far chunks will be out-of-date I cannot find any information about this feature other than https://feedback.minecraft.net/hc/en-us/community/posts/360070251892-Add-Client-Chunk-Cache It will be unique It should also be very helpful in finding distant players activities Describe alternatives you've considered

Additional context Is it a lot of work? Are there technological barriers? I'm senior java dev and i can implement it but i need some introduction

5HT2 commented 3 years ago

My first concerns would be compatibility with other mods, depending on how it is implemented, and ram usage.

NewChunks already has a cache reset every 10 minutes due to memory usage even though it only saves ChunkPos, which is a bit of information about a Chunk.

Due to a lot of players travelling at high speeds and loading dozens of chunks every second, it can allocate very quickly, so the ideal solution would uncache the furthest chunks with only X chunks being allowed to cache.

Would be nice to have some way of indicating which chunks are real or cached as well, maybe as an addition to #1924.

If all you want is to save chest and sign positions, baritone already does the former and saves it to disk, along with loading it for path caching when possible.

If you only want to save sign text for searching, there's external tools to do that, it wouldn't be too hard to add to KAMI Blue.

scorbett123 commented 3 years ago

Doesn't baritone already have this, just enable the "renderCachedChunks" setting. I feel like it would be worth using that. I don't think that we really want to save every region twice, maybe just have another file that can store additional information such as the text on signs or what is in chests. Something really interesting to try and get working would be something like this. This would allow the generation of maps, however may be better suited to a standalone program. That though fits in to #1755. You could then make it so that it shows where chests or signs are on that.

zuim commented 3 years ago

Would be nice to have some way of indicating which chunks are real or cached as well, maybe as an addition to #1924.

This is already done using chunk.isLoaded, which would supposedly return false for chunks that are rendered from cache! grafik

5HT2 commented 3 years ago

If that's an upcoming addition to #1924 that's really cool!

zuim commented 3 years ago

If that's an upcoming addition to #1924 that's really cool!

Yes, #1924 already shows loaded chunks like the screenshot shows. I also just confirmed, that chunks loaded using the "renderCachedChunks" setting in barritone are not shown in the lighter color.

5HT2 commented 3 years ago

I also just confirmed, that chunks loaded using the "renderCachedChunks" setting in barritone are not shown in the lighter color.

Would be a neat addition if it's possible to access that with the API

zuim commented 3 years ago

I added cached baritone chunks to the light area and it definitely helps with getting an overview.