Skip to content
VadamDev edited this page Sep 27, 2023 · 7 revisions

This wiki is currently outdated, an updated version will be released soon

Introduction

CustomContentLib is a library for helping the creation of custom items and blocks in vanilla Minecraft. The goal is too be close as possible of Minecraft modding.

Note: This library is intended for people comfortable with Spigot and Java.

Setup

You can download the plugin directly on the releases page

Then add it as a dependency in your plugin.yml and in your project

depend: [CustomContentLib]

And finally put CustomContentLib in your plugin folder !

Registration

To register new items, blocks, etc, you must use retrieve the CustomContentLib API:

CustomContentAPI api = CustomContentAPI.Provider.get();

I recommend using an enum to register and get your custom items like that:

public enum Items {
    EXEMPLE_ITEM(new ExempleItem());

    private final CustomItem customItem;

    Items(CustomItem customItem) {
        this.customItem = customItem;
    }

    public ItemStack get() {
        return CustomContentRegistry.getCustomItemAsItemStack(customItem.getRegistryName());
    }

    public static void registerAll() {
        ContentRegistry registry = CustomContentAPI.Provider.get().getContentRegistry();

        for (Items item : values())
            registry.registerCustomItem(item.customItem);
    }
}

For more information, see the rest of the wiki !

Introduction

Using CustomContentLib

Items

Blocks

  • Blocks
    • Block (Soon...)
    • Tile Entity (Soon...)

Recipes

  • Shaped Recipe
  • Shapeless Recipe

Clone this wiki locally