マインクラフト JavaScript
- やりたいこと
1.エージョンがいるポジションに三つのブロックを縦に並べる
2.二歩進んで、再度同じブロックをエージョンとの位置に縦に並べる
3.2を繰り返しながら四角5×5になるように一周したい
□□□□□
□ □
□ □
□ □
□□□□□
上記のような形にしたい
なぜかエージェントが途中までで止まってしまう。
なぜかわかるかたご教授ください。
let l_stones: number[] = [] let index = 0 let A0: Position = null player.onChat("comehere", function () { agent.teleportToPlayer() }) player.onChat("1", function () { for (let index2 = 0; index2 < 4; index2++) { _1() } }) function _1 () { l_stones = [STONE, GRASS, WOOL] for (let index2 = 0; index2 < 5; index2++) { index = 0 A0 = agent.getPosition() for (let index2 = 0; index2 < l_stones.length; index2++) { blocks.place(l_stones[index], positions.add( A0, pos(0, index, 0) )) index += 1 } agent.move(FORWARD, 2) } agent.turn(RIGHT_TURN) }
マインクラフト用のタグ「Minecraft」がありますので、追加されることをお勧めします

回答1件
あなたの回答
tips
プレビュー