Download CNPC-Additions — Minecraft Mods — MetaMods
CNPC-Additions

CNPC-Additions

Active

Downloads

0

Last update

11 months ago

Versions

1.20.1 — 1.20.6
Client and server
Forge
Game mechanics
Social
Utils
Addons

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) or eSetGlowing(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 icon
  • non - no icon
  • invisible - 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)
Project members
AhaShine

AhaShine

Developer

Aha_Shine

Aha_Shine

Developer

Created: 30 Sep 2024

ID: 60391