×

注意!页面内容来自https://www.meteorclient.com/faq/addon-template,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

XMeteor Addon Template


Our template is a great way to get started with Meteor addon development.
The following guide will show you how to set up a new project using said template.
We will be using IntelliJ IDEA Community Editionbut you can use any IDE.


Firsta couple of prerequisites:

  • Knowledge of Java programmingGit for version control and Gradle for dependency management.
  • A GitHub account to host your repository.
  • A Git client for all the Git commands.
  • A Java-compatible IDEIntelliJ IDEA in this case.
  • (Optional) A Java 21 JDKwe recommend Adoptium. You can also use the one bundled with IntelliJ IDEA.

We will not be teaching you how to use GitJavaGradle or IntelliJ IDEA in detail. That is out of the scope of this guide.
If you are not familiar with any of thesewe recommend you to learn the basics before continuingor learn as you go.
You can find documentation and many tutorials online for all of these topics.

XGit setup

To set up Gitwe’ll need your GitHub username and email.
The first one is easyit’s the name you use to log in to GitHub.
The second one can be found in your GitHub Email settings. It ends with @users.noreply.github.com.

Herebe sure to check the Keep my email addresses private and Block command line pushes that expose my email boxes.
This will prevent your personal email from being exposed in commits.


You can now set up Git:

  1. Download and install Git from the link above.
  2. Once that is doneopen a terminal and run the following commands:
    git config --global user.name YOUR_GITHUB_USERNAME
    git config --global user.email YOUR_GITHUB_EMAIL
  3. You can now close the terminal and open IntelliJ IDEA.

XProject setup

  1. Go to the Meteor Addon Template repository.
  2. Click the green Use this template button and select Create a new repository.
  3. Give your repository a namecheck whether you want it to be publicly available or privateand click Create repository.
  4. In your newly created repositoryclick the green Code button and copy the HTTPS URL.
  5. Open IntelliJ IDEA and click Get from VCS in the top right.
  6. Paste the URL you copied earlierselect a directory to start your project and click Clone.

At this pointyour project should be set up and ready to go.
You can test it by running the Minecraft Client run configuration in the top right.

XImportant files

The template contains the following important files:

  • com.example.addon.Addon: The entry point of your addonit extends the extends MeteorAddon class.
    This is where you will register your modulescommandsHUD elementsetc.
  • src/main/resources/fabric.mod.onbetter explained by the fabric.mod.on specification.
    The Fabric mod metadata file contains information about your addonand you should change these fields:
    • id: The mod identifier of your addon.
    • name: The user-facing mod name.
    • description: The user-facing mod description.
    • authors: The list of authors.
    • contact: The contact information for the projectsuch as the repository URLDiscord serveretc.
    • entrypoints/meteor: The string pointing to your addon’s entrypoint class.
    • mixins: The list of mixin configuration files for the Mixin library as filenames relative to the mod root.
    • custom/meteor-client:color: RGB comma separated value used for the color of your addon’s credits in the main menu.
  • build.gradle.kts: The Gradle build script contains the Loom versionthe mod’s dependenciesand other useful variables.
  • gradle.properties: The Gradle properties file contains the Minecraft version used by the project, along with the version of your addon, it’s maven_group (explained here) and archives_base_name (the name of your mod’s JAR file).
    Keep your versions of MeteorMinecraftand other dependencies if you have anyup to date.
  • README.md: The README file contains information about your addonsuch as a descriptioninstallation instructionsetc. You can use Markdown to format your README.

You might also want to add a LICENSE file to your repositorywhich contains the license of your addon.
GitHub suggest choosealicense to help you pick one.
If you want a more exhaustive listyou can use the SPDX License List instead.

XFabric mod development

At its coreMeteor and its addons are Fabric mods.
Our template is set up to work with Fabricand follows the same conventions.

Some useful resources that will help you with our templateand Fabric mod development in general:


This is not an exhaustive listbut it should be enough to get you started.

XClosing notes

Meteor’s source code is not documentedso it may be hard to understand its inner workings.
The project structureclassmethod and field names try to be as descriptive as possible.
You can look at the source code of other Meteor addons to see how they work and learn from them.

Our template is always up-to-date with the latest version of Meteor and Minecraft, and we encourage you to do so as well with your addons.

Copyright © 2025 Meteor Development

All Rights Reserved.