This commit is contained in:
boybook
2025-12-01 20:59:16 +08:00
parent 12738a142c
commit 760c2dd9ad
5535 changed files with 21070 additions and 2021 deletions

View File

@@ -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 | 默认为falsetrue时获取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 | 默认为falsetrue时设置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
- 目前该接口支持的容器类型方块:箱子、潜影盒、漏斗、木桶、投掷器、发射器
- 目前该接口支持的容器类型方块:箱子、潜影盒、漏斗、木桶、投掷器、发射器、自定义容器
- 示例