if (this.level instanceof ServerWorld && this.level.isThundering() && EnchantmentHelper.hasChanneling(this.tridentItem)) {
BlockPos blockpos = entity.blockPosition();
if (this.level.canSeeSky(blockpos)) {
LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(this.level);
lightningboltentity.moveTo(Vector3d.atBottomCenterOf(blockpos));
lightningboltentity.setCause(entity1 instanceof ServerPlayerEntity ? (ServerPlayerEntity)entity1 : null);
this.level.addFreshEntity(lightningboltentity);
soundevent = SoundEvents.TRIDENT_THUNDER;
f1 = 5.0F;
}
}