Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siphalor/capsaicin
A Minecraft library mod to dynamically modify food properties at runtime
https://github.com/siphalor/capsaicin
Last synced: about 1 month ago
JSON representation
A Minecraft library mod to dynamically modify food properties at runtime
- Host: GitHub
- URL: https://github.com/siphalor/capsaicin
- Owner: Siphalor
- License: other
- Created: 2022-12-26T11:43:53.000Z (almost 2 years ago)
- Default Branch: 1.18
- Last Pushed: 2023-12-18T13:37:26.000Z (about 1 year ago)
- Last Synced: 2023-12-18T15:11:49.448Z (about 1 year ago)
- Language: Java
- Size: 180 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Capsaicin
![supported Minecraft versions: 1.18 | 1.19](https://img.shields.io/badge/support%20for%20MC-1.18%20%7C%201.19-%2356AD56?style=for-the-badge)
[![latest maven release](https://img.shields.io/maven-metadata/v?color=0f9fbc&metadataUrl=https%3A%2F%2Fmaven.siphalor.de%2Fde%2Fsiphalor%2Fcapsaicin-1.18%2Fmaven-metadata.xml&style=flat-square)](https://maven.siphalor.de/de/siphalor/capsaicin-1.18/)
This library mod provides hooks to dynamically modify properties of food items at runtime.
**
[Discord](https://discord.gg/6gaXmbj)
**## Usage
```groovy
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](src/testmod/java/de/siphalor/capsaicin/testmod/CapsaicinTestmod.java) show some examples of how you might use the API.
The main interface is the [`FoodModificationRegistry`](src/main/java/de/siphalor/capsaicin/api/food/FoodModificationRegistry.java) 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.