Skip to main content
Version: 2.x

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​

PageContents
Depending on VampirismGradle repository, artifacts, mixins / access transformers.
RegistriesVampirism's own registries (oils, converters, visions, vampire books).
Players & worldPlayer capabilities, world handlers and the API service registries.
ItemsOils, blood-charged items, brewing, item data components.
EventsThe game-bus events the API fires.
IMC messagesLightweight compatibility messages you can send to Vampirism.
ReferenceVReference, 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​