修复SmokeDecoyEntity构造函数调用错误

This commit is contained in:
Light_Quanta 2025-05-27 01:25:48 +08:00
parent d0e44ff9c3
commit ca3c0289b1
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -291,9 +291,8 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
public void releaseSmokeDecoy(Vec3 vec3) { public void releaseSmokeDecoy(Vec3 vec3) {
if (decoyInputDown) { if (decoyInputDown) {
if (this.entityData.get(DECOY_COUNT) > 0 && this.level() instanceof ServerLevel) { if (this.entityData.get(DECOY_COUNT) > 0 && this.level() instanceof ServerLevel) {
Entity passenger = getFirstPassenger();
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
SmokeDecoyEntity smokeDecoyEntity = new SmokeDecoyEntity((LivingEntity) passenger, this.level()); SmokeDecoyEntity smokeDecoyEntity = new SmokeDecoyEntity(this.level());
smokeDecoyEntity.setPos(this.getX(), this.getY() + getBbHeight(), this.getZ()); smokeDecoyEntity.setPos(this.getX(), this.getY() + getBbHeight(), this.getZ());
smokeDecoyEntity.decoyShoot(this, vec3.yRot((-78.75f + 22.5F * i) * Mth.DEG_TO_RAD), 4f, 8); smokeDecoyEntity.decoyShoot(this, vec3.yRot((-78.75f + 22.5F * i) * Mth.DEG_TO_RAD), 4f, 8);
this.level().addFreshEntity(smokeDecoyEntity); this.level().addFreshEntity(smokeDecoyEntity);