Cobalt Core 图标

Cobalt Core

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.1.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/cobalt-core
资源信息

Minecraft 版本: 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: datapack

标签: equipment library utility

资源介绍

Run commands from custom item data!

Cobalt core is a datapack that allows for items to run commands from custom data!

To Use:
Enter the command you want to run into the proper custom data path:

{
    "components": {
        "custom_data": {
            "cobalt": {
                "onUse": {
                    "command": "say Hello World!"
                }
            }
        }
    }
}

Below are all current uses for Cobalt Core, along with example commands:

onUse: runs on item use when in mainhand (item must have consumable component with consume_seconds:2147483647,animation:"block")

/give @s stick[consumable={consume_seconds:2147483647,animation:"block"},custom_data={cobalt:{onUse:{command:"say Hello world!"}}}]

onShiftUse: runs on item use when in mainhand while sneaking (same requirements as onUse)

/give @s nether_star[consumable={consume_seconds:2147483647,animation:"block"},custom_data={cobalt:{onShiftUse:{command:"say Goodbye world!"}}}]

onAttack: runs upon successfully attacking a mob when in mainhand

/give @s iron_sword[custom_data={cobalt:{onAttack:{command:"effect give @n[nbt={HurtTime:10s},distance=..8] poison"}}}]

onBlock: runs upon successfully blocking damage when held (item must have blocks_attack component (1.21.5+) or be a shield)

/give @s shield[custom_data={cobalt:{onBlock:{command:"execute on attacker at @s run summon lightning_bolt"}}}]

onDamage: runs upon taking damage from a mob when held or worn

/give @s diamond_chestplate[custom_data={cobalt:{onDamage:{command:"execute on attacker run damage @s 2"}}}]

projectile.onHitMob: runs when a thrown or shot projectile from this item hits a mob

/give @s crossbow[custom_data={cobalt:{projectile:{onHitMob:{command:"summon tnt ~ ~ ~ {fuse:0}"}}}}]

projectile.onHitBlock: runs when a thrown or shot projectile from this item hits a block

/give @s bow[custom_data={cobalt:{projectile:{onHitBlock:{command:"execute on origin run tp @s ~ ~ ~"}}}}]

onHold: runs every tick when held or worn

/give @s lantern[custom_data={cobalt:{onHold:{command:"effect give @e[distance=..50] glowing 1 0 true"}}}]

projectile.onSpawn: runs for a single tick when the projectile is spawned

/give @s trident[custom_data={cobalt:{projectile:{onSpawn:{command:"summon lightning_bolt"}}}}]

projectile.onTravel: runs for every tick the projectile is travelling

/give @s bow[custom_data={cobalt:{projectile:{onTravel:{command:"execute on origin run tp @s ~ ~ ~"}}}}]
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Copyright Mob

价格:0 墨喵币
下载量:0

查看详情
Unbreakable Tool

价格:0 墨喵币
下载量:0

查看详情
Player Highlighter

价格:0 墨喵币
下载量:0

查看详情
My Badger

价格:0 墨喵币
下载量:0

查看详情