Skip to content

API reference Obsidian.API

PotionEffectData record

The potion effect data holds additional information about an active PotionEffect.

public sealed record PotionEffectData : INetworkSerializable<PotionEffectData>, IEquatable<PotionEffectData>

In Obsidian.API.

Constructors

public PotionEffectData();

Properties

Ambient

public bool Ambient { get; init; }

Produces more translucent particle effects if true.

Amplifier

public required int Amplifier { get; init; }

The amplifier of the potion effect.

Duration

public required int Duration { get; init; }

The duration of the potion effect when it was added.

HiddenEffect

public PotionEffectData HiddenEffect { get; init; }

Used to store the state of the previous potion effect when a stronger one is applied. This guarantees that the weaker one will persist, in case it lasts longer.

public required int Id { get; init; }

ShowIcon

public bool ShowIcon { get; init; }

Shows the potion icon in the inventory screen if true.

ShowParticles

public bool ShowParticles { get; init; }

Completely hides effect particles if false.

Methods

public static PotionEffectData Read(INetStreamReader reader);public static void Write(PotionEffectData value, INetStreamWriter writer);

On this page