Skip to content

cu_register_item en

mouse114514 edited this page Sep 12, 2026 · 1 revision

Register Item

Register Item

Overview

Registers a custom item with its ID, display name, description and sprite. Once registered, the item can be referenced from other blocks (recipes, spawning, use behaviors) through the custom item value block.

Usually placed under the when mod awakes event.

Slots

Slot Type Description
ID Item slot Unique identifier of the item. Fill with a custom item value block
FULL_NAME String slot (text) Display name, default My Item
DESC String slot (text) Description, default A description
SPRITE_REF Sprite slot The item icon. Fill with a sprite value block

Connections

Connection Type Description
Top / Bottom - no statement connections (declaration block, not chained)

Typical Uses

  • Register custom food, medicine, weapons, misc items
  • Pair with when item used / when item limb used to define behavior
  • Pair with register recipe to add crafting recipes

Generated Code

Emits item registration code that adds the item to GlobalItems.

Example

when mod awakes
└── register item id "customSword" name "Sample Sword" desc "A test sword" sprite "sword.png"

Block ID: cu_register_item


中文 | Registration Blocks | Block Reference

Clone this wiki locally