Skip to main content
Version: 2.x

Events

Vampirism fires a small set of game-bus events (NeoForge.EVENT_BUS) from de.teamlapen.vampirism.api.event. Faction / skill / action / village events are FactionApi's.

BloodDrinkEvent

Fired when blood is drained by a bite. Common getters/setters: getVampire(), getAmount() / setAmount(int), getSaturation() / setSaturationModifier(float), getBloodSource() (IDrinkBloodContext).

SubclassWhenExtra
PlayerDrinkBloodEventa vampire player drinks blooduseRemaining() / setUseRemaining(boolean)
EntityDrinkBloodEventa non-player vampire drinks blooduseRemaining() / setUseRemaining(boolean)

Adjusting amount / saturation changes what the drinker actually gains.

VampireFogEvent

Fired when the vampire fog density is computed. getFogDistanceMultiplier() / setFogDistanceMultiplier(float) to strengthen or weaken the fog.

VampirismEventFactory

de.teamlapen.vampirism.api.util.VampirismEventFactory is what Vampirism uses to post these events (fireVampirePlayerDrinkBloodEvent, fireVampireDrinkBlood, fireVampireFogEvent); useful if an addon re-implements a code path and wants to keep firing the events.