개인 자료란 (JE)

  서버 커뮤니티

Profile 고고우석 대표칭호 없음
Profile

질문하기 스크립트

스크립트 아이템 인식 오류

2024.12.03 조회 수 134 추천 수 0
이해도 초보자 
게임버전 (JE) 1.20.2 
게임버전 (BE) 관련없음 
스크립트 버전 2.9.5 

if slot 15 of current inventory of player is netherite hoe with custom model data 1:

@send "debug" to player

위와 같은 구문으로 인벤토리의 15번 슬롯이 리소스팩이 적용된 네더라이트 괭이일 때 작동합니다.

그러나 텍스쳐팩이 적용된 네더라이트 괭이의 내구도가 닳았을 때, 작동하지 않습니다.


이 오류와 관련하여 자료를 찾아봤는데

https://github.com/SkriptLang/Skript/issues/1871

같은 이슈가 19년도에도 있었고, 임시로 다운그레이드를 하라는 해결책이 있었으나 곧 버그임을 인지하고 해결된 것으로 확인됩니다.


위에서 해결된 버그를 실험해 봤을 때,

if slot 15 of current inventory of player is netherite hoe :

@send "debug" to player

위와 같은 구문으로 아무런 조건이 붙지 않은 네더라이트 괭이인 경우에는 괭이의 내구도가 닳아 있는 경우에도 작동합니다.


또 다른 조건으로

if slot 15 of current inventory of player is netherite hoe  named "디버그":

@send "debug" to player

위와 같은 구문으로 "디버그" 라는 이름이 붙은 네더라이트 괭이인 경우, 리소스팩 때와 마찬가지로 내구도가 닳아있는 "디버그" 라는 이름이 붙은 네더라이트 괭이를 인식하지 못합니다.

조건이 붙은 아이템을 내구도와 관계없이 인식하는 방법을 알고싶습니다.


2개의 댓글

windy_wind
2024.12.03

set {_item} to (slot 15 of current inventory of player) 을 전제할때

 

1. 이중 if

if type of {_item} is netherite hoe:

@if name of {_item} is "디버그":

@@#action

 

2. with damage %number%를 이용

if {_item} with damage 1 is netherite hoe with damage 1 named "디버그":

@#action

 

고고우석
2024.12.05
@windy_wind

감사합니다. 이중 if 방향성으로 해결되었습니다.

뉴스 및 창작물
/files/thumbnails/365/141/004/262x150.crop.jpg?20251215140757

상품

《마인크래프트 축제 아이디어 북》 출간!

다코미

2025-12-15

0

/files/thumbnails/358/140/004/262x150.crop.jpg?20251212154044

건축

보라빛 ♡

SHALDOPlus

2025-12-12

0

/files/thumbnails/155/138/004/262x150.crop.jpg?20251204005353

건축

마인크래프트에서 가장 현실적인 공항을 만드는중이신분들 ㄷㄷ

SHALDOPlus

2025-12-04

0

/files/thumbnails/304/133/004/262x150.crop.jpg?20251118104716

레드스톤

[싱크로율 70%이상 끌어옴] 배드애플을 마인크래프트로?

이상한애

2025-11-18

0

/files/thumbnails/839/127/004/262x150.crop.jpg?20251104101804

레드스톤

노트블럭 커버 | Deltarune – Hammer of Justice

이상한애

2025-11-04

0