Skip to content

Commit d416be1

Browse files
Update docs for creating custom coils. Fix tooltip on coil energy usage. (#3739)
1 parent 410b643 commit d416be1

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

docs/content/Modpacks/Other-Topics/Custom-Coils.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ title: Custom Coils
55

66
## Coil Creation
77

8+
Certain multiblock machines such as the Electric Blast Furnace, Alloy Blast Smelter, Multi-Smelter, Pyrolyze Oven, and
9+
Cracker use Heating Coils as part of their structure. The following code is used to define a custom Heating Coil block:
10+
811
```js
912
StartupEvents.registry('block', event => {
1013
event.create('infinity_coil_block', 'gtceu:coil')
@@ -20,4 +23,9 @@ StartupEvents.registry('block', event => {
2023
})
2124
```
2225

23-
1. The Energy Discount must be at least 1.
26+
`temperature`, `level`, `energyDiscount`, and `tier` all must be integers.
27+
* `temperature`: Used by Electric Blast Furnace recipes.
28+
* `level`: Used to determine Multi-Smelter Parallels, at 32*level.
29+
* `energyDiscount`: Used to determine Multi-Smelter power usage. EU/t = (4 * Parallels) / (8 * Discount), before overclocks.
30+
* `tier`: Used for Speed Bonus in the Pyrolyze Oven, and Energy Discount in the Cracking Unit. +50% Speed,
31+
-10% Energy per tier. (Tiers above 10 will not cause the Cracker to consume negative energy.)

src/main/java/com/gregtechceu/gtceu/common/block/CoilBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void appendHoverText(ItemStack stack, @Nullable BlockGetter level, List<C
4343
tooltip.add(
4444
Component.translatable("block.gtceu.wire_coil.tooltip_parallel_smelter", coilType.getLevel() * 32));
4545
tooltip.add(Component.translatable("block.gtceu.wire_coil.tooltip_energy_smelter",
46-
Math.max(1, 16 / coilType.getEnergyDiscount())));
46+
Math.max(1, (4 * coilType.getLevel() * 32 / (8 * coilType.getEnergyDiscount())))));
4747
tooltip.add(Component.translatable("block.gtceu.wire_coil.tooltip_pyro"));
4848
tooltip.add(Component.translatable("block.gtceu.wire_coil.tooltip_speed_pyro",
4949
coilTier == 0 ? 75 : 50 * (coilTier + 1)));

src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeModifiers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public class GTRecipeModifiers {
228228
* <li>Calculates the maximum parallel as {@code 32 × coilLevel}</li>
229229
* <li>Finds the actual parallel amount that the smelter can do</li>
230230
* <li>Sets the recipe duration to {@code 128 × 2 × parallels / maxParallels}</li>
231-
* <li>Sets the recipe EUt to {@code parallels / (8 × coilDiscount)}</li>
231+
* <li>Sets the recipe EUt to {@code 4 × (parallels / (8 × coilDiscount))}</li>
232232
* <li>Applies {@link OverclockingLogic#NON_PERFECT_OVERCLOCK} to this modified recipe</li>
233233
* <li>Multiplies the recipe contents by the parallel amount</li>
234234
* </ol>

0 commit comments

Comments
 (0)