? LG 的命令物品数据包
此数据包提供了一种在触发特定事件时直接向物品添加命令的方法。事件堆叠意味着你可以同时为“右键点击”和“攻击生物”或“被攻击”等场景设置不同的命令!
使用教程
使用 /function a:open_menu 命令,然后点击 Add Commands(添加命令)按钮,选择输入类型和槽位,最后通过红色的“Confirm”(确认)按钮进行确认。这会将命令添加到你所选的输入类型与槽位的组合中。
当前触发条件与槽位
触发条件
- Tick(每秒 20 次)
- Use Item(右键点击时触发,要求物品必须是可消耗的;Item Modifier 可以方便地将物品变为可消耗品,请参阅相关命令)
- Using Item(在使用物品期间持续触发)
- Player Hurt Entity(每当玩家攻击实体时触发)
- Player Killed Entity(每当玩家击杀实体时触发)
- Entity Hurt Player(每当玩家受到伤害时触发)
- Inventory Changed(每当玩家的背包发生变化时触发)
槽位
- Mainhand(主手)
- Offhand(副手)
- Head(头部)
- Chest(胸部)
- Legs(腿部)
- Feet(脚部)
限制说明
每个触发条件 + 槽位的组合只能放置一个命令。如需执行多个命令,建议使用函数。
对于 Tick 类型的触发条件,出于优化考虑,建议不要使用冷却时间。如果不这样做,虽然不会导致服务器卡顿,但当多名玩家同时使用时,可能会对性能产生负面影响。
其他附加功能
- Cooldowns(冷却时间)—— 你可以轻松地为命令添加冷却时间,它们不会生成记分板,而是直接绑定到物品上。
- Swap Hand Items(交换手中物品)—— 简单地交换主手和副手的物品。
- Show Cooldown(显示冷却时间)—— 当处于冷却状态时,会在聊天栏中显示剩余冷却时间。不建议在 Tick 触发条件中使用,以免刷屏。
- Consume On Trigger(触发时消耗)—— 一旦触发,将消耗 1 个被使用的物品。
⚠️ 重要命令!
/function a:open_menu
/function a:copy_item
/function ci:reset_cds
? YouTube 展示视频
? LG's Command Items datapack
This datapack adds a way to add commands directly to items when triggering a specific event, events stacks meaning you can have a command for Right-Click as well as a command when attacking a mob or getting attacked!
Usage Tutorial
Use /function a:open_menu command, then click Add Commands button, select your input and slot, then confirm with the red "Confirm" button, it will add the command to your selected input + slot combination
Current Triggers & Slots
Triggers
- Tick (20 times per second)
- Use Item (on right-click, requires the item to be consumable, the Item Modifier makes it easy to turn an item into consumable, check commands)
- Using Item (Triggers whenever you're using the item)
- Player Hurt Entity (whenever player attacks an entity)
- Player Killed Entity (whenever player kills an entity)
- Entity Hurt Player (whenever the player gets damaged)
- Inventory Changed (whenever players' inventory changes)
Slots
- Mainhand
- Offhand
- Head
- Chest
- Legs
- Feet
Limitations
You can only put one command into each trigger + slot combo, to use several commands, it is recommended to use functions
For any ticking trigger, I recommend not using cooldowns simply for optimization purposes, it won't fry your ticks if you don't do so, but with several players using those, it may very likely affect your performance negatively
Other Additions
- Cooldowns - You can easily add cooldowns to your commands, they generate no scoreboards and are bound directly to items
- Swap Hand Items - Simply swaps your mainhand and offhand items
- Show Cooldown - When on cooldown, displays the cooldown on the chat, not recommended to use on ticking triggers so not to flood your chat
- Consume On Trigger - Once triggered, consumes 1 of the used items
⚠️ Important commands!
/function a:open_menu
/function a:copy_item
/function ci:reset_cds
? YouTube Showcase
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LG's Command Items - 简易自定义物品
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复了当冷却时间通过 run 命令增加时,冷却时间无法正常工作的bug
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
此数据包添加了属于阿瓦里海盗的独特结构,将他们的独特风格带入你的 Minecraft 世界!兼容性:1.20 至 26.3
数据包
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
数据包
此数据包添加了新的“祝福模式”难度。
数据包
允许服务器管理员方便地禁用 Xaero's Map 系列模组中的实体雷达、小地图等功能,使竞技游戏更加公平。
数据包
使用原版/生存友好的方法更改青蛙的变种类型。支持原版(寒冷、温带、温暖)以及可选的“More Frogs 2”变种:深红、末影、地狱、毒镖、紫珀、幽匿、灵魂、诡异和木头。
数据包
手持潜影盒时可直接打开,无需将其放置在地面上。只需按住 Shift 并右键点击即可访问你的潜影盒。
评论 0
登录后参与评分
还没有评论,来抢沙发吧