MDT模組電能制作
我們知道,電力為MDT中比較重要的模塊,且電力分3個(gè)模塊,分別是傳輸、存儲(chǔ)、和發(fā)電
我會(huì)將每個(gè)類型的方塊翻譯一遍

傳輸
能量節(jié)點(diǎn)/PowerNode

powerNode = new PowerNode("power-node"){{
? ?requirements(Category.power, with(Items.copper, 1, Items.lead, 3));
? ?maxNodes = 10;
? ?laserRange = 6;
}};
json
{
? ?"type": "PowerNode",
? ?"name": "json-powerNode",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"copper/1","lead/3"
? ?],
? ?"maxNodes": 10,
? ?"laserRange": 6
}
屬性解釋
maxNodes:?最大連接數(shù)
laserRange:?連接范圍/格

存儲(chǔ)
電池/Battery

battery = new Battery("battery"){{
? ?requirements(Category.power, with(Items.copper, 5, Items.lead, 20));
? ?consumes.powerBuffered(4000f);
}};
json
{
? ?"type": "Battery",
? ?"name": "json-battery",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"copper/5","lead/20"
? ?],
? ?"consumes": {
? ? ? ?"powerBuffered": 4000.00
? ?}
}
屬性解釋
consumes.powerBuffered:?電池容量(不用 * 60)

發(fā)電(本章重點(diǎn))
火力發(fā)電機(jī) -> 燃燒發(fā)電機(jī)/BurnerGenerator

combustionGenerator = new BurnerGenerator("combustion-generator"){{
? ?requirements(Category.power, with(Items.copper, 25, Items.lead, 15));
? ?powerProduction = 1f;
? ?itemDuration = 120f;
? ?ambientSound = Sounds.smelter;
? ?ambientSoundVolume = 0.03f;
}};
json
{
? ?"type": "BurnerGenerator",
? ?"name": "json-combustionGenerator",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"copper/25","lead/15"
? ?],
? ?"powerProduction": 1.00,
? ?"itemDuration": 120.00
}
屬性解釋
powerProduction: 1.00(這里和consumes.powerBuffered不一樣,需 * 60)
itemDuration: 持續(xù)產(chǎn)能時(shí)間/幀

地?zé)岚l(fā)電機(jī) -> 地?zé)岚l(fā)電機(jī)/ThermalGenerator

thermalGenerator = new ThermalGenerator("thermal-generator"){{
? ?requirements(Category.power, with(Items.copper, 40, Items.graphite, 35, Items.lead, 50, Items.silicon, 35, Items.metaglass, 40));
? ?powerProduction = 1.8f;
? ?generateEffect = Fx.redgeneratespark;
? ?effectChance = 0.011f;
? ?size = 2;
? ?floating = true;
? ?ambientSound = Sounds.hum;
? ?ambientSoundVolume = 0.06f;
}};
json
{
? ?"type": "ThermalGenerator",
? ?"name": "json-thermalGenerator",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"copper/40","graphite/35","lead/50","silicon/35","metaglass/40"
? ?],
? ?"powerProduction": 1.80,
? ?"size": 2,
? ?"attribute": "heat"
}
屬性解釋
attribute: 方塊所占底部格子給予的屬性(見(jiàn)后)

溫差發(fā)電機(jī) -> 單類發(fā)電機(jī)(?)/SingleTypeGenerator

differentialGenerator = new SingleTypeGenerator("differential-generator"){{
? ?requirements(Category.power, with(Items.copper, 70, Items.titanium, 50, Items.lead, 100, Items.silicon, 65, Items.metaglass, 50));
? ?powerProduction = 18f;
? ?itemDuration = 220f;
? ?hasLiquids = true;
? ?hasItems = true;
? ?size = 3;
? ?ambientSound = Sounds.steam;
? ?ambientSoundVolume = 0.03f;
? ?consumes.item(Items.pyratite).optional(true, false);
? ?consumes.liquid(Liquids.cryofluid, 0.1f);
}};
/** 如果為true, 這個(gè)消耗者將不會(huì)影響這個(gè)消耗者/
/** If true, this consumer will not influence consumer validity. */
public boolean optional;
json
{
? ?"type": "SingleTypeGenerator",
? ?"name": "json-differentialGenerator",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"copper/70","titanium/50","lead/100","silicon/65","metaglass/50"
? ?],
? ?"powerProduction": 18.00,
? ?"itemDuration": 220.00,
? ?"hasLiquids": true,
? ?"hasItems": true,
? ?"size": 3,
? ?"consumes": {
? ? ? ?"items": {
? ? ? ? ? ?"items": ["pyratite/1"],
? ? ? ? ? ?"optional": true,
? ? ? ? ? ?"boost": false
? ? ? ?},
? ? ? ?"liquid": "cryofluid/0.1"
? ?}
}
屬性解釋
hasLiquids: 擁有液體(一般為初始化,不用填寫(xiě))
hasItems: 擁有物品(同上)
consumes.items: 物品消耗器
consumes.items.items: 消耗的物品
consumes.liquid: 液體消耗器
consumes.*.optional: 作為可選輸入(這里不解,將原定義&注釋貼在上)
consumes.*.boost: 作為增益輸入

RTG發(fā)電機(jī) -> 衰變發(fā)電機(jī)/DecayGenerator

rtgGenerator = new DecayGenerator("rtg-generator"){{
? ?requirements(Category.power, with(Items.lead, 100, Items.silicon, 75, Items.phaseFabric, 25, Items.plastanium, 75, Items.thorium, 50));
? ?size = 2;
? ?powerProduction = 4.5f;
? ?itemDuration = 60 * 14f;
}};
json
{
? ?"type": "DecayGenerator",
? ?"name": "rtgGenerator",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"lead/100","silicon/75","phase-fabric/25","plastanium/75","thorium/50"
? ?],
? ?"size": 2,
? ?"powerProduction": 4.50,
? ?"itemDuration": 840.00
}
無(wú)可講內(nèi)容

太陽(yáng)能板 -> 太陽(yáng)能發(fā)電/SolarGenerator

solarPanel = new SolarGenerator("solar-panel"){{
? ?requirements(Category.power, with(Items.lead, 10, Items.silicon, 15));
? ?powerProduction = 0.1f;
}};
json
{
? ?"type": "SolarGenerator",
? ?"name": "json-solarPanel",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"lead/10","silicon/15"
? ?],
? ?"powerProduction": 0.1
}
無(wú)可講內(nèi)容

釷反應(yīng)堆 -> 核能發(fā)電機(jī)/NuclearReactor

thoriumReactor = new NuclearReactor("thorium-reactor"){{
? ?requirements(Category.power, with(Items.lead, 300, Items.silicon, 200, Items.graphite, 150, Items.thorium, 150, Items.metaglass, 50));
? ?ambientSound = Sounds.hum;
? ?ambientSoundVolume = 0.24f;
? ?size = 3;
? ?health = 700;
? ?itemDuration = 360f;
? ?powerProduction = 15f;
? ?consumes.item(Items.thorium);
? ?heating = 0.02f;
? ?consumes.liquid(Liquids.cryofluid, heating / coolantPower).update(false);
}};
json
{
? ?"type": "NuclearReactor",
? ?"name": "json-thoriumReactor",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"lead/300","silicon/200","graphite/150","thorium/150","metaglass/50"
? ?],
? ?"size": 3,
? ?"health": 700,
? ?"itemDuration": 360.00,
? ?"powerProduction": 15.00,
? ?"heating": 0.02,
? ?"consumes": {
? ? ? ?"item": "thorium",
? ? ? ?"liquid": {
? ? ? ? ? ?"liquid": "cryofluid",
? ? ? ? ? ?"amount": 0.04,
? ? ? ? ? ?"update": false
? ? ? ?}
? ?}
}
屬性解釋
heating: 每幀加熱(heating * 物品數(shù)量(fullness??))
consumes.liquid.liquid: 消耗的液體
consumes.liquid.amount: 使用液體容量(* 60)
consumes.*.update: ?

沖擊反應(yīng)堆 -> 沖擊發(fā)電機(jī)/ImpactReactor

impactReactor = new ImpactReactor("impact-reactor"){{
? ?requirements(Category.power, with(Items.lead, 500, Items.silicon, 300, Items.graphite, 400, Items.thorium, 100, Items.surgeAlloy, 250, Items.metaglass, 250));
? ?size = 4;
? ?health = 900;
? ?powerProduction = 130f;
? ?itemDuration = 140f;
? ?ambientSound = Sounds.pulse;
? ?ambientSoundVolume = 0.07f;
? ?consumes.power(25f);
? ?consumes.item(Items.blastCompound);
? ?consumes.liquid(Liquids.cryofluid, 0.25f);
}};
json
{
? ?"type": "ImpactReactor",
? ?"name": "json-impactReator",
? ?"category": "power",
? ?"requirements": [
? ? ? ?"lead/500","silicon/300","graphite/400","thorium/100","surge-alloy/250",
? ? ? ?"metaglass/250"
? ?],
? ?"size": 4,
? ?"health": 900,
? ?"powerProduction": 130.00,
? ?"itemDuration": 140.00,
? ?"consumes": {
? ? ? ?"power": 25.00,
? ? ? ?"item": "blast-compound",
? ? ? ?"liquid": "cryofluid/0.25"
? ?}
}
屬性解釋
consumes.power: 消耗能量(* 60)

屬性分類
全部方塊可用
hasItems: boolean
hasLiquids: boolean
consumes: Consumers()

PowerNode
maxNodes: int
LaserRange: float

Battery
暫無(wú)介紹,只用寫(xiě)consumes.powerBuffered

PowerGenerator
powerProduction: float

ItemLiquidGenerator
拓展 PowerGenerator
itemDuration: float

BurnerGenerator
拓展 ItemLiquidGenerator

ThermalGenerator
拓展 PowerGenerator
attribute: Attribute

SingleTypeGenerator
拓展 ItemLiquidGenerator

DecayGenerator
拓展 ItemLiquidGenerator

SolarGenerator
拓展 PowerGenerator

NuclearGenerator
拓展 PowerGenerator
heating: float
explosionRadius: float
爆炸半徑/格
explosionDamage: float
爆炸傷害

ImpactGenerator
拓展 PowerGenerator

其他
注意事項(xiàng)
consumes.item 和 consumes.items.items 不同;
前者是接物品名(不需要數(shù)量,為1);后者為ItemStack[] (并且可以寫(xiě)optional/boost/...)
consumes.liquid 和 consumes.liquid.liquid 不同;
前者是接"液體/數(shù)量";后者則需要 liquid 和 amount (并且可以寫(xiě)optional/boost/update)
consumes.power 和 consumes.powerBuffered 不能同時(shí)出現(xiàn)

Attribute
heat: 地?zé)?大硅,地?zé)?
spores:?孢子苔蘚地(孢子簇???)
water: 水源(各種泵)
oil: 黑沙(石油鉆井)
light: 光源(?)

資源
https://1565619256.lanzoui.com/b016oabjc
密碼:4pji