Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vidal committed 2026-02-25 23:00:04 -03:00
commit ef013e7095
5 files changed
+308 -334

No files matched your search

+1 -1
Submodule src/api updated: 52cfe77bb7...d6a91c4d95.
@@ -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
@@ -125,6 +161,11 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash {
return new TargetingMode[]{TargetingMode.AGGRO_TARGET};
}
@Override
public boolean isConcurrentCapable() {
return true;
}
@Override
public void onExecute(EntityLivingBase caster, EntityLivingBase target) {
preDashMotionX = caster.motionX;
@@ -133,8 +174,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 +285,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 +298,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 +346,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 +395,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)
));
}
}
@@ -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,
@@ -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,
@@ -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