마크(pc자바) 커맨드 명령어

마크(pc자바) 커맨드 명령어

작성일 2024.01.26댓글 1건
    게시물 수정 , 삭제는 로그인 필요

안녕하세요 커맨드를 만지던중에 키패드(도어락) 비슷하게 만들었는데요 여기에서 알맞은 비밀번호를 누르면 철문이 열리는 식으로 하고싶은데 어떻게 커맨드를 해야할지 모르겠어서요

:알맞은 비밀번호(예를 들면 1010)를 누르면 철문이 열린다

라는 커맨드 명령어 좀 알려주세요



profile_image 익명 작성일 -

키패드 0~9번 위치에

모두 각각 인터렉션이 소환되어 있고

각각의 인터렉션에 부여된 태그가

keypad0, keypad1, keypad2 ...

라고 할 것이고 모든 인터렉션에 공통적으로

keypad 태그가 부여되어 있다고 하겠습니다

그리고 #, enter 등 비밀번호 입력을

완료 하였을 때 누르는 버튼의 인터렉션에는

keypadEnter 태그가 부여되어 있습니다

철문의 좌표는 x y z 라고 표현하겠습니다

그리고 아래 8 명령어를 채팅창에 입력해주세요

/scoreboard objectives add input dummy

/scoreboard objectives add temporary dummy

/scoreboard objectives add touchCount dummy

/scoreboard objectives add finalResult dummy

/scoreboard objectives add num dummy

/scoreboard players set #10 num 10

/scoreboard players set #100 num 100

/scoreboard players set #1000 num 1000

반복 | 무조건적

execute as @e[tag=keypad0] on target run scoreboard players set @s input 0

연쇄 | 무조건적

execute as @e[tag=keypad1] on target run scoreboard players set @s input 1

연쇄 | 무조건적

execute as @e[tag=keypad2] on target run scoreboard players set @s input 2

연쇄 | 무조건적

execute as @e[tag=keypad3] on target run scoreboard players set @s input 3

연쇄 | 무조건적

execute as @e[tag=keypad4] on target run scoreboard players set @s input 4

연쇄 | 무조건적

execute as @e[tag=keypad5] on target run scoreboard players set @s input 5

연쇄 | 무조건적

execute as @e[tag=keypad6] on target run scoreboard players set @s input 6

연쇄 | 무조건적

execute as @e[tag=keypad0] on target run scoreboard players set @s input 7

연쇄 | 무조건적

execute as @e[tag=keypad8] on target run scoreboard players set @s input 8

연쇄 | 무조건적

execute as @e[tag=keypad9] on target run scoreboard players set @s input 9

연쇄 | 무조건적

execute as @a if score @s input = @s input run scoreboard players add @s touchCount 1

연쇄 | 무조건적

execute as @a store result score @s finalResult if score @s touchCount matches 1 run scoreboard players get @s input

연쇄 | 조건적

execute as @a if score @s touchCount matches 1 run scoreboard players operation @s final Result *= #1000 num

연쇄 | 무조건적

execute as @a store result score @s temporary if score @s touchCount matches 2 run scoreboard players get @s input

연쇄 | 조건적

execute as @a if score @s touchCount matches 2 run scoreboard players operation @s temporary *= #100 num

연쇄 | 조건적

execute as @a if score @s touchCount matches 2 run scoreboard players operation @s final Result += temporary

연쇄 | 무조건적

execute as @a store result score @s temporary if score @s touchCount matches 3 run scoreboard players get @s input

연쇄 | 조건적

execute as @a if score @s touchCount matches 3 run scoreboard players operation @s temporary *= #10 num

연쇄 | 조건적

execute as @a if score @s touchCount matches 3 run scoreboard players operation @s final Result += temporary

연쇄 | 무조건적

execute as @a if score @s touchCount matches 4 run scoreboard players operation @s finalResult += @s input

연쇄 | 무조건적

execute as @a if score @s touchCount matches 5.. run scoreboard players set @s finalResult -1

연쇄 | 무조건적

execute as @e[tag=keypadEnter] on target unless score @s finalResult matches 1010 run title @s actionbar {"text":"비밀번호가 일치하지 않습니다","color":"red"}

연쇄 | 무조건적

execute as @e[tag=keypadEnter] on target if score @s finalResult matches 1010 run setblock x y z iron_door[powered=true]

(문 방향은 facing 인자로 알아서 하시고

혹시 이게 안된다면 y좌표 (y-2) 좌표에다가

레드스톤 토치 설치되게 하는게..)

연쇄 | 무조건적

execute as @e[tag=keypadEnter] on target run scoreboard players reset @s touchCount

연쇄 | 무조건적

execute as @e[tag=keypadEnter] on target run scoreboard players reset @s finalResult

연쇄 | 무조건적

scoreboard players reset @a input

연쇄 | 무조건적

scoreboard players reset @a temporary

연쇄 | 무조건적

execute as @e[type=keypad] run data remove entity @s interaction

키패드를 누르면 소리가 난다던지의 커맨드는

알아서 할 수 있을거라 믿습니다

자바 마크 커맨드(명령어)

자바마크 커맨드(명령어)를 많이 알아서 그걸 응용해 제가 원하는것을 만들고 싶거든요... 자바마크 커맨드를 어디서 배우면 좋을가요? 좋은 강좌같은거...

마크pc 자바 명령어 다 알려주세요

마크pc 자바 명령어 다 알려주세요 명령어는 한 100가지 정도기때문에 다는 못알려줘요 자주쓰는 명령어=locate=구조물찾기 effect =물약효과 kill=죽이기 tp=텔포...

마크 커맨드 명령어

마크(pc버전)에서 커맨드로 죽어도 계속 야간투시 적용되게 하는 법 알려주세요. /effect give <님 마크 닉> minecraft:night_vision 999999 1 true 를 커맨드블록에...

마크 점프맵 커맨드 명령어

... 1.커맨드로 빨간콘크리트를 밣으면 죽는(커맨드) 명령어!알려주시고요 2.... 감사하겠습니다 자바에디션 1.19 기준입니다 1. 반복형 | 무조건적 | 항상 활성화...