🌐 共享资源#
为减少冗余并提高效率,该库提供共享的记分项、命令存储、方块和实体供模块使用。
记分项#
记分项 |
描述 |
|---|---|
|
存储输入值。格式: |
|
存储输出值。格式: |
|
用于快速计算的临时上下文记分项。格式: |
|
全局分数存储。格式: |
|
存储常量值。格式: |
|
存储回调中使用的值。格式: |
命令存储#
命名空间 |
描述 |
|---|---|
|
存储输入数据。路径: |
|
存储输出数据。路径: |
|
快速上下文存储。使用 |
|
通用全局存储。路径: |
|
存储常量数据。路径: |
|
存储回调中使用的数据。路径: |
方块#
这些命令可在加载时创建随处可用的方块。这些方块必须保存在常加载区块(-30000000 1600)中。
# 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}
实体#
全局实体使用特定 UUID 召唤,确保其可访问且避免选择器冲突。它们必须在每刻结束时保持在常加载区块(-30000000 1600)中。UUID B5-0-0-0-0 保留给临时上下文实体使用,这些实体不得在当前刻之外持续存在。
# 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}