CurseForge · Minecraft mod
CorpseJS
CorpseJS is a Forge 1.20.1 integration mod that lets KubeJS scripts create and customize Corpse bodies
Quick answer
Which CorpseJS release should I use?
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.
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. Change the file and its required mods may change too.
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.
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. Pick another file and the loader, install side or required mods may change.
- 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.
- 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.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 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, orsetItems. - Cancel corpse creation before the corpse entity is constructed.
- Identify the original entity with
sourceEntity,sourceEntityId, andsourcePersistentData. - Preserve the source entity's KubeJS
persistentDataon 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 forremoveCorpse.
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.20.1
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
CorpseJS versions and loaders
corpsejs-1.0.0.jar
25 Aug 2026
Looking for an older file? The official CurseForge project page is in Resources.