此模组需要 Cyclops Core 库和 Integrated Dynamics!
欢迎在 Cyclops Discord 服务器 的 #integratedmods 频道与我们交流!
此模组允许你通过 REST API 从你的 Integrated Dynamics 网络中读取数据并向其写入数据。
这使得可以通过 Web 协议读取网络和世界的状态,并通过向世界中的 HTTP Proxy 方块发送 POST 请求与其进行交互。
以下是使用此模组(以及部分外部编程)可以实现的一些示例:
- 根据 Minecraft 世界中的昼夜时间控制家中灯光。
- 收到电子邮件时在 Minecraft 中播放音效。
- 在你的网站上显示主世界中所有在线玩家的位置。
- 当你获得新的 Twitch 或 Mixer 订阅者时,打开怪物农场的一扇门。
警告:如果你从未听说过“API”或“REST”,那么这可能不适合你。此模组主要面向希望使用可通过 HTTP 通信的外部系统进行高级自动化的高级用户。
此模组将你的网络以 JSON 格式暴露在一个可配置的端口上。以下是一个单一网络元素输出的代码片段:
{
"@context": "https://raw.githubusercontent.com/CyclopsMC/IntegratedREST/master-1.12/src/main/resources/context.jsonld",
"@id": "http://localhost:3000/",
"networkElements": [
{
"@id": "http://localhost:3000/networkElement/integrateddynamics/part/4",
"position": {
"world": 0,
"x": -26,
"y": 57,
"z": -249,
"side": "ir:east"
},
"block": "http://localhost:3000/registry/block/integrateddynamics/cable",
"@type": [
"NetworkElement",
"http://localhost:3000/registry/part/display_panel"
],
"channel": 0,
"priority": 0,
"updateInterval": 1,
"network": "http://localhost:3000/network/1619976862",
"valueType": "http://localhost:3000/registry/value/valuetype/valuetypes/integrateddynamics/string/name",
"value": "I was updated\\nvia HTTP!",
"target": {
"world": 0,
"x": -25,
"y": 57,
"z": -249,
"side": "ir:west"
},
"loaded": true
},
...
]
}
事实上,这个 JSON 是有效的 JSON-LD(链接数据 JSON),这使得可以在 RDF 工具中使用此输出。
除了网络和其元素的狀態外,此模组还暴露了大多数 Forge 注册表的状态。
所有可用信息(可通过 API 索引页面访问):
- 网络 (Networks)
- 网络元素 (Network elements)
- 部件类型 (Part types)
- 方面类型 (Aspect types)
- 值类型 (Value types)
- 物品 (Items)
- 方块 (Blocks)
- 流体 (Fluids)
- 模组 (Mods)
此模组为游戏添加了一个可合成的方块:HTTP Proxy。

像所有网络元素一样,此方块可通过 HTTP 访问。例如,ID 为 7 的 HTTP Proxy 可通过 访问。
此方块具有内部值状态,可通过 HTTP POST 请求 更新(更多信息请参阅维基)。
注意:如果你在服务器上运行此模组,你可能希望通过禁用客户端配置文件中的选项来禁用客户端启动 HTTP 服务器。
此模组收集匿名启动数据,这可以在配置文件中禁用,并遵循 Minecraft 的窥探者设置。
租用 Bisect Hosting 服务器时使用推荐码 cyclops 支持我们,可享受25% 折扣!
如果你喜欢此模组,请在 Patreon 上支持我!
This requires the Cyclops Core library and Integrated Dynamics!
Come talk to us in #integratedmods on the Cyclops Discord server!
This mod allows you to read from and write to your Integrated Dynamics networks via a REST API.
This makes it possible to read the status of your networks and worlds via Web-protocols, and interact with them by POST-ing values to HTTP Proxy blocks in your world.
Some examples on what is possible with this mod (and some external coding):
- Control the lights of your home based on the day time in your Minecraft world.
- Play a sound in Minecraft when you receive an email.
- Show the positions of all online players in the overworld on your website.
- Open a door from your mob farm when you gain a new Twitch or Mixer subscriber.
WARNING: If you have never heard about 'API' or 'REST' before, then this probably is nothing for you. This mod is mainly aimed at advanced users wanting to do very advanced automation using external system that can communicate over HTTP.
This mod exposes your networks as JSON on a configurable port. Here is a snippet of a single network element output:
{
"@context": "https://raw.githubusercontent.com/CyclopsMC/IntegratedREST/master-1.12/src/main/resources/context.jsonld",
"@id": "http://localhost:3000/",
"networkElements": [
{
"@id": "http://localhost:3000/networkElement/integrateddynamics/part/4",
"position": {
"world": 0,
"x": -26,
"y": 57,
"z": -249,
"side": "ir:east"
},
"block": "http://localhost:3000/registry/block/integrateddynamics/cable",
"@type": [
"NetworkElement",
"http://localhost:3000/registry/part/display_panel"
],
"channel": 0,
"priority": 0,
"updateInterval": 1,
"network": "http://localhost:3000/network/1619976862",
"valueType": "http://localhost:3000/registry/value/valuetype/valuetypes/integrateddynamics/string/name",
"value": "I was updated\\nvia HTTP!",
"target": {
"world": 0,
"x": -25,
"y": 57,
"z": -249,
"side": "ir:west"
},
"loaded": true
},
...
]
}
In fact, this JSON is valid JSON-LD (Linked Data JSON), which makes it possible to use this output in RDF tools.
Next to the state of your network and its elements, this mod also exposes the state of most Forge registries.
All available information (accessible via the API index page):
- Networks
- Network elements
- Part types
- Aspect types
- Value types
- Items
- Blocks
- Fluids
- Mods
This mod adds a single craftable block to the game, the HTTP Proxy.

Like all network elements, this block is accessible via HTTP. For example, an HTTP Proxy with ID 7 will be accessible via
This block has an internal value state that can be updated via HTTP POST requests (more information on the wiki).
Note: If you are using this mod on a server, you'll probably want to disable starting up the HTTP server client-side, by disabling it via the config file of the players.
This mod collects anonymized startup data, this can be disabled in the config file and adheres to Minecraft's snooper settings.
Support us via the referral code cyclops when renting a Bisect Hosting server, and get 25% off!
If you like this mod, consider supporting me on Patreon!
评论 0
登录后参与评分
还没有评论,来抢沙发吧