ModsFinder

RandomJS

by skyraah

RandomJS, a Forge add-on for KubeJS, lets pack makers define custom survival rules for blocks through JSON and scripts.

ForgeClient and serverMIT LicenseOpen source1.20.1 – 1.20.4

What it does

Blocks in the mod decide whether they can stay in place by checking the blocks around them. A block's survival is set by a bottom block requirement and by whether its immediate neighboring faces are complete, so a block can be made to need support from one side or from every side. The rule is chosen by a preset string, and a custom rule can be written as JSON when none of the presets fits.

The mod is aimed at modpack authors and server owners who script their worlds with KubeJS. Because it is a KubeJS add-on, it needs KubeJS installed next to it on Forge. Every player and the server need a copy of the mod. Files are published for Forge only, across four game versions 1.20.1 – 1.20.4, with 1.0.0-A for 1.20.4 as the latest release. The code is released under the MIT License and is open source.

Key features

  1. Preset survival rules

    A set of preset block types lets players choose a survival rule by name, without writing any code.

  2. Custom JSON rules

    A custom survival rule can be written in JSON, with a field for the surviving block type.

  3. Face matching

    A boolean option switches the rule to full face match mode, so every face must be covered for the block to stay.

  4. Directional checks

    Rules can be applied to the up, down, east, west, south and north faces separately.

Compatibility

Latest build for each game version and loader.

1.20.41.0.0-A
1.20.31.0.0-A
1.20.21.0.0-A
1.20.11.0.0-A
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Requirements

Dependencies declared by the latest file for each loader.

Required 1

KubeJSEdit recipes, add new custom items, script world events, all in JavaScript!
Required

Use cases

Custom worlds

A modpack author can make blocks that need specific support, such as floating structures held up by a single block below.

Server scripts

A server owner can add survival rules to a KubeJS script without changing any mod code.

Who it’s for: Modpack authors and server owners who script their worlds with KubeJS on Forge and want to control how blocks survive.

Questions

Does RandomJS need KubeJS?

Yes. KubeJS is a required dependency, and RandomJS has to be installed next to it on Forge.

Does RandomJS have to be installed on both sides?

Yes. Every player and the server need a copy of the mod.

Which game versions does RandomJS support?

Files exist for 1.20.1, 1.20.2, 1.20.3 and 1.20.4, with 1.0.0-A for 1.20.4 as the latest release.

Are more features planned?

The author notes that more features are coming soon, but no specific additions are listed on the Modrinth page.

What the author says

Added a new category of block presets to KubeJS, allowing players to set custom survival rules for created blocks. (More features coming soon)
skyraah, on the Modrinth page

Official listing

Owner
skyraah
Published
2023-12-27
Updated on Modrinth
2023-12-27
Facts verified
2026-10-15