개인 자료란 (JE)

  서버 커뮤니티

Profile LEMONY1199 대표칭호 없음
Profile

질문하기 스크립트

스크립트 질문

22 일 전 조회 수 25 추천 수 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개의 댓글

코코냐
22 일 전

왜 굳이 명령어 호출을..

환타비
22 일 전

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

슈퍼레몬
21 일 전

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

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

LEMONY1199
21 일 전
@슈퍼레몬

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

set block at event-location to stone

stop

 

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

LEMONY1199
21 일 전
@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

슈퍼레몬
21 일 전
@LEMONY1199

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

LEMONY1199
21 일 전
@슈퍼레몬

ㅔ?

슈퍼레몬
21 일 전
@LEMONY1199

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

뉴스 및 창작물
/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240428135129

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1