mfs2024-official @ ウィキ
Season 0
最終更新:
mfs2024-official
-
view
Season 0 サーバ設定
以下の理由で、各シーズンのサーバ設定内容を書き残す。
- 次シーズンのサーバ設定について、運営内で合意を取る
- 今シーズンのサーバ設定を確認する
- 来シーズン以降のサーバ設定の参考にする
導入Mod
- MirrageFairy2024 (https://modrinth.com/mod/miragefairy2024)
- 主要Mod
- Applied Energistics 2 (https://www.curseforge.com/minecraft/mc-mods/applied-energistics-2)
- アイテム倉庫・自動加工ラインを追加
- KubeJS (https://kubejs.com/)
- 生活環境をユーザー毎に変えるため、ユーザー毎に初期リスポーン位置を変更する
各種コンフィグ変更箇所
Minecraft本体
- "keepInventory"をonに変更する
MirrageFairy 2024
変更なし
Applied Energistics 2
- "channels"設定を"infinite"に変更 (チャンネル使用可能数を無制限に変更)
KubeJS
- プレイヤー側:変更なし
- サーバー側:"kubejs/server_scripts/custom_respawn.js"に以下のスクリプトを追加 (コマンドブロックにコマンドを貼り付け、ユーザー毎に初期リスポーン位置をばらけさせる)
// シードから乱数生成器を作る関数 // https://stackoverflow.com/a/47593316 function sfc32(a, b, c, d) { return function() { a |= 0; b |= 0; c |= 0; d |= 0; let t = (a + b | 0) + d | 0; d = d + 1 | 0; a = b ^ b >>> 9; b = c + (c << 3) | 0; c = (c << 21 | c >>> 11); c = c + t | 0; return (t >>> 0) / 4294967296; } } ServerEvents.customCommand('custom_respawn', event => { // プレイヤー情報出力 const player = event.player.name.string; console.log(`Player = ${player}`); // プレイヤーのUUIDを取得 const uuid = event.player.uuid; console.log(`UUID = ${uuid.toString()}`); // UUIDからシードを生成 const hash = uuid.hashCode(); console.log(`Hash = ${hash}`); // シードから乱数生成器を生成 const rand1 = sfc32(hash, hash, hash, hash); const rand1Int = () => Math.floor(rand1() * 4294967296); const rand = sfc32(rand1Int(), rand1Int(), rand1Int(), rand1Int()); // 念のため乱数生成器を攪拌 for (let i = 0; i < 100; i++) { rand(); } // プレイヤーを壁に埋まらないような座標にテレポート const dimension = 'minecraft:overworld'; const x = Math.floor(rand() * 20000 - 10000); const z = Math.floor(rand() * 20000 - 10000); event.server.runCommand(`execute in ${dimension} run tp ${player} ${x} 260 ${z}`); // プレイヤーが落下ダメージを受けないようにする event.server.runCommand(`effect give ${player} minecraft:slow_falling 60`); }); // コマンドブロックに貼り付けるコマンド例 // execute as @p[limit=1,distance=0..3] run kubejs custom_command custom_respawn // これでプレイヤーが隣接して設置された石の感圧床を踏むと、プレイヤーが飛ばされるはず
完走した感想
シーズン未終了