2024-12-10 17:53:40|Myriagame |source:minecraft skins
This tutorial is set by the author to use the CC by-NC protocol.
This tutorial is suitable for authors who have a certain understanding of CRT. For more basic knowledge, please study other tutorials ~
Cot Expansion
DirectionalBlock
Mods.ContentTweaker.VanillaFactory.CreateDirectionalBlock (UnLocalizedName as String, BlockMaterial As BlockMateria L, Directions As String, Planerotatable As Bool = False, PLACINGOPOSITE As BOOL = FALSE);
Can create a rotatable block.UnlocalizedName is the uninvited name of the block.Blockmaterial is a square material.Directions is a type of steering: "ALL" represents that in 6 directions that can be rotated. "Horizontal" means that it can only rotate in the four directions of east, west, and north, and "vertical" can only rotate in both directions.Planerotatable indicates whether it can rotate horizontally.PLACINGOPOSITE means whether to face the player when placing.
Example:
Val Blocka = MODS.CONTENTTTWEAR.VANILLAFACTORY.CREATEDIRECTIONALBLOCK ("Block_a", , "ALL", T. Rue, true);
blocka.blockhardness = 0.1;
blocka.blockResistance = 1.0;
blocka.blocksoundtype = ;
blocka.toolClass = "Pickaxe";
blocka.toollevel = 1;
blocka.register ();
Expanditem
Mods.ContentTweaker.VanillaFactory.createExpanditem (unlocklyizedName as string);
Can create an item.ExpandiTem extended itemRepRestation.This means that all Methods and Zenproperties that can be used for items can also be used for Expand items!
Zenproperties:
Attribute name
Type must fill in the default value description/comment
maxitemuseDuration
int
Non -0 items maximum use time atTackSpeed
Float
Attack speed AttackdamageFloat
Attack damage Destroyspeedfloat
Excavate speed EnchantabilityIint is not
Attachment ability
Example:
Val Sworda = MODS.CONTENTTWEAKER. VanillaFactory.createExpandItem ("Sword_a");
sworda.maxstacksize = 1;
sworda.creativetab = ;
sworda.maxdamage = 1200;
sworda.toolClass = "Sword";
sworda.attackspeed = -2.4F; sworda.attackdamage = 50.0F;
sworda.register ();
Energystorage
EnergyStorage is an energy container that can change the energy in the container.
Obtain examples:
MutableItemstack.enerGystorage //World.GetenerGyStorage
Zengetters:
Zengetter type description/notes
maxnerGystored
INT maximum energy storage EnergyStoredint is currently energy storage
Canreeive
Can BOOL receive energy
cornextract
Can BOOL draw energy
ZenMethods:
int Receivenergy (Energy As Int, Simulating as Bool)Enter energy in the energy container.Energy is the number of energy.SIMULATE indicates whether it is an analog input.Back to int represents the number of energy input.
int Extractorgy (Energy As Int, Simulating as Bool)Pull the energy from the energy container.Energy is the number of energy.SIMULATE indicates whether it is drawn out.Back to int represents the number of energy that finally draws.
Example:
Events.onplayerLeFTCLOCKBLOCK (Function (Event as Crafttweaker.event.playerftClickBlock)) {Val w = event.World;
Val p = event.player;
Val I = Event.item;
If (! W.remote &&! Isnull (i) &&! P.Fake) {
If (! Isnull (I.Mutable (). EnergyStorage) {// If this item is an energy container
Value e = i.mutable (). Energystorage;
Print (e.canextract);
Print (e.canReceive);
Print (e.nergystored);
Print (E.MaxnerGyStored); E.Receivenergy (514, FALSE); // Enter 514RF
E.ExtraCtenergy (114, FALSE); // Pull out 114RF
}
}
});
Events.onPlayerLeftClickBlock (Function (event as crafttweaker.event.playerftClickBlock) {{{{) {{{{{{{{{{{{
Val w = event.World;
Val p = event.player;
VAL POS = Event.position;
If (! W.remote &&! P.fake) {
If (! Isnull (w.Getenergystorage (pOS, event.face))) {// If this block is an energy container
Value E = W.GetenerGystorage (POS, Event.face);
Print (e.canextract);
Print (e.canReceive);
Print (e.nergystored);
Print (E.MaxnerGystored);
E.receivenergy (514, false); // Enter 514RF
E.ExtraCtenergy (114, FALSE); // Pull out 114RF
}
}
});
Networkhandler
Other tutorials have been explained, please check [1.12.2] Simple NBT's manipulation and item dynamic information display (basically end) 3.4.1: networkhandler of zenutils!
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:57
The story between humans and
2025-01-28 09:16:27
Capture "Trinity 3: Artifact
2025-01-28 09:15:27
Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27
Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27
Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26
Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25
King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25
Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24
Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23
Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23
Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22
Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22
Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22