Download OpticalJS — Minecraft Mods — MetaMods

OpticalJS

Active

Downloads

0

Last update

10 months ago
Client
Libraries
Addons

OpticalJS

OpticalJS is an addon for the Create Optical mod that adds KubeJS support. This modification allows you to configure focusing recipes for Create Optical using convenient JavaScript instead of working with JSON files.

Functionality and Features

With OpticalJS, you no longer need to deal with complex JSON recipes. The system allows you to create focusing recipes through understandable JavaScript code, which significantly simplifies the customization process.

Usage

Code example for creating recipes:

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
    )
})

This example creates two focusing recipes:

  • The first recipe takes a copper door and creates a brass door after 40 ticks
  • The second recipe requires a simple lever when exposed to radio beam and creates an analog lever after 10 ticks

The second recipe includes the required_beam_type parameter with a value of 0, where:

  • 0 = radio
  • 1 = microwave
  • 2 = visible light
  • 3 = gamma
  • 4 = none required

Example

Compatibility

Current version of OpticalJS (1.0.0) works with: Ad Do...Truncated to fit context limit... Something went wrong.

Project members
ZZZank

ZZZank

Created: 29 Nov 2024

ID: 65450