简体   繁体   English

Minecraft Mod与BuildCraft通讯

[英]Minecraft mod communicating with BuildCraft

I am making a industrial mod to minecraft, and I don't know if my machines could work with kinesis pipes (or any other power source). 我正在为我的世界制造工业模型,我不知道我的机器是否可以与运动管(或任何其他电源)配合使用。 My machines will be powered by mj. 我的机器将由mj供电。 But how can I link BuildCraft or any other mod to my mod, so I can use their power sources to my machines? 但是,如何将BuildCraft或任何其他Mod链接到我的Mod,以便可以将它们的电源用于我的机器?

To really link with any mod, you can just add it to your build path/dependencies and then do imports like any other class with your IDE. 要真正与任何mod链接,您只需将其添加到构建路径/依赖关系中,然后像使用IDE进行任何其他类一样进行导入。

It's also a good idea to look at its source code so you actually know what to do via decompiling it. 查看其源代码也是一个好主意,因此您实际上知道通过反编译该怎么做。 A good website for this is http://javadecompilers.com 一个不错的网站是http://javadecompilers.com

I found out how to do. 我知道该怎么办。 I used the OreDictionary to "link" items, and Thermal Expansion's API for my machines so they could consume power. 我使用OreDictionary来“链接”项目和我的机器的Thermal Expansion的API,以便它们可以消耗功率。 The @Optional.Interface annotation can also implement a interface, when the interface can be undefined (if the mod for that interface isn't installed). 当接口未定义时(如果未安装该接口的mod), @Optional.Interface注释也可以实现一个接口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM