Files
netease-modsdk-wiki/docs/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/7-自定义含水方块.md
2025-03-18 14:46:12 +08:00

3.2 KiB
Raw Blame History

front, hard, time
front hard time
入门 分钟

自定义含水方块

概述

自定义含水方块支持在组件中配置自定义方块含水的相关功能并支持python监听事件、接口设置等。

netease:water_destory

可在netease:water_destory组件中设置是否无法摆放在水源和流水方块中如果设置为true会被流水摧毁。

类型 默认值 解释
value bool 必须设置,用于设置无法摆放在水源和流水方块中
  • 可以在方块的loottable中设置被水流摧毁后的掉落物

示例

{
    "format_version": "1.10.0",
    "minecraft:block": {
        "description": {
            "identifier": "customblocks:water_destroy_test_block",
            "category": "custom"
        },
        "components": {
            "netease:water_destory": {
              "value": true
            }
        }
    }
}

netease:water_only

可在netease:water_only组件中设置是否必须放置在水中。

类型 默认值 解释
value bool 必须设置,用于设置是否必须放在水中。

示例

{
    "format_version": "1.10.0",
    "minecraft:block": {
        "description": {
            "identifier": "customblocks:water_only_test_block",
            "category": "custom"
        },
        "components": {
            "netease:water_only": {
              "value": true
            }
        }
    }
}

netease:water_source

可在netease:water_source组件中设置是否在水源方块中表现为含水。

类型 默认值 解释
value bool 必须设置,是否在水源方块中表现为含水。

示例

{
    "format_version": "1.10.0",
    "minecraft:block": {
        "description": {
            "identifier": "customblocks:water_source_test_block",
            "category": "custom"
        },
        "components": {
            "netease:water_source": {
              "value": true
            },
            "netease:render_layer": {
              "value": "alpha"
          }
        }
    }
}

netease:water_flow_source

可在netease:water_flow_source组件中设置是否在水源和流水方块中表现为含水。

类型 默认值 解释
value bool 必须设置,是否在水源和流水方块中表现为含水。

示例

{
    "format_version": "1.10.0",
    "minecraft:block": {
        "description": {
            "identifier": "customblocks:water_flow_source_test_block",
            "category": "custom"
        },
        "components": {
            "netease:water_flow_source": {
              "value": true
            },
            "netease:render_layer": {
              "value": "alpha"
          }
        }
    }
}