promotional bannermobile promotional banner

OpticalJS

KubeJS support for Create Optical

OpticalJS

is a Create Optical addon that adds KubeJS support for it.

With OpticalJS, you can add Create Optical focusing recipe without having to interact with json style custom recipe.

Currently (Optical JS 1.0.0) supports Create Optical 0.2.1 and KubeJS 2001.6.5-build.16.

How To Use

code example:

ServerEvents.recipes(event => {
    event.recipes.create_optical.focusing(
        ["create:brass_door"],
        ["create:copper_door"]
    )
    event.recipes.create_optical.focusing(
        ["create:analog_lever"],
        ["minecraft:lever"],
        10,
        0
    )

    // after 0.1.1, you can use enum name directly
    event.recipes.create_optical.focusing(
        ["create:analog_lever"],
        ["minecraft:lever"],
        10,
        'gamma'
    )
})

This will create three focusing recipes.

The first recipe requires a "create:copper_door", and produces "create:brass_door" after 40 ticks.

The second recipe requires a Lever and exposure under radio light, and produces an Analog Lever after 10 ticks.

The third recipe requires a Lever and exposure under gamma light, and produces an Analog Lever after 10 ticks.

The 0 in the second recipe stands for required_beam_type, where 0 is "radio", 1 is "microwave", 2 is "visible light", 3 is "gamma", 4 is "none".

Image example:

example.png

The OpticalJS Team

profile avatar
Owner
  • 7
    Followers
  • 17
    Projects
  • 6.0M
    Downloads

More from ZZZankView all

  • ProbeJS Legacy project image

    ProbeJS Legacy

    • 30.8K
    • Mods

    Unofficial continuation of ProbeJS for versions abandoned by official ProbeJS

    • 30.8K
    • May 14, 2026
    • Mods
    • +2
  • Open In Inventory project image

    Open In Inventory

    • 5.2K
    • Mods

    Open guidebooks, backpacks, handhelds and more with a single click in inventory

    • 5.2K
    • May 3, 2026
    • Mods
    • +2
  • Graal project image

    Graal

    • 675
    • Mods

    High performance JavaScript runtime, tweaked for Minecraft usage

    • 675
    • April 25, 2026
    • Mods
  • EfficientHashing project image

    EfficientHashing

    • 299.7K
    • Mods

    better hashing algorithm for Vec3i & BlockPos

    • 299.7K
    • November 28, 2025
    • Mods
  • ProbeJS Legacy project image

    ProbeJS Legacy

    • 30.8K
    • Mods

    Unofficial continuation of ProbeJS for versions abandoned by official ProbeJS

    • 30.8K
    • May 14, 2026
    • Mods
    • +2
  • Open In Inventory project image

    Open In Inventory

    • 5.2K
    • Mods

    Open guidebooks, backpacks, handhelds and more with a single click in inventory

    • 5.2K
    • May 3, 2026
    • Mods
    • +2
  • Graal project image

    Graal

    • 675
    • Mods

    High performance JavaScript runtime, tweaked for Minecraft usage

    • 675
    • April 25, 2026
    • Mods
  • EfficientHashing project image

    EfficientHashing

    • 299.7K
    • Mods

    better hashing algorithm for Vec3i & BlockPos

    • 299.7K
    • November 28, 2025
    • Mods