# KJSPKG **[KJSPKG](https://github.com/Modern-Modpacks/kjspkg)** is a package manager for KubeJS that can allow you to download different example scripts and libraries into your instance. It will automatically manage minecraft version, modloader, dependency and incompatibility control. It works with KubeJS 6 (1.19), KubeJS Legacy (1.16/1.18) and should even work with some pre-legacy versions (1.12)! [![kjspkgbig.png](https://wiki.latvian.dev/uploads/images/gallery/2023-07/Dzs8ZXTbGkOwtmWf-kjspkgbig.png)](https://wiki.latvian.dev/uploads/images/gallery/2023-04/kOqnnW5AOQwxfiPO-kjspkgbig.png) #### Installation 1. Download either the [CLI version of KJSPKG](https://github.com/Modern-Modpacks/kjspkg/tree/main#installation--update) or the [WIP GUI client](https://github.com/Modern-Modpacks/kjspkg-gui). 2. Open a terminal in the `kubejs` directory inside of your instance. 3. Run `kjspkg init` and select your minecraft version/modloader. Now you are able to install packages into your instance. #### Usage - To download a package, run `kjspkg install ` - To remove a package, run `kjspkg remove ` - To search for a package, run `kjspkg search ` - To list all packages in your instance, run `kjspkg list` - To list all of the commands available, run `kjspkg help` #### Adding your own package If you have an example script you would like to share on KJSPKG, check out [the "Adding your own package" section](https://github.com/Modern-Modpacks/kjspkg#adding-your-own-package) of KJSPKG's README. We are always happy to add more scripts from different authors to our list! #### Notable packages ##### **[`more-recipe-types`](https://kjspkglookup.modernmodpacks.site/#more-recipe-types)** (Legacy, 1.16.5/1.18.2, Forge/Fabric) This package simplifies the process of adding recipes to custom machines from different mods without downloading any addons. For example, this bit of code will add a recipe transforming a stick and an iron ingot to [Powah](https://www.curseforge.com/minecraft/mc-mods/powah)'s Energizing Orb: ```javascript onEvent('recipes', event => { global.mrt.powah.energizing(event, "minecraft:gold_ingot", ["minecraft:stick", "minecraft:iron_ingot"], 1000); }) ``` For other types, check out the [README file on GitHub](https://github.com/gcatkjspkgs/kubejs-more-recipe-types/blob/main/README.md). ##### `create-depot-crafting` (Legacy, 1.18.2, Fabric) This package allows you to add custom recipes that use manual combination on the create depot. Example from the README: ```javascript onEvent('block.right_click', event => { global.recipes.create.manual_depot_application(event, // Output Item.of('expandeddelight:cheese_sandwich'), // Inputs Ingredient.of('minecraft:bread'), // On depot Ingredient.of('expandeddelight:cheese_slice') // In hand ) }); ``` Showcase: [![68747470733a2f2f692e6962622e636f2f426e59505671572f6578616d706c652d6d696e2e676966.gif](https://wiki.latvian.dev/uploads/images/gallery/2023-04/cT0JKE97LRUTTcgy-68747470733a2f2f692e6962622e636f2f426e59505671572f6578616d706c652d6d696e2e676966.gif)](https://wiki.latvian.dev/uploads/images/gallery/2023-04/cT0JKE97LRUTTcgy-68747470733a2f2f692e6962622e636f2f426e59505671572f6578616d706c652d6d696e2e676966.gif) If you're looking for a Forge port of this package, checkout **`create-depot-crafting-forge`**. A lot of the times KJSPKG's packages' names end in `-6` if they are a port of a different package for KubeJS 6 (1.19), and end in `-` if they are a port of another package for a different modloader as per naming convention. ##### `soljs` (KubeJS 6, 1.19.2, Forge/Fabric) This package ports the mechanics of the [1.12.2 version of The Spice of Life mod](https://www.curseforge.com/minecraft/mc-mods/the-spice-of-life) to 1.19 using only KubeJS. It works like a standalone mod and does not require any configuration. Depends on [AppleSkin](https://www.curseforge.com/minecraft/mc-mods/appleskin).