mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Update Ability.java
This commit is contained in:
1 parent
8aa6e926f6
commit
b368871e4f
1 file changed
+12
@@ -481,6 +481,7 @@ public abstract class Ability implements IAbility {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final List<FieldDef> getAllFieldDefinitions() {
|
||||
List<FieldDef> all = new ArrayList<>(getBaseFieldDefinitions());
|
||||
modifyBaseFieldDefinitions(all);
|
||||
List<FieldDef> typeDefs = getFieldDefinitions();
|
||||
// Default tab for type-specific fields that don't explicitly set one
|
||||
for (FieldDef def : typeDefs) {
|
||||
@@ -492,6 +493,17 @@ public abstract class Ability implements IAbility {
|
||||
return all;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override to modify the base field definitions before type-specific fields are added.
|
||||
* Use {@link FieldDef#insertBefore}, {@link FieldDef#insertAfter}, or direct list
|
||||
* manipulation to add, remove, or reorder base fields.
|
||||
*
|
||||
* @param baseFields The mutable list of base fields (General/Target/Effects tabs)
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void modifyBaseFieldDefinitions(List<FieldDef> baseFields) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the GUI for configuring this ability.
|
||||
* Override this method to provide a custom GUI subclass for type-specific settings.
|
||||
|
||||
Reference in new issue
Block a user