Skip to content

Updating from 1.2.0 to 1.2.1

Custom Coils

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

// 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:

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

// After:
.recipeModifiers([GTRecipeModifiers.PARALLEL_HATCH, GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.PERFECT_OVERCLOCK)])
Recipe modifiers must be supplied as a JavaScript array, as this is what Rhino transpiles into a varargs (RecipeModifier...) value, which is what the .recipeModifiers() method accepts as input. If not supplied as an array, Rhino with throw an exception and crash Minecraft.

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.

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 class in our source code.