Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Updates to alternator.md (#30)
Browse files Browse the repository at this point in the history
* Update Modifying-Existing-Materials.md

Added how to generate ores from existing materials. Fixed code-blocks. Added comments in the adding flags to existing materials section. And added a line of code to show that the element property modification works for other materials

* Update Modifying-Existing-Materials.md

Fixed broken comment and code block

* Update Alternator.md

Changes to the Alternator code to make it work right out of the box in current GT versions, and cleaned up markdown formatting errors
  • Loading branch information
Cattman423 authored Jul 28, 2024
1 parent b500625 commit d44c185
Showing 1 changed file with 42 additions and 44 deletions.
86 changes: 42 additions & 44 deletions docs/Modpacks/Examples/Alternator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,51 @@ title: "Alternator"
---


# Alternator Multiblock (by Drack.ion)
## Alternator Multiblock (by Drack.ion)


## Recipe Type
### Recipe Type

```js title="alternator_recipe_type.js"
GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
event.create('basic_alternator')
.category('multiblock')
.setEUIO('out')
.setMaxIOSize(0, 0, 0, 0)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.ARC)
.setMaxTooltips(6)
event.create('basic_alternator')
.category('multiblock')
.setEUIO('out')
.setMaxIOSize(1, 0, 0, 0)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.ARC)
.setMaxTooltips(6)
})
```


## Multiblock
### Multiblock

```js title="alternator_multiblock.js"
GTCEuStartupEvents.registry('gtceu:machine', event => {
event.create('basic_alternator', 'multiblock')
.rotationState(RotationState.NON_Y_AXIS)
.recipeType('basic_alternator')
.pattern(definition => FactoryBlockPattern.start()
.aisle("CWC", "CWC", "#W#")
.aisle("CWC", "K#E", "CWC")
.aisle("CWC", "CWA", "#W#")
.where('A', Predicates.controller(Predicates.blocks(definition.get())))
.where('W', Predicates.blocks(GTBlocks.COIL_CUPRONICKEL.get()))
.where("C", Predicates.blocks(GTBlocks.CASING_STEEL_SOLID.get()))
.where('#', Predicates.any())
.where('K', Predicates.abilities(PartAbility.INPUT_KINETIC).setExactLimit(1))
.where('E', Predicates.abilities(PartAbility.OUTPUT_ENERGY).setExactLimit(1))
.build()
)
.workableCasingRenderer(
"gtceu:block/casings/solid/machine_casing_solid_steel",
"gtceu:block/multiblock/implosion_compressor", false
)
event.create('basic_alternator', 'multiblock')
.rotationState(RotationState.NON_Y_AXIS)
.recipeType('basic_alternator')
.appearanceBlock(GTBlocks.CASING_STEEL_SOLID)
.generator(true)
.pattern(definition => FactoryBlockPattern.start()
.aisle("CWC", "CWC", "#W#")
.aisle("CWC", "K#E", "CWC")
.aisle("CWC", "CWA", "#W#")
.where('A', Predicates.controller(Predicates.blocks(definition.get())))
.where('W', Predicates.blocks(GTBlocks.COIL_CUPRONICKEL.get()))
.where("C", Predicates.blocks(GTBlocks.CASING_STEEL_SOLID.get()))
.where('#', Predicates.any())
.where('K', Predicates.abilities(PartAbility.INPUT_KINETIC).setExactLimit(1))
.where('E', Predicates.abilities(PartAbility.OUTPUT_ENERGY).setExactLimit(1))
.build()
)
.workableCasingRenderer(
"gtceu:block/casings/solid/machine_casing_solid_steel",
"gtceu:block/multiblock/implosion_compressor", false
)
})
```


## Lang
### Lang

```json title="en_us.json"
{
Expand All @@ -57,18 +56,17 @@ GTCEuStartupEvents.registry('gtceu:machine', event => {
}
```


## Recipes
### Recipes

```js title="alternator_recipes.js"
ServerEvents.recipes(event => {
function basic_alt(id, su, rpm, eu){
event.recipes.gtceu.basic_alternator(id)
.inputStress(su)
.rpm(rpm)
.duration(2)
.EUt(eu)
}
basic_alt('lv_1_amp', 256, 32, -32)
function basic_alt(id, rpm, eu){
event.recipes.gtceu.basic_alternator(id)
.circuit(1)
.rpm(rpm)
.duration(2)
.EUt(eu)
}
basic_alt('lv_1_amp', 32, -32)
})
```
```

0 comments on commit d44c185

Please sign in to comment.