

CNPC-Additions - Custom NPC Extension
This addon for the popular Custom NPC mod provides numerous new features and tools for creating interactive non-player characters.
Core Features
The mod significantly expands the basic functionality of Custom NPC, offering additional scripting options and gameplay management tools. Key innovations include an enhanced dialogue system, construction restrictions, and new ways to communicate with players.
Scripting Functionality
The mod introduces several new methods for working with NPCs:
-
Radius Communication: The
eSay
function allows NPCs to send messages to all players within a 15-block radius. You can specify text color in HEX format, for example:eSay("Hello!", "E9967A")
. If color is not specified, gray shade #C0C0C0 is used. -
Personal Messages: The
eSayTo
method sends messages to a specific player:eSayTo(event.player, "Hello, player", "E9967A")
. -
Character Glowing: The
eSetGlowing
function turns NPC glow on or off. The boolean parameter determines the state:eSetGlowing(true)
oreSetGlowing(false)
.
Messages Above Hotbar
Two main functions are included for displaying information above the item panel:
eSayBar (with character icon)
The method supports various parameter variations:
eSayBar(IPlayer player, String message, String fakeName, String color, String icon, int maxSymbolsFirstLine, int maxSymbolsOtherLines)
Example usage: eSayBar(e.player, "Hello, friend", "Sigma228", "9370DB", "npc")
eSayBarI (without icon)
Similar method without displaying character icon with the same parameters.
Available Icon Types
npc
- standard NPC iconnon
- no iconinvisible
- hidden icon- ResourceLocation - custom icon from folder
.minecraft/customnpcs/assets/customnpcs/textures/icons/myicon.png
. In-game specified as"customnpcs:textures/icons/myicon.png"
Command System
Opening Dialogues
/shine dialog show player id name
Example: /shine dialog show Dev 13 "MrBest"
- opens dialogue with ID 13 for player Dev with sender name "MrBest"
Building Restrictions
- Block Breaking Block:
/shine blockbreak block player boolean
- Block Placement Block:
/shine installingBlocks player boolean
In both cases, parameter false
blocks the action, while true
allows it.
Feature Implementation Status
- ✅ New Scripting Methods
- ✅ Enhanced Dialogue Interface
- ✅ Messages Above Quick Access Panel
- ✅ Block Breaking and Placement Restrictions
- ❌ Quest Changes (Menu)
- ❌ New Chat Bubbles (Messages Above NPC Heads)