Open ammoore00 opened 3 months ago
I tried doing this as I was porting the code over, but it was just a lot of work at the time and it increased the bug surface by a lot. A lot of it should be fairly mechanical work though, where you just replace dirty workarounds with the obvious direct change.
I actually had in mind an effective cleanroom rewrite. It'd be more development work, but i have very little understanding of the internals of mcpatcher due to the opaque nature is that code so it'd still take a significant amount of work to swap out individual components.
And as you said, that's a lot of bug surface area, whereas a rewrite can be better tested incrementally
Whatever gives you max velocity is probably the right call :)
MCPatcher's code was designed to be as unintrusive as possible for maximum compatibility through its installer. Unfortunately, this has also created code which is extremely difficult to maintain and upgrade. We should remove the MCPatcher code and rewrite it in a more maintainable and extendable way, with the following considerations:
Overridable The texture features should be usable by addons to enable, for example, randomized and connected textures by default. Default settings must be able to be overridden by resourcepacks, and looking forward to the 1.7 update, resourcepack stacking.
Portable 1.7 makes changes to internal rendering, and 1.8 makes major changes to block and item models and textures. This system should be designed to be modular, so that these overhauls have limited impact on the actual core feature functionality.
Encapsulated MCPatcher currently functions using monolithic handlers for all functionality. This should be avoided, and instead functionality should be encapsulated to more closely tie texture and rendering information with the blocks/items/biomes/etc instead of having them separated, which will both aid in maintainability and portability.
Compatible The new implementation should be either compatible with the MCPatcher resourecepack API out of the box, or require minimal changes from resourcepack authors to be supported. Optifine features added post-MCPatcher (such as overlays) should also be supported if possible in future updates to the system.