网易我的世界论坛

标题: 有没有接口可以获取熔炉物品 [打印本页]

作者: 耿耿星河    时间: 2021-12-28 21:31
标题: 有没有接口可以获取熔炉物品
有没有接口可以像读取容器一样,读取熔炉内的物品

作者: sevenstars    时间: 2021-12-29 18:44
只是读取的话,可以用GetBlockEntityData获取方块(包括自定义方块)的数据,数据只读不可写。
  1. import mod.server.extraServerApi as serverApi
  2. blockEntitycomp = serverApi.GetEngineCompFactory().CreateBlockInfo(levelId)
  3. blockEntityData = blockEntitycomp.GetBlockEntityData(0, (4, 3, 2))
复制代码

作者: 耿耿星河    时间: 2021-12-29 21:03
sevenstars 发表于 2021-12-29 18:44
只是读取的话,可以用GetBlockEntityData获取方块(包括自定义方块)的数据,数据只读不可写。

谢谢




欢迎光临 网易我的世界论坛 (http://mc.netease.com/) Powered by Discuz! X3.3