以下是你的 CurseForge 模组描述的中文翻译:
本模组为 CNPC 模组添加了新功能及更多改进。
功能:
- NPC 的新脚本方法。
- 使用新界面打开 CNPC 对话的能力。
- 可选的阻止方块破坏与放置功能。
- 玩家快捷栏上方显示的消息格式:“[名称]: 消息”。
脚本编写:
-
从半径 15 格内的 NPC 发送消息的方法:
eSay(String message, String color);
示例:
eSay("Hello!", "E9967A");
颜色采用十六进制格式,若未指定,默认颜色为 #C0C0C0。
-
向特定玩家发送 NPC 消息的方法:
eSayTo(IPlayer player, String message, String color);
示例:
eSayTo(event.player, "Hello " + event.player, "E9967A");
-
使 NPC 发光的方法:
eSetGlowing(boolean);
boolean 可以是 true 或 false。
-
在玩家快捷栏上方发送消息的方法:
eSayBar - 可设置角色图标;
eSayBarI - 不带角色图标。
eSayBar 类型:
eSayBar(IPlayer IPlayer, String message, String fakeName, String hexColor, String icon, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
eSayBar(IPlayer IPlayer, String message, String fakeName, String hexColor, String icon);
eSayBar(IPlayer IPlayer, String message, String hexColor, String icon);
eSayBar(IPlayer IPlayer, String message, String hexColor, String icon, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
示例:
eSayBar(e.player, "Hello my friend", "Sigma228", "9370DB", "npc");
图标类型(icon):
npc
non
invisible
- ResourceLocation — 允许为角色设置自定义图标。图标文件可放置在
.minecraft/customnpcs/assets/customnpcs/textures/icons/myicon.png 文件夹中。
游戏内路径:"customnpcs:textures/icons/myicon.png"。
eSayBarI 类型(无角色图标):
eSayBarI(IPlayer IPlayer, String message, String fakeName, String hexColor, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
eSayBarI(IPlayer IPlayer, String message, String fakeName, String hexColor);
eSayBarI(IPlayer IPlayer, String message, String hexColor);
eSayBarI(IPlayer IPlayer, String message, String hexColor, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
这些方法与 eSayBar 相同,但不包含角色图标。
命令:
-
使用新界面打开 CNPC 对话:
/shine dialog show player id name
示例:
/shine dialog show Dev 13 "MrBest"
为玩家 Dev 打开 ID 为 13 的对话,显示名称为 MrBest。
-
限制方块破坏:
/shine blockbreak block player boolean
false — 禁止破坏,true — 允许破坏。
-
限制方块放置:
/shine installingBlocks player boolean
false — 禁止放置,true — 允许放置。
当前模组功能状态:
- [✔] 新的脚本方法。
- [✔] 新的对话界面。
- [✔] 快捷栏上方消息显示。
- [✔] 方块破坏与放置限制。
- [✘] 任务系统更改(菜单)。
- [✘] 新的聊天气泡(NPC 头顶消息)。
Here's the English translation for your mod description on CurseForge:
This mod adds new features to the CNPC mod and more.
Features:
- New scripting methods for NPCs.
- Ability to open CNPC dialogues with a new interface.
- Option to block the breaking and placing of blocks.
- Messages above the player's hotbar: "[Name]: Message".
Scripting:
-
Method to send messages from NPCs within a 15-block radius:
eSay(String message, String color);
Example:
eSay("Hello!", "E9967A");
The color is in hex format, and if not specified, the default color is #C0C0C0.
-
Method to send messages from NPCs to a specific player:
eSayTo(IPlayer player, String message, String color);
Example:
eSayTo(event.player, "Hello " + event.player, "E9967A");
-
Method to make NPCs glow:
eSetGlowing(boolean);
boolean can be true or false.
-
Method to send a message above the player's hotbar:
eSayBar - with the option to set an icon for the character;
eSayBarI - without a character icon.
Types of eSayBar:
eSayBar(IPlayer IPlayer, String message, String fakeName, String hexColor, String icon, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
eSayBar(IPlayer IPlayer, String message, String fakeName, String hexColor, String icon);
eSayBar(IPlayer IPlayer, String message, String hexColor, String icon);
eSayBar(IPlayer IPlayer, String message, String hexColor, String icon, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
Example:
eSayBar(e.player, "Hello my friend", "Sigma228", "9370DB", "npc");
Types of icons (icon):
npc
non
invisible
- ResourceLocation — allows you to set a custom icon for the character. The icon file can be placed in the
.minecraft/customnpcs/assets/customnpcs/textures/icons/myicon.png folder.
In-game: "customnpcs:textures/icons/myicon.png".
Types of eSayBarI (without character icon):
eSayBarI(IPlayer IPlayer, String message, String fakeName, String hexColor, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
eSayBarI(IPlayer IPlayer, String message, String fakeName, String hexColor);
eSayBarI(IPlayer IPlayer, String message, String hexColor);
eSayBarI(IPlayer IPlayer, String message, String hexColor, int maxSymbolsFirstLine, int maxSymbolsOtherLines);
These are the same methods as eSayBar but without a character icon.
Commands:
-
Open a dialogue from CNPC with a new interface:
/shine dialog show player id name
Example:
/shine dialog show Dev 13 "MrBest"
Opens a dialogue with ID 13 for player Dev under the name MrBest.
-
Block breaking restriction:
/shine blockbreak block player boolean
false — blocks breaking, true — allows it.
-
Block placing restriction:
/shine installingBlocks player boolean
false — blocks placing, true — allows it.
Current mod features:
- [✔] New scripting methods.
- [✔] New dialogue interface.
- [✔] Messages above the hotbar.
- [✔] Block breaking and placing restrictions.
- [✘] Quest changes (menu).
- [✘] New ChatBubbles (messages above NPCs' heads).
评论 0
登录后参与评分
还没有评论,来抢沙发吧