Download NetJS (KubeJS Addon) — Minecraft Mods — MetaMods

NetJS (KubeJS Addon)

Active

Downloads

14

Last update

1 year ago
Client
Fabric
Quilt
Forge
Neoforge
Libraries
Utils

NetJS (KubeJS Addon)

About the modification:
This is an addon for KubeJS that provides limited but safe network interaction capabilities in scripts. The mod itself doesn't perform any actions - it only adds a special NetJSWrapper object named NetJS, available for use in any scripts.

Main features:

// Asynchronous mode - network operations run in a separate thread, the game continues to run, and the callback is triggered when the result is received.

  • NetJS.getPasteBin('3zCF8MM6', result => {})
  • NetJS.getGists('3f1cd831af032e52238ef161bdd715b3', result => {})

// Linear mode - not recommended, as it stops the main client/server thread until the result is received.

  • NetJS.getPasteBin('3zCF8MM6', false, result => {})
  • NetJS.getGists('3f1cd831af032e52238ef161bdd715b3', false, result => {})

Usage:
Detailed instructions and usage examples are available in the project repository on GitHub.

Project members
devaverin

devaverin

KostromDan

KostromDan

Created: 6 Jan 2024

ID: 19938