メインコンテンツまでスキップ

Lua APIリファレンス

このリファレンスは、稼働中のMagmaCore、FreeMinecraftModels、EliteMobsのLuaテーブルビルダー、エンリッチャー、ランタイムコンテキストリゾルバーから生成されています。

Entity Table

MagmaCoreのentityテーブルは汎用エンティティ値の基底です。Living Entity、Player、FreeMinecraftModels Propの各テーブルはこれを継承します。

Properties

フィールド説明
uuidstringエンティティのUUID。
entity_typestring小文字のBukkitエンティティタイプ。
is_validbool現在の有効性の値。
is_deadbool現在の死亡状態。
current_locationtable/nil現在の {x, y, z, yaw, pitch, world} ロケーション。
worldstring/nil現在のワールド名。
is_playerboolエンティティがプレイヤーかどうか。
is_hostileboolエンティティがBukkitの Monster を実装しているかどうか。
is_passiveboolエンティティがBukkitの Animals を実装しているかどうか。

Methods

メソッド引数戻り値説明
teleport(location)tablenillocationテーブルの位置へテレポートする。
remove()nilまだ有効であればエンティティを削除する。
set_silent(enabled)boolnilサイレント状態を設定する。
set_invulnerable(enabled)boolnil無敵状態を設定する。
set_gravity(enabled)boolnil重力の状態を設定する。
set_glowing(enabled)boolnil発光状態を設定する。

Entity Table: EliteMobs Enrichment

稼働中のEliteMobsエンリッチャーは、MagmaCoreのentityテーブルに以下の値を追加します。eliteis_elite がtrueのときにのみ存在します。

Properties

フィールド説明
is_eliteboolEliteMobsが現在そのエンティティを追跡しているかどうか。
is_custom_bossbool追跡中のエリートがカスタムボスかどうか。
is_significant_bossbool体力倍率が 1 を超えるカスタムボスかどうか。
elitetable/nilネストされた稼働中のEliteMobsデータ。解決済みのエリートに対してのみ存在する。
elite.levelintエリートレベルのスナップショット。
elite.namestring/nilエリートの表示名のスナップショット。
elite.healthnumber現在の体力。
elite.max_healthnumber現在の最大体力。
elite.is_custom_bossboolそのエリートがカスタムボスかどうか。
elite.health_multipliernumber設定された体力倍率のスナップショット。
elite.damage_multipliernumber設定されたダメージ倍率のスナップショット。

Methods

メソッド引数戻り値説明
elite.remove()nilEliteMobsの削除パイプラインを通してエリートを削除する。

Entity Table: FreeMinecraftModels Enrichment

稼働中のFreeMinecraftModelsエンリッチャーは以下の値を追加します。modelis_modeled がtrueのときにのみ存在し、プレイヤー専用の値はプレイヤーテーブルにのみ現れます。

Properties

フィールド説明
is_modeledboolFreeMinecraftModelsがモデル付きエンティティとして解決するかどうか。
is_propboolエンティティがアーマースタンドを基盤とするFreeMinecraftModelsのpropかどうか。
modeltable/nilネストされたモデルデータ。モデル付きエンティティに対してのみ存在する。
model.model_idstring/nilモデルブループリントの識別子。
model.is_dynamicboolモデル付きエンティティが動的かどうか。
is_opboolプレイヤー専用のサーバーオペレーター状態。

Methods

メソッド引数戻り値説明
model.play_animation(name, blend?=false, loop?=false)string, bool?=false, bool?=falseboolモデルアニメーションを再生し、開始したかどうかを返す。
model.stop_animations()nil現在のモデルアニメーションをすべて停止する。
model.remove()nilモデル付きエンティティを削除する。
has_permission(node)stringboolプレイヤー専用の権限チェック。

Living Entity Table

MagmaCoreのliving entityテーブルは、Entity Tableのすべてのプロパティとメソッドを継承します。

Properties

フィールド説明
healthnumber現在の体力。
maximum_healthnumber現在の最大体力。
namestring/nil現在のBukkitエンティティ名。
is_aliveboolBukkitの死亡状態を現在時点で反転した値。

Methods

メソッド引数戻り値説明
damage(amount)numbernilBukkitのダメージを与える。
push(x, y, z)number, number, numbernil現在の速度にベクトルを加算する。
set_facing(x, y, z)number, number, numbernil方向ベクトルの向きを向かせる。
add_potion_effect(type, duration, amplifier)string (PotionEffectType), int, intniltypeが解決できた場合にポーション効果を追加する。
remove_potion_effect(type)string (PotionEffectType)niltypeが解決できた場合にポーション効果を除去する。
get_scale()numberscale属性を返す。利用できない場合は 1.0
set_scale(value)numbernilサーバーが対応している場合にscale属性を設定する。

Player Table

MagmaCoreのplayerテーブルは、Living Entity Tableのすべてのプロパティとメソッドを継承します。

Properties

フィールド説明
game_modestring小文字のBukkitゲームモードのスナップショット。

Methods

メソッド引数戻り値説明
send_message(text)stringnilMagmaCoreのカラーコードパーサーで処理したテキストを送信する。
get_held_item()table/nilメインハンドのアイテムの {type, amount, display_name} を返す。空の手の場合はnil。
consume_held_item(amount?=1)int?=1nilメインハンドのスタックを減らす処理をキューに入れる。
has_item(material, amount?=1)string (Material), int?=1boolインベントリに指定数量が含まれるかを判定する。
get_target_entity(range?=50)number?=50table/nilプレイヤーが見ているエンティティをレイキャストで取得する。
get_eye_location()table目の高さのロケーションを返す。
get_look_direction()table単位ベクトルの {x, y, z} 方向を返す。
send_block_change(x, y, z, material, ticks?=-1)int, int, int, string (Material), int?=-1boolクライアント側にのみ見えるブロックを送信し、ticksが正の値ならその後リセットする。無効なマテリアルやブロックでないマテリアルの場合はfalseを返す。
reset_block(x, y, z)int, int, intboolこのプレイヤーに対して実際のブロックを復元する処理をキューに入れる。
sleep(x, y, z)number, number, numbernil強制的な睡眠アニメーションをキューに入れ、起床後に置き換えたブロックを復元する。
wake_up()nil睡眠中であればプレイヤーを起こす処理をキューに入れる。
show_boss_bar(text, color?=WHITE, progress, ticks?=-1)string, string (BarColor)?=WHITE, number, int?=-1nilプレイヤーの現在のソリッドなボスバーを置き換え、ticksが正の値ならその後非表示にする。
hide_boss_bar()nilプレイヤーの現在のLuaボスバーを削除する。
show_action_bar(text, ticks?=-1)string, int?=-1nil一度だけ送信するか、正の継続時間が終わるまで40ticksごとに繰り返す。
show_title(title, subtitle?="", fade_in, stay, fade_out)string, string?="", int, int, intnilカラーコード処理されたタイトルとサブタイトルを表示する。

World Table

MagmaCoreのworldテーブルは context.world として公開されます。EliteMobsのボスパワーはこれを継承し、後述のオーバーライドを適用します。

Properties

フィールド説明
namestringワールド名のスナップショット。

Methods

メソッド引数戻り値説明
get_block_at(x, y, z)int, int, intstring小文字のMaterial名を返す。未読み込みのチャンクを読み込むことはなく、その場合は air を返す。
set_block_at(x, y, z, material)int, int, int, string (Material)boolブロック設置をキューに入れる。無効なマテリアルはfalseを返し、未読み込みのチャンクはキューされたタスクによりスキップされる。
get_highest_block_y(x, z)int, intint最も高いブロックのY座標を返す。
spawn_particle(particle, x, y, z, count?=1, dx?=0, dy?=0, dz?=0, speed?=0)string (Particle), number, number, number, int?=1, number?=0, number?=0, number?=0, number?=0nilパーティクルを生成する。無効な名前の場合は何も起きない。
play_sound(sound, x, y, z, volume?=1, pitch?=1)string (Sound), number, number, number, number?=1, number?=1nil登録済みのサウンド、または小文字の名前空間付きリソースパックサウンドキーを再生する。
strike_lightning(x, y, z)number, number, numbernil落雷を発生させる。
get_time()intワールド時間をtick単位で返す。
set_time(ticks)intnilワールド時間を設定する。
get_nearby_entities(x, y, z, radius)number, number, number, numbertable付近のEntityテーブルまたはLiving Entityテーブルを返す。
get_nearby_players(x, y, z, radius)number, number, number, numbertable付近のPlayerテーブルを返す。
spawn_entity(type, x, y, z)string (EntityType), number, number, numbertable/nilバニラのエンティティをスポーンさせる。無効なタイプの場合はnilを返す。
raycast(from_x, from_y, from_z, dir_x, dir_y, dir_z, max_distance?=50)number, number, number, number, number, number, number?=50tablehit_entityhit_locationhit_block の値を返す。
place_temporary_block(x, y, z, material, ticks?=0, require_air?=false)int, int, int, string (Material), int?=0, bool?=falsebool一時ブロックを設置する。無効なマテリアルや未読み込みのチャンクの場合はfalseを返す。
drop_item(x, y, z, material, amount?=1)number, number, number, string (Material), int?=1table/nilアイテムを自然にドロップし、そのEntity Tableを返す。無効なマテリアルの場合はnilを返す。
spawn_firework(x, y, z, colors, type?=BALL, power?=1)number, number, number, table, string (FireworkEffect.Type)?=BALL, int?=1nilBukkitの Color 定数名を使って花火をキューに入れる。1つも解決できない場合は白になる。
strike_lightning_at_location(location)tablenillocationテーブルのワールドで落雷を発生させる。
play_sound_at_location(location, sound, volume?=1, pitch?=1)table, string (Sound), number?=1, number?=1nil登録済みのサウンド、または小文字の名前空間付きリソースパックサウンドキーを再生する。
spawn_particle_at_location(location, particle, count?=1, dx?=0, dy?=0, dz?=0, speed?=0)table, string (Particle), int?=1, number?=0, number?=0, number?=0, number?=0nillocationテーブルのワールドでパーティクルを生成する。
get_block_at_location(location)tablestring小文字のマテリアル名を返す。無効なロケーションや未読み込みのチャンクの場合は air
set_block_at_location(location, material)table, string (Material)boollocationテーブルのワールドでブロック設置をキューに入れる。
place_temporary_block_at_location(location, material, ticks?=0, require_air?=false)table, string (Material), int?=0, bool?=falseboollocationテーブルのワールドに一時ブロックを設置する。
get_highest_block_y_at_location(location)tableint/nil最も高いブロックのY座標を返す。無効なロケーションの場合はnil。

context.world: FreeMinecraftModels Additions

FreeMinecraftModelsはこれらを自身のMagmaCore worldテーブルに登録するため、FreeMinecraftModelsのアイテムスクリプトおよびpropスクリプトの context.world に現れます。いずれのメソッドも、EliteMobsが有効でない場合やプレイヤーが解決できない場合はfalseを返し、location引数が省略されているか使用できない場合はプレイヤーのロケーションにフォールバックします。

Methods

メソッド引数戻り値説明
drop_elitemobs_procedural_loot(player, level, location?)table/string, int, table?boolプレイヤー向けに手続き生成されたEliteMobsアイテムを1つドロップする。手続き生成アイテムのドロップが無効な場合はfalseを返す。
drop_elitemobs_random_loot(player, level, location?)table/string, int, table?bool指定レベルでそのプレイヤー向けにEliteMobsのルートテーブルを抽選する。
drop_elitemobs_custom_loot(player, file, level, location?)table/string, string, int, table?bool指定したEliteMobsカスタムアイテムファイルをプレイヤー向けにドロップする。ファイルが解決できない場合はfalseを返す。

player 引数はplayerテーブル、UUID文字列、または正確なプレイヤー名を受け付けます。location 引数はlocationテーブル、または current_location を持つentityテーブルを受け付けます。

em Helper Table

MagmaCoreは、いずれのスクリプトフックが実行されるよりも前に、このテーブルをグローバルに公開します。

Properties

ヘルパーコンストラクタは以下のコンパクトなデータテーブルを返します。

フィールド説明
location.xnumberem.create_location が返すX座標。
location.ynumberem.create_location が返すY座標。
location.znumberem.create_location が返すZ座標。
location.worldstring/nilem.create_location に渡された場合のワールド名。
location.yawnumber/nilem.create_location に渡された場合のyaw。
location.pitchnumber/nilem.create_location に渡された場合のpitch。
vector.xnumberem.create_vector が返すX成分。
vector.ynumberem.create_vector が返すY成分。
vector.znumberem.create_vector が返すZ成分。
zone.kindstringspheredomecylindercuboidconestatic_rayrotating_raytranslating_ray のいずれか。
zone.radiusnumber/nilsphere、dome、cylinder、coneの半径。
zone.heightnumber/nilcylinderの高さ。
zone.xnumber/nilcuboidのXサイズ。
zone.ynumber/nilcuboidのYサイズ。
zone.znumber/nilcuboidのZサイズ。
zone.lengthnumber/nilconeまたはrayの長さ。
zone.thicknessnumber/nilstatic-rayの太さ。
zone.point_radiusnumber/nilrotating-rayまたはtranslating-rayのポイント半径。
zone.animation_durationnumber/nilrotating-rayまたはtranslating-rayのアニメーション継続時間。
zone.origintable/nilset_center または set_origin で設定されたロケーション。
zone.destinationtable/nilset_destination で設定されたロケーション。

Methods

メソッド引数戻り値説明
em.create_location(x, y, z, world?, yaw?, pitch?)number, number, number, string?, number?, number?tablelocationテーブルを返す。
em.create_vector(x, y, z)number, number, numbertable{x, y, z} のベクトルテーブルを返す。
location.add(dx?=0, dy?=0, dz?=0)number?=0, number?=0, number?=0tableその場で加算し、同じlocationテーブルを返す。
em.zone.create_sphere_zone(radius)numbertableset_center(location) を持つsphere定義を返す。
em.zone.create_dome_zone(radius)numbertableset_center(location) を持つdome定義を返す。
em.zone.create_cylinder_zone(radius, height)number, numbertableset_center(location) を持つcylinder定義を返す。
em.zone.create_cuboid_zone(x, y, z)number, number, numbertableset_center(location) を持つcuboid定義を返す。
em.zone.create_cone_zone(length, radius)number, numbertableset_origin(location)set_destination(location) を持つcone定義を返す。
em.zone.create_static_ray_zone(length, thickness)number, numbertableoriginとdestinationのセッターを持つstatic-ray定義を返す。
em.zone.create_rotating_ray_zone(length, point_radius, animation_duration)number, number, numbertableoriginとdestinationのセッターを持つrotating-ray定義を返す。
em.zone.create_translating_ray_zone(length, point_radius, animation_duration)number, number, numbertableoriginとdestinationのセッターを持つtranslating-ray定義を返す。
zone.set_center(location)tabletable中心を zone.origin として設定し、同じzoneテーブルを返す。
zone.set_origin(location)tabletableoriginを設定し、同じzoneテーブルを返す。
zone.set_destination(location)tabletabledestinationを設定し、同じzoneテーブルを返す。
em.location.is_in_dungeon(location)tablebool登録済みのダンジョン領域と、dungeon の種別を報告するオーナーを判定する。
em.location.is_protected(location)tablebool組み込みのWorldGuard/GriefPreventionアダプターと、プラグインが登録した保護オーナーを判定する。
em.location.owned_by(location, namespace)table, stringboolプラグイン名前空間による所有を判定する。
em.location.owners(location)tabletableオーナー名前空間文字列の配列を返す。
em.location.kinds_at(location)tabletable所有種別の文字列配列を返す。
em.location.has_kind(location, kind)table, stringbool所有種別を判定する。

context.state

すべてのMagmaCoreスクリプトインスタンスは、そのインスタンスの生存期間中維持されるプレーンなLuaテーブルを受け取ります。カウンター、フラグ、タスクID、フック間で共有する値の保持に使用してください。

context.state.counter = (context.state.counter or 0) + 1

context.log

MagmaCore, FreeMinecraftModels, and EliteMobs NPC Methods

メソッド引数戻り値説明
info(message)stringnil共有のLuaプレフィックス付きで情報メッセージをログ出力する。
warn(message)stringnil警告をログ出力する。
error(message)stringnil共有の警告チャンネルを通してログ出力する。

EliteMobs Boss-Power Methods

メソッド引数戻り値説明
info(message)stringnilボスパワーの情報メッセージをログ出力する。
warn(message)stringnil警告をログ出力する。
debug(message)stringnilLuaパワーのデバッグプレフィックス付きで情報メッセージをログ出力する。

context.scheduler

スケジュールされたタスクはスクリプトインスタンスに属し、インスタンスが終了すると同時にキャンセルされます。以下の2系統の命名はいずれも、共有のMagmaCore面とEliteMobsのボスパワーの両方で利用できます。

メソッド引数戻り値説明
run_later(ticks, callback)int, functionint遅延後に一度だけ実行し、BukkitのタスクIDを返す。
run_repeating(delay, interval, callback)int, int, functionint初回遅延の後に繰り返し実行し、タスクIDを返す。
cancel(task_id)intnil所有しているタスクをキャンセルする。
run_after(ticks, callback)int, functionintrun_later のエイリアス。
run_every(interval, callback)int, functionint初回遅延なしで繰り返し実行し、タスクIDを返す。
cancel_task(task_id)intnilcancel のエイリアス。

context.cooldowns

ローカルクールダウンは1つのスクリプトオーナーと定義に対してキー付けされ、グローバルクールダウンは同じオーナー間で共有されます。ローカルキーを省略すると __lua: にスクリプトファイル名を続けたものが使われます。EliteMobsのボスパワーも同じメソッド名を公開しますが、ローカル値はボスの共有クールダウンストアを使用し、グローバル値は組み込みのパワークールダウンを使用します。

メソッド引数戻り値説明
local_ready(key?)string?bool指定キーのローカルクールダウンが準備完了かを判定する。
local_remaining(key?)string?int残りticksを返す。準備完了の場合は 0
check_local(key, duration)string/nil, intbool準備完了ならクールダウンを開始してtrueを返す。デフォルトキーを使う場合はnilを渡す。
set_local(duration, key?)int, string?nilローカルクールダウンを設定または解除する。0以下の値を渡すと解除される。
global_ready()boolオーナーのグローバルクールダウンが準備完了かを判定する。
set_global(duration)intnilグローバルクールダウンをtick単位で設定する。共有のMagmaCore面では0以下の値を渡すと解除される。

context.zones: Shared MagmaCore Surface

FreeMinecraftModelsスクリプト、EliteMobsのNPCスクリプト、その他のデフォルトのMagmaCoreコンシューマは、現在のスクリプトオーナーのワールド内で整数のゾーンハンドルを受け取ります。

メソッド引数戻り値説明
create_sphere(x, y, z, radius)number, number, number, numberint/nilsphereを登録してそのハンドルを返す。オーナーにワールドがない場合はnil。
create_cylinder(x, y, z, radius, height)number, number, number, number, numberint/nilcylinderを登録してそのハンドルを返す。オーナーにワールドがない場合はnil。
create_cuboid(x, y, z, x_size, y_size, z_size)number, number, number, number, number, numberint/nilcuboidを登録してそのハンドルを返す。オーナーにワールドがない場合はnil。
watch(handle, on_enter?, on_leave?)int, function?, function?bool/nil既知のハンドルに対して境界の追跡を有効にする。関数を渡すと対応する on_zone_enter または on_zone_leave フックが有効になる。渡した関数の本体が直接呼び出されるわけではない。
unwatch(handle)intnil追跡を停止してハンドルを削除する。

汎用のゾーンフックでは、境界を越えたプレイヤーが context.playercontext.event.player から取得できます。

context.event: Shared MagmaCore Surface

このテーブルは、共有フックが現在のBukkitイベントまたはアクターを持っている間だけ存在します。スケジュールされたコールバックや、いずれの値も持たないフックには存在しません。

フィールドまたはメソッド説明
is_cancelledboolcontextテーブルが構築された時点でのキャンセル状態。cancel()uncancel() を呼んでもこのフィールドは更新されない。
cancel()method現在のイベントをキャンセルする。Bukkitの Cancellable を実装している場合にのみ存在する。
uncancel()method現在のイベントのキャンセルを取り消す。Bukkitの Cancellable を実装している場合にのみ存在する。
playertable現在のアクターが取得できる場合の、そのアクターのLiving Entity Table。

汎用のゾーンフックはアクターを提供しますがキャンセル可能なBukkitイベントは提供しないため、is_cancelled = falseplayer は公開されますが cancel()uncancel() は存在しません。

context.item

FreeMinecraftModelsのアイテムスクリプトは、対応する装備中のスクリプト付きアイテムに対してこのテーブルを受け取ります。

Properties

フィールド説明
idstringスクリプト付きアイテムの識別子。

Methods

メソッド引数戻り値説明
material()string/nil大文字のMaterial名を返す。アイテムが装備されていない場合はnil。
get_amount()intスタック数を返す。装備されていない場合は 0
set_amount(amount)intnilスタック数の設定をキューに入れる。
consume(amount?=1)int?=1nilスタック数を減らす処理をキューに入れる。
get_uses()int永続的な使用回数カウンターを返す。デフォルトは 0
set_uses(uses)intnil永続的な使用回数カウンターの設定をキューに入れる。
get_durability()table/nil{current, max} を返す。耐久度バーがないアイテムの場合はnil。
get_durability_percentage()number/nil残り耐久度を 0.0 から 1.0 で返す。ない場合はnil。
use_durability(amount, can_break?=false)int, bool?=falsenil固定値の耐久度ダメージの適用をキューに入れる。破壊が許可されていない限り残り1でクランプされる。
use_durability_percentage(fraction, can_break?=false)number, bool?=falsenil最大耐久度に対する割合分の耐久度ダメージの適用をキューに入れる。
get_name()string/nil表示名を返す。ない場合はnil。
set_name(name)stringnilカラーコード処理された表示名の設定をキューに入れる。
get_lore()tablelore文字列の配列を返す。
set_lore(lore)tablenilカラーコード処理されたlore文字列の設定をキューに入れる。

context.prop

FreeMinecraftModelsのpropスクリプトはこのテーブルを受け取ります。基盤となるエンティティが存在する場合、MagmaCoreのEntity Tableを継承します。

Properties

フィールド説明
model_idstring/nilモデルブループリント名。ブループリントが存在しない場合はnil。
current_locationtable/nil現在のpropのロケーション。

Methods

メソッド引数戻り値説明
play_animation(name, blend?=true, loop?=true)string, bool?=true, bool?=truebool指定した名前のアニメーションを再生する。
stop_animation()nil現在のアニメーションをすべて停止する。
hurt_visual()nilダメージを与えずに赤く点滅する被弾表現を再生する。
pickup()nil恒久的な削除をキューに入れ、設置用アイテムをドロップする。
has_mount_points()boolpropにマウントポイントのボーンがあるかを判定する。
mount(player)tablebool解決されたプレイヤーを最初の空き座席に乗せる処理をキューに入れる。
dismount(player)tablebool解決されたプレイヤーをこのpropから降ろす処理をキューに入れる。
get_passengers()table搭乗中のプレイヤーのEntity Tableを返す。
spawn_elitemobs_boss(file, x, y, z)string, number, number, numbertable/nilEliteMobsが有効な場合にEliteMobsのカスタムボスをスポーンさせる。
open_inventory(player, title, rows?=3)table, string, int?=3bool永続ストレージを開く処理をキューに入れる。行数は 1 から 6 にクランプされる。
place_book(player)tableboolpropが本を保持していない場合に、手に持っている記入済みまたは未記入の本を1冊保管する処理をキューに入れる。
read_book(player)tablebool保管されている記入済みの本を開く処理をキューに入れる。
take_book(player)tablebool保管されている本をプレイヤーに返す処理をキューに入れる。
has_book()boolpropが本を保管しているかを判定する。
drop_inventory()bool永続ストレージを空にして中身をドロップする処理をキューに入れる。
drop_book()bool保管されている本を取り除いてドロップする処理をキューに入れる。
is_viewing_inventory(player)tableboolプレイヤーがこのpropの追跡対象インベントリを表示中かを判定する。
set_persistent_data(key, value)string, stringboolpropスコープの fmm_lua_ キーの下に文字列を保存する。
get_persistent_data(key)stringstring/nil保存された文字列を返す。ない場合はnil。

context.npc

EliteMobsのNPCスクリプトは共有のMagmaCoreコンテキストを継承し、このNPC固有のテーブルを追加します。

Properties

フィールド説明
namestring設定されたNPCの表示名。
filenamestringNPC設定ファイル名。
uuidstringランタイムのNPC UUID。
activation_radiusnumber設定されたアクティベーション半径。
current_locationtableロケーションのスナップショット。基盤となるliving entityが存在する間のみ利用できる。
entity_typestring大文字のBukkitエンティティタイプ。基盤となるliving entityが存在する間のみ利用できる。

Methods

メソッド引数戻り値説明
is_valid()boolNPCが有効かを判定する。
get_location()table現在のNPCロケーションを返す。取得できない場合はスポーン地点にフォールバックする。返されるテーブルには direction ベクトルも含まれる。
get_eye_location()table現在の目の高さのロケーションを返す。取得できない場合はスポーン地点にフォールバックする。返されるテーブルには direction ベクトルも含まれる。
get_activation_radius()number現在設定されているアクティベーション半径を返す。
get_nearby_players(radius)numbertable付近のPlayer Tableを返す。
face_direction_or_location(target)tablenilベクトルの方向を向くか、ロケーションの方を向く。
say_greeting(player?)table/string?nil設定された挨拶を送信する。省略時は取得できればトリガーしたプレイヤーが対象になる。playerテーブル、UUID、名前を受け付ける。
say_dialog(player?)table/string?nil同じプレイヤー解決方法で設定された会話文を送信する。
say_farewell(player?)table/string?nil同じプレイヤー解決方法で設定された別れの挨拶を送信する。
play_model_animation(name)stringnilカスタムモデルが存在する場合にモデルアニメーションを再生する。

EliteMobs Power Entity Reference Table

EliteMobsのボスパワーのメソッドは、投射物、花火、落下ブロックなどの非生物エンティティに対してこの軽量テーブルを返します。

Properties

フィールド説明
namestringエンティティ名のスナップショット。
uuidstringエンティティのUUID。
entity_typestring大文字のBukkitエンティティタイプのスナップショット。
is_playerbool常にfalse。
is_elitebool常にfalse。
is_mountboolボスが返されたマウントテーブルをtrueとしてマークしない限りfalse。
current_locationtableロケーションのスナップショット。

Methods

メソッド引数戻り値説明
is_valid()bool現在の有効性を判定する。
get_location()table現在のロケーションを返す。
get_velocity()table現在の速度を返す。
is_on_ground()bool現在の接地状態を判定する。
teleport_to_location(location)tablenilロケーションが解決できた場合にテレポートする。
set_velocity_vector(vector)tablenilベクトルが解決できた場合に速度を設定する。
set_direction_vector(vector)tablenil該当する場合にファイアボールの方向を設定する。
set_yield(amount)numbernil該当する場合にファイアボールの爆発威力を設定する。
set_gravity(enabled)boolnil重力を設定する。
detonate()nilエンティティが花火の場合に爆発させる。
remove()nilエンティティを削除する。
unregister(reason?=OTHER)string?=OTHERnilDEATHPHASE_BOSS_RESETPHASE_BOSS_PHASE_ENDCHUNK_UNLOADWORLD_UNLOADSHUTDOWNEFFECT_TIMEOUTBOSS_TIMEOUTNPC_TIMEOUTOTHERUNSPECIFIED_WATCHDOG_REMOVALREMOVE_COMMANDKILL_COMMANDREINFORCEMENT_CULLENTITY_REPLACEMENTARENA_RESET のいずれかを使って登録解除する。
is_inside_vehicle()boolエンティティが乗り物に乗っているかを判定する。
has_vehicle()bool乗り物が存在するかを判定する。
get_vehicle()table/nil現在の乗り物の参照を返す。
set_vehicle(vehicle)tableboolこのエンティティを解決された乗り物に乗せる。
leave_vehicle()bool現在の乗り物から降りる。
has_passengers()bool搭乗者が存在するかを判定する。
get_passenger_count()int搭乗者の数を返す。
get_passengers()table搭乗者の参照を返す。
add_passenger(passenger)tablebool解決された搭乗者を追加する。
remove_passenger(passenger)tablebool解決された搭乗者を降ろす。
eject_passengers()boolすべての搭乗者を降ろす。

EliteMobs Power Living Entity Table

EliteMobsのボスパワーにおける生物の値はこの独立したテーブルを使用します。BossテーブルとEliteMobs Power Playerテーブルはこれを継承します。

Properties

フィールド説明
namestringエンティティ名のスナップショット。
uuidstringエンティティのUUID。
entity_typestring大文字のBukkitエンティティタイプのスナップショット。
is_playerboolエンティティがプレイヤーかどうか。
is_monsterboolエンティティがBukkitの Monster を実装しているかどうか。
is_eliteboolEliteMobsがそのエンティティを追跡しているかどうか。
is_mountbool追跡中のカスタムボスがマウントかどうか。
is_validbool有効性のスナップショット。
healthnumber体力のスナップショット。
maximum_healthnumber最大体力のスナップショット。
current_locationtableロケーションのスナップショット。

Methods

メソッド引数戻り値説明
is_alive()bool現在の有効性と死亡状態を判定する。
is_ai_enabled()bool現在のAI状態を返す。
is_frozen()boolEliteMobsのカスタムボスのfrozen設定を返す。該当しない場合はfalse。
get_location()table現在のロケーションを返す。
get_eye_location()table現在の目の高さのロケーションを返す。
get_height()numberBukkitのエンティティの高さを返す。
get_health()number現在の体力を返す。
get_maximum_health()number現在の最大体力を返す。
get_velocity()table現在の速度を返す。
deal_damage(amount)numbernil汎用のBukkitダメージを与える。
deal_custom_damage(amount)numbernilパワーの持ち主であるボスからEliteMobsのカスタムダメージを与える。
deal_damage_from_boss(amount)numbernilパワーの持ち主であるボスに帰属するBukkitダメージを与える。
restore_health(amount)numbernil追跡対象であればEliteMobsを通して回復し、そうでなければBukkitの体力を最大値でクランプする。
play_sound_at_entity(sound, volume_or_options?=1, pitch?=1)string (Sound), number/table?=1, number?=1nil登録済みまたはカスタムの名前空間付きサウンドをエンティティの位置で再生する。第2引数には {volume, pitch} を渡すこともできる。
play_sound_at_self(sound, volume_or_options?=1, pitch?=1)string (Sound), number/table?=1, number?=1nilエンティティの位置で再生するエイリアス。第2引数には {volume, pitch} を渡すこともできる。
spawn_particle_at_self(particle, count?=1)string (Particle)/table, int?=1nilパーティクル名の文字列またはパーティクル仕様テーブルをエンティティの位置で生成する。
spawn_particles_at_location(location, particle, count?=1, dx?=0, dy?=0, dz?=0, speed?=0)table, string (Particle), int?=1, number?=0, number?=0, number?=0, number?=0nil指定したロケーションでパーティクルを生成する。
teleport_to_location(location)tablenilロケーションが解決できた場合にテレポートする。
set_velocity_vector(vector)tablenilベクトルが解決できた場合に速度を設定する。
set_gravity(enabled)boolnil重力を設定する。
is_on_ground()bool現在の接地状態を判定する。
apply_push_vector(vector, additive?=false, delay?=1)table, bool?=false, int?=1nil遅延後に速度を適用する。現在の速度に加算することもできる。
set_custom_name(name)stringnilカラーコード処理されたカスタム名を設定する。
reset_custom_name()nil追跡対象であればEliteMobsの名前を、そうでなければBukkitの名前を復元する。
set_custom_name_visible(visible)boolnilカスタム名の表示状態を設定する。
set_ai_enabled(enabled, duration?=0)bool, int?=0nilAIを設定し、ticksが正の値ならその後反対の状態に切り替える。
set_awareness_enabled(enabled, duration?=0)bool, int?=0nilモブの認識を設定し、ticksが正の値ならその後反対の状態に切り替える。
face_direction_or_location(target)tablenilベクトル、または同一ワールド内のロケーションの方を向く。
play_model_animation(name)stringnil利用可能な場合にカスタムモデルのアニメーションを再生する。
set_scale(scale, duration?=0)number, int?=0nilスケールを設定し、ticksが正の値ならその後 1.0 に戻す。
set_invulnerable(enabled, duration?=0)bool, int?=0nilEliteMobsのduration用ヘルパーを使って無敵状態を設定する。
remove_elite()nil追跡中のエリートをEliteMobsの削除パイプラインを通して削除する。
is_healing()bool追跡中のエリートの回復状態を判定する。
set_healing(enabled)boolnil追跡中のエリートの回復状態を設定する。
navigate_to_location(location, speed?=1, force?=false, timeout?=0)table, number?=1, bool?=false, int?=0nil追跡中のカスタムボスを移動させる。
add_tag(tag, duration?=0)string, int?=0nilタグを追加し、ticksが正の値ならその後削除する。
remove_tag(tag)stringnilタグを削除する。
has_tag(tag)stringboolエンティティ、エリート、プレイヤーのタグを判定する。
push_relative_to(location, force?=1, extra_x?=0, extra_y?=0, extra_z?=0)table, number?=1, number?=0, number?=0, number?=0nil元となるロケーションから遠ざける方向に、任意のオフセットを加えて押し出す。
overlaps_box_at_location(center, half_x?=0.5, half_y?=half_x, half_z?=half_x)table, number?=0.5, number?, number?boolエンティティの当たり判定ボックスと指定したボックスの重なりを判定する。
is_inside_vehicle()boolエンティティが乗り物に乗っているかを判定する。
has_vehicle()bool乗り物が存在するかを判定する。
get_vehicle()table/nil現在の乗り物の参照を返す。
set_vehicle(vehicle)tableboolこのエンティティを解決された乗り物に乗せる。
leave_vehicle()bool現在の乗り物から降りる。
has_passengers()bool搭乗者が存在するかを判定する。
get_passenger_count()int搭乗者の数を返す。
get_passengers()table搭乗者の参照を返す。
add_passenger(passenger)tablebool解決された搭乗者を追加する。
remove_passenger(passenger)tablebool解決された搭乗者を降ろす。
eject_passengers()boolすべての搭乗者を降ろす。
apply_potion_effect(type, duration, amplifier?=0)string (PotionEffectType), int, int?=0nilポーション効果を適用する。
set_equipment(slot, material, options?)string (EquipmentSlot), string (Material), table?nil装備を設定する。optionsは unbreakable と、type および level を持つ enchantments のエントリに対応する。
set_fire_ticks(ticks)intnil炎上ticksを設定する。
add_visual_freeze_ticks(ticks?=1)int?=1nil凍結ticksを追加する。
place_temporary_block(material, ticks?=0, require_air?=false)string (Material), int?=0, bool?=falsenilエンティティの位置に一時ブロックを設置する。

EliteMobs Power Player Table

EliteMobsのボスパワーにおけるプレイヤーの値は、EliteMobs Power Living Entityのすべてのプロパティとメソッドを継承します。

Properties

フィールド説明
game_modestring大文字のBukkitゲームモードのスナップショット。

Methods

メソッド引数戻り値説明
send_message(text)stringnilカラーコード処理されたチャットテキストを送信する。
show_action_bar(text)stringnilカラーコード処理されたアクションバーを送信する。
show_title(title, subtitle?="", fade_in?=10, stay?=40, fade_out?=10)string, string?="", int?=10, int?=40, int?=10nilカラーコード処理されたタイトルを表示する。
show_boss_bar(title, color?=WHITE, style?=SOLID, duration?=40)string, string (BarColor)?=WHITE, string (BarStyle)?=SOLID, int?=40nilボスバーを表示し、ticksが正の値ならその後削除する。
run_command(command)stringnilプレイヤーとしてコマンドを実行する。

context.boss

EliteMobsのボスパワーはこのテーブルを受け取ります。EliteMobs Power Living Entityのすべてのプロパティとメソッドを継承し、ここに挙げた行はエリートレベルの意味論でオーバーライドされます。

Properties

フィールド説明
namestringエリートの表示名、またはスクリプトファイル名のスナップショット。
uuidstringエリートのUUID。
healthnumberエリートの体力のスナップショット。
maximum_healthnumberエリートの最大体力のスナップショット。
current_locationtableエリートのロケーションのスナップショット。
levelintエリートレベルのスナップショット。
damager_countintダメージを与えた者の数のスナップショット。
is_in_combatbool戦闘状態のスナップショット。
existsboolエリートの存在状態のスナップショット。

Methods

メソッド引数戻り値説明
is_alive()boolliving entityの状態とEliteMobsでの存在状態を判定する。
get_health()number現在のエリートの体力を返す。
get_maximum_health()number現在のエリートの最大体力を返す。
get_location()table現在のエリートのロケーションを返す。
restore_health(amount)numbernilEliteMobsのエンティティを通して回復する。
add_tag(tag, duration?=0)string, int?=0nilエリートタグを追加し、ticksが正の値ならその後削除する。
remove_tag(tag)stringnilエリートタグを削除する。
has_tag(tag)stringboolエリートタグを判定する。
reset_custom_name()nilエリートの表示名を復元する。
play_sound_at_self(sound, volume_or_options?=1, pitch?=1)string (Sound), number/table?=1, number?=1nil登録済みまたはカスタムの名前空間付きサウンドをエリートの位置で再生する。第2引数には {volume, pitch} を渡すこともできる。
play_sound_at_entity(sound, volume_or_options?=1, pitch?=1)string (Sound), number/table?=1, number?=1nilエリートの位置で再生するエイリアス。第2引数には {volume, pitch} を渡すこともできる。
spawn_particle_at_self(particle, count?=1)string (Particle)/table, int?=1nilエリートの位置でパーティクルを生成する。
play_model_animation(name)stringnil利用可能な場合にカスタムボスモデルのアニメーションを再生する。
navigate_to_location(location, speed?=1, force?=false, timeout?=0)table, number?=1, bool?=false, int?=0nilカスタムボスを移動させる。
get_damager_count()int現在のダメージを与えた者の数を返す。
despawn()nil理由 OTHER でエリートを削除する。
get_ender_dragon_phase()string/nilEnderDragon.Phase名を返す。該当しない場合はnil。
set_ender_dragon_phase(phase)string (EnderDragon.Phase)nil有効なエンダードラゴンのフェーズを設定する。
has_mount()boolボスが生存中のマウント(乗り物)を持っているかを判定する。
get_mount()table/nilis_mount = true とマークされたマウントの参照を返す。
set_mount(mount)tableboolボスを解決されたエンティティに乗せる。
clear_mount()bool現在の乗り物から降りる。
dismount()boolclear_mount() のエイリアス。
start_tracking_fireball_system(speed?=0.5)number?=0.5nilモンスター系ボス向けの追尾ファイアボール挙動を開始する。
handle_spirit_walk_damage(cause)string (DamageCause)nilSpirit Walkのダメージ処理を実行する。
shield_wall_is_active()boolシールドウォールの状態を判定する。
initialize_shield_wall(charges?=1)int?=1nilシールドウォールを初期化する。
shield_wall_absorb_damage(player, damage)table, numberboolプレイヤーのダメージの吸収を試みる。
deactivate_shield_wall()nilシールドウォールを解除する。
start_zombie_necronomicon(target, file)table, stringnilliving entityの対象に対してZombie Necronomiconの処理を開始する。
send_message(text, range?=20)string, number?=20nil範囲内のプレイヤーにカラーコード処理されたテキストを送信する。
get_nearby_players(range)numbertable付近のEliteMobs Power Playerテーブルを返す。
get_target_player()table/nil現在のモブのターゲットがプレイヤーの場合にそれを返す。
get_nearby_players_in_zone(zone)tabletableゾーンに含まれるプレイヤーを返す。
spawn_particles_in_zone(zone, particle, count?=1, dx?=0, dy?=0, dz?=0, speed?=0, coverage?=1)table, string (Particle), int?=1, number?=0, number?=0, number?=0, number?=0, number?=1nilゾーンの内部をサンプリングしてパーティクルを生成する。
spawn_particles_in_zone_border(zone, particle, count?=1, dx?=0, dy?=0, dz?=0, speed?=0, coverage?=1)table, string (Particle), int?=1, number?=0, number?=0, number?=0, number?=0, number?=1nilゾーンの縁をサンプリングしてパーティクルを生成する。
get_particles_from_self_toward_zone(zone, particle, speed?=0.1)table, string (Particle), number?=0.1tableボスからサンプリングされたゾーン上の点へ向かう方向付きパーティクル仕様を構築する。
get_particles_toward_self(zone, particle, speed)table, string (Particle), numbertableボスへ向かう方向付きパーティクル仕様を構築する。現行のビルダーは最後に渡された引数からspeedを読み取る。
spawn_particles_with_vector(particles)tablenil方向付きパーティクル仕様の配列を生成する。
summon_reinforcement(file, zone_or_location?, level?=0)string, table?, int?=0table/nilサンプリングされたゾーン上の点、指定ロケーション、またはボスの位置に増援を召喚する。
summon_projectile(type, origin, destination, speed?=1, options?)string (EntityType), table, table, number?=1, table?table/nil投射物をスポーンさせる。optionsは custom_damagedetonation_poweryieldincendiarygravityglowinginvulnerablepersistentdurationEntityEffecteffectspawn_at_origindirection_onlytrackon_landmax_ticks に対応する。

context.players: EliteMobs Boss Powers

メソッド引数戻り値説明
current_target()table/nilイベントのアクターがプレイヤーの場合はそれを返し、そうでなければボスの現在のモブターゲットがプレイヤーの場合にそれを返す。
nearby_players(radius)numbertableボスから指定半径内のPlayer Tableを返す。
all_players_in_world()tableボスの現在のワールドにいるすべてのPlayer Tableを返す。

context.entities: EliteMobs Boss Powers

これらのクエリはボス自身を除外します。living向けのフィルターは player/playerselite/elitesmob/mobs を受け付け、それ以外の値はすべてのliving entityを対象とします。

メソッド引数戻り値説明
get_nearby_entities(radius, filter?="living")number, string?table指定半径内のエンティティを返す。all または entities は非生物エンティティも含め、それ以外のフィルターはlivingのテーブルを返す。
get_entities_in_box(center, half_x, half_y, half_z, filter?="living")table, number, number, number, string?table軸に沿ったボックス内のliving entityを返す。
get_all_entities(filter?="living")string?tableボスのワールド内で条件に一致するliving entityを返す。
get_direct_target_entity()table/nil現在のフックが提供する直接のターゲットを返す。
get_boss_spawn_location()tableボスの元のスポーン地点を返す。

context.vectors: EliteMobs Boss Powers

メソッド引数戻り値説明
get_vector_between_locations(source, destination, options?)table, table, table?table同一ワールド内のロケーション間のベクトルを返す。無効な入力やワールドをまたぐ入力の場合は {x=0,y=0,z=0}。optionsは normalizemultiplier、ベクトルの offset に対応する。
rotate_vector(vector, pitch?=0, yaw?=0)table, number?=0, number?=0tablepitchとyaw(度単位)で回転させたベクトルを返す。
normalize_vector(vector)tabletable単位ベクトルを返す。ゼロベクトルはゼロのまま。

context.zones: EliteMobs Boss Powers

EliteMobsのボスパワーは、共有の整数ハンドル方式のゾーン面を、Elite Scriptのゾーン定義クエリに置き換えます。

メソッド引数戻り値説明
get_entities_in_zone(zone, options?)table, table?table条件に一致するliving entityを返す。optionsは filtermode = "full" または "border" に対応する。
get_locations_in_zone(zone, options?)table, table?tableサンプリングされたロケーションを返す。optionsは coveragemode = "full" または "border" に対応する。
zone_contains(zone, location, mode?="full")table, table, string?boolロケーションが形状全体または境界に含まれるかを判定する。
watch_zone(zone, callbacks, options?)table, table, table?nil{on_enter, on_leave} コールバックで監視する。optionsは filtermode に対応する。所有された監視はスクリプトの終了とともに停止する。

context.script: EliteMobs Boss Powers

このブリッジは、Elite Scriptのtarget、zone、relative vectorのYAML設定と同じテーブルキーを受け付けます。

Methods

メソッド引数戻り値説明
target(spec)tabletargetハンドルtargetハンドルを作成する。
zone(spec)tablezoneハンドルzoneハンドルを作成する。
relative_vector(spec, location?, zone?)table, table?, zoneハンドル?vectorハンドルrelative vectorのハンドルを作成する。アクションのロケーションは既定でボスになる。
damage(target, amount?=0, multiplier?=1)targetハンドル, number?=0, number?=1nil解決されたすべてのターゲットエンティティにダメージを与える。
push(target, vector, additive?=false)targetハンドル, table/vectorハンドル, bool?=falsenil解決されたターゲットエンティティに速度を適用する。
set_facing(target, vector)targetハンドル, table/vectorハンドルnil解決されたターゲットエンティティをベクトルの方向に向かせる。
spawn_particles(target, particles)targetハンドル, table/stringnil解決されたターゲットのロケーションでパーティクル仕様を生成する。

Target Handle Methods

メソッド引数戻り値説明
entities()table解決してEntity Tableを返す。
locations()table解決してlocationテーブルを返す。
first_entity()table/nil最初に解決されたエンティティを返す。
first_location()table/nil最初に解決されたロケーションを返す。

Zone Handle Methods

メソッド引数戻り値説明
full_target(coverage?)number?targetハンドル形状の内部に対するtargetハンドルを作成する。
border_target(coverage?)number?targetハンドル境界に対するtargetハンドルを作成する。
full_locations(coverage?)number?tableサンプリングされた内部のロケーションを解決する。
border_locations(coverage?)number?tableサンプリングされた境界のロケーションを解決する。
full_entities()table形状の内部にいるエンティティを解決する。
border_entities()table境界上にいるエンティティを解決する。
contains(location, mode?="full")table, string?bool形状全体または境界への所属を判定する。
watch(callbacks, mode?="full")table, string?int所有された {on_enter, on_leave} の監視を開始し、そのタスクIDを返す。

Relative-Vector Handle Methods

メソッド引数戻り値説明
resolve()table現在のコンテキストに対してベクトルを解決する。

EliteMobs Power Event Table

EliteMobsのボスパワーのイベント値は、イベントの種類に応じて条件付きでフィールドとメソッドを公開します。

Properties

フィールド説明
damage_amountnumber/nilダメージイベントのダメージ量のスナップショット。
damage_causestring/nilダメージイベントが公開している場合のDamageCause名。
damagertable/nilエンティティによるダメージイベントの、ダメージ元の参照。
projectiletable/nilダメージ元が投射物の場合の投射物の参照。
spawn_reasonstring/nilエリートのスポーン理由。
entitytable/nil死亡イベントまたはゾーンイベントのエンティティ。

Methods

メソッド引数戻り値説明
cancel_event()nilEliteDamageEventまたはその他のキャンセル可能なイベントをキャンセルする。
set_damage_amount(amount)numbernilEliteDamageEventのダメージを置き換える。
multiply_damage_amount(multiplier)numbernilEliteDamageEventのダメージを乗算する。

context.world: EliteMobs Additions and Overrides

EliteMobsのボスパワーはMagmaCoreのWorld Tableのすべての行を継承し、以下のメソッドを追加またはオーバーライドします。

Methods

メソッド引数戻り値説明
play_sound_at_location(location, sound, volume?=1, pitch?=1)table, string (Sound), number?=1, number?=1nilEliteMobsのサポートを通じて登録済みサウンドとカスタムの名前空間付きサウンドを受け付けるオーバーライド。
spawn_particle_at_location(location, particle, count?=1)table, string (Particle)/table, int?=1nilEliteMobsのパーティクル仕様テーブルを受け付けるオーバーライド。
set_block_at_location(location, material, require_air?=false)table, string (Material), bool?=falsenil期限なしのEliteMobs一時ブロック設置を使用するオーバーライド。
place_temporary_block_at_location(location, material, ticks?=0, require_air?=false)table, string (Material), int?=0, bool?=falsenilEliteMobsの一時ブロック設置を使用するオーバーライド。
get_block_type_at_location(location)tablestring/nil大文字のMaterial名を返す。無効なロケーションの場合はnil。
get_highest_block_y_at_location(location)tableint/nil最も高いブロックのY座標を返すオーバーライド。取得できない場合はnil。
get_blast_resistance_at_location(location)tablenumberブロックの爆発耐性を返す。無効なロケーションの場合は既定で 0
is_air_at_location(location)tablebool対象のブロックが空気かを判定する。
is_passable_at_location(location)tableboolBukkitの通過可能性を判定する。
is_passthrough_at_location(location)tableboolマテリアルが非固体かを判定する。
is_on_floor_at_location(location)tablebool対象が非固体で、その下が固体ブロックかを判定する。
is_standing_on_material(location, material)table, string (Material)bool真下のブロックを判定する。
strike_lightning_at_location(location)tablenil落雷の前にEliteMobsの雷バイパスを有効にするオーバーライド。
run_empowered_lightning_task_at_location(location)tablenil強化エンダードラゴンの雷サポートを実行する。
set_world_time(time) / set_world_time(location, time)int/table, int?nilボスのワールドの時間、または渡されたロケーションのワールドの時間を設定する。
set_world_weather(weather, duration?=6000) / set_world_weather(location, weather, duration?=6000)string/table, string/int?, int?=6000nilCLEARPRECIPITATIONRAINTHUNDER を設定する。
run_console_command(command)stringnilコンソールとしてコマンドを実行する。
spawn_boss_at_location(file, location?, level?)string, table?, int?table/nil指定または現在のロケーションで、指定または現在のレベルのカスタムボスをスポーンさせる。
spawn_custom_boss_at_location(file, location, options?)string, table, table?table/nilカスタムボスをスポーンさせる。optionsは silentleveladd_as_reinforcementvelocity に対応する。
spawn_entity_at_location(type, location, options?)string (EntityType), table, table?table/nilバニラのエンティティをスポーンさせる。optionsは velocitydurationEntityEffecteffecton_landmax_ticks に対応する。
spawn_falling_block_at_location(location, material, options?)table, string (Material), table?table/nil落下ブロックをスポーンさせる。optionsは drop_itemhurt_entitiesvelocityon_land に対応する。
spawn_reinforcement_at_location(file, location, level?=0, velocity?)string, table, int?=0, table?table/nilボスに紐づいた増援を召喚する。
spawn_fireworks_at_location(location, options)table, tabletable/nil花火をスポーンさせる。optionsは effectstypeflickertrailcolorsfade_colorspowervelocityshot_at_angle に対応し、type にはFireworkEffect.Typeの名前を使う。
spawn_splash_potion_at_location(location, options)table, tabletable/nilスプラッシュポーションをスポーンさせる。effects の各エントリはPotionEffectTypetypedurationamplifieroverwrite を受け付け、トップレベルの velocity も使用できる。
generate_fake_explosion(locations, source?)table, table?nilブロックロケーションの配列に対してEliteMobsの疑似爆発を生成する。
spawn_fake_gold_nugget_at_location(location, velocity, gravity?=false)table, table, bool?=falsetable/nil疑似金塊の投射物をスポーンさせる。
run_fake_gold_nugget_damage(projectiles)tablenil疑似投射物のダメージ処理を実行する。
generate_player_loot(times?=1)int?=1nil条件を満たすダメージ元プレイヤーに対してプレイヤールートを生成する。
drop_bonus_coins(multiplier?=2)number?=2nil条件を満たすダメージ元プレイヤーにボーナスコインをドロップする。

EliteMobs Fake Projectile Table

spawn_fake_gold_nugget_at_location は、スポーンに成功したときにこのテーブルを返します。

Methods

メソッド引数戻り値説明
get_location()table疑似投射物のロケーションを返す。
set_gravity(enabled)boolnil疑似投射物の重力を設定する。
remove()nil疑似投射物を削除する。
is_removed()boolすでに削除済みかを判定する。

context.settings

EliteMobsのボスパワーは、worldテーブルと同じビルダーからこのsettingsテーブルを受け取ります。

Methods

メソッド引数戻り値説明
warning_visual_effects_enabled()bool現在の警告用ビジュアルエフェクト設定を返す。