修复音效名称错误,添加迫击炮和火箭炮发射时的屏幕抖动

This commit is contained in:
Atsuishio 2025-07-14 13:43:13 +08:00 committed by Light_Quanta
parent a94a8ffde8
commit 72ca920a0c
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
3 changed files with 6 additions and 1 deletions

View file

@ -11,6 +11,7 @@ import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.ArtilleryIndicator;
import com.atsuishio.superbwarfare.item.Monitor;
import com.atsuishio.superbwarfare.item.common.ammo.MortarShell;
import com.atsuishio.superbwarfare.network.message.receive.ShakeClientMessage;
import com.atsuishio.superbwarfare.tools.VectorTool;
import net.minecraft.ChatFormatting;
import net.minecraft.commands.arguments.EntityAnchorArgument;
@ -309,6 +310,7 @@ public class MortarEntity extends VehicleEntity implements GeoEntity, RemoteCont
this.clearContent();
resetTarget();
ShakeClientMessage.sendToNearbyPlayers(this, 6, 6, 8, 14);
}
}

View file

@ -12,6 +12,7 @@ import com.atsuishio.superbwarfare.init.ModSounds;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.common.ammo.MediumRocketItem;
import com.atsuishio.superbwarfare.item.common.container.ContainerBlockItem;
import com.atsuishio.superbwarfare.network.message.receive.ShakeClientMessage;
import com.atsuishio.superbwarfare.tools.CustomExplosion;
import com.atsuishio.superbwarfare.tools.OBB;
import com.atsuishio.superbwarfare.tools.ParticleTool;
@ -238,7 +239,7 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt
MediumRocketEntity entityToSpawn = rocketItem.createProjectile(level(), shootPos);
entityToSpawn.setOwner(player);
entityToSpawn.shoot(getShootVector(1).x, getShootVector(1).y, getShootVector(1).z, 10, (float) 0.5);
entityToSpawn.shoot(getShootVector(1).x, getShootVector(1).y, getShootVector(1).z, 10, (float) 0.75);
level().addFreshEntity(entityToSpawn);
level().playSound(null, shootPos.x, shootPos.y, shootPos.z, ModSounds.MEDIUM_ROCKET_FIRE.get(), SoundSource.PLAYERS, 4f, random.nextFloat() * 0.1f + 0.95f);
@ -266,6 +267,8 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt
serverLevel.sendParticles(ParticleTypes.FLAME, pPos2.x, pPos2.y, pPos2.z, 2, 0.05, 0.05, 0.05, 0.007);
}
}
ShakeClientMessage.sendToNearbyPlayers(this, 8, 8, 10, 20);
}
@Override