🧱 方块

需要配置的部分

一个完整的方块配置包含以下部分:

  • 行为

spacechevron-right
  • 设置

spacechevron-right
  • 状态

spacechevron-right
  • 战利品

spacechevron-right

完整配置预览

这是使用模板系统的简化版本,包括需要配置的部分。

blocks:
  default:palm_log:
    behavior:
      type: strippable_block
      stripped: default:stripped_palm_log
    loot:
      template: loot_table:normal
      arguments:
        item: default:palm_log
    settings:
      template: block_settings:log
      overrides:
        item: default:palm_log
    states:
      template: states:log
      arguments:
        base_block: note_block
        texture_top_path: minecraft:block/custom/palm_log_top
        texture_side_path: minecraft:block/custom/palm_log
        model_vertical_path: minecraft:block/custom/palm_log
        model_horizontal_path: minecraft:block/custom/palm_log_horizontal
        vanilla_id:
          type: self_increase_int
          from: 0
          to: 2
        internal_id:
          type: self_increase_int
          from: 0
          to: 2

如果不使用模板会发生什么?那么这个方块的配置文件将如下所示:

如果您还没有学会如何使用模板系统,请务必马上学习

spacechevron-right