mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-23 21:49:53 +00:00
Merge branch 'dev' into syntax-highlighter-unified
This commit is contained in:
commit
5a9b9a1feb
36 files changed
+2227
-2736
No files matched your search
@@ -186,7 +186,7 @@ public class DataAbilities {
|
||||
playAbilitySound(currentAbility.getWindUpSound());
|
||||
playAbilityAnimation(currentAbility.getWindUpAnimation());
|
||||
}
|
||||
currentAbility.onWindUpTick(npc, target, npc.worldObj, currentAbility.getCurrentTick());
|
||||
currentAbility.onWindUpTick(npc, target, currentAbility.getCurrentTick());
|
||||
break;
|
||||
|
||||
case ACTIVE:
|
||||
@@ -221,11 +221,6 @@ public class DataAbilities {
|
||||
releaseLockedPosition();
|
||||
}
|
||||
|
||||
// Burst re-fire without replay: let entity-spawning abilities spawn+fire in one step
|
||||
if (oldPhase == AbilityPhase.BURST_DELAY && !currentAbility.isBurstReplayAnimations()) {
|
||||
currentAbility.onBurstRefire(npc, target, npc.worldObj);
|
||||
}
|
||||
|
||||
// Play active sound and animation
|
||||
// Abilities that keep telegraph during active manage their own sound timing
|
||||
if (!currentAbility.keepTelegraphDuringActive()) {
|
||||
@@ -247,7 +242,7 @@ public class DataAbilities {
|
||||
}
|
||||
|
||||
// Call onExecute
|
||||
currentAbility.onExecute(npc, target, npc.worldObj);
|
||||
currentAbility.onExecute(npc, target);
|
||||
|
||||
// Check if ability completed during onExecute (signalCompletion was called)
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE) {
|
||||
@@ -255,7 +250,7 @@ public class DataAbilities {
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentAbility.onActiveTick(npc, target, npc.worldObj, currentAbility.getCurrentTick());
|
||||
currentAbility.onActiveTick(npc, target, currentAbility.getCurrentTick());
|
||||
|
||||
// Check if ability completed during onActiveTick (signalCompletion was called)
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE) {
|
||||
@@ -554,7 +549,7 @@ public class DataAbilities {
|
||||
}
|
||||
|
||||
// Call onExecute
|
||||
ability.onExecute(npc, target, npc.worldObj);
|
||||
ability.onExecute(npc, target);
|
||||
|
||||
// Check if ability completed during onExecute
|
||||
if (ability.getPhase() == AbilityPhase.IDLE) {
|
||||
|
||||
@@ -32,8 +32,8 @@ public class FieldDef {
|
||||
private String hoverText = null;
|
||||
|
||||
// Numeric range
|
||||
private float min = Float.MIN_VALUE;
|
||||
private float max = Float.MAX_VALUE;
|
||||
private float min = 0;
|
||||
private float max = Float.POSITIVE_INFINITY;
|
||||
|
||||
// Enum support
|
||||
private Class<? extends Enum<?>> enumClass;
|
||||
@@ -272,7 +272,7 @@ public class FieldDef {
|
||||
public String getHoverText() { return hoverText; }
|
||||
public float getMin() { return min; }
|
||||
public float getMax() { return max; }
|
||||
public boolean hasRange() { return min != Float.MIN_VALUE || max != Float.MAX_VALUE; }
|
||||
public boolean hasRange() { return min != Float.NEGATIVE_INFINITY || max != Float.POSITIVE_INFINITY; }
|
||||
public Class<? extends Enum<?>> getEnumClass() { return enumClass; }
|
||||
public String[] getStringEnumValues() { return stringEnumValues; }
|
||||
public Supplier<SubGuiInterface> getSubGuiFactory() { return subGuiFactory; }
|
||||
|
||||
@@ -290,7 +290,7 @@ public class AbilityPreviewExecutor implements PreviewEntityHandler {
|
||||
|
||||
private void tickWindup() {
|
||||
// Call the REAL windup tick method
|
||||
previewAbility.onWindUpTick(previewNpc, fakeTarget, previewNpc.worldObj, currentTick);
|
||||
previewAbility.onWindUpTick(previewNpc, fakeTarget, currentTick);
|
||||
|
||||
if (currentTick >= previewAbility.getWindUpTicks()) {
|
||||
transitionToActive();
|
||||
@@ -299,7 +299,7 @@ public class AbilityPreviewExecutor implements PreviewEntityHandler {
|
||||
|
||||
private void tickActive() {
|
||||
// Call the REAL active tick method
|
||||
previewAbility.onActiveTick(previewNpc, fakeTarget, previewNpc.worldObj, currentTick);
|
||||
previewAbility.onActiveTick(previewNpc, fakeTarget, currentTick);
|
||||
|
||||
// Simulate physics for movement abilities
|
||||
simulatePhysics();
|
||||
@@ -330,7 +330,7 @@ public class AbilityPreviewExecutor implements PreviewEntityHandler {
|
||||
previewTelegraph = null;
|
||||
|
||||
// Call the REAL onExecute method (fires entities, initiates movement, etc.)
|
||||
previewAbility.onExecute(previewNpc, fakeTarget, previewNpc.worldObj);
|
||||
previewAbility.onExecute(previewNpc, fakeTarget);
|
||||
|
||||
// Start active animation
|
||||
Animation activeAnim = previewAbility.getActiveAnimation();
|
||||
|
||||
@@ -22,8 +22,8 @@ public class GuiNpcTextField extends GuiTextField {
|
||||
private ITextfieldListener listener;
|
||||
public int id;
|
||||
public int min = 0, max = Integer.MAX_VALUE, def = 0;
|
||||
public double minDouble = 0, maxDouble = Double.MAX_VALUE, defDouble = 0;
|
||||
public float minFloat = 0, maxFloat = Float.MAX_VALUE, defFloat = 0;
|
||||
public double minDouble = Double.NEGATIVE_INFINITY, maxDouble = Double.POSITIVE_INFINITY, defDouble = 0;
|
||||
public float minFloat = Float.NEGATIVE_INFINITY, maxFloat = Float.POSITIVE_INFINITY, defFloat = 0;
|
||||
protected static GuiNpcTextField activeTextfield = null;
|
||||
public boolean canEdit = true;
|
||||
public String hoverableText = "";
|
||||
|
||||
@@ -161,7 +161,7 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
playAbilitySound(player, currentAbility.getWindUpSound());
|
||||
playAbilityAnimation(currentAbility.getWindUpAnimation());
|
||||
}
|
||||
currentAbility.onWindUpTick(player, currentTarget, player.worldObj, currentAbility.getCurrentTick());
|
||||
currentAbility.onWindUpTick(player, currentTarget, currentAbility.getCurrentTick());
|
||||
break;
|
||||
|
||||
case ACTIVE:
|
||||
@@ -170,7 +170,10 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
for (TelegraphInstance telegraph : currentAbility.getTelegraphInstances()) {
|
||||
telegraph.lockPosition();
|
||||
}
|
||||
removeTelegraph(currentAbility, player);
|
||||
// Remove telegraph unless the ability keeps it during active phase
|
||||
if (!currentAbility.keepTelegraphDuringActive()) {
|
||||
removeTelegraph(currentAbility, player);
|
||||
}
|
||||
|
||||
// Handle rotation control transition from WINDUP to ACTIVE
|
||||
if (currentAbility.isRotationLockedDuringActive()) {
|
||||
@@ -195,20 +198,28 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
playAbilityAnimation(currentAbility.getActiveAnimation());
|
||||
|
||||
// Call onExecute
|
||||
currentAbility.onExecute(player, currentTarget, player.worldObj);
|
||||
currentAbility.onExecute(player, currentTarget);
|
||||
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE) {
|
||||
handleAbilityCompletion(player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentAbility.onActiveTick(player, currentTarget, player.worldObj, currentAbility.getCurrentTick());
|
||||
currentAbility.onActiveTick(player, currentTarget, currentAbility.getCurrentTick());
|
||||
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE) {
|
||||
handleAbilityCompletion(player);
|
||||
return;
|
||||
}
|
||||
|
||||
// Auto-complete for burst overlap mode (entities fly independently)
|
||||
if (currentAbility.isBurstEnabled() && currentAbility.isBurstOverlap()
|
||||
&& currentAbility.getBurstIndex() < currentAbility.getBurstAmount()
|
||||
&& currentAbility.getPhase() == AbilityPhase.ACTIVE
|
||||
&& currentAbility.isReadyForBurstCompletion(currentAbility.getCurrentTick())) {
|
||||
currentAbility.signalCompletion();
|
||||
}
|
||||
|
||||
// Release locks during burst delay
|
||||
if (currentAbility.getPhase() == AbilityPhase.BURST_DELAY) {
|
||||
if (rotationLocked) releaseRotationControl();
|
||||
@@ -348,7 +359,7 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
playAbilityAnimation(ability.getActiveAnimation());
|
||||
|
||||
// Call onExecute
|
||||
ability.onExecute(player, currentTarget, player.worldObj);
|
||||
ability.onExecute(player, currentTarget);
|
||||
|
||||
// Check if ability completed during onExecute
|
||||
if (ability.getPhase() == AbilityPhase.IDLE) {
|
||||
|
||||
Reference in new issue
Block a user