Skip to content
mouse114514 edited this page Sep 12, 2026 · 1 revision

Sprite Reference

Sprite Reference

Overview

References a sprite asset (an image file name). This is a value block: it only plugs into another block's slot, used to provide icons for items and status effects.

It never standalone in a script; it is inserted into the SPRITE_REF slot of register item / register status.

Slots

Slot Type Description
ASSET String slot (text) Sprite file name, default sprite.png

Connections

Connection Type Description
Output Sprite can plug into any slot expecting a sprite type

Typical Uses

  • Provide the item icon in register item's SPRITE_REF slot
  • Provide the status icon in register status's SPRITE_REF slot

Generated Code

Produces the sprite asset string, e.g. "sprite.png", injected into the parent block's registration code.

Example

register item id "customSword" name "Sample Sword" desc "A test sword" sprite [sprite "sword.png"]

Block ID: cu_sprite_ref


中文 | Registration Blocks | Block Reference

Clone this wiki locally