-
Notifications
You must be signed in to change notification settings - Fork 754
/
ToolModule.java
24 lines (21 loc) · 1.13 KB
/
ToolModule.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package slimeknights.tconstruct.library.tools.definition.module;
import slimeknights.mantle.data.loadable.record.RecordLoadable;
import slimeknights.mantle.data.registry.GenericLoaderRegistry;
import slimeknights.mantle.data.registry.GenericLoaderRegistry.IHaveLoader;
import slimeknights.tconstruct.library.module.HookProvider;
import slimeknights.tconstruct.library.module.WithHooks;
import slimeknights.tconstruct.tools.item.ArmorSlotType;
/**
* Base interface for modules within the tool definition data
*/
public interface ToolModule extends IHaveLoader, HookProvider {
/** Loader instance for any modules loadable in tools */
GenericLoaderRegistry<ToolModule> LOADER = new GenericLoaderRegistry<>("Tool Module", false);
/** Loadable for modules including hooks */
RecordLoadable<WithHooks<ToolModule>> WITH_HOOKS = WithHooks.makeLoadable(LOADER, ToolHooks.LOADER);
/** Interface for armor module builders, which are builders designed to create slightly varied modules based on the armor slot */
interface ArmorModuleBuilder<T extends ToolModule> {
/** Builds the module for the given slot */
T build(ArmorSlotType slot);
}
}