调整obb膨胀大小,调整无人机音量和速度

This commit is contained in:
Atsuishio 2025-06-15 23:39:53 +08:00 committed by Light_Quanta
parent 7a2cc5e79b
commit 1997dbb63e
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
4 changed files with 10 additions and 3 deletions

View file

@ -184,7 +184,6 @@ public class SmallCannonShellEntity extends FastThrowableProjectile implements G
.toList();
for (var entity : entities) {
causeExplode(entity.position(), false);
entity.discard();
this.discard();
}

View file

@ -384,7 +384,7 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
holdTickZ = 0;
}
this.setDeltaMovement(this.getDeltaMovement().multiply(0.97, 0.94, 0.97));
this.setDeltaMovement(this.getDeltaMovement().multiply(0.965, 0.935, 0.965));
} else {
this.setDeltaMovement(this.getDeltaMovement().multiply(0.8, 1, 0.8));
this.setZRot(this.roll * 0.7f);
@ -497,6 +497,14 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
@Override
public float getEngineSoundVolume() {
Player player = EntityFindUtil.findPlayer(this.level(), this.entityData.get(CONTROLLER));
if (player == null) return entityData.get(POWER);
ItemStack stack = player.getMainHandItem();
if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using") && stack.getOrCreateTag().getBoolean("Linked")) {
return entityData.get(POWER) * 0.25f;
}
return entityData.get(POWER) * 2f;
}

View file

@ -32,7 +32,7 @@ public class ProjectileUtilMixin {
(projectile.getOwner() == entity || entity.getPassengers().contains(projectile.getOwner()))) {
continue;
}
OBB obb = obbEntity.getOBB().inflate(pInflationAmount * 2);
OBB obb = obbEntity.getOBB().inflate(6);
Optional<Vector3f> optional = obb.clip(pStartVec.toVector3f(), pEndVec.toVector3f());
if (optional.isPresent()) {