Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
api:entity/player/absorption/get・calc_amount・removeは、IMP Doc では実行者(as player)の緩衝体力を扱う API です。ところがoh_my_dat:pleaseを呼ばずにoh_my_dat:を読み書きしていたため、その時点で OhMyDat が参照しているエンティティのデータを扱っていました。この PR で、3つの API がデータを扱う前にoh_my_dat:pleaseを呼び、実行者のデータを扱うようにします。addのcore/upsert.mと同じ形です。呼出し後は OhMyDat の参照先が実行者に切り替わったままになる点も、addと同じです。Closes #2324
検証用サーバー(Minecraft 1.20.4、Asset 3e173c9)で、修正前(95528d1)と修正後を比べました。
プレイヤー A に 20、C に 7 のバリアを同じ UUID で付け、B には付けずに、参照先を A に向けてから各プレイヤーを実行者にして呼びました。
A を実行者にした通常の呼出しは、修正前後で同じ結果でした。
Asset の 0258 猫の夢見枕は、回復した相手の今のバリアを
getで読み、回復量の30%がそれ以上ならバリアを付けます。0258 由来のバリアを 50 持つ使用者が、バリアのない相手を 10・5・20 と3回回復すると、修正前は相手にバリアが一度も付きませんでした。修正後は 3.0 が付き、5 の回復では付け直さず、20 の回復で 6.0 に更新されました。修正前のgetは毎回使用者の 50 を返していました。回復の入力は、RCON からapi:heal/modifier→api:heal/→api:heal/resetを呼んで代え、次の tick から先の 0258 の処理は実際の経路を通っています。トリガーの後の後始末(タグ、asset:context、api: Argument、イベント)は修正前後で同じで、エラーの表示もありませんでした。バリアが削られるときの callback と、Effect のバリア解除などの
removeのほかの呼出し元は、ゲーム内では確かめていません。