Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Item ComponentERNew to Visual Studio Code? Get it now.
Item ComponentER

Item ComponentER

ddavid050a

|
3 installs
| (0) | Free
Edit the item components of Minecraft data packs with forms that know required values, dependencies and versions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Item ComponentER

English | 한국어

English

A VS Code extension for editing item components in Minecraft data packs. Components and their types are generated from SpyglassMC/vanilla-mcdoc; ids per version and default item components come from misode/mcmeta.

Supported versions: 1.20.5 – 26.4 (26.4 uses pre-2 data). The interface follows the display language of VS Code: Korean if it is Korean, English otherwise.

Opening the component editor for a diamond sword in a function file and changing its attribute modifiers

▶ Watch the full video on YouTube

Usage

Goal How
Edit an item in a document The Edit components link above the item, the context menu, or Ctrl+Alt+C
Create a new item Command palette → Item ComponentER: Create New Item (export as /give, recipe, loot table and more)
Add a single component Command palette → Item ComponentER: Quickly Add Component
Change the version MC x.y.z in the status bar

Changes in the editor are written to the document immediately, and the editor follows changes in the document. Press Ctrl+S in the editor to save the document; ● marks unsaved changes. To undo, click into the document and press Ctrl+Z.

Each item opens in its own tab. The + button at the top right opens another item of the open files, or a new one.

The editor opens in a new, maximized window by default. Set itemComponenter.openLocation to beside to open it next to the document, or turn off itemComponenter.maximizeNewWindow to keep the window at its normal size.

Where items are found

  • .mcfunction: give, item replace … with, the tool of loot … mine/fish, items inside SNBT (summon, data, …), macros ($) and line continuations (\)
  • data/**/*.json: recipe results, advancement icons, set_components, villager trades, components of item predicates and more

What it does for you

  • Required values: adding a component fills in its required values, including those that depend on another value (for example apply_effects → effects).
  • Required components: adds what a component needs to work, such as food → consumable (1.21.2+), max_damage → damage, glider → equippable, repairable → max_damage.
  • Conflicts: sets max_stack_size to 1 for items with durability. Default components of the item are taken into account.
  • Value checks: types, ranges, counts, choices, ids (vanilla and the data and resource packs of your workspace) and whether tags are allowed.
  • Versions: detects the version from pack.mcmeta, reports components and values that do not exist in it, and converts replaced components (fire_resistant → damage_resistant).
  • Hints: components that only work on certain items, attribute_modifiers that drop default attributes, and so on.

Problems are shown in the editor and in the document, and can be fixed with quick fixes (Ctrl+.).

Settings

Setting Default Description
itemComponenter.version auto Minecraft version; auto reads pack.mcmeta
itemComponenter.openLocation newWindow Where the editor opens: newWindow or beside
itemComponenter.maximizeNewWindow true Maximize the new window (Windows only)
itemComponenter.codeLens.enable true Links above items
itemComponenter.completion.enable true Completion; turn it off if it overlaps with Spyglass
itemComponenter.hover.enable true Documentation on hover
itemComponenter.diagnostics.enable true Report problems
itemComponenter.diagnostics.hints true Also report information-level hints

Development

npm install
npm run build        # creates dist/ (run with F5)
npm test             # checks the schema engine against vanilla items of every version
npm run test:vscode  # integration test in a real VS Code
npm run update-data  # regenerates data/ from the latest mcdoc / mcmeta
npm run package      # creates the VSIX
  • scripts/mcdoc.mjs – mcdoc parser; scripts/build-data.mjs – data generator (add new versions to VERSIONS and to the setting in package.json)
  • src/core/engine.ts – resolves types per version, validates and generates values
  • src/core/rules.ts – rules between components; presets.ts – initial values; info.ts, ko.ts, ko.json – descriptions and Korean translations
  • src/ext, src/webview – VS Code integration and the editor

Limitations

  • Rules between components (rules.ts) are not part of mcdoc and are written by hand. They do not cover all hard-coded behaviour.
  • Item predicates of commands such as clear and execute if items (stick[damage~{…}]) cannot be edited.
  • Editing components in JSON reformats that object.
  • VS Code has no API to maximize a window. On Windows a small PowerShell script (media/maximize.ps1) waits in the background and maximizes the editor window as soon as it appears; on other systems it opens at its normal size. The script does not run if openLocation is beside or maximizeNewWindow is off.

Acknowledgements

Special thanks to Spyglass and its documentation for providing essential resources and references that made the development of this extension possible.

The Spyglass project has been an invaluable resource for Minecraft datapack development.

License

MIT. data/ contains content generated from vanilla-mcdoc (MIT, © 2022 SpyglassMC). Not affiliated with Mojang or Microsoft.


한국어

Minecraft 데이터 팩의 아이템 컴포넌트를 쉽게 편집하는 VS Code 확장입니다. 컴포넌트 목록과 형식은 SpyglassMC/vanilla-mcdoc에서, 버전별 ID와 아이템 기본값은 misode/mcmeta에서 생성합니다.

지원 버전: 1.20.5 ~ 26.4 (26.4는 pre-2 데이터 기준). 화면은 VS Code의 표시 언어를 따릅니다. 한국어이면 한국어로, 그 밖에는 영어로 표시됩니다.

▶ 전체 영상 보기 (YouTube)

사용법

하고 싶은 것 방법
문서의 아이템 편집 아이템 위의 컴포넌트 편집 링크, 우클릭 메뉴, 또는 Ctrl+Alt+C
새 아이템 만들기 명령 팔레트 → Item ComponentER: 새 아이템 만들기 (/give, 조합법, 루트 테이블 등으로 내보내기)
컴포넌트 하나만 추가 명령 팔레트 → Item ComponentER: 컴포넌트 빠르게 추가
버전 바꾸기 오른쪽 아래 상태 표시줄의 MC x.y.z

편집기에서 바꾼 내용은 문서에 바로 반영되고, 문서를 고치면 편집기도 갱신됩니다. 편집기에서 Ctrl+S를 누르면 문서가 저장되고, 저장하지 않은 변경은 ●로 표시됩니다. 실행 취소는 문서 쪽을 클릭한 뒤 Ctrl+Z를 누르세요.

아이템마다 별도의 탭으로 열립니다. 오른쪽 위의 + 버튼으로 열린 파일의 다른 아이템이나 새 아이템을 열 수 있습니다.

편집기는 기본적으로 최대화된 새 창에서 열립니다. 문서 옆에 띄우려면 itemComponenter.openLocation을 beside로 바꾸세요. 새 창의 자동 최대화는 itemComponenter.maximizeNewWindow로 끌 수 있습니다.

인식하는 위치

  • .mcfunction: give, item replace … with, loot … mine/fish의 도구, summon·data 등의 SNBT 안에 있는 아이템, 매크로($)와 줄 이어쓰기(\)
  • data/**/*.json: 조합법 결과, 발전 과제 아이콘, set_components, 주민 거래, 아이템 조건의 components 등

자동으로 처리하는 것

  • 필수 값: 컴포넌트를 추가하면 필수 값이 채워집니다. 다른 값에 따라 달라지는 필수 값도 처리합니다 (예: apply_effects → effects).
  • 함께 필요한 컴포넌트: food → consumable(1.21.2+), max_damage → damage, glider → equippable, repairable → max_damage 등을 함께 추가합니다.
  • 충돌: 내구도가 있으면 max_stack_size를 1로 맞춥니다. 아이템의 기본 컴포넌트까지 고려합니다.
  • 값 검사: 형식, 범위, 개수, 선택지, ID(바닐라와 작업 영역의 데이터 팩·리소스 팩), 태그 허용 여부
  • 버전: pack.mcmeta에서 버전을 감지하고, 없는 컴포넌트와 값을 알려 줍니다. 대체된 컴포넌트는 변환해 줍니다 (fire_resistant → damage_resistant).
  • 안내: 특정 아이템에서만 작동하는 컴포넌트, 기본 속성이 사라지는 attribute_modifiers 등

문제는 편집기와 문서에 모두 표시되며 빠른 수정(Ctrl+.)으로 고칠 수 있습니다.

설정

설정 기본값 설명
itemComponenter.version auto Minecraft 버전. auto는 pack.mcmeta를 읽습니다
itemComponenter.openLocation newWindow 편집기를 여는 위치: newWindow(새 창) 또는 beside(문서 옆)
itemComponenter.maximizeNewWindow true 새 창을 자동으로 최대화 (Windows 전용)
itemComponenter.codeLens.enable true 아이템 위의 링크
itemComponenter.completion.enable true 자동 완성. Spyglass와 겹치면 끄세요
itemComponenter.hover.enable true 설명 호버
itemComponenter.diagnostics.enable true 문제 표시
itemComponenter.diagnostics.hints true 정보 수준의 안내도 표시

개발

npm install
npm run build        # dist/ 생성 (F5로 실행)
npm test             # 모든 버전의 바닐라 아이템으로 스키마 엔진 검증
npm run test:vscode  # 실제 VS Code에서 통합 테스트
npm run update-data  # 최신 mcdoc / mcmeta로 data/ 다시 생성
npm run package      # VSIX 생성
  • scripts/mcdoc.mjs – mcdoc 파서, scripts/build-data.mjs – 데이터 생성 (새 버전은 VERSIONS와 package.json의 설정 목록에 추가)
  • src/core/engine.ts – 버전별 형식 해석·검증·기본값 생성
  • src/core/rules.ts – 컴포넌트 사이의 규칙, presets.ts – 추천 초기값, info.ts, ko.ts, ko.json – 설명과 한국어 번역
  • src/ext, src/webview – VS Code 연동과 편집기 화면

한계

  • 컴포넌트 사이의 규칙(rules.ts)은 mcdoc에 없는 정보라 직접 작성한 것입니다. 하드코딩된 동작을 모두 다루지는 않습니다.
  • clear, execute if items 같은 명령어 아이템 조건(stick[damage~{…}])은 편집하지 않습니다.
  • JSON의 components를 편집하면 그 객체의 줄바꿈 형식은 다시 정리됩니다.
  • VS Code에는 창을 최대화하는 API가 없습니다. Windows에서는 작은 PowerShell 스크립트(media/maximize.ps1)로 백그라운드에서 기다리다가 편집기 창이 나타나는 즉시 최대화하고, 다른 운영체제에서는 보통 크기로 엽니다. openLocation이 beside이거나 maximizeNewWindow가 꺼져 있으면 실행되지 않습니다.

감사의 말

이 확장 프로그램을 개발하는 데 꼭 필요한 자료와 참고 문헌을 제공해 준 Spyglass와 그 문서에 깊이 감사드립니다.

Spyglass 프로젝트는 마인크래프트 데이터팩 개발에 더없이 소중한 자료입니다.

라이선스

MIT. data/에는 vanilla-mcdoc(MIT, © 2022 SpyglassMC)에서 생성한 내용이 들어 있습니다. Mojang/Microsoft와 관련이 없습니다.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft