2024-12-10 17:46:06|Myriagame |source:minecraft skins
This tutorial is set by the author to use the CC By-NC-SA protocol.
statement
1. For full content, please refer to the official wiki/other comrades translated wiki/other COT tutorials/other CRT tutorials.
Trart Builder -Crafttweaker Documentation (Blamejared.com)
Advanced use · gitbook (IMC.WIKI)
2. This tutorial is applicable to 1.12.2. If you want to use it for other versions, see Wiki or try it yourself.
3. This article determines that reading is proficient in using CRT and Affiliated
4. Modules required for this tutorial: Crafttweaker, ContentTweaker, Craftsmanship 2, etc.
5. The cases of this tutorial are all self -integrated packages. Go to play my integration package quickly!
Case V1
Feature design V1
Power of heaven
Description: It is made from four forces that do not belong to this life, and your tools seem to inherit these forces
Actual role: Randomly causes the effects of Ri Yao Flame/Nebula/Star Dust Guide/Star Rotor attack when attacking.
Ri Yao Flame: This damage increases by 20%, causing the enemy to burn, and obtain 10%injury reduction that can be used once.
Nebula Mystery: This attack converted to magic damage and increased the damage by 10%
Xingchen Guardian: The damage of 10%of the weapon attack power of 2-6 times in this attack
Star Rotor Attack: This attack summoned 4 arrows to fly to the target, the damage was random, and the hit rate was random.
Feature code V1
var heavenofpower = trartbuilder.create ("Heavenofpower");
heavenofpower.Color = 0x002dcf;
heavenofpower.maxLevel = 1;
headofpower.localizedName = "Power of Heaven";
Heavenofpower.localizedDescripting = "It is fused from four forces that do not belong to this life, and your tools seem to inherit these forces";
Heavenofpower.Calcdamage = Function (Trart, Tool, Attacker, Target, OriginalDamage, NewDamage, Iscribeical) {
If (! Attacker.World.remote) {{
If (Attacker Instanceof iPlayer) {
Var Player as iPlayer = Attacker;
Var World as iWorld = Player.World;
Var pos as iBlockpos = player.positation; var random2 as int = player.World.random.nextint (0, 100) + 1;
If (! Isnull (Player.data.playersiseted.heavenofpower)) {{
Var data as int
If (data> = 50) {
Var random as int = world.random.nextint (0, 4) + 1; // Take 1 ~ 4 random number
If (rightom == 1) {// Sun Yao Flame
Target.setfire (4);
If (! Isnull (Player.data.playerPersiseted.heavenofpower_0)) {{) {{
Var data as int
If (data <3) {{
Player.Update ({PlayerPersis itesisted: {Heavenofpower_0: (data + 1) as int}});
}
} Else {
Player.Update ({PlayerperSis ites: {Heavenofpower_0: 1 as int});}
Return NewDamage * 1.2F;
}
If (RANDOM == 2) {// Nebula Mystery
Target.attacketityfrom (IDAMAGESOURCE.MAGIC (), NewDamage * 1.1F);
Return 0.1F;
}
If (random == 3) {// Xingchen care
Var attack as float = Tool.tag.stats.attack.asfloat () * 0.1;
Var random1 as int = world.random.nextint (1, 6) + 1;
For I in 0 to random1 {
World.cateenation ()
.Sleep (5 + I * 5)
. RUN (FUNCTION (World, Context) {
Target.attacketityfrom (IDAMAGESOURCE.Gneric (), Attack);})
.Start (); // Use ZU's delay to make additional attacks
}
}
If (RANDOM == 4) {// Star Rotor Attack
For I in 0 to 4 {{
World.cateenation ()
.Sleep (5 + I * 5)
. RUN (FUNCTION (World, Context) {
Var random1 as int = world.random.nextint (0, 6);
Var arrow as IENTITYAROW =
Arrow.shoot (Player, Player.rotationPitch, Player.rotationYaw, 0.0F, 2.0F, 1.0F);
Arrow.setposition (player.position.up (2)); arrow.damage = random1;
Arow.shooter = player;
World.spaWentity (Arrow); // Summon arrows
})
.Start ();
}
}
Player.Update ({PlayerperSis ites: {heavenofpower: 0 as int});
}
}
If (Random2 <= 20) {// Probability return blood
Player.heal (1);
}
}
}
Return newDamage;
};
Heavenofpower.onPdate = Function (Thistrait, Tool, World, Entity, Itemslot, isselect) {// Calculation and calculation
If (! World.remote) {
If (entity instanceof iPlayer) {
Var Player as iPlayer = Entity; if (! Isnull (Player.data.playerPersisted.heavenofpower)) {
Var data as int
Player.Update ({PlayerPersisisted: {Heavenofpower: (data + 1) as int}); // Of course you can also save it in the NBT of the tool
If (data <50) {{
Data += 1;
}
} Else {
Player.Update ({PlayerperSis ites: {heavenofpower: 0 as int});
}
}
}
};
heavenofpower.register ();
Case V2
Feature design V1
Void
Description: It does not seem to reach the limit. You feel that you need to find some power to integrate with it to witness the extreme power ...
Actual effect: During the attack, 4 damage will be attached, and this damage cannot be defended.After detecting the alloys of life, the power of void+
Power of Void+
Description: It does not seem to reach the limit. You feel that you need to find some power to integrate with it to witness the extreme power ...
Actual effect: During the attack, 6 damage will be added, and this damage cannot be defended.
Feature code V1
var voidForce = TrartBuilder.create ("Voidforce");
voidforce.color = 0x002dcf;
voidforce.maxLevel = 1;
voidforce.localizedName = "Power of Void";
VoidForce.LocalizedDEScripting = "It seems to have happened after it came to this world ... it starts with the power of void.";;;;
voidForce.onUpdate = Function (Thistrait, Tool, World, Entity, Itemslot, isselect) {
If (! World.remote) {
If (CotticLib.Getticmaticmatic (Tool) Has "Life_alloy") {// Detect whether the material has [Life Alloy] (very good here, introduced by the introduction, specifically introduced below) Cottiction (TOOL, "VO," VO idforce_plus ", 0x002dcf, 1); // Add characteristics [Power of Void+]
World.cateenation ()
.Sleep (2)
. RUN (FUNCTION (World, Context) {
Cottictraitlib.removetictical (Tool, "Voidforce"); // You must wait for a while to delete your own [Void Power]
})
.Start ();
}
}
};
voidforce.afterHit = Function (Trart, TOOL, Attacker, Target, DAMAGEDEALT, WASCRITICAL, WASHIT) {
If (! Target.World.remote) {
Target.attacketityfrom (IDAMAGESOURCE.OUT_OF_WORLD (), 4);
}
};
voidforce.register ();
var voidForce_plus = TrartBuilder.create ("VoidForce_plus");
voidforce_plus.color = 0x002dcf;
voidforce_plus.maxLevel = 1;
voidforce_plus.localizedName = "Power of Void+";
voidforce_plus.localizedDescripting = "It seems to have happened after it comes to this world ... it starts with the power of void.";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;.
voidforce_plus.Affterhit = Function (Trart, Tool, Attacker, Target, DAMAGEDEALT, WASCRITICAL, WASHIT) {
If (! Target.World.remote) {
Target.attacketityfrom (IDAMAGESOURCE.OUT_OF_WORLD (), 6);
}
};
voidforce_plus.register ();
Ticlib
Download address: https://wwf.lanzouq.com/iisdf1tt76sb
Use an introduction
The COT loader should use Cottictraitlib as CotticLib. The rest of the usage
Tictraitlib
(The functions of this are mainly related to the characteristic):
Titraitlib.removetictRait (Itemstack as Iitemstack, Traitid As String) returns to Bool to determine whether it is successfully removed.
Titraitlib.addtictrait (Itemstack as IitemStack, Traitid as String, TrartColor as int, TrartLevel as int)
Return to BOOL, you can determine whether the characteristics are successfully added.
Titraitlib.gettictrait (Itemstack as Iitemstack)
The characteristics of obtaining this item (if it is not a soul item, return to the air [])
Titraitlib.getplayrticBootstrait (Player as iPlayer)
Get the characteristics of this player's shoes (if it is not a craftsmanship item, return to empty [])
Titraitlib.getplayerticalgingstrait (Player As iPlayer)
Get the characteristics of this player's pants (if it is not a craftsmanship item, return to empty [])
Tictraitlib.getplayrticchestplateTrait (Player as iPlayer)
Get the characteristics of this player's chest armor (if it is not a craftsmanship item, return to empty [])
Titraitlib.getplayertichelmettrait (Player As iPlayer)
Get the characteristics of this player's helmet (if it is not a craftsmanship item, return to empty [])
Tictraitlib.getplayrticarmortrait (Player as iPlayer)
Get this player's armor (shoes, pants, chest armor, helmet) characteristics (if it is not a craftsmanship item, return to empty [])
Tip: If there are two duplicate features, there will be two in the array.
Ticlib
(The functions of this are mainly not related to characteristic):
Ticlib.getticMaterial (Itemstack as Iitemstack)
The material to obtain the item (if it is not a craftsmanship item, return to empty [])
Ticlib.SetticBroken
Whether the setting is damaged, return to BOOL to determine whether it is successful.
TICLIB.ADDTICMINGSPED (Itemstack as Iitemstack, Level as Float, UUID As String)
Increase the excavation speed and return to Bool to determine whether it is successful.
TICLIB.ADDDTICATTACK (Itemstack As Iitemstack, Level as Float, UUID As String)
Increase the attack damage and return to BOOL to determine whether it is successful.
TICLIB.ADDDTICFREEMODIRS (Itemstack as Iitemstack, Level as int, UUID As String)
Increase the excavation speed and return to Bool to determine whether it is successful.
Ticlib.addticharvesstLevel
Increase the excavation level and return to BOOL to determine whether it is successful.
Ticlib.addticMiningSpeed (Itemstack as Iitemstack, Level as float, UUID as String)
Increase the excavation speed and return to Bool to determine whether it is successful.
TICLIB.ADDDTICTUGHNESS (Itemstack as Iitemstack, Level as float, uuid as string)
Increase the toughness of the armor and return to BOOL to determine whether it is successful.
Ticlib.addticdeFense (Itemstack as Iitemstack, Level as Float, UUID As String)
Increase the armor and return to BOOL to determine whether it is successful.
Tip: In order to ensure only one addition, please do not repeat the uuid!
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