You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Abstract implementation to make creating custom modules that provide a specific enchantment when installed easier, while also properly "hiding" the fact that there is
8
+
* an enchantment applied. This does not provide any easy way to make the enchantment use energy or other resources, and is probably only useful for enchantments that
9
+
* have a lot of hardcoded checks so reproducing functionality would be extremely hard if even possible.
10
+
* <p>
11
+
* Instances of this should be returned via the {@link ModuleData}.
12
+
*
13
+
* @since 10.6.0
14
+
*/
15
+
@NothingNullByDefault//TODO - 1.20.5: Update docs on this
* Called when initializing a new module instance and the backing custom module. This can be used to create module config items that will show up in the ModuleTweaker
34
-
* and can be used to control various settings of this module.
35
-
*
36
-
* @param module Module instance.
37
-
* @param configItemCreator Helper to create module config items.
* Called to collect any HUD strings that should be displayed. This will only be called if {@link ModuleData#rendersHUD()} is {@code true}.
62
55
*
63
-
* @param module Module instance.
64
-
* @param player Player using the Meka-Tool or wearing the MekaSuit. In general this will be the client player, but is passed to make sidedness safer and
65
-
* easier.
66
-
* @param hudStringAdder Accepts and adds HUD strings.
56
+
* @param module Module instance.
57
+
* @param moduleContainer The container this module is part of.
58
+
* @param stack The stack this module is installed on.odule is installed on.
59
+
* @param player Player using the Meka-Tool or wearing the MekaSuit. In general this will be the client player, but is passed to make sidedness safer and
60
+
* easier.
61
+
* @param hudStringAdder Accepts and adds HUD strings.
* Called to collect any HUD elements that should be displayed when the MekaSuit is rendering the HUD. This will only be called if {@link ModuleData#rendersHUD()} is
73
68
* {@code true}.
74
69
*
75
70
* @param module Module instance.
71
+
* @param moduleContainer The container this module is part of.
72
+
* @param stack The stack this module is installed on.
76
73
* @param player Player using the Meka-Tool or wearing the MekaSuit. In general this will be the client player, but is passed to make sidedness safer and
77
74
* easier.
78
75
* @param hudElementAdder Accepts and adds HUD elements.
79
76
*
80
77
* @apiNote See {@link IModuleHelper} for various helpers to create HUD elements.
* Called by the Meka-Tool to attempt to set the mode of the module for the given radial data. This will only be called if {@link ModuleData#handlesModeChange()} is
178
176
* {@code true}, but may be called when this module does not support or handle the given radial type, so the radial type should be validated.
179
177
*
180
-
* @param module Module instance.
181
-
* @param player The player who is attempting to set the mode.
182
-
* @param stack The stack to set the mode of.
183
-
* @param radialData Radial data of the mode being set.
184
-
* @param mode Mode to attempt to set if this module can handle modes of this type.
185
-
* @param <MODE> Radial Mode.
178
+
* @param <MODE> Radial Mode.
179
+
* @param module Module instance.
180
+
* @param player The player who is attempting to set the mode.
181
+
* @param moduleContainer The container this module is part of.
182
+
* @param stack The stack this module is installed on.
183
+
* @param radialData Radial data of the mode being set.
184
+
* @param mode Mode to attempt to set if this module can handle modes of this type.
186
185
*
187
186
* @return {@code true} if this module was able to handle the given radial data.
* @param first {@code true} if it is the first module of this type installed.
198
+
* @param module Module instance.
199
+
* @param moduleContainer The container this module is part of.
200
+
* @param stack The stack this module is installed on.
201
+
* @param first {@code true} if it is the first module of this type installed.
201
202
*
202
203
* @apiNote This method may be called when more than one module is added at once, so it is important to get the installed count from the module rather than assume it
* Called when this module is removed from an item.
210
211
*
211
-
* @param module Module instance.
212
-
* @param last {@code true} if it was the last module of this type installed.
212
+
* @param module Module instance.
213
+
* @param moduleContainer The container this module is part of.
214
+
* @param stack The stack this module is installed on.
215
+
* @param wasLast {@code true} if it was the last module of this type installed.
213
216
*
214
-
* @apiNote This method may be called when more than one module is removed at once, so it is important to get the installed count from the module rather than assume it
215
-
* just down up by one.
217
+
* @apiNote This method may be called when more than one module is removed at once, so it is important to get the installed count from the module rather than assume
* Called on enabled modules when the Meka-Tool or MekaSuit is "dispensed" from a dispenser. The MekaSuit will prioritize performing the vanilla armor dispense
279
278
* behavior of equipping on entities before checking if any of the modules have a custom behavior.
280
279
*
281
-
* @param module Module instance.
282
-
* @param source Dispenser source information.
280
+
* @param module Module instance.
281
+
* @param moduleContainer The container this module is part of.
282
+
* @param stack The stack this module is installed on.
283
+
* @param source Dispenser source information.
283
284
*
284
285
* @return The {@link ModuleDispenseResult} defining how this dispenser should behave.
0 commit comments