
CNPC: Dangerous Script Extension
This mod adds some dangerous but map-appropriate script methods to CNPC.
About this Mod
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.
Available Versions
How to Install CNPC: Dangerous Script Extension on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set forge Loader
In the panel under "Egg", select the forge loader and matching Minecraft version (1.20.6).
Install Mod
Open the mod browser in the dashboard and search for "CNPC: Dangerous Script Extension". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.20.6, 1.20.5, 1.20.4 (+3 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
CNPC: Dangerous Script Extension server crashes on startup – what to do?
Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.6). You can switch loaders with one click in the panel.
Is CNPC: Dangerous Script Extension compatible with forge?
CNPC: Dangerous Script Extension officially supports forge for Minecraft 1.20.6, 1.20.5, 1.20.4. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with CNPC: Dangerous Script Extension – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if CNPC: Dangerous Script Extension consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install CNPC: Dangerous Script Extension with just one click on your server.