手冊:@minecraft/server/BlockComponentTypeMap

出自Minecraft基岩版开发Wiki

BlockComponentTypeMap包含了各方塊元件型別的別名映射。

映射[編輯]

別名 類別
inventory BlockInventoryComponent
lavaContainer BlockLavaContainerComponent
minecraft:inventory BlockInventoryComponent
minecraft:lavaContainer BlockLavaContainerComponent
minecraft:piston BlockPistonComponent
minecraft:potionContainer BlockPotionContainerComponent
minecraft:recordPlayer BlockRecordPlayerComponent
minecraft:sign BlockSignComponent
minecraft:snowContainer BlockSnowContainerComponent
minecraft:waterContainer BlockWaterContainerComponent
piston BlockPistonComponent
potionContainer BlockPotionContainerComponent
recordPlayer BlockRecordPlayerComponent
sign BlockSignComponent
snowContainer BlockSnowContainerComponent
waterContainer BlockWaterContainerComponent

程式碼[編輯]

type BlockComponentTypeMap = {
  'inventory': BlockInventoryComponent;
  'lavaContainer': BlockLavaContainerComponent;
  'minecraft:inventory': BlockInventoryComponent;
  'minecraft:lavaContainer': BlockLavaContainerComponent;
  'minecraft:piston': BlockPistonComponent;
  'minecraft:potionContainer': BlockPotionContainerComponent;
  'minecraft:recordPlayer': BlockRecordPlayerComponent;
  'minecraft:sign': BlockSignComponent;
  'minecraft:snowContainer': BlockSnowContainerComponent;
  'minecraft:waterContainer': BlockWaterContainerComponent;
  'piston': BlockPistonComponent;
  'potionContainer': BlockPotionContainerComponent;
  'recordPlayer': BlockRecordPlayerComponent;
  'sign': BlockSignComponent;
  'snowContainer': BlockSnowContainerComponent;
  'waterContainer': BlockWaterContainerComponent;
};