diff --git a/gradle-plugins b/gradle-plugins index 34cbba98f..6b643524c 160000 --- a/gradle-plugins +++ b/gradle-plugins @@ -1 +1 @@ -Subproject commit 34cbba98f1d3edf84e8c7d67216fe02a520a5cbc +Subproject commit 6b643524c151677b6b3c583edad14406f35b3843 diff --git a/src/api b/src/api index 52cfe77bb..aac5f98be 160000 --- a/src/api +++ b/src/api @@ -1 +1 @@ -Subproject commit 52cfe77bb776f10db17137ddb623503d8fe52ad0 +Subproject commit aac5f98be85b2004f61733c1c97bdae26329a714 diff --git a/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilityDash.java b/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilityDash.java index af7e8fa7a..2757bbf18 100644 --- a/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilityDash.java +++ b/src/main/java/kamkeel/npcs/controllers/data/ability/type/AbilityDash.java @@ -55,7 +55,8 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { RIGHT(-90), DIAGONAL_BACK_LEFT(135), DIAGONAL_BACK_RIGHT(-135), - BACK(180); + BACK(180), + CUSTOM(0); private final float angleOffset; @@ -66,6 +67,40 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { public float getAngleOffset() { return angleOffset; } + + @Override + public String toString() { + switch (this) { + case FORWARD: + return "ability.dash.forward"; + case DIAGONAL_FORWARD_LEFT: + return "ability.dash.diagonalForwardLeft"; + case DIAGONAL_FORWARD_RIGHT: + return "ability.dash.diagonalForwardRight"; + case LEFT: + return "ability.dash.left"; + case RIGHT: + return "ability.dash.right"; + case DIAGONAL_BACK_LEFT: + return "ability.dash.diagonalBackLeft"; + case DIAGONAL_BACK_RIGHT: + return "ability.dash.diagonalBackRight"; + case BACK: + return "ability.dash.back"; + case CUSTOM: + return "ability.dash.custom"; + default: + return name(); + } + } + + public static DashDirection fromOrdinal(int ordinal) { + DashDirection[] values = values(); + if (ordinal >= 0 && ordinal < values.length) { + return values[ordinal]; + } + return DashDirection.FORWARD; + } } private static final Random RANDOM = new Random(); @@ -86,8 +121,10 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { // Type-specific parameters private DashMode dashMode = DashMode.DEFENSIVE; + private DashDirection dashDirection = DashDirection.FORWARD; private float dashDistance = 4.0f; private float dashSpeed = 0.5f; + private float dashAngle = 0.0f; // Type-specific runtime state private transient DashDirection chosenDirection; @@ -107,7 +144,6 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { this.telegraphType = TelegraphType.NONE; this.showTelegraph = false; this.windUpSound = "mob.bat.takeoff"; - this.activeSound = "mob.endermen.portal"; } @Override @@ -133,8 +169,11 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { if (dashMode == DashMode.DIRECTIONAL) { // Dash straight in the caster's look direction - chosenDirection = DashDirection.FORWARD; - setDirectionFromYaw(caster.rotationYaw); + chosenDirection = dashDirection; + float baseYaw = getBaseYaw(caster, target); + float angleOffset = chosenDirection == DashDirection.CUSTOM ? dashAngle : chosenDirection.getAngleOffset(); + float dashYaw = baseYaw + angleOffset; + setDirectionFromYaw(dashYaw); } else { // Choose random direction based on mode DashDirection[] directions = dashMode == DashMode.AGGRESSIVE @@ -241,8 +280,10 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { @Override public void writeTypeNBT(NBTTagCompound nbt) { nbt.setString("dashMode", dashMode.name()); + nbt.setString("dashDirection", dashDirection.name()); nbt.setFloat("dashDistance", dashDistance); nbt.setFloat("dashSpeed", dashSpeed); + nbt.setFloat("dashAngle", dashAngle); } @Override @@ -252,8 +293,16 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { } catch (Exception e) { this.dashMode = DashMode.DEFENSIVE; } + + try { + this.dashDirection = DashDirection.valueOf(nbt.getString("dashDirection")); + } catch (Exception e) { + this.dashDirection = DashDirection.FORWARD; + } + this.dashDistance = nbt.hasKey("dashDistance") ? nbt.getFloat("dashDistance") : 4.0f; this.dashSpeed = nbt.hasKey("dashSpeed") ? Math.max(0.01f, nbt.getFloat("dashSpeed")) : 0.5f; + this.dashAngle = nbt.hasKey("dashAngle") ? Math.max(0.01f, nbt.getFloat("dashAngle")) : 0.0f; } // Getters & Setters @@ -292,6 +341,34 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { this.dashSpeed = dashSpeed; } + public float getDashAngle() { + return dashAngle; + } + + public void setDashAngle(float dashAngle) { + this.dashAngle = dashAngle; + } + + public DashDirection getDashDirectionEnum() { + return dashDirection; + } + + public void setDashDirectionEnum(DashDirection dashDirection) { + this.dashDirection = dashDirection; + } + + @Override + public int getDashDirection() { + return dashDirection.ordinal(); + } + + @Override + public void setDashDirection(int mode) { + DashDirection[] values = DashDirection.values(); + this.dashDirection = mode >= 0 && mode < values.length ? values[mode] : DashDirection.FORWARD; + } + + public DashDirection getChosenDirection() { return chosenDirection; } @@ -313,7 +390,12 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash { FieldDef.row( FieldDef.floatField("ability.dashDistance", this::getDashDistance, this::setDashDistance), FieldDef.floatField("ability.dashSpeed", this::getDashSpeed, this::setDashSpeed) - ) + ), + FieldDef.row( + FieldDef.enumField("ability.dashDirection", DashDirection.class, this::getDashDirectionEnum, this::setDashDirectionEnum), + FieldDef.floatField("ability.dashAngle", this::getDashAngle, this::setDashAngle) + .visibleWhen(() -> getDashDirectionEnum() == DashDirection.CUSTOM) + ).visibleWhen(() -> this.getDashModeEnum() == DashMode.DIRECTIONAL) )); } } diff --git a/src/main/java/kamkeel/npcs/controllers/data/energycharge/EnergyChargePreviewManager.java b/src/main/java/kamkeel/npcs/controllers/data/energycharge/EnergyChargePreviewManager.java index 2349f1975..558399de1 100644 --- a/src/main/java/kamkeel/npcs/controllers/data/energycharge/EnergyChargePreviewManager.java +++ b/src/main/java/kamkeel/npcs/controllers/data/energycharge/EnergyChargePreviewManager.java @@ -13,6 +13,9 @@ import java.util.concurrent.ConcurrentHashMap; */ public class EnergyChargePreviewManager { + /** Hard age cap for preview entities — last-resort safety net (60 seconds). */ + private static final int MAX_PREVIEW_AGE = 1200; + public static EnergyChargePreviewManager ClientInstance; private final ConcurrentHashMap previews = new ConcurrentHashMap(); @@ -59,6 +62,14 @@ public class EnergyChargePreviewManager { iterator.remove(); continue; } + + // Hard age cap: remove previews that have existed far too long + if (entity.ticksExisted > MAX_PREVIEW_AGE) { + entity.setDead(); + iterator.remove(); + continue; + } + entity.onUpdate(); if (entity.isDead) { iterator.remove(); diff --git a/src/main/java/kamkeel/npcs/entity/EntityEnergyAbility.java b/src/main/java/kamkeel/npcs/entity/EntityEnergyAbility.java index 01b39f80d..7922f7191 100644 --- a/src/main/java/kamkeel/npcs/entity/EntityEnergyAbility.java +++ b/src/main/java/kamkeel/npcs/entity/EntityEnergyAbility.java @@ -21,6 +21,7 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit // ==================== SAFETY CONSTANTS ==================== protected static final int CHARGE_TIMEOUT_GRACE = 60; // Ticks of grace after charge should have ended + protected static final int PREVIEW_CHARGE_GRACE = 3; // Ticks of grace for client-only charge previews protected static final int HARD_LIFETIME_CAP = 1200; // 60 seconds absolute max for projectiles/sweepers protected static final int BARRIER_HARD_LIFETIME_CAP = 12000; // 10 minutes absolute max for barriers protected static final float MAX_ENTITY_SIZE = 100.0f; // Max size/width/length for any energy entity @@ -94,7 +95,7 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit public float getInterpolatedChargeProgress(float partialTicks) { if (chargeDuration <= 0) return 1.0f; - float prevProgress = Math.max(0, (float) (chargeTick - 1) / chargeDuration); + float prevProgress = Math.min(1.0f, Math.max(0, (float) (chargeTick - 1) / chargeDuration)); float currProgress = Math.min(1.0f, (float) chargeTick / chargeDuration); return prevProgress + (currProgress - prevProgress) * partialTicks; } diff --git a/src/main/java/kamkeel/npcs/entity/EntityEnergyProjectile.java b/src/main/java/kamkeel/npcs/entity/EntityEnergyProjectile.java index 091af5086..02a124ae3 100644 --- a/src/main/java/kamkeel/npcs/entity/EntityEnergyProjectile.java +++ b/src/main/java/kamkeel/npcs/entity/EntityEnergyProjectile.java @@ -232,6 +232,18 @@ public abstract class EntityEnergyProjectile extends EntityEnergyAbility { // Preview entities skip super.onUpdate() but still need ticksExisted // for renderer pulsing effects (e.g., sin(ticksExisted + partialTicks)). this.ticksExisted++; + + // Preview-specific safety: self-destruct if charging has exceeded duration + grace + if (isCharging() && chargeDuration > 0 && chargeTick > chargeDuration + PREVIEW_CHARGE_GRACE) { + this.setDead(); + return; + } + + // Preview hard lifetime cap (mirrors real entity HARD_LIFETIME_CAP) + if (ticksExisted > HARD_LIFETIME_CAP) { + this.setDead(); + return; + } } if (!previewMode) { diff --git a/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java b/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java index 2da72ac7c..415262da7 100644 --- a/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java +++ b/src/main/java/kamkeel/npcs/util/AnchorPointHelper.java @@ -54,6 +54,9 @@ public class AnchorPointHelper { private static final float FALLBACK_FORWARD = 0.1f; // Slight forward offset private static final float FALLBACK_ARM_HEIGHT = 0.45f; // Hand height when arms hang down (near hip) + // Default arm scale (no scaling) + private static final ModelScalePart DEFAULT_ARM_SCALE = new ModelScalePart(); + /** * Calculate world position for an anchor point on an entity. */ @@ -75,10 +78,11 @@ public class AnchorPointHelper { float anchorZ = anchorData.anchorOffsetZ; double x = entity.posX; - double y = entity.posY + getClientPlayerYCorrection(entity); + // EYE uses getEyeHeight() which already gives the correct offset from posY, + // so the client player correction would double-subtract and place it at feet level + double y = entity.posY + (anchor == AnchorPoint.EYE ? 0 : getClientPlayerYCorrection(entity)); double z = entity.posZ; - float headYaw = (float) Math.toRadians(entity.rotationYawHead); float bodyYaw = (float) Math.toRadians(entity.renderYawOffset); switch (anchor) { @@ -108,8 +112,7 @@ public class AnchorPointHelper { break; case EYE: - y += entity.getEyeHeight(); - break; + return calculateEyePosition(entity, anchorData, scale); } // Rotate offsets relative to entity's body yaw @@ -136,6 +139,88 @@ public class AnchorPointHelper { return Vec3.createVectorHelper(x, y, z); } + private static Vec3 calculateEyePosition(EntityLivingBase entity, EnergyAnchorData anchorData, float scale) { + double pivotWorldX = entity.posX; + double pivotWorldY = entity.posY + entity.getEyeHeight(); + double pivotWorldZ = entity.posZ; + + float bodyYaw = (float) Math.toRadians(entity.renderYawOffset); + + float[] rotations = getHeadBoneRotations(entity); + + double ox = -anchorData.anchorOffsetX * scale; + double oy = -anchorData.anchorOffsetY * scale; + double oz = -anchorData.anchorOffsetZ * scale; + + // X rotation + double cosX = Math.cos(rotations[0]); + double sinX = Math.sin(rotations[0]); + double ry = oy * cosX - oz * sinX; + double rz = oy * sinX + oz * cosX; + double rx = ox; + oy = ry; oz = rz; + + // Y rotation + double cosY = Math.cos(rotations[1]); + double sinY = Math.sin(rotations[1]); + double rx2 = rx * cosY + oz * sinY; + double rz2 = -rx * sinY + oz * cosY; + rx = rx2; oz = rz2; + + // Z rotation + double cosZ = Math.cos(rotations[2]); + double sinZ = Math.sin(rotations[2]); + double rx3 = rx * cosZ - oy * sinZ; + double ry3 = rx * sinZ + oy * cosZ; + rx = rx3; oy = ry3; + + double cosYaw = Math.cos(bodyYaw); + double sinYaw = Math.sin(bodyYaw); + + double worldOffsetX = rx * cosYaw + oz * sinYaw; + double worldOffsetZ = rx * sinYaw - oz * cosYaw; + double worldOffsetY = -oy; // model Y-down → world Y-up + + double x = pivotWorldX + worldOffsetX; + double y = pivotWorldY + worldOffsetY; + double z = pivotWorldZ + worldOffsetZ; + + FramePart fullModel = getFullModelPart(entity); + if (fullModel != null) { + double dx = x - entity.posX; + double dy = y - entity.posY; + double dz = z - entity.posZ; + Vec3 rotatedFull = applyFullModelToWorldOffset(fullModel, entity, dx, dy, dz, bodyYaw, scale); + return Vec3.createVectorHelper( + entity.posX + rotatedFull.xCoord, + entity.posY + rotatedFull.yCoord, + entity.posZ + rotatedFull.zCoord + ); + } + + return Vec3.createVectorHelper(x, y, z); + } + + private static float[] getHeadBoneRotations(EntityLivingBase entity) { + // Try animated HEAD part first + AnimationData animData = AnimationData.getData(entity); + if (animData != null && animData.isActive() && animData.animation != null) { + Frame frame = (Frame) animData.animation.currentFrame(); + if (frame != null) { + FramePart headPart = frame.frameParts.get(EnumAnimationPart.HEAD); + if (headPart != null) { + return getRotations(headPart, entity); + } + } + } + + // Fallback: live head angles + float pitch = (float) Math.toRadians(entity.rotationPitch); + float yawDelta = (float) Math.toRadians(entity.rotationYawHead - entity.renderYawOffset); + + return new float[]{ pitch, yawDelta, 0f }; + } + /** * Get model scale factor for an entity. * NPCs have configurable model size, players use default scale. @@ -160,9 +245,6 @@ public class AnchorPointHelper { return 0.0; } - // Default arm scale (no scaling) - private static final ModelScalePart DEFAULT_ARM_SCALE = new ModelScalePart(); - /** * Get arm scale for an entity. * EntityCustomNpc has per-part scaling, others use default (1,1,1). diff --git a/src/main/java/noppes/npcs/items/ItemStaff.java b/src/main/java/noppes/npcs/items/ItemStaff.java index 143f1c535..5ce50d011 100644 --- a/src/main/java/noppes/npcs/items/ItemStaff.java +++ b/src/main/java/noppes/npcs/items/ItemStaff.java @@ -65,6 +65,11 @@ public class ItemStaff extends ItemNpcInterface implements IProjectileCallback { EntityAbilityOrb orb = (EntityAbilityOrb) entity; + if (orb.getChargeProgress() < 1.0f) { + orb.setDead(); + return; + } + orb.startMoving(null); world.playSoundAtEntity( @@ -127,7 +132,7 @@ public class ItemStaff extends ItemNpcInterface implements IProjectileCallback { ); orb.setupCharging( - new EnergyAnchorData(AnchorPoint.FRONT, 0, -1, 0), + new EnergyAnchorData(AnchorPoint.EYE, 0, 0, 1), chargeTime ); diff --git a/src/main/resources/assets/customnpcs/animations/Ability_Laser_Active.json b/src/main/resources/assets/customnpcs/animations/Ability_Laser_Active.json index 5cb4fc3be..f3117602a 100644 --- a/src/main/resources/assets/customnpcs/animations/Ability_Laser_Active.json +++ b/src/main/resources/assets/customnpcs/animations/Ability_Laser_Active.json @@ -2,69 +2,195 @@ "Loop": 0, "Speed": 1.0f, "Frames": [ - { - "ColorMarker": 16777215, - "Comment": "", - "Speed": 3.0f, - "FrameParts": [ - { - "Pivot2": 0.0f, - "Part": "LEFT_LEG", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": -18.0f - }, - { - "Pivot2": 5.0f, - "Part": "BODY", - "Rotation1": 0.0f, - "Rotation0": -25.0f, - "Pivot0": 0.0f, - "Pivot1": 2.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_LEG", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 18.0f - }, - { - "Pivot2": 2.0f, - "Part": "LEFT_ARM", - "Rotation1": 0.0f, - "Rotation0": -195.0f, - "Pivot0": -1.0f, - "Pivot1": -1.0f, - "Rotation2": -56.0f - }, - { - "Pivot2": 4.0f, - "Part": "RIGHT_ARM", - "Rotation1": 90.0f, - "Rotation0": -90.0f, - "Pivot0": 0.0f, - "Pivot1": -1.0f, - "Rotation2": 90.0f - }, - { - "Pivot2": 5.0f, - "Part": "HEAD", - "Rotation1": 0.0f, - "Rotation0": -37.0f, - "Pivot0": 0.0f, - "Pivot1": 2.0f, - "Rotation2": 0.0f - } - ], - "Smooth": 0b, - "Duration": 3 - } + { + "ColorMarker": 16777215, + "Comment": "", + "Speed": 3.0f, + "FrameParts": [ + { + "Pivot2": 0.0f, + "Part": "LEFT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": -18.0f + }, + { + "Pivot2": 0.0f, + "Part": "LEFT_ARM", + "Rotation1": 50.0f, + "Rotation0": -82.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 0.0f + }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 18.0f + }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_ARM", + "Rotation1": 2.0f, + "Rotation0": -88.0f, + "Pivot0": 1.0f, + "Pivot1": 2.0f, + "Rotation2": 86.0f + }, + { + "Pivot2": 3.0f, + "Part": "HEAD", + "Rotation1": 0.0f, + "Rotation0": 0.0f, + "Pivot0": 0.0f, + "Pivot1": 1.0f, + "Rotation2": 0.0f + }, + { + "Pivot2": 3.0f, + "Part": "BODY", + "Rotation1": 0.0f, + "Rotation0": -12.0f, + "Pivot0": 0.0f, + "Pivot1": 1.0f, + "Rotation2": 0.0f + } + ], + "Smooth": 0b, + "Duration": 3 + }, + { + "ColorMarker": 16777215, + "Comment": "", + "Speed": 3.0f, + "FrameParts": [ + { + "Pivot2": 0.0f, + "Part": "LEFT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": -18.0f + }, + { + "Pivot2": 0.0f, + "Part": "LEFT_ARM", + "Rotation1": 50.0f, + "Rotation0": -82.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 0.0f + }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 18.0f + }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_ARM", + "Rotation1": 0.0f, + "Rotation0": -92.0f, + "Pivot0": 1.0f, + "Pivot1": 2.0f, + "Rotation2": 94.0f + }, + { + "Pivot2": 3.0f, + "Part": "HEAD", + "Rotation1": 0.0f, + "Rotation0": 0.0f, + "Pivot0": 0.0f, + "Pivot1": 1.0f, + "Rotation2": 0.0f + }, + { + "Pivot2": 3.0f, + "Part": "BODY", + "Rotation1": 0.0f, + "Rotation0": -12.0f, + "Pivot0": 0.0f, + "Pivot1": 1.0f, + "Rotation2": 0.0f + } + ], + "Smooth": 0b, + "Duration": 3 + }, + { + "ColorMarker": 16777215, + "Comment": "", + "Speed": 3.0f, + "FrameParts": [ + { + "Pivot2": 0.0f, + "Part": "LEFT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": -18.0f + }, + { + "Pivot2": 0.0f, + "Part": "LEFT_ARM", + "Rotation1": 50.0f, + "Rotation0": -82.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 0.0f + }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 18.0f + }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_ARM", + "Rotation1": -2.0f, + "Rotation0": -90.0f, + "Pivot0": 1.0f, + "Pivot1": 2.0f, + "Rotation2": 80.0f + }, + { + "Pivot2": 3.0f, + "Part": "HEAD", + "Rotation1": 0.0f, + "Rotation0": 0.0f, + "Pivot0": 0.0f, + "Pivot1": 1.0f, + "Rotation2": 0.0f + }, + { + "Pivot2": 3.0f, + "Part": "BODY", + "Rotation1": 0.0f, + "Rotation0": -12.0f, + "Pivot0": 0.0f, + "Pivot1": 1.0f, + "Rotation2": 0.0f + } + ], + "Smooth": 0b, + "Duration": 3 + } ], "CurrentFrameTime": 0, "CurrentFrame": 3, diff --git a/src/main/resources/assets/customnpcs/animations/Ability_Laser_Windup.json b/src/main/resources/assets/customnpcs/animations/Ability_Laser_Windup.json index c445faca9..c12700304 100644 --- a/src/main/resources/assets/customnpcs/animations/Ability_Laser_Windup.json +++ b/src/main/resources/assets/customnpcs/animations/Ability_Laser_Windup.json @@ -7,15 +7,6 @@ "Comment": "", "Speed": 3.0f, "FrameParts": [ - { - "Pivot2": 3.0f, - "Part": "HEAD", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 1.0f, - "Rotation2": 0.0f - }, { "Pivot2": 0.0f, "Part": "LEFT_LEG", @@ -25,15 +16,6 @@ "Pivot1": 0.0f, "Rotation2": -18.0f }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 18.0f - }, { "Pivot2": 0.0f, "Part": "LEFT_ARM", @@ -43,6 +25,15 @@ "Pivot1": 0.0f, "Rotation2": 0.0f }, + { + "Pivot2": 0.0f, + "Part": "RIGHT_LEG", + "Rotation1": 0.0f, + "Rotation0": 12.0f, + "Pivot0": 0.0f, + "Pivot1": 0.0f, + "Rotation2": 18.0f + }, { "Pivot2": 0.0f, "Part": "RIGHT_ARM", @@ -52,24 +43,6 @@ "Pivot1": 2.0f, "Rotation2": 90.0f }, - { - "Pivot2": 3.0f, - "Part": "BODY", - "Rotation1": 0.0f, - "Rotation0": -12.0f, - "Pivot0": 0.0f, - "Pivot1": 1.0f, - "Rotation2": 0.0f - } - ], - "Smooth": 0b, - "Duration": 3 - }, - { - "ColorMarker": 16777215, - "Comment": "", - "Speed": 3.0f, - "FrameParts": [ { "Pivot2": 3.0f, "Part": "HEAD", @@ -79,42 +52,6 @@ "Pivot1": 1.0f, "Rotation2": 0.0f }, - { - "Pivot2": 0.0f, - "Part": "LEFT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": -18.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 18.0f - }, - { - "Pivot2": 0.0f, - "Part": "LEFT_ARM", - "Rotation1": 50.0f, - "Rotation0": -82.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_ARM", - "Rotation1": 2.0f, - "Rotation0": -88.0f, - "Pivot0": 1.0f, - "Pivot1": 2.0f, - "Rotation2": 86.0f - }, { "Pivot2": 3.0f, "Part": "BODY", @@ -126,200 +63,11 @@ } ], "Smooth": 0b, - "Duration": 3 - }, - { - "ColorMarker": 16777215, - "Comment": "", - "Speed": 3.0f, - "FrameParts": [ - { - "Pivot2": 3.0f, - "Part": "HEAD", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 1.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "LEFT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": -18.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 18.0f - }, - { - "Pivot2": 0.0f, - "Part": "LEFT_ARM", - "Rotation1": 50.0f, - "Rotation0": -82.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_ARM", - "Rotation1": 0.0f, - "Rotation0": -92.0f, - "Pivot0": 1.0f, - "Pivot1": 2.0f, - "Rotation2": 94.0f - }, - { - "Pivot2": 3.0f, - "Part": "BODY", - "Rotation1": 0.0f, - "Rotation0": -12.0f, - "Pivot0": 0.0f, - "Pivot1": 1.0f, - "Rotation2": 0.0f - } - ], - "Smooth": 0b, - "Duration": 3 - }, - { - "ColorMarker": 16777215, - "Comment": "", - "Speed": 3.0f, - "FrameParts": [ - { - "Pivot2": 3.0f, - "Part": "HEAD", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 1.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "LEFT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": -18.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_LEG", - "Rotation1": 0.0f, - "Rotation0": 12.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 18.0f - }, - { - "Pivot2": 0.0f, - "Part": "LEFT_ARM", - "Rotation1": 50.0f, - "Rotation0": -82.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_ARM", - "Rotation1": -2.0f, - "Rotation0": -90.0f, - "Pivot0": 1.0f, - "Pivot1": 2.0f, - "Rotation2": 80.0f - }, - { - "Pivot2": 3.0f, - "Part": "BODY", - "Rotation1": 0.0f, - "Rotation0": -12.0f, - "Pivot0": 0.0f, - "Pivot1": 1.0f, - "Rotation2": 0.0f - } - ], - "Smooth": 0b, - "Duration": 3 - }, - { - "ColorMarker": 16777215, - "Comment": "", - "Speed": 3.0f, - "FrameParts": [ - { - "Pivot2": 5.0f, - "Part": "HEAD", - "Rotation1": 0.0f, - "Rotation0": -37.0f, - "Pivot0": 0.0f, - "Pivot1": 2.0f, - "Rotation2": 0.0f - }, - { - "Pivot2": 0.0f, - "Part": "LEFT_LEG", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": -18.0f - }, - { - "Pivot2": 0.0f, - "Part": "RIGHT_LEG", - "Rotation1": 0.0f, - "Rotation0": 0.0f, - "Pivot0": 0.0f, - "Pivot1": 0.0f, - "Rotation2": 18.0f - }, - { - "Pivot2": 2.0f, - "Part": "LEFT_ARM", - "Rotation1": 0.0f, - "Rotation0": -195.0f, - "Pivot0": -1.0f, - "Pivot1": -1.0f, - "Rotation2": -56.0f - }, - { - "Pivot2": 4.0f, - "Part": "RIGHT_ARM", - "Rotation1": 90.0f, - "Rotation0": -90.0f, - "Pivot0": 0.0f, - "Pivot1": -1.0f, - "Rotation2": 90.0f - }, - { - "Pivot2": 5.0f, - "Part": "BODY", - "Rotation1": 0.0f, - "Rotation0": -25.0f, - "Pivot0": 0.0f, - "Pivot1": 2.0f, - "Rotation2": 0.0f - } - ], - "Smooth": 0b, - "Duration": 3 + "Duration": 15 } ], "CurrentFrameTime": 0, - "CurrentFrame": 3, + "CurrentFrame": 4, "Smooth": 0b, "ID": 12, "WhileAttacking": 1b, diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index 885947f0d..9caf6027a 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -1595,6 +1595,17 @@ ability.dash.aggressive=Aggressive ability.dash.defensive=Defensive ability.dash.directional=Directional +# Dash Direction +ability.dash.forward=Forward +ability.dash.diagonalForwardLeft=Diagonal Forward Left +ability.dash.diagonalForwardRight=Diagonal Forward Right +ability.dash.left=Left +ability.dash.right=Right +ability.dash.diagonalBackLeft=Diagonal Back Left +ability.dash.diagonalBackRight=Diagonal Back Right +ability.dash.back=Back +ability.dash.custom=Custom + # Counter Type ability.counter.flat=Flat ability.counter.percent=Percent @@ -1867,8 +1878,10 @@ ability.chargeSpeed=Charge Speed # Dash ability.dashMode=Dash Mode -ability.dashDistance=Dash Distance -ability.dashSpeed=Dash Speed +ability.dashDistance=Distance +ability.dashDirection=Direction +ability.dashSpeed=Speed +ability.dashAngle=Angle # Teleport ability.blinkRadius=Blink Radius