|
|
TESLA (Tesla)Github |相关wiki |源站链接支持: forgeTesla 是一个用于跨模块通信的能源 API。它允许来自各种模组的物品、方块和实体相互作用,通过 Tesla 能源网络进行交互。
----------------------------------------
Tesla
Tesla 是一个用于跨模块通信的能源 API。它允许来自各种模组的物品、方块和实体相互作用,通过 Tesla 能源网络进行交互。
警告:Alpha 和 beta 版本适用于模组作者和测试人员。支持 Tesla 的模组应该仅针对完整版本!使用 alpha 构建可能会使需要它的模组崩溃!
----------------------------------------
*入门指南*
使用 Tesla API 的最佳方式是通过 的 Capability 系统。 这个概念非常简单,capabilities 是处理某种类型的 Tesla 相关逻辑的接口实现。这些 capabilities 可以附加到支持的物体(Tile Entity、ItemStack 和实体)上。当一个 capability 被附加时,这个物体将能够访问提供的 tesla 逻辑,并且它将对其他支持 Tesla 的物体可见。您可以在https://github.com/Darkhax-Minecraft/Tesla/blob/master/src/main/java/net/darkhax/tesla/api/implementation/BaseTeslaContainer.java]这里看到一个基本的 capability 实现,并在https://github.com/Darkhax-Minecraft/Tesla/blob/master/src/test/java/net/darkhax/teslatest/tileentity/TileEntityAnalyzer.java]这里找到一个 Tile Entity 示例,还有一个物品示例在 https://github.com/Darkhax-Minecraft/Tesla/blob/master/src/test/java/net/darkhax/teslatest/item/ItemBattery.java]这里。
常见问题
*人们可以去哪里讨论 Tesla API?*
有一个公开的 Discord 服务器可以在 https://discord.gg/nN68J34]这里 找到。
*Tesla 与其他能源 API 有何不同?*
Tesla API 的功能与其他能源 API 非常相似,不过在设计上做出了几个选择,使 API 更加灵活。其中的一个选择是使用 Forge 的 capability 系统,这允许支持几乎任何事物都可以添加 Tesla 支持。使用这个系统,模组可以在不使用任何“脏技巧”的情况下,为一个普通的熔炉添加 Tesla 支持。另一个决定是使用长整型代替整型。这种改变允许模组更容易地处理更大的能源数字
*为什么要制作这个 API?*
最初 API 是作为一个有趣的副业项目制作的,但却得到了其他开发者意外的关注。它并不是为了取代其他能源 API 或类似的事情而创建的。
*Tesla 有哪些标准?*
该 API 不强制执行任何标准,但鼓励模组作者遵循一些标准。其中包括:一个 Tesla 应该等于 1 RF,tile entities 不应直接实现 capability 接口,以及边缘逻辑应该通过 capability 方法处理。
*是否应该将 Tesla API 与其他模组捆绑?*
尽管
来自Modrinth所有游戏版本1.12.21.121.111.11.21.10.21.9.41.9.31.101.10.11.9所有类型forgeTesla-1.12.2-1.0.63Tesla-1.12.2-1.0.63.jar下载1.0.63#Release<ul><li>Added Polish translations, thanks to Kaperios. - Tyler Hancock</li></ul>展开版本: 1.0.63支持游戏: 1.12.2类型:ForgeRelease下载次数: 2,668Tesla-1.12.2-1.0.62Tesla-1.12.2-1.0.62.jar下载1.0.62#Release展开版本: 1.0.62支持游戏: 1.12.2类型:ForgeRelease下载次数: 89Tesla-1.12-1.0.61Tesla-1.12-1.0.61.jar下载1.0.61#Alpha<ul><li>Updated to latest forge.</li></ul>展开版本: 1.0.61支持游戏: 1.12类型:ForgeAlpha下载次数: 89Tesla-1.12-1.0.60Tesla-1.12-1.0.60.jar下载1.0.60#Release<ul><li>Updated MCP, Forge and CurseGradle.</li></ul>展开版本: 1.0.60支持游戏: 1.12类型:ForgeRelease下载次数: 80Tesla-1.12-2.0.55Tesla-1.12-2.0.55.jar下载2.0.55#Alpha<ul><li>Fixed wrong curseforge project id.</li></ul>展开版本: 2.0.55支持游戏: 1.12类型:ForgeAlpha下载次数: 67Tesla-1.11-1.3.0.52Tesla-1.11-1.3.0.52.jar下载1.3.0.52#Release<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.3.0.52支持游戏: 1.11, 1.11.2类型:ForgeRelease下载次数: 115Tesla-1.11-1.3.0.51Tesla-1.11-1.3.0.51.jar下载1.3.0.51#Release<p>Ported to 1.11</p>展开版本: 1.3.0.51支持游戏: 1.11类型:ForgeRelease下载次数: 58Tesla-1.10.2-1.2.1.50Tesla-1.10.2-1.2.1.50.jar下载1.2.1.50#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.50支持游戏: 1.10.2类型:ForgeAlpha下载次数: 198Tesla-1.10.2-1.2.1.49Tesla-1.10.2-1.2.1.49.jar下载1.2.1.49#Release<ul><li>Fixed a bug that affected some mods which use the packaged utility suit</li></ul><p>This update does not require mods which depend on Tesla to update. </p>展开版本: 1.2.1.49支持游戏: 1.9.4, 1.10.2类型:ForgeRelease下载次数: 117Tesla-1.10.2-1.2.1.48Tesla-1.10.2-1.2.1.48.jar下载1.2.1.48#Release<ul><li>Fixed translation issues</li></ul>展开版本: 1.2.1.48支持游戏: 1.9.4, 1.10.2类型:ForgeRelease下载次数: 63Tesla-1.10.2-1.2.1.47Tesla-1.10.2-1.2.1.47.jar下载1.2.1.47#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.47支持游戏: 1.10.2类型:ForgeAlpha下载次数: 62Tesla-1.10.2-1.2.1.46Tesla-1.10.2-1.2.1.46.jar下载1.2.1.46#Release<ul><li>Add new tooltip helper code</li><li>Add new capability checking code.</li></ul>展开版本: 1.2.1.46支持游戏: 1.10.2类型:ForgeRelease下载次数: 70Tesla-1.10.2-1.2.1.45Tesla-1.10.2-1.2.1.45.jar下载1.2.1.45#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.45支持游戏: 1.10.2类型:ForgeAlpha下载次数: 63Tesla-1.10.2-1.2.1.44Tesla-1.10.2-1.2.1.44.jar下载1.2.1.44#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.44支持游戏: 1.10.2类型:ForgeAlpha下载次数: 71Tesla-1.10.2-1.2.1.43Tesla-1.10.2-1.2.1.43.jar下载1.2.1.43#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.43支持游戏: 1.10.2类型:ForgeAlpha下载次数: 59Tesla-1.10.2-1.2.1.42Tesla-1.10.2-1.2.1.42.jar下载1.2.1.42#Release<p>This is a major new release. It may break earlier versions of mods that support Tesla. Please be patient as the other tesla mod devs update to this version. </p><p>- The mod ID has switched from Tesla to tesla. This is to comply with the new mod ID standars being enforced in 1.11<br>- There is now built in code to help render power bars to the screen.<br>- A duplicate tesla consumer capability field was removed. It was called TESLA_CONSUMER rather than CAPABILITY_CONSUMER<br>- Deprecated implementations of BaseTeslaContainer, InfiniteTeslaConsumer and InfiniteTeslaProducer were removed.<br>- Eleven new helper methods were added to the TeslaUtils. These can help make your code cleaner and ensure good practices are being followed.<br>- The BaseTeslaContainer implementation now uses getInputRate, getOutputRate and getCapacity to work in a dynamic way.<br>- It may be a good idea to add the latest version of Tesla to your dependency list, to prevent error reports with older versions.</p>展开版本: 1.2.1.42支持游戏: 1.9.3, 1.9.4, 1.10, 1.10.1, 1.10.2类型:ForgeRelease下载次数: 70Tesla-1.10.2-1.2.1.41Tesla-1.10.2-1.2.1.41.jar下载1.2.1.41#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.41支持游戏: 1.10.2类型:ForgeAlpha下载次数: 71Tesla-1.10.2-1.2.1.40Tesla-1.10.2-1.2.1.40.jar下载1.2.1.40#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.1.40支持游戏: 1.10.2类型:ForgeAlpha下载次数: 63Tesla-1.10.2-1.2.0.39Tesla-1.10.2-1.2.0.39.jar下载1.2.0.39#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.0.39支持游戏: 1.10.2类型:ForgeAlpha下载次数: 63Tesla-1.10.2-1.2.0.38Tesla-1.10.2-1.2.0.38.jar下载1.2.0.38#Release<ul><li>Official support for 1.9.4 through 1.10.2</li><li>I/O rates of power now use dynamic methods</li><li>Capacity now use dynamic methods</li><li>Utility for rendering power bars on screen.</li></ul>展开版本: 1.2.0.38支持游戏: 1.9.4, 1.10, 1.10.1, 1.10.2类型:ForgeRelease下载次数: 78Tesla-1.10.2-1.2.0.37Tesla-1.10.2-1.2.0.37.jar下载1.2.0.37#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.0.37支持游戏: 1.10.2类型:ForgeAlpha下载次数: 37Tesla-1.10-1.2.0.36Tesla-1.10-1.2.0.36.jar下载1.2.0.36#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.0.36支持游戏: 1.10类型:ForgeAlpha下载次数: 28Tesla-1.10-1.2.0.35Tesla-1.10-1.2.0.35.jar下载1.2.0.35#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.0.35支持游戏: 1.10类型:ForgeAlpha下载次数: 24Tesla-1.10-1.2.0.34Tesla-1.10-1.2.0.34.jar下载1.2.0.34#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.2.0.34支持游戏: 1.10类型:ForgeAlpha下载次数: 28Tesla-1.9.4-1.1.0.24Tesla-1.9.4-1.1.0.24.jar下载1.1.0.24#Release<ul><li>Updated to compile against latest 1.9.4</li><li>Updated example test mod for 1.9.4</li><li>Removed the older deprecated API</li></ul>展开版本: 1.1.0.24支持游戏: 1.9.4, 1.10类型:ForgeRelease下载次数: 27Tesla-1.9-1.0.2.23Tesla-1.9-1.0.2.23.jar下载1.0.2.23#Release<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.2.23支持游戏: 1.9类型:ForgeRelease下载次数: 27Tesla-1.9-1.0.2.22Tesla-1.9-1.0.2.22.jar下载1.0.2.22#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.2.22支持游戏: 1.9类型:ForgeAlpha下载次数: 22Tesla-1.9-1.0.1.21Tesla-1.9-1.0.1.21.jar下载1.0.1.21#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.21支持游戏: 1.9类型:ForgeAlpha下载次数: 24Tesla-1.9-1.0.1.20Tesla-1.9-1.0.1.20.jar下载1.0.1.20#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.20支持游戏: 1.9类型:ForgeAlpha下载次数: 19Tesla-1.9-1.0.1.19Tesla-1.9-1.0.1.19.jar下载1.0.1.19#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.19支持游戏: 1.9类型:ForgeAlpha下载次数: 24Tesla-1.9-1.0.1.18Tesla-1.9-1.0.1.18.jar下载1.0.1.18#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.18支持游戏: 1.9类型:ForgeAlpha下载次数: 17Tesla-1.9-1.0.1.17Tesla-1.9-1.0.1.17.jar下载1.0.1.17#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.17支持游戏: 1.9类型:ForgeAlpha下载次数: 21Tesla-1.9-1.0.1.16Tesla-1.9-1.0.1.16.jar下载1.0.1.16#Release<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.16支持游戏: 1.9类型:ForgeRelease下载次数: 24Tesla-1.9-1.0.1.15Tesla-1.9-1.0.1.15.jar下载1.0.1.15#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.15支持游戏: 1.9类型:ForgeAlpha下载次数: 31Tesla-1.9-1.0.1.14Tesla-1.9-1.0.1.14.jar下载1.0.1.14#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.14支持游戏: 1.9类型:ForgeAlpha下载次数: 23Tesla-1.9-1.0.1.13Tesla-1.9-1.0.1.13.jar下载1.0.1.13#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.13支持游戏: 1.9类型:ForgeAlpha下载次数: 27Tesla-1.9-1.0.1.12Tesla-1.9-1.0.1.12.jar下载1.0.1.12#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.12支持游戏: 1.9类型:ForgeAlpha下载次数: 25Tesla-1.9-1.0.1.11Tesla-1.9-1.0.1.11.jar下载1.0.1.11#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.11支持游戏: 1.9类型:ForgeAlpha下载次数: 25Tesla-1.9-1.0.1.10Tesla-1.9-1.0.1.10.jar下载1.0.1.10#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.10支持游戏: 1.9类型:ForgeAlpha下载次数: 24Tesla-1.9-1.0.1.9Tesla-1.9-1.0.1.9.jar下载1.0.1.9#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.1.9支持游戏: 1.9类型:ForgeAlpha下载次数: 22Tesla-1.9-1.0.0.8Tesla-1.9-1.0.0.8.jar下载1.0.0.8#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.8支持游戏: 1.9类型:ForgeAlpha下载次数: 36Tesla-1.9-1.0.0.7Tesla-1.9-1.0.0.7.jar下载1.0.0.7#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.7支持游戏: 1.9类型:ForgeAlpha下载次数: 20Tesla-1.9-1.0.0.6Tesla-1.9-1.0.0.6.jar下载1.0.0.6#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.6支持游戏: 1.9类型:ForgeAlpha下载次数: 24Tesla-1.9-1.0.0.5Tesla-1.9-1.0.0.5.jar下载1.0.0.5#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.5支持游戏: 1.9类型:ForgeAlpha下载次数: 31Tesla-1.9-1.0.0.4Tesla-1.9-1.0.0.4.jar下载1.0.0.4#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.4支持游戏: 1.9类型:ForgeAlpha下载次数: 27Tesla-1.9-1.0.0.3Tesla-1.9-1.0.0.3.jar下载1.0.0.3#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.3支持游戏: 1.9类型:ForgeAlpha下载次数: 29Tesla-1.9-1.0.0.2Tesla-1.9-1.0.0.2.jar下载1.0.0.2#Alpha<p>All changes can be found here: <a href=\"https://github.com/Darkhax-Minecraft/TESLA/commits/master\" rel=\"nofollow\" target=\"_blank\">https://github.com/Darkhax-Minecraft/TESLA/commits/master</a></p>展开版本: 1.0.0.2支持游戏: 1.9类型:ForgeAlpha下载次数: 26全部版本
markdown_parsed
文章类型:收录
layui.use([\'form\'], function(){
var form = layui.form;
});
TESLA |
楼主
2025-8-10 19:34:17
回复(0)
收起回复
|