diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java index 1f2de0046..985956532 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java @@ -269,9 +269,10 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity this.rightInputDown = false; this.forwardInputDown = false; this.backInputDown = false; - this.setZRot(this.roll * 0.8f); - this.setXRot(this.getXRot() * 0.8f); - this.entityData.set(POWER, this.entityData.get(POWER) * 0.98f); + this.upInputDown = false; + this.downInputDown = false; + this.setZRot(this.roll * 0.98f); + this.setXRot(this.getXRot() * 0.98f); } else if (passenger instanceof Player) { diffY = Math.clamp(-90f, 90f, Mth.wrapDegrees(passenger.getYHeadRot() - this.getYRot())); diffX = Math.clamp(-60f, 60f, Mth.wrapDegrees(passenger.getXRot() - this.getXRot())); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/VehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/VehicleEntity.java index d7aab73bc..c409aae5d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/VehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/VehicleEntity.java @@ -156,6 +156,17 @@ public class VehicleEntity extends Entity { return InteractionResult.PASS; } + public double getYRotFromVector(Vec3 vec3) { + this.setDeltaMovement(vec3); + return Mth.atan2(vec3.x, vec3.z) * (180F / Math.PI); + } + + public double getXRotFromVector(Vec3 vec3) { + this.setDeltaMovement(vec3); + double d0 = vec3.horizontalDistance(); + return Mth.atan2(vec3.y, d0) * (180F / Math.PI); + } + @Override public boolean hurt(@NotNull DamageSource source, float amount) { // 计算减伤后的伤害 diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java index 94b9a2bf8..b236d9088 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -147,7 +147,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti .multiply(0.2f, ModDamageTypes.PROJECTILE_BOOM) .multiply(0.1f, ModDamageTypes.MINE) .multiply(0.1f, ModDamageTypes.LUNGE_MINE) - .multiply(0.15f, ModDamageTypes.CANNON_FIRE) + .multiply(0.22f, ModDamageTypes.CANNON_FIRE) .multiply(0.05f, ModTags.DamageTypes.PROJECTILE_ABSOLUTE) .reduce(9); } diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java b/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java index 2c0a357aa..773b2dbd3 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java @@ -89,7 +89,7 @@ public class ModEntities { public static final RegistryObject> LASER_TOWER = register("laser_tower", EntityType.Builder.of(LaserTowerEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(true).setTrackingRange(64).setUpdateInterval(3).setCustomClientFactory(LaserTowerEntity::new).fireImmune().sized(0.9f, 1.65f)); public static final RegistryObject> YX_100 = register("yx_100", - EntityType.Builder.of(Yx100Entity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(true).setTrackingRange(64).setUpdateInterval(3).setCustomClientFactory(Yx100Entity::new).fireImmune().sized(6f, 3.5f)); + EntityType.Builder.of(Yx100Entity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(true).setTrackingRange(64).setUpdateInterval(3).setCustomClientFactory(Yx100Entity::new).fireImmune().sized(5.5f, 3.25f)); public static final RegistryObject> YX_100_GUN = register("yx_100_gun", EntityType.Builder.of(Yx100GunEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(true).setTrackingRange(64).setUpdateInterval(3).setCustomClientFactory(Yx100GunEntity::new).fireImmune().sized(0.9f, 0.65f));