-
Notifications
You must be signed in to change notification settings - Fork 0
Home
VadamDev edited this page Sep 27, 2023
·
7 revisions
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.
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 !
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 !
- Items
- Foods
- Armors Parts
-
- Armor Sets
- Durability Provider
-
- Durability Bar
- Blocks
-
- Block (Soon...)
-
- Tile Entity (Soon...)
- Shaped Recipe
- Shapeless Recipe