2024-12-08 00:57:08|Myriagame |source:minecraft skins
First of all, the VAPE Manager module is added to the Run/MODS directory of the project to facilitate debugging.
Then add a function to determine whether the module loads the Vape Manager module.
example:
<<<<<<<<<<], the, the, "assh: java;">> portatic?
For (Imodinfo Modinfo: Modlist.get (). Getmods ()) {) {) {
If (modinfo.getmodid (). Equals ("vm") {{
Return true;
}
}
Return false;
}
Then call him to judge in the main function. If not, it will throw Runtimeexception. On the contrary, the operation of the writing configuration file is performed (when the module is loaded, the configuration file is normal.Because the VAPE Manager module will be loaded by the last one by default).
example:
if (! Hasapi ())) {// to detect whether there is a front module Vape Manager.Throwing new runTimeexception ("NOFALL Requires Vape Manager mod.");
}
if (! New File ("Config/VM/MODS"). Exist ()) {// Judge and create the directory where the configuration file is located.
New file ("config/vm/mods"). Mkdirs ();
}
if (! New File ("Config/VM/MODS/NOFALL.json"). ExistS ()) {// Detect whether the configuration file exists.
JsonObject Object = New JSONObject ();
Object.addproperty ("name", "not"); // Write the configuration file item "name".
Object.addproperty ("ID", "nf"); // Write the configuration file item "ID".
Object.addproperty ("main", "cn.ksmcBrigade.nf.manager"); // Write the configuration file item "main".Object.addproperty ("function", "none"); // Write the configuration file item "function".
Object.addproperty ("function_2", "run"); // Write the configuration file item "Function_2".
Object.addproperty ("gui_main", "none"); // Write the configuration file "gui_main".
Object.addproperty ("gui_function", "none"); // Write the configuration file item "Gui_function".
Files.write (Paths.get ("Config/VM/Mods/NOFALL.JSON"), Object.tostring (). Getbytes ()); // Write the configuration file into the file.
}
The above code may be thrown out of IOEEXception. Please use the Try/Catch package or add an exception signature, otherwise it will not be able to compile and run normally.
Next create a class file specified in the configuration file, and then add a corresponding function to the class file.
example:
Package cn.ksmcbrigade.nf;import network.minecraft.World.entity.player.player;
public class manager {
Public Static Void Run (Player Player) {{
Player.FallDistance = 0;
}
}
Tip: If the function of the function is not needed, it must be added if it is not used, otherwise the function will be reported and the game crashes.
Note: You need to export the module after exporting the starter to test in the starter. Testing in the IDE may report an error.
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