API reference Obsidian.API.Entities
IEntitySpawner interface
Can be used to spawn entities. Can be retrieved from ILevel.GetNewEntitySpawner.
public interface IEntitySpawner
In Obsidian.API.
Methods
AsBaby()
IEntitySpawner AsBaby();Whether this entity is a baby entity. Only applicable to Ageable entities.
AtPosition(VectorD)
IEntitySpawner AtPosition(VectorD position);Position to spawn the entity at.
Parameters
position- Entity position
IsBurning()
IEntitySpawner IsBurning();Makes the entity spawn burning.
IsGlowing()
IEntitySpawner IsGlowing();Makes the entity spawn glowing.
Spawn()
IEntity Spawn();Spawns the entity.
Returns
The newly spawned entity. Can be cast to the apropriate type.
WithAbsorbedArrows(int)
IEntitySpawner WithAbsorbedArrows(int arrows);Sets the amount of arrows this entity has absorbed.
Parameters
arrows- The amount of arrows absorbed
WithAbsorbedStingers(int)
IEntitySpawner WithAbsorbedStingers(int stingers);Sets the amount of absorbed stingers this entity has.
Parameters
stingers- Amount of absorbed stingers
WithAmbientPotionEffect(bool)
IEntitySpawner WithAmbientPotionEffect(bool ambient);Sets whether this entity has an ambient potion effect.
Parameters
ambient- Whether this entity has the ambient potion effect
WithCustomName(string, bool)
IEntitySpawner WithCustomName(string name, bool visible = true);Spawns the entity with a custom name plate.
Parameters
name- The name this entity has.
visible- Whether the name is visible.
WithEntityType(EntityType)
IEntitySpawner WithEntityType(EntityType type);Sets the entity type to spawn.
Parameters
type- The entity type to spawn