{"id":41909,"date":"2026-06-02T02:18:58","date_gmt":"2026-06-01T23:18:58","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/"},"modified":"2026-06-02T02:18:58","modified_gmt":"2026-06-01T23:18:58","slug":"cobalt-core","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/","title":{"rendered":"Cobalt Core"},"content":{"rendered":"<p># Run commands from custom item data!<br \/>\nCobalt core is a datapack that allows for items to run commands from custom data!<\/p>\n<p>**To Use**:<br \/>\nEnter the command you want to run into the proper custom data path:<br \/>\n&#8220;`json<br \/>\n{<br \/>\n    &#8220;components&#8221;: {<br \/>\n        &#8220;custom_data&#8221;: {<br \/>\n            &#8220;cobalt&#8221;: {<br \/>\n                &#8220;onUse&#8221;: {<br \/>\n                    &#8220;command&#8221;: &#8220;say Hello World!&#8221;<br \/>\n                }<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n}<br \/>\n&#8220;`<br \/>\n#<br \/>\nBelow are all current uses for Cobalt Core, along with example commands:<\/p>\n<p>`onUse`: runs on item use when in mainhand (item must have `consumable` component with `consume_seconds:2147483647,animation:&#8221;block&#8221;`)<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s stick[consumable={consume_seconds:2147483647,animation:&#8221;block&#8221;},custom_data={cobalt:{onUse:{command:&#8221;say Hello world!&#8221;}}}]<br \/>\n&#8220;`<br \/>\n`onShiftUse`: runs on item use when in mainhand while sneaking (same requirements as `onUse`)<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s nether_star[consumable={consume_seconds:2147483647,animation:&#8221;block&#8221;},custom_data={cobalt:{onShiftUse:{command:&#8221;say Goodbye world!&#8221;}}}]<br \/>\n&#8220;`<br \/>\n`onAttack`: runs upon successfully attacking a mob when in mainhand<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s iron_sword[custom_data={cobalt:{onAttack:{command:&#8221;effect give @n[nbt={HurtTime:10s},distance=..8] poison&#8221;}}}]<br \/>\n&#8220;`<br \/>\n`onBlock`: runs upon successfully blocking damage when held (item must have `blocks_attack` component (1.21.5+) or be a shield)<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s shield[custom_data={cobalt:{onBlock:{command:&#8221;execute on attacker at @s run summon lightning_bolt&#8221;}}}]<br \/>\n&#8220;`<br \/>\n`onDamage`: runs upon taking damage from a mob when held or worn<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s diamond_chestplate[custom_data={cobalt:{onDamage:{command:&#8221;execute on attacker run damage @s 2&#8243;}}}]<br \/>\n&#8220;`<br \/>\n`projectile.onHitMob`: runs when a thrown or shot projectile from this item hits a mob<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s crossbow[custom_data={cobalt:{projectile:{onHitMob:{command:&#8221;summon tnt ~ ~ ~ {fuse:0}&#8221;}}}}]<br \/>\n&#8220;`<br \/>\n`projectile.onHitBlock`: runs when a thrown or shot projectile from this item hits a block<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s bow[custom_data={cobalt:{projectile:{onHitBlock:{command:&#8221;execute on origin run tp @s ~ ~ ~&#8221;}}}}]<br \/>\n&#8220;`<br \/>\n`onHold`: runs every tick when held or worn<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s lantern[custom_data={cobalt:{onHold:{command:&#8221;effect give @e[distance=..50] glowing 1 0 true&#8221;}}}]<br \/>\n&#8220;`<br \/>\n`projectile.onSpawn`: runs for a single tick when the projectile is spawned<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s trident[custom_data={cobalt:{projectile:{onSpawn:{command:&#8221;summon lightning_bolt&#8221;}}}}]<br \/>\n&#8220;`<br \/>\n`projectile.onTravel`: runs for every tick the projectile is travelling<br \/>\n&#8220;`mcfunction<br \/>\n\/give @s bow[custom_data={cobalt:{projectile:{onTravel:{command:&#8221;execute on origin run tp @s ~ ~ ~&#8221;}}}}]<br \/>\n&#8220;`<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Run commands from items<\/p>\n","protected":false},"featured_media":41910,"template":"","meta":{"_minecraft_slug":"cobalt-core","_minecraft_project_id":"scp3dIqS","_minecraft_author":"TheCodingFlygon","_minecraft_license":"MIT","_minecraft_downloads":31,"_minecraft_follows":1,"_minecraft_client_side":"optional","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"cobalt-core.zip","_minecraft_size_bytes":1197861,"_minecraft_version_count":3,"_minecraft_updated_at":"2026-05-15T23:50:38.725391Z","_minecraft_date_created":"2025-05-08T06:13:35.280910Z","_minecraft_date_modified":"2025-05-17T16:20:24.745887Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/cobalt-core","_minecraft_icon_attachment_id":41910,"_minecraft_imported_at":"2026-06-01T23:18:59+00:00","_minecraft_import_hash":"f92dad5d77f66c571f2822de59475974","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[84,88,89,873,92],"mod_loader":[86],"minecraft_version":[40,41,73,74,38,78,79,80,81,82],"class_list":["post-41909","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-datapack","mod_category-equipment","mod_category-game-mechanics","mod_category-library","mod_category-utility","mod_loader-datapack","minecraft_version-1-21-10","minecraft_version-1-21-11","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8","minecraft_version-1-21-9"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Cobalt Core - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cobalt Core - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Run commands from items\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/\",\"name\":\"Cobalt Core - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/cobalt-core-icon-8ec9259969e017c06acc9de3ba8e1c0f59b1b061_96.webp\",\"datePublished\":\"2026-06-01T23:18:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/cobalt-core-icon-8ec9259969e017c06acc9de3ba8e1c0f59b1b061_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/cobalt-core-icon-8ec9259969e017c06acc9de3ba8e1c0f59b1b061_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/cobalt-core\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cobalt Core\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cobalt Core - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/","og_locale":"en_US","og_type":"article","og_title":"Cobalt Core - Minecraft","og_description":"Run commands from items","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/","name":"Cobalt Core - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/cobalt-core-icon-8ec9259969e017c06acc9de3ba8e1c0f59b1b061_96.webp","datePublished":"2026-06-01T23:18:58+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/cobalt-core-icon-8ec9259969e017c06acc9de3ba8e1c0f59b1b061_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/cobalt-core-icon-8ec9259969e017c06acc9de3ba8e1c0f59b1b061_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/cobalt-core\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Cobalt Core"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/41909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/41910"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=41909"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=41909"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=41909"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=41909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}