修复投弹无人机会撞到自己手雷的bug
This commit is contained in:
parent
afcc826f8a
commit
205d86c9af
2 changed files with 2 additions and 2 deletions
|
@ -13,5 +13,5 @@ mod_description=A Warfare Mod
|
||||||
minecraft_version=1.20.1
|
minecraft_version=1.20.1
|
||||||
jei_version=15.2.0.27
|
jei_version=15.2.0.27
|
||||||
cloth_config_version=11.1.106
|
cloth_config_version=11.1.106
|
||||||
mod_version=0.3.1
|
mod_version=0.3.2
|
||||||
mod_authors=Atsuishio, Roki27, Light_Quanta
|
mod_authors=Atsuishio, Roki27, Light_Quanta
|
|
@ -380,7 +380,7 @@ public class DroneEntity extends LivingEntity implements GeoEntity {
|
||||||
var level = this.level();
|
var level = this.level();
|
||||||
final Vec3 center = new Vec3(this.getX(), this.getY(), this.getZ());
|
final Vec3 center = new Vec3(this.getX(), this.getY(), this.getZ());
|
||||||
for (Entity target : level.getEntitiesOfClass(Entity.class, aabb, e -> true).stream().sorted(Comparator.comparingDouble(e -> e.distanceToSqr(center))).toList()) {
|
for (Entity target : level.getEntitiesOfClass(Entity.class, aabb, e -> true).stream().sorted(Comparator.comparingDouble(e -> e.distanceToSqr(center))).toList()) {
|
||||||
if (this != target && target != null) {
|
if (this != target && target != null && !(target instanceof RgoGrenadeEntity)) {
|
||||||
hitEntityCrash(controller, target);
|
hitEntityCrash(controller, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue