- 117
- 7
Есть ентити, который взрывается. Но я хочу чтобы он наносил урон другим мобам, а блоки не разрушал. Вот кусок кода, отвечающий за взрыв, но что тут поменять не знаю. Есть у кого решение данной проблемы?
Java:
private void explode()
{
if (!this.world.isRemote)
{
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
entityareaeffectcloud.addEffect(new PotionEffect(MobEffects.POISON, 200));
boolean flag = this.world.getGameRules().getBoolean("mobGriefing");
float f = this.getPowered() ? 2.0F : 1.0F;
this.dead = true;
this.world.createExplosion(this, this.posX, this.posY, this.posZ, (float)this.explosionRadius * f, flag);
this.setDead();
this.world.spawnEntity(entityareaeffectcloud);
this.spawnLingeringCloud();
}
}