찌꾸
대표칭호 없음
이해도 | 초보자 |
---|---|
게임버전 (JE) | 관련없음 |
게임버전 (BE) | 관련없음 |
아이템을 왼손에 들면 작동하는 커맨드인데 도와주세요...
일반 아이템은 제대로 작동하는데 이름을 바꾼 아이템을 어떻게 감지해야하는지 모르겠어요ㅜㅜ 버전은 1.20.5입니다...
execute as @a[nbt={Inventory:[{id:"minecraft:heart_of_the_sea",Slot:-106b,tag:{display:{Name:'{"text":"수정구","italic":false}'}}}]}] at @s run tp -5 51 3
위는 사용한 커맨드인에 tag:{display:~~} 이 부분이 들어가니 먹통이 되버리네요...
/give @s minecraft:heart_of_the_sea[minecraft:item_name="수정구"]
참고로 아이템은 이렇게 꺼냈습니다...
lanthanide
24 일 전저도 순간 뭔가 하고 찾아봤는데, 1.20.5에 커맨드가 상당히 많이 바뀐 듯 합니다. Data Component Format이라는 것이 생겼는데, give 커맨드에서 사용하신 것도 이것으로 보입니다.
이런 변화에 따라,
{id:"minecraft:heart_of_the_sea",Slot:-106b,components:{"minecraft:item_name":"수정구"}}
와 같이 아이템을 표현하게 되었습니다. 또한 execute if 에도 item이라는 새로운 기능이 생겼다고 합니다.execute if item entity @s weapon.offhand *[minecraft:item_name="수정구"]
와 같은 이용도 가능해진 것이죠! 참 신기하지 않나요?lanthanide
24 일 전참고문헌으로 몇 가지 링크를 달아두겠습니다. 영문이라 해석이 귀찮을 지 몰라도 굉장히 알찬 정보들이니 꼭 한 번 읽어보세요.
https://www.reddit.com/r/MinecraftCommands/comments/1cay3au/wiki_update_detect_a_specific_item_in_the/
https://www.reddit.com/r/MinecraftCommands/comments/1cjzyuk/comment/l2jgowg/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
https://minecraft.wiki/w/Data_component_format#item_name
찌꾸
24 일 전자료까지 알려주시고 정말 감사합니다 잘 한번 읽어볼게요ㅜㅜ 덕분에 해결했어요!!!!!!