2.6
This commit is contained in:
@@ -215,7 +215,7 @@ sidebarDepth: 1
|
||||
| fullName | str | 方块的identifier,包含命名空间及名称 |
|
||||
| auxValue | int | 方块附加值 |
|
||||
| brightness | int | 方块亮度 |
|
||||
| dimensionId | int | 实体维度 |
|
||||
| dimensionId | int | 方块所在维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
@@ -274,6 +274,7 @@ method in mod.server.component.blockInfoCompServer.BlockInfoComponentServer
|
||||
|
||||
- 备注
|
||||
- 对于一些特殊的方块,注意要使用对应的方块Id参数(如砖块楼梯,监听的方块Id应该为minecraft:brick_block)
|
||||
- 如果用骨粉改变了发光浆果,也会触发一次事件,它实际是从cave_vines变成了cave_vines_head_with_berries
|
||||
|
||||
- 示例
|
||||
|
||||
@@ -416,6 +417,9 @@ comp.ListenOnBlockRemoveEvent("minecraft:wheat", True)
|
||||
|
||||
无
|
||||
|
||||
- 备注
|
||||
- 如果拦截与方块交互的逻辑,则不会给服务端发送对应的网络包。
|
||||
|
||||
在零件中直接声明一个同名函数,即可完成监听,详情参考<a href="../../../mcguide/20-玩法开发/14-预设玩法编程/12-深入理解零件/0-零件开发.html#零件事件">零件事件</a>
|
||||
|
||||
|
||||
@@ -1699,6 +1703,7 @@ comp.UnRegisterOnStandOn("minecraft:redstone_ore")
|
||||
无
|
||||
|
||||
- 备注
|
||||
- 客户端对应事件ClientBlockUseEvent如果开启拦截开关,则服务端也不会收到对应事件,即ServerBlockUseEvent不会触发。
|
||||
- 当对原生方块进行使用时,如堆肥桶等类似有 使用 功能的方块使用物品时,会触发该事件,而ServerItemUseOnEvent则不会被触发。对应的客户端事件同理。
|
||||
- 部分工具对方块的使用效果,如锹犁地,不一定能通过该事件cancel,还需同时使用ItemUseOnServerEvent进行取消
|
||||
目前已知有:
|
||||
|
||||
Reference in New Issue
Block a user