--- hide-sidebar-secondary: true --- # 🌐 Shared Resources To minimize redundancy and enhance efficiency, the library provides shared objectives, storages, blocks, and entities that modules can leverage. --- ## Objectives | Objectives | Description | |-------------|-------------| | `bs.in` | Stores input values. Format: `$..` | | `bs.out` | Stores output values. Format: `$.` or `$..` | | `bs.ctx` | Temporary contextual objective for fast computations. Format: `#` | | `bs.data` | Global score storage. Format: `#.` | | `bs.const` | Stores constant values. Format: `` | | `bs.lambda` | Stores values used in callbacks. Format: `$.` | --- ## Storages | Namespaces | Description | |-------------|-------------| | `bs:in` | Stores input data. Path: `..` | | `bs:out` | Stores output data. Path: `.` or `..` | | `bs:ctx` | Fast contextual storage. Uses `x`, `y`, `z` for numeric values (i.e., execute store) and `_` for other data | | `bs:data` | General-purpose global storage. Path: `.` | | `bs:const` | Stores constant data. Path: `.` | | `bs:lambda` | Stores data used in callbacks. Path: `.` | --- ## Blocks These commands can be used at load time to create blocks that can be used anywhere. These blocks must be kept in loaded chunks (`-30000000 1600`). ```mcfunction # Block for manipulating loots setblock -30000000 0 1606 minecraft:decorated_pot # Command block for system time (command block output) setblock -30000000 0 1605 minecraft:repeating_command_block[facing=up]{auto:1b,Command:"help me",TrackOutput:1} ``` --- ## Entities Global entities are summoned with specific UUIDs, ensuring they remain accessible and avoid selector conflicts. They must persist in always-loaded chunks (`-30000000 1600`) at the end of each tick. The UUID `B5-0-0-0-0` is reserved for temporary contextual entities that must not persist beyond the current tick. ```{code-block} mcfunction :force: # Marker for position, arithmetic, and various utilities execute unless entity B5-0-0-0-1 run summon minecraft:marker -30000000 0 1600 {UUID:[I;181,0,0,1],Tags:["bs.entity","bs.persistent","smithed.entity","smithed.strict"]} # Text display entity for interpreting text or computing transformations execute unless entity B5-0-0-0-2 run summon minecraft:text_display -30000000 0 1600 {UUID:[I;181,0,0,2],Tags:["bs.entity","bs.persistent","smithed.entity","smithed.strict"],view_range:0f,alignment:"center"} # Item display entity for manipulating loots or computing transformations execute unless entity B5-0-0-0-3 run summon minecraft:item_display -30000000 0 1600 {UUID:[I;181,0,0,3],Tags:["bs.entity","bs.persistent","smithed.entity","smithed.strict"],view_range:0f} ```