RandomJS
by skyraah
RandomJS, a Forge add-on for KubeJS, lets pack makers define custom survival rules for blocks through JSON and scripts.
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
Preset survival rules
A set of preset block types lets players choose a survival rule by name, without writing any code.
Custom JSON rules
A custom survival rule can be written in JSON, with a field for the surviving block type.
Face matching
A boolean option switches the rule to full face match mode, so every face must be covered for the block to stay.
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.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
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?
Does RandomJS have to be installed on both sides?
Which game versions does RandomJS support?
Are more features planned?
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)
Official listing
- Modrinth page
- modrinth.com/mod/randomjs
- Owner
- skyraah
- Published
- 2023-12-27
- Updated on Modrinth
- 2023-12-27
- Facts verified
- 2026-10-15
