さいさい

こんな感じで、第一形態は歩行、第二形態は飛行する系のモブ作って

1 image attached
Kodari AI
KodariAug 31 at 11:08 am 2
DualPhaseMob
Creates a custom mob with two distinct phases: a walking ground form and a flying aerial form. The mob automatically transitions between phases based on combat conditions, health thresholds, or player proximity. The walking phase features melee attacks and ground-based navigation, while the flying phase enables aerial mobility, swooping attacks, and ranged abilities. Includes configurable phase transition triggers, visual effects for transformation, custom attributes per phase, and full boss-bar or health display integration. Designed for Minecraft plugins, offering spawn commands, phase-specific AI behaviors, and seamless integration with existing server mechanics.

以下の構成で作成します。

  1. Paperプラグインのビルド・マニフェストを作成

  2. 第一形態を歩行するHusk、第二形態を飛行するVexとして実装

  3. 体力割合で自動変身し、氷系パーティクル・鈍足効果・ターゲット追跡を追加

  4. /frostwraith [player] コマンドと設定ファイルを追加

実装しました。

  • 第一形態:Huskとして地上を歩行

  • 体力50%以下で第二形態へ変身

  • 第二形態:Vexとして飛行し、対象プレイヤーを追跡

  • 変身時に雪・エンドロッドの氷系パーティクルを表示

  • 第二形態の攻撃で鈍足効果を付与

  • /frostwraith [player] で召喚

  • 体力・攻撃力・名前・変身条件は config.yml で変更可能

権限は frostwraith.admin、デフォルトではOPのみ使用できます。

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 428
src/main/java/com/kodari/frostwraith/FrostWraithPlugin.java
package com.kodari.frostwraith;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class FrostWraithPlugin extends JavaPlugin {

    private FrostWraithManager manager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        manager = new FrostWraithManager(this);
        FrostWraithCommand command = new FrostWraithCommand(manager);
        getCommand("frostwraith").setExecutor(command);
        getCommand("frostwraith").setTabCompleter(command);
        Bukkit.getPluginManager().registerEvents(new FrostWraithListener(manager), this);

        Bukkit.getScheduler().runTaskTimer(this, manager::tick, 1L, 5L);
    }

    @Override
    public void onDisable() {
        if (manager != null) {
            manager.shutdown();
        }
    }
}