2024-12-06 22:08:44|Myriagame |source:minecraft skins
Forewords, because I turned it over in Kubejs 6 and found the time that could define the effect of Curio. It was so hot that it was a bit red. With the help of group friends, I solved some problems, and after that, I found it on MC Encyclopedia.Related methods, so help everyone to write a tutorial.
Earlier states that because I am not a software -related professional background, and I do n’t know much about the code, I can only say that I can write this way. Among them, many places refer to the solutions given in the ChatGPT. I hope that there are big guys to help the code to help the code of the codeContinue optimization.
In this article, refer to the tutorial of two MC encyclopedia UU:
[1.18.2] How to make special bonuses with physical damage events?(ALTNOIR gangsters provide this article for how to judge players, entities, and damage types)
The basic tips of the decoration effect and the decoration effect Kubejs: The skills of reading NBT data by using the. NBT suffix (the wooden boss provides the judgment of Curio)
The specific code is as follows, and many of them are modified with ChatGPT, but it can indeed identify the judgment itself and output the corresponding effect.(I only do a small part of the interpretation here) (specific demonstration pictures)
EntityEvents.Hurt ((EVENT) => {// Judgment the source of the attack is a player, and the injured entity is alive
If (if (if (if
Event.source.actual &&
Event.entity.isliving () &&
Event.source.actual.isplayer ()
) {{
// Check whether Damage Type is scgus.bullet
Let damageType = Typeof event.source.type === 'Function'? Event.source.type (): event.source.type;
Let msgid = typeof damageType.msgid === 'function'? DamageType.msgid (): damageType.msgid;
If (msgid! == 'scguns.bullet') Return;
// Check whether the player has netherite_quiver
Let PlayernBt = EVENT.SOURCE.ACTual.nbt ["ForgetCaps"] && Event.source.Actual.nbt ["ForgetCaps"] [Curios: Inventory "] &&&SOURCE.Actua l.NBT ["Forgetcaps"] ["] ["Curios: Inventory "] [" Curios "]; if (! Playernbt) {
Return;
}
Let PlayernBTRING = PLAYERNBTRING ();
If (PlayernBTRINGRINGEXOF ("Nyfsquiver: Netherite_quiver") === -1) {
Return;
}
// If the player is equipped with netherite_quiver, output the physical health
Let health = math.floor (event.entity.gethealth ());
// Send the information to the world chat window
Let Playername = Event.source.Actual.GetName ();
Let entityName = event.entity.getName ();
Event.server.runcommandsilent (`/say $ {playername} Attacked $ {EntityName}. Entity Health is now $ {Health}.
}
});
National Service DNF Dark Ni
2025-01-28 09:19:27The new screenshot of the be
2025-01-28 09:18:57The 15th anniversary wallpap
2025-01-28 09:18:273DM Xuanyuan Sinicization Gr
2025-01-28 09:17:57French magazine is the first
2025-01-28 09:17:27The sneak game "Republic" wi
2025-01-28 09:16:57The story between humans and
2025-01-28 09:16:27Capture "Trinity 3: Artifact
2025-01-28 09:15:27Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22