-
Notifications
You must be signed in to change notification settings - Fork 8
Plugin Docs: Overview
Welcome to the MoreMcmeta documentation for plugin developers.
As of version 4.0.0, MoreMcmeta provides a texture configuration API. The API is based on metadata files that configure various effects for almost any texture, rather than hard-coding effects for certain textures. Metadata file parsing and texturing effects are implemented as plugins.
Since MoreMcmeta is a client-side mod, the API is also client-side. The API is available on both Forge and Fabric on any Minecraft version MoreMcmeta actively supports. Plugin developers have the option of supporting what launcher(s) they want and what Minecraft version(s) they want, as long as MoreMcmeta supports those launchers and versions.
MoreMcmeta divides texture configuration into three phases: metadata parsing, metadata analysis, and component building.
Metadata parsing reads metadata files in various formats, such as .properties and .moremcmeta.
Every metadata file is parsed into a MetadataView, an immutable, format-independent representation of the metadata.
When multiple metadata files of the same format are associated with the same texture, they are combined into a single
MetadataView. (Multiple metadata files of different formats are not allowed to apply to the same texture.)
Metadata analysis takes the MetadataView for each texture from the parsing stage as an input and produces one
AnalyzedMetadata per plugin. AnalyzedMetadata contains plugin-specific data. It might also define parameters, like
the frame size or blur/clamp settings, that MoreMcmeta handles internally.
Component building takes each plugin's AnalyzedMetadata and uses that plugin's ComponentBuilder to build a
TextureComponent. A TextureComponent implements texturing effects in response to various events (onTick(),
onClose()). A ComponentBuilder can also modify each frame during building if the texturing effect never updates.
These phases are analogous to the way programming languages are implemented. Programming language parsers convert
human-readable code into an abstract syntax tree (AST). The AST is then analyzed and/or executed by an interpreter
or compiler. MoreMcmeta's MetadataView is similar to an AST, and the MetadataAnalyzer and ComponentBuilder act
like a "compiler." A TextureComponent is similar to an outputted executable.
Parser plugins implement the metadata parsing phase for a particular metadata file extension. They implement the
MoreMcmetaMetadataParserPlugin interface. See the parser plugin documentation for more details.
Texture plugins implement the metadata analysis and component building phases. They implement the
MoreMcmetaTexturePlugin interface. See the texture plugin documentation for more details.
MoreMcmeta provides the moremcmeta.api Java package and its loader-specific counterparts for you to use. Do not use code from impl packages. MoreMcmeta will take care to avoid breaking changes to the API and use semantic versioning to indicate the scope of changes. impl code is internal and will change without warning and without regard to how plugins use it. If there is something missing from the API, please create a feature request.
Read more plugin development documentation to create your own plugin:
MoreMcmeta provides a plugin template that contains an example Gradle configuration. MoreMcmeta's default plugins also serve as examples of complete implementations:
- parser plugins:
.propertiesplugin,.moremcmetaplugin - texture plugins: animation plugin, blur/clamp plugin
Please report errors or suggest improvements to this wiki using the documentation template on the issue tracker.
User Docs are written for regular Minecraft players and resource pack authors.
- User Docs: Animation Format
- User Docs: Emissive Format
- User Docs: Install Plugins
- User Docs: Troubleshooting
Plugin Docs are written for plugin developers.
- Plugin Docs: Overview
- Plugin Docs: Maven
- Plugin Docs: Plugin Registration
- Plugin Docs: Parser Plugins
- Plugin Docs: Texture Plugins
Dev Docs are written for MoreMcmeta developers.