Skip to content

A Minecraft library mod to dynamically modify food properties at runtime

License

Notifications You must be signed in to change notification settings

Siphalor/capsaicin

Repository files navigation

Logo

Capsaicin

supported Minecraft versions: 1.18 | 1.19

latest maven release

This library mod provides hooks to dynamically modify properties of food items at runtime.

  Discord  

Usage

repositories {
	// ...other maven repositories
	maven { url "https://maven.siphalor.de" }
}

dependencies {
	// Use the latest version from the badge at the top of this README
	modImplementation("de.siphalor:capsaicin-1.18:1.2.0+mc1.18.2")
	// Alternatively, you may embed (jar-in-jar) this library with the following dependency configuration
	include(modApi("de.siphalor:capsaicin-1.18:1.2.0+mc1.18.2"))
}

The testmod show some examples of how you might use the API.

The main interface is the FoodModificationRegistry which exposes the available hooks.

Warning Since the hooks are internally called from the respective Vanilla functions, you must not use these Vanilla functions inside the hooks.

E.g. the PROPERTIES_MODIFIERS gets called for the vanilla getFoodComponent, so you must not call that function from inside your hook.

The values are already provided as parameters, so there should be no reason to do so anyway.

Compatibility

This mod provides a plugin for AppleSkin, so the modified values should be shown correctly.

About

A Minecraft library mod to dynamically modify food properties at runtime

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages