From 7e470cd95b0454e5c7935812c3448f97b54177eb Mon Sep 17 00:00:00 2001 From: craisinlord Date: Sun, 5 Jul 2026 20:38:54 -0500 Subject: [PATCH] fixed new nightmare --- .../entity/nightmare/NightmareEntity.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java index f613bf47..6c296799 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java @@ -76,10 +76,6 @@ public class NightmareEntity extends Monster implements GeoEntity { private static final int ANIM_ATTACK = 3; private static final int ANIM_FLY_ATTACK = 4; private static final int ANIM_ROAR = 5; - private static final int ANIM_DEATH = 6; - private static final int ANIM_TAKEOFF = 7; - private static final int ANIM_FLY_DAMAGED = 8; - private static final int ATTACK_TOTAL_TICKS = 20; private static final int ATTACK_DAMAGE_TICK = 10; private static final int INTRO_ROAR_TICKS = 30; @@ -103,13 +99,10 @@ public class NightmareEntity extends Monster implements GeoEntity { private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); - private static final RawAnimation TAKEOFF_ANIM = RawAnimation.begin().thenLoop("fly"); private static final RawAnimation FLY_ANIM = RawAnimation.begin().thenLoop("fly"); private static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenPlay("attack").thenLoop("idle"); private static final RawAnimation FLY_ATTACK_ANIM = RawAnimation.begin().thenPlay("attack2").thenLoop("fly"); private static final RawAnimation ROAR_ANIM = RawAnimation.begin().thenPlay("roar").thenLoop("idle"); - private static final RawAnimation DEATH_ANIM = RawAnimation.begin().thenPlayAndHold("roar"); - private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this); private int attackCooldown; @@ -179,18 +172,14 @@ public class NightmareEntity extends Monster implements GeoEntity { int animState = this.getAnimationState(); state.getController().setAnimationSpeed(switch (animState) { case ANIM_FLY -> 0.45D; - case ANIM_DEATH -> 0.6D; default -> 1.0D; }); return switch (animState) { case ANIM_WALK -> state.setAndContinue(WALK_ANIM); - case ANIM_TAKEOFF -> state.setAndContinue(TAKEOFF_ANIM); case ANIM_FLY -> state.setAndContinue(FLY_ANIM); -// case ANIM_FLY_DAMAGED -> state.setAndContinue(FLY_ANIM); case ANIM_ATTACK -> state.setAndContinue(ATTACK_ANIM); case ANIM_FLY_ATTACK -> state.setAndContinue(FLY_ATTACK_ANIM); case ANIM_ROAR -> state.setAndContinue(ROAR_ANIM); - case ANIM_DEATH -> state.setAndContinue(DEATH_ANIM); default -> state.setAndContinue(IDLE_ANIM); }; } @@ -257,7 +246,6 @@ public class NightmareEntity extends Monster implements GeoEntity { } if (this.isDeadOrDying()) { - this.setAnimationState(ANIM_DEATH); this.updateFlightRotation(); return; } @@ -375,7 +363,6 @@ public class NightmareEntity extends Monster implements GeoEntity { @Override public void die(DamageSource damageSource) { if (!this.level().isClientSide) { - this.setAnimationState(ANIM_DEATH); this.attackAnimationTicks = 0; this.attackCooldown = 0; this.roarTicks = 0; @@ -389,9 +376,6 @@ public class NightmareEntity extends Monster implements GeoEntity { @Override protected void tickDeath() { this.deathTime++; - if (this.deathTime == 1) { - this.setAnimationState(ANIM_DEATH); - } if (this.deathTime >= DEATH_TICKS) { this.remove(RemovalReason.KILLED); this.dropExperience(this); @@ -649,7 +633,6 @@ public class NightmareEntity extends Monster implements GeoEntity { private void updateAnimationState() { if (this.isDeadOrDying()) { - this.setAnimationState(ANIM_DEATH); this.groundMoveTicks = 0; this.wingFlapCooldown = 0; return; @@ -669,7 +652,7 @@ public class NightmareEntity extends Monster implements GeoEntity { if (this.flyingToTarget) { this.groundMoveTicks = 0; if (this.onGround() || this.airborneTicks <= 8) { - this.setAnimationState(ANIM_TAKEOFF); + this.setAnimationState(ANIM_FLY); this.wingFlapCooldown = 0; } else { this.setAnimationState(ANIM_FLY);