ワールド起動と基本インフラ
Fantasy ワールドを生成し、スポーンや戻り台、ボーダーなど最低限の基盤を整えます。
Fantasy World Manager に関する管理・集約処理を担当します。
com.example.rankingplugin.fantasyfantasy/FantasyWorldManager.javaclassクラス直前の Javadoc は見つかりませんでした。ソースとメソッド構成から責務を補完しています。
Fantasy ワールドの生成器兼プリセット投入器で、ワールド初期化、ジョブキュー、進捗管理、大規模地形/街区構築、ミニゲーム prefab 配置が一体化しています。
initconfigureWorldscheduleInitialSetpiecesscheduleExpansionnewJobenqueueWithProgressstartProgressTickerscheduleConcentricCityLayersrunPresetAllscheduleMinigamePrefabsFantasy ワールドを生成し、スポーンや戻り台、ボーダーなど最低限の基盤を整えます。
大規模配置を一気にやらずジョブへ分割し、進捗をプレイヤーへ見せる仕組みです。生成系を触るならここを先に把握すると安全です。
同心円状の街や池、木、広場など、地形と建造物をまとめて積み上げる部分です。
Fantasy ワールド内へ遊び場を自動配置する部分です。Prefab 追加時はここへ差し込みます。
ワールド生成直後に最低限必要な地面と帰還導線を作り、その後で大きな生成ジョブへ進みます。初期スポーンが危険になる不具合はこの流れで起きやすいです。
重い処理を細かな task へ割ることで、進捗表示とサーバ負荷の両方を制御しています。巨大建築追加時はこの流儀に合わせると安全です。
scheduleMinigamePrefabsWithArenaswhenTaskFinished空き地探索をしてから prefab を置くため、雑に座標固定していません。施設が重なる問題は空き地判定側を見ます。
| Signature | 説明 | 主要呼び出し |
|---|---|---|
public FantasyWorldManager(JavaPlugin plugin) | 依存オブジェクトや初期状態を受け取り、このクラスの動作を開始できる状態へ組み立てます。 | getServer → getPluginManager → registerEvents → getCommand → setExecutor → setTabCompleter |
| Name | Visibility | Kind | 説明 |
|---|---|---|---|
| FantasyWorldManager | public | コンストラクタ | 依存オブジェクトや初期状態を受け取り、このクラスの動作を開始できる状態へ組み立てます。 |
| setBorderRadius | private | メソッド | setBorderRadius の主要処理を担当します。 |
| init | public | メソッド | 初期化と各種登録を行い、機能を有効化します。 |
| buildReturnPad | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| fantasyHubSpawn | private | メソッド | fantasyHubSpawn の主要処理を担当します。 |
| configureWorld | private | メソッド | configureWorld の主要処理を担当します。 |
| ensureHubPlatform | private | メソッド | 必要なテーブル・状態・前提条件が揃っているかを確認し、不足分を補います。 |
| scheduleInitialSetpieces | private | メソッド | scheduleInitialSetpieces の主要処理を担当します。 |
| scheduleExpansion | private | メソッド | scheduleExpansion の主要処理を担当します。 |
| scheduleExpansion | private | メソッド | scheduleExpansion の主要処理を担当します。 |
| spawnInRing | private | メソッド | rMin~rMax のリング帯に n 個散布(dist は r^0. |
| topCenter | private | メソッド | topCenter の主要処理を担当します。 |
| newJob | private | メソッド | 新しいジョブを作成して管理下に置く |
| whenJobFinished | private | メソッド | whenJobFinished の主要処理を担当します。 |
| whenTaskFinished | private | メソッド | whenTaskFinished の主要処理を担当します。 |
| enqueueWithProgress | private | メソッド | enqueueWithProgress の主要処理を担当します。 |
| enqueueWithProgress | private | メソッド | 進捗を加味してタスクを投入(weight は“作業量”の目安) |
| enqueueMilestoned | private | メソッド | enqueueMilestoned の主要処理を担当します。 |
| enqueueMilestonedRet | private | メソッド | enqueueMilestonedRet の主要処理を担当します。 |
| scheduleConcentricCityLayers | private | メソッド | 同心円レイヤー:リング道路 + 家の塊をリング毎に配置し、最後に放射道路を敷く |
| startProgressTicker | private | メソッド | 40tickごとに全ジョブの%をログ/チャットへ出す |
| currentBorderRadius | private | メソッド | currentBorderRadius の主要処理を担当します。 |
| runPresetCity | private | メソッド | runPresetCity の主要処理を担当します。 |
| runPresetAll | private | メソッド | runPresetAll の主要処理を担当します。 |
| buildPondGroundTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildPondCurbRingTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildTreeBasePadTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| patchGroundUnderBasins | private | メソッド | patchGroundUnderBasins の主要処理を担当します。 |
| onCommand | public | メソッド | onCommand の主要処理を担当します。 |
| scheduleMinigamePrefabsWithArenas | private | メソッド | scheduleMinigamePrefabsWithArenas の主要処理を担当します。 |
| buildParkourPrefabTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| findFirstClearDisk | private | メソッド | 近場から円形エリアが“空”の地点を探索して返す。 |
| isDiskAirAbove | private | メソッド | y 高さの円盤 r の上が高さ h まで“空気”(AIR/LIGHTなど無害ブロックのみ)なら true |
| onTabComplete | public | メソッド | onTabComplete の主要処理を担当します。 |
| prefixFilter | private | メソッド | prefixFilter の主要処理を担当します。 |
| scheduleMinigamePrefabs | private | メソッド | scheduleMinigamePrefabs の主要処理を担当します。 |
| findEmptySpot | private | メソッド | 必要な状態を取得し、呼び出し側で利用しやすい形へ返します。 |
| isRectClear | private | メソッド | 条件判定を行い、後続処理の分岐に使える真偽値を返します。 |
| buildGomokuBoardTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildMoleWhackTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildMemoryTilesTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildTetraPitTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildArcheryPrefabTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildElytraRingsPrefabTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildKothPrefabTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
| buildMobRushPrefabTask | private | メソッド | 表示用または出力用のデータを組み立てます。 |
public FantasyWorldManager(JavaPlugin plugin)依存オブジェクトや初期状態を受け取り、このクラスの動作を開始できる状態へ組み立てます。
JavaPlugin pluginなし
private void setBorderRadius(int radius)setBorderRadius の主要処理を担当します。
int radiusなし
public void init()初期化と各種登録を行い、機能を有効化します。
なし
private Location buildReturnPad(World w, int y)表示用または出力用のデータを組み立てます。
World wint yなし
private Location fantasyHubSpawn()fantasyHubSpawn の主要処理を担当します。
なし
private static void configureWorld(World w)configureWorld の主要処理を担当します。
World wなし
private static Location ensureHubPlatform(World w, int y)必要なテーブル・状態・前提条件が揃っているかを確認し、不足分を補います。
World wint yなし
private void scheduleInitialSetpieces()scheduleInitialSetpieces の主要処理を担当します。
なし
private void scheduleExpansion(int radius, int count)scheduleExpansion の主要処理を担当します。
int radiusint countなし
private void scheduleExpansion(int radius, int count, GenerationJob job)scheduleExpansion の主要処理を担当します。
int radiusint countGenerationJob jobなし
private void spawnInRing(java.util.Random r, int rMin, int rMax, int n, GenerationJob job)rMin~rMax のリング帯に n 個散布(dist は r^0.
java.util.Random rint rMinint rMaxint nGenerationJob jobなし
private static Location topCenter(World w, int bx, int by, int bz, float yaw, float pitch)topCenter の主要処理を担当します。
World wint bxint byint bzfloat yawfloat pitchなし
private GenerationJob newJob(String label, CommandSender reply)新しいジョブを作成して管理下に置く
String labelCommandSender replyなし
private void whenJobFinished(GenerationJob job, Runnable next)whenJobFinished の主要処理を担当します。
GenerationJob jobRunnable nextなし
private void whenTaskFinished(BuildScheduler.BuildTask task, Runnable next)whenTaskFinished の主要処理を担当します。
BuildScheduler.BuildTask taskRunnable nextなし
private void enqueueWithProgress(GenerationJob job, int weight, BuildScheduler.BuildTask task)enqueueWithProgress の主要処理を担当します。
GenerationJob jobint weightBuildScheduler.BuildTask taskなし
private void enqueueWithProgress(GenerationJob job, int weight, Runnable submitter)進捗を加味してタスクを投入(weight は“作業量”の目安)
GenerationJob jobint weightRunnable submitterなし
private void enqueueMilestoned(GenerationJob job, int weightPerMilestone, String label, long estimatedTotal, int milestoneBlocks, BuildScheduler.BuildTask rawTask, CommandSender notify)enqueueMilestoned の主要処理を担当します。
GenerationJob jobint weightPerMilestoneString labellong estimatedTotalint milestoneBlocksBuildScheduler.BuildTask rawTaskCommandSender notifyなし
private MilestonedTask enqueueMilestonedRet( GenerationJob job, int weightPerMilestone, String label, long estimatedTotal, int milestoneBlocks, BuildScheduler.BuildTask rawTask, CommandSender notify)enqueueMilestonedRet の主要処理を担当します。
GenerationJob jobint weightPerMilestoneString labellong estimatedTotalint milestoneBlocksBuildScheduler.BuildTask rawTaskCommandSender notifyなし
private void scheduleConcentricCityLayers(int usableR, int y, GenerationJob job, CommandSender reply)同心円レイヤー:リング道路 + 家の塊をリング毎に配置し、最後に放射道路を敷く
int usableRint yGenerationJob jobCommandSender replyなし
private void startProgressTicker()40tickごとに全ジョブの%をログ/チャットへ出す
なし
private int currentBorderRadius()currentBorderRadius の主要処理を担当します。
なし
private void runPresetCity(int radius, int y, Long seedOverride, CommandSender reply)runPresetCity の主要処理を担当します。
int radiusint yLong seedOverrideCommandSender replyなし
private GenerationJob runPresetAll(int radius, int y, Integer countOverride, Long seedOverride, CommandSender reply)runPresetAll の主要処理を担当します。
int radiusint yInteger countOverrideLong seedOverrideCommandSender replyなし
private BuildScheduler.BuildTask buildPondGroundTask(Location c, int baseY, int r, int thickness, Material floor)表示用または出力用のデータを組み立てます。
Location cint baseYint rint thicknessMaterial floorなし
private BuildScheduler.BuildTask buildPondCurbRingTask(Location c, int r, Material curb)表示用または出力用のデータを組み立てます。
Location cint rMaterial curbなし
private BuildScheduler.BuildTask buildTreeBasePadTask(Location c, int y, int radius)表示用または出力用のデータを組み立てます。
Location cint yint radiusなし
private BuildScheduler.BuildTask patchGroundUnderBasins(Location center, int y, int searchR, Material fill, int lookUpHeight)patchGroundUnderBasins の主要処理を担当します。
Location centerint yint searchRMaterial fillint lookUpHeightなし
public boolean onCommand(CommandSender s, Command cmd, String label, String[] args)onCommand の主要処理を担当します。
CommandSender sCommand cmdString labelString[] argsなし
private void scheduleMinigamePrefabsWithArenas(int radius, int groundY, GenerationJob job)scheduleMinigamePrefabsWithArenas の主要処理を担当します。
int radiusint groundYGenerationJob jobなし
private BuildScheduler.BuildTask buildParkourPrefabTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private Location findFirstClearDisk(Location centerYFixed, int r, int from, int to, int ringStep, int angleStepDeg)近場から円形エリアが“空”の地点を探索して返す。
Location centerYFixedint rint fromint toint ringStepint angleStepDegなし
private boolean isDiskAirAbove(World w, int cx, int y, int cz, int r, int h)y 高さの円盤 r の上が高さ h まで“空気”(AIR/LIGHTなど無害ブロックのみ)なら true
World wint cxint yint czint rint hなし
public List<String> onTabComplete(CommandSender s, Command cmd, String alias, String[] args)onTabComplete の主要処理を担当します。
CommandSender sCommand cmdString aliasString[] argsなし
private static java.util.List<String> prefixFilter(java.util.Collection<String> src, String token)prefixFilter の主要処理を担当します。
java.util.Collection<String> srcString tokenなし
private void scheduleMinigamePrefabs(int radius, int groundY, GenerationJob job)scheduleMinigamePrefabs の主要処理を担当します。
int radiusint groundYGenerationJob jobなし
private org.bukkit.Location findEmptySpot(int radius, int groundY, int w, int d, int hClear)必要な状態を取得し、呼び出し側で利用しやすい形へ返します。
int radiusint groundYint wint dint hClearなし
private boolean isRectClear(World w, int x1, int z1, int x2, int z2, int y, int hClear)条件判定を行い、後続処理の分岐に使える真偽値を返します。
World wint x1int z1int x2int z2int yint hClearなし
private BuildScheduler.BuildTask buildGomokuBoardTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildMoleWhackTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildMemoryTilesTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildTetraPitTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildArcheryPrefabTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildElytraRingsPrefabTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildKothPrefabTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
private BuildScheduler.BuildTask buildMobRushPrefabTask(org.bukkit.Location c, int y)表示用または出力用のデータを組み立てます。
org.bukkit.Location cint yなし
FantasyWorldManager → getServer → getPluginManager → registerEvents → getCommand → setExecutoronCommand → teleportToFantasia → fantasyHubSpawn → sendTitle → playSound → toLowerCaseonTabComplete → getName → equalsIgnoreCase → prefixFilter → toLowerCase → valueOfstartProgressTicker → run → isEmpty → cancel → values → maxinit → environment → type → generator → createWorld → configureWorldbuildArcheryPrefabTask → getBlockX → getBlockZ → getWorld → getDataFolder → exists