MBE方块实体¶
本页介绍Max方块实体(Max's Block Entity,MBE)方案:用盔甲架+playanimation伪装成方块显示。
快速准备¶
BP/functions/wiki/mbe/setup.mcfunction
summon armor_stand ~~~ 81 ~ default "Grumm"
# 可选:把方块放到副手,防止被玩家取走
replaceitem entity @e[name="Grumm"] slot.weapon.offhand 0 <itemID>
Grumm命名是为了避免贴图翻转。
渲染核心¶
BP/functions/wiki/mbe/render.mcfunction
# 对齐手臂
playanimation @e[type=armor_stand,name="Grumm"] animation.armor_stand.entertain_pose null 0 "0" wiki:align.arms
# 小方块尺寸
playanimation @e[type=armor_stand,name="Grumm"] animation.player.move.arms.zombie null 0 "0" wiki:size.mini_block
# 可选:整方块尺寸
playanimation @e[type=armor_stand,name="Grumm"] animation.ghast.scale null 0 "0" wiki:size.full_block
playanimation @e[type=armor_stand,name="Grumm"] animation.fireworks_rocket.move null 0 "0" wiki:align.full_block
# 冻结并隐藏本体
execute as @e[type=armor_stand,name="Grumm"] at @s run tp ~~~
effect @e[type=armor_stand,name="Grumm"] invisibility infinite 1 true
旋转与对位预设¶
整方块朝向预设
小方块朝向预设
保存与加载¶
BP/functions/wiki/mbe/save_load.mcfunction
execute at @e[type=armor_stand,name="Grumm",c=1] run structure save wiki:mbe ~~~ ~~~ true disk false
structure load wiki:mbe <x> <y> <z>