Last active
November 29, 2024 11:31
-
-
Save kennytv/3a13a43a886527b39c788e445ee63167 to your computer and use it in GitHub Desktop.
Example commands for all item data components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1.21.3 - More will be moved to https://github.com/kennytv/ItemDataComponentExamples | |
give @s stick[custom_data={wow:1b}] | |
give @s stick[max_stack_size=5] | |
give @s diamond_axe[max_damage=5, damage=3] | |
give @s diamond_axe[unbreakable={show_in_tooltip:true}] | |
give @s stick[custom_name='{"text": "Custom name"}'] | |
give @s stick[item_name='"Item name"'] | |
give @s stick[item_model='anvil'] | |
give @s stick[lore=['"Line 1"', '"Line 2"']] | |
give @s stick[rarity="rare"] | |
give @s stick[enchantments={"efficiency": 5}] | |
give @s stick[can_place_on={blocks:["acacia_log", "acacia_leaves"], state:{}, nbt:'{}'}] | |
give @s stick[can_break={blocks:["acacia_log", "acacia_leaves"], state:{}, nbt:'{}'}] | |
give @s stick[attribute_modifiers={modifiers:[{type:"armor", amount:1, id:"some_id", operation:"add_value", slot:"any"}]}] | |
give @s stick[custom_model_data=1] | |
give @s stick[hide_additional_tooltip={}] | |
give @s stick[hide_tooltip={}] | |
give @s stick[repair_cost=5] | |
# creative_slot_lock: Not available | |
# give @s stick[creative_slot_lock={}] | |
give @s stick[enchantment_glint_override=true] | |
give @s arrow[intangible_projectile={}] | |
give @s stick[food={nutrition:5, saturation:5, can_always_eat:true}] | |
# consumable: Only contains clear_all_effects | |
give @s stick[consumable={consume_seconds:0.5, animation:"brush", has_consume_particles:true, sound:"ambient.basalt_deltas.additions", on_consume_effects:[{type:"clear_all_effects"}]}] | |
give @s salmon[use_remainder={id:"short_grass", count:1}] | |
give @s stick[use_cooldown={seconds:2, cooldown_group:"test_group"}] | |
give @s stick[damage_resistant={types:"#is_fire"}] | |
give @s stick[tool={rules:[{blocks:["acacia_button", "acacia_door"], correct_for_drops:true, speed:2}], default_mining_speed:1, damage_per_block:1}] | |
give @s stick[enchantable={value:5}] | |
give @s stick[equippable={slot:"mainhand", equip_sound:"ambient.cave", model:"gold", camera_overlay:"item/pumpkin_seeds", allowed_entities:["player"], dispensable:true, swappable:true, damage_on_hurt:false}] | |
give @s stick[repairable={items:"#acacia_logs"}] | |
give @s stick[glider={}] | |
give @s stick[tooltip_style="axolotl"] | |
# death_protection: Only contains clear_all_effects | |
give @s stick[death_protection={death_effects:[{type:"clear_all_effects"}]}] | |
give @s stick[stored_enchantments={aqua_affinity:2}] | |
give @s stick[dyed_color=212315] | |
give @s stick[map_color=1955894] | |
give @s stick[map_id=1] | |
give @s stick[map_decorations={}] | |
# map_post_processing: Doesn't have a Codec... | |
# give @s stick[map_post_processing="lock"}] | |
give @s stick[charged_projectiles=[{id:stick, count:1}]] | |
give @s stick[bundle_contents=[{id:stick, count:1}]] | |
# potion_contents: Not including hidden_effect within custom_effects | |
give @s stick[potion_contents={potion:"healing", custom_color:1238125, custom_effects:[{id:"absorption", amplifier:1, duration:200, ambient:true, show_particles:true, show_icon:true}], custom_name:"Custom potion name"}] | |
give @s stick[suspicious_stew_effects=[{id:"absorption", duration:200}]] | |
give @s stick[writable_book_content={pages:["First page", "Second page"]}] | |
give @s stick[written_book_content={author:"kennytv", title:"A book", generation:2, resolved:true, pages:[{raw:'"First page"', filtered:'"Filtered first page"'}]}] | |
# trim: One with inlined material, one with inlined pattern | |
give @s stick[trim={material:{asset_name:"amethyst", description:"Description", ingredient:"acacia_boat", item_model_index:0, override_armor_materials:{chainmail:"override_material"}}, pattern:"bolt", show_in_tooltip:true}] | |
give @s stick[trim={material:"amethyst", pattern:{asset_id:"asset_id", description:"Description", template_item:"acacia_boat", decal:true}, show_in_tooltip:true}] | |
give @s stick[debug_stick_state={}] | |
give @s stick[entity_data={id:"axolotl"}] | |
give @s stick[bucket_entity_data={id:"axolotl"}] | |
give @s stick[block_entity_data={id:"banner"}] | |
give @s stick[instrument={sound_event:{sound_id:"doesnt_exist", range:10}, description:"", range:15, use_duration:20}] | |
give @s stick[ominous_bottle_amplifier=2] | |
# jukebox_playable: Doesn't let you inline the jukebox song... | |
give @s stick[jukebox_playable={song:"far", show_in_tooltip:true}] | |
give @s stick[recipes=["acacia_button"]] | |
give @s compass[lodestone_tracker={target:{dimension:"overworld", pos:[1, 1, 1]}, tracked:true}] | |
give @s stick[firework_explosion={shape:"creeper", colors:[124123], fade_colors:[1231412, -12373], has_trail:true, has_twinkle:true}] | |
give @s stick[fireworks={flight_duration:2, explosions:[{shape:"burst"}]}] | |
give @s minecraft:player_head[profile={id:[-1474846733, -1040102795, -1112892140, -1398343617], name:"kennytv", properties:[]}] | |
give @s stick[note_block_sound="doesnt_exist"] | |
give @s stick[banner_patterns=[{color:"cyan", pattern:{asset_id:"bricks", translation_key:"some_key"}}]] | |
give @s stick[base_color="blue"] | |
give @s stick[pot_decorations=["angler_pottery_sherd", "blade_pottery_sherd"]] | |
give @s stick[container=[{slot:0, item:{id:"stick", count:1}}]] | |
give @s stick[block_state={}] | |
give @s stick[bees=[{min_ticks_in_hive:1, ticks_in_hive:1}]] | |
give @s stick[lock={items:"#acacia_logs", count:1}] | |
give @s stick[container_loot={loot_table:"blocks/acacia_button", seed:0}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment