2.6
This commit is contained in:
@@ -341,8 +341,9 @@ method in mod.server.component.itemCompServer.ItemCompServer
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| playerId | str | 玩家id |
|
||||
| slot | int | 容器槽位,含义见:[容器类型枚举](../../枚举值/PlayerUISlot.md) |
|
||||
| slot | int | 容器槽位。在isNeteaseUI为True时代表netease_ui_container中对应槽位;isNeteaseUI为False时含义见:[容器类型枚举](../../枚举值/PlayerUISlot.md) |
|
||||
| getUserData | bool | 是否获取userData,默认为False |
|
||||
| isNeteaseUI | bool | 默认为false,true时获取netease_ui_container的物品 |
|
||||
|
||||
- 返回值
|
||||
|
||||
@@ -352,7 +353,7 @@ method in mod.server.component.itemCompServer.ItemCompServer
|
||||
|
||||
- 备注
|
||||
- 合成容器包括工作台、铁砧、附魔台、织布机、砂轮、切石机、制图台、锻造台。
|
||||
- 所有合成容器槽位共享,不会根据不同容器重新排列
|
||||
- 所有合成容器槽位共享,不会根据不同容器重新排列。网易ui容器独立于原版合成容器,不同自定义容器中的netease_ui_container共享槽位。
|
||||
|
||||
- 示例
|
||||
|
||||
@@ -523,9 +524,10 @@ method in mod.server.component.itemCompServer.ItemCompServer
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| playerId | str | 玩家id |
|
||||
| slot | int | 容器槽位,含义见:[容器类型枚举](../../枚举值/PlayerUISlot.md) |
|
||||
| slot | int | 容器槽位。在isNeteaseUI为True时代表netease_ui_container中对应槽位;isNeteaseUI为False时含义见:[容器类型枚举](../../枚举值/PlayerUISlot.md) |
|
||||
| itemDict | dict | <a href="../../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典">物品信息字典</a>,没有物品则返回None |
|
||||
| needBack | bool | 是否将容器槽位的已有物品放回至玩家背包中,默认为True。设置为False时,则会直接用itemDict中的物品覆盖容器槽位的已有物品。 |
|
||||
| isNeteaseUI | bool | 默认为false,true时设置netease_ui_container的物品 |
|
||||
|
||||
- 返回值
|
||||
|
||||
@@ -537,6 +539,7 @@ method in mod.server.component.itemCompServer.ItemCompServer
|
||||
- 合成容器包括工作台、铁砧、附魔台、织布机、砂轮、切石机、制图台、锻造台。
|
||||
- 如果原槽位有物品,则会将原有物品放入玩家背包。如果玩家背包已满,则会在世界中玩家当前的位置生成对应的物品掉落物。
|
||||
- 注意,所有合成容器槽位共享,不会根据不同容器重新排列,没有打开容器或者打开了别的容器,该接口会返回False。
|
||||
- 如果设置的是netease_ui_container,即使没有打开容器也能设置成功,所有netease_ui_container槽位共享。
|
||||
- 下面情况视为清空特定槽位:itemDict为None,为{}, 或itemName为minecraft:air,或者count为0,同时needBack参数为False
|
||||
- 由于创造输出物品生成位比较特殊,该接口已经屏蔽了slot = 50的情况,即无法设置创造输出位的物品。
|
||||
|
||||
@@ -584,7 +587,7 @@ method in mod.server.component.itemCompServer.ItemCompServer
|
||||
- 备注
|
||||
- 此接口不支持末影箱。对应的末影箱接口请参考 [SpawnItemToEnderChest](#spawnitemtoenderchest)
|
||||
- 下面情况视为清空特定槽位:itemDict为空,为{}, 或itemName为minecraft:air,或者count为0
|
||||
- 目前该接口支持的容器类型方块:箱子、潜影盒、漏斗、木桶、投掷器、发射器
|
||||
- 目前该接口支持的容器类型方块:箱子、潜影盒、漏斗、木桶、投掷器、发射器、自定义容器
|
||||
|
||||
- 示例
|
||||
|
||||
|
||||
Reference in New Issue
Block a user