Skip to main content

Spawn Entity (Block Action Type)

Spawns an entity at the block's position, or at an offset from it.

Type ID: apoli:spawn_entity

Fields

FieldTypeDefaultDescription
entity_typeIdentifierrequiredThe ID of the entity type to spawn.
tagNBToptionalNBT data applied to the spawned entity.
entity_actionEntity Action TypeoptionalRuns on the spawned entity.
offsetVector{"x": 0, "y": 0, "z": 0}Moves the spawn point away from the bottom centre of the block by this much, in world axes.
note

The action runs on any spawned entity, living or not, including markers, arrows, item frames and armour stands.

Examples

"block_action": {
	"type": "apoli:spawn_entity",
	"entity_type": "minecraft:vex",
	"entity_action": {
		"type": "apoli:grant_power",
		"power": "apoli:arcane_skin",
		"source": "*:*"
	}
}

This summons a vex at the block's position and grants it the apoli:arcane_skin power, with the ID of the power the action is written in as the source.

"block_action": {
	"type": "apoli:spawn_entity",
	"entity_type": "minecraft:lightning_bolt",
	"offset": { "y": 1 }
}

This strikes lightning on top of the block instead of inside it.