Revise ability logic and configs

This commit is contained in:
Kam committed 2026-01-11 16:04:49 -05:00
1 parent 3dc56aba06
commit 828e99d427
26 files changed
+553 -473

No files matched your search

+1 -1
View File
@@ -537,7 +537,7 @@ public class DataAbilities {
* @param hitEntity The entity being hit
* @param damage The damage amount
* @param knockback The horizontal knockback
* @param knockbackUp The vertical knockback
* @param knockbackUp The vertical knockback (deprecated, ignored)
* @return The event (with possibly modified values), or null if cancelled
*/
public AbilityEvent.HitEvent fireHitEvent(Ability ability, EntityLivingBase target,
@@ -79,6 +79,15 @@ public class CombatHandler {
aggressors.put(el, f + damageAmount);
}
// Handle guard counter before interruption
if (npc.abilities.getCurrentAbility() instanceof kamkeel.npcs.controllers.data.ability.type.AbilityGuard) {
kamkeel.npcs.controllers.data.ability.type.AbilityGuard guard =
(kamkeel.npcs.controllers.data.ability.type.AbilityGuard) npc.abilities.getCurrentAbility();
if (guard.isGuarding() && e instanceof EntityLivingBase) {
guard.onDamageTaken(npc, (EntityLivingBase) e, source, damageAmount);
}
}
// Check for ability interruption
npc.abilities.onDamage(source, damageAmount);
}
@@ -35,21 +35,16 @@ public class SubGuiAbilityCharge extends SubGuiAbilityConfig {
y += 24;
// Row 2: Knockback + Knockback Up
// Row 2: Knockback
addLabel(new GuiNpcLabel(102, "ability.knockback", labelX, y + 5));
addTextField(createFloatField(102, fieldX, y, 50, charge.getKnockback()));
addLabel(new GuiNpcLabel(103, "ability.knockbackUp", col2LabelX, y + 5));
addTextField(createFloatField(103, col2FieldX, y, 50, charge.getKnockbackUp()));
y += 24;
// Row 3: Max Distance + Hit Radius
addLabel(new GuiNpcLabel(104, "ability.maxDist", labelX, y + 5));
addTextField(createFloatField(104, fieldX, y, 50, charge.getMaxDistance()));
// Row 3: Hit Width
addLabel(new GuiNpcLabel(104, "ability.hitWidth", labelX, y + 5));
addTextField(createFloatField(104, fieldX, y, 50, charge.getHitWidth()));
addLabel(new GuiNpcLabel(105, "ability.hitRadius", col2LabelX, y + 5));
addTextField(createFloatField(105, col2FieldX, y, 50, charge.getHitRadius()));
}
@Override
@@ -58,9 +53,7 @@ public class SubGuiAbilityCharge extends SubGuiAbilityConfig {
case 100: charge.setDamage(parseFloat(field, charge.getDamage())); break;
case 101: charge.setChargeSpeed(parseFloat(field, charge.getChargeSpeed())); break;
case 102: charge.setKnockback(parseFloat(field, charge.getKnockback())); break;
case 103: charge.setKnockbackUp(parseFloat(field, charge.getKnockbackUp())); break;
case 104: charge.setMaxDistance(parseFloat(field, charge.getMaxDistance())); break;
case 105: charge.setHitRadius(parseFloat(field, charge.getHitRadius())); break;
case 104: charge.setHitWidth(parseFloat(field, charge.getHitWidth())); break;
}
}
}
@@ -45,18 +45,18 @@ public class SubGuiAbilityCutter extends SubGuiAbilityConfig {
y += 24;
// Row 3: Knockback + Knockback Up
// Row 3: Knockback + Sweep Speed
addLabel(new GuiNpcLabel(104, "ability.knockback", labelX, y + 5));
addTextField(createFloatField(104, fieldX, y, 50, cutter.getKnockback()));
addLabel(new GuiNpcLabel(105, "ability.knockbackUp", col2LabelX, y + 5));
addTextField(createFloatField(105, col2FieldX, y, 50, cutter.getKnockbackUp()));
addLabel(new GuiNpcLabel(105, "ability.sweepSpeed", col2LabelX, y + 5));
addTextField(createFloatField(105, col2FieldX, y, 50, cutter.getSweepSpeed()));
y += 24;
// Row 4: Sweep Mode + Piercing
addLabel(new GuiNpcLabel(106, "ability.sweepMode", labelX, y + 5));
String[] sweepModes = {"Instant", "Expanding", "Rotating"};
String[] sweepModes = {"Swipe", "Spin"};
addButton(new GuiNpcButton(106, fieldX, y, 70, 20, sweepModes, cutter.getSweepMode().ordinal()));
addLabel(new GuiNpcLabel(107, "ability.piercing", col2LabelX, y + 5));
@@ -64,12 +64,18 @@ public class SubGuiAbilityCutter extends SubGuiAbilityConfig {
y += 24;
// Row 5: Stun Duration + Bleed Duration
// Row 5: Stun Duration + Poison Time
addLabel(new GuiNpcLabel(108, "ability.stunDuration", labelX, y + 5));
addTextField(createIntField(108, fieldX, y, 50, cutter.getStunDuration()));
addLabel(new GuiNpcLabel(109, "ability.bleedDuration", col2LabelX, y + 5));
addTextField(createIntField(109, col2FieldX, y, 50, cutter.getBleedDuration()));
addLabel(new GuiNpcLabel(109, "ability.poisonTime", col2LabelX, y + 5));
addTextField(createIntField(109, col2FieldX, y, 50, cutter.getPoisonDurationSeconds()));
y += 24;
// Row 6: Poison Level
addLabel(new GuiNpcLabel(110, "ability.poisonLvl", labelX, y + 5));
addTextField(createIntField(110, fieldX, y, 50, cutter.getPoisonLevel()));
}
@Override
@@ -89,9 +95,10 @@ public class SubGuiAbilityCutter extends SubGuiAbilityConfig {
case 102: cutter.setArcAngle(parseFloat(field, cutter.getArcAngle())); break;
case 103: cutter.setInnerRadius(parseFloat(field, cutter.getInnerRadius())); break;
case 104: cutter.setKnockback(parseFloat(field, cutter.getKnockback())); break;
case 105: cutter.setKnockbackUp(parseFloat(field, cutter.getKnockbackUp())); break;
case 105: cutter.setSweepSpeed(parseFloat(field, cutter.getSweepSpeed())); break;
case 108: cutter.setStunDuration(field.getInteger()); break;
case 109: cutter.setBleedDuration(field.getInteger()); break;
case 109: cutter.setPoisonDurationSeconds(field.getInteger()); break;
case 110: cutter.setPoisonLevel(field.getInteger()); break;
}
}
}
@@ -28,34 +28,58 @@ public class SubGuiAbilityGuard extends SubGuiAbilityConfig {
int col2FieldX = guiLeft + 225;
// Row 1: Damage Reduction
addLabel(new GuiNpcLabel(100, "ability.dmgReduction", labelX, y + 5));
addLabel(new GuiNpcLabel(100, "ability.dmgReduce", labelX, y + 5));
addTextField(createFloatField(100, fieldX, y, 50, guard.getDamageReduction()));
y += 24;
// Row 2: Can Counter + Counter Damage
// Row 2: Can Counter + Counter Type
addLabel(new GuiNpcLabel(101, "ability.canCounter", labelX, y + 5));
addButton(new GuiNpcButton(101, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, guard.isCanCounter() ? 1 : 0));
addLabel(new GuiNpcLabel(102, "ability.counterDmg", col2LabelX, y + 5));
GuiNpcTextField counterDmgField = createFloatField(102, col2FieldX, y, 40, guard.getCounterDamage());
counterDmgField.setEnabled(guard.isCanCounter());
addTextField(counterDmgField);
addLabel(new GuiNpcLabel(102, "ability.counterType", col2LabelX, y + 5));
String[] types = {"Flat", "Percent"};
GuiNpcButton counterTypeButton = new GuiNpcButton(102, col2FieldX, y, 60, 20, types, guard.getCounterType().ordinal());
counterTypeButton.setEnabled(guard.isCanCounter());
addButton(counterTypeButton);
y += 24;
// Row 3: Counter Chance
addLabel(new GuiNpcLabel(103, "ability.counterChance", labelX, y + 5));
GuiNpcTextField counterChanceField = createFloatField(103, fieldX, y, 50, guard.getCounterChance());
// Row 3: Counter Value + Counter Chance
addLabel(new GuiNpcLabel(103, "ability.counterValue", labelX, y + 5));
GuiNpcTextField counterValueField = createFloatField(103, fieldX, y, 50, guard.getCounterValue());
counterValueField.setEnabled(guard.isCanCounter());
addTextField(counterValueField);
addLabel(new GuiNpcLabel(104, "ability.counterChance", col2LabelX, y + 5));
GuiNpcTextField counterChanceField = createFloatField(104, col2FieldX, y, 50, guard.getCounterChance());
counterChanceField.setEnabled(guard.isCanCounter());
addTextField(counterChanceField);
y += 24;
// Row 4: Counter Sound + Counter Animation
addLabel(new GuiNpcLabel(105, "ability.counterSound", labelX, y + 5));
GuiNpcTextField counterSoundField = new GuiNpcTextField(105, this, fontRendererObj, fieldX, y, 100, 20, guard.getCounterSound());
counterSoundField.setEnabled(guard.isCanCounter());
addTextField(counterSoundField);
addLabel(new GuiNpcLabel(106, "ability.counterAnim", col2LabelX, y + 5));
GuiNpcTextField counterAnimField = createIntField(106, col2FieldX, y, 50, guard.getCounterAnimationId());
counterAnimField.setEnabled(guard.isCanCounter());
addTextField(counterAnimField);
}
@Override
protected void handleTypeButton(int id, GuiNpcButton button) {
if (id == 101) {
guard.setCanCounter(button.getValue() == 1);
initGui();
switch (id) {
case 101:
guard.setCanCounter(button.getValue() == 1);
initGui();
break;
case 102:
guard.setCounterType(AbilityGuard.CounterType.values()[button.getValue()]);
break;
}
}
@@ -63,8 +87,10 @@ public class SubGuiAbilityGuard extends SubGuiAbilityConfig {
protected void handleTypeTextField(int id, GuiNpcTextField field) {
switch (id) {
case 100: guard.setDamageReduction(parseFloat(field, guard.getDamageReduction())); break;
case 102: guard.setCounterDamage(parseFloat(field, guard.getCounterDamage())); break;
case 103: guard.setCounterChance(parseFloat(field, guard.getCounterChance())); break;
case 103: guard.setCounterValue(parseFloat(field, guard.getCounterValue())); break;
case 104: guard.setCounterChance(parseFloat(field, guard.getCounterChance())); break;
case 105: guard.setCounterSound(field.getText()); break;
case 106: guard.setCounterAnimationId(field.getInteger()); break;
}
}
}
@@ -26,30 +26,37 @@ public class SubGuiAbilityHeavyHit extends SubGuiAbilityConfig {
int col2LabelX = guiLeft + 145;
int col2FieldX = guiLeft + 205;
// Row 1: Damage + Stun Ticks
// Row 1: Damage + Potion Time
addLabel(new GuiNpcLabel(100, "ability.damage", labelX, y + 5));
addTextField(createFloatField(100, fieldX, y, 50, heavyHit.getDamage()));
addLabel(new GuiNpcLabel(101, "ability.stunTicks", col2LabelX, y + 5));
addTextField(createIntField(101, col2FieldX, y, 50, heavyHit.getStunTicks()));
addLabel(new GuiNpcLabel(101, "ability.potionTime", col2LabelX, y + 5));
addTextField(createIntField(101, col2FieldX, y, 50, heavyHit.getPotionDurationSeconds()));
y += 24;
// Row 2: Knockback + Knockback Up
// Row 2: Knockback + Slowness Level
addLabel(new GuiNpcLabel(102, "ability.knockback", labelX, y + 5));
addTextField(createFloatField(102, fieldX, y, 50, heavyHit.getKnockback()));
addLabel(new GuiNpcLabel(103, "ability.knockbackUp", col2LabelX, y + 5));
addTextField(createFloatField(103, col2FieldX, y, 50, heavyHit.getKnockbackUp()));
addLabel(new GuiNpcLabel(103, "ability.slownessLvl", col2LabelX, y + 5));
addTextField(createIntField(103, col2FieldX, y, 50, heavyHit.getSlownessLevel()));
y += 24;
// Row 3: Weakness Level
addLabel(new GuiNpcLabel(104, "ability.weaknessLvl", labelX, y + 5));
addTextField(createIntField(104, fieldX, y, 50, heavyHit.getWeaknessLevel()));
}
@Override
protected void handleTypeTextField(int id, GuiNpcTextField field) {
switch (id) {
case 100: heavyHit.setDamage(parseFloat(field, heavyHit.getDamage())); break;
case 101: heavyHit.setStunTicks(field.getInteger()); break;
case 101: heavyHit.setPotionDurationSeconds(field.getInteger()); break;
case 102: heavyHit.setKnockback(parseFloat(field, heavyHit.getKnockback())); break;
case 103: heavyHit.setKnockbackUp(parseFloat(field, heavyHit.getKnockbackUp())); break;
case 103: heavyHit.setSlownessLevel(field.getInteger()); break;
case 104: heavyHit.setWeaknessLevel(field.getInteger()); break;
}
}
}
@@ -3,7 +3,6 @@ package noppes.npcs.client.gui.advanced.ability;
import kamkeel.npcs.controllers.data.ability.type.AbilityShockwave;
import noppes.npcs.client.gui.util.IAbilityConfigCallback;
import noppes.npcs.client.gui.advanced.SubGuiAbilityConfig;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.client.gui.util.GuiNpcTextField;
@@ -36,21 +35,21 @@ public class SubGuiAbilityShockwave extends SubGuiAbilityConfig {
y += 24;
// Row 2: Push Strength + Push Up
// Row 2: Push Strength
addLabel(new GuiNpcLabel(102, "ability.pushStrength", labelX, y + 5));
addTextField(createFloatField(102, fieldX, y, 50, shockwave.getPushStrength()));
addLabel(new GuiNpcLabel(103, "ability.pushUp", col2LabelX, y + 5));
addTextField(createFloatField(103, col2FieldX, y, 50, shockwave.getPushUp()));
y += 24;
// Row 3: Stun Duration + Max Targets
addLabel(new GuiNpcLabel(104, "ability.stunDuration", labelX, y + 5));
addTextField(createIntField(104, fieldX, y, 50, shockwave.getStunDuration()));
addLabel(new GuiNpcLabel(103, "ability.stunDuration", labelX, y + 5));
addTextField(createIntField(103, fieldX, y, 50, shockwave.getStunDuration()));
addLabel(new GuiNpcLabel(105, "ability.maxTargets", col2LabelX, y + 5));
addTextField(createIntField(105, col2FieldX, y, 50, shockwave.getMaxTargets()));
addLabel(new GuiNpcLabel(104, "ability.maxTargets", col2LabelX, y + 5));
addTextField(createIntField(104, col2FieldX, y, 50, shockwave.getMaxTargets()));
y += 24;
addLabel(new GuiNpcLabel(105, "ability.shockwaveFalloff", labelX, y + 5));
}
@Override
@@ -59,9 +58,8 @@ public class SubGuiAbilityShockwave extends SubGuiAbilityConfig {
case 100: shockwave.setDamage(parseFloat(field, shockwave.getDamage())); break;
case 101: shockwave.setPushRadius(parseFloat(field, shockwave.getPushRadius())); break;
case 102: shockwave.setPushStrength(parseFloat(field, shockwave.getPushStrength())); break;
case 103: shockwave.setPushUp(parseFloat(field, shockwave.getPushUp())); break;
case 104: shockwave.setStunDuration(field.getInteger()); break;
case 105: shockwave.setMaxTargets(field.getInteger()); break;
case 103: shockwave.setStunDuration(field.getInteger()); break;
case 104: shockwave.setMaxTargets(field.getInteger()); break;
}
}
}
@@ -3,7 +3,6 @@ package noppes.npcs.client.gui.advanced.ability;
import kamkeel.npcs.controllers.data.ability.type.AbilitySlam;
import noppes.npcs.client.gui.util.IAbilityConfigCallback;
import noppes.npcs.client.gui.advanced.SubGuiAbilityConfig;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.client.gui.util.GuiNpcTextField;
@@ -45,12 +44,9 @@ public class SubGuiAbilitySlam extends SubGuiAbilityConfig {
y += 24;
// Row 3: Min/Max Leap Distance
addLabel(new GuiNpcLabel(104, "ability.minDist", labelX, y + 5));
addTextField(createFloatField(104, fieldX, y, 50, slam.getMinLeapDistance()));
addLabel(new GuiNpcLabel(105, "ability.maxDist", col2LabelX, y + 5));
addTextField(createFloatField(105, col2FieldX, y, 50, slam.getMaxLeapDistance()));
// Row 3: Leap Height
addLabel(new GuiNpcLabel(104, "ability.leapHeight", labelX, y + 5));
addTextField(createFloatField(104, fieldX, y, 50, slam.getLeapHeight()));
}
@Override
@@ -60,8 +56,7 @@ public class SubGuiAbilitySlam extends SubGuiAbilityConfig {
case 101: slam.setRadius(parseFloat(field, slam.getRadius())); break;
case 102: slam.setKnockbackStrength(parseFloat(field, slam.getKnockbackStrength())); break;
case 103: slam.setLeapSpeed(parseFloat(field, slam.getLeapSpeed())); break;
case 104: slam.setMinLeapDistance(parseFloat(field, slam.getMinLeapDistance())); break;
case 105: slam.setMaxLeapDistance(parseFloat(field, slam.getMaxLeapDistance())); break;
case 104: slam.setLeapHeight(parseFloat(field, slam.getLeapHeight())); break;
}
}
}
@@ -27,55 +27,77 @@ public class SubGuiAbilityTeleport extends SubGuiAbilityConfig {
int col2LabelX = guiLeft + 145;
int col2FieldX = guiLeft + 205;
// Row 1: Pattern
addLabel(new GuiNpcLabel(100, "ability.pattern", labelX, y + 5));
String[] patterns = {"Random", "Toward", "Away", "Behind", "InFront", "Around", "ToTarget"};
addButton(new GuiNpcButton(100, fieldX, y, 80, 20, patterns, teleport.getPattern().ordinal()));
// Row 1: Mode
addLabel(new GuiNpcLabel(100, "ability.mode", labelX, y + 5));
String[] modes = {"Blink", "Behind", "Single"};
addButton(new GuiNpcButton(100, fieldX, y, 80, 20, modes, teleport.getMode().ordinal()));
y += 24;
// Row 2: Blink Radius + Min Blink Radius
addLabel(new GuiNpcLabel(101, "ability.blinkRadius", labelX, y + 5));
addTextField(createFloatField(101, fieldX, y, 50, teleport.getBlinkRadius()));
switch (teleport.getMode()) {
case BLINK:
// Row 2: Blink Radius + Blink Count
addLabel(new GuiNpcLabel(101, "ability.blinkRadius", labelX, y + 5));
addTextField(createFloatField(101, fieldX, y, 50, teleport.getBlinkRadius()));
addLabel(new GuiNpcLabel(102, "ability.minBlinkRad", col2LabelX, y + 5));
addTextField(createFloatField(102, col2FieldX, y, 50, teleport.getMinBlinkRadius()));
addLabel(new GuiNpcLabel(102, "ability.blinkCount", col2LabelX, y + 5));
addTextField(createIntField(102, col2FieldX, y, 50, teleport.getBlinkCount()));
y += 24;
// Row 3: Blink Delay + Line of Sight
addLabel(new GuiNpcLabel(103, "ability.blinkDelay", labelX, y + 5));
addTextField(createIntField(103, fieldX, y, 50, teleport.getBlinkDelayTicks()));
addLabel(new GuiNpcLabel(105, "ability.lineOfSight", col2LabelX, y + 5));
addButton(new GuiNpcButton(105, col2FieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, teleport.isRequireLineOfSight() ? 1 : 0));
y += 24;
break;
case SINGLE:
// Row 2: Blink Radius + Line of Sight
addLabel(new GuiNpcLabel(101, "ability.blinkRadius", labelX, y + 5));
addTextField(createFloatField(101, fieldX, y, 50, teleport.getBlinkRadius()));
addLabel(new GuiNpcLabel(105, "ability.lineOfSight", col2LabelX, y + 5));
addButton(new GuiNpcButton(105, col2FieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, teleport.isRequireLineOfSight() ? 1 : 0));
y += 24;
break;
case BEHIND:
// Row 2: Behind Distance
addLabel(new GuiNpcLabel(104, "ability.behindDistance", labelX, y + 5));
addTextField(createFloatField(104, fieldX, y, 50, teleport.getBehindDistance()));
y += 24;
break;
}
// Damage + Damage Radius
addLabel(new GuiNpcLabel(106, "ability.damage", labelX, y + 5));
addTextField(createFloatField(106, fieldX, y, 50, teleport.getDamage()));
addLabel(new GuiNpcLabel(107, "ability.dmgRadius", col2LabelX, y + 5));
addTextField(createFloatField(107, col2FieldX, y, 50, teleport.getDamageRadius()));
y += 24;
// Row 3: Blink Count + Blink Delay
addLabel(new GuiNpcLabel(103, "ability.blinkCount", labelX, y + 5));
addTextField(createIntField(103, fieldX, y, 50, teleport.getBlinkCount()));
// Damage at Start/End
addLabel(new GuiNpcLabel(108, "ability.dmgAtStart", labelX, y + 5));
addButton(new GuiNpcButton(108, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, teleport.isDamageAtStart() ? 1 : 0));
addLabel(new GuiNpcLabel(104, "ability.blinkDelay", col2LabelX, y + 5));
addTextField(createIntField(104, col2FieldX, y, 50, teleport.getBlinkDelayTicks()));
y += 24;
// Row 4: Damage + Damage Radius
addLabel(new GuiNpcLabel(105, "ability.damage", labelX, y + 5));
addTextField(createFloatField(105, fieldX, y, 50, teleport.getDamage()));
addLabel(new GuiNpcLabel(106, "ability.dmgRadius", col2LabelX, y + 5));
addTextField(createFloatField(106, col2FieldX, y, 50, teleport.getDamageRadius()));
y += 24;
// Row 5: Damage at Start/End + Require LOS
addLabel(new GuiNpcLabel(107, "ability.dmgAtStart", labelX, y + 5));
addButton(new GuiNpcButton(107, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, teleport.isDamageAtStart() ? 1 : 0));
addLabel(new GuiNpcLabel(108, "ability.dmgAtEnd", col2LabelX, y + 5));
addButton(new GuiNpcButton(108, col2FieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, teleport.isDamageAtEnd() ? 1 : 0));
addLabel(new GuiNpcLabel(109, "ability.dmgAtEnd", col2LabelX, y + 5));
addButton(new GuiNpcButton(109, col2FieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, teleport.isDamageAtEnd() ? 1 : 0));
}
@Override
protected void handleTypeButton(int id, GuiNpcButton button) {
int value = button.getValue();
switch (id) {
case 100: teleport.setPattern(AbilityTeleport.TeleportPattern.values()[value]); break;
case 107: teleport.setDamageAtStart(value == 1); break;
case 108: teleport.setDamageAtEnd(value == 1); break;
case 100:
teleport.setMode(AbilityTeleport.TeleportMode.values()[value]);
initGui();
break;
case 105: teleport.setRequireLineOfSight(value == 1); break;
case 108: teleport.setDamageAtStart(value == 1); break;
case 109: teleport.setDamageAtEnd(value == 1); break;
}
}
@@ -83,11 +105,11 @@ public class SubGuiAbilityTeleport extends SubGuiAbilityConfig {
protected void handleTypeTextField(int id, GuiNpcTextField field) {
switch (id) {
case 101: teleport.setBlinkRadius(parseFloat(field, teleport.getBlinkRadius())); break;
case 102: teleport.setMinBlinkRadius(parseFloat(field, teleport.getMinBlinkRadius())); break;
case 103: teleport.setBlinkCount(field.getInteger()); break;
case 104: teleport.setBlinkDelayTicks(field.getInteger()); break;
case 105: teleport.setDamage(parseFloat(field, teleport.getDamage())); break;
case 106: teleport.setDamageRadius(parseFloat(field, teleport.getDamageRadius())); break;
case 102: teleport.setBlinkCount(field.getInteger()); break;
case 103: teleport.setBlinkDelayTicks(field.getInteger()); break;
case 104: teleport.setBehindDistance(parseFloat(field, teleport.getBehindDistance())); break;
case 106: teleport.setDamage(parseFloat(field, teleport.getDamage())); break;
case 107: teleport.setDamageRadius(parseFloat(field, teleport.getDamageRadius())); break;
}
}
}
@@ -64,12 +64,9 @@ public class SubGuiAbilityTrap extends SubGuiAbilityConfig {
y += 24;
// Row 5: Knockback + Knockback Up
// Row 5: Knockback
addLabel(new GuiNpcLabel(108, "ability.knockback", labelX, y + 5));
addTextField(createFloatField(108, fieldX, y, 50, trap.getKnockback()));
addLabel(new GuiNpcLabel(109, "ability.knockbackUp", col2LabelX, y + 5));
addTextField(createFloatField(109, col2FieldX, y, 50, trap.getKnockbackUp()));
}
@Override
@@ -90,7 +87,6 @@ public class SubGuiAbilityTrap extends SubGuiAbilityConfig {
case 106: trap.setRootDuration(field.getInteger()); break;
case 107: trap.setStunDuration(field.getInteger()); break;
case 108: trap.setKnockback(parseFloat(field, trap.getKnockback())); break;
case 109: trap.setKnockbackUp(parseFloat(field, trap.getKnockbackUp())); break;
}
}
}