use of convenientadditions.api.network.PacketExtendedExplosion in project ConvenientAdditions by Necr0.
the class ExtendedExplosion method newExplosion.
public static Explosion newExplosion(ExtendedExplosion e) {
if (net.minecraftforge.event.ForgeEventFactory.onExplosionStart(e.getWorld(), e))
return e;
e.doExplosionA();
e.doExplosionB(false);
if (!e.isSmoking) {
e.clearAffectedBlockPositions();
}
for (EntityPlayer entityplayer : e.getWorld().playerEntities) {
if (entityplayer instanceof EntityPlayerMP && entityplayer.getDistanceSq(e.explosionX, e.explosionY, e.explosionZ) < 4096.0D) {
ModNetworking.INSTANCE.sendTo(new PacketExtendedExplosion(e.explosionX, e.explosionY, e.explosionZ, e.explosionSize, e.getAffectedBlockPositions(), (Vec3d) e.getPlayerKnockbackMap().get(entityplayer)), (EntityPlayerMP) entityplayer);
}
}
return e;
}
Aggregations