Skip to content

API reference Obsidian.API.Data

AttachmentExtensions class

Persistent attachments. Holders keep NBT only, including unknown and unloaded types.

public static class AttachmentExtensions

In Obsidian.API.

Methods

public static TValue GetAttachment<TValue>(this IAttachmentHolder holder, AttachmentType<TValue> type);public static bool RemoveAttachment<TValue>(this IAttachmentHolder holder, AttachmentType<TValue> type);public static void SetAttachment<TValue>(this IAttachmentHolder holder, AttachmentType<TValue> type, TValue value);public static bool TryGetAttachment<TValue>(this IAttachmentHolder holder, AttachmentType<TValue> type, out TValue value);

On this page