Bulldog83 / JustMap

A minimap mod for Minecraft with Fabric launcher.
GNU General Public License v3.0
42 stars 17 forks source link

Implement alternative, more efficient backend for map data #107

Open magicus opened 3 years ago

magicus commented 3 years ago

This is a new, from scratch, implementation of the newly abstracted map data API. The goal for this implementation is to be maximally efficient. That means that map data should only be recalculated when needed. This implementation is event-driven, so when Minecraft tells us a chunk needs updating, we update it, but only what is minimally required. This is in contrast to the classic implementation, which is timer-driven, i.e. it recalculates all map data on a regular basis.

This PR is a work in process. Currently a lot of functionality is missing. I do think that this approach is very promising, and that it is fully possible to re-add missing functionality without sacrificing the underlying efficiency.

A (probably incomplete) list of missing functionality:

Despite this patch being a WIP and far from ready to merge, I wanted to open this draft PR to show what I'm thinking and where I'm heading.

@Bulldog83 I have not received any feedback on my other PRs. Have you given up on developing JustMap, or are you just currently bogged down with real-life work? It would be helpful for me to know if it is ever realistic that these changes could be merged into JustMap, or if I am in practice creating a new JustMap fork for 1.17 and higher efficiency.

Bulldog83 commented 3 years ago

Hello! I want to continue work with mod, but, as you say, bogged down with real-life. If you want, you can create your own version of mod. I don't know at this moment, when I'll can return to mod dev. I'll merge all yours pull-requests.

magicus commented 3 years ago

@Bulldog83 Thanks for letting me know. I'll probably go a bit harder on with the refactorings, then. I'll continue calling it JustMap for now, but if you (or I) think it diverges too much, I'll rebrand it as a new and derived mod. If you ever want (or can get the time for it) to get back to working on the mod, I'll be happy to work together. (Just want to make clear I'm not trying to do a hostile fork.)

Technically, the previous PRs should perhaps not have been merged into the 1.16.2-master branch, since they contained 1.17.1 stuff, but I could not suggest creating a new branch within the Github framework, and I could not see a version-independent master branch. :-( Sorry for the mess.

Bulldog83 commented 3 years ago

Anyway, if I'll return to work under the mod, I'll make update to the actual Minecraft version. And the version of the code for 1.16.2 will still be saved in the 'unlimited' branch, so it's okay that requests go to the 1.16.2 branch, although not entirely correct.