Skip to content

Commit

Permalink
Update docs for 1.2.1 (#27)
Browse files Browse the repository at this point in the history
* docs: update coil material function

* docs: update recipe modifiers & PARALLEL_HATCH usage

* docs: add note on bedrock ores now being up to packdevs
  • Loading branch information
mikerooni authored May 5, 2024
1 parent 35b3d3b commit 448007c
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
58 changes: 58 additions & 0 deletions docs/Modpacks/Changes/v1.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: "Version 1.2.1"
---


# Updating from `1.2.0` to `1.2.1`


## Custom Coils

The `coilMaterial` function now uses a supplier instead of taking a material directly.

```js
// Before:
.coilMaterial(GTMaterials.get('infinity'))

// After:
.coilMaterial(() => GTMaterials.get('infinity'))
```


## Recipe Modifiers

If any of your machines had a custom recipe modifier, its syntax has changed slightly.

More than one recipe modifier can now be applied, making more complex chains of modifiers easier to declare.
In particular, multiblocks supporting parallel hatches now need to be declared differently:

```js
// Before:
.recipeModifier(GTRecipeModifiers.PARALLEL_HATCH.apply(OverclockingLogic.PERFECT_OVERCLOCK, GTRecipeModifiers.ELECTRIC_OVERCLOCK))

// After:
.recipeModifiers(GTRecipeModifiers.PARALLEL_HATCH, GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.PERFECT_OVERCLOCK))
```


## Bedrock Ores

Bedrock ore veins are no longer automatically generated.
They are now entirely up to modpack developers to define, and offer more flexibility than the previous system.


```js
GTCEuServerEvents.oreVeins(event => {
event.add('kubejs:my_custom_bedrock_vein', vein => {
// ...
})
event.modify('kubejs:other_custom_vein', vein => {
// ...
})
event.remove('kubejs:other_custom_vein')
})
```

The documentation for how to use the add and modify events will follow soon.
For now, please reference the [`BedrockOreDefinition.Builder`](https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/api/data/worldgen/bedrockore/BedrockOreDefinition.java#L117) class in our source code.

2 changes: 1 addition & 1 deletion docs/Modpacks/Examples/Ore-Processing-Plant.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GTCEuStartupEvents.registry('gtceu:machine', event => {
event.create('ore_processing_plant', 'multiblock')
.rotationState(RotationState.NON_Y_AXIS)
.recipeType('ore_processing_plant')
.recipeModifier(GTRecipeModifiers.PARALLEL_HATCH.apply(OverclockingLogic.PERFECT_OVERCLOCK, GTRecipeModifiers.ELECTRIC_OVERCLOCK))
.recipeModifiers(GTRecipeModifiers.PARALLEL_HATCH, GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.PERFECT_OVERCLOCK))
.appearanceBlock(GTBlocks.CASING_TUNGSTENSTEEL_ROBUST)
.pattern(definition => FactoryBlockPattern.start()
.aisle(' AAA ', ' FFF ', ' FFF ', ' F ', ' ', ' ', ' ')
Expand Down
2 changes: 1 addition & 1 deletion docs/Modpacks/Other-Topics/Custom-Coils.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ StartupEvents.registry('block', event => {
.level(0)
.energyDiscount(1) // (1)
.tier(10)
.coilMaterial(GTMaterials.get('infinity'))
.coilMaterial(() => GTMaterials.get('infinity'))
.texture('kubejs:block/example_block')
.hardness(5)
.requiresTool(true)
Expand Down

0 comments on commit 448007c

Please sign in to comment.