diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/WindVortexRenderer.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/WindVortexRenderer.java index 36ae38c6..6cf50ec3 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/WindVortexRenderer.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/WindVortexRenderer.java @@ -12,9 +12,9 @@ import net.minecraft.util.Mth; import org.joml.Matrix4f; public class WindVortexRenderer extends EntityRenderer { - private static final int RINGS = 8; - private static final int SEGMENTS_PER_RING = 9; - private static final int ARC_STEPS = 4; + private static final int RINGS = 10; + private static final int SEGMENTS_PER_RING = 12; + private static final int ARC_STEPS = 6; private static final float BASE_RADIUS = 0.35F; public WindVortexRenderer(EntityRendererProvider.Context context) { diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java index 0a11d2b3..13bd6e33 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java @@ -222,13 +222,15 @@ public class ManticoreEntity extends Monster implements GeoEntity { this.tickQueenSummonCleanup(); this.tickPlayerSummon(); + this.tickQueenSummonTarget(); LivingEntity target = this.getTarget(); if (target != null && target.isAlive()) { if (this.onGround() && this.takeoffCooldown <= 0 && this.distanceToSqr(target) > 6.0D) { this.takeoff(); } - if (this.tickCount % SWARM_RETARGET_INTERVAL == 0) { + if (!this.isPlayerSummoned() && !this.isQueenSummoned() + && this.tickCount % SWARM_RETARGET_INTERVAL == 0) { this.spreadSwarmTarget(target); } } @@ -253,6 +255,24 @@ public class ManticoreEntity extends Monster implements GeoEntity { } if (target != null && target.isAlive() && this.canTargetEntity(target)) { this.setTarget(target); + } else if (this.getTarget() != null && !this.canTargetEntity(this.getTarget())) { + this.setTarget(null); + } + } + + private void tickQueenSummonTarget() { + if (this.summonerId == null || !(this.level() instanceof ServerLevel serverLevel)) { + return; + } + Entity entity = serverLevel.getEntity(this.summonerId); + if (!(entity instanceof QueenEntity queen) || !queen.isAlive()) { + return; + } + LivingEntity target = queen.getTarget(); + if (target != null && target.isAlive() && this.canTargetEntity(target)) { + this.setTarget(target); + } else { + this.setTarget(null); } } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java index ea19d172..d685d81f 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java @@ -69,6 +69,9 @@ public class WindVortexEntity extends Entity { private static final double BASE_RADIUS = 0.35D; private static final double DRIFT_FRICTION = 0.995D; + private static final double FALL_ACCELERATION = 0.006D; + private static final double MAX_FALL_SPEED = 0.08D; + private static final double MINIMUM_DOWNWARD_DRIFT = 0.012D; private static final int FADE_OUT_TICKS = 8; public enum VortexMode { @@ -175,8 +178,25 @@ public class WindVortexEntity extends Entity { this.travelling = false; this.noPhysics = false; this.setDeltaMovement(this.travelVelocity); - this.travelVelocity = Vec3.ZERO; } + } else if (!lensVortex) { + Vec3 current = this.getDeltaMovement(); + double downwardSpeed = Math.min(MAX_FALL_SPEED, Math.max(MINIMUM_DOWNWARD_DRIFT, + -current.y + FALL_ACCELERATION)); + Vec3 drift = new Vec3( + current.x * DRIFT_FRICTION, + -downwardSpeed, + current.z * DRIFT_FRICTION); + Vec3 from = this.position(); + Vec3 to = from.add(drift); + HitResult blockHit = this.level().clip( + new ClipContext(from, to, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + if (blockHit.getType() != HitResult.Type.MISS) { + this.fadeOut(); + return; + } + this.setDeltaMovement(drift); + this.move(net.minecraft.world.entity.MoverType.SELF, drift); } else { Vec3 drift = this.getDeltaMovement().multiply(DRIFT_FRICTION, DRIFT_FRICTION, DRIFT_FRICTION); this.setDeltaMovement(drift); diff --git a/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/vortex_expanse.json b/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/vortex_expanse.json index 9cf78d47..b649ded5 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/vortex_expanse.json +++ b/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/vortex_expanse.json @@ -36,8 +36,8 @@ "charge": 1.4 }, "antarchy:vortex": { - "energy_budget": 0.2, - "charge": 1.6 + "energy_budget": 0.9, + "charge": 12.0 } }, "carvers": { @@ -88,7 +88,7 @@ }, { "type": "antarchy:vortex", - "weight": 2, + "weight": 1, "minCount": 1, "maxCount": 1 }