このページでは、世界的に人気なゲーム「Minecraft」でfunctionコマンド(スクリプトを実行するコマンド)で拠点を瞬時に建築する方法について紹介します(PCのJava版を想定)。
functionコマンドで拠点を瞬時に建築する
はじめに
Minecraftでは「コマンド」という操作が可能です。これはコマンドライン(チャット欄)でスラッシュから始まる一連のコマンドを実行できる機能です。これを上手く使えば建築や整地が大幅に省力化できます。ただ、複数のコマンドをいちいち入力するのは面倒なので、スクリプトとしてまとめて実行できると便利です。そこでMinecraftのfunction機能の出番です。
function機能のセットアップ作業については「Minecraftでスクリプトやプログラムを実行する方法」のページを参考にして下さい。以下では、編集したスクリプトを用いて拠点を瞬時に建築するfunctionの例を紹介します。
※実行可能な関数の候補をTabキーで選択できますが、新しく追加したfunctionの名前が表示されないときはファイルの変更が反映されていないので、ゲーム内で \reload コマンドを実行してファイルを再読み込みして下さい。
拠点①:東屋風の拠点
現在位置の南東側に10マス四方程度の東屋風の簡素な拠点を建築します。
fill ~1 ~ ~1 ~8 ~4 ~8 minecraft:diorite hollow fill ~ ~5 ~ ~9 ~5 ~9 minecraft:diorite_slab fill ~1 ~1 ~1 ~8 ~3 ~8 minecraft:air fill ~8 ~1 ~8 ~8 ~3 ~8 minecraft:oak_log fill ~8 ~1 ~1 ~8 ~3 ~1 minecraft:oak_log fill ~1 ~1 ~8 ~1 ~3 ~8 minecraft:oak_log fill ~1 ~1 ~1 ~1 ~3 ~1 minecraft:oak_log fill ~ ~ ~2 ~ ~ ~7 minecraft:diorite_stairs[facing= east ] fill ~9 ~ ~2 ~9 ~ ~7 minecraft:diorite_stairs[facing= west ] fill ~2 ~ ~ ~7 ~ ~ minecraft:diorite_stairs[facing= south ] fill ~2 ~ ~9 ~7 ~ ~9 minecraft:diorite_stairs[facing= north ] fill ~ ~4 ~1 ~ ~4 ~8 minecraft:diorite_stairs[facing= east , half= top] fill ~9 ~4 ~1 ~9 ~4 ~8 minecraft:diorite_stairs[facing= west , half= top] fill ~1 ~4 ~ ~8 ~4 ~ minecraft:diorite_stairs[facing= south , half= top] fill ~1 ~4 ~9 ~8 ~4 ~9 minecraft:diorite_stairs[facing= north , half= top] fill ~ ~4 ~ ~ ~4 ~ minecraft:diorite_stairs[facing= east , half= top , shape= outer_left] fill ~9 ~4 ~ ~9 ~4 ~ minecraft:diorite_stairs[facing= west , half= top , shape= outer_left] fill ~ ~4 ~9 ~ ~4 ~9 minecraft:diorite_stairs[facing= north , half= top , shape= outer_right] fill ~9 ~4 ~9 ~9 ~4 ~9 minecraft:diorite_stairs[facing= north , half= top , shape= outer_left] fill ~1 ~3 ~3 ~1 ~3 ~3 minecraft:lantern[hanging= true ] fill ~8 ~3 ~6 ~8 ~3 ~6 minecraft:lantern[hanging= true ]
拠点②:地下室のある拠点
現在位置の北側に20マス四方程度の大きさの小さい拠点を建築します。家風で地下室を備えています。
# fill ~-5 ~ ~ ~5 ~10 ~-12 minecraft:air replace # fill ~-5 ~-1 ~ ~5 ~-1 ~-12 minecraft:grass replace # fill ~-5 ~-6 ~ ~5 ~-2 ~-12 minecraft:stone replace fill ~-1 ~-1 ~ ~1 ~-1 ~-4 minecraft:gravel replace fill ~-5 ~-1 ~-5 ~5 ~4 ~-12 minecraft:oak_planks hollow fill ~-5 ~ ~-5 ~-5 ~3 ~-5 minecraft:oak_log replace fill ~-5 ~ ~-12 ~-5 ~3 ~-12 minecraft:oak_log replace fill ~5 ~ ~-5 ~5 ~3 ~-5 minecraft:oak_log replace fill ~5 ~ ~-12 ~5 ~3 ~-12 minecraft:oak_log replace fill ~-5 ~-5 ~-5 ~5 ~-1 ~-12 minecraft:cobblestone hollow fill ~-5 ~4 ~-5 ~5 ~4 ~-12 minecraft:stone_slab replace setblock ~-5 ~4 ~-5 minecraft:cobblestone setblock ~-5 ~4 ~-12 minecraft:cobblestone setblock ~5 ~4 ~-5 minecraft:cobblestone setblock ~5 ~4 ~-12 minecraft:cobblestone fill ~ ~ ~-5 ~ ~1 ~-5 minecraft:air replace fill ~ ~-4 ~-11 ~ ~5 ~-11 minecraft:cobblestone replace fill ~ ~-4 ~-10 ~ ~5 ~-10 minecraft:ladder[facing=south] replace fill ~-4 ~1 ~-5 ~-2 ~2 ~-5 minecraft:glass_pane fill ~4 ~1 ~-5 ~2 ~2 ~-5 minecraft:glass_pane fill ~-5 ~1 ~-7 ~-5 ~2 ~-7 minecraft:glass_pane fill ~-5 ~1 ~-10 ~-5 ~2 ~-10 minecraft:glass_pane fill ~5 ~1 ~-7 ~5 ~2 ~-7 minecraft:glass_pane fill ~5 ~1 ~-10 ~5 ~2 ~-10 minecraft:glass_pane fill ~-4 ~ ~-4 ~-2 ~ ~-4 minecraft:grass_block replace fill ~-4 ~1 ~-4 ~-2 ~1 ~-4 minecraft:flower_pot replace fill ~-4 ~ ~-3 ~-2 ~ ~-3 minecraft:oak_trapdoor[facing=south, open=true] replace setblock ~-5 ~ ~-4 minecraft:oak_trapdoor[facing=west, open=true] replace setblock ~-1 ~ ~-4 minecraft:oak_trapdoor[facing=east, open=true] replace fill ~2 ~ ~-4 ~4 ~ ~-4 minecraft:grass_block replace fill ~2 ~1 ~-4 ~4 ~1 ~-4 minecraft:flower_pot replace fill ~2 ~ ~-3 ~4 ~ ~-3 minecraft:oak_trapdoor[facing=south, open=true] replace setblock ~1 ~ ~-4 minecraft:oak_trapdoor[facing=west, open=true] replace setblock ~5 ~ ~-4 minecraft:oak_trapdoor[facing=east, open=true] replace setblock ~ ~2 ~-6 minecraft:wall_torch[facing=north] setblock ~ ~-2 ~-6 minecraft:wall_torch[facing=north] setblock ~-5 ~5 ~-5 minecraft:torch setblock ~-5 ~5 ~-12 minecraft:torch setblock ~5 ~5 ~-5 minecraft:torch setblock ~5 ~5 ~-12 minecraft:torch setblock ~-4 ~ ~-6 minecraft:chest[facing=east] replace fill ~-4 ~ ~-8 ~-4 ~ ~-9 minecraft:chest[facing=east] replace setblock ~-4 ~ ~-11 minecraft:chest[facing=east] replace setblock ~4 ~ ~-6 minecraft:dark_oak_stairs[facing=east] replace setblock ~4 ~ ~-7 minecraft:crafting_table replace setblock ~4 ~ ~-8 minecraft:dark_oak_stairs[facing=east] replace setblock ~4 ~ ~-9 minecraft:dark_oak_stairs[facing=east] replace setblock ~4 ~ ~-10 minecraft:cauldron replace setblock ~4 ~ ~-11 minecraft:dark_oak_stairs[facing=east] replace fill ~-1 ~ ~-11 ~-1 ~1 ~-11 minecraft:furnace[facing=south] replace fill ~1 ~ ~-11 ~1 ~1 ~-11 minecraft:furnace[facing=south] replace fill ~-4 ~-4 ~-6 ~-4 ~-3 ~-6 minecraft:coal_block replace setblock ~-4 ~-4 ~-7 minecraft:coal_block replace setblock ~-3 ~-4 ~-6 minecraft:coal_block replace setblock ~-3 ~-4 ~-8 minecraft:coal_block replace fill ~4 ~-4 ~-6 ~4 ~-3 ~-6 minecraft:oak_log replace setblock ~4 ~-4 ~-7 minecraft:oak_log replace setblock ~3 ~-4 ~-6 minecraft:oak_log replace setblock ~4 ~-4 ~-9 minecraft:oak_log replace