2024-12-10 17:50:29|Myriagame |source:minecraft skins
Applicable people in this tutorial: people who install modules, configure the environment, and can be proficient in Zenscript.
Applicable version: mmce-1.11.1-R39.
MMCE has added an upgrade system in the R39 version. It has not yet been completed but the basic functions are already available.
Create and upgrade
First of all, we need to import the class:
Import Mods.modularMachinery.machineupGradebuilder;
Next, create an upgrade:
MachineUpgradebuilder.newbuilder (String name, String LocalizedName, Int Level, Int Maxstack);// Level has no effect yet; name must be unique.
Then, you can do many operations on the created MachineupGradebuilder object:
MachineUpgradebuilder AddDDDEScriptions (String ... Descriptions); // Add fixed tool prompts to upgrade, and it can be displayed on the upgraded items; it can be multi -line.MachineupGradebuilder SetbusguideScriptHandler (iFunction
Handler); // Add event monitoring to upgrade the upgrade bus prompts to monitor event monitoring MachineupGradebuilder addcompatibleMachnes (String ... Machinenames);
MachineupGradebuilder addincomPatibleMachnes (String ... Machinenames);
// The above two are adding a whitelist and adding blacklist machines. When not in use, all machines will take effect by default; these two methods conflict with each other.
MachineupGradebuilder AddrecipeCheckhandler (upgradeeventhandlerct handler);
MachineupGradebuilder adDRecipestarthandler (upgradeeventhandlerct handler);
MachineupGradebuilder AddRecipePretickhandler (upgradeeventhandlerct handler);
MachineupGradebuilder AddRecipePosttickhandler (upgradeeventanthandlerct handler);
// ...
// These events can be in the source code warehouse
// SRC/Main/Java/Hellfirepvp/ModularMachinery/Common/Integration/Crafttweaker/Upgrade/MachineupGeBuilder.java
// turn up.
// Specific usage, refer to the example below and src/main/java/hellfirepvp/modularMachinery/Common/Integration/Crafttweaker/Event/Mmevents.java.
// In fact, most of the needs of upgrading can be implemented here.
Example:
Import Mods.modularMachinery.MachineupGradebuilder as builter;Builder.newbuilder ("Upgradename", "Upgrade", 1,64) .setBusguideScriptHandler (Function (SimpleMachineupGrade) {
Return ["text",] as string [];
}). AdDRecipeCheckhandler (Function (MachineupGrade) {
// Related code
})
Event -related class
You may notice some questions, such as SimpleMachineupGrade and MachineupGrade.
SimpleMachineupGrade can be obtained in SetbusguideScriptionhandler event, which can be obtained from the custom IDATA -CustomData stored in the upgrade bus.Note that the members are Zengetter and Zensetter at the same time; they can also obtain the number of upgrades, through [Zengetter] Stacksize.
Machineupgrade will be obtained in all formulas, please use the following ways to force:
Import Mods.modularMachinery.machineupGradehelper;SimpleDynamicmicmachUPGrade CastToSimpleDynamicalnamachineupGrade (MachineupGrade Upgrade);
Of course, there is a class called SimpleDynamicMachnetupgrade, but because the above is a simple upgrade, this class cannot be used; but when you use DY NamicMachineupGradebuilder to create a dynamic upgrade, the obtained MachineupGrade is all Simpledynami CmachineupGrade, please convert it in a similar way.SimpleDynamicmicMachineupGrade has an additional IDATA stored on items than SimpleMachineupgrade, that is, ItemData, which is the same as CustomData.
Binding item
Import Mods.modularMachinery.machineupGradehelper;addfixedupGrade (IITEMSTACK Itemstack, String Upgradename);
There is nothing to say, Upgradeename is the only name at the time of registration and upgrade. After using this method, items can be used as upgraded and upgraded bus and play a role.
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