Skip to content

API reference Obsidian.API.Entities

EntityDefinition class

A kind of entity a plugin registered with IPluginRegistry.RegisterEntity: mobs, projectiles or objects (see EntityKind).

public sealed class EntityDefinition

In Obsidian.API.

Remarks

The server owns the definition: it keeps its instance, identifier and id until the server stops, even when the plugin reloads or unloads; a reload replaces only its properties and behaviour.

Properties

Id

public int Id { get; }

The entity type's id in the entity type registry. Vanilla's come first; plugins' follow, in the order they were first registered.

Identifier

public string Identifier { get; }

The entity type's identifier, like myplugin:golem.

Kind

public EntityKind Kind { get; }

What the type's entities are.

Owner

public IPluginContainer Owner { get; }

The plugin that registered the entity type and provides its behaviour, or null while the plugin is unloaded.

SpawnEgg

public Item SpawnEgg { get; }

The optional spawn egg registered with this type, or null without one.

Methods

public override string ToString();

On this page