Closed P0lar1z2 closed 1 month ago
https://github.com/reobf/Programmable-Hatches-Mod/releases/tag/v0.0.18p7-beta
这个fill是水箱控制器的API https://ocdoc.cil.li/component:tank_controller 是往物品栏的流体容器灌流体 比如 单元->水单元,所以不需要指定方向
你说的fill是机器人API https://ocdoc.cil.li/component:robot 这个确实需要方向参数,但是重名被覆盖了
新版本加回 机器人API 版本的fill 但重命名为 fillRobot drainRobot
此外你可以 lua components.iohub.fill (注意不要加括号对)然后回车,显示 function([amount:number]):boolean -- Transfers fluid from the selected tank to a tank in the selected inventory slot. 就能看到这个方法的注释用法(只有英文版) 其它api都能这么看注释&用法,此外按tab键也能自动遍历所有可用的方法 不一定要去wiki看
感谢 我研究下
或许是需要拆掉重装方块来刷新API, OC貌似会将这些函数存盘 再开启时读取而不是重新生成
是的 我拆了重装重启就好了
https://github.com/reobf/Programmable-Hatches-Mod/blob/8c47656d112a4c2c2c634b6dcc2bc58554d09294/src/main/java/reobf/proghatches/block/TileIOHub.java#L681
没仔细测试 但是确实需要一个参数用来指定方向