개인 자료란 (JE)

  서버 커뮤니티

Profile LEMONY1199 대표칭호 없음
Profile

질문하기 스크립트

스크립트 질문

2024.04.12 조회 수 27 추천 수 0
이해도 초보자 
게임버전 (JE) 관련없음 
게임버전 (BE) 관련없음 

스크립트로 광산을 만들었는데 서버 커맨드로 작동시키면 서버구동기에서 계속 "No blocks were filled" 라는 문구가 뜨네요..

스크립트를 어떤방식으로 수정해야할까요?



command /광산:

    trigger:

        set {광산} to random integer between 1 and 1000

        if {광산} is between 1 and 717: #돌 70퍼

            execute console command "fill 3 2 7 -1 0 7 stone replace air"

        if {광산} is between 718 and 818: # 석탄 10퍼

            execute console command "fill 3 2 7 -1 0 7 coal_ore replace air"

        if {광산} is between 818 and 888: # 구리 7퍼

            execute console command "fill 3 2 7 -1 0 7 copper_ore replace air"

        if {광산} is between 889 and 939: # 철 5퍼

            execute console command "fill 3 2 7 -1 0 7 iron_ore replace air"

        if {광산} is between 940 and 970: # 레드스톤 3퍼

            execute console command "fill 3 2 7 -1 0 7 redstone_ore replace air"

        if {광산} is between 971 and 986: # 청금석 1.5퍼

            execute console command "fill 3 2 7 -1 0 7 lapis_ore replace air"

        if {광산} is between 987 and 994: # 금 0.7퍼

            execute console command "fill 3 2 7 -1 0 7 gold_ore replace air"

        if {광산} is between 995 and 998: # 에메랄드 0.3퍼

            execute console command "fill 3 2 7 -1 0 7 emerald_ore replace air"

        if {광산} is between 999 and 1000: # 다이아 0.1퍼

            execute console command "fill 3 2 7 -1 0 7 diamond_ore replace air"




서버 내에서반복커맨드에 /광산 입력해두고 작동하는 방법을 사용하고 있습니다
다른 방법이 있다면 알려주세요!




8개의 댓글

코코냐
2024.04.12

왜 굳이 명령어 호출을..

환타비
2024.04.13

명령어 호출 하지 마시고 스크립트 구문인 on break 사용 해보시는걸 추천드립니당

슈퍼레몬
2024.04.13

https://www.koreaminecraft.net/qna/3767741질문에 댓글이 안달려서 여기 달께요

질문에 답변부터 하자면 tick이 있습니다. 이건 문제는 아니지만 every 1second는 렉 엄청 걸려요. 스크립트가 최적화가 좋은게 아닙니다. 대신 break이벤트에서 임시변수 사용하세요. 그리고 fill쓰지 마세요. set block at event-location to 를 사용하세요.

LEMONY1199
2024.04.13
@슈퍼레몬

if {광산} is between 1 and 717: #돌 70퍼

set block at event-location to stone

stop

 

이런식으로 해봤는데 작동 안하네요..

LEMONY1199
2024.04.13
@LEMONY1199

on break:

    if event-block is stone or coal ore or copper ore or iron ore or redstone ore or lapis ore or gold ore or diamond ore or emerald ore:

        set {광산} to random integer between 1 and 1000

        if {광산} is between 1 and 717: #돌 70퍼

            set block at event-location to stone

            stop

        if {광산} is between 718 and 818: # 석탄 10퍼

            set block at event-location to coal ore

            stop

        if {광산} is between 818 and 888: # 구리 7퍼

            set block at event-location to copper ore

            stop

        if {광산} is between 889 and 939: # 철 5퍼

            set block at event-location to iron ore

            stop

        if {광산} is between 940 and 970: # 레드스톤 3퍼

            set block at event-location to redstone ore

            stop

        if {광산} is between 971 and 986: # 청금석 1.5퍼

            set block at event-location to lapis ore

            stop    

        if {광산} is between 987 and 994: # 금 0.7퍼

            set block at event-location to gold ore

            stop

        if {광산} is between 995 and 998: # 에메랄드 0.3퍼

            set block at event-location to emerald ore

            stop

        if {광산} is between 999 and 1000: # 다이아 0.1퍼

            set block at event-location to diamond ore 

            stop

슈퍼레몬
2024.04.13
@LEMONY1199

지역변수로 광산 정의하셔야죠

LEMONY1199
2024.04.13
@슈퍼레몬

ㅔ?

슈퍼레몬
2024.04.13
@LEMONY1199

디코 superlemon1118#4620 으로 연락주세요

뉴스 및 창작물
/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1