I'm Chen, who develops Datapack and tools for Minecraft
Fav Lang: Scala > TypeScript >> Java
Contacts:
- Discord
- // Twitter (main)
- Twitter (tech)
防具を貫通しないダメージを与えることのできるライブラリ
License: Creative Commons Zero v1.0 Universal
I'm Chen, who develops Datapack and tools for Minecraft
Fav Lang: Scala > TypeScript >> Java
Contacts:
プレイヤーに対して同じtick内で複数回実行したときに、2回目以降で合計が現在体力以上のダメージを与えた時に死亡しない。
11ダメージを2回実行して22ダメージを与えたとしても体力が1.0f残ってしまう。
2回目以降であっても現在体力以上のダメージを与えれば死亡する。
以下に示す「使用コマンド」を実行する。
1tickで実行できればいいのでFunctionもしくはCommandBlockで実行する。
同じtickで複数回実行したとき、そのダメージの合計が現在体力以上なら死亡する。
11ダメージを2回実行すると、合計22ダメージとなって死亡する。
data modify storage score_damage: Argument set value {Damage:11d}
execute as @p run function score_damage:api/attack
data modify storage score_damage: Argument set value {Damage:11d}
execute as @p run function score_damage:api/attack
https://twitter.com/i/status/1659186999390269440
$Health ScoreDamageCore
を設定するとき、毎回@s Health
から取得しており、同tickですでに設定された@s ScoreToHealth
と違いが生じる。
すると、@s ScoreToHealth
は0以下になるが、$SubtractedHealth ScoreToHealth
は1以上のままという場合が起こり、結果killされなくなる。
score_damage:core/get_status
で現在HPを取得するとき、@s ScoreToHealth
が設定されていればその100倍の値を$Health ScoreDamageCore
に設定する。
modify ~ byUUID set from entity ~
引数名 | 必須 | 型 | 説明 | デフォルト |
---|---|---|---|---|
MultiDamage | x | boolean | 無敵時間を貫通するか(バニラ標準と同等の無敵時間) | false |
byUUID | x | UUID | 攻撃者のUUID(無敵時間有効時に使用) | - |
実行したコマンド↓
/data modify storage score_damage: Argument set value {Damage:10.00,DamageType:"Fall",BypassResistance:true}
/execute as @e[distance=..5] run function score_damage:api/attack
/data remove storage score_damage: Argument
データパック=>ちゃんと読み込まれている
実行=>エラーは出ない、114個のコマンドが実行されたと出ている
結果=>Healthに変化がない
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.