Back to mods
CorpseJS project artwork

CurseForge · Minecraft mod

CorpseJS

CorpseJS is a Forge 1.20.1 integration mod that lets KubeJS scripts create and customize Corpse bodies

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which CorpseJS release matches 1.20.1 Forge?

Updated 3 months ago
Best match for your filters corpsejs-1.0.0.jar
Game version 1.20.1
Loader Forge

corpsejs-1.0.0.jar targets 1.20.1 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. All 4 required mods have matching files.

Where it goes

Is CorpseJS required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does corpsejs-1.0.0.jar need?

corpsejs-1.0.0.jar on 1.20.1 Forge. Every mod below is checked against that same setup.

All 4 required mods have matching files

Install Corpse, KubeJS, Rhino, Architectury API first. We found matching files for this game-version and loader setup. 6 come through another mod in the chain.

2 listed on this file 6 pulled in by those mods
Corpse Needed by corpsejs-1.0.0.jar
required
Matching file found Matched file: [FORGE][1.20.1] Corpse 1.20.1-1.0.23
KubeJS Needed by corpsejs-1.0.0.jar
required
Matching file found Matched file: KubeJS Forge 2001.6.5-build.26
Jade 🔍 Needed by Corpse
pulled in
Matching file found Matched file: [Forge 1.20.1] 11.13.3
Rhino Needed by KubeJS
pulled in
Matching file found Matched file: Rhino Forge 2001.2.3-build.10
Architectury API Needed by KubeJS
pulled in
Matching file found Matched file: [Forge 1.20(.1)] v9.2.14
MezzConfig Needed by Just Enough Items (JEI)
pulled in
Matching file found Matched file: MezzConfig 0.7.1 for Forge 1.20.1
MezzConfigGUI Needed by Just Enough Items (JEI)
pulled in
Matching file found Matched file: MezzConfig GUI mc1.20.1-0.7.2 for Forge

6 extra mods were pulled in by other dependencies. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add CorpseJS without breaking your instance.

Built for corpsejs-1.0.0.jar on 1.20.1 Forge. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use corpsejs-1.0.0.jar. It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Corpse, KubeJS, Rhino, Architectury API first. We found matching files for this game-version and loader setup. 6 come through another mod in the chain.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside corpsejs-1.0.0.jar. It opens that exact file at the source.

About this project

What does CorpseJS add?

CorpseJS

CorpseJS connects the Corpse mod with KubeJS and provides a simple, scriptable way to create and customize corpse entities.

Simple Enemy and CustomNPCs entities do not create corpses automatically. Scripts explicitly decide when a corpse should be created through the CorpseJS API. When the source entity is a supported Simple Enemy or CustomNPC humanoid, CorpseJS automatically selects the matching corpse model. Other entities use the generic corpse renderer, which reuses the source entity's registered renderer.

Features

  • Create a corpse for any server-side entity through a Java API or KubeJS.
  • Add initial items when creating a corpse.
  • Customize corpse contents after creation with replaceItems, addItems, or setItems.
  • Cancel corpse creation before the corpse entity is constructed.
  • Identify the original entity with sourceEntity, sourceEntityId, and sourcePersistentData.
  • Preserve the source entity's KubeJS persistentData on the corpse.
  • Use dedicated models for Simple Enemy units and supported CustomNPC humanoids.
  • Prevent duplicate normal death drops when a corpse is created during the same game tick.
  • Remove a corpse without dropping or returning its contents.

KubeJS API

KubeJS support is optional. When KubeJS is installed, CorpseJS provides the global CorpseJS binding:

EntityEvents.death(event => {
  if (event.entity.type == 'minecraft:zombie') {
    const corpse = CorpseJS.spawn(event.entity, [
      Item.of('minecraft:rotten_flesh', 3),
      Item.of('minecraft:iron_ingot')
    ])
  }
})

Available methods:

  • CorpseJS.spawn(entity) creates an empty corpse.
  • CorpseJS.spawn(entity, items) creates a corpse with the supplied items.
  • CorpseJS.removeCorpse(corpse) silently removes a corpse and clears its contents.
  • CorpseJS.remove(corpse) is a short alias for removeCorpse.

The API is server-side only. It returns the new corpse entity on success and null when creation fails, the source is client-side, or a corpse was already created for that source during the current game tick.

Complete KubeJS Example

The following example demonstrates the complete workflow: create a corpse from a death event, cancel selected sources before creation, replace or add items, distribute items across random inventory slots, and remove a corpse without dropping its contents.

// Create a corpse with initial items when a zombie dies.
EntityEvents.death(event => {
  if (event.entity.type != 'minecraft:zombie') return

  CorpseJS.spawn(event.entity, [
    Item.of('minecraft:rotten_flesh', 3),
    Item.of('minecraft:iron_ingot')
  ])
})

// This event runs before the corpse entity is constructed.
CorpseJSEvents.beforeCorpseCreated(event => {
  if (event.entityId == 'simpleenemymod:pmcunit') {
    event.cancel()
  }
})

// This event runs after a new corpse has been added to the world.
CorpseJSEvents.corpseCreated(event => {
  if (event.sourceEntityId != 'minecraft:zombie') return

  // Replace all existing corpse contents and use random main-inventory slots.
  event.replaceItems([
    Item.of('minecraft:diamond_sword'),
    Item.of('minecraft:bread', 4)
  ], true)

  // Add items without clearing existing contents, also using random slots.
  event.addItems([
    Item.of('minecraft:gold_ingot', 2),
    Item.of('minecraft:paper')
  ], true)

  // Equivalent explicit mode API:
  // event.setItems('replace', [Item.of('minecraft:diamond')], true)
  // event.setItems('add', [Item.of('minecraft:emerald')], true)
})

// Remove a corpse silently, including all of its stored items.
CorpseJSEvents.corpseCreated(event => {
  if (event.sourceEntityId == 'minecraft:zombie' && Math.random() < 0.1) {
    CorpseJS.removeCorpse(event.entity)
  }
})

replaceItems clears the main inventory, armor, off-hand, additional items, and equipment before inserting new items. addItems preserves existing contents and puts overflow into the additional-items page. Pass true as the second argument to randomize the main-inventory slots. setItems accepts replace or add modes and supports the same random-slot argument.

KubeJS Events

CorpseJS provides one global event group: CorpseJSEvents.

CorpseJSEvents.beforeCorpseCreated(event => {
  if (event.entityId == 'simpleenemymod:pmcunit') {
    event.cancel()
  }
})

CorpseJSEvents.corpseCreated(event => {
  if (event.sourceEntityId == 'minecraft:zombie') {
    event.addItems(Item.of('minecraft:paper'))
  }
})

beforeCorpseCreated runs before the corpse entity exists and can cancel creation. corpseCreated runs once after a newly created corpse is added to the world and can modify its contents.

Use event.entityId in beforeCorpseCreated and event.sourceEntityId in corpseCreated to apply rules to specific source entity types.

Supported Models

  • Simple Enemy entities use the matching Simple Enemy unit model.
  • Supported CustomNPC humanoids use their matching CustomNPC model.
  • Players use the player corpse model.
  • Other entities use their registered entity renderer through the generic corpse model.

Requirements

  • Minecraft 1.20.1
  • Minecraft Forge 47+
  • Corpse, for the corpse entity and inventory implementation
  • KubeJS Forge 2001.6 or newer, only if KubeJS scripting support is needed
  • Simple Enemy and CustomNPCs are optional compatibility integrations

CorpseJS is distributed under LGPL-3.0 license.

Project description from CurseForge.

Pick your setup

CorpseJS by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

CorpseJS versions and loaders

1 of 1 releases match

Looking for an older file? The official CurseForge project page is in Resources.