Back to mods
CNPC: Dangerous Script Extension project artwork

Modrinth · Minecraft mod

CNPC: Dangerous Script Extension

This mod adds some dangerous but map-appropriate script methods to CNPC.

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

Quick answer

Which CNPC: Dangerous Script Extension release should I use?

Updated 6 months ago
Latest stable file 1.0.5
Game version 1.20.1
Loader Forge

CNPC: Dangerous Script Extension 1.0.5 targets 1.20.1 with Forge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is CNPC: Dangerous Script Extension required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
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 marks this as usable on both the client and server.

What else does CNPC: Dangerous Script Extension 1.0.5 need?

1.0.5. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add CNPC: Dangerous Script Extension without breaking your instance.

Built for CNPC: Dangerous Script Extension 1.0.5. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.5. It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.5. It opens that exact file at the source.

About this project

What does CNPC: Dangerous Script Extension add?

Description

This mod provides system-level window manipulation features.
Improper or malicious use may negatively affect user experience.
Use responsibly.

This is a script extension mod based on CustomNPCs Unofficial (1.20.1), designed to provide system-level operations that would otherwise require extensive use of Java.type.
While this mod does not involve any form of malware, some features are potentially risky.
It is strongly recommended that you only grant scripting permissions in CustomNPCs Unofficial to people you trust.

Script Methods

moveWindow(String, int, player)
First parameter: direction (left, right, up, down)
Second parameter: pixel offset
Moves the player's game window in the specified direction.

shakeWindow(float, int, int, player)
First parameter: frequency
Second parameter: duration (seconds)
Third parameter: maximum offset (pixels)
Applies a shaking effect to the player's game window.

hideShowWindow(int, int, player)
First parameter: interval (milliseconds)
Second parameter: duration (seconds)
Rapidly hides and shows the game window, creating a flashing effect.

resizeWindow(int, int, player)
Parameters: width and height
Resizes the game window.

crashGame(player)
Immediately crashes the game.
(Warning: When used on a server, this may also crash the server.)

Current Status

If you are creating a Minecraft map with “fourth wall breaking” effects similar to Doki Doki Literature Club!, this mod may be a good fit for your project.

The original purpose of this mod is to prevent the misuse of importing system classes via CNPC to create external shell scripts, which may pose security risks.
This mod does not execute or rely on shell operations. All provided functions can be used directly within the native CNPC scripting environment after installation.

Project description from Modrinth.

Pick your setup

CNPC: Dangerous Script Extension by Minecraft version and loader

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

6 available setups

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

Recent files

CNPC: Dangerous Script Extension versions and loaders

5 of 5 releases match

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