PowerfulJS - Expanding KubeJS Capabilities
PowerfulJS is a powerful extension for KubeJS that integrates Forge's Capability system. This mod opens up new horizons for creating custom content, allowing you to work with capabilities of items, block entities, and other game objects.
What is the Capability System?
The capability system in Forge allows adding additional functionality to various game objects. For example, an energy cell has the capability to work with Forge Energy, enabling it to directly receive and output energy. Any furnace in Minecraft has item handling capability, allowing conveyor belts and pipes to interact with it directly.
PowerfulJS Features
With this mod, you can assign supported capabilities to items and block entities, as well as customize their behavior. Create items that can be charged with energy, or furnaces that produce energy while working - the possibilities are limited only by your imagination!
Supported Systems
To access capabilities of various objects, use the following tokens with the .getCapability method:
- ForgeCapabilities
- BotaniaCapabilities (requires Botania)
- PNCCapabilities (requires PNC: Repressurized)
- MekanismCapabilities (requires Mekanism)
- CuriosCapabilities (requires Curios)
- IECapabilities (requires Immersive Engineering)
For creating custom capabilities, the following builders are available:
- CapabilityBuilder
- BotaniaCapabilityBuilder (requires Botania)
- PNCCapabilityBuilder (requires PNC: Repressurized)
- MekanismCapabilityBuilder (requires Mekanism)
- CuriosCapabilities (requires Curios)
- IECapabilityBuilder (requires Immersive Engineering)
Usage Examples
Converting Botania Mana energy to Forge Energy with 1:1 ratio for energy cells:

Creating an item with infinite energy for charging any machines:

Creating a block for storing Forge Energy:

For development convenience, it's recommended to use ProbeJS for code autocompletion and type hints.