GithubHelp home page GithubHelp logo

demopluginfabric's Introduction

Demo MCreator plugin

License

This repository demonstrates a basic MCreator plugin structure.

WARNING: The plugin structure might and will change in the future so keep your eye on this repository for changes on the format if you are a plugin dev.

Demonstrated features:

  • Custom procedural/output procedure block
  • Custom procedure category
  • Custom global trigger
  • Custom templates
  • Generator for given features for 1.14.4 and 1.15.2
  • Localized texts

Other plugin features not demonstrated:

  • Custom JSON advancement triggers and categories
  • AI task blocks and categories
  • Full generator plugin
  • Data lists
  • APIs - eg. Minecraft Link
  • Variables
  • UI Themes

For features not demonstrated in this plugin, you can check the built-in plugins in <install dir>/plugins folder of your MCreator installation for the reference.

https://mcreator.net/wiki/section/mcreator-plugins

Gradle tasks

This demo plugin comes with some Gradle tasks to help you with the development of your plugin. In order to use them, it is recommended to use Intellij IDEA as it has been tested with this IDE. However, other programs such as Eclipse may also work, but the procedure may change. In Intellij, find your working folder and open the build.gradle file. Then, load th gradle project and wait. If you don't have a JDK for Java 16, you will need to install one. You can go on Adoptium (AdoptOpenJDK) to find one. When it is done, you should be able to see a new task group called mcreator_plugins in the sidebar "Gradle". Those tasks are:

  • exportPlugin: Create a new ZIP archive containing the plugin in a build folder
    • You can edit the name using Globals.ARCHIVE_NAME in the build.gradle file.
  • install: Install the plugin (the generated file of exportPlugin) inside the plugins folder of MCreator.
  • runMCreator: Export and install the plugin and then, launch MCreator.
    • The default root of each OS is used, but you can customize it by changing one of the following variables in the build.gradle. Globals.MCREATOR_ROOT_FOLDER_WINDOWS and Globals.MCREATOR_ROOT_FOLDER_MAC_LINUX

Exporting

Using Gradle

To export your plugin, you can use the provided Gradle task. Read the section above for more information.

Manual method

To export the plugin, simply archive the src folder of the plugin into a ZIP file, so the plugin has the following structure:

  • <plugin file name>.zip
    • plugin.json
    • (procedures)
    • (<generator 1 name>)
    • ...

Installation

Using Gradle

To export your plugin, you can use the provided Gradle task. Read the Gradle tasks for more information.

Manual method

To install exported plugin in MCreator, put the plugin ZIP file into <user home>/.mcreator/plugins or install them from MCreator's preferences window and relaunch MCreator.

Generator naming conventions

Generators are added in the root folder of the plugin:

  • <plugin file name>.zip
    • <generator 1 name>
    • <generator 2 name>
    • <generator 3 name>
    • ...

Generator names are formatted like this:

FLAVOR-generatorName

Where FLAVOR can be:

  • forge - eg. "forge-1.15.2" - such generators indicate forge generator flavor
  • datapack - eg. "datapack-1.14.4" - such generators indicate datapack generator flavor
  • addon - eg. "addon-1.14.x" - such generators indicate addon generator flavor
  • fabric - eg. "fabric-1.16.1" - such generators indicate fabric generator flavor
  • spigot - eg. "spigot-1.16.1" - such generators indicate spigot generator flavor

Non-plugin files

All files outside the src folder are not part of the plugin structure but are there for the purpose of Intellij IDEA IDE support for better plugin development, documentation purposes and similar.

demopluginfabric's People

Contributors

psgithubuser1 avatar renovate[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.