mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 16:54:30 +00:00
Various Fixes
This commit is contained in:
1 parent
2e5c4c3bf4
commit
af02b0ab1d
20 files changed
+599
-163
No files matched your search
@@ -0,0 +1,53 @@
|
||||
package kamkeel.npcs.controllers.data.ability;
|
||||
|
||||
/**
|
||||
* Defines what happens to NPC rotation during ability phases.
|
||||
* Used with a LockMovementType to control WHEN it applies.
|
||||
*/
|
||||
public enum RotationMode {
|
||||
/**
|
||||
* NPC rotates normally via AI look helper.
|
||||
*/
|
||||
FREE,
|
||||
|
||||
/**
|
||||
* Freeze rotation at the moment the phase starts.
|
||||
* NPC stays facing the direction it was looking when the phase began.
|
||||
*/
|
||||
LOCKED,
|
||||
|
||||
/**
|
||||
* Force NPC to continuously face its target (hit scan).
|
||||
* Overrides AI look helper every tick for precise aiming.
|
||||
*/
|
||||
TRACK;
|
||||
|
||||
public String getDisplayKey() {
|
||||
switch (this) {
|
||||
case FREE:
|
||||
return "ability.rotation.free";
|
||||
case LOCKED:
|
||||
return "ability.rotation.locked";
|
||||
case TRACK:
|
||||
return "ability.rotation.track";
|
||||
default:
|
||||
return "ability.rotation.free";
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] getDisplayKeys() {
|
||||
return new String[]{
|
||||
"ability.rotation.free",
|
||||
"ability.rotation.locked",
|
||||
"ability.rotation.track"
|
||||
};
|
||||
}
|
||||
|
||||
public static RotationMode fromOrdinal(int ordinal) {
|
||||
RotationMode[] values = values();
|
||||
if (ordinal >= 0 && ordinal < values.length) {
|
||||
return values[ordinal];
|
||||
}
|
||||
return FREE;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user