Overview
Vampirism ships an API for addon mods and cross-mod compatibility. It lives in the
de.teamlapen.vampirism.api package (the Vampirism-api Gradle module).
Faction, skill, level and task APIs moved to FactionApi
Vampirism is built on top of FactionApi. Everything about factions,
faction players, levels, lord levels, skills, actions, tasks, refinements and minions is FactionApi's
API now – IVampirePlayer / IHunterPlayer simply extend FactionApi's IFactionPlayer and
ISkillPlayer. This section only documents what is Vampirism-specific (blood, biting, sun damage,
oils, garlic, fog, …).
Documentation map
| Page | Contents |
|---|---|
| Depending on Vampirism | Gradle repository, artifacts, mixins / access transformers. |
| Registries | Vampirism's own registries (oils, converters, visions, vampire books). |
| Players & world | Player capabilities, world handlers and the API service registries. |
| Items | Oils, blood-charged items, brewing, item data components. |
| Events | The game-bus events the API fires. |
| IMC messages | Lightweight compatibility messages you can send to Vampirism. |
| Reference | VReference, attachments, tags, data maps, enums. |
Entry points
// Global services
IVampirismServices services = VampirismApi.services();
// Player capabilities (attached to every player)
IVampirePlayer vampire = VampirismApi.vampirePlayer(player);
IHunterPlayer hunter = VampirismApi.hunterPlayer(player);
// World / creature capabilities
IExtendedCreatureVampirism ext = VampirismApi.extendedCreatureVampirism(creature);
IGarlicChunkHandler garlic = VampirismApi.garlicHandler(level);
IFogHandler fog = VampirismApi.fogHandler(level);
VampirismApi.services() returns an IVampirismServices with the
sun-damage, entity, blood-conversion and extended-brewing registries.
Examples & help
- VampirismIntegrations – a real mixed example.
- Discord · GitHub