btcsky_npc_reference_block
NPC Reference Block — npc entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | btcsky_npc_reference_block |
| Type | Npc |
| Color | Orange |
| Icon | material-symbols:person-pin |
Description
NPC Reference Block Entry — allows server creators to define a block location that spawns a 3D entity model (NPC, meteorite, boss, etc.) when triggered by an event or player interaction. This is the clean replacement for hardcoded entity spawning in events. The entity is spawned via TypeWriter's EntityInstance system, supporting BetterModel, BTCMob, MythicMobs, and vanilla entities. Usage: - Place in a page JSON with the desired entity definition and position - Reference from events via Ref<NpcReferenceBlockEntry> - Call spawn() from event code to spawn the entity at the defined location
Fields
| Field | Type | Description |
|---|---|---|
entity | Ref<out EntityDefinitionEntry> | The entity definition to spawn (Entity, BetterModel, BTCMobNPC, MythicMobsNPC) |
spawnOffset | Position | The position where the entity should spawn (offset from island spawn) |
dimensionId | String | The dimension ID where this NPC should appear (e.g., 'overworld', 'nether') |
despawnAfterSeconds | Int | Duration in seconds before the entity despawns (0 = permanent) |
visibleToAll | Boolean | Whether the entity is visible to all players on the island |
customName | String | Custom name displayed above the entity (supports MiniMessage) |
interactionRadius | Double | Radius in blocks for player interaction detection |
modelScale | Double | Scale multiplier for the entity model (1.0 = normal) |
Usage Example
- entry: btcsky_npc_reference_block
name: "NPC Reference Block"
entity: ""
spawnOffset: ""
dimensionId: ""
despawnAfterSeconds: 0
visibleToAll: false
customName: ""
interactionRadius: 0
modelScale: 0