mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 06:52:21 +00:00
Add anchor offset methods and update ability variant selection UI
This commit is contained in:
1 parent
74cae17ebd
commit
4c5e44fb22
7 files changed
+134
-36
No files matched your search
@@ -13,6 +13,7 @@ import java.util.function.Consumer;
|
||||
public class AbilityVariant {
|
||||
|
||||
private final String displayKey;
|
||||
private final String group;
|
||||
private final Consumer<Ability> configurator;
|
||||
|
||||
/**
|
||||
@@ -20,7 +21,17 @@ public class AbilityVariant {
|
||||
* @param configurator Lambda that configures the ability with preset values
|
||||
*/
|
||||
public AbilityVariant(String displayKey, Consumer<Ability> configurator) {
|
||||
this(displayKey, null, configurator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param displayKey Lang key for the variant display name
|
||||
* @param group Optional group header shown in the variant selection GUI (e.g., "DBC Addon")
|
||||
* @param configurator Lambda that configures the ability with preset values
|
||||
*/
|
||||
public AbilityVariant(String displayKey, String group, Consumer<Ability> configurator) {
|
||||
this.displayKey = displayKey;
|
||||
this.group = group;
|
||||
this.configurator = configurator;
|
||||
}
|
||||
|
||||
@@ -28,6 +39,10 @@ public class AbilityVariant {
|
||||
return displayKey;
|
||||
}
|
||||
|
||||
public String getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply this variant's preset configuration to the given ability.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user